From b37d6e198274a2f0dbe9cd63b135b452d8dd4167 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 18 Sep 2024 10:09:25 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.399.0 --- .gitignore | 1 + .npmignore | 1 + .speakeasy/gen.lock | 128 +++- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 14 +- README.md | 455 ++++++------ RELEASES.md | 12 +- USAGE.md | 12 +- .../components/activedelegatordetails.md | 22 +- .../components/activevalidatordetails.md | 40 +- .../components/addressactivitymetadata.md | 8 +- docs/models/components/addressdetails.md | 4 +- .../components/addresseschangerequest.md | 4 +- .../components/aggregatedassetamount.md | 14 +- .../components/alltimeerc20balancequerydto.md | 18 +- .../alltimenativebalancequerydto.md | 16 +- .../components/alltimenftholdersquerydto.md | 16 +- .../alltimestarsarenabalancequerydto.md | 16 +- .../components/anytimeerc20balancequerydto.md | 18 +- .../anytimenativebalancequerydto.md | 16 +- .../components/anytimenftholdersquerydto.md | 16 +- .../anytimenftholdersquerydtoparams.md | 8 +- .../anytimestarsarenabalancequerydto.md | 16 +- docs/models/components/assetamount.md | 12 +- docs/models/components/assetwithpriceinfo.md | 20 +- docs/models/components/blockchain.md | 12 +- docs/models/components/blockchainids.md | 2 +- docs/models/components/blockchaininfo.md | 2 +- docs/models/components/blscredentials.md | 4 +- .../models/components/cchainatomicbalances.md | 48 +- .../components/cchainexporttransaction.md | 153 ++-- .../components/cchainimporttransaction.md | 143 ++-- .../components/cchainsharedassetbalance.md | 16 +- docs/models/components/chain.md | 10 +- .../components/chainaddresschainidmap.md | 6 +- .../chainaddresschainidmaplistresponse.md | 14 +- docs/models/components/chaininfo.md | 28 +- .../chainrollingwindowmetricsvalue.md | 10 +- docs/models/components/collectiblebalances.md | 18 +- .../components/completeddelegatordetails.md | 22 +- .../components/completedvalidatordetails.md | 24 +- .../components/compositequeryrequestdto.md | 4 +- .../components/compositequeryresponse.md | 16 +- .../components/contractdeploymentdetails.md | 4 +- docs/models/components/contracts.md | 16 +- .../createevmtransactionexportrequest.md | 22 +- ...eprimarynetworktransactionexportrequest.md | 18 +- .../models/components/createwebhookrequest.md | 18 +- .../createwebhookrequestmetadata.md | 8 +- .../components/datalistchainsresponse.md | 36 +- .../daterangeerc20minbalanceparam.md | 10 +- .../components/daterangeminbalanceparam.md | 8 +- .../components/daterangenftholdersparam.md | 8 +- .../daterangestarsarenaminbalanceparam.md | 8 +- docs/models/components/delegators.md | 22 +- docs/models/components/delegatorsdetails.md | 4 +- ...iveredsourcenotindexedteleportermessage.md | 74 +- ...sourcenotindexedteleportermessagestatus.md | 3 +- .../components/deliveredteleportermessage.md | 84 +-- docs/models/components/destinationchainid.md | 16 + docs/models/components/enabledfeatures.md | 4 +- docs/models/components/erc1155contract.md | 16 +- docs/models/components/erc1155token.md | 14 +- docs/models/components/erc1155tokenbalance.md | 18 +- .../models/components/erc1155tokenmetadata.md | 2 +- docs/models/components/erc1155transfer.md | 61 +- .../components/erc1155transferdetails.md | 52 +- docs/models/components/erc20contract.md | 18 +- docs/models/components/erc20token.md | 22 +- docs/models/components/erc20tokenbalance.md | 34 +- docs/models/components/erc20transfer.md | 69 +- .../models/components/erc20transferdetails.md | 60 +- docs/models/components/erc721contract.md | 16 +- docs/models/components/erc721token.md | 20 +- docs/models/components/erc721tokenbalance.md | 22 +- docs/models/components/erc721tokenmetadata.md | 2 +- docs/models/components/erc721transfer.md | 65 +- .../components/erc721transferdetails.md | 56 +- docs/models/components/evmblock.md | 23 +- docs/models/components/evminput.md | 30 +- docs/models/components/evmnetworkoptions.md | 8 +- docs/models/components/evmoutput.md | 18 +- .../fullnativetransactiondetails.md | 71 +- docs/models/components/getchainresponse.md | 28 +- .../getchainresponseenabledfeatures.md | 2 +- docs/models/components/getevmblockresponse.md | 23 +- .../components/getnativebalanceresponse.md | 32 +- .../components/getnetworkdetailsresponse.md | 34 +- .../getprimarynetworkblockresponse.md | 18 +- .../components/gettransactionresponse.md | 117 ++-- docs/models/components/glacierapifeature.md | 2 +- docs/models/components/groupedby.md | 2 +- docs/models/components/groupvalue.md | 2 +- docs/models/components/historicalreward.md | 44 +- docs/models/components/includechains.md | 2 +- docs/models/components/internaltransaction.md | 51 +- .../components/internaltransactiondetails.md | 42 +- .../components/internaltransactionopcall.md | 2 +- docs/models/components/latestbalanceparams.md | 6 +- .../components/latestbalancequerydto.md | 14 +- .../lateststarsarenabalanceparams.md | 4 +- .../lateststarsarenabalancequerydto.md | 12 +- .../components/listblockchainsresponse.md | 20 +- .../listcchainatomicbalancesresponse.md | 60 +- .../listcchainatomictransactionsresponse.md | 10 +- ...natomictransactionsresponsetransactions.md | 153 ++-- .../listcollectiblebalancesresponse.md | 2 +- .../components/listcontractsresponse.md | 2 +- .../listdelegatordetailsresponse.md | 30 +- .../components/listerc1155balancesresponse.md | 26 +- .../listerc1155transactionsresponse.md | 2 +- .../components/listerc20balancesresponse.md | 2 +- .../listerc20transactionsresponse.md | 2 +- .../components/listerc721balancesresponse.md | 30 +- .../listerc721transactionsresponse.md | 2 +- .../components/listevmblocksresponse.md | 31 +- .../listhistoricalrewardsresponse.md | 52 +- .../listinternaltransactionsresponse.md | 2 +- .../listnativetransactionsresponse.md | 2 +- docs/models/components/listnfttokens.md | 2 +- .../components/listpchainbalancesresponse.md | 196 +++--- .../listpchaintransactionsresponse.md | 10 +- .../components/listpchainutxosresponse.md | 56 +- .../components/listpendingrewardsresponse.md | 42 +- .../listprimarynetworkblocksresponse.md | 32 +- docs/models/components/listsubnetsresponse.md | 40 +- .../listteleportermessagesresponse.md | 2 +- .../listtransactiondetailsresponse.md | 2 +- .../components/listtransfersresponse.md | 2 +- docs/models/components/listutxosresponse.md | 66 +- .../listvalidatordetailsresponse.md | 2 +- .../listwebhookaddressesresponse.md | 6 +- .../models/components/listwebhooksresponse.md | 38 +- .../components/listxchainbalancesresponse.md | 104 +-- .../listxchaintransactionsresponse.md | 10 +- .../components/listxchainverticesresponse.md | 34 +- docs/models/components/logsformat.md | 32 +- docs/models/components/logsformatmetadata.md | 6 +- docs/models/components/logsresponsedto.md | 42 +- .../models/components/lookingglassresponse.md | 8 +- docs/models/components/messages.md | 77 +-- docs/models/components/method.md | 6 +- docs/models/components/metric.md | 26 +- docs/models/components/metricsapiresponse.md | 12 +- .../components/metricslistchainsresponse.md | 18 +- docs/models/components/metricsvalue.md | 4 +- docs/models/components/money.md | 4 +- docs/models/components/nativetokenbalance.md | 30 +- docs/models/components/nativetransaction.md | 67 +- docs/models/components/networktoken.md | 10 +- docs/models/components/networktokendetails.md | 30 +- docs/models/components/nftholdersresponse.md | 16 +- .../components/operationstatusresponse.md | 12 +- docs/models/components/operationtype.md | 2 +- docs/models/components/operator.md | 2 +- docs/models/components/params.md | 8 +- .../models/components/pchainaddressdetails.md | 6 +- docs/models/components/pchainbalance.md | 184 ++--- .../components/pchainlookingglassresponse.md | 10 +- docs/models/components/pchainsharedasset.md | 18 +- docs/models/components/pchaintransaction.md | 184 ++--- .../components/pchaintransactiontype.md | 2 +- docs/models/components/pchainutxo.md | 42 +- .../components/pendingdelegatordetails.md | 22 +- docs/models/components/pendingreward.md | 34 +- .../components/pendingteleportermessage.md | 70 +- .../components/pendingvalidatordetails.md | 14 +- docs/models/components/primarynetworkblock.md | 18 +- .../components/primarynetworkchaininfo.md | 4 +- .../components/primarynetworkoperationtype.md | 3 +- .../components/primarynetworkoptions.md | 4 +- .../models/components/primarynetworktxtype.md | 2 +- docs/models/components/queries.md | 14 +- .../components/removedvalidatordetails.md | 18 +- docs/models/components/requesttype.md | 2 +- docs/models/components/resourcelink.md | 4 +- docs/models/components/resourcelinktype.md | 2 +- docs/models/components/rewards.md | 4 +- docs/models/components/richaddress.md | 12 +- .../rollingwindowmetricsapiresponse.md | 14 +- docs/models/components/security.md | 2 +- .../components/sharedsecretsresponse.md | 2 +- docs/models/components/sortbyoption.md | 2 +- docs/models/components/sourcechainid.md | 16 + docs/models/components/stakingdistribution.md | 6 +- docs/models/components/subnet.md | 34 +- docs/models/components/subnetownershipinfo.md | 8 +- .../teleporterchainmetricsapiresponse.md | 19 + .../teleporterdestinationtransaction.md | 10 +- .../components/teleportermessageinfo.md | 21 + docs/models/components/teleportermetric.md | 15 + .../components/teleportermetricsvalue.md | 17 + docs/models/components/teleporterreceipt.md | 4 +- .../components/teleporterrewarddetails.md | 24 +- .../components/teleportersourcetransaction.md | 6 +- .../timestamprangenftholdersparam.md | 8 +- docs/models/components/tokens.md | 17 +- docs/models/components/transactiondetails.md | 78 ++- .../components/transactiondirectiontype.md | 15 + .../components/transactionmethodtype.md | 2 +- docs/models/components/transactions.md | 195 +++--- .../components/transactionvertexdetail.md | 6 +- docs/models/components/transfers.md | 63 +- docs/models/components/unknowncontract.md | 14 +- .../components/usagemetricsresponsedto.md | 34 +- .../models/components/usagemetricsvaluedto.md | 16 +- docs/models/components/utxo.md | 54 +- docs/models/components/utxocredential.md | 6 +- .../components/validatorhealthdetails.md | 8 +- docs/models/components/validators.md | 29 +- docs/models/components/validatorsdetails.md | 22 +- docs/models/components/webhookresponse.md | 28 +- .../components/webhookresponsemetadata.md | 8 +- docs/models/components/webhookstatustype.md | 2 +- docs/models/components/xchainassetdetails.md | 14 +- docs/models/components/xchainbalances.md | 92 +-- .../components/xchainlineartransaction.md | 188 ++--- .../components/xchainnonlineartransaction.md | 196 +++--- .../components/xchainsharedassetbalance.md | 16 +- .../components/xchaintransactiontype.md | 2 +- docs/models/components/xchainvertex.md | 20 +- docs/models/errors/badgatewaymessage.md | 2 +- docs/models/errors/forbiddenmessage.md | 4 +- .../errors/internalservererrormessage.md | 4 +- .../errors/serviceunavailablemessage.md | 4 +- docs/models/errors/toomanyrequestsmessage.md | 4 +- docs/models/errors/unauthorizedmessage.md | 4 +- .../addaddressestowebhookrequest.md | 10 +- .../operations/datahealthcheckresponsebody.md | 24 +- .../operations/deactivatewebhookrequest.md | 2 +- .../getaddressesbybalanceovertimerequest.md | 10 +- .../getaddressesbybalanceovertimeresponse.md | 10 +- .../getaddressesbybtcbbridgedrequest.md | 4 +- .../getaddressesbybtcbbridgedresponse.md | 10 +- .../getaddressesfromwebhookrequest.md | 4 +- .../getaddressesfromwebhookresponse.md | 10 +- docs/models/operations/getapilogsrequest.md | 4 +- docs/models/operations/getapilogsresponse.md | 44 +- .../operations/getapiusagemetricsrequest.md | 8 +- .../operations/getassetdetailsrequest.md | 4 +- .../getbalancesbyaddressesrequest.md | 6 +- .../getbalancesbyaddressesresponsebody.md | 196 +++--- docs/models/operations/getblockbyidrequest.md | 4 +- docs/models/operations/getblockrequest.md | 2 +- .../getchainidsforaddressesrequest.md | 2 +- .../operations/getcontractmetadatarequest.md | 2 +- .../getcontractmetadataresponsebody.md | 15 +- .../getdeploymenttransactionrequest.md | 4 +- .../operations/getevmchainmetricsrequest.md | 10 +- .../operations/getevmchainmetricsresponse.md | 16 +- .../getevmchainrollingwindowmetricsrequest.md | 2 +- .../operations/getlatestblocksrequest.md | 2 +- .../operations/getlatestblocksresponse.md | 35 +- .../operations/getnativebalancerequest.md | 6 +- .../getnftholdersbycontractaddressrequest.md | 4 +- .../getnftholdersbycontractaddressresponse.md | 18 +- .../operations/getoperationresultrequest.md | 2 +- .../getsinglevalidatordetailsrequest.md | 8 +- .../getsinglevalidatordetailsresponse.md | 6 +- .../operations/getstakingmetricsrequest.md | 10 +- .../operations/getstakingmetricsresponse.md | 16 +- .../models/operations/getsubnetbyidrequest.md | 2 +- .../operations/getteleportermessagerequest.md | 2 +- .../getteleportermessageresponsebody.md | 79 +-- .../getteleportermetricsbychainglobals.md | 15 + .../getteleportermetricsbychainrequest.md | 18 + .../operations/gettokendetailsrequest.md | 4 +- .../operations/gettokendetailsresponsebody.md | 17 +- .../operations/gettransactionrequest.md | 2 +- .../gettransactionsforblockrequest.md | 2 +- docs/models/operations/gettxbyhashrequest.md | 4 +- .../operations/gettxbyhashresponsebody.md | 171 ++--- .../operations/getutxosbyaddressesrequest.md | 8 +- .../operations/getutxosbyaddressesresponse.md | 63 +- .../getutxosbyaddressesresponsebody.md | 66 +- .../getvalidatorsbydaterangerequest.md | 10 +- .../getvalidatorsbydaterangeresponse.md | 12 +- .../operations/getvertexbyhashrequest.md | 4 +- .../operations/getvertexbyheightrequest.md | 8 +- .../operations/getvertexbyheightresponse.md | 36 +- docs/models/operations/getwebhookrequest.md | 2 +- ...rimarynetworkstakingtransactionsrequest.md | 16 +- ...imarynetworkstakingtransactionsresponse.md | 12 +- .../listassettransactionsrequest.md | 14 +- .../listassettransactionsresponse.md | 12 +- .../operations/listblockchainsrequest.md | 4 +- .../operations/listblockchainsresponse.md | 24 +- docs/models/operations/listchainsrequest.md | 2 +- docs/models/operations/listchainsresponse.md | 22 +- .../listcollectiblebalancesrequest.md | 6 +- .../listcollectiblebalancesresponse.md | 6 +- .../listcontractdeploymentsrequest.md | 4 +- .../listcontractdeploymentsresponse.md | 6 +- .../operations/listdelegatorsrequest.md | 13 +- .../operations/listdelegatorsresponse.md | 32 +- .../operations/listerc1155balancesrequest.md | 8 +- .../operations/listerc1155balancesresponse.md | 30 +- .../listerc1155transactionsrequest.md | 8 +- .../listerc1155transactionsresponse.md | 6 +- .../operations/listerc20balancesrequest.md | 12 +- .../operations/listerc20balancesresponse.md | 6 +- .../listerc20transactionsrequest.md | 8 +- .../listerc20transactionsresponse.md | 6 +- .../operations/listerc721balancesrequest.md | 6 +- .../operations/listerc721balancesresponse.md | 34 +- .../listerc721transactionsrequest.md | 8 +- .../listerc721transactionsresponse.md | 6 +- ...thistoricalprimarynetworkrewardsrequest.md | 11 +- ...historicalprimarynetworkrewardsresponse.md | 56 +- .../listinternaltransactionsrequest.md | 8 +- .../listinternaltransactionsresponse.md | 6 +- .../listlatestprimarynetworkblocksrequest.md | 4 +- .../listlatestprimarynetworkblocksresponse.md | 34 +- ...latestprimarynetworktransactionsrequest.md | 16 +- ...atestprimarynetworktransactionsresponse.md | 12 +- ...tprimarynetworktransactionsresponsebody.md | 10 +- .../listlatesttransactionsrequest.md | 2 +- .../listlatesttransactionsresponse.md | 6 +- .../listlatestxchainverticesrequest.md | 4 +- .../listlatestxchainverticesresponse.md | 36 +- .../listnativetransactionsrequest.md | 8 +- .../listnativetransactionsresponse.md | 6 +- ...listpendingprimarynetworkrewardsrequest.md | 9 +- ...istpendingprimarynetworkrewardsresponse.md | 44 +- ...listprimarynetworkblocksbynodeidrequest.md | 6 +- ...istprimarynetworkblocksbynodeidresponse.md | 34 +- docs/models/operations/listsubnetsrequest.md | 4 +- docs/models/operations/listsubnetsresponse.md | 46 +- .../listteleportermessagesbyaddressrequest.md | 22 + .../listteleportermessagesrequest.md | 12 +- .../listteleportermessagesresponse.md | 6 +- docs/models/operations/listtokensrequest.md | 4 +- docs/models/operations/listtokensresponse.md | 6 +- .../operations/listtransactionsrequest.md | 10 +- .../operations/listtransactionsresponse.md | 6 +- .../models/operations/listtransfersrequest.md | 8 +- .../operations/listtransfersresponse.md | 6 +- .../operations/listvalidatorsrequest.md | 27 +- .../operations/listvalidatorsresponse.md | 6 +- docs/models/operations/listwebhooksrequest.md | 4 +- .../models/operations/listwebhooksresponse.md | 42 +- .../metricshealthcheckresponsebody.md | 24 +- .../posttransactionexportjobrequestbody.md | 19 +- docs/models/operations/reindexnftrequest.md | 4 +- .../removeaddressesfromwebhookrequest.md | 10 +- docs/models/operations/requesttype.md | 2 +- .../operations/supportedchainsrequest.md | 4 +- .../models/operations/updatewebhookrequest.md | 4 +- docs/sdks/avacloudsdkmetrics/README.md | 91 +++ docs/sdks/chains/README.md | 4 +- docs/sdks/teleporter/README.md | 95 +++ package-lock.json | 4 +- package.json | 6 +- src/funcs/dataEvmBalancesGetNativeBalance.ts | 296 ++++---- .../dataEvmBalancesListCollectibleBalances.ts | 408 +++++------ .../dataEvmBalancesListErc1155Balances.ts | 410 +++++------ src/funcs/dataEvmBalancesListErc20Balances.ts | 414 +++++------ .../dataEvmBalancesListErc721Balances.ts | 408 +++++------ src/funcs/dataEvmBlocksGetBlock.ts | 279 ++++---- src/funcs/dataEvmBlocksGetLatestBlocks.ts | 391 ++++++----- src/funcs/dataEvmChainsGetChainInfo.ts | 269 ++++---- src/funcs/dataEvmChainsSupportedChains.ts | 267 +++---- .../dataEvmContractsGetContractMetadata.ts | 283 ++++---- ...EvmTransactionsGetDeploymentTransaction.ts | 297 ++++---- .../dataEvmTransactionsGetTransaction.ts | 280 ++++---- ...aEvmTransactionsGetTransactionsForBlock.ts | 283 ++++---- ...aEvmTransactionsListContractDeployments.ts | 404 +++++------ ...aEvmTransactionsListErc1155Transactions.ts | 410 +++++------ ...ataEvmTransactionsListErc20Transactions.ts | 410 +++++------ ...taEvmTransactionsListErc721Transactions.ts | 410 +++++------ ...EvmTransactionsListInternalTransactions.ts | 410 +++++------ ...taEvmTransactionsListLatestTransactions.ts | 396 ++++++----- ...taEvmTransactionsListNativeTransactions.ts | 410 +++++------ .../dataEvmTransactionsListTransactions.ts | 407 +++++------ src/funcs/dataEvmTransactionsListTransfers.ts | 404 +++++------ src/funcs/dataHealthCheckDataHealthCheck.ts | 178 +++-- src/funcs/dataNftsGetTokenDetails.ts | 290 ++++---- src/funcs/dataNftsListTokens.ts | 400 ++++++----- src/funcs/dataNftsReindexNft.ts | 291 ++++---- src/funcs/dataOperationsGetOperationResult.ts | 272 ++++---- .../dataOperationsPostTransactionExportJob.ts | 264 +++---- ...ryNetworkBalancesGetBalancesByAddresses.ts | 299 ++++---- .../dataPrimaryNetworkBlocksGetBlockById.ts | 289 ++++---- ...orkBlocksListLatestPrimaryNetworkBlocks.ts | 412 +++++------ ...kBlocksListPrimaryNetworkBlocksByNodeId.ts | 420 +++++------ .../dataPrimaryNetworkGetAssetDetails.ts | 290 ++++---- ...taPrimaryNetworkGetChainIdsForAddresses.ts | 287 ++++---- .../dataPrimaryNetworkGetNetworkDetails.ts | 273 ++++---- ...PrimaryNetworkGetSingleValidatorDetails.ts | 408 +++++------ src/funcs/dataPrimaryNetworkGetSubnetById.ts | 279 ++++---- .../dataPrimaryNetworkListBlockchains.ts | 393 ++++++----- src/funcs/dataPrimaryNetworkListDelegators.ts | 399 +++++------ src/funcs/dataPrimaryNetworkListSubnets.ts | 392 ++++++----- src/funcs/dataPrimaryNetworkListValidators.ts | 417 +++++------ ...ardsListHistoricalPrimaryNetworkRewards.ts | 408 +++++------ ...RewardsListPendingPrimaryNetworkRewards.ts | 408 +++++------ ...taPrimaryNetworkTransactionsGetTxByHash.ts | 289 ++++---- ...ActivePrimaryNetworkStakingTransactions.ts | 428 ++++++------ ...etworkTransactionsListAssetTransactions.ts | 420 +++++------ ...onsListLatestPrimaryNetworkTransactions.ts | 424 ++++++------ ...aPrimaryNetworkUtxosGetUtxosByAddresses.ts | 414 +++++------ ...taPrimaryNetworkVerticesGetVertexByHash.ts | 290 ++++---- ...PrimaryNetworkVerticesGetVertexByHeight.ts | 410 +++++------ ...NetworkVerticesListLatestXChainVertices.ts | 406 +++++------ .../dataTeleporterGetTeleporterMessage.ts | 272 ++++---- .../dataTeleporterListTeleporterMessages.ts | 387 ++++++----- ...leporterListTeleporterMessagesByAddress.ts | 197 ++++++ src/funcs/dataUsageMetricsGetApiLogs.ts | 387 ++++++----- .../dataUsageMetricsGetApiUsageMetrics.ts | 286 ++++---- .../dataWebhooksAddAddressesToWebhook.ts | 278 ++++---- src/funcs/dataWebhooksCreateWebhook.ts | 258 +++---- src/funcs/dataWebhooksDeactivateWebhook.ts | 269 ++++---- src/funcs/dataWebhooksGenerateSharedSecret.ts | 233 ++++--- .../dataWebhooksGetAddressesFromWebhook.ts | 390 ++++++----- src/funcs/dataWebhooksGetSharedSecret.ts | 231 ++++--- src/funcs/dataWebhooksGetWebhook.ts | 265 +++---- src/funcs/dataWebhooksListWebhooks.ts | 373 +++++----- .../dataWebhooksRemoveAddressesFromWebhook.ts | 278 ++++---- src/funcs/dataWebhooksUpdateWebhook.ts | 274 ++++---- .../metricsChainMetricsGetEvmChainMetrics.ts | 410 +++++------ ...nMetricsGetEvmChainRollingWindowMetrics.ts | 285 ++++---- .../metricsChainMetricsGetStakingMetrics.ts | 410 +++++------ ...ChainMetricsGetTeleporterMetricsByChain.ts | 192 ++++++ src/funcs/metricsEvmChainsGetChain.ts | 271 ++++---- src/funcs/metricsEvmChainsListChains.ts | 373 +++++----- .../metricsHealthCheckMetricsHealthCheck.ts | 180 +++-- .../metricsLookingGlassCompositeQuery.ts | 260 +++---- ...okingGlassGetAddressesByBalanceOverTime.ts | 416 +++++------ ...csLookingGlassGetAddressesByBtcbBridged.ts | 377 +++++----- ...kingGlassGetNftHoldersByContractAddress.ts | 412 +++++------ ...icsLookingGlassGetValidatorsByDateRange.ts | 401 ++++++----- src/hooks/hooks.ts | 167 ++--- src/hooks/index.ts | 2 +- src/hooks/types.ts | 107 +-- src/index.ts | 2 +- src/lib/config.ts | 71 +- src/lib/matchers.ts | 422 ++++++------ src/lib/schemas.ts | 96 +-- src/lib/sdks.ts | 651 +++++++++--------- src/lib/security.ts | 306 ++++---- .../components/activedelegatordetails.ts | 133 ++-- .../components/activevalidatordetails.ts | 219 +++--- .../components/addressactivitymetadata.ts | 52 +- src/models/components/addressdetails.ts | 55 +- .../components/addresseschangerequest.ts | 38 +- .../components/aggregatedassetamount.ts | 124 ++-- .../components/alltimeerc20balancequerydto.ts | 76 +- .../alltimenativebalancequerydto.ts | 75 +- .../components/alltimenftholdersquerydto.ts | 129 ++-- .../alltimestarsarenabalancequerydto.ts | 85 +-- .../components/anytimeerc20balancequerydto.ts | 76 +- .../anytimenativebalancequerydto.ts | 76 +- .../components/anytimenftholdersquerydto.ts | 139 ++-- .../anytimestarsarenabalancequerydto.ts | 85 +-- src/models/components/assetamount.ts | 116 ++-- src/models/components/assetwithpriceinfo.ts | 137 ++-- src/models/components/blockchain.ts | 75 +- src/models/components/blockchainid.ts | 40 +- src/models/components/blockchainids.ts | 40 +- src/models/components/blockchaininfo.ts | 35 +- src/models/components/blscredentials.ts | 43 +- src/models/components/cchainatomicbalances.ts | 50 +- .../components/cchainexporttransaction.ts | 221 +++--- .../components/cchainimporttransaction.ts | 223 +++--- .../components/cchainsharedassetbalance.ts | 132 ++-- src/models/components/chain.ts | 85 +-- .../components/chainaddresschainidmap.ts | 48 +- .../chainaddresschainidmaplistresponse.ts | 43 +- src/models/components/chaininfo.ts | 222 +++--- src/models/components/chainmetric.ts | 44 +- .../components/chainrollingwindowmetric.ts | 34 +- .../chainrollingwindowmetricsvalue.ts | 94 +-- src/models/components/chainstatus.ts | 20 +- .../components/completeddelegatordetails.ts | 126 ++-- .../components/completedvalidatordetails.ts | 156 ++--- .../components/compositequeryrequestdto.ts | 601 ++++++++-------- .../components/compositequeryresponse.ts | 74 +- .../components/contractdeploymentdetails.ts | 60 +- .../createevmtransactionexportrequest.ts | 101 +-- ...eprimarynetworktransactionexportrequest.ts | 80 ++- src/models/components/createwebhookrequest.ts | 143 ++-- src/models/components/currencycode.ts | 42 +- .../components/datalistchainsresponse.ts | 42 +- .../daterangeerc20minbalanceparam.ts | 64 +- .../components/daterangeminbalanceparam.ts | 56 +- .../components/daterangenftholdersparam.ts | 56 +- .../daterangestarsarenaminbalanceparam.ts | 57 +- src/models/components/delegationstatustype.ts | 26 +- src/models/components/delegatorsdetails.ts | 43 +- ...iveredsourcenotindexedteleportermessage.ts | 179 ++--- .../components/deliveredteleportermessage.ts | 212 +++--- src/models/components/erc1155contract.ts | 211 +++--- src/models/components/erc1155token.ts | 100 +-- src/models/components/erc1155tokenbalance.ts | 126 ++-- src/models/components/erc1155tokenmetadata.ts | 126 ++-- src/models/components/erc1155transfer.ts | 141 ++-- .../components/erc1155transferdetails.ts | 82 +-- src/models/components/erc20contract.ts | 225 +++--- src/models/components/erc20token.ts | 148 ++-- src/models/components/erc20tokenbalance.ts | 188 ++--- src/models/components/erc20transfer.ts | 141 ++-- src/models/components/erc20transferdetails.ts | 82 +-- src/models/components/erc721contract.ts | 195 +++--- src/models/components/erc721token.ts | 138 ++-- src/models/components/erc721tokenbalance.ts | 154 +++-- src/models/components/erc721tokenmetadata.ts | 118 ++-- src/models/components/erc721transfer.ts | 133 ++-- .../components/erc721transferdetails.ts | 74 +- src/models/components/eventtype.ts | 18 +- src/models/components/evmblock.ts | 175 ++--- src/models/components/evminput.ts | 87 +-- src/models/components/evmnetworkoptions.ts | 43 +- src/models/components/evmoperationtype.ts | 22 +- src/models/components/evmoutput.ts | 65 +- .../fullnativetransactiondetails.ts | 265 +++---- src/models/components/getchainresponse.ts | 222 +++--- src/models/components/getevmblockresponse.ts | 172 ++--- .../components/getnativebalanceresponse.ts | 48 +- .../components/getnetworkdetailsresponse.ts | 58 +- .../getprimarynetworkblockresponse.ts | 114 +-- .../components/gettransactionresponse.ts | 161 +++-- src/models/components/glacierapifeature.ts | 25 +- src/models/components/globalparamnetwork.ts | 24 +- src/models/components/historicalreward.ts | 137 ++-- src/models/components/imageasset.ts | 49 +- src/models/components/index.ts | 5 + src/models/components/internaltransaction.ts | 158 ++--- .../components/internaltransactiondetails.ts | 102 +-- .../components/internaltransactionopcall.ts | 32 +- src/models/components/latestbalanceparams.ts | 62 +- .../components/latestbalancequerydto.ts | 76 +- .../lateststarsarenabalanceparams.ts | 40 +- .../lateststarsarenabalancequerydto.ts | 80 +-- .../components/listblockchainsresponse.ts | 56 +- .../listcchainatomicbalancesresponse.ts | 58 +- .../listcchainatomictransactionsresponse.ts | 137 ++-- .../listcollectiblebalancesresponse.ts | 124 ++-- .../components/listcontractsresponse.ts | 297 ++++---- .../listdelegatordetailsresponse.ts | 265 +++---- .../components/listerc1155balancesresponse.ts | 62 +- .../listerc1155transactionsresponse.ts | 56 +- .../components/listerc20balancesresponse.ts | 62 +- .../listerc20transactionsresponse.ts | 56 +- .../components/listerc721balancesresponse.ts | 62 +- .../listerc721transactionsresponse.ts | 56 +- .../components/listevmblocksresponse.ts | 56 +- .../listhistoricalrewardsresponse.ts | 56 +- .../listinternaltransactionsresponse.ts | 56 +- .../listnativetransactionsresponse.ts | 56 +- src/models/components/listnfttokens.ts | 98 +-- .../components/listpchainbalancesresponse.ts | 58 +- .../listpchaintransactionsresponse.ts | 72 +- .../components/listpchainutxosresponse.ts | 72 +- .../components/listpendingrewardsresponse.ts | 56 +- .../listprimarynetworkblocksresponse.ts | 72 +- src/models/components/listsubnetsresponse.ts | 53 +- .../listteleportermessagesresponse.ts | 191 ++--- .../listtransactiondetailsresponse.ts | 56 +- .../components/listtransfersresponse.ts | 143 ++-- src/models/components/listutxosresponse.ts | 74 +- .../listvalidatordetailsresponse.ts | 319 ++++----- .../listwebhookaddressesresponse.ts | 54 +- src/models/components/listwebhooksresponse.ts | 56 +- .../components/listxchainbalancesresponse.ts | 58 +- .../listxchaintransactionsresponse.ts | 133 ++-- .../components/listxchainverticesresponse.ts | 72 +- src/models/components/logsformat.ts | 239 +++---- src/models/components/logsformatmetadata.ts | 66 +- src/models/components/logsresponsedto.ts | 79 ++- src/models/components/lookingglassresponse.ts | 62 +- src/models/components/method.ts | 67 +- src/models/components/metric.ts | 57 +- src/models/components/metricsapiresponse.ts | 62 +- .../components/metricslistchainsresponse.ts | 59 +- src/models/components/metricsvalue.ts | 52 +- src/models/components/money.ts | 55 +- src/models/components/nativetokenbalance.ts | 143 ++-- src/models/components/nativetransaction.ts | 230 ++++--- src/models/components/networkmetric.ts | 28 +- src/models/components/networktoken.ts | 88 +-- src/models/components/networktokendetails.ts | 77 ++- src/models/components/networktype.ts | 20 +- src/models/components/nftholdersresponse.ts | 118 ++-- .../components/nfttokenmetadatastatus.ts | 42 +- src/models/components/operationstatus.ts | 28 +- src/models/components/operationstatuscode.ts | 26 +- .../components/operationstatusresponse.ts | 128 ++-- src/models/components/operationtype.ts | 30 +- src/models/components/operator.ts | 20 +- src/models/components/pchainaddressdetails.ts | 52 +- src/models/components/pchainbalance.ts | 157 ++--- src/models/components/pchainid.ts | 22 +- .../components/pchainlookingglassresponse.ts | 62 +- src/models/components/pchainsharedasset.ts | 143 ++-- src/models/components/pchaintransaction.ts | 355 +++++----- .../components/pchaintransactiontype.ts | 52 +- src/models/components/pchainutxo.ts | 267 +++---- .../components/pendingdelegatordetails.ts | 132 ++-- src/models/components/pendingreward.ts | 127 ++-- .../components/pendingteleportermessage.ts | 194 +++--- .../components/pendingvalidatordetails.ts | 138 ++-- src/models/components/pricingproviders.ts | 35 +- src/models/components/primarynetwork.ts | 24 +- .../components/primarynetworkassetcap.ts | 24 +- .../components/primarynetworkassettype.ts | 22 +- src/models/components/primarynetworkblock.ts | 114 +-- .../components/primarynetworkchaininfo.ts | 54 +- .../components/primarynetworkchainname.ts | 24 +- .../components/primarynetworkoperationtype.ts | 26 +- .../components/primarynetworkoptions.ts | 94 +-- src/models/components/primarynetworktxtype.ts | 56 +- src/models/components/proposerdetails.ts | 67 +- .../components/removedvalidatordetails.ts | 154 +++-- src/models/components/requesttype.ts | 20 +- src/models/components/resourcelink.ts | 48 +- src/models/components/resourcelinktype.ts | 56 +- src/models/components/rewards.ts | 47 +- src/models/components/rewardtype.ts | 22 +- src/models/components/richaddress.ts | 94 +-- .../rollingwindowmetricsapiresponse.ts | 48 +- src/models/components/security.ts | 35 +- .../components/sharedsecretsresponse.ts | 32 +- src/models/components/sortbyoption.ts | 24 +- src/models/components/sortorder.ts | 20 +- src/models/components/stakingdistribution.ts | 48 +- src/models/components/subnet.ts | 125 ++-- src/models/components/subnetownershipinfo.ts | 66 +- .../teleporterchainmetricsapiresponse.ts | 55 ++ .../teleporterdestinationtransaction.ts | 64 +- .../components/teleportermessageinfo.ts | 139 ++++ src/models/components/teleportermetric.ts | 34 + .../components/teleportermetricsvalue.ts | 48 ++ src/models/components/teleporterreceipt.ts | 43 +- .../components/teleporterrewarddetails.ts | 151 ++-- .../components/teleportersourcetransaction.ts | 48 +- .../components/timeintervalgranularity.ts | 26 +- .../timeintervalgranularityextended.ts | 28 +- .../timestamprangenftholdersparam.ts | 56 +- src/models/components/tokentype.ts | 20 +- src/models/components/transactiondetails.ts | 138 ++-- .../components/transactiondirectiontype.ts | 35 + .../components/transactionexportmetadata.ts | 68 +- .../components/transactionmethodtype.ts | 26 +- src/models/components/transactionstatus.ts | 24 +- .../components/transactionvertexdetail.ts | 66 +- src/models/components/unknowncontract.ts | 181 ++--- src/models/components/updatewebhookrequest.ts | 80 +-- .../components/usagemetricsgroupbyenum.ts | 28 +- .../components/usagemetricsresponsedto.ts | 73 +- src/models/components/usagemetricsvaluedto.ts | 206 +++--- src/models/components/utilityaddresses.ts | 35 +- src/models/components/utxo.ts | 194 +++--- src/models/components/utxocredential.ts | 55 +- src/models/components/utxotype.ts | 20 +- src/models/components/validationstatustype.ts | 28 +- .../components/validatorhealthdetails.ts | 80 +-- src/models/components/validatorsdetails.ts | 77 ++- src/models/components/vmname.ts | 22 +- src/models/components/webhookresponse.ts | 173 ++--- src/models/components/webhookstatus.ts | 24 +- src/models/components/webhookstatustype.ts | 24 +- src/models/components/xchainassetdetails.ts | 136 ++-- src/models/components/xchainbalances.ts | 89 +-- src/models/components/xchainid.ts | 26 +- .../components/xchainlineartransaction.ts | 258 +++---- .../components/xchainnonlineartransaction.ts | 251 +++---- .../components/xchainsharedassetbalance.ts | 132 ++-- .../components/xchaintransactiontype.ts | 32 +- src/models/components/xchainvertex.ts | 88 +-- src/models/errors/badgateway.ts | 158 +++-- src/models/errors/badrequest.ts | 160 ++--- src/models/errors/datahealthcheck.ts | 332 +++++---- src/models/errors/forbidden.ts | 158 +++-- src/models/errors/httpclienterrors.ts | 38 +- src/models/errors/internalservererror.ts | 161 +++-- src/models/errors/metricshealthcheck.ts | 319 ++++----- src/models/errors/notfound.ts | 158 +++-- src/models/errors/sdkerror.ts | 32 +- src/models/errors/serviceunavailable.ts | 161 +++-- src/models/errors/toomanyrequests.ts | 159 +++-- src/models/errors/unauthorized.ts | 159 +++-- .../operations/addaddressestowebhook.ts | 80 ++- src/models/operations/compositequeryv2.ts | 4 +- src/models/operations/createwebhook.ts | 4 +- src/models/operations/datahealthcheck.ts | 266 ++++--- src/models/operations/deactivatewebhook.ts | 42 +- src/models/operations/generatesharedsecret.ts | 4 +- .../getaddressesbybalanceovertime.ts | 230 ++++--- .../operations/getaddressesbybtcbbridged.ts | 133 ++-- .../operations/getaddressesfromwebhook.ts | 132 ++-- src/models/operations/getapilogs.ts | 255 +++---- src/models/operations/getapiusagemetrics.ts | 190 ++--- src/models/operations/getassetdetails.ts | 110 +-- .../operations/getbalancesbyaddresses.ts | 173 ++--- src/models/operations/getblock.ts | 100 +-- src/models/operations/getblockbyid.ts | 110 +-- src/models/operations/getchain.ts | 86 +-- .../operations/getchainidsforaddresses.ts | 96 +-- src/models/operations/getchaininfo.ts | 80 +-- src/models/operations/getcontractmetadata.ts | 200 +++--- .../operations/getdeploymenttransaction.ts | 110 +-- src/models/operations/getevmchainmetrics.ts | 234 ++++--- .../getevmchainrollingwindowmetrics.ts | 98 +-- src/models/operations/getlatestblocks.ts | 170 +++-- src/models/operations/getnativebalance.ts | 124 ++-- src/models/operations/getnetworkdetails.ts | 82 +-- .../getnftholdersbycontractaddress.ts | 188 ++--- src/models/operations/getoperationresult.ts | 42 +- src/models/operations/getsharedsecret.ts | 4 +- .../operations/getsinglevalidatordetails.ts | 213 +++--- src/models/operations/getstakingmetrics.ts | 226 +++--- src/models/operations/getsubnetbyid.ts | 96 +-- src/models/operations/getteleportermessage.ts | 140 ++-- .../operations/getteleportermetricsbychain.ts | 105 +++ src/models/operations/gettokendetails.ts | 174 ++--- src/models/operations/gettransaction.ts | 94 +-- .../operations/gettransactionsforblock.ts | 94 +-- src/models/operations/gettxbyhash.ts | 174 ++--- src/models/operations/getutxosbyaddresses.ts | 294 ++++---- .../operations/getvalidatorsbydaterange.ts | 174 +++-- src/models/operations/getvertexbyhash.ts | 110 +-- src/models/operations/getvertexbyheight.ts | 212 +++--- src/models/operations/getwebhook.ts | 45 +- src/models/operations/index.ts | 2 + ...activeprimarynetworkstakingtransactions.ts | 216 +++--- .../operations/listassettransactions.ts | 240 ++++--- src/models/operations/listblockchains.ts | 184 +++-- src/models/operations/listchains.ts | 121 ++-- .../operations/listcollectiblebalances.ts | 198 +++--- .../operations/listcontractdeployments.ts | 184 +++-- src/models/operations/listdelegators.ts | 226 +++--- src/models/operations/listerc1155balances.ts | 212 +++--- .../operations/listerc1155transactions.ts | 212 +++--- src/models/operations/listerc20balances.ts | 240 ++++--- .../operations/listerc20transactions.ts | 212 +++--- src/models/operations/listerc721balances.ts | 198 +++--- .../operations/listerc721transactions.ts | 212 +++--- .../listhistoricalprimarynetworkrewards.ts | 214 +++--- .../operations/listinternaltransactions.ts | 212 +++--- .../listlatestprimarynetworkblocks.ts | 188 ++--- .../listlatestprimarynetworktransactions.ts | 279 ++++---- .../operations/listlatesttransactions.ts | 184 +++-- .../operations/listlatestxchainvertices.ts | 184 +++-- .../operations/listnativetransactions.ts | 212 +++--- .../listpendingprimarynetworkrewards.ts | 216 +++--- .../listprimarynetworkblocksbynodeid.ts | 202 +++--- src/models/operations/listsubnets.ts | 184 +++-- .../operations/listteleportermessages.ts | 202 +++--- .../listteleportermessagesbyaddress.ts | 76 ++ src/models/operations/listtokens.ts | 190 ++--- src/models/operations/listtransactions.ts | 226 +++--- src/models/operations/listtransfers.ts | 212 +++--- src/models/operations/listvalidators.ts | 360 +++++----- src/models/operations/listwebhooks.ts | 132 ++-- src/models/operations/metricshealthcheck.ts | 248 +++---- .../operations/posttransactionexportjob.ts | 48 +- src/models/operations/reindexnft.ts | 114 +-- .../operations/removeaddressesfromwebhook.ts | 81 ++- src/models/operations/supportedchains.ts | 58 +- src/models/operations/updatewebhook.ts | 80 ++- src/sdk/avacloudsdkbalances.ts | 168 +++-- src/sdk/avacloudsdkblocks.ts | 56 +- src/sdk/avacloudsdkchains.ts | 56 +- src/sdk/avacloudsdkevm.ts | 40 +- src/sdk/avacloudsdkhealthcheck.ts | 19 +- src/sdk/avacloudsdkmetrics.ts | 104 ++- src/sdk/avacloudsdktransactions.ts | 358 +++++----- src/sdk/balances.ts | 34 +- src/sdk/blocks.ts | 94 +-- src/sdk/chain.ts | 8 +- src/sdk/chains.ts | 56 +- src/sdk/contracts.ts | 28 +- src/sdk/data.ts | 78 +-- src/sdk/evm.ts | 8 +- src/sdk/healthcheck.ts | 19 +- src/sdk/lookingglass.ts | 152 ++-- src/sdk/metrics.ts | 32 +- src/sdk/nfts.ts | 84 ++- src/sdk/operations.ts | 60 +- src/sdk/primarynetwork.ts | 330 +++++---- src/sdk/rewards.ts | 68 +- src/sdk/sdk.ts | 16 +- src/sdk/teleporter.ts | 75 +- src/sdk/transactions.ts | 144 ++-- src/sdk/usagemetrics.ts | 56 +- src/sdk/utxos.ts | 30 +- src/sdk/vertices.ts | 90 +-- src/sdk/webhooks.ts | 274 ++++---- src/types/index.ts | 8 +- 789 files changed, 39323 insertions(+), 35516 deletions(-) create mode 100644 docs/models/components/destinationchainid.md create mode 100644 docs/models/components/sourcechainid.md create mode 100644 docs/models/components/teleporterchainmetricsapiresponse.md create mode 100644 docs/models/components/teleportermessageinfo.md create mode 100644 docs/models/components/teleportermetric.md create mode 100644 docs/models/components/teleportermetricsvalue.md create mode 100644 docs/models/components/transactiondirectiontype.md create mode 100644 docs/models/operations/getteleportermetricsbychainglobals.md create mode 100644 docs/models/operations/getteleportermetricsbychainrequest.md create mode 100644 docs/models/operations/listteleportermessagesbyaddressrequest.md create mode 100644 src/funcs/dataTeleporterListTeleporterMessagesByAddress.ts create mode 100644 src/funcs/metricsChainMetricsGetTeleporterMetricsByChain.ts create mode 100644 src/models/components/teleporterchainmetricsapiresponse.ts create mode 100644 src/models/components/teleportermessageinfo.ts create mode 100644 src/models/components/teleportermetric.ts create mode 100644 src/models/components/teleportermetricsvalue.ts create mode 100644 src/models/components/transactiondirectiontype.ts create mode 100644 src/models/operations/getteleportermetricsbychain.ts create mode 100644 src/models/operations/listteleportermessagesbyaddress.ts diff --git a/.gitignore b/.gitignore index 99a6f8f..e6a8533 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/__tests__ /models /models/errors /types diff --git a/.npmignore b/.npmignore index 3ef05d1..06cd8ab 100644 --- a/.npmignore +++ b/.npmignore @@ -7,3 +7,4 @@ /cjs /.tshy /.tshy-* +/__tests__ diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 7d674a8..d80f1cb 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 2b9c4bf6-4d87-4382-84d9-5fb3c84c7fad management: - docChecksum: de56c11640ee74201a1e764914156364 + docChecksum: 0a601eeff2a842e0ce421042c59435e8 docVersion: Beta - speakeasyVersion: 1.391.3 - generationVersion: 2.411.5 - releaseVersion: 0.4.1 - configChecksum: 65a11287f2924c59e6f953cbaed453c1 + speakeasyVersion: 1.399.0 + generationVersion: 2.415.8 + releaseVersion: 0.5.0 + configChecksum: 24b7a2b64288da36f73d316744178030 repoURL: https://github.com/ava-labs/avacloud-sdk-typescript.git installationURL: https://github.com/ava-labs/avacloud-sdk-typescript published: true @@ -15,10 +15,11 @@ features: additionalDependencies: 0.1.0 additionalProperties: 0.1.1 constsAndDefaults: 0.1.11 - core: 3.16.2 + core: 3.17.3 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 devContainers: 2.90.0 + enumUnions: 0.1.0 envVarSecurityUsage: 0.1.1 examples: 2.81.4 globalSecurity: 2.82.11 @@ -117,6 +118,7 @@ generatedFiles: - docs/models/components/deliveredsourcenotindexedteleportermessagestatus.md - docs/models/components/deliveredteleportermessage.md - docs/models/components/deliveredteleportermessagestatus.md + - docs/models/components/destinationchainid.md - docs/models/components/enabledfeatures.md - docs/models/components/erc1155contract.md - docs/models/components/erc1155contracterctype.md @@ -273,11 +275,16 @@ generatedFiles: - docs/models/components/sharedsecretsresponse.md - docs/models/components/sortbyoption.md - docs/models/components/sortorder.md + - docs/models/components/sourcechainid.md - docs/models/components/stakingdistribution.md - docs/models/components/status.md - docs/models/components/subnet.md - docs/models/components/subnetownershipinfo.md + - docs/models/components/teleporterchainmetricsapiresponse.md - docs/models/components/teleporterdestinationtransaction.md + - docs/models/components/teleportermessageinfo.md + - docs/models/components/teleportermetric.md + - docs/models/components/teleportermetricsvalue.md - docs/models/components/teleporterreceipt.md - docs/models/components/teleporterrewarddetails.md - docs/models/components/teleporterrewarddetailserctype.md @@ -288,6 +295,7 @@ generatedFiles: - docs/models/components/tokens.md - docs/models/components/tokentype.md - docs/models/components/transactiondetails.md + - docs/models/components/transactiondirectiontype.md - docs/models/components/transactionexportmetadata.md - docs/models/components/transactionmethodtype.md - docs/models/components/transactions.md @@ -413,6 +421,8 @@ generatedFiles: - docs/models/operations/getsubnetbyidrequest.md - docs/models/operations/getteleportermessagerequest.md - docs/models/operations/getteleportermessageresponsebody.md + - docs/models/operations/getteleportermetricsbychainglobals.md + - docs/models/operations/getteleportermetricsbychainrequest.md - docs/models/operations/gettokendetailsglobals.md - docs/models/operations/gettokendetailsrequest.md - docs/models/operations/gettokendetailsresponsebody.md @@ -505,6 +515,7 @@ generatedFiles: - docs/models/operations/listsubnetsglobals.md - docs/models/operations/listsubnetsrequest.md - docs/models/operations/listsubnetsresponse.md + - docs/models/operations/listteleportermessagesbyaddressrequest.md - docs/models/operations/listteleportermessagesrequest.md - docs/models/operations/listteleportermessagesresponse.md - docs/models/operations/listtokensglobals.md @@ -613,6 +624,7 @@ generatedFiles: - src/funcs/dataPrimaryNetworkVerticesListLatestXChainVertices.ts - src/funcs/dataTeleporterGetTeleporterMessage.ts - src/funcs/dataTeleporterListTeleporterMessages.ts + - src/funcs/dataTeleporterListTeleporterMessagesByAddress.ts - src/funcs/dataUsageMetricsGetApiLogs.ts - src/funcs/dataUsageMetricsGetApiUsageMetrics.ts - src/funcs/dataWebhooksAddAddressesToWebhook.ts @@ -628,6 +640,7 @@ generatedFiles: - src/funcs/metricsChainMetricsGetEvmChainMetrics.ts - src/funcs/metricsChainMetricsGetEvmChainRollingWindowMetrics.ts - src/funcs/metricsChainMetricsGetStakingMetrics.ts + - src/funcs/metricsChainMetricsGetTeleporterMetricsByChain.ts - src/funcs/metricsEvmChainsGetChain.ts - src/funcs/metricsEvmChainsListChains.ts - src/funcs/metricsHealthCheckMetricsHealthCheck.ts @@ -842,7 +855,11 @@ generatedFiles: - src/models/components/stakingdistribution.ts - src/models/components/subnet.ts - src/models/components/subnetownershipinfo.ts + - src/models/components/teleporterchainmetricsapiresponse.ts - src/models/components/teleporterdestinationtransaction.ts + - src/models/components/teleportermessageinfo.ts + - src/models/components/teleportermetric.ts + - src/models/components/teleportermetricsvalue.ts - src/models/components/teleporterreceipt.ts - src/models/components/teleporterrewarddetails.ts - src/models/components/teleportersourcetransaction.ts @@ -851,6 +868,7 @@ generatedFiles: - src/models/components/timestamprangenftholdersparam.ts - src/models/components/tokentype.ts - src/models/components/transactiondetails.ts + - src/models/components/transactiondirectiontype.ts - src/models/components/transactionexportmetadata.ts - src/models/components/transactionmethodtype.ts - src/models/components/transactionstatus.ts @@ -925,6 +943,7 @@ generatedFiles: - src/models/operations/getstakingmetrics.ts - src/models/operations/getsubnetbyid.ts - src/models/operations/getteleportermessage.ts + - src/models/operations/getteleportermetricsbychain.ts - src/models/operations/gettokendetails.ts - src/models/operations/gettransaction.ts - src/models/operations/gettransactionsforblock.ts @@ -959,6 +978,7 @@ generatedFiles: - src/models/operations/listprimarynetworkblocksbynodeid.ts - src/models/operations/listsubnets.ts - src/models/operations/listteleportermessages.ts + - src/models/operations/listteleportermessagesbyaddress.ts - src/models/operations/listtokens.ts - src/models/operations/listtransactions.ts - src/models/operations/listtransfers.ts @@ -1092,6 +1112,8 @@ examples: application/json: {"message": [], "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": [], "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"results": []} getEvmChainRollingWindowMetrics: "": parameters: @@ -1115,6 +1137,8 @@ examples: application/json: {"message": [], "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": "", "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"result": {"lastHour": "7983.08", "lastDay": "45.59", "lastMonth": "371.4", "lastYear": "1064.36", "allTime": "1946.22"}} getStakingMetrics: "": parameters: @@ -1143,6 +1167,8 @@ examples: application/json: {"message": [], "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": [], "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"results": []} getNftHoldersByContractAddress: "": parameters: @@ -1383,6 +1409,8 @@ examples: application/json: {"message": "", "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": [], "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"operationId": "", "operationType": "TRANSACTION_EXPORT_PRIMARY_NETWORK_SIMPLE", "operationStatus": "RUNNING", "createdAtTimestamp": "8977.59", "updatedAtTimestamp": "7978.63"} postTransactionExportJob: speakeasy-default-post-transaction-export-job: requestBody: @@ -1404,6 +1432,8 @@ examples: application/json: {"message": [], "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": "", "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"operationId": "", "operationType": "TRANSACTION_EXPORT_PRIMARY_NETWORK_SIMPLE", "operationStatus": "COMPLETED", "createdAtTimestamp": "4525.17", "updatedAtTimestamp": "2355.88"} getAssetDetails: "": parameters: @@ -1454,6 +1484,8 @@ examples: application/json: {"message": "", "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": "", "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"addresses": []} getNetworkDetails: "": parameters: @@ -1476,6 +1508,8 @@ examples: application/json: {"message": "", "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": "", "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"validatorDetails": {"validatorCount": "2213.22", "totalAmountStaked": "", "estimatedAnnualStakingReward": "", "stakingDistributionByVersion": [], "stakingRatio": ""}, "delegatorDetails": {"delegatorCount": "6055.02", "totalAmountStaked": ""}} listBlockchains: "": parameters: @@ -1501,6 +1535,8 @@ examples: application/json: {"message": "", "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": "", "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"blockchains": []} listSubnets: "": parameters: @@ -1589,6 +1625,8 @@ examples: application/json: {"message": [], "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": [], "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"validators": []} getSingleValidatorDetails: "": parameters: @@ -1616,6 +1654,8 @@ examples: application/json: {"message": "", "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": [], "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"validators": []} listDelegators: "": parameters: @@ -1644,6 +1684,8 @@ examples: application/json: {"message": "", "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": "", "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"delegators": []} getTxByHash: "": parameters: @@ -1905,6 +1947,8 @@ examples: application/json: {"message": [], "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": [], "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"blockNumber": "", "blockHash": "", "parentHash": "", "blockTimestamp": "8593.73", "blockType": "", "txCount": "7619.2", "transactions": [], "blockSizeBytes": "105.5"} listPrimaryNetworkBlocksByNodeId: "": parameters: @@ -1931,6 +1975,8 @@ examples: application/json: {"message": "", "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": [], "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"blocks": [], "chainInfo": {"chainName": "p-chain", "network": "fuji"}} listLatestPrimaryNetworkBlocks: "": parameters: @@ -1956,6 +2002,8 @@ examples: application/json: {"message": "", "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": "", "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"blocks": [], "chainInfo": {"chainName": "c-chain", "network": "fuji"}} listLatestXChainVertices: "": parameters: @@ -1981,6 +2029,8 @@ examples: application/json: {"message": "", "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": [], "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"vertices": [], "chainInfo": {"chainName": "c-chain", "network": "fuji"}} getVertexByHash: "": parameters: @@ -2005,6 +2055,8 @@ examples: application/json: {"message": "", "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": [], "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"vertexHash": "", "parentHashes": [], "vertexHeight": "4224.5", "vertexIndex": "7135.7", "vertexTimestamp": "2810.46", "txCount": "1065.03", "transactions": [], "vertexSizeBytes": "9438.79"} getVertexByHeight: "": parameters: @@ -2032,6 +2084,8 @@ examples: application/json: {"message": "", "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": [], "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"vertices": [], "chainInfo": {"chainName": "p-chain", "network": "fuji"}} getApiUsageMetrics: "": parameters: @@ -2057,6 +2111,8 @@ examples: application/json: {"message": "", "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": [], "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"aggregateDuration": "", "orgId": "", "metrics": []} getApiLogs: "": parameters: @@ -2080,6 +2136,8 @@ examples: application/json: {"message": "", "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": [], "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"orgId": "", "logs": []} listWebhooks: "": parameters: @@ -2219,6 +2277,8 @@ examples: application/json: {"message": "", "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": "", "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"secret": ""} getSharedSecret: speakeasy-default-get-shared-secret: responses: @@ -2238,6 +2298,8 @@ examples: application/json: {"message": "", "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": [], "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"secret": ""} getAddressesFromWebhook: "": parameters: @@ -2262,6 +2324,8 @@ examples: application/json: {"message": [], "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": [], "statusCode": 503, "error": "Service Unavailable"} + "200": + application/json: {"addresses": [], "totalAddresses": "1108.33"} removeAddressesFromWebhook: "": parameters: @@ -2969,3 +3033,55 @@ examples: application/json: {"message": [], "statusCode": 502, "error": "Bad Gateway"} "503": application/json: {"message": [], "statusCode": 503, "error": "Service Unavailable"} + getTeleporterMetricsByChain: + "": + parameters: + path: + metric: "teleporterSourceTxnCount" + chainId: "43114" + responses: + "200": + application/json: {"result": {"value": "2345.82"}} + "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"} + listTeleporterMessagesByAddress: + "": + parameters: + path: + address: "0x8578AE7723751446B196bD5124e1bF57B40EB7Bc" + query: + pageSize: "10" + network: "mainnet" + responses: + "200": + application/json: {"messages": []} + "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"} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 0edf013..778b6e4 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -15,7 +15,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false typescript: - version: 0.4.1 + version: 0.5.0 additionalDependencies: dependencies: json-canonicalize: ^1.0.6 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 649e9e7..04d1c70 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.391.3 +speakeasyVersion: 1.399.0 sources: AvaCloudSDK-OAS: sourceNamespace: avacloud-sdk-oas - sourceRevisionDigest: sha256:251c5b6aa9a651564e9b69411631eac5671c54cc8a45f3280da6957c8091a774 - sourceBlobDigest: sha256:ba96ad26dd4ca0ced556d74cf2f2ecfaddc9516b8681f8f762e559ce4887befc + sourceRevisionDigest: sha256:98a91833db3ac388d4c548af88210163cb020e6c031bc2f4f8db644e628f1728 + sourceBlobDigest: sha256:d04f5c207904c22d7cc67dddc5bb483095171bf2a4be21b4aea5a739ee8aaef9 tags: - latest - main @@ -18,17 +18,15 @@ targets: avacloud-sdk: source: AvaCloudSDK-OAS sourceNamespace: avacloud-sdk-oas - sourceRevisionDigest: sha256:251c5b6aa9a651564e9b69411631eac5671c54cc8a45f3280da6957c8091a774 - sourceBlobDigest: sha256:ba96ad26dd4ca0ced556d74cf2f2ecfaddc9516b8681f8f762e559ce4887befc + sourceRevisionDigest: sha256:98a91833db3ac388d4c548af88210163cb020e6c031bc2f4f8db644e628f1728 + sourceBlobDigest: sha256:d04f5c207904c22d7cc67dddc5bb483095171bf2a4be21b4aea5a739ee8aaef9 codeSamplesNamespace: avacloud-sdk-ts-code-samples - codeSamplesRevisionDigest: sha256:8553e88f180ae3ff9243d7785ab1143cd2038036fb0383a813d92f0af10a894f - outLocation: /github/workspace/repo + codeSamplesRevisionDigest: sha256:7dcae5192b70212f2a8e862e46697a9659f75e0bfdec2469d321409fd927d1fd avalanche-sdk: source: AvalancheSDK-OAS sourceNamespace: avalanche-sdk-oas sourceRevisionDigest: sha256:5a1e07e4561e10de09495e4808d129b671b42547b2864d1828b477aadfcb21ae sourceBlobDigest: sha256:44a68090a51ca1b1edbef83da5907c3497ef7de6605f3e5d00d9f2a89976ec99 - outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 4d0f930..f182a39 100644 --- a/README.md +++ b/README.md @@ -58,16 +58,16 @@ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md). import { AvaCloudSDK } from "@avalabs/avacloud-sdk"; const avaCloudSDK = new AvaCloudSDK({ - apiKey: "", - chainId: "43114", - network: "mainnet", + apiKey: "", + chainId: "43114", + network: "mainnet", }); async function run() { - const result = await avaCloudSDK.metrics.healthCheck.metricsHealthCheck(); + const result = await avaCloudSDK.metrics.healthCheck.metricsHealthCheck(); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -78,48 +78,69 @@ run(); ## Available Resources and Operations -### [metrics.healthCheck](docs/sdks/healthcheck/README.md) +
+Available methods -* [metricsHealthCheck](docs/sdks/healthcheck/README.md#metricshealthcheck) - Get the health of the service +### [data](docs/sdks/data/README.md) -### [metrics.evm.chains](docs/sdks/chains/README.md) -* [listChains](docs/sdks/chains/README.md#listchains) - Get a list of supported blockchains -* [getChain](docs/sdks/chains/README.md#getchain) - Get chain information for supported blockchain +#### [data.evm](docs/sdks/avacloudsdkevm/README.md) -### [metrics.chain.metrics](docs/sdks/avacloudsdkmetrics/README.md) +#### [data.evm.balances](docs/sdks/avacloudsdkbalances/README.md) -* [getEvmChainMetrics](docs/sdks/avacloudsdkmetrics/README.md#getevmchainmetrics) - Get metrics for EVM chains -* [getEvmChainRollingWindowMetrics](docs/sdks/avacloudsdkmetrics/README.md#getevmchainrollingwindowmetrics) - Get rolling window metrics for EVM chains -* [getStakingMetrics](docs/sdks/avacloudsdkmetrics/README.md#getstakingmetrics) - Get staking metrics for a given subnet +* [getNativeBalance](docs/sdks/avacloudsdkbalances/README.md#getnativebalance) - Get native token balance +* [listErc20Balances](docs/sdks/avacloudsdkbalances/README.md#listerc20balances) - List ERC-20 balances +* [listErc721Balances](docs/sdks/avacloudsdkbalances/README.md#listerc721balances) - List ERC-721 balances +* [listErc1155Balances](docs/sdks/avacloudsdkbalances/README.md#listerc1155balances) - List ERC-1155 balances +* [listCollectibleBalances](docs/sdks/avacloudsdkbalances/README.md#listcollectiblebalances) - List collectible (ERC-721/ERC-1155) balances -### [metrics.lookingGlass](docs/sdks/lookingglass/README.md) +#### [data.evm.blocks](docs/sdks/avacloudsdkblocks/README.md) -* [getNftHoldersByContractAddress](docs/sdks/lookingglass/README.md#getnftholdersbycontractaddress) - Get NFT holders by contract address -* [getAddressesByBalanceOverTime](docs/sdks/lookingglass/README.md#getaddressesbybalanceovertime) - Get addresses by balance over time -* [getAddressesByBtcbBridged](docs/sdks/lookingglass/README.md#getaddressesbybtcbbridged) - Get addresses by BTCb bridged balance -* [getValidatorsByDateRange](docs/sdks/lookingglass/README.md#getvalidatorsbydaterange) - Get addresses running validators during a given time frame -* [compositeQuery](docs/sdks/lookingglass/README.md#compositequery) - Composite query +* [getLatestBlocks](docs/sdks/avacloudsdkblocks/README.md#getlatestblocks) - List latest blocks +* [getBlock](docs/sdks/avacloudsdkblocks/README.md#getblock) - Get block + +#### [data.evm.chains](docs/sdks/avacloudsdkchains/README.md) + +* [supportedChains](docs/sdks/avacloudsdkchains/README.md#supportedchains) - List chains +* [getChainInfo](docs/sdks/avacloudsdkchains/README.md#getchaininfo) - Get chain information + +#### [data.evm.contracts](docs/sdks/contracts/README.md) +* [getContractMetadata](docs/sdks/contracts/README.md#getcontractmetadata) - Get contract metadata + +#### [data.evm.transactions](docs/sdks/avacloudsdktransactions/README.md) + +* [getDeploymentTransaction](docs/sdks/avacloudsdktransactions/README.md#getdeploymenttransaction) - Get deployment transaction +* [listContractDeployments](docs/sdks/avacloudsdktransactions/README.md#listcontractdeployments) - List deployed contracts +* [listTransfers](docs/sdks/avacloudsdktransactions/README.md#listtransfers) - List ERC transfers +* [listTransactions](docs/sdks/avacloudsdktransactions/README.md#listtransactions) - List transactions +* [listNativeTransactions](docs/sdks/avacloudsdktransactions/README.md#listnativetransactions) - List native transactions +* [listErc20Transactions](docs/sdks/avacloudsdktransactions/README.md#listerc20transactions) - List ERC-20 transfers +* [listErc721Transactions](docs/sdks/avacloudsdktransactions/README.md#listerc721transactions) - List ERC-721 transfers +* [listErc1155Transactions](docs/sdks/avacloudsdktransactions/README.md#listerc1155transactions) - List ERC-1155 transfers +* [listInternalTransactions](docs/sdks/avacloudsdktransactions/README.md#listinternaltransactions) - List internal transactions +* [getTransaction](docs/sdks/avacloudsdktransactions/README.md#gettransaction) - Get transaction +* [getTransactionsForBlock](docs/sdks/avacloudsdktransactions/README.md#gettransactionsforblock) - List transactions for a block +* [listLatestTransactions](docs/sdks/avacloudsdktransactions/README.md#listlatesttransactions) - List latest transactions -### [data.healthCheck](docs/sdks/avacloudsdkhealthcheck/README.md) +#### [data.healthCheck](docs/sdks/avacloudsdkhealthcheck/README.md) * [dataHealthCheck](docs/sdks/avacloudsdkhealthcheck/README.md#datahealthcheck) - Get the health of the service -### [data.nfts](docs/sdks/nfts/README.md) +#### [data.nfts](docs/sdks/nfts/README.md) * [reindexNft](docs/sdks/nfts/README.md#reindexnft) - Reindex NFT metadata * [listTokens](docs/sdks/nfts/README.md#listtokens) - List tokens * [getTokenDetails](docs/sdks/nfts/README.md#gettokendetails) - Get token details -### [data.operations](docs/sdks/operations/README.md) +#### [data.operations](docs/sdks/operations/README.md) * [getOperationResult](docs/sdks/operations/README.md#getoperationresult) - Get operation * [postTransactionExportJob](docs/sdks/operations/README.md#posttransactionexportjob) - Create transaction export operation -### [data.primaryNetwork](docs/sdks/primarynetwork/README.md) +#### [data.primaryNetwork](docs/sdks/primarynetwork/README.md) * [getAssetDetails](docs/sdks/primarynetwork/README.md#getassetdetails) - Get asset details * [getChainIdsForAddresses](docs/sdks/primarynetwork/README.md#getchainidsforaddresses) - Get chain interactions for addresses @@ -131,44 +152,50 @@ run(); * [getSingleValidatorDetails](docs/sdks/primarynetwork/README.md#getsinglevalidatordetails) - Get single validator details * [listDelegators](docs/sdks/primarynetwork/README.md#listdelegators) - List delegators -### [data.primaryNetwork.transactions](docs/sdks/transactions/README.md) +#### [data.primaryNetwork.balances](docs/sdks/balances/README.md) -* [getTxByHash](docs/sdks/transactions/README.md#gettxbyhash) - Get transaction -* [listLatestPrimaryNetworkTransactions](docs/sdks/transactions/README.md#listlatestprimarynetworktransactions) - List latest transactions -* [listActivePrimaryNetworkStakingTransactions](docs/sdks/transactions/README.md#listactiveprimarynetworkstakingtransactions) - List staking transactions -* [listAssetTransactions](docs/sdks/transactions/README.md#listassettransactions) - List asset transactions +* [getBalancesByAddresses](docs/sdks/balances/README.md#getbalancesbyaddresses) - Get balances -### [data.primaryNetwork.rewards](docs/sdks/rewards/README.md) +#### [data.primaryNetwork.blocks](docs/sdks/blocks/README.md) -* [listPendingPrimaryNetworkRewards](docs/sdks/rewards/README.md#listpendingprimarynetworkrewards) - List pending rewards -* [listHistoricalPrimaryNetworkRewards](docs/sdks/rewards/README.md#listhistoricalprimarynetworkrewards) - List historical rewards +* [getBlockById](docs/sdks/blocks/README.md#getblockbyid) - Get block +* [listPrimaryNetworkBlocksByNodeId](docs/sdks/blocks/README.md#listprimarynetworkblocksbynodeid) - List blocks proposed by node +* [listLatestPrimaryNetworkBlocks](docs/sdks/blocks/README.md#listlatestprimarynetworkblocks) - List latest blocks -### [data.primaryNetwork.utxos](docs/sdks/utxos/README.md) +#### [data.primaryNetwork.rewards](docs/sdks/rewards/README.md) -* [getUtxosByAddresses](docs/sdks/utxos/README.md#getutxosbyaddresses) - List UTXOs +* [listPendingPrimaryNetworkRewards](docs/sdks/rewards/README.md#listpendingprimarynetworkrewards) - List pending rewards +* [listHistoricalPrimaryNetworkRewards](docs/sdks/rewards/README.md#listhistoricalprimarynetworkrewards) - List historical rewards -### [data.primaryNetwork.balances](docs/sdks/balances/README.md) +#### [data.primaryNetwork.transactions](docs/sdks/transactions/README.md) -* [getBalancesByAddresses](docs/sdks/balances/README.md#getbalancesbyaddresses) - Get balances +* [getTxByHash](docs/sdks/transactions/README.md#gettxbyhash) - Get transaction +* [listLatestPrimaryNetworkTransactions](docs/sdks/transactions/README.md#listlatestprimarynetworktransactions) - List latest transactions +* [listActivePrimaryNetworkStakingTransactions](docs/sdks/transactions/README.md#listactiveprimarynetworkstakingtransactions) - List staking transactions +* [listAssetTransactions](docs/sdks/transactions/README.md#listassettransactions) - List asset transactions -### [data.primaryNetwork.blocks](docs/sdks/blocks/README.md) +#### [data.primaryNetwork.utxos](docs/sdks/utxos/README.md) -* [getBlockById](docs/sdks/blocks/README.md#getblockbyid) - Get block -* [listPrimaryNetworkBlocksByNodeId](docs/sdks/blocks/README.md#listprimarynetworkblocksbynodeid) - List blocks proposed by node -* [listLatestPrimaryNetworkBlocks](docs/sdks/blocks/README.md#listlatestprimarynetworkblocks) - List latest blocks +* [getUtxosByAddresses](docs/sdks/utxos/README.md#getutxosbyaddresses) - List UTXOs -### [data.primaryNetwork.vertices](docs/sdks/vertices/README.md) +#### [data.primaryNetwork.vertices](docs/sdks/vertices/README.md) * [listLatestXChainVertices](docs/sdks/vertices/README.md#listlatestxchainvertices) - List vertices * [getVertexByHash](docs/sdks/vertices/README.md#getvertexbyhash) - Get vertex * [getVertexByHeight](docs/sdks/vertices/README.md#getvertexbyheight) - List vertices by height -### [data.usageMetrics](docs/sdks/usagemetrics/README.md) +#### [data.teleporter](docs/sdks/teleporter/README.md) + +* [getTeleporterMessage](docs/sdks/teleporter/README.md#getteleportermessage) - Get a teleporter message +* [listTeleporterMessages](docs/sdks/teleporter/README.md#listteleportermessages) - List teleporter messages +* [listTeleporterMessagesByAddress](docs/sdks/teleporter/README.md#listteleportermessagesbyaddress) - List teleporter messages by address + +#### [data.usageMetrics](docs/sdks/usagemetrics/README.md) * [getApiUsageMetrics](docs/sdks/usagemetrics/README.md#getapiusagemetrics) - Get usage metrics for the Glacier API * [getApiLogs](docs/sdks/usagemetrics/README.md#getapilogs) - Get logs for requests made by client -### [data.webhooks](docs/sdks/webhooks/README.md) +#### [data.webhooks](docs/sdks/webhooks/README.md) * [listWebhooks](docs/sdks/webhooks/README.md#listwebhooks) - List webhooks * [createWebhook](docs/sdks/webhooks/README.md#createwebhook) - Create a webhook @@ -181,48 +208,40 @@ run(); * [removeAddressesFromWebhook](docs/sdks/webhooks/README.md#removeaddressesfromwebhook) - Remove addresses from webhook * [addAddressesToWebhook](docs/sdks/webhooks/README.md#addaddressestowebhook) - Add addresses to webhook -### [data.teleporter](docs/sdks/teleporter/README.md) +### [metrics](docs/sdks/metrics/README.md) -* [getTeleporterMessage](docs/sdks/teleporter/README.md#getteleportermessage) - Get a teleporter message -* [listTeleporterMessages](docs/sdks/teleporter/README.md#listteleportermessages) - List teleporter messages +#### [metrics.chain](docs/sdks/chain/README.md) -### [data.evm.balances](docs/sdks/avacloudsdkbalances/README.md) -* [getNativeBalance](docs/sdks/avacloudsdkbalances/README.md#getnativebalance) - Get native token balance -* [listErc20Balances](docs/sdks/avacloudsdkbalances/README.md#listerc20balances) - List ERC-20 balances -* [listErc721Balances](docs/sdks/avacloudsdkbalances/README.md#listerc721balances) - List ERC-721 balances -* [listErc1155Balances](docs/sdks/avacloudsdkbalances/README.md#listerc1155balances) - List ERC-1155 balances -* [listCollectibleBalances](docs/sdks/avacloudsdkbalances/README.md#listcollectiblebalances) - List collectible (ERC-721/ERC-1155) balances +#### [metrics.chain.metrics](docs/sdks/avacloudsdkmetrics/README.md) -### [data.evm.blocks](docs/sdks/avacloudsdkblocks/README.md) +* [getEvmChainMetrics](docs/sdks/avacloudsdkmetrics/README.md#getevmchainmetrics) - Get metrics for EVM chains +* [getTeleporterMetricsByChain](docs/sdks/avacloudsdkmetrics/README.md#getteleportermetricsbychain) - Get teleporter metrics for EVM chains +* [getEvmChainRollingWindowMetrics](docs/sdks/avacloudsdkmetrics/README.md#getevmchainrollingwindowmetrics) - Get rolling window metrics for EVM chains +* [getStakingMetrics](docs/sdks/avacloudsdkmetrics/README.md#getstakingmetrics) - Get staking metrics for a given subnet -* [getLatestBlocks](docs/sdks/avacloudsdkblocks/README.md#getlatestblocks) - List latest blocks -* [getBlock](docs/sdks/avacloudsdkblocks/README.md#getblock) - Get block +#### [metrics.evm](docs/sdks/evm/README.md) -### [data.evm.transactions](docs/sdks/avacloudsdktransactions/README.md) -* [getDeploymentTransaction](docs/sdks/avacloudsdktransactions/README.md#getdeploymenttransaction) - Get deployment transaction -* [listContractDeployments](docs/sdks/avacloudsdktransactions/README.md#listcontractdeployments) - List deployed contracts -* [listTransfers](docs/sdks/avacloudsdktransactions/README.md#listtransfers) - List ERC transfers -* [listTransactions](docs/sdks/avacloudsdktransactions/README.md#listtransactions) - List transactions -* [listNativeTransactions](docs/sdks/avacloudsdktransactions/README.md#listnativetransactions) - List native transactions -* [listErc20Transactions](docs/sdks/avacloudsdktransactions/README.md#listerc20transactions) - List ERC-20 transfers -* [listErc721Transactions](docs/sdks/avacloudsdktransactions/README.md#listerc721transactions) - List ERC-721 transfers -* [listErc1155Transactions](docs/sdks/avacloudsdktransactions/README.md#listerc1155transactions) - List ERC-1155 transfers -* [listInternalTransactions](docs/sdks/avacloudsdktransactions/README.md#listinternaltransactions) - List internal transactions -* [getTransaction](docs/sdks/avacloudsdktransactions/README.md#gettransaction) - Get transaction -* [getTransactionsForBlock](docs/sdks/avacloudsdktransactions/README.md#gettransactionsforblock) - List transactions for a block -* [listLatestTransactions](docs/sdks/avacloudsdktransactions/README.md#listlatesttransactions) - List latest transactions +#### [metrics.evm.chains](docs/sdks/chains/README.md) -### [data.evm.contracts](docs/sdks/contracts/README.md) +* [listChains](docs/sdks/chains/README.md#listchains) - Get a list of supported blockchains +* [getChain](docs/sdks/chains/README.md#getchain) - Get chain information for supported blockchain -* [getContractMetadata](docs/sdks/contracts/README.md#getcontractmetadata) - Get contract metadata +#### [metrics.healthCheck](docs/sdks/healthcheck/README.md) -### [data.evm.chains](docs/sdks/avacloudsdkchains/README.md) +* [metricsHealthCheck](docs/sdks/healthcheck/README.md#metricshealthcheck) - Get the health of the service -* [supportedChains](docs/sdks/avacloudsdkchains/README.md#supportedchains) - List chains -* [getChainInfo](docs/sdks/avacloudsdkchains/README.md#getchaininfo) - Get chain information +#### [metrics.lookingGlass](docs/sdks/lookingglass/README.md) + +* [getNftHoldersByContractAddress](docs/sdks/lookingglass/README.md#getnftholdersbycontractaddress) - Get NFT holders by contract address +* [getAddressesByBalanceOverTime](docs/sdks/lookingglass/README.md#getaddressesbybalanceovertime) - Get addresses by balance over time +* [getAddressesByBtcbBridged](docs/sdks/lookingglass/README.md#getaddressesbybtcbbridged) - Get addresses by BTCb bridged balance +* [getValidatorsByDateRange](docs/sdks/lookingglass/README.md#getvalidatorsbydaterange) - Get addresses running validators during a given time frame +* [compositeQuery](docs/sdks/lookingglass/README.md#compositequery) - Composite query + +
@@ -292,6 +311,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [dataPrimaryNetworkVerticesGetVertexByHeight](docs/sdks/vertices/README.md#getvertexbyheight) - [dataPrimaryNetworkVerticesListLatestXChainVertices](docs/sdks/vertices/README.md#listlatestxchainvertices) - [dataTeleporterGetTeleporterMessage](docs/sdks/teleporter/README.md#getteleportermessage) +- [dataTeleporterListTeleporterMessagesByAddress](docs/sdks/teleporter/README.md#listteleportermessagesbyaddress) - [dataTeleporterListTeleporterMessages](docs/sdks/teleporter/README.md#listteleportermessages) - [dataUsageMetricsGetApiLogs](docs/sdks/usagemetrics/README.md#getapilogs) - [dataUsageMetricsGetApiUsageMetrics](docs/sdks/usagemetrics/README.md#getapiusagemetrics) @@ -308,6 +328,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [metricsChainMetricsGetEvmChainMetrics](docs/sdks/avacloudsdkmetrics/README.md#getevmchainmetrics) - [metricsChainMetricsGetEvmChainRollingWindowMetrics](docs/sdks/avacloudsdkmetrics/README.md#getevmchainrollingwindowmetrics) - [metricsChainMetricsGetStakingMetrics](docs/sdks/avacloudsdkmetrics/README.md#getstakingmetrics) +- [metricsChainMetricsGetTeleporterMetricsByChain](docs/sdks/avacloudsdkmetrics/README.md#getteleportermetricsbychain) - [metricsEvmChainsGetChain](docs/sdks/chains/README.md#getchain) - [metricsEvmChainsListChains](docs/sdks/chains/README.md#listchains) - [metricsHealthCheckMetricsHealthCheck](docs/sdks/healthcheck/README.md#metricshealthcheck) @@ -345,20 +366,20 @@ The following global parameters are available. import { AvaCloudSDK } from "@avalabs/avacloud-sdk"; const avaCloudSDK = new AvaCloudSDK({ - apiKey: "", - chainId: "43114", - network: "mainnet", + apiKey: "", + chainId: "43114", + network: "mainnet", }); async function run() { - const result = await avaCloudSDK.metrics.evm.chains.listChains({ - network: "mainnet", - }); + const result = await avaCloudSDK.metrics.evm.chains.listChains({ + network: "mainnet", + }); - for await (const page of result) { - // Handle the page - console.log(page); - } + for await (const page of result) { + // Handle the page + console.log(page); + } } run(); @@ -382,20 +403,20 @@ Here's an example of one such pagination call: import { AvaCloudSDK } from "@avalabs/avacloud-sdk"; const avaCloudSDK = new AvaCloudSDK({ - apiKey: "", - chainId: "43114", - network: "mainnet", + apiKey: "", + chainId: "43114", + network: "mainnet", }); async function run() { - const result = await avaCloudSDK.metrics.evm.chains.listChains({ - network: "mainnet", - }); + const result = await avaCloudSDK.metrics.evm.chains.listChains({ + network: "mainnet", + }); - for await (const page of result) { - // Handle the page - console.log(page); - } + for await (const page of result) { + // Handle the page + console.log(page); + } } run(); @@ -413,27 +434,27 @@ To change the default retry strategy for a single API call, simply provide a ret import { AvaCloudSDK } from "@avalabs/avacloud-sdk"; const avaCloudSDK = new AvaCloudSDK({ - apiKey: "", - chainId: "43114", - network: "mainnet", + apiKey: "", + chainId: "43114", + network: "mainnet", }); async function run() { - const result = await avaCloudSDK.metrics.healthCheck.metricsHealthCheck({ - retries: { - strategy: "backoff", - backoff: { - initialInterval: 1, - maxInterval: 50, - exponent: 1.1, - maxElapsedTime: 100, - }, - retryConnectionErrors: false, - }, - }); + const result = await avaCloudSDK.metrics.healthCheck.metricsHealthCheck({ + retries: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, + }, + retryConnectionErrors: false, + }, + }); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -445,26 +466,26 @@ If you'd like to override the default retry strategy for all operations that sup import { AvaCloudSDK } from "@avalabs/avacloud-sdk"; const avaCloudSDK = new AvaCloudSDK({ - retryConfig: { - strategy: "backoff", - backoff: { - initialInterval: 1, - maxInterval: 50, - exponent: 1.1, - maxElapsedTime: 100, - }, - retryConnectionErrors: false, + retryConfig: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, }, - apiKey: "", - chainId: "43114", - network: "mainnet", + retryConnectionErrors: false, + }, + apiKey: "", + chainId: "43114", + network: "mainnet", }); async function run() { - const result = await avaCloudSDK.metrics.healthCheck.metricsHealthCheck(); + const result = await avaCloudSDK.metrics.healthCheck.metricsHealthCheck(); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -495,83 +516,83 @@ Validation errors can also occur when either method arguments or data returned f ```typescript import { AvaCloudSDK } from "@avalabs/avacloud-sdk"; import { - BadGateway, - BadRequest, - Forbidden, - InternalServerError, - NotFound, - SDKValidationError, - ServiceUnavailable, - TooManyRequests, - Unauthorized, + BadGateway, + BadRequest, + Forbidden, + InternalServerError, + NotFound, + SDKValidationError, + ServiceUnavailable, + TooManyRequests, + Unauthorized, } from "@avalabs/avacloud-sdk/models/errors"; const avaCloudSDK = new AvaCloudSDK({ - apiKey: "", - chainId: "43114", - network: "mainnet", + apiKey: "", + chainId: "43114", + network: "mainnet", }); async function run() { - try { - await avaCloudSDK.data.nfts.reindexNft({ - address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", - tokenId: "145", - }); - } catch (err) { - switch (true) { - case err instanceof SDKValidationError: { - // Validation errors can be pretty-printed - console.error(err.pretty()); - // Raw value may also be inspected - console.error(err.rawValue); - return; - } - case err instanceof BadRequest: { - // Handle err.data$: BadRequestData - console.error(err); - return; - } - case err instanceof Unauthorized: { - // Handle err.data$: UnauthorizedData - console.error(err); - return; - } - case err instanceof Forbidden: { - // Handle err.data$: ForbiddenData - console.error(err); - return; - } - case err instanceof NotFound: { - // Handle err.data$: NotFoundData - console.error(err); - return; - } - case err instanceof TooManyRequests: { - // Handle err.data$: TooManyRequestsData - console.error(err); - return; - } - case err instanceof InternalServerError: { - // Handle err.data$: InternalServerErrorData - console.error(err); - return; - } - case err instanceof BadGateway: { - // Handle err.data$: BadGatewayData - console.error(err); - return; - } - case err instanceof ServiceUnavailable: { - // Handle err.data$: ServiceUnavailableData - console.error(err); - return; - } - default: { - throw err; - } - } + try { + await avaCloudSDK.data.nfts.reindexNft({ + address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + tokenId: "145", + }); + } catch (err) { + switch (true) { + case (err instanceof SDKValidationError): { + // Validation errors can be pretty-printed + console.error(err.pretty()); + // Raw value may also be inspected + console.error(err.rawValue); + return; + } + case (err instanceof BadRequest): { + // Handle err.data$: BadRequestData + console.error(err); + return; + } + case (err instanceof Unauthorized): { + // Handle err.data$: UnauthorizedData + console.error(err); + return; + } + case (err instanceof Forbidden): { + // Handle err.data$: ForbiddenData + console.error(err); + return; + } + case (err instanceof NotFound): { + // Handle err.data$: NotFoundData + console.error(err); + return; + } + case (err instanceof TooManyRequests): { + // Handle err.data$: TooManyRequestsData + console.error(err); + return; + } + case (err instanceof InternalServerError): { + // Handle err.data$: InternalServerErrorData + console.error(err); + return; + } + case (err instanceof BadGateway): { + // Handle err.data$: BadGatewayData + console.error(err); + return; + } + case (err instanceof ServiceUnavailable): { + // Handle err.data$: ServiceUnavailableData + console.error(err); + return; + } + default: { + throw err; + } } + } } run(); @@ -590,17 +611,17 @@ The default server can be overridden globally by passing a URL to the `serverURL import { AvaCloudSDK } from "@avalabs/avacloud-sdk"; const avaCloudSDK = new AvaCloudSDK({ - serverURL: "", - apiKey: "", - chainId: "43114", - network: "mainnet", + serverURL: "", + apiKey: "", + chainId: "43114", + network: "mainnet", }); async function run() { - const result = await avaCloudSDK.metrics.healthCheck.metricsHealthCheck(); + const result = await avaCloudSDK.metrics.healthCheck.metricsHealthCheck(); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -614,18 +635,18 @@ The server URL can also be overridden on a per-operation basis, provided a serve import { AvaCloudSDK } from "@avalabs/avacloud-sdk"; const avaCloudSDK = new AvaCloudSDK({ - apiKey: "", - chainId: "43114", - network: "mainnet", + apiKey: "", + chainId: "43114", + network: "mainnet", }); async function run() { - const result = await avaCloudSDK.metrics.healthCheck.metricsHealthCheck({ - serverURL: "https://popsicle-api.avax.network", - }); + const result = await avaCloudSDK.metrics.healthCheck.metricsHealthCheck({ + serverURL: "https://metrics.avax.network", + }); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -698,16 +719,16 @@ To authenticate with the API the `apiKey` parameter must be set when initializin import { AvaCloudSDK } from "@avalabs/avacloud-sdk"; const avaCloudSDK = new AvaCloudSDK({ - apiKey: "", - chainId: "43114", - network: "mainnet", + apiKey: "", + chainId: "43114", + network: "mainnet", }); async function run() { - const result = await avaCloudSDK.metrics.healthCheck.metricsHealthCheck(); + const result = await avaCloudSDK.metrics.healthCheck.metricsHealthCheck(); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); diff --git a/RELEASES.md b/RELEASES.md index 179388a..a400c12 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -49,4 +49,14 @@ Based on: ### Generated - [typescript v0.4.1] . ### Releases -- [NPM v0.4.1] https://www.npmjs.com/package/@avalabs/avacloud-sdk/v/0.4.1 - . \ No newline at end of file +- [NPM v0.4.1] https://www.npmjs.com/package/@avalabs/avacloud-sdk/v/0.4.1 - . + +## 2024-09-18 10:06:08 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.399.0 (2.415.8) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.5.0] . +### Releases +- [NPM v0.5.0] https://www.npmjs.com/package/@avalabs/avacloud-sdk/v/0.5.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index a5f663f..d7d5273 100644 --- a/USAGE.md +++ b/USAGE.md @@ -3,16 +3,16 @@ import { AvaCloudSDK } from "@avalabs/avacloud-sdk"; const avaCloudSDK = new AvaCloudSDK({ - apiKey: "", - chainId: "43114", - network: "mainnet", + apiKey: "", + chainId: "43114", + network: "mainnet", }); async function run() { - const result = await avaCloudSDK.metrics.healthCheck.metricsHealthCheck(); + const result = await avaCloudSDK.metrics.healthCheck.metricsHealthCheck(); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); diff --git a/docs/models/components/activedelegatordetails.md b/docs/models/components/activedelegatordetails.md index 73ccad6..b045c3e 100644 --- a/docs/models/components/activedelegatordetails.md +++ b/docs/models/components/activedelegatordetails.md @@ -6,16 +6,18 @@ import { ActiveDelegatorDetails } from "@avalabs/avacloud-sdk/models/components"; let value: ActiveDelegatorDetails = { - txHash: "", - nodeId: "", - rewardAddresses: [""], - amountDelegated: "", - delegationFee: "", - startTimestamp: 1381.83, - endTimestamp: 7783.46, - estimatedGrossReward: "", - estimatedNetReward: "", - delegationStatus: "active", + txHash: "", + nodeId: "", + rewardAddresses: [ + "", + ], + amountDelegated: "", + delegationFee: "", + startTimestamp: 3380.07, + endTimestamp: 1103.75, + estimatedGrossReward: "", + estimatedNetReward: "", + delegationStatus: "active", }; ``` diff --git a/docs/models/components/activevalidatordetails.md b/docs/models/components/activevalidatordetails.md index 8d3a00f..4e56a65 100644 --- a/docs/models/components/activevalidatordetails.md +++ b/docs/models/components/activevalidatordetails.md @@ -6,26 +6,26 @@ import { ActiveValidatorDetails } from "@avalabs/avacloud-sdk/models/components"; let value: ActiveValidatorDetails = { - txHash: "", - nodeId: "", - subnetId: "", - amountStaked: "", - startTimestamp: 3250.47, - endTimestamp: 5701.97, - stakePercentage: 384.25, - delegatorCount: 4386.01, - uptimePerformance: 6342.74, - potentialRewards: { - validationRewardAmount: "", - delegationRewardAmount: "", - }, - validationStatus: "active", - validatorHealth: { - reachabilityPercent: 9883.74, - benchedPChainRequestsPercent: 9589.5, - benchedXChainRequestsPercent: 1020.44, - benchedCChainRequestsPercent: 6527.9, - }, + txHash: "", + nodeId: "", + subnetId: "", + amountStaked: "", + startTimestamp: 1289.26, + endTimestamp: 7506.86, + stakePercentage: 3154.28, + delegatorCount: 6078.31, + uptimePerformance: 3637.11, + potentialRewards: { + validationRewardAmount: "", + delegationRewardAmount: "", + }, + validationStatus: "active", + validatorHealth: { + reachabilityPercent: 3250.47, + benchedPChainRequestsPercent: 5701.97, + benchedXChainRequestsPercent: 384.25, + benchedCChainRequestsPercent: 4386.01, + }, }; ``` diff --git a/docs/models/components/addressactivitymetadata.md b/docs/models/components/addressactivitymetadata.md index 54640e5..a5ce597 100644 --- a/docs/models/components/addressactivitymetadata.md +++ b/docs/models/components/addressactivitymetadata.md @@ -6,8 +6,12 @@ import { AddressActivityMetadata } from "@avalabs/avacloud-sdk/models/components"; let value: AddressActivityMetadata = { - addresses: ["0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"], - eventSignatures: ["0x61cbb2a3dee0b6064c2e681aadd61677fb4ef319f0b547508d495626f5a62f64"], + addresses: [ + "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + ], + eventSignatures: [ + "0x61cbb2a3dee0b6064c2e681aadd61677fb4ef319f0b547508d495626f5a62f64", + ], }; ``` diff --git a/docs/models/components/addressdetails.md b/docs/models/components/addressdetails.md index ff2b2ef..6a129c0 100644 --- a/docs/models/components/addressdetails.md +++ b/docs/models/components/addressdetails.md @@ -6,8 +6,8 @@ import { AddressDetails } from "@avalabs/avacloud-sdk/models/components"; let value: AddressDetails = { - address: "0x1234567890abcdef1234567890abcdef123456789", - sortKey: "123", + address: "0x1234567890abcdef1234567890abcdef123456789", + sortKey: "123", }; ``` diff --git a/docs/models/components/addresseschangerequest.md b/docs/models/components/addresseschangerequest.md index c376841..1f28062 100644 --- a/docs/models/components/addresseschangerequest.md +++ b/docs/models/components/addresseschangerequest.md @@ -6,7 +6,9 @@ import { AddressesChangeRequest } from "@avalabs/avacloud-sdk/models/components"; let value: AddressesChangeRequest = { - addresses: ["0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"], + addresses: [ + "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + ], }; ``` diff --git a/docs/models/components/aggregatedassetamount.md b/docs/models/components/aggregatedassetamount.md index 728120a..e4c038f 100644 --- a/docs/models/components/aggregatedassetamount.md +++ b/docs/models/components/aggregatedassetamount.md @@ -6,13 +6,13 @@ import { AggregatedAssetAmount } from "@avalabs/avacloud-sdk/models/components"; let value: AggregatedAssetAmount = { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - utxoCount: 1, + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, }; ``` diff --git a/docs/models/components/alltimeerc20balancequerydto.md b/docs/models/components/alltimeerc20balancequerydto.md index a590af1..bdd1535 100644 --- a/docs/models/components/alltimeerc20balancequerydto.md +++ b/docs/models/components/alltimeerc20balancequerydto.md @@ -6,15 +6,15 @@ import { AllTimeErc20BalanceQueryDto } from "@avalabs/avacloud-sdk/models/components"; let value: AllTimeErc20BalanceQueryDto = { - id: "", - type: "AllTimeErc20Balance", - params: { - firstDate: "", - lastDate: "", - minBalance: "", - evmChainId: "", - contractAddress: "", - }, + id: "", + type: "AllTimeErc20Balance", + params: { + firstDate: "", + lastDate: "", + minBalance: "", + evmChainId: "", + contractAddress: "", + }, }; ``` diff --git a/docs/models/components/alltimenativebalancequerydto.md b/docs/models/components/alltimenativebalancequerydto.md index 4281716..2f77a5a 100644 --- a/docs/models/components/alltimenativebalancequerydto.md +++ b/docs/models/components/alltimenativebalancequerydto.md @@ -6,14 +6,14 @@ import { AllTimeNativeBalanceQueryDto } from "@avalabs/avacloud-sdk/models/components"; let value: AllTimeNativeBalanceQueryDto = { - id: "", - type: "AllTimeNativeBalance", - params: { - firstDate: "", - lastDate: "", - minBalance: "", - evmChainId: "", - }, + id: "", + type: "AllTimeNativeBalance", + params: { + firstDate: "", + lastDate: "", + minBalance: "", + evmChainId: "", + }, }; ``` diff --git a/docs/models/components/alltimenftholdersquerydto.md b/docs/models/components/alltimenftholdersquerydto.md index 13bbff9..ae4b76c 100644 --- a/docs/models/components/alltimenftholdersquerydto.md +++ b/docs/models/components/alltimenftholdersquerydto.md @@ -6,14 +6,14 @@ import { AllTimeNftHoldersQueryDto } from "@avalabs/avacloud-sdk/models/components"; let value: AllTimeNftHoldersQueryDto = { - id: "", - type: "AllTimeNftHolders", - params: { - firstDate: "", - lastDate: "", - evmChainId: "", - contractAddress: "", - }, + id: "", + type: "AllTimeNftHolders", + params: { + firstDate: "", + lastDate: "", + evmChainId: "", + contractAddress: "", + }, }; ``` diff --git a/docs/models/components/alltimestarsarenabalancequerydto.md b/docs/models/components/alltimestarsarenabalancequerydto.md index fb4382a..aec8cda 100644 --- a/docs/models/components/alltimestarsarenabalancequerydto.md +++ b/docs/models/components/alltimestarsarenabalancequerydto.md @@ -6,14 +6,14 @@ import { AllTimeStarsArenaBalanceQueryDto } from "@avalabs/avacloud-sdk/models/components"; let value: AllTimeStarsArenaBalanceQueryDto = { - id: "", - type: "AllTimeStarsArenaBalance", - params: { - firstDate: "", - lastDate: "", - minBalance: "", - subjectAddress: "", - }, + id: "", + type: "AllTimeStarsArenaBalance", + params: { + firstDate: "", + lastDate: "", + minBalance: "", + subjectAddress: "", + }, }; ``` diff --git a/docs/models/components/anytimeerc20balancequerydto.md b/docs/models/components/anytimeerc20balancequerydto.md index d96abcc..ebfcbe2 100644 --- a/docs/models/components/anytimeerc20balancequerydto.md +++ b/docs/models/components/anytimeerc20balancequerydto.md @@ -6,15 +6,15 @@ import { AnyTimeErc20BalanceQueryDto } from "@avalabs/avacloud-sdk/models/components"; let value: AnyTimeErc20BalanceQueryDto = { - id: "", - type: "AnyTimeErc20Balance", - params: { - firstDate: "", - lastDate: "", - minBalance: "", - evmChainId: "", - contractAddress: "", - }, + id: "", + type: "AnyTimeErc20Balance", + params: { + firstDate: "", + lastDate: "", + minBalance: "", + evmChainId: "", + contractAddress: "", + }, }; ``` diff --git a/docs/models/components/anytimenativebalancequerydto.md b/docs/models/components/anytimenativebalancequerydto.md index 2d35fc7..6e20fde 100644 --- a/docs/models/components/anytimenativebalancequerydto.md +++ b/docs/models/components/anytimenativebalancequerydto.md @@ -6,14 +6,14 @@ import { AnyTimeNativeBalanceQueryDto } from "@avalabs/avacloud-sdk/models/components"; let value: AnyTimeNativeBalanceQueryDto = { - id: "", - type: "AnyTimeNativeBalance", - params: { - firstDate: "", - lastDate: "", - minBalance: "", - evmChainId: "", - }, + id: "", + type: "AnyTimeNativeBalance", + params: { + firstDate: "", + lastDate: "", + minBalance: "", + evmChainId: "", + }, }; ``` diff --git a/docs/models/components/anytimenftholdersquerydto.md b/docs/models/components/anytimenftholdersquerydto.md index bc52279..2d82cef 100644 --- a/docs/models/components/anytimenftholdersquerydto.md +++ b/docs/models/components/anytimenftholdersquerydto.md @@ -6,14 +6,14 @@ import { AnyTimeNftHoldersQueryDto } from "@avalabs/avacloud-sdk/models/components"; let value: AnyTimeNftHoldersQueryDto = { - id: "", - type: "AnyTimeNftHolders", - params: { - firstDate: "", - lastDate: "", - evmChainId: "", - contractAddress: "", - }, + id: "", + type: "AnyTimeNftHolders", + params: { + evmChainId: "", + contractAddress: "", + startTs: 3373.96, + endTs: 871.29, + }, }; ``` diff --git a/docs/models/components/anytimenftholdersquerydtoparams.md b/docs/models/components/anytimenftholdersquerydtoparams.md index a99b403..cc36c8c 100644 --- a/docs/models/components/anytimenftholdersquerydtoparams.md +++ b/docs/models/components/anytimenftholdersquerydtoparams.md @@ -6,10 +6,10 @@ import { AnyTimeNftHoldersQueryDtoParams } from "@avalabs/avacloud-sdk/models/components"; let value: AnyTimeNftHoldersQueryDtoParams = { - evmChainId: "", - contractAddress: "", - startTs: 5680.45, - endTs: 3927.85, + evmChainId: "", + contractAddress: "", + startTs: 9255.97, + endTs: 8360.79, }; ``` diff --git a/docs/models/components/anytimestarsarenabalancequerydto.md b/docs/models/components/anytimestarsarenabalancequerydto.md index ff65b66..c9515c2 100644 --- a/docs/models/components/anytimestarsarenabalancequerydto.md +++ b/docs/models/components/anytimestarsarenabalancequerydto.md @@ -6,14 +6,14 @@ import { AnyTimeStarsArenaBalanceQueryDto } from "@avalabs/avacloud-sdk/models/components"; let value: AnyTimeStarsArenaBalanceQueryDto = { - id: "", - type: "AnyTimeStarsArenaBalance", - params: { - firstDate: "", - lastDate: "", - minBalance: "", - subjectAddress: "", - }, + id: "", + type: "AnyTimeStarsArenaBalance", + params: { + firstDate: "", + lastDate: "", + minBalance: "", + subjectAddress: "", + }, }; ``` diff --git a/docs/models/components/assetamount.md b/docs/models/components/assetamount.md index 83dac50..fff772f 100644 --- a/docs/models/components/assetamount.md +++ b/docs/models/components/assetamount.md @@ -6,12 +6,12 @@ import { AssetAmount } from "@avalabs/avacloud-sdk/models/components"; let value: AssetAmount = { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", }; ``` diff --git a/docs/models/components/assetwithpriceinfo.md b/docs/models/components/assetwithpriceinfo.md index 67c5b02..71b24b3 100644 --- a/docs/models/components/assetwithpriceinfo.md +++ b/docs/models/components/assetwithpriceinfo.md @@ -6,16 +6,16 @@ import { AssetWithPriceInfo } from "@avalabs/avacloud-sdk/models/components"; let value: AssetWithPriceInfo = { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - historicalPrice: { - currencyCode: "usd", - value: 42.42, - }, + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + historicalPrice: { + currencyCode: "usd", + value: 42.42, + }, }; ``` diff --git a/docs/models/components/blockchain.md b/docs/models/components/blockchain.md index 9881f4e..2e6a92c 100644 --- a/docs/models/components/blockchain.md +++ b/docs/models/components/blockchain.md @@ -6,12 +6,12 @@ import { Blockchain } from "@avalabs/avacloud-sdk/models/components"; let value: Blockchain = { - createBlockTimestamp: 4499.5, - createBlockNumber: "", - blockchainId: "", - vmId: "", - subnetId: "", - blockchainName: "", + createBlockTimestamp: 3595.08, + createBlockNumber: "", + blockchainId: "", + vmId: "", + subnetId: "", + blockchainName: "", }; ``` diff --git a/docs/models/components/blockchainids.md b/docs/models/components/blockchainids.md index bed9b87..3a07a4e 100644 --- a/docs/models/components/blockchainids.md +++ b/docs/models/components/blockchainids.md @@ -5,7 +5,7 @@ ```typescript import { BlockchainIds } from "@avalabs/avacloud-sdk/models/components"; -let value: BlockchainIds = "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5"; +let value: BlockchainIds = "11111111111111111111111111111111LpoYY"; ``` ## Values diff --git a/docs/models/components/blockchaininfo.md b/docs/models/components/blockchaininfo.md index 2cf7122..066b109 100644 --- a/docs/models/components/blockchaininfo.md +++ b/docs/models/components/blockchaininfo.md @@ -6,7 +6,7 @@ import { BlockchainInfo } from "@avalabs/avacloud-sdk/models/components"; let value: BlockchainInfo = { - blockchainId: "", + blockchainId: "", }; ``` diff --git a/docs/models/components/blscredentials.md b/docs/models/components/blscredentials.md index cbe814b..d4a50e2 100644 --- a/docs/models/components/blscredentials.md +++ b/docs/models/components/blscredentials.md @@ -6,8 +6,8 @@ import { BlsCredentials } from "@avalabs/avacloud-sdk/models/components"; let value: BlsCredentials = { - publicKey: "", - proofOfPossession: "", + publicKey: "", + proofOfPossession: "", }; ``` diff --git a/docs/models/components/cchainatomicbalances.md b/docs/models/components/cchainatomicbalances.md index 833256b..164cb35 100644 --- a/docs/models/components/cchainatomicbalances.md +++ b/docs/models/components/cchainatomicbalances.md @@ -6,30 +6,30 @@ import { CChainAtomicBalances } from "@avalabs/avacloud-sdk/models/components"; let value: CChainAtomicBalances = { - atomicMemoryUnlocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - utxoCount: 1, - sharedWithChainId: "", - }, - ], - atomicMemoryLocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - sharedWithChainId: "", - }, - ], + atomicMemoryUnlocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + sharedWithChainId: "", + }, + ], + atomicMemoryLocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + sharedWithChainId: "", + }, + ], }; ``` diff --git a/docs/models/components/cchainexporttransaction.md b/docs/models/components/cchainexporttransaction.md index dd9d559..502c8e6 100644 --- a/docs/models/components/cchainexporttransaction.md +++ b/docs/models/components/cchainexporttransaction.md @@ -6,85 +6,88 @@ import { CChainExportTransaction } from "@avalabs/avacloud-sdk/models/components"; let value: CChainExportTransaction = { - txHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", - blockHeight: 1005, - blockHash: "0x57a5cb7704561d1d59bd563b6421021b7563960c05ba3ae0e36fc36917c742ee", - timestamp: 1600762738, - memo: "0x546865204176616c616e6368652050726f6a656374", - amountUnlocked: [ + txHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + blockHeight: 1005, + blockHash: + "0x57a5cb7704561d1d59bd563b6421021b7563960c05ba3ae0e36fc36917c742ee", + timestamp: 1600762738, + memo: "0x546865204176616c616e6368652050726f6a656374", + amountUnlocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + ], + amountCreated: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + ], + sourceChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + destinationChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + txType: "ExportTx", + evmInputs: [ + { + fromAddress: "0xD0f2898e49d941D6d479B381d3C8F0bd8d983b4c", + asset: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + }, + credentials: [ { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", + signature: + "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", + publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", }, - ], - amountCreated: [ + ], + }, + ], + emittedUtxos: [ + { + 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: [ { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", + signature: + "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", + publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", }, - ], - sourceChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - destinationChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - txType: "ExportTx", - evmInputs: [ - { - fromAddress: "0xD0f2898e49d941D6d479B381d3C8F0bd8d983b4c", - asset: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - }, - credentials: [ - { - signature: - "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", - publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", - }, - ], - }, - ], - emittedUtxos: [ - { - 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", - }, - ], + ], + locktime: 0, + outputIndex: "38", + threshold: 1, + timestamp: 1599696000, + utxoType: "mint", + }, + ], }; ``` diff --git a/docs/models/components/cchainimporttransaction.md b/docs/models/components/cchainimporttransaction.md index 39ada60..a63e9cd 100644 --- a/docs/models/components/cchainimporttransaction.md +++ b/docs/models/components/cchainimporttransaction.md @@ -6,78 +6,81 @@ import { CChainImportTransaction } from "@avalabs/avacloud-sdk/models/components"; let value: CChainImportTransaction = { - txHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", - blockHeight: 1005, - blockHash: "0x57a5cb7704561d1d59bd563b6421021b7563960c05ba3ae0e36fc36917c742ee", - timestamp: 1600762738, - memo: "0x546865204176616c616e6368652050726f6a656374", - amountUnlocked: [ + txHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + blockHeight: 1005, + blockHash: + "0x57a5cb7704561d1d59bd563b6421021b7563960c05ba3ae0e36fc36917c742ee", + timestamp: 1600762738, + memo: "0x546865204176616c616e6368652050726f6a656374", + amountUnlocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + }, + ], + amountCreated: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + ], + sourceChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + destinationChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + txType: "ImportTx", + evmOutputs: [ + { + toAddress: "0xD0f2898e49d941D6d479B381d3C8F0bd8d983b4c", + asset: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + }, + }, + ], + consumedUtxos: [ + { + 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: [ { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", + signature: + "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", + publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", }, - ], - amountCreated: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - }, - ], - sourceChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - destinationChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - txType: "ImportTx", - evmOutputs: [ - { - toAddress: "0xD0f2898e49d941D6d479B381d3C8F0bd8d983b4c", - asset: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - }, - }, - ], - consumedUtxos: [ - { - addresses: ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], - asset: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - 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", - }, - ], + ], + locktime: 0, + outputIndex: "38", + threshold: 1, + timestamp: 1599696000, + utxoType: "mint", + }, + ], }; ``` diff --git a/docs/models/components/cchainsharedassetbalance.md b/docs/models/components/cchainsharedassetbalance.md index 194336f..7a1c8b5 100644 --- a/docs/models/components/cchainsharedassetbalance.md +++ b/docs/models/components/cchainsharedassetbalance.md @@ -6,14 +6,14 @@ import { CChainSharedAssetBalance } from "@avalabs/avacloud-sdk/models/components"; let value: CChainSharedAssetBalance = { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - sharedWithChainId: "", + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + sharedWithChainId: "", }; ``` diff --git a/docs/models/components/chain.md b/docs/models/components/chain.md index d969617..7c30c65 100644 --- a/docs/models/components/chain.md +++ b/docs/models/components/chain.md @@ -6,11 +6,11 @@ import { Chain } from "@avalabs/avacloud-sdk/models/components"; let value: Chain = { - evmChainId: 43114, - chainName: "c_chain", - blockchainId: "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5", - subnetId: "11111111111111111111111111111111LpoYY", - network: "mainnet", + evmChainId: 43114, + chainName: "c_chain", + blockchainId: "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5", + subnetId: "11111111111111111111111111111111LpoYY", + network: "mainnet", }; ``` diff --git a/docs/models/components/chainaddresschainidmap.md b/docs/models/components/chainaddresschainidmap.md index cbd842d..d5eb85f 100644 --- a/docs/models/components/chainaddresschainidmap.md +++ b/docs/models/components/chainaddresschainidmap.md @@ -6,8 +6,10 @@ import { ChainAddressChainIdMap } from "@avalabs/avacloud-sdk/models/components"; let value: ChainAddressChainIdMap = { - address: "17742 Collier Bridge", - blockchainIds: ["2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM"], + address: "425 Aiden Glen", + blockchainIds: [ + "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5", + ], }; ``` diff --git a/docs/models/components/chainaddresschainidmaplistresponse.md b/docs/models/components/chainaddresschainidmaplistresponse.md index 2cd1355..97f8fdb 100644 --- a/docs/models/components/chainaddresschainidmaplistresponse.md +++ b/docs/models/components/chainaddresschainidmaplistresponse.md @@ -6,12 +6,14 @@ import { ChainAddressChainIdMapListResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ChainAddressChainIdMapListResponse = { - addresses: [ - { - address: "1597 Breitenberg Isle", - blockchainIds: ["2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm"], - }, - ], + addresses: [ + { + address: "514 Diego Divide", + blockchainIds: [ + "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5", + ], + }, + ], }; ``` diff --git a/docs/models/components/chaininfo.md b/docs/models/components/chaininfo.md index 438b61f..f45bfb5 100644 --- a/docs/models/components/chaininfo.md +++ b/docs/models/components/chaininfo.md @@ -6,20 +6,20 @@ import { ChainInfo } from "@avalabs/avacloud-sdk/models/components"; let value: ChainInfo = { - chainId: "", - status: "OK", - chainName: "", - description: "Profit-focused maximized firmware", - vmName: "ETHEREUM", - rpcUrl: "", - isTestnet: false, - networkToken: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - }, + chainId: "", + status: "UNAVAILABLE", + chainName: "", + description: "Team-oriented eco-centric support", + vmName: "BITCOIN", + rpcUrl: "", + isTestnet: false, + networkToken: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + }, }; ``` diff --git a/docs/models/components/chainrollingwindowmetricsvalue.md b/docs/models/components/chainrollingwindowmetricsvalue.md index 1652501..f8b0ff2 100644 --- a/docs/models/components/chainrollingwindowmetricsvalue.md +++ b/docs/models/components/chainrollingwindowmetricsvalue.md @@ -6,11 +6,11 @@ import { ChainRollingWindowMetricsValue } from "@avalabs/avacloud-sdk/models/components"; let value: ChainRollingWindowMetricsValue = { - lastHour: 6235.64, - lastDay: 6458.94, - lastMonth: 3843.82, - lastYear: 4375.87, - allTime: 2975.34, + lastHour: 3843.82, + lastDay: 4375.87, + lastMonth: 2975.34, + lastYear: 8917.73, + allTime: 567.13, }; ``` diff --git a/docs/models/components/collectiblebalances.md b/docs/models/components/collectiblebalances.md index eb14bdb..d21f07c 100644 --- a/docs/models/components/collectiblebalances.md +++ b/docs/models/components/collectiblebalances.md @@ -6,15 +6,15 @@ import { CollectibleBalances } from "@avalabs/avacloud-sdk/models/components"; let value: CollectibleBalances = { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - ercType: "ERC-1155", - tokenId: "", - tokenUri: "", - metadata: { - indexStatus: "INVALID_TOKEN_URI", - }, - chainId: "43114", - balance: "2000000000000000000", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + ercType: "ERC-1155", + tokenId: "", + tokenUri: "", + metadata: { + indexStatus: "INVALID_METADATA_JSON", + }, + chainId: "43114", + balance: "2000000000000000000", }; ``` diff --git a/docs/models/components/completeddelegatordetails.md b/docs/models/components/completeddelegatordetails.md index a4101ed..542d1db 100644 --- a/docs/models/components/completeddelegatordetails.md +++ b/docs/models/components/completeddelegatordetails.md @@ -6,16 +6,18 @@ import { CompletedDelegatorDetails } from "@avalabs/avacloud-sdk/models/components"; let value: CompletedDelegatorDetails = { - txHash: "", - nodeId: "", - rewardAddresses: [""], - amountDelegated: "", - delegationFee: "", - startTimestamp: 6563.3, - endTimestamp: 3172.02, - grossReward: "", - netReward: "", - delegationStatus: "completed", + txHash: "", + nodeId: "", + rewardAddresses: [ + "", + ], + amountDelegated: "", + delegationFee: "", + startTimestamp: 6235.1, + endTimestamp: 1589.69, + grossReward: "", + netReward: "", + delegationStatus: "completed", }; ``` diff --git a/docs/models/components/completedvalidatordetails.md b/docs/models/components/completedvalidatordetails.md index bccefee..6738857 100644 --- a/docs/models/components/completedvalidatordetails.md +++ b/docs/models/components/completedvalidatordetails.md @@ -6,18 +6,18 @@ import { CompletedValidatorDetails } from "@avalabs/avacloud-sdk/models/components"; let value: CompletedValidatorDetails = { - txHash: "", - nodeId: "", - subnetId: "", - amountStaked: "", - startTimestamp: 3154.28, - endTimestamp: 6078.31, - delegatorCount: 3637.11, - rewards: { - validationRewardAmount: "", - delegationRewardAmount: "", - }, - validationStatus: "completed", + txHash: "", + nodeId: "", + subnetId: "", + amountStaked: "", + startTimestamp: 1709.09, + endTimestamp: 2103.82, + delegatorCount: 3581.52, + rewards: { + validationRewardAmount: "", + delegationRewardAmount: "", + }, + validationStatus: "completed", }; ``` diff --git a/docs/models/components/compositequeryrequestdto.md b/docs/models/components/compositequeryrequestdto.md index 90caee1..79bd4bd 100644 --- a/docs/models/components/compositequeryrequestdto.md +++ b/docs/models/components/compositequeryrequestdto.md @@ -6,8 +6,8 @@ import { CompositeQueryRequestDto } from "@avalabs/avacloud-sdk/models/components"; let value: CompositeQueryRequestDto = { - queries: [], - operator: "AND", + queries: [], + operator: "AND", }; ``` diff --git a/docs/models/components/compositequeryresponse.md b/docs/models/components/compositequeryresponse.md index 1d95c49..456626b 100644 --- a/docs/models/components/compositequeryresponse.md +++ b/docs/models/components/compositequeryresponse.md @@ -6,13 +6,15 @@ import { CompositeQueryResponse } from "@avalabs/avacloud-sdk/models/components"; let value: CompositeQueryResponse = { - subQueryCounts: { - "1": 1, - "2": 2, - "3": 2, - }, - totalCount: 2, - addresses: ["0x1234567890abcdef1234567890abcdef123456789"], + subQueryCounts: { + "1": 1, + "2": 2, + "3": 2, + }, + totalCount: 2, + addresses: [ + "0x1234567890abcdef1234567890abcdef123456789", + ], }; ``` diff --git a/docs/models/components/contractdeploymentdetails.md b/docs/models/components/contractdeploymentdetails.md index f432ab7..c3d4d19 100644 --- a/docs/models/components/contractdeploymentdetails.md +++ b/docs/models/components/contractdeploymentdetails.md @@ -6,8 +6,8 @@ import { ContractDeploymentDetails } from "@avalabs/avacloud-sdk/models/components"; let value: ContractDeploymentDetails = { - txHash: "", - deployerAddress: "", + txHash: "", + deployerAddress: "", }; ``` diff --git a/docs/models/components/contracts.md b/docs/models/components/contracts.md index 404017a..35386ee 100644 --- a/docs/models/components/contracts.md +++ b/docs/models/components/contracts.md @@ -6,13 +6,15 @@ import { Contracts } from "@avalabs/avacloud-sdk/models/components"; let value: Contracts = { - name: "Wrapped AVAX", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - deploymentDetails: { - txHash: "", - deployerAddress: "", - }, - ercType: "UNKNOWN", + name: "Wrapped AVAX", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + deploymentDetails: { + txHash: "", + deployerAddress: "", + }, + ercType: "ERC-20", + symbol: "WAVAX", + decimals: 18, }; ``` diff --git a/docs/models/components/createevmtransactionexportrequest.md b/docs/models/components/createevmtransactionexportrequest.md index 914ce8c..37d9caa 100644 --- a/docs/models/components/createevmtransactionexportrequest.md +++ b/docs/models/components/createevmtransactionexportrequest.md @@ -6,15 +6,19 @@ import { CreateEvmTransactionExportRequest } from "@avalabs/avacloud-sdk/models/components"; let value: CreateEvmTransactionExportRequest = { - type: "TRANSACTION_EXPORT_EVM", - firstDate: "2023-05-01", - lastDate: "2023-05-02", - startDate: "2023-05-01", - endDate: "2023-05-02", - options: { - addresses: [""], - includeChains: ["43114"], - }, + type: "TRANSACTION_EXPORT_EVM", + firstDate: "2023-05-01", + lastDate: "2023-05-02", + startDate: "2023-05-01", + endDate: "2023-05-02", + options: { + addresses: [ + "", + ], + includeChains: [ + "43114", + ], + }, }; ``` diff --git a/docs/models/components/createprimarynetworktransactionexportrequest.md b/docs/models/components/createprimarynetworktransactionexportrequest.md index eb2f285..9d6320d 100644 --- a/docs/models/components/createprimarynetworktransactionexportrequest.md +++ b/docs/models/components/createprimarynetworktransactionexportrequest.md @@ -6,14 +6,16 @@ import { CreatePrimaryNetworkTransactionExportRequest } from "@avalabs/avacloud-sdk/models/components"; let value: CreatePrimaryNetworkTransactionExportRequest = { - type: "TRANSACTION_EXPORT_PRIMARY_NETWORK_STAKING", - firstDate: "2023-05-01", - lastDate: "2023-05-02", - startDate: "2023-05-01", - endDate: "2023-05-02", - options: { - includeChains: ["p-chain"], - }, + type: "TRANSACTION_EXPORT_PRIMARY_NETWORK", + firstDate: "2023-05-01", + lastDate: "2023-05-02", + startDate: "2023-05-01", + endDate: "2023-05-02", + options: { + includeChains: [ + "p-chain", + ], + }, }; ``` diff --git a/docs/models/components/createwebhookrequest.md b/docs/models/components/createwebhookrequest.md index b83fbf9..b12ded5 100644 --- a/docs/models/components/createwebhookrequest.md +++ b/docs/models/components/createwebhookrequest.md @@ -6,13 +6,17 @@ import { CreateWebhookRequest } from "@avalabs/avacloud-sdk/models/components"; let value: CreateWebhookRequest = { - url: "https://secret-wafer.biz", - chainId: "", - eventType: "address_activity", - metadata: { - addresses: ["0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"], - eventSignatures: ["0x61cbb2a3dee0b6064c2e681aadd61677fb4ef319f0b547508d495626f5a62f64"], - }, + url: "https://rash-mallard.org", + chainId: "", + eventType: "address_activity", + metadata: { + addresses: [ + "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + ], + eventSignatures: [ + "0x61cbb2a3dee0b6064c2e681aadd61677fb4ef319f0b547508d495626f5a62f64", + ], + }, }; ``` diff --git a/docs/models/components/createwebhookrequestmetadata.md b/docs/models/components/createwebhookrequestmetadata.md index 6e2555f..73201db 100644 --- a/docs/models/components/createwebhookrequestmetadata.md +++ b/docs/models/components/createwebhookrequestmetadata.md @@ -6,8 +6,12 @@ import { CreateWebhookRequestMetadata } from "@avalabs/avacloud-sdk/models/components"; let value: CreateWebhookRequestMetadata = { - addresses: ["0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"], - eventSignatures: ["0x61cbb2a3dee0b6064c2e681aadd61677fb4ef319f0b547508d495626f5a62f64"], + addresses: [ + "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + ], + eventSignatures: [ + "0x61cbb2a3dee0b6064c2e681aadd61677fb4ef319f0b547508d495626f5a62f64", + ], }; ``` diff --git a/docs/models/components/datalistchainsresponse.md b/docs/models/components/datalistchainsresponse.md index cec55ff..faffe1a 100644 --- a/docs/models/components/datalistchainsresponse.md +++ b/docs/models/components/datalistchainsresponse.md @@ -6,24 +6,24 @@ import { DataListChainsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: DataListChainsResponse = { - chains: [ - { - chainId: "", - status: "OK", - chainName: "", - description: "Enhanced radical structure", - vmName: "EVM", - rpcUrl: "", - isTestnet: false, - networkToken: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - }, - }, - ], + chains: [ + { + chainId: "", + status: "UNAVAILABLE", + chainName: "", + description: "Triple-buffered demand-driven budgetary management", + vmName: "EVM", + rpcUrl: "", + isTestnet: false, + networkToken: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + }, + }, + ], }; ``` diff --git a/docs/models/components/daterangeerc20minbalanceparam.md b/docs/models/components/daterangeerc20minbalanceparam.md index 89b3798..8090bb1 100644 --- a/docs/models/components/daterangeerc20minbalanceparam.md +++ b/docs/models/components/daterangeerc20minbalanceparam.md @@ -6,11 +6,11 @@ import { DateRangeErc20MinBalanceParam } from "@avalabs/avacloud-sdk/models/components"; let value: DateRangeErc20MinBalanceParam = { - firstDate: "", - lastDate: "", - minBalance: "", - evmChainId: "", - contractAddress: "", + firstDate: "", + lastDate: "", + minBalance: "", + evmChainId: "", + contractAddress: "", }; ``` diff --git a/docs/models/components/daterangeminbalanceparam.md b/docs/models/components/daterangeminbalanceparam.md index 10855bd..77e7421 100644 --- a/docs/models/components/daterangeminbalanceparam.md +++ b/docs/models/components/daterangeminbalanceparam.md @@ -6,10 +6,10 @@ import { DateRangeMinBalanceParam } from "@avalabs/avacloud-sdk/models/components"; let value: DateRangeMinBalanceParam = { - firstDate: "", - lastDate: "", - minBalance: "", - evmChainId: "", + firstDate: "", + lastDate: "", + minBalance: "", + evmChainId: "", }; ``` diff --git a/docs/models/components/daterangenftholdersparam.md b/docs/models/components/daterangenftholdersparam.md index 4af65d7..80df6fb 100644 --- a/docs/models/components/daterangenftholdersparam.md +++ b/docs/models/components/daterangenftholdersparam.md @@ -6,10 +6,10 @@ import { DateRangeNftHoldersParam } from "@avalabs/avacloud-sdk/models/components"; let value: DateRangeNftHoldersParam = { - firstDate: "", - lastDate: "", - evmChainId: "", - contractAddress: "", + firstDate: "", + lastDate: "", + evmChainId: "", + contractAddress: "", }; ``` diff --git a/docs/models/components/daterangestarsarenaminbalanceparam.md b/docs/models/components/daterangestarsarenaminbalanceparam.md index 04c5748..0ad7805 100644 --- a/docs/models/components/daterangestarsarenaminbalanceparam.md +++ b/docs/models/components/daterangestarsarenaminbalanceparam.md @@ -6,10 +6,10 @@ import { DateRangeStarsArenaMinBalanceParam } from "@avalabs/avacloud-sdk/models/components"; let value: DateRangeStarsArenaMinBalanceParam = { - firstDate: "", - lastDate: "", - minBalance: "", - subjectAddress: "", + firstDate: "", + lastDate: "", + minBalance: "", + subjectAddress: "", }; ``` diff --git a/docs/models/components/delegators.md b/docs/models/components/delegators.md index 262c44c..673a911 100644 --- a/docs/models/components/delegators.md +++ b/docs/models/components/delegators.md @@ -6,16 +6,18 @@ import { Delegators } from "@avalabs/avacloud-sdk/models/components"; let value: Delegators = { - txHash: "", - nodeId: "", - rewardAddresses: [""], - amountDelegated: "", - delegationFee: "", - startTimestamp: 6235.1, - endTimestamp: 1589.69, - estimatedGrossReward: "", - estimatedNetReward: "", - delegationStatus: "active", + txHash: "", + nodeId: "", + rewardAddresses: [ + "", + ], + amountDelegated: "", + delegationFee: "", + startTimestamp: 2532.91, + endTimestamp: 4143.69, + estimatedGrossReward: "", + estimatedNetReward: "", + delegationStatus: "pending", }; ``` diff --git a/docs/models/components/delegatorsdetails.md b/docs/models/components/delegatorsdetails.md index c353c89..7af0764 100644 --- a/docs/models/components/delegatorsdetails.md +++ b/docs/models/components/delegatorsdetails.md @@ -6,8 +6,8 @@ import { DelegatorsDetails } from "@avalabs/avacloud-sdk/models/components"; let value: DelegatorsDetails = { - delegatorCount: 6169.34, - totalAmountStaked: "", + delegatorCount: 3864.89, + totalAmountStaked: "", }; ``` diff --git a/docs/models/components/deliveredsourcenotindexedteleportermessage.md b/docs/models/components/deliveredsourcenotindexedteleportermessage.md index 920a225..efd6aba 100644 --- a/docs/models/components/deliveredsourcenotindexedteleportermessage.md +++ b/docs/models/components/deliveredsourcenotindexedteleportermessage.md @@ -6,45 +6,45 @@ import { DeliveredSourceNotIndexedTeleporterMessage } from "@avalabs/avacloud-sdk/models/components"; let value: DeliveredSourceNotIndexedTeleporterMessage = { - messageId: "", - teleporterContractAddress: "", - sourceBlockchainId: "", - destinationBlockchainId: "", - sourceEvmChainId: "", - destinationEvmChainId: "", - messageNonce: "", - from: "", - to: "", - messageExecuted: false, - receipts: [ - { - receivedMessageNonce: "", - relayerRewardAddress: "", - }, - ], - receiptDelivered: false, - rewardDetails: { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - ercType: "ERC-20", - price: { - currencyCode: "usd", - value: 42.42, - }, - value: "", + messageId: "", + teleporterContractAddress: "", + sourceBlockchainId: "", + destinationBlockchainId: "", + sourceEvmChainId: "", + destinationEvmChainId: "", + messageNonce: "", + from: "", + to: "", + messageExecuted: false, + receipts: [ + { + receivedMessageNonce: "", + relayerRewardAddress: "", }, - destinationTransaction: { - txHash: "", - timestamp: 2187.49, - gasSpent: "", - rewardRedeemer: "", - delivererAddress: "", + ], + receiptDelivered: false, + rewardDetails: { + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + ercType: "ERC-20", + price: { + currencyCode: "usd", + value: 42.42, }, - status: "delivered_source_not_indexed", + value: "", + }, + destinationTransaction: { + txHash: "", + timestamp: 3982.21, + gasSpent: "", + rewardRedeemer: "", + delivererAddress: "", + }, + status: "delivered_source_not_indexed", }; ``` diff --git a/docs/models/components/deliveredsourcenotindexedteleportermessagestatus.md b/docs/models/components/deliveredsourcenotindexedteleportermessagestatus.md index 902aa90..0a8d1c6 100644 --- a/docs/models/components/deliveredsourcenotindexedteleportermessagestatus.md +++ b/docs/models/components/deliveredsourcenotindexedteleportermessagestatus.md @@ -5,7 +5,8 @@ ```typescript import { DeliveredSourceNotIndexedTeleporterMessageStatus } from "@avalabs/avacloud-sdk/models/components"; -let value: DeliveredSourceNotIndexedTeleporterMessageStatus = "delivered_source_not_indexed"; +let value: DeliveredSourceNotIndexedTeleporterMessageStatus = + "delivered_source_not_indexed"; ``` ## Values diff --git a/docs/models/components/deliveredteleportermessage.md b/docs/models/components/deliveredteleportermessage.md index c99a262..8f1d067 100644 --- a/docs/models/components/deliveredteleportermessage.md +++ b/docs/models/components/deliveredteleportermessage.md @@ -6,50 +6,50 @@ import { DeliveredTeleporterMessage } from "@avalabs/avacloud-sdk/models/components"; let value: DeliveredTeleporterMessage = { - messageId: "", - teleporterContractAddress: "", - sourceBlockchainId: "", - destinationBlockchainId: "", - sourceEvmChainId: "", - destinationEvmChainId: "", - messageNonce: "", - from: "", - to: "", - messageExecuted: false, - receipts: [ - { - receivedMessageNonce: "", - relayerRewardAddress: "", - }, - ], - receiptDelivered: false, - rewardDetails: { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - ercType: "ERC-20", - price: { - currencyCode: "usd", - value: 42.42, - }, - value: "", + messageId: "", + teleporterContractAddress: "", + sourceBlockchainId: "", + destinationBlockchainId: "", + sourceEvmChainId: "", + destinationEvmChainId: "", + messageNonce: "", + from: "", + to: "", + messageExecuted: false, + receipts: [ + { + receivedMessageNonce: "", + relayerRewardAddress: "", }, - sourceTransaction: { - txHash: "", - timestamp: 2098.43, - gasSpent: "", + ], + receiptDelivered: false, + rewardDetails: { + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + ercType: "ERC-20", + price: { + currencyCode: "usd", + value: 42.42, }, - destinationTransaction: { - txHash: "", - timestamp: 2224.43, - gasSpent: "", - rewardRedeemer: "", - delivererAddress: "", - }, - status: "delivered", + value: "", + }, + sourceTransaction: { + txHash: "", + timestamp: 9644.9, + gasSpent: "", + }, + destinationTransaction: { + txHash: "", + timestamp: 3119.45, + gasSpent: "", + rewardRedeemer: "", + delivererAddress: "", + }, + status: "delivered", }; ``` diff --git a/docs/models/components/destinationchainid.md b/docs/models/components/destinationchainid.md new file mode 100644 index 0000000..28905ce --- /dev/null +++ b/docs/models/components/destinationchainid.md @@ -0,0 +1,16 @@ +# DestinationChainId + +chain id of the destination chain. valid only for source transactions + +## Example Usage + +```typescript +import { DestinationChainId } from "@avalabs/avacloud-sdk/models/components"; + +let value: DestinationChainId = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/enabledfeatures.md b/docs/models/components/enabledfeatures.md index 68b6fb4..3f560b6 100644 --- a/docs/models/components/enabledfeatures.md +++ b/docs/models/components/enabledfeatures.md @@ -5,11 +5,11 @@ ```typescript import { EnabledFeatures } from "@avalabs/avacloud-sdk/models/components"; -let value: EnabledFeatures = "webhooks"; +let value: EnabledFeatures = "nftIndexing"; ``` ## Values ```typescript -"nftIndexing" | "webhooks" +"nftIndexing" | "webhooks" | "teleporter" ``` \ No newline at end of file diff --git a/docs/models/components/erc1155contract.md b/docs/models/components/erc1155contract.md index 8e69e27..736f42d 100644 --- a/docs/models/components/erc1155contract.md +++ b/docs/models/components/erc1155contract.md @@ -6,14 +6,14 @@ import { Erc1155Contract } from "@avalabs/avacloud-sdk/models/components"; let value: Erc1155Contract = { - name: "Wrapped AVAX", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - deploymentDetails: { - txHash: "", - deployerAddress: "", - }, - ercType: "ERC-1155", - symbol: "WAVAX", + name: "Wrapped AVAX", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + deploymentDetails: { + txHash: "", + deployerAddress: "", + }, + ercType: "ERC-1155", + symbol: "WAVAX", }; ``` diff --git a/docs/models/components/erc1155token.md b/docs/models/components/erc1155token.md index b75feb6..53c9c51 100644 --- a/docs/models/components/erc1155token.md +++ b/docs/models/components/erc1155token.md @@ -6,13 +6,13 @@ import { Erc1155Token } from "@avalabs/avacloud-sdk/models/components"; let value: Erc1155Token = { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - ercType: "ERC-1155", - tokenId: "", - tokenUri: "", - metadata: { - indexStatus: "UNINDEXED", - }, + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + ercType: "ERC-1155", + tokenId: "", + tokenUri: "", + metadata: { + indexStatus: "INDEXED", + }, }; ``` diff --git a/docs/models/components/erc1155tokenbalance.md b/docs/models/components/erc1155tokenbalance.md index 09f6ac6..b9f3a5a 100644 --- a/docs/models/components/erc1155tokenbalance.md +++ b/docs/models/components/erc1155tokenbalance.md @@ -6,15 +6,15 @@ import { Erc1155TokenBalance } from "@avalabs/avacloud-sdk/models/components"; let value: Erc1155TokenBalance = { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - ercType: "ERC-1155", - tokenId: "", - tokenUri: "", - metadata: { - indexStatus: "INVALID_TOKEN_URI", - }, - chainId: "43114", - balance: "2000000000000000000", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + ercType: "ERC-1155", + tokenId: "", + tokenUri: "", + metadata: { + indexStatus: "UNINDEXED", + }, + chainId: "43114", + balance: "2000000000000000000", }; ``` diff --git a/docs/models/components/erc1155tokenmetadata.md b/docs/models/components/erc1155tokenmetadata.md index e4f7952..a897ec3 100644 --- a/docs/models/components/erc1155tokenmetadata.md +++ b/docs/models/components/erc1155tokenmetadata.md @@ -6,7 +6,7 @@ import { Erc1155TokenMetadata } from "@avalabs/avacloud-sdk/models/components"; let value: Erc1155TokenMetadata = { - indexStatus: "INVALID_METADATA_JSON", + indexStatus: "UNINDEXED", }; ``` diff --git a/docs/models/components/erc1155transfer.md b/docs/models/components/erc1155transfer.md index c562f50..bf2cbb1 100644 --- a/docs/models/components/erc1155transfer.md +++ b/docs/models/components/erc1155transfer.md @@ -6,37 +6,38 @@ import { Erc1155Transfer } from "@avalabs/avacloud-sdk/models/components"; let value: Erc1155Transfer = { - blockNumber: "339", - blockTimestamp: 1648672486, - blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", - txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", - from: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - to: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - logIndex: 2168.97, - value: "10000000000000000000", - erc1155Token: { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - ercType: "ERC-1155", - tokenId: "", - tokenUri: "", - metadata: { - indexStatus: "THROTTLED_TOKEN_URI", - }, + blockNumber: "339", + blockTimestamp: 1648672486, + blockHash: + "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", + txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", + from: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + to: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + logIndex: 8966.72, + value: "10000000000000000000", + erc1155Token: { + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + ercType: "ERC-1155", + tokenId: "", + tokenUri: "", + metadata: { + indexStatus: "INVALID_METADATA", }, + }, }; ``` diff --git a/docs/models/components/erc1155transferdetails.md b/docs/models/components/erc1155transferdetails.md index 77288c7..e37c9bb 100644 --- a/docs/models/components/erc1155transferdetails.md +++ b/docs/models/components/erc1155transferdetails.md @@ -6,33 +6,33 @@ import { Erc1155TransferDetails } from "@avalabs/avacloud-sdk/models/components"; let value: Erc1155TransferDetails = { - from: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - to: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - logIndex: 3777.52, - value: "10000000000000000000", - erc1155Token: { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - ercType: "ERC-1155", - tokenId: "", - tokenUri: "", - metadata: { - indexStatus: "METADATA_CONTENT_TOO_LARGE", - }, + from: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + to: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + logIndex: 3117.96, + value: "10000000000000000000", + erc1155Token: { + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + ercType: "ERC-1155", + tokenId: "", + tokenUri: "", + metadata: { + indexStatus: "INDEXED", }, + }, }; ``` diff --git a/docs/models/components/erc20contract.md b/docs/models/components/erc20contract.md index 24e6066..e26a630 100644 --- a/docs/models/components/erc20contract.md +++ b/docs/models/components/erc20contract.md @@ -6,15 +6,15 @@ import { Erc20Contract } from "@avalabs/avacloud-sdk/models/components"; let value: Erc20Contract = { - name: "Wrapped AVAX", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - deploymentDetails: { - txHash: "", - deployerAddress: "", - }, - ercType: "ERC-20", - symbol: "WAVAX", - decimals: 18, + name: "Wrapped AVAX", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + deploymentDetails: { + txHash: "", + deployerAddress: "", + }, + ercType: "ERC-20", + symbol: "WAVAX", + decimals: 18, }; ``` diff --git a/docs/models/components/erc20token.md b/docs/models/components/erc20token.md index 51e3845..2ea2f54 100644 --- a/docs/models/components/erc20token.md +++ b/docs/models/components/erc20token.md @@ -6,17 +6,17 @@ import { Erc20Token } from "@avalabs/avacloud-sdk/models/components"; let value: Erc20Token = { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - ercType: "ERC-20", - price: { - currencyCode: "usd", - value: 42.42, - }, + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + ercType: "ERC-20", + price: { + currencyCode: "usd", + value: 42.42, + }, }; ``` diff --git a/docs/models/components/erc20tokenbalance.md b/docs/models/components/erc20tokenbalance.md index 33a6000..73efe49 100644 --- a/docs/models/components/erc20tokenbalance.md +++ b/docs/models/components/erc20tokenbalance.md @@ -6,23 +6,23 @@ import { Erc20TokenBalance } from "@avalabs/avacloud-sdk/models/components"; let value: Erc20TokenBalance = { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - ercType: "ERC-20", - price: { - currencyCode: "usd", - value: 42.42, - }, - chainId: "43114", - balance: "2000000000000000000", - balanceValue: { - currencyCode: "usd", - value: 42.42, - }, + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + ercType: "ERC-20", + price: { + currencyCode: "usd", + value: 42.42, + }, + chainId: "43114", + balance: "2000000000000000000", + balanceValue: { + currencyCode: "usd", + value: 42.42, + }, }; ``` diff --git a/docs/models/components/erc20transfer.md b/docs/models/components/erc20transfer.md index ba3c2e8..51d1803 100644 --- a/docs/models/components/erc20transfer.md +++ b/docs/models/components/erc20transfer.md @@ -6,41 +6,42 @@ import { Erc20Transfer } from "@avalabs/avacloud-sdk/models/components"; let value: Erc20Transfer = { - blockNumber: "339", - blockTimestamp: 1648672486, - blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", - txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", - from: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - to: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - logIndex: 7146.97, - value: "10000000000000000000", - erc20Token: { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - ercType: "ERC-20", - price: { - currencyCode: "usd", - value: 42.42, - }, + blockNumber: "339", + blockTimestamp: 1648672486, + blockHash: + "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", + txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", + from: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + to: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + logIndex: 6770.82, + value: "10000000000000000000", + erc20Token: { + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + ercType: "ERC-20", + price: { + currencyCode: "usd", + value: 42.42, }, + }, }; ``` diff --git a/docs/models/components/erc20transferdetails.md b/docs/models/components/erc20transferdetails.md index 52e5c89..4d90246 100644 --- a/docs/models/components/erc20transferdetails.md +++ b/docs/models/components/erc20transferdetails.md @@ -6,37 +6,37 @@ import { Erc20TransferDetails } from "@avalabs/avacloud-sdk/models/components"; let value: Erc20TransferDetails = { - from: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - to: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - logIndex: 246.78, - value: "10000000000000000000", - erc20Token: { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - ercType: "ERC-20", - price: { - currencyCode: "usd", - value: 42.42, - }, + from: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + to: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + logIndex: 3777.52, + value: "10000000000000000000", + erc20Token: { + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + ercType: "ERC-20", + price: { + currencyCode: "usd", + value: 42.42, }, + }, }; ``` diff --git a/docs/models/components/erc721contract.md b/docs/models/components/erc721contract.md index fad687e..a8b3144 100644 --- a/docs/models/components/erc721contract.md +++ b/docs/models/components/erc721contract.md @@ -6,14 +6,14 @@ import { Erc721Contract } from "@avalabs/avacloud-sdk/models/components"; let value: Erc721Contract = { - name: "Wrapped AVAX", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - deploymentDetails: { - txHash: "", - deployerAddress: "", - }, - ercType: "ERC-721", - symbol: "WAVAX", + name: "Wrapped AVAX", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + deploymentDetails: { + txHash: "", + deployerAddress: "", + }, + ercType: "ERC-721", + symbol: "WAVAX", }; ``` diff --git a/docs/models/components/erc721token.md b/docs/models/components/erc721token.md index b425463..306c981 100644 --- a/docs/models/components/erc721token.md +++ b/docs/models/components/erc721token.md @@ -6,16 +6,16 @@ import { Erc721Token } from "@avalabs/avacloud-sdk/models/components"; let value: Erc721Token = { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - ercType: "ERC-721", - tokenId: "", - tokenUri: "", - metadata: { - indexStatus: "UNKNOWN", - }, - ownerAddress: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + name: "Wrapped AVAX", + symbol: "WAVAX", + ercType: "ERC-721", + tokenId: "", + tokenUri: "", + metadata: { + indexStatus: "INVALID_METADATA_JSON", + }, + ownerAddress: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", }; ``` diff --git a/docs/models/components/erc721tokenbalance.md b/docs/models/components/erc721tokenbalance.md index f16a14a..db612b0 100644 --- a/docs/models/components/erc721tokenbalance.md +++ b/docs/models/components/erc721tokenbalance.md @@ -6,17 +6,17 @@ import { Erc721TokenBalance } from "@avalabs/avacloud-sdk/models/components"; let value: Erc721TokenBalance = { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - ercType: "ERC-721", - tokenId: "", - tokenUri: "", - metadata: { - indexStatus: "THROTTLED_TOKEN_URI", - }, - ownerAddress: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - chainId: "43114", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + name: "Wrapped AVAX", + symbol: "WAVAX", + ercType: "ERC-721", + tokenId: "", + tokenUri: "", + metadata: { + indexStatus: "INVALID_TOKEN_URI", + }, + ownerAddress: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + chainId: "43114", }; ``` diff --git a/docs/models/components/erc721tokenmetadata.md b/docs/models/components/erc721tokenmetadata.md index 65d79b7..72d3142 100644 --- a/docs/models/components/erc721tokenmetadata.md +++ b/docs/models/components/erc721tokenmetadata.md @@ -6,7 +6,7 @@ import { Erc721TokenMetadata } from "@avalabs/avacloud-sdk/models/components"; let value: Erc721TokenMetadata = { - indexStatus: "UNREACHABLE_TOKEN_URI", + indexStatus: "MISSING_TOKEN", }; ``` diff --git a/docs/models/components/erc721transfer.md b/docs/models/components/erc721transfer.md index e5b35a8..e9effd0 100644 --- a/docs/models/components/erc721transfer.md +++ b/docs/models/components/erc721transfer.md @@ -6,39 +6,40 @@ import { Erc721Transfer } from "@avalabs/avacloud-sdk/models/components"; let value: Erc721Transfer = { - blockNumber: "339", - blockTimestamp: 1648672486, - blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", - txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", - from: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - to: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - logIndex: 9903.39, - erc721Token: { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - ercType: "ERC-721", - tokenId: "", - tokenUri: "", - metadata: { - indexStatus: "THROTTLED_TOKEN_URI", - }, - ownerAddress: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + blockNumber: "339", + blockTimestamp: 1648672486, + blockHash: + "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", + txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", + from: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + to: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + logIndex: 5365.79, + erc721Token: { + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + name: "Wrapped AVAX", + symbol: "WAVAX", + ercType: "ERC-721", + tokenId: "", + tokenUri: "", + metadata: { + indexStatus: "METADATA_CONTENT_TOO_LARGE", }, + ownerAddress: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, }; ``` diff --git a/docs/models/components/erc721transferdetails.md b/docs/models/components/erc721transferdetails.md index d87148f..3605099 100644 --- a/docs/models/components/erc721transferdetails.md +++ b/docs/models/components/erc721transferdetails.md @@ -6,35 +6,35 @@ import { Erc721TransferDetails } from "@avalabs/avacloud-sdk/models/components"; let value: Erc721TransferDetails = { - from: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - to: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - logIndex: 1796.03, - erc721Token: { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - ercType: "ERC-721", - tokenId: "", - tokenUri: "", - metadata: { - indexStatus: "THROTTLED_TOKEN_URI", - }, - ownerAddress: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + from: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + to: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + logIndex: 6963.44, + erc721Token: { + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + name: "Wrapped AVAX", + symbol: "WAVAX", + ercType: "ERC-721", + tokenId: "", + tokenUri: "", + metadata: { + indexStatus: "UNINDEXED", }, + ownerAddress: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, }; ``` diff --git a/docs/models/components/evmblock.md b/docs/models/components/evmblock.md index d15d480..e773d46 100644 --- a/docs/models/components/evmblock.md +++ b/docs/models/components/evmblock.md @@ -6,17 +6,18 @@ import { EvmBlock } from "@avalabs/avacloud-sdk/models/components"; let value: EvmBlock = { - blockNumber: "339", - blockTimestamp: 1648672486, - blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", - txCount: 580.29, - baseFee: "", - gasUsed: "", - gasLimit: "", - gasCost: "", - parentHash: "", - feesSpent: "", - cumulativeTransactions: "", + blockNumber: "339", + blockTimestamp: 1648672486, + blockHash: + "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", + txCount: 4904.59, + baseFee: "", + gasUsed: "", + gasLimit: "", + gasCost: "", + parentHash: "", + feesSpent: "", + cumulativeTransactions: "", }; ``` diff --git a/docs/models/components/evminput.md b/docs/models/components/evminput.md index 0c91a84..c41c8f7 100644 --- a/docs/models/components/evminput.md +++ b/docs/models/components/evminput.md @@ -6,22 +6,22 @@ import { EVMInput } from "@avalabs/avacloud-sdk/models/components"; let value: EVMInput = { - fromAddress: "0xD0f2898e49d941D6d479B381d3C8F0bd8d983b4c", - asset: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", + fromAddress: "0xD0f2898e49d941D6d479B381d3C8F0bd8d983b4c", + asset: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + }, + credentials: [ + { + signature: + "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", + publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", }, - credentials: [ - { - signature: - "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", - publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", - }, - ], + ], }; ``` diff --git a/docs/models/components/evmnetworkoptions.md b/docs/models/components/evmnetworkoptions.md index d42bd0c..2322b0a 100644 --- a/docs/models/components/evmnetworkoptions.md +++ b/docs/models/components/evmnetworkoptions.md @@ -6,8 +6,12 @@ import { EvmNetworkOptions } from "@avalabs/avacloud-sdk/models/components"; let value: EvmNetworkOptions = { - addresses: [""], - includeChains: ["43114"], + addresses: [ + "", + ], + includeChains: [ + "43114", + ], }; ``` diff --git a/docs/models/components/evmoutput.md b/docs/models/components/evmoutput.md index b519c8a..9727c73 100644 --- a/docs/models/components/evmoutput.md +++ b/docs/models/components/evmoutput.md @@ -6,15 +6,15 @@ import { EVMOutput } from "@avalabs/avacloud-sdk/models/components"; let value: EVMOutput = { - toAddress: "0xD0f2898e49d941D6d479B381d3C8F0bd8d983b4c", - asset: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - }, + toAddress: "0xD0f2898e49d941D6d479B381d3C8F0bd8d983b4c", + asset: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + }, }; ``` diff --git a/docs/models/components/fullnativetransactiondetails.md b/docs/models/components/fullnativetransactiondetails.md index 3135f5a..ff24059 100644 --- a/docs/models/components/fullnativetransactiondetails.md +++ b/docs/models/components/fullnativetransactiondetails.md @@ -6,41 +6,42 @@ import { FullNativeTransactionDetails } from "@avalabs/avacloud-sdk/models/components"; let value: FullNativeTransactionDetails = { - blockNumber: "339", - blockTimestamp: 1648672486, - blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", - blockIndex: 0, - txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", - txStatus: "1", - txType: 1, - gasLimit: "51373", - gasUsed: "51373", - gasPrice: "470000000000", - nonce: "1", - from: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - to: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - method: { - callType: "CONTRACT_CALL", - methodHash: "0xa9059cbb", - methodName: "transfer(address,uint256)", - }, - value: "10000000000000000000", - input: "", - baseFeePerGas: "", + blockNumber: "339", + blockTimestamp: 1648672486, + blockHash: + "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", + blockIndex: 0, + txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", + txStatus: "1", + txType: 1, + gasLimit: "51373", + gasUsed: "51373", + gasPrice: "470000000000", + nonce: "1", + from: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + to: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + method: { + callType: "NATIVE_TRANSFER", + methodHash: "0xa9059cbb", + methodName: "transfer(address,uint256)", + }, + value: "10000000000000000000", + input: "", + baseFeePerGas: "", }; ``` diff --git a/docs/models/components/getchainresponse.md b/docs/models/components/getchainresponse.md index 3b6034c..f928a1c 100644 --- a/docs/models/components/getchainresponse.md +++ b/docs/models/components/getchainresponse.md @@ -6,20 +6,20 @@ import { GetChainResponse } from "@avalabs/avacloud-sdk/models/components"; let value: GetChainResponse = { - chainId: "", - status: "UNAVAILABLE", - chainName: "", - description: "Fully-configurable didactic hardware", - vmName: "ETHEREUM", - rpcUrl: "", - isTestnet: false, - networkToken: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - }, + chainId: "", + status: "UNAVAILABLE", + chainName: "", + description: "Open-architected modular ability", + vmName: "ETHEREUM", + rpcUrl: "", + isTestnet: false, + networkToken: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + }, }; ``` diff --git a/docs/models/components/getchainresponseenabledfeatures.md b/docs/models/components/getchainresponseenabledfeatures.md index 9553dfa..64e68f6 100644 --- a/docs/models/components/getchainresponseenabledfeatures.md +++ b/docs/models/components/getchainresponseenabledfeatures.md @@ -11,5 +11,5 @@ let value: GetChainResponseEnabledFeatures = "nftIndexing"; ## Values ```typescript -"nftIndexing" | "webhooks" +"nftIndexing" | "webhooks" | "teleporter" ``` \ No newline at end of file diff --git a/docs/models/components/getevmblockresponse.md b/docs/models/components/getevmblockresponse.md index a683c67..872879f 100644 --- a/docs/models/components/getevmblockresponse.md +++ b/docs/models/components/getevmblockresponse.md @@ -6,17 +6,18 @@ import { GetEvmBlockResponse } from "@avalabs/avacloud-sdk/models/components"; let value: GetEvmBlockResponse = { - blockNumber: "339", - blockTimestamp: 1648672486, - blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", - txCount: 564.18, - baseFee: "", - gasUsed: "", - gasLimit: "", - gasCost: "", - parentHash: "", - feesSpent: "", - cumulativeTransactions: "", + blockNumber: "339", + blockTimestamp: 1648672486, + blockHash: + "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", + txCount: 9702.37, + baseFee: "", + gasUsed: "", + gasLimit: "", + gasCost: "", + parentHash: "", + feesSpent: "", + cumulativeTransactions: "", }; ``` diff --git a/docs/models/components/getnativebalanceresponse.md b/docs/models/components/getnativebalanceresponse.md index 3fc473a..f1ee567 100644 --- a/docs/models/components/getnativebalanceresponse.md +++ b/docs/models/components/getnativebalanceresponse.md @@ -6,23 +6,23 @@ import { GetNativeBalanceResponse } from "@avalabs/avacloud-sdk/models/components"; let value: GetNativeBalanceResponse = { - nativeTokenBalance: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - chainId: "43114", - price: { - currencyCode: "usd", - value: 42.42, - }, - balance: "2000000000000000000", - balanceValue: { - currencyCode: "usd", - value: 42.42, - }, + nativeTokenBalance: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + chainId: "43114", + price: { + currencyCode: "usd", + value: 42.42, }, + balance: "2000000000000000000", + balanceValue: { + currencyCode: "usd", + value: 42.42, + }, + }, }; ``` diff --git a/docs/models/components/getnetworkdetailsresponse.md b/docs/models/components/getnetworkdetailsresponse.md index 2cf3229..6889866 100644 --- a/docs/models/components/getnetworkdetailsresponse.md +++ b/docs/models/components/getnetworkdetailsresponse.md @@ -6,23 +6,23 @@ import { GetNetworkDetailsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: GetNetworkDetailsResponse = { - validatorDetails: { - validatorCount: 1496.75, - totalAmountStaked: "", - estimatedAnnualStakingReward: "", - stakingDistributionByVersion: [ - { - version: "", - amountStaked: "", - validatorCount: 6120.96, - }, - ], - stakingRatio: "", - }, - delegatorDetails: { - delegatorCount: 2223.21, - totalAmountStaked: "", - }, + validatorDetails: { + validatorCount: 6120.96, + totalAmountStaked: "", + estimatedAnnualStakingReward: "", + stakingDistributionByVersion: [ + { + version: "", + amountStaked: "", + validatorCount: 2223.21, + }, + ], + stakingRatio: "", + }, + delegatorDetails: { + delegatorCount: 6169.34, + totalAmountStaked: "", + }, }; ``` diff --git a/docs/models/components/getprimarynetworkblockresponse.md b/docs/models/components/getprimarynetworkblockresponse.md index f666699..b5a0704 100644 --- a/docs/models/components/getprimarynetworkblockresponse.md +++ b/docs/models/components/getprimarynetworkblockresponse.md @@ -6,14 +6,16 @@ import { GetPrimaryNetworkBlockResponse } from "@avalabs/avacloud-sdk/models/components"; let value: GetPrimaryNetworkBlockResponse = { - blockNumber: "", - blockHash: "", - parentHash: "", - blockTimestamp: 5743.25, - blockType: "", - txCount: 336.25, - transactions: [""], - blockSizeBytes: 6532.01, + blockNumber: "", + blockHash: "", + parentHash: "", + blockTimestamp: 923.73, + blockType: "", + txCount: 5699.65, + transactions: [ + "", + ], + blockSizeBytes: 3540.47, }; ``` diff --git a/docs/models/components/gettransactionresponse.md b/docs/models/components/gettransactionresponse.md index 7c4f638..4b16dd6 100644 --- a/docs/models/components/gettransactionresponse.md +++ b/docs/models/components/gettransactionresponse.md @@ -6,64 +6,66 @@ import { GetTransactionResponse } from "@avalabs/avacloud-sdk/models/components"; let value: GetTransactionResponse = { - erc20Transfers: [], - erc721Transfers: [], - erc1155Transfers: [], - internalTransactions: [], - networkTokenDetails: { - networkToken: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - }, - currentPrice: { - currencyCode: "usd", - value: 42.42, - }, - historicalPrice: { - currencyCode: "usd", - value: 42.42, - }, + erc20Transfers: [], + erc721Transfers: [], + erc1155Transfers: [], + internalTransactions: [], + networkTokenDetails: { + networkToken: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", }, - nativeTransaction: { - blockNumber: "339", - blockTimestamp: 1648672486, - blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", - blockIndex: 0, - txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", - txStatus: "1", - txType: 1, - gasLimit: "51373", - gasUsed: "51373", - gasPrice: "470000000000", - nonce: "1", - from: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - to: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - method: { - callType: "CONTRACT_CALL", - methodHash: "0xa9059cbb", - methodName: "transfer(address,uint256)", - }, - value: "10000000000000000000", - input: "", - baseFeePerGas: "", + currentPrice: { + currencyCode: "usd", + value: 42.42, }, + historicalPrice: { + currencyCode: "usd", + value: 42.42, + }, + }, + nativeTransaction: { + blockNumber: "339", + blockTimestamp: 1648672486, + blockHash: + "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", + blockIndex: 0, + txHash: + "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", + txStatus: "1", + txType: 1, + gasLimit: "51373", + gasUsed: "51373", + gasPrice: "470000000000", + nonce: "1", + from: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + to: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + method: { + callType: "NATIVE_TRANSFER", + methodHash: "0xa9059cbb", + methodName: "transfer(address,uint256)", + }, + value: "10000000000000000000", + input: "", + baseFeePerGas: "", + }, }; ``` @@ -76,4 +78,5 @@ let value: GetTransactionResponse = { | `erc1155Transfers` | [components.Erc1155TransferDetails](../../models/components/erc1155transferdetails.md)[] | :heavy_minus_sign: | The list of ERC-1155 transfers. | | `internalTransactions` | [components.InternalTransactionDetails](../../models/components/internaltransactiondetails.md)[] | :heavy_minus_sign: | The list of internal transactions. Note that this list only includes CALL and CALLCODE internal transactions that had a non-zero value and CREATE/CREATE2 calls. Use a client provider to recieve a full debug trace of the transaction. | | `networkTokenDetails` | [components.NetworkTokenDetails](../../models/components/networktokendetails.md) | :heavy_check_mark: | N/A | -| `nativeTransaction` | [components.FullNativeTransactionDetails](../../models/components/fullnativetransactiondetails.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `nativeTransaction` | [components.FullNativeTransactionDetails](../../models/components/fullnativetransactiondetails.md) | :heavy_check_mark: | N/A | +| `teleporterMessageInfo` | [components.TeleporterMessageInfo](../../models/components/teleportermessageinfo.md) | :heavy_minus_sign: | Corresponding teleporter message info if available. | \ No newline at end of file diff --git a/docs/models/components/glacierapifeature.md b/docs/models/components/glacierapifeature.md index 2f0885a..6ed1e8f 100644 --- a/docs/models/components/glacierapifeature.md +++ b/docs/models/components/glacierapifeature.md @@ -11,5 +11,5 @@ let value: GlacierApiFeature = "nftIndexing"; ## Values ```typescript -"nftIndexing" | "webhooks" +"nftIndexing" | "webhooks" | "teleporter" ``` \ No newline at end of file diff --git a/docs/models/components/groupedby.md b/docs/models/components/groupedby.md index 8ec46df..b30e860 100644 --- a/docs/models/components/groupedby.md +++ b/docs/models/components/groupedby.md @@ -7,7 +7,7 @@ Column name used for data aggregation ```typescript import { GroupedBy } from "@avalabs/avacloud-sdk/models/components"; -let value: GroupedBy = "chainId"; +let value: GroupedBy = "requestPath"; ``` ## Values diff --git a/docs/models/components/groupvalue.md b/docs/models/components/groupvalue.md index df71dfc..45bca86 100644 --- a/docs/models/components/groupvalue.md +++ b/docs/models/components/groupvalue.md @@ -7,7 +7,7 @@ The value of the column used for data aggregation ```typescript import { GroupValue } from "@avalabs/avacloud-sdk/models/components"; -let value: GroupValue = 1399.72; +let value: GroupValue = 8480.09; ``` ## Supported Types diff --git a/docs/models/components/historicalreward.md b/docs/models/components/historicalreward.md index 1288dd5..bcec925 100644 --- a/docs/models/components/historicalreward.md +++ b/docs/models/components/historicalreward.md @@ -6,28 +6,30 @@ import { HistoricalReward } from "@avalabs/avacloud-sdk/models/components"; let value: HistoricalReward = { - addresses: ["avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg"], - txHash: "", - amountStaked: "", - nodeId: "", - startTimestamp: 9527.49, - endTimestamp: 6800.56, - rewardType: "DELEGATOR", - utxoId: "", - outputIndex: 4491.98, - reward: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - historicalPrice: { - currencyCode: "usd", - value: 42.42, - }, + addresses: [ + "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", + ], + txHash: "", + amountStaked: "", + nodeId: "", + startTimestamp: 8960.39, + endTimestamp: 5722.52, + rewardType: "DELEGATOR", + utxoId: "", + outputIndex: 2230.81, + reward: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + historicalPrice: { + currencyCode: "usd", + value: 42.42, }, - rewardTxHash: "", + }, + rewardTxHash: "", }; ``` diff --git a/docs/models/components/includechains.md b/docs/models/components/includechains.md index 1555a8a..6fd81f0 100644 --- a/docs/models/components/includechains.md +++ b/docs/models/components/includechains.md @@ -5,7 +5,7 @@ ```typescript import { IncludeChains } from "@avalabs/avacloud-sdk/models/components"; -let value: IncludeChains = "yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp"; +let value: IncludeChains = "p-chain"; ``` ## Values diff --git a/docs/models/components/internaltransaction.md b/docs/models/components/internaltransaction.md index c2dd6f5..4e33102 100644 --- a/docs/models/components/internaltransaction.md +++ b/docs/models/components/internaltransaction.md @@ -6,31 +6,32 @@ import { InternalTransaction } from "@avalabs/avacloud-sdk/models/components"; let value: InternalTransaction = { - blockNumber: "339", - blockTimestamp: 1648672486, - blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", - txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", - from: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - to: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - internalTxType: "CALL", - value: "10000000000000000000", - isReverted: false, - gasUsed: "", - gasLimit: "", + blockNumber: "339", + blockTimestamp: 1648672486, + blockHash: + "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", + txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", + from: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + to: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + internalTxType: "CALL", + value: "10000000000000000000", + isReverted: false, + gasUsed: "", + gasLimit: "", }; ``` diff --git a/docs/models/components/internaltransactiondetails.md b/docs/models/components/internaltransactiondetails.md index 4844b0e..57efb24 100644 --- a/docs/models/components/internaltransactiondetails.md +++ b/docs/models/components/internaltransactiondetails.md @@ -6,27 +6,27 @@ import { InternalTransactionDetails } from "@avalabs/avacloud-sdk/models/components"; let value: InternalTransactionDetails = { - from: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - to: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - internalTxType: "CALLCODE", - value: "10000000000000000000", - isReverted: false, - gasUsed: "", - gasLimit: "", + from: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + to: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + internalTxType: "CREATE2", + value: "10000000000000000000", + isReverted: false, + gasUsed: "", + gasLimit: "", }; ``` diff --git a/docs/models/components/internaltransactionopcall.md b/docs/models/components/internaltransactionopcall.md index 114d820..cac6ff5 100644 --- a/docs/models/components/internaltransactionopcall.md +++ b/docs/models/components/internaltransactionopcall.md @@ -5,7 +5,7 @@ ```typescript import { InternalTransactionOpCall } from "@avalabs/avacloud-sdk/models/components"; -let value: InternalTransactionOpCall = "STATICCALL"; +let value: InternalTransactionOpCall = "CREATE2"; ``` ## Values diff --git a/docs/models/components/latestbalanceparams.md b/docs/models/components/latestbalanceparams.md index eb9eab6..6fb87e9 100644 --- a/docs/models/components/latestbalanceparams.md +++ b/docs/models/components/latestbalanceparams.md @@ -6,9 +6,9 @@ import { LatestBalanceParams } from "@avalabs/avacloud-sdk/models/components"; let value: LatestBalanceParams = { - minBalance: "", - evmChainId: "", - tokenType: "ERC20", + minBalance: "", + evmChainId: "", + tokenType: "ERC20", }; ``` diff --git a/docs/models/components/latestbalancequerydto.md b/docs/models/components/latestbalancequerydto.md index 8690320..2b7c2f7 100644 --- a/docs/models/components/latestbalancequerydto.md +++ b/docs/models/components/latestbalancequerydto.md @@ -6,13 +6,13 @@ import { LatestBalanceQueryDto } from "@avalabs/avacloud-sdk/models/components"; let value: LatestBalanceQueryDto = { - id: "", - type: "LatestBalance", - params: { - minBalance: "", - evmChainId: "", - tokenType: "NATIVE", - }, + id: "", + type: "LatestBalance", + params: { + minBalance: "", + evmChainId: "", + tokenType: "NATIVE", + }, }; ``` diff --git a/docs/models/components/lateststarsarenabalanceparams.md b/docs/models/components/lateststarsarenabalanceparams.md index dde6ab7..9392a8f 100644 --- a/docs/models/components/lateststarsarenabalanceparams.md +++ b/docs/models/components/lateststarsarenabalanceparams.md @@ -6,8 +6,8 @@ import { LatestStarsArenaBalanceParams } from "@avalabs/avacloud-sdk/models/components"; let value: LatestStarsArenaBalanceParams = { - minBalance: "", - subjectAddress: "", + minBalance: "", + subjectAddress: "", }; ``` diff --git a/docs/models/components/lateststarsarenabalancequerydto.md b/docs/models/components/lateststarsarenabalancequerydto.md index 89acf5a..b32cea5 100644 --- a/docs/models/components/lateststarsarenabalancequerydto.md +++ b/docs/models/components/lateststarsarenabalancequerydto.md @@ -6,12 +6,12 @@ import { LatestStarsArenaBalanceQueryDto } from "@avalabs/avacloud-sdk/models/components"; let value: LatestStarsArenaBalanceQueryDto = { - id: "", - type: "LatestBalanceStarsArena", - params: { - minBalance: "", - subjectAddress: "", - }, + id: "", + type: "LatestBalanceStarsArena", + params: { + minBalance: "", + subjectAddress: "", + }, }; ``` diff --git a/docs/models/components/listblockchainsresponse.md b/docs/models/components/listblockchainsresponse.md index 3877729..1a4ecac 100644 --- a/docs/models/components/listblockchainsresponse.md +++ b/docs/models/components/listblockchainsresponse.md @@ -6,16 +6,16 @@ import { ListBlockchainsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListBlockchainsResponse = { - blockchains: [ - { - createBlockTimestamp: 6818.2, - createBlockNumber: "", - blockchainId: "", - vmId: "", - subnetId: "", - blockchainName: "", - }, - ], + blockchains: [ + { + createBlockTimestamp: 4499.5, + createBlockNumber: "", + blockchainId: "", + vmId: "", + subnetId: "", + blockchainName: "", + }, + ], }; ``` diff --git a/docs/models/components/listcchainatomicbalancesresponse.md b/docs/models/components/listcchainatomicbalancesresponse.md index b98a11b..33b496d 100644 --- a/docs/models/components/listcchainatomicbalancesresponse.md +++ b/docs/models/components/listcchainatomicbalancesresponse.md @@ -6,36 +6,36 @@ import { ListCChainAtomicBalancesResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListCChainAtomicBalancesResponse = { - balances: { - atomicMemoryUnlocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - utxoCount: 1, - sharedWithChainId: "", - }, - ], - atomicMemoryLocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - utxoCount: 1, - sharedWithChainId: "", - }, - ], - }, - chainInfo: { - chainName: "p-chain", - network: "fuji", - }, + balances: { + atomicMemoryUnlocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + sharedWithChainId: "", + }, + ], + atomicMemoryLocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + sharedWithChainId: "", + }, + ], + }, + chainInfo: { + chainName: "x-chain", + network: "fuji", + }, }; ``` diff --git a/docs/models/components/listcchainatomictransactionsresponse.md b/docs/models/components/listcchainatomictransactionsresponse.md index 8c3e119..f46ad42 100644 --- a/docs/models/components/listcchainatomictransactionsresponse.md +++ b/docs/models/components/listcchainatomictransactionsresponse.md @@ -6,11 +6,11 @@ import { ListCChainAtomicTransactionsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListCChainAtomicTransactionsResponse = { - transactions: [], - chainInfo: { - chainName: "c-chain", - network: "fuji", - }, + transactions: [], + chainInfo: { + chainName: "p-chain", + network: "fuji", + }, }; ``` diff --git a/docs/models/components/listcchainatomictransactionsresponsetransactions.md b/docs/models/components/listcchainatomictransactionsresponsetransactions.md index 7ec93f1..5cc1c83 100644 --- a/docs/models/components/listcchainatomictransactionsresponsetransactions.md +++ b/docs/models/components/listcchainatomictransactionsresponsetransactions.md @@ -6,85 +6,88 @@ import { ListCChainAtomicTransactionsResponseTransactions } from "@avalabs/avacloud-sdk/models/components"; let value: ListCChainAtomicTransactionsResponseTransactions = { - txHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", - blockHeight: 1005, - blockHash: "0x57a5cb7704561d1d59bd563b6421021b7563960c05ba3ae0e36fc36917c742ee", - timestamp: 1600762738, - memo: "0x546865204176616c616e6368652050726f6a656374", - amountUnlocked: [ + txHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + blockHeight: 1005, + blockHash: + "0x57a5cb7704561d1d59bd563b6421021b7563960c05ba3ae0e36fc36917c742ee", + timestamp: 1600762738, + memo: "0x546865204176616c616e6368652050726f6a656374", + amountUnlocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + ], + amountCreated: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + }, + ], + sourceChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + destinationChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + txType: "ExportTx", + evmInputs: [ + { + fromAddress: "0xD0f2898e49d941D6d479B381d3C8F0bd8d983b4c", + asset: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + }, + credentials: [ { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", + signature: + "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", + publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", }, - ], - amountCreated: [ + ], + }, + ], + emittedUtxos: [ + { + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", + ], + asset: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + consumedOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + consumingTxHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + createdOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + utxoId: "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC", + consumingTxTimestamp: 1599696000, + creationTxHash: "FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z", + credentials: [ { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", + signature: + "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", + publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", }, - ], - sourceChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - destinationChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - txType: "ExportTx", - evmInputs: [ - { - fromAddress: "0xD0f2898e49d941D6d479B381d3C8F0bd8d983b4c", - asset: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - }, - credentials: [ - { - signature: - "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", - publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", - }, - ], - }, - ], - emittedUtxos: [ - { - addresses: ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], - asset: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - 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", - }, - ], + ], + locktime: 0, + outputIndex: "38", + threshold: 1, + timestamp: 1599696000, + utxoType: "mint", + }, + ], }; ``` diff --git a/docs/models/components/listcollectiblebalancesresponse.md b/docs/models/components/listcollectiblebalancesresponse.md index ab46f63..6e939ab 100644 --- a/docs/models/components/listcollectiblebalancesresponse.md +++ b/docs/models/components/listcollectiblebalancesresponse.md @@ -6,7 +6,7 @@ import { ListCollectibleBalancesResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListCollectibleBalancesResponse = { - collectibleBalances: [], + collectibleBalances: [], }; ``` diff --git a/docs/models/components/listcontractsresponse.md b/docs/models/components/listcontractsresponse.md index 4c4cc7b..d79b7ec 100644 --- a/docs/models/components/listcontractsresponse.md +++ b/docs/models/components/listcontractsresponse.md @@ -6,7 +6,7 @@ import { ListContractsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListContractsResponse = { - contracts: [], + contracts: [], }; ``` diff --git a/docs/models/components/listdelegatordetailsresponse.md b/docs/models/components/listdelegatordetailsresponse.md index 4d69fc9..8c31c71 100644 --- a/docs/models/components/listdelegatordetailsresponse.md +++ b/docs/models/components/listdelegatordetailsresponse.md @@ -6,20 +6,22 @@ import { ListDelegatorDetailsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListDelegatorDetailsResponse = { - delegators: [ - { - txHash: "", - nodeId: "", - rewardAddresses: [""], - amountDelegated: "", - delegationFee: "", - startTimestamp: 1103.75, - endTimestamp: 6747.52, - estimatedGrossReward: "", - estimatedNetReward: "", - delegationStatus: "pending", - }, - ], + delegators: [ + { + txHash: "", + nodeId: "", + rewardAddresses: [ + "", + ], + amountDelegated: "", + delegationFee: "", + startTimestamp: 4746.97, + endTimestamp: 2444.25, + estimatedGrossReward: "", + estimatedNetReward: "", + delegationStatus: "pending", + }, + ], }; ``` diff --git a/docs/models/components/listerc1155balancesresponse.md b/docs/models/components/listerc1155balancesresponse.md index ba9b86d..e608bfc 100644 --- a/docs/models/components/listerc1155balancesresponse.md +++ b/docs/models/components/listerc1155balancesresponse.md @@ -6,19 +6,19 @@ import { ListErc1155BalancesResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListErc1155BalancesResponse = { - erc1155TokenBalances: [ - { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - ercType: "ERC-1155", - tokenId: "", - tokenUri: "", - metadata: { - indexStatus: "UNINDEXED", - }, - chainId: "43114", - balance: "2000000000000000000", - }, - ], + erc1155TokenBalances: [ + { + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + ercType: "ERC-1155", + tokenId: "", + tokenUri: "", + metadata: { + indexStatus: "INVALID_TOKEN_URI", + }, + chainId: "43114", + balance: "2000000000000000000", + }, + ], }; ``` diff --git a/docs/models/components/listerc1155transactionsresponse.md b/docs/models/components/listerc1155transactionsresponse.md index 895e5e6..ac596c5 100644 --- a/docs/models/components/listerc1155transactionsresponse.md +++ b/docs/models/components/listerc1155transactionsresponse.md @@ -6,7 +6,7 @@ import { ListErc1155TransactionsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListErc1155TransactionsResponse = { - transactions: [], + transactions: [], }; ``` diff --git a/docs/models/components/listerc20balancesresponse.md b/docs/models/components/listerc20balancesresponse.md index 6cbdb51..7793a2d 100644 --- a/docs/models/components/listerc20balancesresponse.md +++ b/docs/models/components/listerc20balancesresponse.md @@ -6,7 +6,7 @@ import { ListErc20BalancesResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListErc20BalancesResponse = { - erc20TokenBalances: [], + erc20TokenBalances: [], }; ``` diff --git a/docs/models/components/listerc20transactionsresponse.md b/docs/models/components/listerc20transactionsresponse.md index 31650b3..76d93a9 100644 --- a/docs/models/components/listerc20transactionsresponse.md +++ b/docs/models/components/listerc20transactionsresponse.md @@ -6,7 +6,7 @@ import { ListErc20TransactionsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListErc20TransactionsResponse = { - transactions: [], + transactions: [], }; ``` diff --git a/docs/models/components/listerc721balancesresponse.md b/docs/models/components/listerc721balancesresponse.md index 6dad2ee..5b8f61b 100644 --- a/docs/models/components/listerc721balancesresponse.md +++ b/docs/models/components/listerc721balancesresponse.md @@ -6,21 +6,21 @@ import { ListErc721BalancesResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListErc721BalancesResponse = { - erc721TokenBalances: [ - { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - ercType: "ERC-721", - tokenId: "", - tokenUri: "", - metadata: { - indexStatus: "UNREACHABLE_TOKEN_URI", - }, - ownerAddress: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - chainId: "43114", - }, - ], + erc721TokenBalances: [ + { + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + name: "Wrapped AVAX", + symbol: "WAVAX", + ercType: "ERC-721", + tokenId: "", + tokenUri: "", + metadata: { + indexStatus: "INVALID_TOKEN_URI", + }, + ownerAddress: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + chainId: "43114", + }, + ], }; ``` diff --git a/docs/models/components/listerc721transactionsresponse.md b/docs/models/components/listerc721transactionsresponse.md index 8851528..e87797a 100644 --- a/docs/models/components/listerc721transactionsresponse.md +++ b/docs/models/components/listerc721transactionsresponse.md @@ -6,7 +6,7 @@ import { ListErc721TransactionsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListErc721TransactionsResponse = { - transactions: [], + transactions: [], }; ``` diff --git a/docs/models/components/listevmblocksresponse.md b/docs/models/components/listevmblocksresponse.md index e00c631..9a268ff 100644 --- a/docs/models/components/listevmblocksresponse.md +++ b/docs/models/components/listevmblocksresponse.md @@ -6,21 +6,22 @@ import { ListEvmBlocksResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListEvmBlocksResponse = { - blocks: [ - { - blockNumber: "339", - blockTimestamp: 1648672486, - blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", - txCount: 852.95, - baseFee: "", - gasUsed: "", - gasLimit: "", - gasCost: "", - parentHash: "", - feesSpent: "", - cumulativeTransactions: "", - }, - ], + blocks: [ + { + blockNumber: "339", + blockTimestamp: 1648672486, + blockHash: + "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", + txCount: 4521.09, + baseFee: "", + gasUsed: "", + gasLimit: "", + gasCost: "", + parentHash: "", + feesSpent: "", + cumulativeTransactions: "", + }, + ], }; ``` diff --git a/docs/models/components/listhistoricalrewardsresponse.md b/docs/models/components/listhistoricalrewardsresponse.md index 275dc48..148c720 100644 --- a/docs/models/components/listhistoricalrewardsresponse.md +++ b/docs/models/components/listhistoricalrewardsresponse.md @@ -6,32 +6,34 @@ import { ListHistoricalRewardsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListHistoricalRewardsResponse = { - historicalRewards: [ - { - addresses: ["avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg"], - txHash: "", - amountStaked: "", - nodeId: "", - startTimestamp: 8960.39, - endTimestamp: 5722.52, - rewardType: "DELEGATOR", - utxoId: "", - outputIndex: 2230.81, - reward: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - historicalPrice: { - currencyCode: "usd", - value: 42.42, - }, - }, - rewardTxHash: "", + historicalRewards: [ + { + addresses: [ + "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", + ], + txHash: "", + amountStaked: "", + nodeId: "", + startTimestamp: 2487.53, + endTimestamp: 7561.07, + rewardType: "DELEGATOR", + utxoId: "", + outputIndex: 3960.98, + reward: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + historicalPrice: { + currencyCode: "usd", + value: 42.42, }, - ], + }, + rewardTxHash: "", + }, + ], }; ``` diff --git a/docs/models/components/listinternaltransactionsresponse.md b/docs/models/components/listinternaltransactionsresponse.md index fa4a596..69d4c53 100644 --- a/docs/models/components/listinternaltransactionsresponse.md +++ b/docs/models/components/listinternaltransactionsresponse.md @@ -6,7 +6,7 @@ import { ListInternalTransactionsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListInternalTransactionsResponse = { - transactions: [], + transactions: [], }; ``` diff --git a/docs/models/components/listnativetransactionsresponse.md b/docs/models/components/listnativetransactionsresponse.md index 9d4c410..a3d6d23 100644 --- a/docs/models/components/listnativetransactionsresponse.md +++ b/docs/models/components/listnativetransactionsresponse.md @@ -6,7 +6,7 @@ import { ListNativeTransactionsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListNativeTransactionsResponse = { - transactions: [], + transactions: [], }; ``` diff --git a/docs/models/components/listnfttokens.md b/docs/models/components/listnfttokens.md index 6b7dfcb..7f110fb 100644 --- a/docs/models/components/listnfttokens.md +++ b/docs/models/components/listnfttokens.md @@ -6,7 +6,7 @@ import { ListNftTokens } from "@avalabs/avacloud-sdk/models/components"; let value: ListNftTokens = { - tokens: [], + tokens: [], }; ``` diff --git a/docs/models/components/listpchainbalancesresponse.md b/docs/models/components/listpchainbalancesresponse.md index d4b78b6..5669522 100644 --- a/docs/models/components/listpchainbalancesresponse.md +++ b/docs/models/components/listpchainbalancesresponse.md @@ -6,104 +6,104 @@ import { ListPChainBalancesResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListPChainBalancesResponse = { - balances: { - unlockedUnstaked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - }, - ], - unlockedStaked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - utxoCount: 1, - }, - ], - lockedPlatform: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - }, - ], - lockedStakeable: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - }, - ], - lockedStaked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - }, - ], - pendingStaked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - }, - ], - atomicMemoryUnlocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - sharedWithChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - status: "", - }, - ], - atomicMemoryLocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - sharedWithChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - status: "", - }, - ], - }, - chainInfo: { - chainName: "x-chain", - network: "fuji", - }, + balances: { + unlockedUnstaked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + }, + ], + unlockedStaked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + }, + ], + lockedPlatform: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + }, + ], + lockedStakeable: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + }, + ], + lockedStaked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + }, + ], + pendingStaked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + }, + ], + atomicMemoryUnlocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + sharedWithChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + status: "", + }, + ], + atomicMemoryLocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + sharedWithChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + status: "", + }, + ], + }, + chainInfo: { + chainName: "c-chain", + network: "fuji", + }, }; ``` diff --git a/docs/models/components/listpchaintransactionsresponse.md b/docs/models/components/listpchaintransactionsresponse.md index 91bb250..bcf8e85 100644 --- a/docs/models/components/listpchaintransactionsresponse.md +++ b/docs/models/components/listpchaintransactionsresponse.md @@ -6,11 +6,11 @@ import { ListPChainTransactionsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListPChainTransactionsResponse = { - transactions: [], - chainInfo: { - chainName: "p-chain", - network: "mainnet", - }, + transactions: [], + chainInfo: { + chainName: "p-chain", + network: "fuji", + }, }; ``` diff --git a/docs/models/components/listpchainutxosresponse.md b/docs/models/components/listpchainutxosresponse.md index 12d3e34..e220bb5 100644 --- a/docs/models/components/listpchainutxosresponse.md +++ b/docs/models/components/listpchainutxosresponse.md @@ -6,34 +6,36 @@ import { ListPChainUtxosResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListPChainUtxosResponse = { - utxos: [ - { - addresses: ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], - asset: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - }, - consumedOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - consumingTxHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", - createdOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - utxoId: "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC", - amount: "116.20", - assetId: "", - blockNumber: "", - blockTimestamp: 2974.37, - outputIndex: 7670.24, - txHash: "", - utxoType: "TRANSFER", - }, - ], - chainInfo: { - chainName: "x-chain", - network: "mainnet", + utxos: [ + { + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", + ], + asset: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + }, + consumedOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + consumingTxHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + createdOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + utxoId: "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC", + amount: "447.12", + assetId: "", + blockNumber: "", + blockTimestamp: 4491.98, + outputIndex: 8464.09, + txHash: "", + utxoType: "TRANSFER", }, + ], + chainInfo: { + chainName: "c-chain", + network: "mainnet", + }, }; ``` diff --git a/docs/models/components/listpendingrewardsresponse.md b/docs/models/components/listpendingrewardsresponse.md index 9d7d7cc..ea83a1e 100644 --- a/docs/models/components/listpendingrewardsresponse.md +++ b/docs/models/components/listpendingrewardsresponse.md @@ -6,26 +6,28 @@ import { ListPendingRewardsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListPendingRewardsResponse = { - pendingRewards: [ - { - addresses: ["avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg"], - txHash: "", - amountStaked: "", - nodeId: "", - startTimestamp: 7037.37, - endTimestamp: 7351.94, - rewardType: "VALIDATOR", - progress: 9621.89, - estimatedReward: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - }, - }, - ], + pendingRewards: [ + { + addresses: [ + "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", + ], + txHash: "", + amountStaked: "", + nodeId: "", + startTimestamp: 46.95, + endTimestamp: 1464.41, + rewardType: "VALIDATOR_FEE", + progress: 5696.18, + estimatedReward: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + }, + ], }; ``` diff --git a/docs/models/components/listprimarynetworkblocksresponse.md b/docs/models/components/listprimarynetworkblocksresponse.md index 8b2d772..e28e417 100644 --- a/docs/models/components/listprimarynetworkblocksresponse.md +++ b/docs/models/components/listprimarynetworkblocksresponse.md @@ -6,22 +6,24 @@ import { ListPrimaryNetworkBlocksResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListPrimaryNetworkBlocksResponse = { - blocks: [ - { - blockNumber: "", - blockHash: "", - parentHash: "", - blockTimestamp: 9689.62, - blockType: "", - txCount: 6521.03, - transactions: [""], - blockSizeBytes: 3209.97, - }, - ], - chainInfo: { - chainName: "x-chain", - network: "mainnet", + blocks: [ + { + blockNumber: "", + blockHash: "", + parentHash: "", + blockTimestamp: 5908.73, + blockType: "", + txCount: 5518.16, + transactions: [ + "", + ], + blockSizeBytes: 5743.25, }, + ], + chainInfo: { + chainName: "p-chain", + network: "fuji", + }, }; ``` diff --git a/docs/models/components/listsubnetsresponse.md b/docs/models/components/listsubnetsresponse.md index 3aa1b7f..77db72d 100644 --- a/docs/models/components/listsubnetsresponse.md +++ b/docs/models/components/listsubnetsresponse.md @@ -6,26 +6,30 @@ import { ListSubnetsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListSubnetsResponse = { - subnets: [ + subnets: [ + { + createBlockTimestamp: 6130.64, + createBlockIndex: "", + subnetId: "", + ownerAddresses: [ + "", + ], + threshold: 4370.32, + locktime: 9023.49, + subnetOwnershipInfo: { + locktime: 0, + threshold: 1, + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", + ], + }, + blockchains: [ { - createBlockTimestamp: 3595.08, - createBlockIndex: "", - subnetId: "", - ownerAddresses: [""], - threshold: 6130.64, - locktime: 4370.32, - subnetOwnershipInfo: { - locktime: 0, - threshold: 1, - addresses: ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], - }, - blockchains: [ - { - blockchainId: "", - }, - ], + blockchainId: "", }, - ], + ], + }, + ], }; ``` diff --git a/docs/models/components/listteleportermessagesresponse.md b/docs/models/components/listteleportermessagesresponse.md index b128f78..a9bcb28 100644 --- a/docs/models/components/listteleportermessagesresponse.md +++ b/docs/models/components/listteleportermessagesresponse.md @@ -6,7 +6,7 @@ import { ListTeleporterMessagesResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListTeleporterMessagesResponse = { - messages: [], + messages: [], }; ``` diff --git a/docs/models/components/listtransactiondetailsresponse.md b/docs/models/components/listtransactiondetailsresponse.md index 230f904..3c26ec5 100644 --- a/docs/models/components/listtransactiondetailsresponse.md +++ b/docs/models/components/listtransactiondetailsresponse.md @@ -6,7 +6,7 @@ import { ListTransactionDetailsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListTransactionDetailsResponse = { - transactions: [], + transactions: [], }; ``` diff --git a/docs/models/components/listtransfersresponse.md b/docs/models/components/listtransfersresponse.md index 3c6f183..a328413 100644 --- a/docs/models/components/listtransfersresponse.md +++ b/docs/models/components/listtransfersresponse.md @@ -6,7 +6,7 @@ import { ListTransfersResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListTransfersResponse = { - transfers: [], + transfers: [], }; ``` diff --git a/docs/models/components/listutxosresponse.md b/docs/models/components/listutxosresponse.md index 53e2979..0faf7fc 100644 --- a/docs/models/components/listutxosresponse.md +++ b/docs/models/components/listutxosresponse.md @@ -6,41 +6,43 @@ import { ListUtxosResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListUtxosResponse = { - utxos: [ + utxos: [ + { + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", + ], + asset: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + consumedOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + consumingTxHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + createdOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + utxoId: "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC", + consumingTxTimestamp: 1599696000, + creationTxHash: "FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z", + credentials: [ { - 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", + signature: + "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", + publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", }, - ], - chainInfo: { - chainName: "c-chain", - network: "mainnet", + ], + locktime: 0, + outputIndex: "38", + threshold: 1, + timestamp: 1599696000, + utxoType: "mint", }, + ], + chainInfo: { + chainName: "c-chain", + network: "fuji", + }, }; ``` diff --git a/docs/models/components/listvalidatordetailsresponse.md b/docs/models/components/listvalidatordetailsresponse.md index 4f9f918..1b680a7 100644 --- a/docs/models/components/listvalidatordetailsresponse.md +++ b/docs/models/components/listvalidatordetailsresponse.md @@ -6,7 +6,7 @@ import { ListValidatorDetailsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListValidatorDetailsResponse = { - validators: [], + validators: [], }; ``` diff --git a/docs/models/components/listwebhookaddressesresponse.md b/docs/models/components/listwebhookaddressesresponse.md index cc09efb..b1b3806 100644 --- a/docs/models/components/listwebhookaddressesresponse.md +++ b/docs/models/components/listwebhookaddressesresponse.md @@ -6,8 +6,10 @@ import { ListWebhookAddressesResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListWebhookAddressesResponse = { - addresses: [""], - totalAddresses: 5542.42, + addresses: [ + "", + ], + totalAddresses: 5899.1, }; ``` diff --git a/docs/models/components/listwebhooksresponse.md b/docs/models/components/listwebhooksresponse.md index 8536309..668119a 100644 --- a/docs/models/components/listwebhooksresponse.md +++ b/docs/models/components/listwebhooksresponse.md @@ -6,24 +6,26 @@ import { ListWebhooksResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListWebhooksResponse = { - webhooks: [ - { - id: "", - eventType: "address_activity", - metadata: { - addresses: ["0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"], - eventSignatures: [ - "0x61cbb2a3dee0b6064c2e681aadd61677fb4ef319f0b547508d495626f5a62f64", - ], - }, - url: "https://ornery-antechamber.net", - chainId: "", - status: "active", - createdAt: 5000.26, - name: "", - description: "Pre-emptive 6th generation leverage", - }, - ], + webhooks: [ + { + id: "", + eventType: "address_activity", + metadata: { + addresses: [ + "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + ], + eventSignatures: [ + "0x61cbb2a3dee0b6064c2e681aadd61677fb4ef319f0b547508d495626f5a62f64", + ], + }, + url: "https://grandiose-urge.org", + chainId: "", + status: "inactive", + createdAt: 7044.15, + name: "", + description: "Persistent 4th generation productivity", + }, + ], }; ``` diff --git a/docs/models/components/listxchainbalancesresponse.md b/docs/models/components/listxchainbalancesresponse.md index 0c44b3d..300d4fa 100644 --- a/docs/models/components/listxchainbalancesresponse.md +++ b/docs/models/components/listxchainbalancesresponse.md @@ -6,58 +6,58 @@ import { ListXChainBalancesResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListXChainBalancesResponse = { - balances: { - locked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - utxoCount: 1, - }, - ], - unlocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - }, - ], - atomicMemoryUnlocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - sharedWithChainId: "", - }, - ], - atomicMemoryLocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - utxoCount: 1, - sharedWithChainId: "", - }, - ], - }, - chainInfo: { - chainName: "p-chain", - network: "mainnet", - }, + balances: { + locked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + }, + ], + unlocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + }, + ], + atomicMemoryUnlocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + sharedWithChainId: "", + }, + ], + atomicMemoryLocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + sharedWithChainId: "", + }, + ], + }, + chainInfo: { + chainName: "x-chain", + network: "mainnet", + }, }; ``` diff --git a/docs/models/components/listxchaintransactionsresponse.md b/docs/models/components/listxchaintransactionsresponse.md index 03e9c47..aa7f14b 100644 --- a/docs/models/components/listxchaintransactionsresponse.md +++ b/docs/models/components/listxchaintransactionsresponse.md @@ -6,11 +6,11 @@ import { ListXChainTransactionsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListXChainTransactionsResponse = { - transactions: [], - chainInfo: { - chainName: "x-chain", - network: "mainnet", - }, + transactions: [], + chainInfo: { + chainName: "p-chain", + network: "mainnet", + }, }; ``` diff --git a/docs/models/components/listxchainverticesresponse.md b/docs/models/components/listxchainverticesresponse.md index b6dc6eb..8f1d972 100644 --- a/docs/models/components/listxchainverticesresponse.md +++ b/docs/models/components/listxchainverticesresponse.md @@ -6,22 +6,26 @@ import { ListXChainVerticesResponse } from "@avalabs/avacloud-sdk/models/components"; let value: ListXChainVerticesResponse = { - vertices: [ - { - vertexHash: "", - parentHashes: [""], - vertexHeight: 972.6, - vertexIndex: 4358.65, - vertexTimestamp: 9840.43, - txCount: 8919.24, - transactions: [""], - vertexSizeBytes: 2603.41, - }, - ], - chainInfo: { - chainName: "c-chain", - network: "fuji", + vertices: [ + { + vertexHash: "", + parentHashes: [ + "", + ], + vertexHeight: 4314.18, + vertexIndex: 2212.62, + vertexTimestamp: 8965.47, + txCount: 1412.64, + transactions: [ + "", + ], + vertexSizeBytes: 3675.62, }, + ], + chainInfo: { + chainName: "p-chain", + network: "mainnet", + }, }; ``` diff --git a/docs/models/components/logsformat.md b/docs/models/components/logsformat.md index 426b85a..56195a1 100644 --- a/docs/models/components/logsformat.md +++ b/docs/models/components/logsformat.md @@ -6,22 +6,22 @@ import { LogsFormat } from "@avalabs/avacloud-sdk/models/components"; let value: LogsFormat = { - orgId: "", - logId: "", - eventTimestamp: 7299.91, - apiKeyId: "", - apiKeyAlias: "", - hostRegion: "", - requestType: "rpc", - requestPath: "", - apiCreditsConsumed: 1716.29, - requestDurationMsecs: 3394.04, - responseCode: 5210.37, - metadata: { - ipAddress: "125.13.86.51", - host: "definite-airspace.biz", - userAgent: "", - }, + orgId: "", + logId: "", + eventTimestamp: 2307.42, + apiKeyId: "", + apiKeyAlias: "", + hostRegion: "", + requestType: "data", + requestPath: "", + apiCreditsConsumed: 7649.12, + requestDurationMsecs: 3599.78, + responseCode: 9441.24, + metadata: { + ipAddress: "186.191.43.86", + host: "mealy-kilometer.com", + userAgent: "", + }, }; ``` diff --git a/docs/models/components/logsformatmetadata.md b/docs/models/components/logsformatmetadata.md index 2592096..ba4404b 100644 --- a/docs/models/components/logsformatmetadata.md +++ b/docs/models/components/logsformatmetadata.md @@ -6,9 +6,9 @@ import { LogsFormatMetadata } from "@avalabs/avacloud-sdk/models/components"; let value: LogsFormatMetadata = { - ipAddress: "203.118.57.223", - host: "grandiose-urge.org", - userAgent: "", + ipAddress: "86.51.45.4", + host: "deadly-shanty.info", + userAgent: "", }; ``` diff --git a/docs/models/components/logsresponsedto.md b/docs/models/components/logsresponsedto.md index 974b1b9..c0efaa6 100644 --- a/docs/models/components/logsresponsedto.md +++ b/docs/models/components/logsresponsedto.md @@ -6,27 +6,27 @@ import { LogsResponseDTO } from "@avalabs/avacloud-sdk/models/components"; let value: LogsResponseDTO = { - orgId: "", - logs: [ - { - orgId: "", - logId: "", - eventTimestamp: 7220.56, - apiKeyId: "", - apiKeyAlias: "", - hostRegion: "", - requestType: "data", - requestPath: "", - apiCreditsConsumed: 8663.83, - requestDurationMsecs: 3654.96, - responseCode: 9755.22, - metadata: { - ipAddress: "4.219.59.2", - host: "slushy-ford.org", - userAgent: "", - }, - }, - ], + orgId: "", + logs: [ + { + orgId: "", + logId: "", + eventTimestamp: 9825.75, + apiKeyId: "", + apiKeyAlias: "", + hostRegion: "", + requestType: "rpc", + requestPath: "", + apiCreditsConsumed: 3732.91, + requestDurationMsecs: 4535.43, + responseCode: 4200.75, + metadata: { + ipAddress: "184.12.221.93", + host: "wise-airbag.org", + userAgent: "", + }, + }, + ], }; ``` diff --git a/docs/models/components/lookingglassresponse.md b/docs/models/components/lookingglassresponse.md index 7552d43..f7bbdb6 100644 --- a/docs/models/components/lookingglassresponse.md +++ b/docs/models/components/lookingglassresponse.md @@ -6,10 +6,10 @@ import { LookingGlassResponse } from "@avalabs/avacloud-sdk/models/components"; let value: LookingGlassResponse = { - addresses: { - address: "0x1234567890abcdef1234567890abcdef123456789", - sortKey: "123", - }, + addresses: { + address: "0x1234567890abcdef1234567890abcdef123456789", + sortKey: "123", + }, }; ``` diff --git a/docs/models/components/messages.md b/docs/models/components/messages.md index 7b4d5ff..2644645 100644 --- a/docs/models/components/messages.md +++ b/docs/models/components/messages.md @@ -6,50 +6,43 @@ import { Messages } from "@avalabs/avacloud-sdk/models/components"; let value: Messages = { - messageId: "", - teleporterContractAddress: "", - sourceBlockchainId: "", - destinationBlockchainId: "", - sourceEvmChainId: "", - destinationEvmChainId: "", - messageNonce: "", - from: "", - to: "", - messageExecuted: false, - receipts: [ - { - receivedMessageNonce: "", - relayerRewardAddress: "", - }, - ], - receiptDelivered: false, - rewardDetails: { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - ercType: "ERC-20", - price: { - currencyCode: "usd", - value: 42.42, - }, - value: "", + messageId: "", + teleporterContractAddress: "", + sourceBlockchainId: "", + destinationBlockchainId: "", + sourceEvmChainId: "", + destinationEvmChainId: "", + messageNonce: "", + from: "", + to: "", + messageExecuted: false, + receipts: [ + { + receivedMessageNonce: "", + relayerRewardAddress: "", }, - sourceTransaction: { - txHash: "", - timestamp: 5695.74, - gasSpent: "", + ], + receiptDelivered: false, + rewardDetails: { + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + ercType: "ERC-20", + price: { + currencyCode: "usd", + value: 42.42, }, - destinationTransaction: { - txHash: "", - timestamp: 7395.51, - gasSpent: "", - rewardRedeemer: "", - delivererAddress: "", - }, - status: "delivered", + value: "", + }, + sourceTransaction: { + txHash: "", + timestamp: 2098.43, + gasSpent: "", + }, + status: "pending", }; ``` diff --git a/docs/models/components/method.md b/docs/models/components/method.md index 05d8f66..be4ecf6 100644 --- a/docs/models/components/method.md +++ b/docs/models/components/method.md @@ -6,9 +6,9 @@ import { Method } from "@avalabs/avacloud-sdk/models/components"; let value: Method = { - callType: "NATIVE_TRANSFER", - methodHash: "0xa9059cbb", - methodName: "transfer(address,uint256)", + callType: "NATIVE_TRANSFER", + methodHash: "0xa9059cbb", + methodName: "transfer(address,uint256)", }; ``` diff --git a/docs/models/components/metric.md b/docs/models/components/metric.md index 5588b39..352697b 100644 --- a/docs/models/components/metric.md +++ b/docs/models/components/metric.md @@ -6,19 +6,19 @@ import { Metric } from "@avalabs/avacloud-sdk/models/components"; let value: Metric = { - timestamp: 1624.93, - values: [ - { - groupedBy: "apiKeyId", - totalRequests: 6155.6, - requestsPerSecond: 1668.47, - successRatePercent: 1238.2, - medianResponseTimeMsecs: 7790.51, - invalidRequests: 8480.09, - apiCreditsUsed: 8649.34, - apiCreditsWasted: 8073.19, - }, - ], + timestamp: 8411.4, + values: [ + { + groupedBy: "requestPath", + totalRequests: 9046.48, + requestsPerSecond: 8681.26, + successRatePercent: 375.59, + medianResponseTimeMsecs: 1624.93, + invalidRequests: 5083.15, + apiCreditsUsed: 6155.6, + apiCreditsWasted: 1668.47, + }, + ], }; ``` diff --git a/docs/models/components/metricsapiresponse.md b/docs/models/components/metricsapiresponse.md index 7faea2d..3a751c6 100644 --- a/docs/models/components/metricsapiresponse.md +++ b/docs/models/components/metricsapiresponse.md @@ -6,12 +6,12 @@ import { MetricsApiResponse } from "@avalabs/avacloud-sdk/models/components"; let value: MetricsApiResponse = { - results: [ - { - value: 5488.14, - timestamp: 5928.45, - }, - ], + results: [ + { + value: 5488.14, + timestamp: 5928.45, + }, + ], }; ``` diff --git a/docs/models/components/metricslistchainsresponse.md b/docs/models/components/metricslistchainsresponse.md index abcb67b..c4bde83 100644 --- a/docs/models/components/metricslistchainsresponse.md +++ b/docs/models/components/metricslistchainsresponse.md @@ -6,15 +6,15 @@ import { MetricsListChainsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: MetricsListChainsResponse = { - chains: [ - { - evmChainId: 43114, - chainName: "c_chain", - blockchainId: "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5", - subnetId: "11111111111111111111111111111111LpoYY", - network: "mainnet", - }, - ], + chains: [ + { + evmChainId: 43114, + chainName: "c_chain", + blockchainId: "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5", + subnetId: "11111111111111111111111111111111LpoYY", + network: "mainnet", + }, + ], }; ``` diff --git a/docs/models/components/metricsvalue.md b/docs/models/components/metricsvalue.md index c4d3fcd..de54345 100644 --- a/docs/models/components/metricsvalue.md +++ b/docs/models/components/metricsvalue.md @@ -6,8 +6,8 @@ import { MetricsValue } from "@avalabs/avacloud-sdk/models/components"; let value: MetricsValue = { - value: 7151.9, - timestamp: 8442.66, + value: 7151.9, + timestamp: 8442.66, }; ``` diff --git a/docs/models/components/money.md b/docs/models/components/money.md index 5f2293e..bfad221 100644 --- a/docs/models/components/money.md +++ b/docs/models/components/money.md @@ -6,8 +6,8 @@ import { Money } from "@avalabs/avacloud-sdk/models/components"; let value: Money = { - currencyCode: "usd", - value: 42.42, + currencyCode: "usd", + value: 42.42, }; ``` diff --git a/docs/models/components/nativetokenbalance.md b/docs/models/components/nativetokenbalance.md index f0f926d..f801d00 100644 --- a/docs/models/components/nativetokenbalance.md +++ b/docs/models/components/nativetokenbalance.md @@ -6,21 +6,21 @@ import { NativeTokenBalance } from "@avalabs/avacloud-sdk/models/components"; let value: NativeTokenBalance = { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - chainId: "43114", - price: { - currencyCode: "usd", - value: 42.42, - }, - balance: "2000000000000000000", - balanceValue: { - currencyCode: "usd", - value: 42.42, - }, + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + chainId: "43114", + price: { + currencyCode: "usd", + value: 42.42, + }, + balance: "2000000000000000000", + balanceValue: { + currencyCode: "usd", + value: 42.42, + }, }; ``` diff --git a/docs/models/components/nativetransaction.md b/docs/models/components/nativetransaction.md index 7209484..4ec49db 100644 --- a/docs/models/components/nativetransaction.md +++ b/docs/models/components/nativetransaction.md @@ -6,39 +6,40 @@ import { NativeTransaction } from "@avalabs/avacloud-sdk/models/components"; let value: NativeTransaction = { - blockNumber: "339", - blockTimestamp: 1648672486, - blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", - blockIndex: 0, - txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", - txStatus: "1", - txType: 1, - gasLimit: "51373", - gasUsed: "51373", - gasPrice: "470000000000", - nonce: "1", - from: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - to: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - method: { - callType: "CONTRACT_CREATION", - methodHash: "0xa9059cbb", - methodName: "transfer(address,uint256)", - }, - value: "10000000000000000000", + blockNumber: "339", + blockTimestamp: 1648672486, + blockHash: + "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", + blockIndex: 0, + txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", + txStatus: "1", + txType: 1, + gasLimit: "51373", + gasUsed: "51373", + gasPrice: "470000000000", + nonce: "1", + from: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + to: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + method: { + callType: "CONTRACT_CALL", + methodHash: "0xa9059cbb", + methodName: "transfer(address,uint256)", + }, + value: "10000000000000000000", }; ``` diff --git a/docs/models/components/networktoken.md b/docs/models/components/networktoken.md index fd60dde..0e155a2 100644 --- a/docs/models/components/networktoken.md +++ b/docs/models/components/networktoken.md @@ -6,11 +6,11 @@ import { NetworkToken } from "@avalabs/avacloud-sdk/models/components"; let value: NetworkToken = { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", }; ``` diff --git a/docs/models/components/networktokendetails.md b/docs/models/components/networktokendetails.md index a07f93b..425fbfb 100644 --- a/docs/models/components/networktokendetails.md +++ b/docs/models/components/networktokendetails.md @@ -6,21 +6,21 @@ import { NetworkTokenDetails } from "@avalabs/avacloud-sdk/models/components"; let value: NetworkTokenDetails = { - networkToken: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - }, - currentPrice: { - currencyCode: "usd", - value: 42.42, - }, - historicalPrice: { - currencyCode: "usd", - value: 42.42, - }, + networkToken: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + }, + currentPrice: { + currencyCode: "usd", + value: 42.42, + }, + historicalPrice: { + currencyCode: "usd", + value: 42.42, + }, }; ``` diff --git a/docs/models/components/nftholdersresponse.md b/docs/models/components/nftholdersresponse.md index de5472e..2d9ff35 100644 --- a/docs/models/components/nftholdersresponse.md +++ b/docs/models/components/nftholdersresponse.md @@ -6,14 +6,14 @@ import { NftHoldersResponse } from "@avalabs/avacloud-sdk/models/components"; let value: NftHoldersResponse = { - addresses: { - address: "0x1234567890abcdef1234567890abcdef123456789", - sortKey: "123", - }, - nftCollectionName: "NFT Project", - nftSymbol: "NFTPROJ", - totalHolders: 10, - totalTokens: 10, + addresses: { + address: "0x1234567890abcdef1234567890abcdef123456789", + sortKey: "123", + }, + nftCollectionName: "NFT Project", + nftSymbol: "NFTPROJ", + totalHolders: 10, + totalTokens: 10, }; ``` diff --git a/docs/models/components/operationstatusresponse.md b/docs/models/components/operationstatusresponse.md index 4b69cd6..574d584 100644 --- a/docs/models/components/operationstatusresponse.md +++ b/docs/models/components/operationstatusresponse.md @@ -6,12 +6,12 @@ import { OperationStatusResponse } from "@avalabs/avacloud-sdk/models/components"; let value: OperationStatusResponse = { - operationId: "", - operationType: "TRANSACTION_EXPORT_PRIMARY_NETWORK", - operationStatus: "FAILED", - metadata: {}, - createdAtTimestamp: 8700.88, - updatedAtTimestamp: 9786.19, + operationId: "", + operationType: "TRANSACTION_EXPORT_PRIMARY_NETWORK_STAKING", + operationStatus: "FAILED", + metadata: {}, + createdAtTimestamp: 8009.11, + updatedAtTimestamp: 4614.79, }; ``` diff --git a/docs/models/components/operationtype.md b/docs/models/components/operationtype.md index 8bfde07..b26f7bf 100644 --- a/docs/models/components/operationtype.md +++ b/docs/models/components/operationtype.md @@ -5,7 +5,7 @@ ```typescript import { OperationType } from "@avalabs/avacloud-sdk/models/components"; -let value: OperationType = "TRANSACTION_EXPORT_EVM"; +let value: OperationType = "TRANSACTION_EXPORT_PRIMARY_NETWORK_SIMPLE"; ``` ## Values diff --git a/docs/models/components/operator.md b/docs/models/components/operator.md index 773f6a9..b6b5ab6 100644 --- a/docs/models/components/operator.md +++ b/docs/models/components/operator.md @@ -5,7 +5,7 @@ ```typescript import { Operator } from "@avalabs/avacloud-sdk/models/components"; -let value: Operator = "OR"; +let value: Operator = "AND"; ``` ## Values diff --git a/docs/models/components/params.md b/docs/models/components/params.md index 2320b9e..37adfdc 100644 --- a/docs/models/components/params.md +++ b/docs/models/components/params.md @@ -6,10 +6,10 @@ import { Params } from "@avalabs/avacloud-sdk/models/components"; let value: Params = { - evmChainId: "", - contractAddress: "", - startTs: 3834.41, - endTs: 4776.65, + evmChainId: "", + contractAddress: "", + startTs: 7917.25, + endTs: 8121.69, }; ``` diff --git a/docs/models/components/pchainaddressdetails.md b/docs/models/components/pchainaddressdetails.md index 88c9c11..b42c45c 100644 --- a/docs/models/components/pchainaddressdetails.md +++ b/docs/models/components/pchainaddressdetails.md @@ -6,8 +6,10 @@ import { PChainAddressDetails } from "@avalabs/avacloud-sdk/models/components"; let value: PChainAddressDetails = { - addresses: ["avax1abcdef1234567890abcdef1234567890abcdef"], - sortKey: "123", + addresses: [ + "avax1abcdef1234567890abcdef1234567890abcdef", + ], + sortKey: "123", }; ``` diff --git a/docs/models/components/pchainbalance.md b/docs/models/components/pchainbalance.md index 4259d0e..60cd181 100644 --- a/docs/models/components/pchainbalance.md +++ b/docs/models/components/pchainbalance.md @@ -6,98 +6,98 @@ import { PChainBalance } from "@avalabs/avacloud-sdk/models/components"; let value: PChainBalance = { - unlockedUnstaked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - }, - ], - unlockedStaked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - utxoCount: 1, - }, - ], - lockedPlatform: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - }, - ], - lockedStakeable: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - utxoCount: 1, - }, - ], - lockedStaked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - utxoCount: 1, - }, - ], - pendingStaked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - }, - ], - atomicMemoryUnlocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - sharedWithChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - status: "", - }, - ], - atomicMemoryLocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - utxoCount: 1, - sharedWithChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - status: "", - }, - ], + unlockedUnstaked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + }, + ], + unlockedStaked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + }, + ], + lockedPlatform: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + }, + ], + lockedStakeable: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + }, + ], + lockedStaked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + }, + ], + pendingStaked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + }, + ], + atomicMemoryUnlocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + sharedWithChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + status: "", + }, + ], + atomicMemoryLocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + sharedWithChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + status: "", + }, + ], }; ``` diff --git a/docs/models/components/pchainlookingglassresponse.md b/docs/models/components/pchainlookingglassresponse.md index 83fedfc..606ce31 100644 --- a/docs/models/components/pchainlookingglassresponse.md +++ b/docs/models/components/pchainlookingglassresponse.md @@ -6,10 +6,12 @@ import { PChainLookingGlassResponse } from "@avalabs/avacloud-sdk/models/components"; let value: PChainLookingGlassResponse = { - addresses: { - addresses: ["avax1abcdef1234567890abcdef1234567890abcdef"], - sortKey: "123", - }, + addresses: { + addresses: [ + "avax1abcdef1234567890abcdef1234567890abcdef", + ], + sortKey: "123", + }, }; ``` diff --git a/docs/models/components/pchainsharedasset.md b/docs/models/components/pchainsharedasset.md index 0bef062..0201c19 100644 --- a/docs/models/components/pchainsharedasset.md +++ b/docs/models/components/pchainsharedasset.md @@ -6,15 +6,15 @@ import { PChainSharedAsset } from "@avalabs/avacloud-sdk/models/components"; let value: PChainSharedAsset = { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - utxoCount: 1, - sharedWithChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - status: "", + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + sharedWithChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + status: "", }; ``` diff --git a/docs/models/components/pchaintransaction.md b/docs/models/components/pchaintransaction.md index 0b01966..5a24e3f 100644 --- a/docs/models/components/pchaintransaction.md +++ b/docs/models/components/pchaintransaction.md @@ -6,96 +6,102 @@ import { PChainTransaction } from "@avalabs/avacloud-sdk/models/components"; let value: PChainTransaction = { - txHash: "3P91K6nuDFvDodcRuJTsgdf9SvYe5pMiKk38HppsoeAiEztCP", - txType: "ImportTx", - blockTimestamp: 1648672486, - blockNumber: "", - blockHash: "", - consumedUtxos: [ - { - addresses: ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], - asset: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - }, - consumedOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - consumingTxHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", - createdOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - utxoId: "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC", - amount: "821.00", - assetId: "", - blockNumber: "", - blockTimestamp: 135.71, - outputIndex: 971.01, - txHash: "", - utxoType: "TRANSFER", - }, - ], - emittedUtxos: [ - { - addresses: ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], - asset: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - }, - consumedOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - consumingTxHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", - createdOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - utxoId: "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC", - amount: "673.66", - assetId: "", - blockNumber: "", - blockTimestamp: 960.98, - outputIndex: 9719.45, - txHash: "", - utxoType: "TRANSFER", - }, - ], - sourceChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - destinationChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - value: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - }, - ], - amountBurned: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - }, - ], - amountStaked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - }, - ], - subnetOwnershipInfo: { - locktime: 0, - threshold: 1, - addresses: ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], + txHash: "3P91K6nuDFvDodcRuJTsgdf9SvYe5pMiKk38HppsoeAiEztCP", + txType: "ImportTx", + blockTimestamp: 1648672486, + blockNumber: "", + blockHash: "", + consumedUtxos: [ + { + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", + ], + asset: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + consumedOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + consumingTxHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + createdOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + utxoId: "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC", + amount: "778.35", + assetId: "", + blockNumber: "", + blockTimestamp: 1965.82, + outputIndex: 9495.72, + txHash: "", + utxoType: "STAKE", }, + ], + emittedUtxos: [ + { + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", + ], + asset: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + }, + consumedOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + consumingTxHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + createdOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + utxoId: "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC", + amount: "821.00", + assetId: "", + blockNumber: "", + blockTimestamp: 135.71, + outputIndex: 971.01, + txHash: "", + utxoType: "TRANSFER", + }, + ], + sourceChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + destinationChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + value: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + }, + ], + amountBurned: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + }, + ], + amountStaked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + ], + subnetOwnershipInfo: { + locktime: 0, + threshold: 1, + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", + ], + }, }; ``` diff --git a/docs/models/components/pchaintransactiontype.md b/docs/models/components/pchaintransactiontype.md index 6e81d01..7b0b84d 100644 --- a/docs/models/components/pchaintransactiontype.md +++ b/docs/models/components/pchaintransactiontype.md @@ -5,7 +5,7 @@ ```typescript import { PChainTransactionType } from "@avalabs/avacloud-sdk/models/components"; -let value: PChainTransactionType = "CreateSubnetTx"; +let value: PChainTransactionType = "AdvanceTimeTx"; ``` ## Values diff --git a/docs/models/components/pchainutxo.md b/docs/models/components/pchainutxo.md index 5575680..61404cd 100644 --- a/docs/models/components/pchainutxo.md +++ b/docs/models/components/pchainutxo.md @@ -6,26 +6,28 @@ import { PChainUtxo } from "@avalabs/avacloud-sdk/models/components"; let value: PChainUtxo = { - addresses: ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], - asset: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - }, - consumedOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - consumingTxHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", - createdOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - utxoId: "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC", - amount: "604.85", - assetId: "", - blockNumber: "", - blockTimestamp: 4511.59, - outputIndex: 7392.64, - txHash: "", - utxoType: "STAKE", + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", + ], + asset: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + }, + consumedOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + consumingTxHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + createdOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + utxoId: "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC", + amount: "878.20", + assetId: "", + blockNumber: "", + blockTimestamp: 4686.51, + outputIndex: 5096.24, + txHash: "", + utxoType: "TRANSFER", }; ``` diff --git a/docs/models/components/pendingdelegatordetails.md b/docs/models/components/pendingdelegatordetails.md index f45d602..6396d5e 100644 --- a/docs/models/components/pendingdelegatordetails.md +++ b/docs/models/components/pendingdelegatordetails.md @@ -6,16 +6,18 @@ import { PendingDelegatorDetails } from "@avalabs/avacloud-sdk/models/components"; let value: PendingDelegatorDetails = { - txHash: "", - nodeId: "", - rewardAddresses: [""], - amountDelegated: "", - delegationFee: "", - startTimestamp: 1965.82, - endTimestamp: 9495.72, - estimatedGrossReward: "", - estimatedNetReward: "", - delegationStatus: "pending", + txHash: "", + nodeId: "", + rewardAddresses: [ + "", + ], + amountDelegated: "", + delegationFee: "", + startTimestamp: 6747.52, + endTimestamp: 6563.3, + estimatedGrossReward: "", + estimatedNetReward: "", + delegationStatus: "pending", }; ``` diff --git a/docs/models/components/pendingreward.md b/docs/models/components/pendingreward.md index 880e547..dfc5c42 100644 --- a/docs/models/components/pendingreward.md +++ b/docs/models/components/pendingreward.md @@ -6,22 +6,24 @@ import { PendingReward } from "@avalabs/avacloud-sdk/models/components"; let value: PendingReward = { - addresses: ["avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg"], - txHash: "", - amountStaked: "", - nodeId: "", - startTimestamp: 2487.53, - endTimestamp: 7561.07, - rewardType: "DELEGATOR", - progress: 3960.98, - estimatedReward: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - }, + addresses: [ + "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", + ], + txHash: "", + amountStaked: "", + nodeId: "", + startTimestamp: 7037.37, + endTimestamp: 7351.94, + rewardType: "VALIDATOR", + progress: 9621.89, + estimatedReward: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, }; ``` diff --git a/docs/models/components/pendingteleportermessage.md b/docs/models/components/pendingteleportermessage.md index 6ab992b..b9c4840 100644 --- a/docs/models/components/pendingteleportermessage.md +++ b/docs/models/components/pendingteleportermessage.md @@ -6,43 +6,43 @@ import { PendingTeleporterMessage } from "@avalabs/avacloud-sdk/models/components"; let value: PendingTeleporterMessage = { - messageId: "", - teleporterContractAddress: "", - sourceBlockchainId: "", - destinationBlockchainId: "", - sourceEvmChainId: "", - destinationEvmChainId: "", - messageNonce: "", - from: "", - to: "", - messageExecuted: false, - receipts: [ - { - receivedMessageNonce: "", - relayerRewardAddress: "", - }, - ], - receiptDelivered: false, - rewardDetails: { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - ercType: "ERC-20", - price: { - currencyCode: "usd", - value: 42.42, - }, - value: "", + messageId: "", + teleporterContractAddress: "", + sourceBlockchainId: "", + destinationBlockchainId: "", + sourceEvmChainId: "", + destinationEvmChainId: "", + messageNonce: "", + from: "", + to: "", + messageExecuted: false, + receipts: [ + { + receivedMessageNonce: "", + relayerRewardAddress: "", }, - sourceTransaction: { - txHash: "", - timestamp: 3982.21, - gasSpent: "", + ], + receiptDelivered: false, + rewardDetails: { + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + ercType: "ERC-20", + price: { + currencyCode: "usd", + value: 42.42, }, - status: "pending", + value: "", + }, + sourceTransaction: { + txHash: "", + timestamp: 7508.44, + gasSpent: "", + }, + status: "pending", }; ``` diff --git a/docs/models/components/pendingvalidatordetails.md b/docs/models/components/pendingvalidatordetails.md index 63db53d..32ed132 100644 --- a/docs/models/components/pendingvalidatordetails.md +++ b/docs/models/components/pendingvalidatordetails.md @@ -6,13 +6,13 @@ import { PendingValidatorDetails } from "@avalabs/avacloud-sdk/models/components"; let value: PendingValidatorDetails = { - txHash: "", - nodeId: "", - subnetId: "", - amountStaked: "", - startTimestamp: 6531.08, - endTimestamp: 5818.5, - validationStatus: "pending", + txHash: "", + nodeId: "", + subnetId: "", + amountStaked: "", + startTimestamp: 6527.9, + endTimestamp: 2088.76, + validationStatus: "pending", }; ``` diff --git a/docs/models/components/primarynetworkblock.md b/docs/models/components/primarynetworkblock.md index 6491c67..bb6812b 100644 --- a/docs/models/components/primarynetworkblock.md +++ b/docs/models/components/primarynetworkblock.md @@ -6,14 +6,16 @@ import { PrimaryNetworkBlock } from "@avalabs/avacloud-sdk/models/components"; let value: PrimaryNetworkBlock = { - blockNumber: "", - blockHash: "", - parentHash: "", - blockTimestamp: 8965.47, - blockType: "", - txCount: 1412.64, - transactions: [""], - blockSizeBytes: 3675.62, + blockNumber: "", + blockHash: "", + parentHash: "", + blockTimestamp: 9689.62, + blockType: "", + txCount: 6521.03, + transactions: [ + "", + ], + blockSizeBytes: 3209.97, }; ``` diff --git a/docs/models/components/primarynetworkchaininfo.md b/docs/models/components/primarynetworkchaininfo.md index 3104d56..ddcf385 100644 --- a/docs/models/components/primarynetworkchaininfo.md +++ b/docs/models/components/primarynetworkchaininfo.md @@ -6,8 +6,8 @@ import { PrimaryNetworkChainInfo } from "@avalabs/avacloud-sdk/models/components"; let value: PrimaryNetworkChainInfo = { - chainName: "p-chain", - network: "fuji", + chainName: "x-chain", + network: "mainnet", }; ``` diff --git a/docs/models/components/primarynetworkoperationtype.md b/docs/models/components/primarynetworkoperationtype.md index 9880115..7545199 100644 --- a/docs/models/components/primarynetworkoperationtype.md +++ b/docs/models/components/primarynetworkoperationtype.md @@ -5,7 +5,8 @@ ```typescript import { PrimaryNetworkOperationType } from "@avalabs/avacloud-sdk/models/components"; -let value: PrimaryNetworkOperationType = "TRANSACTION_EXPORT_PRIMARY_NETWORK_SIMPLE"; +let value: PrimaryNetworkOperationType = + "TRANSACTION_EXPORT_PRIMARY_NETWORK_STAKING"; ``` ## Values diff --git a/docs/models/components/primarynetworkoptions.md b/docs/models/components/primarynetworkoptions.md index 0f9ab5a..5e088e3 100644 --- a/docs/models/components/primarynetworkoptions.md +++ b/docs/models/components/primarynetworkoptions.md @@ -6,7 +6,9 @@ import { PrimaryNetworkOptions } from "@avalabs/avacloud-sdk/models/components"; let value: PrimaryNetworkOptions = { - includeChains: ["p-chain"], + includeChains: [ + "p-chain", + ], }; ``` diff --git a/docs/models/components/primarynetworktxtype.md b/docs/models/components/primarynetworktxtype.md index dbd233b..f0bc462 100644 --- a/docs/models/components/primarynetworktxtype.md +++ b/docs/models/components/primarynetworktxtype.md @@ -5,7 +5,7 @@ ```typescript import { PrimaryNetworkTxType } from "@avalabs/avacloud-sdk/models/components"; -let value: PrimaryNetworkTxType = "CreateSubnetTx"; +let value: PrimaryNetworkTxType = "ExportTx"; ``` ## Values diff --git a/docs/models/components/queries.md b/docs/models/components/queries.md index 70e422e..3dfd42e 100644 --- a/docs/models/components/queries.md +++ b/docs/models/components/queries.md @@ -6,14 +6,12 @@ import { Queries } from "@avalabs/avacloud-sdk/models/components"; let value: Queries = { - id: "", - type: "AnyTimeStarsArenaBalance", - params: { - firstDate: "", - lastDate: "", - minBalance: "", - subjectAddress: "", - }, + id: "", + type: "LatestBalanceStarsArena", + params: { + minBalance: "", + subjectAddress: "", + }, }; ``` diff --git a/docs/models/components/removedvalidatordetails.md b/docs/models/components/removedvalidatordetails.md index d31c946..ebe6158 100644 --- a/docs/models/components/removedvalidatordetails.md +++ b/docs/models/components/removedvalidatordetails.md @@ -6,15 +6,15 @@ import { RemovedValidatorDetails } from "@avalabs/avacloud-sdk/models/components"; let value: RemovedValidatorDetails = { - txHash: "", - nodeId: "", - subnetId: "", - amountStaked: "", - startTimestamp: 2532.91, - endTimestamp: 4143.69, - removeTxHash: "", - removeTimestamp: 4663.11, - validationStatus: "removed", + txHash: "", + nodeId: "", + subnetId: "", + amountStaked: "", + startTimestamp: 6350.59, + endTimestamp: 1613.09, + removeTxHash: "", + removeTimestamp: 9953, + validationStatus: "removed", }; ``` diff --git a/docs/models/components/requesttype.md b/docs/models/components/requesttype.md index 954eeb4..0e1c8b6 100644 --- a/docs/models/components/requesttype.md +++ b/docs/models/components/requesttype.md @@ -7,7 +7,7 @@ The type of request made by the client. ```typescript import { RequestType } from "@avalabs/avacloud-sdk/models/components"; -let value: RequestType = "rpc"; +let value: RequestType = "data"; ``` ## Values diff --git a/docs/models/components/resourcelink.md b/docs/models/components/resourcelink.md index 9dd034e..804a8bb 100644 --- a/docs/models/components/resourcelink.md +++ b/docs/models/components/resourcelink.md @@ -6,8 +6,8 @@ import { ResourceLink } from "@avalabs/avacloud-sdk/models/components"; let value: ResourceLink = { - type: "CoinGecko", - url: "https://rash-jeans.info", + type: "Discord", + url: "https://alert-stir-fry.com", }; ``` diff --git a/docs/models/components/resourcelinktype.md b/docs/models/components/resourcelinktype.md index 07eb678..c972133 100644 --- a/docs/models/components/resourcelinktype.md +++ b/docs/models/components/resourcelinktype.md @@ -5,7 +5,7 @@ ```typescript import { ResourceLinkType } from "@avalabs/avacloud-sdk/models/components"; -let value: ResourceLinkType = "Telegram"; +let value: ResourceLinkType = "TikTok"; ``` ## Values diff --git a/docs/models/components/rewards.md b/docs/models/components/rewards.md index 0e38d7a..a038aca 100644 --- a/docs/models/components/rewards.md +++ b/docs/models/components/rewards.md @@ -6,8 +6,8 @@ import { Rewards } from "@avalabs/avacloud-sdk/models/components"; let value: Rewards = { - validationRewardAmount: "", - delegationRewardAmount: "", + validationRewardAmount: "", + delegationRewardAmount: "", }; ``` diff --git a/docs/models/components/richaddress.md b/docs/models/components/richaddress.md index cab4c46..6100f14 100644 --- a/docs/models/components/richaddress.md +++ b/docs/models/components/richaddress.md @@ -6,12 +6,12 @@ import { RichAddress } from "@avalabs/avacloud-sdk/models/components"; let value: RichAddress = { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", }; ``` diff --git a/docs/models/components/rollingwindowmetricsapiresponse.md b/docs/models/components/rollingwindowmetricsapiresponse.md index 23eac51..127a060 100644 --- a/docs/models/components/rollingwindowmetricsapiresponse.md +++ b/docs/models/components/rollingwindowmetricsapiresponse.md @@ -6,13 +6,13 @@ import { RollingWindowMetricsApiResponse } from "@avalabs/avacloud-sdk/models/components"; let value: RollingWindowMetricsApiResponse = { - result: { - lastHour: 6027.63, - lastDay: 8579.46, - lastMonth: 5448.83, - lastYear: 8472.52, - allTime: 4236.55, - }, + result: { + lastHour: 5448.83, + lastDay: 8472.52, + lastMonth: 4236.55, + lastYear: 6235.64, + allTime: 6458.94, + }, }; ``` diff --git a/docs/models/components/security.md b/docs/models/components/security.md index 474ccd2..2dfc8d2 100644 --- a/docs/models/components/security.md +++ b/docs/models/components/security.md @@ -6,7 +6,7 @@ import { Security } from "@avalabs/avacloud-sdk/models/components"; let value: Security = { - apiKey: "", + apiKey: "", }; ``` diff --git a/docs/models/components/sharedsecretsresponse.md b/docs/models/components/sharedsecretsresponse.md index e4daab3..1b5ae63 100644 --- a/docs/models/components/sharedsecretsresponse.md +++ b/docs/models/components/sharedsecretsresponse.md @@ -6,7 +6,7 @@ import { SharedSecretsResponse } from "@avalabs/avacloud-sdk/models/components"; let value: SharedSecretsResponse = { - secret: "", + secret: "", }; ``` diff --git a/docs/models/components/sortbyoption.md b/docs/models/components/sortbyoption.md index 2f1c57b..5a8c85c 100644 --- a/docs/models/components/sortbyoption.md +++ b/docs/models/components/sortbyoption.md @@ -5,7 +5,7 @@ ```typescript import { SortByOption } from "@avalabs/avacloud-sdk/models/components"; -let value: SortByOption = "timeRemaining"; +let value: SortByOption = "delegationFee"; ``` ## Values diff --git a/docs/models/components/sourcechainid.md b/docs/models/components/sourcechainid.md new file mode 100644 index 0000000..b15366d --- /dev/null +++ b/docs/models/components/sourcechainid.md @@ -0,0 +1,16 @@ +# SourceChainId + +chain id of the source chain. valid only for destination transactions + +## Example Usage + +```typescript +import { SourceChainId } from "@avalabs/avacloud-sdk/models/components"; + +let value: SourceChainId = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/stakingdistribution.md b/docs/models/components/stakingdistribution.md index 9bb1cb0..3af1131 100644 --- a/docs/models/components/stakingdistribution.md +++ b/docs/models/components/stakingdistribution.md @@ -6,9 +6,9 @@ import { StakingDistribution } from "@avalabs/avacloud-sdk/models/components"; let value: StakingDistribution = { - version: "", - amountStaked: "", - validatorCount: 9025.99, + version: "", + amountStaked: "", + validatorCount: 6818.2, }; ``` diff --git a/docs/models/components/subnet.md b/docs/models/components/subnet.md index 035aa7f..37c3e4d 100644 --- a/docs/models/components/subnet.md +++ b/docs/models/components/subnet.md @@ -6,22 +6,26 @@ import { Subnet } from "@avalabs/avacloud-sdk/models/components"; let value: Subnet = { - createBlockTimestamp: 9023.49, - createBlockIndex: "", - subnetId: "", - ownerAddresses: [""], - threshold: 6976.31, - locktime: 992.8, - subnetOwnershipInfo: { - locktime: 0, - threshold: 1, - addresses: ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], - }, - blockchains: [ - { - blockchainId: "", - }, + createBlockTimestamp: 6976.31, + createBlockIndex: "", + subnetId: "", + ownerAddresses: [ + "", + ], + threshold: 992.8, + locktime: 602.25, + subnetOwnershipInfo: { + locktime: 0, + threshold: 1, + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", ], + }, + blockchains: [ + { + blockchainId: "", + }, + ], }; ``` diff --git a/docs/models/components/subnetownershipinfo.md b/docs/models/components/subnetownershipinfo.md index ad7952e..efd0c45 100644 --- a/docs/models/components/subnetownershipinfo.md +++ b/docs/models/components/subnetownershipinfo.md @@ -6,9 +6,11 @@ import { SubnetOwnershipInfo } from "@avalabs/avacloud-sdk/models/components"; let value: SubnetOwnershipInfo = { - locktime: 0, - threshold: 1, - addresses: ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], + locktime: 0, + threshold: 1, + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", + ], }; ``` diff --git a/docs/models/components/teleporterchainmetricsapiresponse.md b/docs/models/components/teleporterchainmetricsapiresponse.md new file mode 100644 index 0000000..f833339 --- /dev/null +++ b/docs/models/components/teleporterchainmetricsapiresponse.md @@ -0,0 +1,19 @@ +# TeleporterChainMetricsApiResponse + +## Example Usage + +```typescript +import { TeleporterChainMetricsApiResponse } from "@avalabs/avacloud-sdk/models/components"; + +let value: TeleporterChainMetricsApiResponse = { + result: { + value: 6027.63, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `result` | [components.TeleporterMetricsValue](../../models/components/teleportermetricsvalue.md) | :heavy_check_mark: | current metrics value for a given teleporter metric. | \ No newline at end of file diff --git a/docs/models/components/teleporterdestinationtransaction.md b/docs/models/components/teleporterdestinationtransaction.md index 75d11ac..462c145 100644 --- a/docs/models/components/teleporterdestinationtransaction.md +++ b/docs/models/components/teleporterdestinationtransaction.md @@ -6,11 +6,11 @@ import { TeleporterDestinationTransaction } from "@avalabs/avacloud-sdk/models/components"; let value: TeleporterDestinationTransaction = { - txHash: "", - timestamp: 1861.93, - gasSpent: "", - rewardRedeemer: "", - delivererAddress: "", + txHash: "", + timestamp: 5542.42, + gasSpent: "", + rewardRedeemer: "", + delivererAddress: "", }; ``` diff --git a/docs/models/components/teleportermessageinfo.md b/docs/models/components/teleportermessageinfo.md new file mode 100644 index 0000000..799e2ea --- /dev/null +++ b/docs/models/components/teleportermessageinfo.md @@ -0,0 +1,21 @@ +# TeleporterMessageInfo + +## Example Usage + +```typescript +import { TeleporterMessageInfo } from "@avalabs/avacloud-sdk/models/components"; + +let value: TeleporterMessageInfo = { + teleporterMessageId: "", + direction: "DESTINATION_TRANSACTION", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `teleporterMessageId` | *string* | :heavy_check_mark: | N/A | +| `direction` | [components.TransactionDirectionType](../../models/components/transactiondirectiontype.md) | :heavy_check_mark: | N/A | +| `sourceChainId` | [components.SourceChainId](../../models/components/sourcechainid.md) | :heavy_minus_sign: | chain id of the source chain. valid only for destination transactions | +| `destinationChainId` | [components.DestinationChainId](../../models/components/destinationchainid.md) | :heavy_minus_sign: | chain id of the destination chain. valid only for source transactions | \ No newline at end of file diff --git a/docs/models/components/teleportermetric.md b/docs/models/components/teleportermetric.md new file mode 100644 index 0000000..b4e0a09 --- /dev/null +++ b/docs/models/components/teleportermetric.md @@ -0,0 +1,15 @@ +# TeleporterMetric + +## Example Usage + +```typescript +import { TeleporterMetric } from "@avalabs/avacloud-sdk/models/components"; + +let value: TeleporterMetric = "teleporterSourceTxnCount"; +``` + +## Values + +```typescript +"teleporterSourceTxnCount" | "teleporterDestinationTxnCount" | "teleporterTotalTxnCount" +``` \ No newline at end of file diff --git a/docs/models/components/teleportermetricsvalue.md b/docs/models/components/teleportermetricsvalue.md new file mode 100644 index 0000000..670c1d6 --- /dev/null +++ b/docs/models/components/teleportermetricsvalue.md @@ -0,0 +1,17 @@ +# TeleporterMetricsValue + +## Example Usage + +```typescript +import { TeleporterMetricsValue } from "@avalabs/avacloud-sdk/models/components"; + +let value: TeleporterMetricsValue = { + value: 8579.46, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `value` | *number* | :heavy_check_mark: | Aggregated value for the current metrics. | \ No newline at end of file diff --git a/docs/models/components/teleporterreceipt.md b/docs/models/components/teleporterreceipt.md index a7a9130..f90cb66 100644 --- a/docs/models/components/teleporterreceipt.md +++ b/docs/models/components/teleporterreceipt.md @@ -6,8 +6,8 @@ import { TeleporterReceipt } from "@avalabs/avacloud-sdk/models/components"; let value: TeleporterReceipt = { - receivedMessageNonce: "", - relayerRewardAddress: "", + receivedMessageNonce: "", + relayerRewardAddress: "", }; ``` diff --git a/docs/models/components/teleporterrewarddetails.md b/docs/models/components/teleporterrewarddetails.md index b74acff..6916b48 100644 --- a/docs/models/components/teleporterrewarddetails.md +++ b/docs/models/components/teleporterrewarddetails.md @@ -6,18 +6,18 @@ import { TeleporterRewardDetails } from "@avalabs/avacloud-sdk/models/components"; let value: TeleporterRewardDetails = { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - ercType: "ERC-20", - price: { - currencyCode: "usd", - value: 42.42, - }, - value: "", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + ercType: "ERC-20", + price: { + currencyCode: "usd", + value: 42.42, + }, + value: "", }; ``` diff --git a/docs/models/components/teleportersourcetransaction.md b/docs/models/components/teleportersourcetransaction.md index 84e6c0c..ace25cd 100644 --- a/docs/models/components/teleportersourcetransaction.md +++ b/docs/models/components/teleportersourcetransaction.md @@ -6,9 +6,9 @@ import { TeleporterSourceTransaction } from "@avalabs/avacloud-sdk/models/components"; let value: TeleporterSourceTransaction = { - txHash: "", - timestamp: 2123.9, - gasSpent: "", + txHash: "", + timestamp: 7301.22, + gasSpent: "", }; ``` diff --git a/docs/models/components/timestamprangenftholdersparam.md b/docs/models/components/timestamprangenftholdersparam.md index a17447b..22f61eb 100644 --- a/docs/models/components/timestamprangenftholdersparam.md +++ b/docs/models/components/timestamprangenftholdersparam.md @@ -6,10 +6,10 @@ import { TimestampRangeNftHoldersParam } from "@avalabs/avacloud-sdk/models/components"; let value: TimestampRangeNftHoldersParam = { - evmChainId: "", - contractAddress: "", - startTs: 8121.69, - endTs: 5288.95, + evmChainId: "", + contractAddress: "", + startTs: 4799.77, + endTs: 5680.45, }; ``` diff --git a/docs/models/components/tokens.md b/docs/models/components/tokens.md index 3ff08ae..c99c5cb 100644 --- a/docs/models/components/tokens.md +++ b/docs/models/components/tokens.md @@ -6,16 +6,13 @@ import { Tokens } from "@avalabs/avacloud-sdk/models/components"; let value: Tokens = { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - ercType: "ERC-721", - tokenId: "", - tokenUri: "", - metadata: { - indexStatus: "INVALID_METADATA", - }, - ownerAddress: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + ercType: "ERC-1155", + tokenId: "", + tokenUri: "", + metadata: { + indexStatus: "UNINDEXED", + }, }; ``` diff --git a/docs/models/components/transactiondetails.md b/docs/models/components/transactiondetails.md index b18f89a..2656798 100644 --- a/docs/models/components/transactiondetails.md +++ b/docs/models/components/transactiondetails.md @@ -6,45 +6,47 @@ import { TransactionDetails } from "@avalabs/avacloud-sdk/models/components"; let value: TransactionDetails = { - nativeTransaction: { - blockNumber: "339", - blockTimestamp: 1648672486, - blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", - blockIndex: 0, - txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", - txStatus: "1", - txType: 1, - gasLimit: "51373", - gasUsed: "51373", - gasPrice: "470000000000", - nonce: "1", - from: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - to: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - method: { - callType: "CONTRACT_CALL", - methodHash: "0xa9059cbb", - methodName: "transfer(address,uint256)", - }, - value: "10000000000000000000", + nativeTransaction: { + blockNumber: "339", + blockTimestamp: 1648672486, + blockHash: + "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", + blockIndex: 0, + txHash: + "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", + txStatus: "1", + txType: 1, + gasLimit: "51373", + gasUsed: "51373", + gasPrice: "470000000000", + nonce: "1", + from: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", }, - erc20Transfers: [], - erc721Transfers: [], - erc1155Transfers: [], - internalTransactions: [], + to: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + method: { + callType: "CONTRACT_CREATION", + methodHash: "0xa9059cbb", + methodName: "transfer(address,uint256)", + }, + value: "10000000000000000000", + }, + erc20Transfers: [], + erc721Transfers: [], + erc1155Transfers: [], + internalTransactions: [], }; ``` diff --git a/docs/models/components/transactiondirectiontype.md b/docs/models/components/transactiondirectiontype.md new file mode 100644 index 0000000..e6af0e0 --- /dev/null +++ b/docs/models/components/transactiondirectiontype.md @@ -0,0 +1,15 @@ +# TransactionDirectionType + +## Example Usage + +```typescript +import { TransactionDirectionType } from "@avalabs/avacloud-sdk/models/components"; + +let value: TransactionDirectionType = "SOURCE_TRANSACTION"; +``` + +## Values + +```typescript +"SOURCE_TRANSACTION" | "DESTINATION_TRANSACTION" +``` \ No newline at end of file diff --git a/docs/models/components/transactionmethodtype.md b/docs/models/components/transactionmethodtype.md index 4e58d8d..92233b4 100644 --- a/docs/models/components/transactionmethodtype.md +++ b/docs/models/components/transactionmethodtype.md @@ -7,7 +7,7 @@ The contract call type. NATIVE_TRANSFER indicates a transfer of the native token ```typescript import { TransactionMethodType } from "@avalabs/avacloud-sdk/models/components"; -let value: TransactionMethodType = "CONTRACT_CREATION"; +let value: TransactionMethodType = "NATIVE_TRANSFER"; ``` ## Values diff --git a/docs/models/components/transactions.md b/docs/models/components/transactions.md index de8d92e..3303f5a 100644 --- a/docs/models/components/transactions.md +++ b/docs/models/components/transactions.md @@ -6,106 +6,115 @@ import { Transactions } from "@avalabs/avacloud-sdk/models/components"; let value: Transactions = { - txHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", - chainFormat: "non-linear", - timestamp: 1600762738, - txType: "ExportTx", - memo: "0x546865204176616c616e6368652050726f6a656374", - consumedUtxos: [ - { - 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", - }, - ], - emittedUtxos: [ - { - addresses: ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], - asset: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - 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", - }, - ], - amountUnlocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - }, - ], - amountCreated: [ + txHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + chainFormat: "non-linear", + timestamp: 1600762738, + txType: "BaseTx", + memo: "0x546865204176616c616e6368652050726f6a656374", + consumedUtxos: [ + { + 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: [ { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", + signature: + "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", + publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", }, - ], - sourceChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - destinationChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - assetCreated: { + ], + locktime: 0, + outputIndex: "38", + threshold: 1, + timestamp: 1599696000, + utxoType: "mint", + }, + ], + emittedUtxos: [ + { + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", + ], + asset: { assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", name: "Avalanche", symbol: "AVAX", denomination: 9, - type: "secp256k1", - createdAtTimestamp: 1675444720, - cap: "variable", + 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", + }, + ], + amountUnlocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + ], + amountCreated: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + }, + ], + sourceChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + destinationChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + assetCreated: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + createdAtTimestamp: 1675444720, + cap: "variable", + }, + vertices: [ + { + hash: "82qPRREHmh8Cfta4PGD6GymY9ZLyvgYugqW6hj9FykpMVRz1S", + height: 1961, + timestamp: 1600762738, }, - blockHeight: 1005, - blockHash: "82qPRREHmh8Cfta4PGD6GymY9ZLyvgYugqW6hj9FykpMVRz1S", + ], }; ``` diff --git a/docs/models/components/transactionvertexdetail.md b/docs/models/components/transactionvertexdetail.md index 7b735e9..209883c 100644 --- a/docs/models/components/transactionvertexdetail.md +++ b/docs/models/components/transactionvertexdetail.md @@ -6,9 +6,9 @@ import { TransactionVertexDetail } from "@avalabs/avacloud-sdk/models/components"; let value: TransactionVertexDetail = { - hash: "82qPRREHmh8Cfta4PGD6GymY9ZLyvgYugqW6hj9FykpMVRz1S", - height: 1961, - timestamp: 1600762738, + hash: "82qPRREHmh8Cfta4PGD6GymY9ZLyvgYugqW6hj9FykpMVRz1S", + height: 1961, + timestamp: 1600762738, }; ``` diff --git a/docs/models/components/transfers.md b/docs/models/components/transfers.md index b4b6b20..8b0b928 100644 --- a/docs/models/components/transfers.md +++ b/docs/models/components/transfers.md @@ -6,39 +6,38 @@ import { Transfers } from "@avalabs/avacloud-sdk/models/components"; let value: Transfers = { - blockNumber: "339", - blockTimestamp: 1648672486, - blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", - txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", - from: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - to: { - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - }, - logIndex: 6070.45, - erc721Token: { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - ercType: "ERC-721", - tokenId: "", - tokenUri: "", - metadata: { - indexStatus: "INDEXED", - }, - ownerAddress: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + blockNumber: "339", + blockTimestamp: 1648672486, + blockHash: + "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", + txHash: "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4", + from: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + to: { + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + }, + logIndex: 4785.96, + value: "10000000000000000000", + erc1155Token: { + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + ercType: "ERC-1155", + tokenId: "", + tokenUri: "", + metadata: { + indexStatus: "UNREACHABLE_TOKEN_URI", }, + }, }; ``` diff --git a/docs/models/components/unknowncontract.md b/docs/models/components/unknowncontract.md index c76bccb..d13e46b 100644 --- a/docs/models/components/unknowncontract.md +++ b/docs/models/components/unknowncontract.md @@ -6,13 +6,13 @@ import { UnknownContract } from "@avalabs/avacloud-sdk/models/components"; let value: UnknownContract = { - name: "Wrapped AVAX", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - deploymentDetails: { - txHash: "", - deployerAddress: "", - }, - ercType: "UNKNOWN", + name: "Wrapped AVAX", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + deploymentDetails: { + txHash: "", + deployerAddress: "", + }, + ercType: "UNKNOWN", }; ``` diff --git a/docs/models/components/usagemetricsresponsedto.md b/docs/models/components/usagemetricsresponsedto.md index 48c1ff2..bf11501 100644 --- a/docs/models/components/usagemetricsresponsedto.md +++ b/docs/models/components/usagemetricsresponsedto.md @@ -6,25 +6,25 @@ import { UsageMetricsResponseDTO } from "@avalabs/avacloud-sdk/models/components"; let value: UsageMetricsResponseDTO = { - aggregateDuration: "", - orgId: "", - metrics: [ + aggregateDuration: "", + orgId: "", + metrics: [ + { + timestamp: 7038.89, + values: [ { - timestamp: 3523.12, - values: [ - { - groupedBy: "requestType", - totalRequests: 4692.49, - requestsPerSecond: 9988.48, - successRatePercent: 8411.4, - medianResponseTimeMsecs: 1494.48, - invalidRequests: 9046.48, - apiCreditsUsed: 8681.26, - apiCreditsWasted: 375.59, - }, - ], + groupedBy: "chainId", + totalRequests: 1002.26, + requestsPerSecond: 995.69, + successRatePercent: 9194.83, + medianResponseTimeMsecs: 3523.12, + invalidRequests: 7142.42, + apiCreditsUsed: 4692.49, + apiCreditsWasted: 9988.48, }, - ], + ], + }, + ], }; ``` diff --git a/docs/models/components/usagemetricsvaluedto.md b/docs/models/components/usagemetricsvaluedto.md index a5c9791..63f5090 100644 --- a/docs/models/components/usagemetricsvaluedto.md +++ b/docs/models/components/usagemetricsvaluedto.md @@ -6,14 +6,14 @@ import { UsageMetricsValueDTO } from "@avalabs/avacloud-sdk/models/components"; let value: UsageMetricsValueDTO = { - groupedBy: "chainId", - totalRequests: 332.22, - requestsPerSecond: 691.67, - successRatePercent: 9825.75, - medianResponseTimeMsecs: 6974.29, - invalidRequests: 3732.91, - apiCreditsUsed: 4535.43, - apiCreditsWasted: 4200.75, + groupedBy: "None", + totalRequests: 8073.19, + requestsPerSecond: 4113.97, + successRatePercent: 5691.01, + medianResponseTimeMsecs: 1399.72, + invalidRequests: 4071.83, + apiCreditsUsed: 332.22, + apiCreditsWasted: 691.67, }; ``` diff --git a/docs/models/components/utxo.md b/docs/models/components/utxo.md index 8a0d597..e67aea8 100644 --- a/docs/models/components/utxo.md +++ b/docs/models/components/utxo.md @@ -6,33 +6,35 @@ import { Utxo } from "@avalabs/avacloud-sdk/models/components"; let value: Utxo = { - addresses: ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], - asset: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", + ], + asset: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + consumedOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + consumingTxHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + createdOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + utxoId: "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC", + consumingTxTimestamp: 1599696000, + creationTxHash: "FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z", + credentials: [ + { + signature: + "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", + publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", }, - 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", + ], + locktime: 0, + outputIndex: "38", + threshold: 1, + timestamp: 1599696000, + utxoType: "mint", }; ``` diff --git a/docs/models/components/utxocredential.md b/docs/models/components/utxocredential.md index fb9e750..22b5e7d 100644 --- a/docs/models/components/utxocredential.md +++ b/docs/models/components/utxocredential.md @@ -6,9 +6,9 @@ import { UtxoCredential } from "@avalabs/avacloud-sdk/models/components"; let value: UtxoCredential = { - signature: - "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", - publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", + signature: + "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", + publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", }; ``` diff --git a/docs/models/components/validatorhealthdetails.md b/docs/models/components/validatorhealthdetails.md index b724522..9b5c5c5 100644 --- a/docs/models/components/validatorhealthdetails.md +++ b/docs/models/components/validatorhealthdetails.md @@ -6,10 +6,10 @@ import { ValidatorHealthDetails } from "@avalabs/avacloud-sdk/models/components"; let value: ValidatorHealthDetails = { - reachabilityPercent: 2088.76, - benchedPChainRequestsPercent: 6350.59, - benchedXChainRequestsPercent: 1613.09, - benchedCChainRequestsPercent: 9953, + reachabilityPercent: 6342.74, + benchedPChainRequestsPercent: 9883.74, + benchedXChainRequestsPercent: 9589.5, + benchedCChainRequestsPercent: 1020.44, }; ``` diff --git a/docs/models/components/validators.md b/docs/models/components/validators.md index 84dbd07..54c0219 100644 --- a/docs/models/components/validators.md +++ b/docs/models/components/validators.md @@ -6,26 +6,15 @@ import { Validators } from "@avalabs/avacloud-sdk/models/components"; let value: Validators = { - txHash: "", - nodeId: "", - subnetId: "", - amountStaked: "", - startTimestamp: 9698.1, - endTimestamp: 6667.67, - stakePercentage: 6531.4, - delegatorCount: 6706.38, - uptimePerformance: 1709.09, - potentialRewards: { - validationRewardAmount: "", - delegationRewardAmount: "", - }, - validationStatus: "active", - validatorHealth: { - reachabilityPercent: 2103.82, - benchedPChainRequestsPercent: 3581.52, - benchedXChainRequestsPercent: 1289.26, - benchedCChainRequestsPercent: 7506.86, - }, + txHash: "", + nodeId: "", + subnetId: "", + amountStaked: "", + startTimestamp: 6667.67, + endTimestamp: 6531.4, + removeTxHash: "", + removeTimestamp: 6706.38, + validationStatus: "removed", }; ``` diff --git a/docs/models/components/validatorsdetails.md b/docs/models/components/validatorsdetails.md index a7830af..1054742 100644 --- a/docs/models/components/validatorsdetails.md +++ b/docs/models/components/validatorsdetails.md @@ -6,17 +6,17 @@ import { ValidatorsDetails } from "@avalabs/avacloud-sdk/models/components"; let value: ValidatorsDetails = { - validatorCount: 3864.89, - totalAmountStaked: "", - estimatedAnnualStakingReward: "", - stakingDistributionByVersion: [ - { - version: "", - amountStaked: "", - validatorCount: 9437.49, - }, - ], - stakingRatio: "", + validatorCount: 9437.49, + totalAmountStaked: "", + estimatedAnnualStakingReward: "", + stakingDistributionByVersion: [ + { + version: "", + amountStaked: "", + validatorCount: 9025.99, + }, + ], + stakingRatio: "", }; ``` diff --git a/docs/models/components/webhookresponse.md b/docs/models/components/webhookresponse.md index 2dbd4cd..b2d18ee 100644 --- a/docs/models/components/webhookresponse.md +++ b/docs/models/components/webhookresponse.md @@ -6,18 +6,22 @@ import { WebhookResponse } from "@avalabs/avacloud-sdk/models/components"; let value: WebhookResponse = { - id: "", - eventType: "address_activity", - metadata: { - addresses: ["0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"], - eventSignatures: ["0x61cbb2a3dee0b6064c2e681aadd61677fb4ef319f0b547508d495626f5a62f64"], - }, - url: "https://enraged-wrench.org", - chainId: "", - status: "active", - createdAt: 6139.66, - name: "", - description: "Progressive interactive standardization", + id: "", + eventType: "address_activity", + metadata: { + addresses: [ + "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + ], + eventSignatures: [ + "0x61cbb2a3dee0b6064c2e681aadd61677fb4ef319f0b547508d495626f5a62f64", + ], + }, + url: "http://loose-overcoat.com", + chainId: "", + status: "inactive", + createdAt: 6990.98, + name: "", + description: "Enterprise-wide zero tolerance task-force", }; ``` diff --git a/docs/models/components/webhookresponsemetadata.md b/docs/models/components/webhookresponsemetadata.md index 40e0994..23348db 100644 --- a/docs/models/components/webhookresponsemetadata.md +++ b/docs/models/components/webhookresponsemetadata.md @@ -6,8 +6,12 @@ import { WebhookResponseMetadata } from "@avalabs/avacloud-sdk/models/components"; let value: WebhookResponseMetadata = { - addresses: ["0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"], - eventSignatures: ["0x61cbb2a3dee0b6064c2e681aadd61677fb4ef319f0b547508d495626f5a62f64"], + addresses: [ + "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + ], + eventSignatures: [ + "0x61cbb2a3dee0b6064c2e681aadd61677fb4ef319f0b547508d495626f5a62f64", + ], }; ``` diff --git a/docs/models/components/webhookstatustype.md b/docs/models/components/webhookstatustype.md index 424ae88..8297cc3 100644 --- a/docs/models/components/webhookstatustype.md +++ b/docs/models/components/webhookstatustype.md @@ -5,7 +5,7 @@ ```typescript import { WebhookStatusType } from "@avalabs/avacloud-sdk/models/components"; -let value: WebhookStatusType = "inactive"; +let value: WebhookStatusType = "active"; ``` ## Values diff --git a/docs/models/components/xchainassetdetails.md b/docs/models/components/xchainassetdetails.md index 8b5746e..1363c62 100644 --- a/docs/models/components/xchainassetdetails.md +++ b/docs/models/components/xchainassetdetails.md @@ -6,13 +6,13 @@ import { XChainAssetDetails } from "@avalabs/avacloud-sdk/models/components"; let value: XChainAssetDetails = { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - createdAtTimestamp: 1675444720, - cap: "fixed", + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + createdAtTimestamp: 1675444720, + cap: "fixed", }; ``` diff --git a/docs/models/components/xchainbalances.md b/docs/models/components/xchainbalances.md index ba1197d..cd8f11e 100644 --- a/docs/models/components/xchainbalances.md +++ b/docs/models/components/xchainbalances.md @@ -6,52 +6,52 @@ import { XChainBalances } from "@avalabs/avacloud-sdk/models/components"; let value: XChainBalances = { - locked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - }, - ], - unlocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - }, - ], - atomicMemoryUnlocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - utxoCount: 1, - sharedWithChainId: "", - }, - ], - atomicMemoryLocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - sharedWithChainId: "", - }, - ], + locked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + }, + ], + unlocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + }, + ], + atomicMemoryUnlocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + sharedWithChainId: "", + }, + ], + atomicMemoryLocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + sharedWithChainId: "", + }, + ], }; ``` diff --git a/docs/models/components/xchainlineartransaction.md b/docs/models/components/xchainlineartransaction.md index 9fe5e6b..8e56b33 100644 --- a/docs/models/components/xchainlineartransaction.md +++ b/docs/models/components/xchainlineartransaction.md @@ -6,106 +6,110 @@ import { XChainLinearTransaction } from "@avalabs/avacloud-sdk/models/components"; let value: XChainLinearTransaction = { - txHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", - chainFormat: "non-linear", - timestamp: 1600762738, - txType: "OperationTx", - memo: "0x546865204176616c616e6368652050726f6a656374", - consumedUtxos: [ - { - 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", - }, - ], - emittedUtxos: [ - { - addresses: ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], - asset: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - 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", - }, - ], - amountUnlocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - }, - ], - amountCreated: [ + txHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + chainFormat: "non-linear", + timestamp: 1600762738, + txType: "OperationTx", + memo: "0x546865204176616c616e6368652050726f6a656374", + consumedUtxos: [ + { + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", + ], + asset: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + consumedOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + consumingTxHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + createdOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + utxoId: "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC", + consumingTxTimestamp: 1599696000, + creationTxHash: "FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z", + credentials: [ { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", + signature: + "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", + publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", }, - ], - sourceChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - destinationChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - assetCreated: { + ], + locktime: 0, + outputIndex: "38", + threshold: 1, + timestamp: 1599696000, + utxoType: "mint", + }, + ], + emittedUtxos: [ + { + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", + ], + asset: { assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", name: "Avalanche", symbol: "AVAX", denomination: 9, type: "nft", - createdAtTimestamp: 1675444720, - cap: "variable", + 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", + }, + ], + amountUnlocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + ], + amountCreated: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", }, - blockHeight: 1005, - blockHash: "82qPRREHmh8Cfta4PGD6GymY9ZLyvgYugqW6hj9FykpMVRz1S", + ], + sourceChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + destinationChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + assetCreated: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + createdAtTimestamp: 1675444720, + cap: "variable", + }, + blockHeight: 1005, + blockHash: "82qPRREHmh8Cfta4PGD6GymY9ZLyvgYugqW6hj9FykpMVRz1S", }; ``` diff --git a/docs/models/components/xchainnonlineartransaction.md b/docs/models/components/xchainnonlineartransaction.md index 17baa99..afbf691 100644 --- a/docs/models/components/xchainnonlineartransaction.md +++ b/docs/models/components/xchainnonlineartransaction.md @@ -6,111 +6,115 @@ import { XChainNonLinearTransaction } from "@avalabs/avacloud-sdk/models/components"; let value: XChainNonLinearTransaction = { - txHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", - chainFormat: "non-linear", - timestamp: 1600762738, - txType: "UNKNOWN", - memo: "0x546865204176616c616e6368652050726f6a656374", - consumedUtxos: [ - { - addresses: ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], - asset: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - 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", - }, - ], - emittedUtxos: [ - { - addresses: ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], - asset: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - 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", - }, - ], - amountUnlocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - }, - ], - amountCreated: [ + txHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + chainFormat: "non-linear", + timestamp: 1600762738, + txType: "ExportTx", + memo: "0x546865204176616c616e6368652050726f6a656374", + consumedUtxos: [ + { + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", + ], + asset: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + consumedOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + consumingTxHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + createdOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + utxoId: "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC", + consumingTxTimestamp: 1599696000, + creationTxHash: "FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z", + credentials: [ { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", + signature: + "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", + publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", }, - ], - sourceChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - destinationChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - assetCreated: { + ], + locktime: 0, + outputIndex: "38", + threshold: 1, + timestamp: 1599696000, + utxoType: "mint", + }, + ], + emittedUtxos: [ + { + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", + ], + asset: { assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", name: "Avalanche", symbol: "AVAX", denomination: 9, type: "secp256k1", - createdAtTimestamp: 1675444720, - cap: "variable", - }, - vertices: [ + amount: "5001000", + }, + consumedOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + consumingTxHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + createdOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + utxoId: "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC", + consumingTxTimestamp: 1599696000, + creationTxHash: "FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z", + credentials: [ { - hash: "82qPRREHmh8Cfta4PGD6GymY9ZLyvgYugqW6hj9FykpMVRz1S", - height: 1961, - timestamp: 1600762738, + signature: + "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", + publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", }, - ], + ], + locktime: 0, + outputIndex: "38", + threshold: 1, + timestamp: 1599696000, + utxoType: "mint", + }, + ], + amountUnlocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + ], + amountCreated: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + ], + sourceChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + destinationChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + assetCreated: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + createdAtTimestamp: 1675444720, + cap: "fixed", + }, + vertices: [ + { + hash: "82qPRREHmh8Cfta4PGD6GymY9ZLyvgYugqW6hj9FykpMVRz1S", + height: 1961, + timestamp: 1600762738, + }, + ], }; ``` diff --git a/docs/models/components/xchainsharedassetbalance.md b/docs/models/components/xchainsharedassetbalance.md index 10843b0..aa87ca3 100644 --- a/docs/models/components/xchainsharedassetbalance.md +++ b/docs/models/components/xchainsharedassetbalance.md @@ -6,14 +6,14 @@ import { XChainSharedAssetBalance } from "@avalabs/avacloud-sdk/models/components"; let value: XChainSharedAssetBalance = { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - utxoCount: 1, - sharedWithChainId: "", + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + sharedWithChainId: "", }; ``` diff --git a/docs/models/components/xchaintransactiontype.md b/docs/models/components/xchaintransactiontype.md index 16de478..9cf1fce 100644 --- a/docs/models/components/xchaintransactiontype.md +++ b/docs/models/components/xchaintransactiontype.md @@ -7,7 +7,7 @@ Type of transaction. ```typescript import { XChainTransactionType } from "@avalabs/avacloud-sdk/models/components"; -let value: XChainTransactionType = "UNKNOWN"; +let value: XChainTransactionType = "CreateAssetTx"; ``` ## Values diff --git a/docs/models/components/xchainvertex.md b/docs/models/components/xchainvertex.md index 6d3b09e..6c3fbc7 100644 --- a/docs/models/components/xchainvertex.md +++ b/docs/models/components/xchainvertex.md @@ -6,14 +6,18 @@ import { XChainVertex } from "@avalabs/avacloud-sdk/models/components"; let value: XChainVertex = { - vertexHash: "", - parentHashes: [""], - vertexHeight: 7038.89, - vertexIndex: 4479.26, - vertexTimestamp: 1002.26, - txCount: 995.69, - transactions: [""], - vertexSizeBytes: 9194.83, + vertexHash: "", + parentHashes: [ + "", + ], + vertexHeight: 9840.43, + vertexIndex: 8919.24, + vertexTimestamp: 2603.41, + txCount: 8061.94, + transactions: [ + "", + ], + vertexSizeBytes: 5370.23, }; ``` diff --git a/docs/models/errors/badgatewaymessage.md b/docs/models/errors/badgatewaymessage.md index 37fa9ed..8dc2116 100644 --- a/docs/models/errors/badgatewaymessage.md +++ b/docs/models/errors/badgatewaymessage.md @@ -7,7 +7,7 @@ The error message describing the reason for the exception ```typescript import { BadGatewayMessage } from "@avalabs/avacloud-sdk/models/errors"; -let value: BadGatewayMessage = [""]; +let value: BadGatewayMessage = ""; ``` ## Supported Types diff --git a/docs/models/errors/forbiddenmessage.md b/docs/models/errors/forbiddenmessage.md index 2f8ec57..28576c1 100644 --- a/docs/models/errors/forbiddenmessage.md +++ b/docs/models/errors/forbiddenmessage.md @@ -7,7 +7,9 @@ The error message describing the reason for the exception ```typescript import { ForbiddenMessage } from "@avalabs/avacloud-sdk/models/errors"; -let value: ForbiddenMessage = [""]; +let value: ForbiddenMessage = [ + "", +]; ``` ## Supported Types diff --git a/docs/models/errors/internalservererrormessage.md b/docs/models/errors/internalservererrormessage.md index 54225f5..e2c1d05 100644 --- a/docs/models/errors/internalservererrormessage.md +++ b/docs/models/errors/internalservererrormessage.md @@ -7,7 +7,9 @@ The error message describing the reason for the exception ```typescript import { InternalServerErrorMessage } from "@avalabs/avacloud-sdk/models/errors"; -let value: InternalServerErrorMessage = ""; +let value: InternalServerErrorMessage = [ + "", +]; ``` ## Supported Types diff --git a/docs/models/errors/serviceunavailablemessage.md b/docs/models/errors/serviceunavailablemessage.md index 9b132cc..97302d2 100644 --- a/docs/models/errors/serviceunavailablemessage.md +++ b/docs/models/errors/serviceunavailablemessage.md @@ -7,7 +7,9 @@ The error message describing the reason for the exception ```typescript import { ServiceUnavailableMessage } from "@avalabs/avacloud-sdk/models/errors"; -let value: ServiceUnavailableMessage = ""; +let value: ServiceUnavailableMessage = [ + "", +]; ``` ## Supported Types diff --git a/docs/models/errors/toomanyrequestsmessage.md b/docs/models/errors/toomanyrequestsmessage.md index fec90cb..cdbce86 100644 --- a/docs/models/errors/toomanyrequestsmessage.md +++ b/docs/models/errors/toomanyrequestsmessage.md @@ -7,7 +7,9 @@ The error message describing the reason for the exception ```typescript import { TooManyRequestsMessage } from "@avalabs/avacloud-sdk/models/errors"; -let value: TooManyRequestsMessage = [""]; +let value: TooManyRequestsMessage = [ + "", +]; ``` ## Supported Types diff --git a/docs/models/errors/unauthorizedmessage.md b/docs/models/errors/unauthorizedmessage.md index cef087c..f3f0f64 100644 --- a/docs/models/errors/unauthorizedmessage.md +++ b/docs/models/errors/unauthorizedmessage.md @@ -7,7 +7,9 @@ The error message describing the reason for the exception ```typescript import { UnauthorizedMessage } from "@avalabs/avacloud-sdk/models/errors"; -let value: UnauthorizedMessage = [""]; +let value: UnauthorizedMessage = [ + "", +]; ``` ## Supported Types diff --git a/docs/models/operations/addaddressestowebhookrequest.md b/docs/models/operations/addaddressestowebhookrequest.md index 928264d..67359df 100644 --- a/docs/models/operations/addaddressestowebhookrequest.md +++ b/docs/models/operations/addaddressestowebhookrequest.md @@ -6,10 +6,12 @@ import { AddAddressesToWebhookRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: AddAddressesToWebhookRequest = { - id: "f33de69c-d13b-4691-908f-870d6e2e6b04", - addressesChangeRequest: { - addresses: ["0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"], - }, + id: "f33de69c-d13b-4691-908f-870d6e2e6b04", + addressesChangeRequest: { + addresses: [ + "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + ], + }, }; ``` diff --git a/docs/models/operations/datahealthcheckresponsebody.md b/docs/models/operations/datahealthcheckresponsebody.md index a754123..6b8cbd6 100644 --- a/docs/models/operations/datahealthcheckresponsebody.md +++ b/docs/models/operations/datahealthcheckresponsebody.md @@ -8,20 +8,20 @@ The Health Check is successful import { DataHealthCheckResponseBody } from "@avalabs/avacloud-sdk/models/operations"; let value: DataHealthCheckResponseBody = { - status: "ok", - info: { - database: { - status: "up", - additionalProperties: {}, - }, + status: "ok", + info: { + "database": { + status: "up", + additionalProperties: {}, }, - error: {}, - details: { - database: { - status: "up", - additionalProperties: {}, - }, + }, + error: {}, + details: { + "database": { + status: "up", + additionalProperties: {}, }, + }, }; ``` diff --git a/docs/models/operations/deactivatewebhookrequest.md b/docs/models/operations/deactivatewebhookrequest.md index 27f77d1..bdc053d 100644 --- a/docs/models/operations/deactivatewebhookrequest.md +++ b/docs/models/operations/deactivatewebhookrequest.md @@ -6,7 +6,7 @@ import { DeactivateWebhookRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: DeactivateWebhookRequest = { - id: "f33de69c-d13b-4691-908f-870d6e2e6b04", + id: "f33de69c-d13b-4691-908f-870d6e2e6b04", }; ``` diff --git a/docs/models/operations/getaddressesbybalanceovertimerequest.md b/docs/models/operations/getaddressesbybalanceovertimerequest.md index b01507c..08123b8 100644 --- a/docs/models/operations/getaddressesbybalanceovertimerequest.md +++ b/docs/models/operations/getaddressesbybalanceovertimerequest.md @@ -6,11 +6,11 @@ import { GetAddressesByBalanceOverTimeRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetAddressesByBalanceOverTimeRequest = { - threshold: "1000000", - startTimestamp: 1689541049, - endTimestamp: 1689800249, - pageSize: 10, - address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + threshold: "1000000", + startTimestamp: 1689541049, + endTimestamp: 1689800249, + pageSize: 10, + address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", }; ``` diff --git a/docs/models/operations/getaddressesbybalanceovertimeresponse.md b/docs/models/operations/getaddressesbybalanceovertimeresponse.md index 506332c..6732879 100644 --- a/docs/models/operations/getaddressesbybalanceovertimeresponse.md +++ b/docs/models/operations/getaddressesbybalanceovertimeresponse.md @@ -6,12 +6,12 @@ import { GetAddressesByBalanceOverTimeResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: GetAddressesByBalanceOverTimeResponse = { - result: { - addresses: { - address: "0x1234567890abcdef1234567890abcdef123456789", - sortKey: "123", - }, + result: { + addresses: { + address: "0x1234567890abcdef1234567890abcdef123456789", + sortKey: "123", }, + }, }; ``` diff --git a/docs/models/operations/getaddressesbybtcbbridgedrequest.md b/docs/models/operations/getaddressesbybtcbbridgedrequest.md index 75b5276..e005469 100644 --- a/docs/models/operations/getaddressesbybtcbbridgedrequest.md +++ b/docs/models/operations/getaddressesbybtcbbridgedrequest.md @@ -6,8 +6,8 @@ import { GetAddressesByBtcbBridgedRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetAddressesByBtcbBridgedRequest = { - threshold: "1000000", - pageSize: 10, + threshold: "1000000", + pageSize: 10, }; ``` diff --git a/docs/models/operations/getaddressesbybtcbbridgedresponse.md b/docs/models/operations/getaddressesbybtcbbridgedresponse.md index e8ecb09..b615b22 100644 --- a/docs/models/operations/getaddressesbybtcbbridgedresponse.md +++ b/docs/models/operations/getaddressesbybtcbbridgedresponse.md @@ -6,12 +6,12 @@ import { GetAddressesByBtcbBridgedResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: GetAddressesByBtcbBridgedResponse = { - result: { - addresses: { - address: "0x1234567890abcdef1234567890abcdef123456789", - sortKey: "123", - }, + result: { + addresses: { + address: "0x1234567890abcdef1234567890abcdef123456789", + sortKey: "123", }, + }, }; ``` diff --git a/docs/models/operations/getaddressesfromwebhookrequest.md b/docs/models/operations/getaddressesfromwebhookrequest.md index e832750..7eb4914 100644 --- a/docs/models/operations/getaddressesfromwebhookrequest.md +++ b/docs/models/operations/getaddressesfromwebhookrequest.md @@ -6,8 +6,8 @@ import { GetAddressesFromWebhookRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetAddressesFromWebhookRequest = { - pageSize: 10, - id: "f33de69c-d13b-4691-908f-870d6e2e6b04", + pageSize: 10, + id: "f33de69c-d13b-4691-908f-870d6e2e6b04", }; ``` diff --git a/docs/models/operations/getaddressesfromwebhookresponse.md b/docs/models/operations/getaddressesfromwebhookresponse.md index 98c50a5..9a3704c 100644 --- a/docs/models/operations/getaddressesfromwebhookresponse.md +++ b/docs/models/operations/getaddressesfromwebhookresponse.md @@ -6,10 +6,12 @@ import { GetAddressesFromWebhookResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: GetAddressesFromWebhookResponse = { - result: { - addresses: [""], - totalAddresses: 4861.6, - }, + result: { + addresses: [ + "", + ], + totalAddresses: 7155.61, + }, }; ``` diff --git a/docs/models/operations/getapilogsrequest.md b/docs/models/operations/getapilogsrequest.md index 34874ef..581f783 100644 --- a/docs/models/operations/getapilogsrequest.md +++ b/docs/models/operations/getapilogsrequest.md @@ -6,8 +6,8 @@ import { GetApiLogsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetApiLogsRequest = { - startTimestamp: 1689541049, - endTimestamp: 1689800249, + startTimestamp: 1689541049, + endTimestamp: 1689800249, }; ``` diff --git a/docs/models/operations/getapilogsresponse.md b/docs/models/operations/getapilogsresponse.md index 036177e..5570897 100644 --- a/docs/models/operations/getapilogsresponse.md +++ b/docs/models/operations/getapilogsresponse.md @@ -6,29 +6,29 @@ import { GetApiLogsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: GetApiLogsResponse = { - result: { + result: { + orgId: "", + logs: [ + { orgId: "", - logs: [ - { - orgId: "", - logId: "", - eventTimestamp: 5864.1, - apiKeyId: "", - apiKeyAlias: "", - hostRegion: "", - requestType: "data", - requestPath: "", - apiCreditsConsumed: 639.55, - requestDurationMsecs: 5123.93, - responseCode: 4856.28, - metadata: { - ipAddress: "148.250.201.224", - host: "overlooked-feature.biz", - userAgent: "", - }, - }, - ], - }, + logId: "", + eventTimestamp: 2817.3, + apiKeyId: "", + apiKeyAlias: "", + hostRegion: "", + requestType: "rpc", + requestPath: "", + apiCreditsConsumed: 5864.1, + requestDurationMsecs: 1816.31, + responseCode: 639.55, + metadata: { + ipAddress: "131.124.148.250", + host: "spicy-swallow.name", + userAgent: "", + }, + }, + ], + }, }; ``` diff --git a/docs/models/operations/getapiusagemetricsrequest.md b/docs/models/operations/getapiusagemetricsrequest.md index 0d6a118..6ee3c0b 100644 --- a/docs/models/operations/getapiusagemetricsrequest.md +++ b/docs/models/operations/getapiusagemetricsrequest.md @@ -6,10 +6,10 @@ import { GetApiUsageMetricsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetApiUsageMetricsRequest = { - startTimestamp: 1689541049, - endTimestamp: 1689800249, - timeInterval: "daily", - groupBy: "requestPath", + startTimestamp: 1689541049, + endTimestamp: 1689800249, + timeInterval: "daily", + groupBy: "requestPath", }; ``` diff --git a/docs/models/operations/getassetdetailsrequest.md b/docs/models/operations/getassetdetailsrequest.md index 1fe3788..a42c5ed 100644 --- a/docs/models/operations/getassetdetailsrequest.md +++ b/docs/models/operations/getassetdetailsrequest.md @@ -6,8 +6,8 @@ import { GetAssetDetailsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetAssetDetailsRequest = { - blockchainId: "x-chain", - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + blockchainId: "x-chain", + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", }; ``` diff --git a/docs/models/operations/getbalancesbyaddressesrequest.md b/docs/models/operations/getbalancesbyaddressesrequest.md index d405e7a..f5f37d2 100644 --- a/docs/models/operations/getbalancesbyaddressesrequest.md +++ b/docs/models/operations/getbalancesbyaddressesrequest.md @@ -6,9 +6,9 @@ import { GetBalancesByAddressesRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetBalancesByAddressesRequest = { - blockTimestamp: 1599696000, - addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", - blockchainId: "p-chain", + blockTimestamp: 1599696000, + addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", + blockchainId: "p-chain", }; ``` diff --git a/docs/models/operations/getbalancesbyaddressesresponsebody.md b/docs/models/operations/getbalancesbyaddressesresponsebody.md index dc4f4be..915ac8f 100644 --- a/docs/models/operations/getbalancesbyaddressesresponsebody.md +++ b/docs/models/operations/getbalancesbyaddressesresponsebody.md @@ -8,104 +8,104 @@ Successful response import { GetBalancesByAddressesResponseBody } from "@avalabs/avacloud-sdk/models/operations"; let value: GetBalancesByAddressesResponseBody = { - balances: { - unlockedUnstaked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - utxoCount: 1, - }, - ], - unlockedStaked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - utxoCount: 1, - }, - ], - lockedPlatform: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - utxoCount: 1, - }, - ], - lockedStakeable: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - }, - ], - lockedStaked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - }, - ], - pendingStaked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - utxoCount: 1, - }, - ], - atomicMemoryUnlocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - sharedWithChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - status: "", - }, - ], - atomicMemoryLocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - utxoCount: 1, - sharedWithChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - status: "", - }, - ], - }, - chainInfo: { - chainName: "c-chain", - network: "mainnet", - }, + balances: { + unlockedUnstaked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + }, + ], + unlockedStaked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + }, + ], + lockedPlatform: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + }, + ], + lockedStakeable: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + }, + ], + lockedStaked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + }, + ], + pendingStaked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + }, + ], + atomicMemoryUnlocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + utxoCount: 1, + sharedWithChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + status: "", + }, + ], + atomicMemoryLocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + utxoCount: 1, + sharedWithChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + status: "", + }, + ], + }, + chainInfo: { + chainName: "c-chain", + network: "fuji", + }, }; ``` diff --git a/docs/models/operations/getblockbyidrequest.md b/docs/models/operations/getblockbyidrequest.md index 518fa1c..4afc380 100644 --- a/docs/models/operations/getblockbyidrequest.md +++ b/docs/models/operations/getblockbyidrequest.md @@ -6,8 +6,8 @@ import { GetBlockByIdRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetBlockByIdRequest = { - blockchainId: "p-chain", - blockId: "5615di9ytxujackzaXNrVuWQy5y8Yrt8chPCscMr5Ku9YxJ1S", + blockchainId: "p-chain", + blockId: "5615di9ytxujackzaXNrVuWQy5y8Yrt8chPCscMr5Ku9YxJ1S", }; ``` diff --git a/docs/models/operations/getblockrequest.md b/docs/models/operations/getblockrequest.md index c36dfea..6756f94 100644 --- a/docs/models/operations/getblockrequest.md +++ b/docs/models/operations/getblockrequest.md @@ -6,7 +6,7 @@ import { GetBlockRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetBlockRequest = { - blockId: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", + blockId: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", }; ``` diff --git a/docs/models/operations/getchainidsforaddressesrequest.md b/docs/models/operations/getchainidsforaddressesrequest.md index ffe54a1..c962ad4 100644 --- a/docs/models/operations/getchainidsforaddressesrequest.md +++ b/docs/models/operations/getchainidsforaddressesrequest.md @@ -6,7 +6,7 @@ import { GetChainIdsForAddressesRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetChainIdsForAddressesRequest = { - addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", + addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", }; ``` diff --git a/docs/models/operations/getcontractmetadatarequest.md b/docs/models/operations/getcontractmetadatarequest.md index 7fc3548..0211b20 100644 --- a/docs/models/operations/getcontractmetadatarequest.md +++ b/docs/models/operations/getcontractmetadatarequest.md @@ -6,7 +6,7 @@ import { GetContractMetadataRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetContractMetadataRequest = { - address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", }; ``` diff --git a/docs/models/operations/getcontractmetadataresponsebody.md b/docs/models/operations/getcontractmetadataresponsebody.md index ec412d0..b343f89 100644 --- a/docs/models/operations/getcontractmetadataresponsebody.md +++ b/docs/models/operations/getcontractmetadataresponsebody.md @@ -8,13 +8,14 @@ Successful response import { GetContractMetadataResponseBody } from "@avalabs/avacloud-sdk/models/operations"; let value: GetContractMetadataResponseBody = { - name: "Wrapped AVAX", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - deploymentDetails: { - txHash: "", - deployerAddress: "", - }, - ercType: "UNKNOWN", + name: "Wrapped AVAX", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + deploymentDetails: { + txHash: "", + deployerAddress: "", + }, + ercType: "ERC-1155", + symbol: "WAVAX", }; ``` diff --git a/docs/models/operations/getdeploymenttransactionrequest.md b/docs/models/operations/getdeploymenttransactionrequest.md index 4f2cf53..09dff0d 100644 --- a/docs/models/operations/getdeploymenttransactionrequest.md +++ b/docs/models/operations/getdeploymenttransactionrequest.md @@ -6,8 +6,8 @@ import { GetDeploymentTransactionRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetDeploymentTransactionRequest = { - address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", - currency: "usd", + address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + currency: "usd", }; ``` diff --git a/docs/models/operations/getevmchainmetricsrequest.md b/docs/models/operations/getevmchainmetricsrequest.md index b24ebae..533e397 100644 --- a/docs/models/operations/getevmchainmetricsrequest.md +++ b/docs/models/operations/getevmchainmetricsrequest.md @@ -6,11 +6,11 @@ import { GetEvmChainMetricsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetEvmChainMetricsRequest = { - metric: "activeAddresses", - startTimestamp: 1689541049, - endTimestamp: 1689800249, - timeInterval: "day", - pageSize: 10, + metric: "activeAddresses", + startTimestamp: 1689541049, + endTimestamp: 1689800249, + timeInterval: "day", + pageSize: 10, }; ``` diff --git a/docs/models/operations/getevmchainmetricsresponse.md b/docs/models/operations/getevmchainmetricsresponse.md index 1d690f0..fc3df88 100644 --- a/docs/models/operations/getevmchainmetricsresponse.md +++ b/docs/models/operations/getevmchainmetricsresponse.md @@ -6,14 +6,14 @@ import { GetEvmChainMetricsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: GetEvmChainMetricsResponse = { - result: { - results: [ - { - value: 8853.38, - timestamp: 1856.36, - }, - ], - }, + result: { + results: [ + { + value: 3118.6, + timestamp: 2735.42, + }, + ], + }, }; ``` diff --git a/docs/models/operations/getevmchainrollingwindowmetricsrequest.md b/docs/models/operations/getevmchainrollingwindowmetricsrequest.md index 4b26628..ff1e815 100644 --- a/docs/models/operations/getevmchainrollingwindowmetricsrequest.md +++ b/docs/models/operations/getevmchainrollingwindowmetricsrequest.md @@ -6,7 +6,7 @@ import { GetEvmChainRollingWindowMetricsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetEvmChainRollingWindowMetricsRequest = { - metric: "txCount", + metric: "txCount", }; ``` diff --git a/docs/models/operations/getlatestblocksrequest.md b/docs/models/operations/getlatestblocksrequest.md index aa5384a..b1a175f 100644 --- a/docs/models/operations/getlatestblocksrequest.md +++ b/docs/models/operations/getlatestblocksrequest.md @@ -6,7 +6,7 @@ import { GetLatestBlocksRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetLatestBlocksRequest = { - pageSize: 10, + pageSize: 10, }; ``` diff --git a/docs/models/operations/getlatestblocksresponse.md b/docs/models/operations/getlatestblocksresponse.md index 74f3d81..688790f 100644 --- a/docs/models/operations/getlatestblocksresponse.md +++ b/docs/models/operations/getlatestblocksresponse.md @@ -6,23 +6,24 @@ import { GetLatestBlocksResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: GetLatestBlocksResponse = { - result: { - blocks: [ - { - blockNumber: "339", - blockTimestamp: 1648672486, - blockHash: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", - txCount: 8445.5, - baseFee: "", - gasUsed: "", - gasLimit: "", - gasCost: "", - parentHash: "", - feesSpent: "", - cumulativeTransactions: "", - }, - ], - }, + result: { + blocks: [ + { + blockNumber: "339", + blockTimestamp: 1648672486, + blockHash: + "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", + txCount: 8742.88, + baseFee: "", + gasUsed: "", + gasLimit: "", + gasCost: "", + parentHash: "", + feesSpent: "", + cumulativeTransactions: "", + }, + ], + }, }; ``` diff --git a/docs/models/operations/getnativebalancerequest.md b/docs/models/operations/getnativebalancerequest.md index b5ca36c..2bcd874 100644 --- a/docs/models/operations/getnativebalancerequest.md +++ b/docs/models/operations/getnativebalancerequest.md @@ -6,9 +6,9 @@ import { GetNativeBalanceRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetNativeBalanceRequest = { - blockNumber: "6479329", - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - currency: "usd", + blockNumber: "6479329", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + currency: "usd", }; ``` diff --git a/docs/models/operations/getnftholdersbycontractaddressrequest.md b/docs/models/operations/getnftholdersbycontractaddressrequest.md index a716e07..8a426cb 100644 --- a/docs/models/operations/getnftholdersbycontractaddressrequest.md +++ b/docs/models/operations/getnftholdersbycontractaddressrequest.md @@ -6,8 +6,8 @@ import { GetNftHoldersByContractAddressRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetNftHoldersByContractAddressRequest = { - pageSize: 10, - address: "0x7a420AEFF902AAa2c85a190D7B91Ce8BEFffFE14", + pageSize: 10, + address: "0x7a420AEFF902AAa2c85a190D7B91Ce8BEFffFE14", }; ``` diff --git a/docs/models/operations/getnftholdersbycontractaddressresponse.md b/docs/models/operations/getnftholdersbycontractaddressresponse.md index 2638358..ecbc8c1 100644 --- a/docs/models/operations/getnftholdersbycontractaddressresponse.md +++ b/docs/models/operations/getnftholdersbycontractaddressresponse.md @@ -6,16 +6,16 @@ import { GetNftHoldersByContractAddressResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: GetNftHoldersByContractAddressResponse = { - result: { - addresses: { - address: "0x1234567890abcdef1234567890abcdef123456789", - sortKey: "123", - }, - nftCollectionName: "NFT Project", - nftSymbol: "NFTPROJ", - totalHolders: 10, - totalTokens: 10, + result: { + addresses: { + address: "0x1234567890abcdef1234567890abcdef123456789", + sortKey: "123", }, + nftCollectionName: "NFT Project", + nftSymbol: "NFTPROJ", + totalHolders: 10, + totalTokens: 10, + }, }; ``` diff --git a/docs/models/operations/getoperationresultrequest.md b/docs/models/operations/getoperationresultrequest.md index 34c8a2b..13cec5b 100644 --- a/docs/models/operations/getoperationresultrequest.md +++ b/docs/models/operations/getoperationresultrequest.md @@ -6,7 +6,7 @@ import { GetOperationResultRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetOperationResultRequest = { - operationId: "aa22054a-cb7c-4a4e-9b83-59f2ede74138", + operationId: "aa22054a-cb7c-4a4e-9b83-59f2ede74138", }; ``` diff --git a/docs/models/operations/getsinglevalidatordetailsrequest.md b/docs/models/operations/getsinglevalidatordetailsrequest.md index f35886e..272bcb1 100644 --- a/docs/models/operations/getsinglevalidatordetailsrequest.md +++ b/docs/models/operations/getsinglevalidatordetailsrequest.md @@ -6,10 +6,10 @@ import { GetSingleValidatorDetailsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetSingleValidatorDetailsRequest = { - pageSize: 10, - nodeId: "NodeID-111111111111111111116DBWJs", - validationStatus: "completed", - sortOrder: "asc", + pageSize: 10, + nodeId: "NodeID-111111111111111111116DBWJs", + validationStatus: "completed", + sortOrder: "asc", }; ``` diff --git a/docs/models/operations/getsinglevalidatordetailsresponse.md b/docs/models/operations/getsinglevalidatordetailsresponse.md index 4883fdf..77b1628 100644 --- a/docs/models/operations/getsinglevalidatordetailsresponse.md +++ b/docs/models/operations/getsinglevalidatordetailsresponse.md @@ -6,9 +6,9 @@ import { GetSingleValidatorDetailsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: GetSingleValidatorDetailsResponse = { - result: { - validators: [], - }, + result: { + validators: [], + }, }; ``` diff --git a/docs/models/operations/getstakingmetricsrequest.md b/docs/models/operations/getstakingmetricsrequest.md index 9932ad4..46ce9b5 100644 --- a/docs/models/operations/getstakingmetricsrequest.md +++ b/docs/models/operations/getstakingmetricsrequest.md @@ -6,11 +6,11 @@ import { GetStakingMetricsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetStakingMetricsRequest = { - metric: "validatorCount", - startTimestamp: 1689541049, - endTimestamp: 1689800249, - pageSize: 10, - subnetId: "11111111111111111111111111111111LpoYY", + metric: "validatorCount", + startTimestamp: 1689541049, + endTimestamp: 1689800249, + pageSize: 10, + subnetId: "11111111111111111111111111111111LpoYY", }; ``` diff --git a/docs/models/operations/getstakingmetricsresponse.md b/docs/models/operations/getstakingmetricsresponse.md index 0868794..6ab62d2 100644 --- a/docs/models/operations/getstakingmetricsresponse.md +++ b/docs/models/operations/getstakingmetricsresponse.md @@ -6,14 +6,14 @@ import { GetStakingMetricsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: GetStakingMetricsResponse = { - result: { - results: [ - { - value: 6798.8, - timestamp: 9527.92, - }, - ], - }, + result: { + results: [ + { + value: 4254.51, + timestamp: 7980.47, + }, + ], + }, }; ``` diff --git a/docs/models/operations/getsubnetbyidrequest.md b/docs/models/operations/getsubnetbyidrequest.md index 7183e34..333848e 100644 --- a/docs/models/operations/getsubnetbyidrequest.md +++ b/docs/models/operations/getsubnetbyidrequest.md @@ -6,7 +6,7 @@ import { GetSubnetByIdRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetSubnetByIdRequest = { - subnetId: "11111111111111111111111111111111LpoYY", + subnetId: "11111111111111111111111111111111LpoYY", }; ``` diff --git a/docs/models/operations/getteleportermessagerequest.md b/docs/models/operations/getteleportermessagerequest.md index d39b231..ceddacc 100644 --- a/docs/models/operations/getteleportermessagerequest.md +++ b/docs/models/operations/getteleportermessagerequest.md @@ -6,7 +6,7 @@ import { GetTeleporterMessageRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetTeleporterMessageRequest = { - messageId: "acf1c8b06f9aec48e9fcbefbbe576ae8a7ca3b327fcae111396e7cc99956674d", + messageId: "acf1c8b06f9aec48e9fcbefbbe576ae8a7ca3b327fcae111396e7cc99956674d", }; ``` diff --git a/docs/models/operations/getteleportermessageresponsebody.md b/docs/models/operations/getteleportermessageresponsebody.md index d93ad77..b9a26ba 100644 --- a/docs/models/operations/getteleportermessageresponsebody.md +++ b/docs/models/operations/getteleportermessageresponsebody.md @@ -8,50 +8,45 @@ Successful response import { GetTeleporterMessageResponseBody } from "@avalabs/avacloud-sdk/models/operations"; let value: GetTeleporterMessageResponseBody = { - messageId: "", - teleporterContractAddress: "", - sourceBlockchainId: "", - destinationBlockchainId: "", - sourceEvmChainId: "", - destinationEvmChainId: "", - messageNonce: "", - from: "", - to: "", - messageExecuted: false, - receipts: [ - { - receivedMessageNonce: "", - relayerRewardAddress: "", - }, - ], - receiptDelivered: false, - rewardDetails: { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - decimals: 18, - logoUri: - "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", - ercType: "ERC-20", - price: { - currencyCode: "usd", - value: 42.42, - }, - value: "", + messageId: "", + teleporterContractAddress: "", + sourceBlockchainId: "", + destinationBlockchainId: "", + sourceEvmChainId: "", + destinationEvmChainId: "", + messageNonce: "", + from: "", + to: "", + messageExecuted: false, + receipts: [ + { + receivedMessageNonce: "", + relayerRewardAddress: "", }, - sourceTransaction: { - txHash: "", - timestamp: 7085.48, - gasSpent: "", + ], + receiptDelivered: false, + rewardDetails: { + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + name: "Wrapped AVAX", + symbol: "WAVAX", + decimals: 18, + logoUri: + "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg", + ercType: "ERC-20", + price: { + currencyCode: "usd", + value: 42.42, }, - destinationTransaction: { - txHash: "", - timestamp: 8742.88, - gasSpent: "", - rewardRedeemer: "", - delivererAddress: "", - }, - status: "delivered", + value: "", + }, + destinationTransaction: { + txHash: "", + timestamp: 4861.6, + gasSpent: "", + rewardRedeemer: "", + delivererAddress: "", + }, + status: "delivered_source_not_indexed", }; ``` diff --git a/docs/models/operations/getteleportermetricsbychainglobals.md b/docs/models/operations/getteleportermetricsbychainglobals.md new file mode 100644 index 0000000..cb850be --- /dev/null +++ b/docs/models/operations/getteleportermetricsbychainglobals.md @@ -0,0 +1,15 @@ +# GetTeleporterMetricsByChainGlobals + +## Example Usage + +```typescript +import { GetTeleporterMetricsByChainGlobals } from "@avalabs/avacloud-sdk/models/operations"; + +let value: GetTeleporterMetricsByChainGlobals = {}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `chainId` | *string* | :heavy_minus_sign: | A supported EVM chain id, chain alias, or blockchain id. | 43114 | \ No newline at end of file diff --git a/docs/models/operations/getteleportermetricsbychainrequest.md b/docs/models/operations/getteleportermetricsbychainrequest.md new file mode 100644 index 0000000..ecf427c --- /dev/null +++ b/docs/models/operations/getteleportermetricsbychainrequest.md @@ -0,0 +1,18 @@ +# GetTeleporterMetricsByChainRequest + +## Example Usage + +```typescript +import { GetTeleporterMetricsByChainRequest } from "@avalabs/avacloud-sdk/models/operations"; + +let value: GetTeleporterMetricsByChainRequest = { + metric: "teleporterSourceTxnCount", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `metric` | [components.TeleporterMetric](../../models/components/teleportermetric.md) | :heavy_check_mark: | Which chain level teleporter metric to fetch. | teleporterSourceTxnCount | +| `chainId` | *string* | :heavy_minus_sign: | A supported EVM chain ID or one of "total", "mainnet", or "testnet". Use the `/chains` endpoint to get a list of supported chain IDs. | 43114 | \ No newline at end of file diff --git a/docs/models/operations/gettokendetailsrequest.md b/docs/models/operations/gettokendetailsrequest.md index 5a12aeb..e8ac8ae 100644 --- a/docs/models/operations/gettokendetailsrequest.md +++ b/docs/models/operations/gettokendetailsrequest.md @@ -6,8 +6,8 @@ import { GetTokenDetailsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetTokenDetailsRequest = { - address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", - tokenId: "145", + address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + tokenId: "145", }; ``` diff --git a/docs/models/operations/gettokendetailsresponsebody.md b/docs/models/operations/gettokendetailsresponsebody.md index 9488595..8878d2b 100644 --- a/docs/models/operations/gettokendetailsresponsebody.md +++ b/docs/models/operations/gettokendetailsresponsebody.md @@ -8,16 +8,13 @@ Successful response import { GetTokenDetailsResponseBody } from "@avalabs/avacloud-sdk/models/operations"; let value: GetTokenDetailsResponseBody = { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - ercType: "ERC-721", - tokenId: "", - tokenUri: "", - metadata: { - indexStatus: "INVALID_METADATA", - }, - ownerAddress: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + ercType: "ERC-1155", + tokenId: "", + tokenUri: "", + metadata: { + indexStatus: "INVALID_TOKEN_URI", + }, }; ``` diff --git a/docs/models/operations/gettransactionrequest.md b/docs/models/operations/gettransactionrequest.md index fe59030..2501115 100644 --- a/docs/models/operations/gettransactionrequest.md +++ b/docs/models/operations/gettransactionrequest.md @@ -6,7 +6,7 @@ import { GetTransactionRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetTransactionRequest = { - txHash: "0x8bf584d7b14b92a32a339872a66b134a70ba3ba7c305823f348db6f860253f45", + txHash: "0x8bf584d7b14b92a32a339872a66b134a70ba3ba7c305823f348db6f860253f45", }; ``` diff --git a/docs/models/operations/gettransactionsforblockrequest.md b/docs/models/operations/gettransactionsforblockrequest.md index aaf12c0..fa0ba0e 100644 --- a/docs/models/operations/gettransactionsforblockrequest.md +++ b/docs/models/operations/gettransactionsforblockrequest.md @@ -6,7 +6,7 @@ import { GetTransactionsForBlockRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetTransactionsForBlockRequest = { - blockId: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", + blockId: "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c", }; ``` diff --git a/docs/models/operations/gettxbyhashrequest.md b/docs/models/operations/gettxbyhashrequest.md index 0bb6e33..6433fc5 100644 --- a/docs/models/operations/gettxbyhashrequest.md +++ b/docs/models/operations/gettxbyhashrequest.md @@ -6,8 +6,8 @@ import { GetTxByHashRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetTxByHashRequest = { - blockchainId: "p-chain", - txHash: "3P91K6nuDFvDodcRuJTsgdf9SvYe5pMiKk38HppsoeAiEztCP", + blockchainId: "p-chain", + txHash: "3P91K6nuDFvDodcRuJTsgdf9SvYe5pMiKk38HppsoeAiEztCP", }; ``` diff --git a/docs/models/operations/gettxbyhashresponsebody.md b/docs/models/operations/gettxbyhashresponsebody.md index 81fd36f..6e95fc0 100644 --- a/docs/models/operations/gettxbyhashresponsebody.md +++ b/docs/models/operations/gettxbyhashresponsebody.md @@ -8,111 +8,88 @@ Successful response import { GetTxByHashResponseBody } from "@avalabs/avacloud-sdk/models/operations"; let value: GetTxByHashResponseBody = { - txHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", - chainFormat: "non-linear", - timestamp: 1600762738, - txType: "CreateAssetTx", - memo: "0x546865204176616c616e6368652050726f6a656374", - consumedUtxos: [ - { - 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", - }, - ], - emittedUtxos: [ - { - 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", - }, - ], - amountUnlocked: [ - { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", - }, - ], - amountCreated: [ + txHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + blockHeight: 1005, + blockHash: + "0x57a5cb7704561d1d59bd563b6421021b7563960c05ba3ae0e36fc36917c742ee", + timestamp: 1600762738, + memo: "0x546865204176616c616e6368652050726f6a656374", + amountUnlocked: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", + }, + ], + amountCreated: [ + { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + ], + sourceChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + destinationChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + txType: "ExportTx", + evmInputs: [ + { + fromAddress: "0xD0f2898e49d941D6d479B381d3C8F0bd8d983b4c", + asset: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + credentials: [ { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - amount: "5001000", + signature: + "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", + publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", }, - ], - sourceChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - destinationChain: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - assetCreated: { + ], + }, + ], + emittedUtxos: [ + { + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", + ], + asset: { assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", name: "Avalanche", symbol: "AVAX", denomination: 9, - type: "nft", - createdAtTimestamp: 1675444720, - cap: "fixed", - }, - vertices: [ + type: "secp256k1", + amount: "5001000", + }, + consumedOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + consumingTxHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + createdOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + utxoId: "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC", + consumingTxTimestamp: 1599696000, + creationTxHash: "FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z", + credentials: [ { - hash: "82qPRREHmh8Cfta4PGD6GymY9ZLyvgYugqW6hj9FykpMVRz1S", - height: 1961, - timestamp: 1600762738, + signature: + "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", + publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", }, - ], + ], + locktime: 0, + outputIndex: "38", + threshold: 1, + timestamp: 1599696000, + utxoType: "mint", + }, + ], }; ``` diff --git a/docs/models/operations/getutxosbyaddressesrequest.md b/docs/models/operations/getutxosbyaddressesrequest.md index 1d9849f..501f483 100644 --- a/docs/models/operations/getutxosbyaddressesrequest.md +++ b/docs/models/operations/getutxosbyaddressesrequest.md @@ -6,10 +6,10 @@ import { GetUtxosByAddressesRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetUtxosByAddressesRequest = { - addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", - pageSize: 10, - blockchainId: "p-chain", - sortOrder: "asc", + addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", + pageSize: 10, + blockchainId: "p-chain", + sortOrder: "asc", }; ``` diff --git a/docs/models/operations/getutxosbyaddressesresponse.md b/docs/models/operations/getutxosbyaddressesresponse.md index 4364160..646cf68 100644 --- a/docs/models/operations/getutxosbyaddressesresponse.md +++ b/docs/models/operations/getutxosbyaddressesresponse.md @@ -6,43 +6,38 @@ import { GetUtxosByAddressesResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: GetUtxosByAddressesResponse = { - result: { - utxos: [ - { - addresses: ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], - asset: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - 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", - }, + result: { + utxos: [ + { + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", ], - chainInfo: { - chainName: "p-chain", - network: "mainnet", + asset: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "nft", + amount: "5001000", }, + consumedOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + consumingTxHash: "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c", + createdOnChainId: "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + utxoId: "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC", + amount: "704.48", + assetId: "", + blockNumber: "", + blockTimestamp: 3960.6, + outputIndex: 4631.5, + txHash: "", + utxoType: "TRANSFER", + }, + ], + chainInfo: { + chainName: "c-chain", + network: "mainnet", }, + }, }; ``` diff --git a/docs/models/operations/getutxosbyaddressesresponsebody.md b/docs/models/operations/getutxosbyaddressesresponsebody.md index 5acabe4..f0de152 100644 --- a/docs/models/operations/getutxosbyaddressesresponsebody.md +++ b/docs/models/operations/getutxosbyaddressesresponsebody.md @@ -8,41 +8,43 @@ Successful response import { GetUtxosByAddressesResponseBody } from "@avalabs/avacloud-sdk/models/operations"; let value: GetUtxosByAddressesResponseBody = { - utxos: [ + 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: [ { - addresses: ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], - asset: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "secp256k1", - 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", + signature: + "bWWoZUu0Z3STjuk/+2az7M4vP0oqc9NtiA7kOdqINCIE/2+5va5R1KNCWwEX5jE1xVHLvAxU2LHTN5gK8m84HwA", + publicKey: "AdMQOtubgBFFJu++0faHPIIA6KmdZ2ERErMRGzyy6juI", }, - ], - chainInfo: { - chainName: "x-chain", - network: "fuji", + ], + locktime: 0, + outputIndex: "38", + threshold: 1, + timestamp: 1599696000, + utxoType: "mint", }, + ], + chainInfo: { + chainName: "p-chain", + network: "mainnet", + }, }; ``` diff --git a/docs/models/operations/getvalidatorsbydaterangerequest.md b/docs/models/operations/getvalidatorsbydaterangerequest.md index 5fad931..9ba0551 100644 --- a/docs/models/operations/getvalidatorsbydaterangerequest.md +++ b/docs/models/operations/getvalidatorsbydaterangerequest.md @@ -6,11 +6,11 @@ import { GetValidatorsByDateRangeRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetValidatorsByDateRangeRequest = { - startTimestamp: 1689541049, - endTimestamp: 1689800249, - pageSize: 10, - subnetId: "11111111111111111111111111111111LpoYY", - network: "mainnet", + startTimestamp: 1689541049, + endTimestamp: 1689800249, + pageSize: 10, + subnetId: "11111111111111111111111111111111LpoYY", + network: "mainnet", }; ``` diff --git a/docs/models/operations/getvalidatorsbydaterangeresponse.md b/docs/models/operations/getvalidatorsbydaterangeresponse.md index bc17644..3bec5c0 100644 --- a/docs/models/operations/getvalidatorsbydaterangeresponse.md +++ b/docs/models/operations/getvalidatorsbydaterangeresponse.md @@ -6,12 +6,14 @@ import { GetValidatorsByDateRangeResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: GetValidatorsByDateRangeResponse = { - result: { - addresses: { - addresses: ["avax1abcdef1234567890abcdef1234567890abcdef"], - sortKey: "123", - }, + result: { + addresses: { + addresses: [ + "avax1abcdef1234567890abcdef1234567890abcdef", + ], + sortKey: "123", }, + }, }; ``` diff --git a/docs/models/operations/getvertexbyhashrequest.md b/docs/models/operations/getvertexbyhashrequest.md index 8966845..f7e793b 100644 --- a/docs/models/operations/getvertexbyhashrequest.md +++ b/docs/models/operations/getvertexbyhashrequest.md @@ -6,8 +6,8 @@ import { GetVertexByHashRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetVertexByHashRequest = { - vertexHash: "haP1CW56cspZY7aEuqHNrtpvhqCaMTxQaYe6j5u2Mbn4L2Gqr", - blockchainId: "x-chain", + vertexHash: "haP1CW56cspZY7aEuqHNrtpvhqCaMTxQaYe6j5u2Mbn4L2Gqr", + blockchainId: "x-chain", }; ``` diff --git a/docs/models/operations/getvertexbyheightrequest.md b/docs/models/operations/getvertexbyheightrequest.md index 1adf7ed..a1fc8c7 100644 --- a/docs/models/operations/getvertexbyheightrequest.md +++ b/docs/models/operations/getvertexbyheightrequest.md @@ -6,10 +6,10 @@ import { GetVertexByHeightRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetVertexByHeightRequest = { - vertexHeight: 123, - pageSize: 10, - blockchainId: "x-chain", - sortOrder: "asc", + vertexHeight: 123, + pageSize: 10, + blockchainId: "x-chain", + sortOrder: "asc", }; ``` diff --git a/docs/models/operations/getvertexbyheightresponse.md b/docs/models/operations/getvertexbyheightresponse.md index b400dd3..73568ad 100644 --- a/docs/models/operations/getvertexbyheightresponse.md +++ b/docs/models/operations/getvertexbyheightresponse.md @@ -6,24 +6,28 @@ import { GetVertexByHeightResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: GetVertexByHeightResponse = { - result: { - vertices: [ - { - vertexHash: "", - parentHashes: [""], - vertexHeight: 5556.49, - vertexIndex: 9295.3, - vertexTimestamp: 92.4, - txCount: 6699.17, - transactions: [""], - vertexSizeBytes: 8330.38, - }, + result: { + vertices: [ + { + vertexHash: "", + parentHashes: [ + "", ], - chainInfo: { - chainName: "c-chain", - network: "fuji", - }, + vertexHeight: 630.38, + vertexIndex: 164.29, + vertexTimestamp: 5556.49, + txCount: 9295.3, + transactions: [ + "", + ], + vertexSizeBytes: 92.4, + }, + ], + chainInfo: { + chainName: "c-chain", + network: "fuji", }, + }, }; ``` diff --git a/docs/models/operations/getwebhookrequest.md b/docs/models/operations/getwebhookrequest.md index febeae6..86acc61 100644 --- a/docs/models/operations/getwebhookrequest.md +++ b/docs/models/operations/getwebhookrequest.md @@ -6,7 +6,7 @@ import { GetWebhookRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: GetWebhookRequest = { - id: "f33de69c-d13b-4691-908f-870d6e2e6b04", + id: "f33de69c-d13b-4691-908f-870d6e2e6b04", }; ``` diff --git a/docs/models/operations/listactiveprimarynetworkstakingtransactionsrequest.md b/docs/models/operations/listactiveprimarynetworkstakingtransactionsrequest.md index 53fb0b2..3cacfd2 100644 --- a/docs/models/operations/listactiveprimarynetworkstakingtransactionsrequest.md +++ b/docs/models/operations/listactiveprimarynetworkstakingtransactionsrequest.md @@ -6,13 +6,15 @@ import { ListActivePrimaryNetworkStakingTransactionsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListActivePrimaryNetworkStakingTransactionsRequest = { - addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", - txTypes: ["AddValidatorTx"], - startTimestamp: 1689541049, - endTimestamp: 1689800249, - pageSize: 10, - blockchainId: "p-chain", - sortOrder: "asc", + addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", + txTypes: [ + "AddValidatorTx", + ], + startTimestamp: 1689541049, + endTimestamp: 1689800249, + pageSize: 10, + blockchainId: "p-chain", + sortOrder: "asc", }; ``` diff --git a/docs/models/operations/listactiveprimarynetworkstakingtransactionsresponse.md b/docs/models/operations/listactiveprimarynetworkstakingtransactionsresponse.md index 8bb4163..f7dbbdb 100644 --- a/docs/models/operations/listactiveprimarynetworkstakingtransactionsresponse.md +++ b/docs/models/operations/listactiveprimarynetworkstakingtransactionsresponse.md @@ -6,13 +6,13 @@ import { ListActivePrimaryNetworkStakingTransactionsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListActivePrimaryNetworkStakingTransactionsResponse = { - result: { - transactions: [], - chainInfo: { - chainName: "p-chain", - network: "mainnet", - }, + result: { + transactions: [], + chainInfo: { + chainName: "p-chain", + network: "mainnet", }, + }, }; ``` diff --git a/docs/models/operations/listassettransactionsrequest.md b/docs/models/operations/listassettransactionsrequest.md index 6fd1195..1db5f16 100644 --- a/docs/models/operations/listassettransactionsrequest.md +++ b/docs/models/operations/listassettransactionsrequest.md @@ -6,12 +6,14 @@ import { ListAssetTransactionsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListAssetTransactionsRequest = { - txTypes: ["AddValidatorTx"], - startTimestamp: 1689541049, - endTimestamp: 1689800249, - pageSize: 10, - blockchainId: "x-chain", - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + txTypes: [ + "AddValidatorTx", + ], + startTimestamp: 1689541049, + endTimestamp: 1689800249, + pageSize: 10, + blockchainId: "x-chain", + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", }; ``` diff --git a/docs/models/operations/listassettransactionsresponse.md b/docs/models/operations/listassettransactionsresponse.md index 599ef17..3f5d25c 100644 --- a/docs/models/operations/listassettransactionsresponse.md +++ b/docs/models/operations/listassettransactionsresponse.md @@ -6,13 +6,13 @@ import { ListAssetTransactionsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListAssetTransactionsResponse = { - result: { - transactions: [], - chainInfo: { - chainName: "p-chain", - network: "fuji", - }, + result: { + transactions: [], + chainInfo: { + chainName: "c-chain", + network: "mainnet", }, + }, }; ``` diff --git a/docs/models/operations/listblockchainsrequest.md b/docs/models/operations/listblockchainsrequest.md index 5af2e80..6b4fcc2 100644 --- a/docs/models/operations/listblockchainsrequest.md +++ b/docs/models/operations/listblockchainsrequest.md @@ -6,8 +6,8 @@ import { ListBlockchainsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListBlockchainsRequest = { - pageSize: 10, - sortOrder: "asc", + pageSize: 10, + sortOrder: "asc", }; ``` diff --git a/docs/models/operations/listblockchainsresponse.md b/docs/models/operations/listblockchainsresponse.md index 908499a..0a76f4c 100644 --- a/docs/models/operations/listblockchainsresponse.md +++ b/docs/models/operations/listblockchainsresponse.md @@ -6,18 +6,18 @@ import { ListBlockchainsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListBlockchainsResponse = { - result: { - blockchains: [ - { - createBlockTimestamp: 2155.07, - createBlockNumber: "", - blockchainId: "", - vmId: "", - subnetId: "", - blockchainName: "", - }, - ], - }, + result: { + blockchains: [ + { + createBlockTimestamp: 4561.3, + createBlockNumber: "", + blockchainId: "", + vmId: "", + subnetId: "", + blockchainName: "", + }, + ], + }, }; ``` diff --git a/docs/models/operations/listchainsrequest.md b/docs/models/operations/listchainsrequest.md index fe39956..96591ef 100644 --- a/docs/models/operations/listchainsrequest.md +++ b/docs/models/operations/listchainsrequest.md @@ -6,7 +6,7 @@ import { ListChainsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListChainsRequest = { - network: "mainnet", + network: "mainnet", }; ``` diff --git a/docs/models/operations/listchainsresponse.md b/docs/models/operations/listchainsresponse.md index 362f4be..8b2b37c 100644 --- a/docs/models/operations/listchainsresponse.md +++ b/docs/models/operations/listchainsresponse.md @@ -6,17 +6,17 @@ import { ListChainsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListChainsResponse = { - result: { - chains: [ - { - evmChainId: 43114, - chainName: "c_chain", - blockchainId: "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5", - subnetId: "11111111111111111111111111111111LpoYY", - network: "mainnet", - }, - ], - }, + result: { + chains: [ + { + evmChainId: 43114, + chainName: "c_chain", + blockchainId: "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5", + subnetId: "11111111111111111111111111111111LpoYY", + network: "mainnet", + }, + ], + }, }; ``` diff --git a/docs/models/operations/listcollectiblebalancesrequest.md b/docs/models/operations/listcollectiblebalancesrequest.md index 70ee9d0..cc91fd2 100644 --- a/docs/models/operations/listcollectiblebalancesrequest.md +++ b/docs/models/operations/listcollectiblebalancesrequest.md @@ -6,9 +6,9 @@ import { ListCollectibleBalancesRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListCollectibleBalancesRequest = { - pageSize: 10, - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - contractAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + pageSize: 10, + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + contractAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", }; ``` diff --git a/docs/models/operations/listcollectiblebalancesresponse.md b/docs/models/operations/listcollectiblebalancesresponse.md index 5803716..8f060b9 100644 --- a/docs/models/operations/listcollectiblebalancesresponse.md +++ b/docs/models/operations/listcollectiblebalancesresponse.md @@ -6,9 +6,9 @@ import { ListCollectibleBalancesResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListCollectibleBalancesResponse = { - result: { - collectibleBalances: [], - }, + result: { + collectibleBalances: [], + }, }; ``` diff --git a/docs/models/operations/listcontractdeploymentsrequest.md b/docs/models/operations/listcontractdeploymentsrequest.md index 38f2d2d..1eb4d0e 100644 --- a/docs/models/operations/listcontractdeploymentsrequest.md +++ b/docs/models/operations/listcontractdeploymentsrequest.md @@ -6,8 +6,8 @@ import { ListContractDeploymentsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListContractDeploymentsRequest = { - pageSize: 10, - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + pageSize: 10, + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", }; ``` diff --git a/docs/models/operations/listcontractdeploymentsresponse.md b/docs/models/operations/listcontractdeploymentsresponse.md index 8104bc0..17f3b7f 100644 --- a/docs/models/operations/listcontractdeploymentsresponse.md +++ b/docs/models/operations/listcontractdeploymentsresponse.md @@ -6,9 +6,9 @@ import { ListContractDeploymentsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListContractDeploymentsResponse = { - result: { - contracts: [], - }, + result: { + contracts: [], + }, }; ``` diff --git a/docs/models/operations/listdelegatorsrequest.md b/docs/models/operations/listdelegatorsrequest.md index e867c49..a24b0ea 100644 --- a/docs/models/operations/listdelegatorsrequest.md +++ b/docs/models/operations/listdelegatorsrequest.md @@ -6,12 +6,13 @@ import { ListDelegatorsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListDelegatorsRequest = { - pageSize: 10, - rewardAddresses: - "P-avax1679zrp3z9mf7z4an42ddq47qzj36zv6ga20vwl,P-avax1s7kd0kfndlz6mh3l0etrrcmkg5y366k8e0s6cc", - sortOrder: "asc", - delegationStatus: "completed", - nodeIds: "NodeID-111111111111111111116DBWJs,NodeID-222222222222222222227DBWJs", + pageSize: 10, + rewardAddresses: + "P-avax1679zrp3z9mf7z4an42ddq47qzj36zv6ga20vwl,P-avax1s7kd0kfndlz6mh3l0etrrcmkg5y366k8e0s6cc", + sortOrder: "asc", + delegationStatus: "completed", + nodeIds: + "NodeID-111111111111111111116DBWJs,NodeID-222222222222222222227DBWJs", }; ``` diff --git a/docs/models/operations/listdelegatorsresponse.md b/docs/models/operations/listdelegatorsresponse.md index 79e765a..dd66cb9 100644 --- a/docs/models/operations/listdelegatorsresponse.md +++ b/docs/models/operations/listdelegatorsresponse.md @@ -6,22 +6,24 @@ import { ListDelegatorsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListDelegatorsResponse = { - result: { - delegators: [ - { - txHash: "", - nodeId: "", - rewardAddresses: [""], - amountDelegated: "", - delegationFee: "", - startTimestamp: 8802.98, - endTimestamp: 2539.41, - grossReward: "", - netReward: "", - delegationStatus: "completed", - }, + result: { + delegators: [ + { + txHash: "", + nodeId: "", + rewardAddresses: [ + "", ], - }, + amountDelegated: "", + delegationFee: "", + startTimestamp: 9473.71, + endTimestamp: 2294.42, + grossReward: "", + netReward: "", + delegationStatus: "completed", + }, + ], + }, }; ``` diff --git a/docs/models/operations/listerc1155balancesrequest.md b/docs/models/operations/listerc1155balancesrequest.md index 62adc96..e379a76 100644 --- a/docs/models/operations/listerc1155balancesrequest.md +++ b/docs/models/operations/listerc1155balancesrequest.md @@ -6,10 +6,10 @@ import { ListErc1155BalancesRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListErc1155BalancesRequest = { - blockNumber: "6479329", - pageSize: 10, - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - contractAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + blockNumber: "6479329", + pageSize: 10, + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + contractAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", }; ``` diff --git a/docs/models/operations/listerc1155balancesresponse.md b/docs/models/operations/listerc1155balancesresponse.md index 35cc6d5..cd64243 100644 --- a/docs/models/operations/listerc1155balancesresponse.md +++ b/docs/models/operations/listerc1155balancesresponse.md @@ -6,21 +6,21 @@ import { ListErc1155BalancesResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListErc1155BalancesResponse = { - result: { - erc1155TokenBalances: [ - { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - ercType: "ERC-1155", - tokenId: "", - tokenUri: "", - metadata: { - indexStatus: "INVALID_TOKEN_URI_SCHEME", - }, - chainId: "43114", - balance: "2000000000000000000", - }, - ], - }, + result: { + erc1155TokenBalances: [ + { + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + ercType: "ERC-1155", + tokenId: "", + tokenUri: "", + metadata: { + indexStatus: "INVALID_METADATA", + }, + chainId: "43114", + balance: "2000000000000000000", + }, + ], + }, }; ``` diff --git a/docs/models/operations/listerc1155transactionsrequest.md b/docs/models/operations/listerc1155transactionsrequest.md index 0aebb71..9f13ea7 100644 --- a/docs/models/operations/listerc1155transactionsrequest.md +++ b/docs/models/operations/listerc1155transactionsrequest.md @@ -6,10 +6,10 @@ import { ListErc1155TransactionsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListErc1155TransactionsRequest = { - startBlock: 6479329, - endBlock: 6479330, - pageSize: 10, - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + startBlock: 6479329, + endBlock: 6479330, + pageSize: 10, + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", }; ``` diff --git a/docs/models/operations/listerc1155transactionsresponse.md b/docs/models/operations/listerc1155transactionsresponse.md index 59874a2..b12e35b 100644 --- a/docs/models/operations/listerc1155transactionsresponse.md +++ b/docs/models/operations/listerc1155transactionsresponse.md @@ -6,9 +6,9 @@ import { ListErc1155TransactionsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListErc1155TransactionsResponse = { - result: { - transactions: [], - }, + result: { + transactions: [], + }, }; ``` diff --git a/docs/models/operations/listerc20balancesrequest.md b/docs/models/operations/listerc20balancesrequest.md index 966739a..235f02d 100644 --- a/docs/models/operations/listerc20balancesrequest.md +++ b/docs/models/operations/listerc20balancesrequest.md @@ -6,12 +6,12 @@ import { ListErc20BalancesRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListErc20BalancesRequest = { - blockNumber: "6479329", - pageSize: 10, - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - contractAddresses: - "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7, 0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", - currency: "usd", + blockNumber: "6479329", + pageSize: 10, + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + contractAddresses: + "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7, 0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", + currency: "usd", }; ``` diff --git a/docs/models/operations/listerc20balancesresponse.md b/docs/models/operations/listerc20balancesresponse.md index 88f776c..eb651e1 100644 --- a/docs/models/operations/listerc20balancesresponse.md +++ b/docs/models/operations/listerc20balancesresponse.md @@ -6,9 +6,9 @@ import { ListErc20BalancesResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListErc20BalancesResponse = { - result: { - erc20TokenBalances: [], - }, + result: { + erc20TokenBalances: [], + }, }; ``` diff --git a/docs/models/operations/listerc20transactionsrequest.md b/docs/models/operations/listerc20transactionsrequest.md index b199174..c19290f 100644 --- a/docs/models/operations/listerc20transactionsrequest.md +++ b/docs/models/operations/listerc20transactionsrequest.md @@ -6,10 +6,10 @@ import { ListErc20TransactionsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListErc20TransactionsRequest = { - startBlock: 6479329, - endBlock: 6479330, - pageSize: 10, - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + startBlock: 6479329, + endBlock: 6479330, + pageSize: 10, + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", }; ``` diff --git a/docs/models/operations/listerc20transactionsresponse.md b/docs/models/operations/listerc20transactionsresponse.md index b03ec0f..c4c5b74 100644 --- a/docs/models/operations/listerc20transactionsresponse.md +++ b/docs/models/operations/listerc20transactionsresponse.md @@ -6,9 +6,9 @@ import { ListErc20TransactionsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListErc20TransactionsResponse = { - result: { - transactions: [], - }, + result: { + transactions: [], + }, }; ``` diff --git a/docs/models/operations/listerc721balancesrequest.md b/docs/models/operations/listerc721balancesrequest.md index 0ee4597..f66f8a4 100644 --- a/docs/models/operations/listerc721balancesrequest.md +++ b/docs/models/operations/listerc721balancesrequest.md @@ -6,9 +6,9 @@ import { ListErc721BalancesRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListErc721BalancesRequest = { - pageSize: 10, - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - contractAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", + pageSize: 10, + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + contractAddress: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7", }; ``` diff --git a/docs/models/operations/listerc721balancesresponse.md b/docs/models/operations/listerc721balancesresponse.md index 4350b75..583f48c 100644 --- a/docs/models/operations/listerc721balancesresponse.md +++ b/docs/models/operations/listerc721balancesresponse.md @@ -6,23 +6,23 @@ import { ListErc721BalancesResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListErc721BalancesResponse = { - result: { - erc721TokenBalances: [ - { - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - name: "Wrapped AVAX", - symbol: "WAVAX", - ercType: "ERC-721", - tokenId: "", - tokenUri: "", - metadata: { - indexStatus: "THROTTLED_TOKEN_URI", - }, - ownerAddress: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - chainId: "43114", - }, - ], - }, + result: { + erc721TokenBalances: [ + { + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + name: "Wrapped AVAX", + symbol: "WAVAX", + ercType: "ERC-721", + tokenId: "", + tokenUri: "", + metadata: { + indexStatus: "METADATA_CONTENT_TOO_LARGE", + }, + ownerAddress: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + chainId: "43114", + }, + ], + }, }; ``` diff --git a/docs/models/operations/listerc721transactionsrequest.md b/docs/models/operations/listerc721transactionsrequest.md index df0c056..6d1d81b 100644 --- a/docs/models/operations/listerc721transactionsrequest.md +++ b/docs/models/operations/listerc721transactionsrequest.md @@ -6,10 +6,10 @@ import { ListErc721TransactionsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListErc721TransactionsRequest = { - startBlock: 6479329, - endBlock: 6479330, - pageSize: 10, - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + startBlock: 6479329, + endBlock: 6479330, + pageSize: 10, + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", }; ``` diff --git a/docs/models/operations/listerc721transactionsresponse.md b/docs/models/operations/listerc721transactionsresponse.md index de9f973..cb59598 100644 --- a/docs/models/operations/listerc721transactionsresponse.md +++ b/docs/models/operations/listerc721transactionsresponse.md @@ -6,9 +6,9 @@ import { ListErc721TransactionsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListErc721TransactionsResponse = { - result: { - transactions: [], - }, + result: { + transactions: [], + }, }; ``` diff --git a/docs/models/operations/listhistoricalprimarynetworkrewardsrequest.md b/docs/models/operations/listhistoricalprimarynetworkrewardsrequest.md index 0349ab0..53860a1 100644 --- a/docs/models/operations/listhistoricalprimarynetworkrewardsrequest.md +++ b/docs/models/operations/listhistoricalprimarynetworkrewardsrequest.md @@ -6,11 +6,12 @@ import { ListHistoricalPrimaryNetworkRewardsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListHistoricalPrimaryNetworkRewardsRequest = { - addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", - pageSize: 10, - nodeIds: "NodeID-111111111111111111116DBWJs,NodeID-222222222222222222227DBWJs", - sortOrder: "asc", - currency: "usd", + addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", + pageSize: 10, + nodeIds: + "NodeID-111111111111111111116DBWJs,NodeID-222222222222222222227DBWJs", + sortOrder: "asc", + currency: "usd", }; ``` diff --git a/docs/models/operations/listhistoricalprimarynetworkrewardsresponse.md b/docs/models/operations/listhistoricalprimarynetworkrewardsresponse.md index 6026e15..8d83d13 100644 --- a/docs/models/operations/listhistoricalprimarynetworkrewardsresponse.md +++ b/docs/models/operations/listhistoricalprimarynetworkrewardsresponse.md @@ -6,34 +6,36 @@ import { ListHistoricalPrimaryNetworkRewardsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListHistoricalPrimaryNetworkRewardsResponse = { - result: { - historicalRewards: [ - { - addresses: ["avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg"], - txHash: "", - amountStaked: "", - nodeId: "", - startTimestamp: 5173.79, - endTimestamp: 2768.94, - rewardType: "VALIDATOR", - utxoId: "", - outputIndex: 1749.09, - reward: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - historicalPrice: { - currencyCode: "usd", - value: 42.42, - }, - }, - rewardTxHash: "", - }, + result: { + historicalRewards: [ + { + addresses: [ + "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", ], - }, + txHash: "", + amountStaked: "", + nodeId: "", + startTimestamp: 5867.84, + endTimestamp: 8075.81, + rewardType: "VALIDATOR_FEE", + utxoId: "", + outputIndex: 7470.8, + reward: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + historicalPrice: { + currencyCode: "usd", + value: 42.42, + }, + }, + rewardTxHash: "", + }, + ], + }, }; ``` diff --git a/docs/models/operations/listinternaltransactionsrequest.md b/docs/models/operations/listinternaltransactionsrequest.md index 411906d..be5e833 100644 --- a/docs/models/operations/listinternaltransactionsrequest.md +++ b/docs/models/operations/listinternaltransactionsrequest.md @@ -6,10 +6,10 @@ import { ListInternalTransactionsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListInternalTransactionsRequest = { - startBlock: 6479329, - endBlock: 6479330, - pageSize: 10, - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + startBlock: 6479329, + endBlock: 6479330, + pageSize: 10, + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", }; ``` diff --git a/docs/models/operations/listinternaltransactionsresponse.md b/docs/models/operations/listinternaltransactionsresponse.md index 29f9d9a..5afc807 100644 --- a/docs/models/operations/listinternaltransactionsresponse.md +++ b/docs/models/operations/listinternaltransactionsresponse.md @@ -6,9 +6,9 @@ import { ListInternalTransactionsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListInternalTransactionsResponse = { - result: { - transactions: [], - }, + result: { + transactions: [], + }, }; ``` diff --git a/docs/models/operations/listlatestprimarynetworkblocksrequest.md b/docs/models/operations/listlatestprimarynetworkblocksrequest.md index 46bfe1b..67d649a 100644 --- a/docs/models/operations/listlatestprimarynetworkblocksrequest.md +++ b/docs/models/operations/listlatestprimarynetworkblocksrequest.md @@ -6,8 +6,8 @@ import { ListLatestPrimaryNetworkBlocksRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListLatestPrimaryNetworkBlocksRequest = { - pageSize: 10, - blockchainId: "p-chain", + pageSize: 10, + blockchainId: "p-chain", }; ``` diff --git a/docs/models/operations/listlatestprimarynetworkblocksresponse.md b/docs/models/operations/listlatestprimarynetworkblocksresponse.md index b141ffb..91d9dc1 100644 --- a/docs/models/operations/listlatestprimarynetworkblocksresponse.md +++ b/docs/models/operations/listlatestprimarynetworkblocksresponse.md @@ -6,24 +6,26 @@ import { ListLatestPrimaryNetworkBlocksResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListLatestPrimaryNetworkBlocksResponse = { - result: { - blocks: [ - { - blockNumber: "", - blockHash: "", - parentHash: "", - blockTimestamp: 7316.94, - blockType: "", - txCount: 5844.76, - transactions: [""], - blockSizeBytes: 456.14, - }, + result: { + blocks: [ + { + blockNumber: "", + blockHash: "", + parentHash: "", + blockTimestamp: 7492.55, + blockType: "", + txCount: 5521.93, + transactions: [ + "", ], - chainInfo: { - chainName: "c-chain", - network: "mainnet", - }, + blockSizeBytes: 7316.94, + }, + ], + chainInfo: { + chainName: "x-chain", + network: "mainnet", }, + }, }; ``` diff --git a/docs/models/operations/listlatestprimarynetworktransactionsrequest.md b/docs/models/operations/listlatestprimarynetworktransactionsrequest.md index ad66d2b..9c311b9 100644 --- a/docs/models/operations/listlatestprimarynetworktransactionsrequest.md +++ b/docs/models/operations/listlatestprimarynetworktransactionsrequest.md @@ -6,13 +6,15 @@ import { ListLatestPrimaryNetworkTransactionsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListLatestPrimaryNetworkTransactionsRequest = { - addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", - txTypes: ["AddValidatorTx"], - startTimestamp: 1689541049, - endTimestamp: 1689800249, - pageSize: 10, - blockchainId: "p-chain", - sortOrder: "asc", + addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", + txTypes: [ + "AddValidatorTx", + ], + startTimestamp: 1689541049, + endTimestamp: 1689800249, + pageSize: 10, + blockchainId: "p-chain", + sortOrder: "asc", }; ``` diff --git a/docs/models/operations/listlatestprimarynetworktransactionsresponse.md b/docs/models/operations/listlatestprimarynetworktransactionsresponse.md index e6d352b..2464558 100644 --- a/docs/models/operations/listlatestprimarynetworktransactionsresponse.md +++ b/docs/models/operations/listlatestprimarynetworktransactionsresponse.md @@ -6,13 +6,13 @@ import { ListLatestPrimaryNetworkTransactionsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListLatestPrimaryNetworkTransactionsResponse = { - result: { - transactions: [], - chainInfo: { - chainName: "x-chain", - network: "mainnet", - }, + result: { + transactions: [], + chainInfo: { + chainName: "c-chain", + network: "mainnet", }, + }, }; ``` diff --git a/docs/models/operations/listlatestprimarynetworktransactionsresponsebody.md b/docs/models/operations/listlatestprimarynetworktransactionsresponsebody.md index 68151c0..6d93a41 100644 --- a/docs/models/operations/listlatestprimarynetworktransactionsresponsebody.md +++ b/docs/models/operations/listlatestprimarynetworktransactionsresponsebody.md @@ -8,11 +8,11 @@ Successful response import { ListLatestPrimaryNetworkTransactionsResponseBody } from "@avalabs/avacloud-sdk/models/operations"; let value: ListLatestPrimaryNetworkTransactionsResponseBody = { - transactions: [], - chainInfo: { - chainName: "x-chain", - network: "fuji", - }, + transactions: [], + chainInfo: { + chainName: "x-chain", + network: "mainnet", + }, }; ``` diff --git a/docs/models/operations/listlatesttransactionsrequest.md b/docs/models/operations/listlatesttransactionsrequest.md index 65eb6ab..8725f11 100644 --- a/docs/models/operations/listlatesttransactionsrequest.md +++ b/docs/models/operations/listlatesttransactionsrequest.md @@ -6,7 +6,7 @@ import { ListLatestTransactionsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListLatestTransactionsRequest = { - pageSize: 10, + pageSize: 10, }; ``` diff --git a/docs/models/operations/listlatesttransactionsresponse.md b/docs/models/operations/listlatesttransactionsresponse.md index e511439..fa09ef3 100644 --- a/docs/models/operations/listlatesttransactionsresponse.md +++ b/docs/models/operations/listlatesttransactionsresponse.md @@ -6,9 +6,9 @@ import { ListLatestTransactionsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListLatestTransactionsResponse = { - result: { - transactions: [], - }, + result: { + transactions: [], + }, }; ``` diff --git a/docs/models/operations/listlatestxchainverticesrequest.md b/docs/models/operations/listlatestxchainverticesrequest.md index a8f270a..4130cd0 100644 --- a/docs/models/operations/listlatestxchainverticesrequest.md +++ b/docs/models/operations/listlatestxchainverticesrequest.md @@ -6,8 +6,8 @@ import { ListLatestXChainVerticesRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListLatestXChainVerticesRequest = { - pageSize: 10, - blockchainId: "x-chain", + pageSize: 10, + blockchainId: "x-chain", }; ``` diff --git a/docs/models/operations/listlatestxchainverticesresponse.md b/docs/models/operations/listlatestxchainverticesresponse.md index 9fb9df2..d592d9d 100644 --- a/docs/models/operations/listlatestxchainverticesresponse.md +++ b/docs/models/operations/listlatestxchainverticesresponse.md @@ -6,24 +6,28 @@ import { ListLatestXChainVerticesResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListLatestXChainVerticesResponse = { - result: { - vertices: [ - { - vertexHash: "", - parentHashes: [""], - vertexHeight: 2921.47, - vertexIndex: 2869.15, - vertexTimestamp: 2408.29, - txCount: 6772.63, - transactions: [""], - vertexSizeBytes: 1002.94, - }, + result: { + vertices: [ + { + vertexHash: "", + parentHashes: [ + "", ], - chainInfo: { - chainName: "p-chain", - network: "mainnet", - }, + vertexHeight: 9619.37, + vertexIndex: 2091.57, + vertexTimestamp: 2921.47, + txCount: 2869.15, + transactions: [ + "", + ], + vertexSizeBytes: 2408.29, + }, + ], + chainInfo: { + chainName: "c-chain", + network: "mainnet", }, + }, }; ``` diff --git a/docs/models/operations/listnativetransactionsrequest.md b/docs/models/operations/listnativetransactionsrequest.md index e636cc1..88e23ec 100644 --- a/docs/models/operations/listnativetransactionsrequest.md +++ b/docs/models/operations/listnativetransactionsrequest.md @@ -6,10 +6,10 @@ import { ListNativeTransactionsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListNativeTransactionsRequest = { - startBlock: 6479329, - endBlock: 6479330, - pageSize: 10, - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + startBlock: 6479329, + endBlock: 6479330, + pageSize: 10, + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", }; ``` diff --git a/docs/models/operations/listnativetransactionsresponse.md b/docs/models/operations/listnativetransactionsresponse.md index 74ed7bb..39037db 100644 --- a/docs/models/operations/listnativetransactionsresponse.md +++ b/docs/models/operations/listnativetransactionsresponse.md @@ -6,9 +6,9 @@ import { ListNativeTransactionsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListNativeTransactionsResponse = { - result: { - transactions: [], - }, + result: { + transactions: [], + }, }; ``` diff --git a/docs/models/operations/listpendingprimarynetworkrewardsrequest.md b/docs/models/operations/listpendingprimarynetworkrewardsrequest.md index d304fd2..1183c33 100644 --- a/docs/models/operations/listpendingprimarynetworkrewardsrequest.md +++ b/docs/models/operations/listpendingprimarynetworkrewardsrequest.md @@ -6,10 +6,11 @@ import { ListPendingPrimaryNetworkRewardsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListPendingPrimaryNetworkRewardsRequest = { - addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", - pageSize: 10, - nodeIds: "NodeID-111111111111111111116DBWJs,NodeID-222222222222222222227DBWJs", - sortOrder: "asc", + addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", + pageSize: 10, + nodeIds: + "NodeID-111111111111111111116DBWJs,NodeID-222222222222222222227DBWJs", + sortOrder: "asc", }; ``` diff --git a/docs/models/operations/listpendingprimarynetworkrewardsresponse.md b/docs/models/operations/listpendingprimarynetworkrewardsresponse.md index 9a3bdd4..8b799f8 100644 --- a/docs/models/operations/listpendingprimarynetworkrewardsresponse.md +++ b/docs/models/operations/listpendingprimarynetworkrewardsresponse.md @@ -6,28 +6,30 @@ import { ListPendingPrimaryNetworkRewardsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListPendingPrimaryNetworkRewardsResponse = { - result: { - pendingRewards: [ - { - addresses: ["avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg"], - txHash: "", - amountStaked: "", - nodeId: "", - startTimestamp: 8075.81, - endTimestamp: 8638.56, - rewardType: "VALIDATOR_FEE", - progress: 1175.31, - estimatedReward: { - assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", - name: "Avalanche", - symbol: "AVAX", - denomination: 9, - type: "nft", - amount: "5001000", - }, - }, + result: { + pendingRewards: [ + { + addresses: [ + "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg", ], - }, + txHash: "", + amountStaked: "", + nodeId: "", + startTimestamp: 6462.65, + endTimestamp: 4635.75, + rewardType: "VALIDATOR", + progress: 2776.28, + estimatedReward: { + assetId: "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof", + name: "Avalanche", + symbol: "AVAX", + denomination: 9, + type: "secp256k1", + amount: "5001000", + }, + }, + ], + }, }; ``` diff --git a/docs/models/operations/listprimarynetworkblocksbynodeidrequest.md b/docs/models/operations/listprimarynetworkblocksbynodeidrequest.md index 40a098a..1acbc2e 100644 --- a/docs/models/operations/listprimarynetworkblocksbynodeidrequest.md +++ b/docs/models/operations/listprimarynetworkblocksbynodeidrequest.md @@ -6,9 +6,9 @@ import { ListPrimaryNetworkBlocksByNodeIdRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListPrimaryNetworkBlocksByNodeIdRequest = { - pageSize: 10, - blockchainId: "p-chain", - nodeId: "NodeID-111111111111111111116DBWJs", + pageSize: 10, + blockchainId: "p-chain", + nodeId: "NodeID-111111111111111111116DBWJs", }; ``` diff --git a/docs/models/operations/listprimarynetworkblocksbynodeidresponse.md b/docs/models/operations/listprimarynetworkblocksbynodeidresponse.md index 979127e..bc95e7e 100644 --- a/docs/models/operations/listprimarynetworkblocksbynodeidresponse.md +++ b/docs/models/operations/listprimarynetworkblocksbynodeidresponse.md @@ -6,24 +6,26 @@ import { ListPrimaryNetworkBlocksByNodeIdResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListPrimaryNetworkBlocksByNodeIdResponse = { - result: { - blocks: [ - { - blockNumber: "", - blockHash: "", - parentHash: "", - blockTimestamp: 9037.2, - blockType: "", - txCount: 2174.5, - transactions: [""], - blockSizeBytes: 834.22, - }, + result: { + blocks: [ + { + blockNumber: "", + blockHash: "", + parentHash: "", + blockTimestamp: 7486.64, + blockType: "", + txCount: 925.96, + transactions: [ + "", ], - chainInfo: { - chainName: "c-chain", - network: "fuji", - }, + blockSizeBytes: 9037.2, + }, + ], + chainInfo: { + chainName: "p-chain", + network: "mainnet", }, + }, }; ``` diff --git a/docs/models/operations/listsubnetsrequest.md b/docs/models/operations/listsubnetsrequest.md index 1d25da5..505dc55 100644 --- a/docs/models/operations/listsubnetsrequest.md +++ b/docs/models/operations/listsubnetsrequest.md @@ -6,8 +6,8 @@ import { ListSubnetsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListSubnetsRequest = { - pageSize: 10, - sortOrder: "asc", + pageSize: 10, + sortOrder: "asc", }; ``` diff --git a/docs/models/operations/listsubnetsresponse.md b/docs/models/operations/listsubnetsresponse.md index 65b651b..36ed945 100644 --- a/docs/models/operations/listsubnetsresponse.md +++ b/docs/models/operations/listsubnetsresponse.md @@ -6,28 +6,32 @@ import { ListSubnetsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListSubnetsResponse = { - result: { - subnets: [ - { - createBlockTimestamp: 7887.4, - createBlockIndex: "", - subnetId: "", - ownerAddresses: [""], - threshold: 9473.71, - locktime: 2294.42, - subnetOwnershipInfo: { - locktime: 0, - threshold: 1, - addresses: ["avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"], - }, - blockchains: [ - { - blockchainId: "", - }, - ], - }, + result: { + subnets: [ + { + createBlockTimestamp: 6874.88, + createBlockIndex: "", + subnetId: "", + ownerAddresses: [ + "", ], - }, + threshold: 4834.09, + locktime: 2155.07, + subnetOwnershipInfo: { + locktime: 0, + threshold: 1, + addresses: [ + "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw", + ], + }, + blockchains: [ + { + blockchainId: "", + }, + ], + }, + ], + }, }; ``` diff --git a/docs/models/operations/listteleportermessagesbyaddressrequest.md b/docs/models/operations/listteleportermessagesbyaddressrequest.md new file mode 100644 index 0000000..0475e6a --- /dev/null +++ b/docs/models/operations/listteleportermessagesbyaddressrequest.md @@ -0,0 +1,22 @@ +# ListTeleporterMessagesByAddressRequest + +## Example Usage + +```typescript +import { ListTeleporterMessagesByAddressRequest } from "@avalabs/avacloud-sdk/models/operations"; + +let value: ListTeleporterMessagesByAddressRequest = { + pageSize: 10, + address: "0x8578AE7723751446B196bD5124e1bF57B40EB7Bc", + network: "mainnet", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `pageToken` | *string* | :heavy_minus_sign: | A page token, received from a previous list call. Provide this to retrieve the subsequent page. | | +| `pageSize` | *number* | :heavy_minus_sign: | The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. | 10 | +| `address` | *string* | :heavy_check_mark: | An EVM address. | 0x8578AE7723751446B196bD5124e1bF57B40EB7Bc | +| `network` | [components.NetworkType](../../models/components/networktype.md) | :heavy_minus_sign: | mainnet or testnet. | mainnet | \ No newline at end of file diff --git a/docs/models/operations/listteleportermessagesrequest.md b/docs/models/operations/listteleportermessagesrequest.md index dcb086e..8ccace4 100644 --- a/docs/models/operations/listteleportermessagesrequest.md +++ b/docs/models/operations/listteleportermessagesrequest.md @@ -6,12 +6,12 @@ import { ListTeleporterMessagesRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListTeleporterMessagesRequest = { - pageSize: 10, - sourceBlockchainId: "2D8RG4UpSXbPbvPCAWppNJyqTG2i2CAXSkTgmTBBvs7GKNZjsY", - destinationBlockchainId: "yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp", - to: "0x664A4Be5Af2cFc824F9C0914CbAc4703396Da2DC", - from: "0x321eDA69247566D662178feE695C7026c604Cd94", - network: "mainnet", + pageSize: 10, + sourceBlockchainId: "2D8RG4UpSXbPbvPCAWppNJyqTG2i2CAXSkTgmTBBvs7GKNZjsY", + destinationBlockchainId: "yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp", + to: "0x664A4Be5Af2cFc824F9C0914CbAc4703396Da2DC", + from: "0x321eDA69247566D662178feE695C7026c604Cd94", + network: "mainnet", }; ``` diff --git a/docs/models/operations/listteleportermessagesresponse.md b/docs/models/operations/listteleportermessagesresponse.md index 2d00a0e..45f725c 100644 --- a/docs/models/operations/listteleportermessagesresponse.md +++ b/docs/models/operations/listteleportermessagesresponse.md @@ -6,9 +6,9 @@ import { ListTeleporterMessagesResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListTeleporterMessagesResponse = { - result: { - messages: [], - }, + result: { + messages: [], + }, }; ``` diff --git a/docs/models/operations/listtokensrequest.md b/docs/models/operations/listtokensrequest.md index 6f689cf..04685bd 100644 --- a/docs/models/operations/listtokensrequest.md +++ b/docs/models/operations/listtokensrequest.md @@ -6,8 +6,8 @@ import { ListTokensRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListTokensRequest = { - pageSize: 10, - address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + pageSize: 10, + address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", }; ``` diff --git a/docs/models/operations/listtokensresponse.md b/docs/models/operations/listtokensresponse.md index 610f30c..8a1fa3a 100644 --- a/docs/models/operations/listtokensresponse.md +++ b/docs/models/operations/listtokensresponse.md @@ -6,9 +6,9 @@ import { ListTokensResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListTokensResponse = { - result: { - tokens: [], - }, + result: { + tokens: [], + }, }; ``` diff --git a/docs/models/operations/listtransactionsrequest.md b/docs/models/operations/listtransactionsrequest.md index d9712da..f6c4b73 100644 --- a/docs/models/operations/listtransactionsrequest.md +++ b/docs/models/operations/listtransactionsrequest.md @@ -6,11 +6,11 @@ import { ListTransactionsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListTransactionsRequest = { - pageSize: 10, - startBlock: 6479329, - endBlock: 6479330, - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", - sortOrder: "asc", + pageSize: 10, + startBlock: 6479329, + endBlock: 6479330, + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + sortOrder: "asc", }; ``` diff --git a/docs/models/operations/listtransactionsresponse.md b/docs/models/operations/listtransactionsresponse.md index d3d8500..514db5c 100644 --- a/docs/models/operations/listtransactionsresponse.md +++ b/docs/models/operations/listtransactionsresponse.md @@ -6,9 +6,9 @@ import { ListTransactionsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListTransactionsResponse = { - result: { - transactions: [], - }, + result: { + transactions: [], + }, }; ``` diff --git a/docs/models/operations/listtransfersrequest.md b/docs/models/operations/listtransfersrequest.md index 4700f7b..f95cb68 100644 --- a/docs/models/operations/listtransfersrequest.md +++ b/docs/models/operations/listtransfersrequest.md @@ -6,10 +6,10 @@ import { ListTransfersRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListTransfersRequest = { - startBlock: 6479329, - endBlock: 6479330, - pageSize: 10, - address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", + startBlock: 6479329, + endBlock: 6479330, + pageSize: 10, + address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", }; ``` diff --git a/docs/models/operations/listtransfersresponse.md b/docs/models/operations/listtransfersresponse.md index bfe76a6..88ff7a1 100644 --- a/docs/models/operations/listtransfersresponse.md +++ b/docs/models/operations/listtransfersresponse.md @@ -6,9 +6,9 @@ import { ListTransfersResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListTransfersResponse = { - result: { - transfers: [], - }, + result: { + transfers: [], + }, }; ``` diff --git a/docs/models/operations/listvalidatorsrequest.md b/docs/models/operations/listvalidatorsrequest.md index 013bcec..741b6f6 100644 --- a/docs/models/operations/listvalidatorsrequest.md +++ b/docs/models/operations/listvalidatorsrequest.md @@ -6,19 +6,20 @@ import { ListValidatorsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListValidatorsRequest = { - pageSize: 10, - nodeIds: "NodeID-111111111111111111116DBWJs,NodeID-222222222222222222227DBWJs", - sortOrder: "asc", - validationStatus: "completed", - minDelegationCapacity: "0", - maxDelegationCapacity: "720000000000000000", - minTimeRemaining: 0, - maxTimeRemaining: 2147483647, - minFeePercentage: 2, - maxFeePercentage: 100, - minUptimePerformance: 90, - maxUptimePerformance: 100, - subnetId: "11111111111111111111111111111111LpoYY", + pageSize: 10, + nodeIds: + "NodeID-111111111111111111116DBWJs,NodeID-222222222222222222227DBWJs", + sortOrder: "asc", + validationStatus: "completed", + minDelegationCapacity: "0", + maxDelegationCapacity: "720000000000000000", + minTimeRemaining: 0, + maxTimeRemaining: 2147483647, + minFeePercentage: 2, + maxFeePercentage: 100, + minUptimePerformance: 90, + maxUptimePerformance: 100, + subnetId: "11111111111111111111111111111111LpoYY", }; ``` diff --git a/docs/models/operations/listvalidatorsresponse.md b/docs/models/operations/listvalidatorsresponse.md index 94d1cd0..d0d7b32 100644 --- a/docs/models/operations/listvalidatorsresponse.md +++ b/docs/models/operations/listvalidatorsresponse.md @@ -6,9 +6,9 @@ import { ListValidatorsResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListValidatorsResponse = { - result: { - validators: [], - }, + result: { + validators: [], + }, }; ``` diff --git a/docs/models/operations/listwebhooksrequest.md b/docs/models/operations/listwebhooksrequest.md index 4121c09..0658edb 100644 --- a/docs/models/operations/listwebhooksrequest.md +++ b/docs/models/operations/listwebhooksrequest.md @@ -6,8 +6,8 @@ import { ListWebhooksRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ListWebhooksRequest = { - pageSize: 10, - status: "active", + pageSize: 10, + status: "active", }; ``` diff --git a/docs/models/operations/listwebhooksresponse.md b/docs/models/operations/listwebhooksresponse.md index e52796b..af65a8c 100644 --- a/docs/models/operations/listwebhooksresponse.md +++ b/docs/models/operations/listwebhooksresponse.md @@ -6,26 +6,28 @@ import { ListWebhooksResponse } from "@avalabs/avacloud-sdk/models/operations"; let value: ListWebhooksResponse = { - result: { - webhooks: [ - { - id: "", - eventType: "address_activity", - metadata: { - addresses: ["0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"], - eventSignatures: [ - "0x61cbb2a3dee0b6064c2e681aadd61677fb4ef319f0b547508d495626f5a62f64", - ], - }, - url: "https://joint-curler.org", - chainId: "", - status: "inactive", - createdAt: 4922.68, - name: "", - description: "User-centric non-volatile projection", - }, - ], - }, + result: { + webhooks: [ + { + id: "", + eventType: "address_activity", + metadata: { + addresses: [ + "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + ], + eventSignatures: [ + "0x61cbb2a3dee0b6064c2e681aadd61677fb4ef319f0b547508d495626f5a62f64", + ], + }, + url: "http://eager-vivo.info", + chainId: "", + status: "active", + createdAt: 8788.7, + name: "", + description: "User-centric human-resource task-force", + }, + ], + }, }; ``` diff --git a/docs/models/operations/metricshealthcheckresponsebody.md b/docs/models/operations/metricshealthcheckresponsebody.md index 413800a..f205b0d 100644 --- a/docs/models/operations/metricshealthcheckresponsebody.md +++ b/docs/models/operations/metricshealthcheckresponsebody.md @@ -8,20 +8,20 @@ The Health Check is successful import { MetricsHealthCheckResponseBody } from "@avalabs/avacloud-sdk/models/operations"; let value: MetricsHealthCheckResponseBody = { - status: "ok", - info: { - database: { - status: "up", - additionalProperties: {}, - }, + status: "ok", + info: { + "database": { + status: "up", + additionalProperties: {}, }, - error: {}, - details: { - database: { - status: "up", - additionalProperties: {}, - }, + }, + error: {}, + details: { + "database": { + status: "up", + additionalProperties: {}, }, + }, }; ``` diff --git a/docs/models/operations/posttransactionexportjobrequestbody.md b/docs/models/operations/posttransactionexportjobrequestbody.md index cdcf8a9..d927b5c 100644 --- a/docs/models/operations/posttransactionexportjobrequestbody.md +++ b/docs/models/operations/posttransactionexportjobrequestbody.md @@ -6,15 +6,16 @@ import { PostTransactionExportJobRequestBody } from "@avalabs/avacloud-sdk/models/operations"; let value: PostTransactionExportJobRequestBody = { - type: "TRANSACTION_EXPORT_EVM", - firstDate: "2023-05-01", - lastDate: "2023-05-02", - startDate: "2023-05-01", - endDate: "2023-05-02", - options: { - addresses: [""], - includeChains: ["43114"], - }, + type: "TRANSACTION_EXPORT_PRIMARY_NETWORK_SIMPLE", + firstDate: "2023-05-01", + lastDate: "2023-05-02", + startDate: "2023-05-01", + endDate: "2023-05-02", + options: { + includeChains: [ + "p-chain", + ], + }, }; ``` diff --git a/docs/models/operations/reindexnftrequest.md b/docs/models/operations/reindexnftrequest.md index da05669..5f99db4 100644 --- a/docs/models/operations/reindexnftrequest.md +++ b/docs/models/operations/reindexnftrequest.md @@ -6,8 +6,8 @@ import { ReindexNftRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: ReindexNftRequest = { - address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", - tokenId: "145", + address: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + tokenId: "145", }; ``` diff --git a/docs/models/operations/removeaddressesfromwebhookrequest.md b/docs/models/operations/removeaddressesfromwebhookrequest.md index 039248f..a53b6d8 100644 --- a/docs/models/operations/removeaddressesfromwebhookrequest.md +++ b/docs/models/operations/removeaddressesfromwebhookrequest.md @@ -6,10 +6,12 @@ import { RemoveAddressesFromWebhookRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: RemoveAddressesFromWebhookRequest = { - id: "f33de69c-d13b-4691-908f-870d6e2e6b04", - addressesChangeRequest: { - addresses: ["0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"], - }, + id: "f33de69c-d13b-4691-908f-870d6e2e6b04", + addressesChangeRequest: { + addresses: [ + "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + ], + }, }; ``` diff --git a/docs/models/operations/requesttype.md b/docs/models/operations/requesttype.md index 785f3c2..20a9bba 100644 --- a/docs/models/operations/requesttype.md +++ b/docs/models/operations/requesttype.md @@ -7,7 +7,7 @@ Filter data by request type. ```typescript import { RequestType } from "@avalabs/avacloud-sdk/models/operations"; -let value: RequestType = "data"; +let value: RequestType = "rpc"; ``` ## Values diff --git a/docs/models/operations/supportedchainsrequest.md b/docs/models/operations/supportedchainsrequest.md index f4ed01d..6541ae4 100644 --- a/docs/models/operations/supportedchainsrequest.md +++ b/docs/models/operations/supportedchainsrequest.md @@ -6,8 +6,8 @@ import { SupportedChainsRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: SupportedChainsRequest = { - network: "mainnet", - feature: "nftIndexing", + network: "mainnet", + feature: "nftIndexing", }; ``` diff --git a/docs/models/operations/updatewebhookrequest.md b/docs/models/operations/updatewebhookrequest.md index 21d4656..269037f 100644 --- a/docs/models/operations/updatewebhookrequest.md +++ b/docs/models/operations/updatewebhookrequest.md @@ -6,8 +6,8 @@ import { UpdateWebhookRequest } from "@avalabs/avacloud-sdk/models/operations"; let value: UpdateWebhookRequest = { - id: "f33de69c-d13b-4691-908f-870d6e2e6b04", - updateWebhookRequest: {}, + id: "f33de69c-d13b-4691-908f-870d6e2e6b04", + updateWebhookRequest: {}, }; ``` diff --git a/docs/sdks/avacloudsdkmetrics/README.md b/docs/sdks/avacloudsdkmetrics/README.md index 5b30aec..520455e 100644 --- a/docs/sdks/avacloudsdkmetrics/README.md +++ b/docs/sdks/avacloudsdkmetrics/README.md @@ -6,6 +6,7 @@ ### Available Operations * [getEvmChainMetrics](#getevmchainmetrics) - Get metrics for EVM chains +* [getTeleporterMetricsByChain](#getteleportermetricsbychain) - Get teleporter metrics for EVM chains * [getEvmChainRollingWindowMetrics](#getevmchainrollingwindowmetrics) - Get rolling window metrics for EVM chains * [getStakingMetrics](#getstakingmetrics) - Get staking metrics for a given subnet @@ -111,6 +112,96 @@ run(); | errors.SDKError | 4xx-5xx | */* | +## getTeleporterMetricsByChain + +Gets teleporter metrics for an EVM chain. + +### Example Usage + +```typescript +import { AvaCloudSDK } from "@avalabs/avacloud-sdk"; + +const avaCloudSDK = new AvaCloudSDK({ + apiKey: "", + chainId: "43114", + network: "mainnet", +}); + +async function run() { + const result = await avaCloudSDK.metrics.chain.metrics.getTeleporterMetricsByChain({ + metric: "teleporterSourceTxnCount", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { AvaCloudSDKCore } from "@avalabs/avacloud-sdk/core.js"; +import { metricsChainMetricsGetTeleporterMetricsByChain } from "@avalabs/avacloud-sdk/funcs/metricsChainMetricsGetTeleporterMetricsByChain.js"; + +// Use `AvaCloudSDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const avaCloudSDK = new AvaCloudSDKCore({ + apiKey: "", + chainId: "43114", + network: "mainnet", +}); + +async function run() { + const res = await metricsChainMetricsGetTeleporterMetricsByChain(avaCloudSDK, { + metric: "teleporterSourceTxnCount", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTeleporterMetricsByChainRequest](../../models/operations/getteleportermetricsbychainrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `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.TeleporterChainMetricsApiResponse](../../models/components/teleporterchainmetricsapiresponse.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.TooManyRequests | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.BadGateway | 502 | application/json | +| errors.ServiceUnavailable | 503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + ## getEvmChainRollingWindowMetrics Gets the rolling window metrics for an EVM chain for the last hour, day, month, year, and all time. diff --git a/docs/sdks/chains/README.md b/docs/sdks/chains/README.md index 4e68618..73256fb 100644 --- a/docs/sdks/chains/README.md +++ b/docs/sdks/chains/README.md @@ -10,7 +10,7 @@ ## listChains -Get a list of Popsicle API supported blockchains. +Get a list of Metrics API supported blockchains. ### Example Usage @@ -104,7 +104,7 @@ run(); ## getChain -Get chain information for Popsicle API supported blockchain. +Get chain information for Metrics API supported blockchain. ### Example Usage diff --git a/docs/sdks/teleporter/README.md b/docs/sdks/teleporter/README.md index 85e7466..549e4dd 100644 --- a/docs/sdks/teleporter/README.md +++ b/docs/sdks/teleporter/README.md @@ -7,6 +7,7 @@ * [getTeleporterMessage](#getteleportermessage) - Get a teleporter message * [listTeleporterMessages](#listteleportermessages) - List teleporter messages +* [listTeleporterMessagesByAddress](#listteleportermessagesbyaddress) - List teleporter messages by address ## getTeleporterMessage @@ -200,3 +201,97 @@ run(); | errors.BadGateway | 502 | application/json | | errors.ServiceUnavailable | 503 | application/json | | errors.SDKError | 4xx-5xx | */* | + + +## listTeleporterMessagesByAddress + +Lists teleporter messages by address. Ordered by timestamp in descending order. + +### Example Usage + +```typescript +import { AvaCloudSDK } from "@avalabs/avacloud-sdk"; + +const avaCloudSDK = new AvaCloudSDK({ + apiKey: "", + chainId: "43114", + network: "mainnet", +}); + +async function run() { + const result = await avaCloudSDK.data.teleporter.listTeleporterMessagesByAddress({ + pageSize: 10, + address: "0x8578AE7723751446B196bD5124e1bF57B40EB7Bc", + network: "mainnet", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { AvaCloudSDKCore } from "@avalabs/avacloud-sdk/core.js"; +import { dataTeleporterListTeleporterMessagesByAddress } from "@avalabs/avacloud-sdk/funcs/dataTeleporterListTeleporterMessagesByAddress.js"; + +// Use `AvaCloudSDKCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const avaCloudSDK = new AvaCloudSDKCore({ + apiKey: "", + chainId: "43114", + network: "mainnet", +}); + +async function run() { + const res = await dataTeleporterListTeleporterMessagesByAddress(avaCloudSDK, { + pageSize: 10, + address: "0x8578AE7723751446B196bD5124e1bF57B40EB7Bc", + network: "mainnet", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListTeleporterMessagesByAddressRequest](../../models/operations/listteleportermessagesbyaddressrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `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.ListTeleporterMessagesResponse](../../models/components/listteleportermessagesresponse.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequest | 400 | application/json | +| errors.Unauthorized | 401 | application/json | +| errors.Forbidden | 403 | application/json | +| errors.NotFound | 404 | application/json | +| errors.TooManyRequests | 429 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.BadGateway | 502 | application/json | +| errors.ServiceUnavailable | 503 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/package-lock.json b/package-lock.json index aa50931..be410da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@avalabs/avacloud-sdk", - "version": "0.4.1", + "version": "0.5.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@avalabs/avacloud-sdk", - "version": "0.4.1", + "version": "0.5.0", "license": "SEE LICENSE", "dependencies": { "json-canonicalize": "^1.0.6" diff --git a/package.json b/package.json index 3a67e1c..9d62af1 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "@avalabs/avacloud-sdk", - "version": "0.4.1", + "version": "0.5.0", "author": "AvaCloud", - "homepage": "https://developer.avacloud.io/avacloud-sdk/getting-started", "license": "SEE LICENSE", + "homepage": "https://developer.avacloud.io/avacloud-sdk/getting-started", "main": "./index.js", "sideEffects": false, "repository": { @@ -13,7 +13,7 @@ "scripts": { "lint": "eslint --max-warnings=0 src", "build": "tsc", - "prepare": "npm run build" + "prepublishOnly": "npm run build" }, "peerDependencies": { "zod": ">= 3" diff --git a/src/funcs/dataEvmBalancesGetNativeBalance.ts b/src/funcs/dataEvmBalancesGetNativeBalance.ts index edde820..db2b52d 100644 --- a/src/funcs/dataEvmBalancesGetNativeBalance.ts +++ b/src/funcs/dataEvmBalancesGetNativeBalance.ts @@ -4,8 +4,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -36,155 +36,163 @@ import { Result } from "../types/fp.js"; * Balance at a given block can be retrieved with the `blockNumber` parameter. */ export async function dataEvmBalancesGetNativeBalance( - client$: AvaCloudSDKCore, - request: operations.GetNativeBalanceRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetNativeBalanceRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.GetNativeBalanceResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.GetNativeBalanceResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetNativeBalanceRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetNativeBalanceRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(GetNativeBalanceServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetNativeBalanceServerList[0], { charEncoding: "percent" })(); - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; - const path$ = pathToFunc("/v1/chains/{chainId}/addresses/{address}/balances:getNative")( - pathParams$ - ); + const path$ = pathToFunc( + "/v1/chains/{chainId}/addresses/{address}/balances:getNative", + )(pathParams$); - const query$ = encodeFormQuery$({ - blockNumber: payload$.blockNumber, - currency: payload$.currency, - }); + const query$ = encodeFormQuery$({ + "blockNumber": payload$.blockNumber, + "currency": payload$.currency, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getNativeBalance", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getNativeBalance", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.GetNativeBalanceResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.GetNativeBalanceResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.GetNativeBalanceResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.GetNativeBalanceResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataEvmBalancesListCollectibleBalances.ts b/src/funcs/dataEvmBalancesListCollectibleBalances.ts index 76357e6..a4c5d32 100644 --- a/src/funcs/dataEvmBalancesListCollectibleBalances.ts +++ b/src/funcs/dataEvmBalancesListCollectibleBalances.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListCollectibleBalancesServerList } from "../models/operations/listcollectiblebalances.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List collectible (ERC-721/ERC-1155) balances @@ -37,198 +42,211 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Balance for a specific contract can be retrieved with the `contractAddress` parameter. */ export async function dataEvmBalancesListCollectibleBalances( - client$: AvaCloudSDKCore, - request: operations.ListCollectibleBalancesRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListCollectibleBalancesRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListCollectibleBalancesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListCollectibleBalancesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListCollectibleBalancesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListCollectibleBalancesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListCollectibleBalancesServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/chains/{chainId}/addresses/{address}/balances:listCollectibles", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "contractAddress": payload$.contractAddress, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listCollectibleBalances", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListCollectibleBalancesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListCollectibleBalancesResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListCollectibleBalancesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListCollectibleBalancesServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/chains/{chainId}/addresses/{address}/balances:listCollectibles")( - pathParams$ - ); - - const query$ = encodeFormQuery$({ - contractAddress: payload$.contractAddress, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listCollectibleBalances", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataEvmBalancesListCollectibleBalances( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListCollectibleBalancesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListCollectibleBalancesResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListCollectibleBalancesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataEvmBalancesListCollectibleBalances( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataEvmBalancesListErc1155Balances.ts b/src/funcs/dataEvmBalancesListErc1155Balances.ts index 14b34f8..0fa5715 100644 --- a/src/funcs/dataEvmBalancesListErc1155Balances.ts +++ b/src/funcs/dataEvmBalancesListErc1155Balances.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListErc1155BalancesServerList } from "../models/operations/listerc1155balances.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List ERC-1155 balances @@ -39,199 +44,212 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Balance for a specific contract can be retrieved with the `contractAddress` parameter. */ export async function dataEvmBalancesListErc1155Balances( - client$: AvaCloudSDKCore, - request: operations.ListErc1155BalancesRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListErc1155BalancesRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListErc1155BalancesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListErc1155BalancesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListErc1155BalancesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListErc1155BalancesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListErc1155BalancesServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/chains/{chainId}/addresses/{address}/balances:listErc1155", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "blockNumber": payload$.blockNumber, + "contractAddress": payload$.contractAddress, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listErc1155Balances", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListErc1155BalancesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListErc1155BalancesResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListErc1155BalancesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListErc1155BalancesServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/chains/{chainId}/addresses/{address}/balances:listErc1155")( - pathParams$ - ); - - const query$ = encodeFormQuery$({ - blockNumber: payload$.blockNumber, - contractAddress: payload$.contractAddress, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listErc1155Balances", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataEvmBalancesListErc1155Balances( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListErc1155BalancesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListErc1155BalancesResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListErc1155BalancesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataEvmBalancesListErc1155Balances( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataEvmBalancesListErc20Balances.ts b/src/funcs/dataEvmBalancesListErc20Balances.ts index 87500dc..e612869 100644 --- a/src/funcs/dataEvmBalancesListErc20Balances.ts +++ b/src/funcs/dataEvmBalancesListErc20Balances.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListErc20BalancesServerList } from "../models/operations/listerc20balances.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List ERC-20 balances @@ -39,201 +44,214 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Balance for specific contracts can be retrieved with the `contractAddresses` parameter. */ export async function dataEvmBalancesListErc20Balances( - client$: AvaCloudSDKCore, - request: operations.ListErc20BalancesRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListErc20BalancesRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListErc20BalancesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListErc20BalancesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListErc20BalancesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListErc20BalancesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListErc20BalancesServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/chains/{chainId}/addresses/{address}/balances:listErc20", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "blockNumber": payload$.blockNumber, + "contractAddresses": payload$.contractAddresses, + "currency": payload$.currency, + "filterSpamTokens": payload$.filterSpamTokens, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listErc20Balances", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListErc20BalancesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListErc20BalancesResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListErc20BalancesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListErc20BalancesServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/chains/{chainId}/addresses/{address}/balances:listErc20")( - pathParams$ - ); - - const query$ = encodeFormQuery$({ - blockNumber: payload$.blockNumber, - contractAddresses: payload$.contractAddresses, - currency: payload$.currency, - filterSpamTokens: payload$.filterSpamTokens, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listErc20Balances", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataEvmBalancesListErc20Balances( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListErc20BalancesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListErc20BalancesResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListErc20BalancesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataEvmBalancesListErc20Balances( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataEvmBalancesListErc721Balances.ts b/src/funcs/dataEvmBalancesListErc721Balances.ts index 08f91f0..77bbe5c 100644 --- a/src/funcs/dataEvmBalancesListErc721Balances.ts +++ b/src/funcs/dataEvmBalancesListErc721Balances.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListErc721BalancesServerList } from "../models/operations/listerc721balances.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List ERC-721 balances @@ -37,198 +42,211 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Balance for a specific contract can be retrieved with the `contractAddress` parameter. */ export async function dataEvmBalancesListErc721Balances( - client$: AvaCloudSDKCore, - request: operations.ListErc721BalancesRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListErc721BalancesRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListErc721BalancesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListErc721BalancesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListErc721BalancesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListErc721BalancesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListErc721BalancesServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/chains/{chainId}/addresses/{address}/balances:listErc721", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "contractAddress": payload$.contractAddress, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listErc721Balances", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListErc721BalancesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListErc721BalancesResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListErc721BalancesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListErc721BalancesServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/chains/{chainId}/addresses/{address}/balances:listErc721")( - pathParams$ - ); - - const query$ = encodeFormQuery$({ - contractAddress: payload$.contractAddress, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listErc721Balances", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataEvmBalancesListErc721Balances( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListErc721BalancesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListErc721BalancesResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListErc721BalancesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataEvmBalancesListErc721Balances( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataEvmBlocksGetBlock.ts b/src/funcs/dataEvmBlocksGetBlock.ts index 5222e95..8947016 100644 --- a/src/funcs/dataEvmBlocksGetBlock.ts +++ b/src/funcs/dataEvmBlocksGetBlock.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -31,146 +31,157 @@ import { Result } from "../types/fp.js"; * Gets the details of an individual block on the EVM-compatible chain. */ export async function dataEvmBlocksGetBlock( - client$: AvaCloudSDKCore, - request: operations.GetBlockRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetBlockRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.GetEvmBlockResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.GetEvmBlockResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetBlockRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetBlockRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || pathToFunc(GetBlockServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetBlockServerList[0], { charEncoding: "percent" })(); - const pathParams$ = { - blockId: encodeSimple$("blockId", payload$.blockId, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + blockId: encodeSimple$("blockId", payload$.blockId, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; - const path$ = pathToFunc("/v1/chains/{chainId}/blocks/{blockId}")(pathParams$); + const path$ = pathToFunc("/v1/chains/{chainId}/blocks/{blockId}")( + pathParams$, + ); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getBlock", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getBlock", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.GetEvmBlockResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.GetEvmBlockResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.GetEvmBlockResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.GetEvmBlockResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataEvmBlocksGetLatestBlocks.ts b/src/funcs/dataEvmBlocksGetLatestBlocks.ts index a0f3871..c528f96 100644 --- a/src/funcs/dataEvmBlocksGetLatestBlocks.ts +++ b/src/funcs/dataEvmBlocksGetLatestBlocks.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { GetLatestBlocksServerList } from "../models/operations/getlatestblocks.js"; import * as operations from "../models/operations/index.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List latest blocks @@ -35,191 +40,201 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists the latest indexed blocks on the EVM-compatible chain sorted in descending order by block timestamp. */ export async function dataEvmBlocksGetLatestBlocks( - client$: AvaCloudSDKCore, - request: operations.GetLatestBlocksRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetLatestBlocksRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.GetLatestBlocksResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.GetLatestBlocksResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = typeof request === "undefined" ? {} : request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetLatestBlocksRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetLatestBlocksRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(GetLatestBlocksServerList[0], { charEncoding: "percent" })(); + + const pathParams$ = { + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc("/v1/chains/{chainId}/blocks")(pathParams$); + + const query$ = encodeFormQuery$({ + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getLatestBlocks", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.GetLatestBlocksResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetLatestBlocksResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.GetLatestBlocksResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(GetLatestBlocksServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/chains/{chainId}/blocks")(pathParams$); - - const query$ = encodeFormQuery$({ - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getLatestBlocks", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataEvmBlocksGetLatestBlocks( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.GetLatestBlocksResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetLatestBlocksResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.GetLatestBlocksResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataEvmBlocksGetLatestBlocks( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataEvmChainsGetChainInfo.ts b/src/funcs/dataEvmChainsGetChainInfo.ts index 4b7c9b9..9036602 100644 --- a/src/funcs/dataEvmChainsGetChainInfo.ts +++ b/src/funcs/dataEvmChainsGetChainInfo.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -31,142 +31,151 @@ import { Result } from "../types/fp.js"; * Gets chain information for the EVM-compatible chain if supported by the api. */ export async function dataEvmChainsGetChainInfo( - client$: AvaCloudSDKCore, - request: operations.GetChainInfoRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetChainInfoRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.GetChainResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.GetChainResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = typeof request === "undefined" ? {} : request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetChainInfoRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetChainInfoRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || pathToFunc(GetChainInfoServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetChainInfoServerList[0], { charEncoding: "percent" })(); - const pathParams$ = { - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; - const path$ = pathToFunc("/v1/chains/{chainId}")(pathParams$); + const path$ = pathToFunc("/v1/chains/{chainId}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getChainInfo", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getChainInfo", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.GetChainResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.GetChainResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.GetChainResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.GetChainResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataEvmChainsSupportedChains.ts b/src/funcs/dataEvmChainsSupportedChains.ts index 15104c3..7c86a40 100644 --- a/src/funcs/dataEvmChainsSupportedChains.ts +++ b/src/funcs/dataEvmChainsSupportedChains.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -31,142 +31,149 @@ import { Result } from "../types/fp.js"; * Lists the supported EVM-compatible chains. Filterable by network. */ export async function dataEvmChainsSupportedChains( - client$: AvaCloudSDKCore, - request: operations.SupportedChainsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.SupportedChainsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.DataListChainsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.DataListChainsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = typeof request === "undefined" ? {} : request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.SupportedChainsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.SupportedChainsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(SupportedChainsServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(SupportedChainsServerList[0], { charEncoding: "percent" })(); - const path$ = pathToFunc("/v1/chains")(); + const path$ = pathToFunc("/v1/chains")(); - const query$ = encodeFormQuery$({ - feature: payload$.feature, - network: payload$.network, - }); + const query$ = encodeFormQuery$({ + "feature": payload$.feature, + "network": payload$.network, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "supportedChains", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "supportedChains", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.DataListChainsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.DataListChainsResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.DataListChainsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.DataListChainsResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataEvmContractsGetContractMetadata.ts b/src/funcs/dataEvmContractsGetContractMetadata.ts index f691009..6b411e8 100644 --- a/src/funcs/dataEvmContractsGetContractMetadata.ts +++ b/src/funcs/dataEvmContractsGetContractMetadata.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -30,147 +30,160 @@ import { Result } from "../types/fp.js"; * Gets metadata about the contract at the given address. */ export async function dataEvmContractsGetContractMetadata( - client$: AvaCloudSDKCore, - request: operations.GetContractMetadataRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetContractMetadataRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - operations.GetContractMetadataResponseBody, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetContractMetadataResponseBody, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetContractMetadataRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetContractMetadataRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(GetContractMetadataServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetContractMetadataServerList[0], { + charEncoding: "percent", + })(); - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; - const path$ = pathToFunc("/v1/chains/{chainId}/addresses/{address}")(pathParams$); + const path$ = pathToFunc("/v1/chains/{chainId}/addresses/{address}")( + pathParams$, + ); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getContractMetadata", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getContractMetadata", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - operations.GetContractMetadataResponseBody, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetContractMetadataResponseBody$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + operations.GetContractMetadataResponseBody, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetContractMetadataResponseBody$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataEvmTransactionsGetDeploymentTransaction.ts b/src/funcs/dataEvmTransactionsGetDeploymentTransaction.ts index 8b09362..bae4746 100644 --- a/src/funcs/dataEvmTransactionsGetDeploymentTransaction.ts +++ b/src/funcs/dataEvmTransactionsGetDeploymentTransaction.ts @@ -4,8 +4,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -34,154 +34,165 @@ import { Result } from "../types/fp.js"; * If the address is a smart contract, returns the transaction in which it was deployed. */ export async function dataEvmTransactionsGetDeploymentTransaction( - client$: AvaCloudSDKCore, - request: operations.GetDeploymentTransactionRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetDeploymentTransactionRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.GetTransactionResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.GetTransactionResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetDeploymentTransactionRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetDeploymentTransactionRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(GetDeploymentTransactionServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetDeploymentTransactionServerList[0], { + charEncoding: "percent", + })(); - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; - const path$ = pathToFunc("/v1/chains/{chainId}/contracts/{address}/transactions:getDeployment")( - pathParams$ - ); + const path$ = pathToFunc( + "/v1/chains/{chainId}/contracts/{address}/transactions:getDeployment", + )(pathParams$); - const query$ = encodeFormQuery$({ - currency: payload$.currency, - }); + const query$ = encodeFormQuery$({ + "currency": payload$.currency, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getDeploymentTransaction", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getDeploymentTransaction", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.GetTransactionResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.GetTransactionResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.GetTransactionResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.GetTransactionResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataEvmTransactionsGetTransaction.ts b/src/funcs/dataEvmTransactionsGetTransaction.ts index f428fe1..05580c7 100644 --- a/src/funcs/dataEvmTransactionsGetTransaction.ts +++ b/src/funcs/dataEvmTransactionsGetTransaction.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -31,147 +31,157 @@ import { Result } from "../types/fp.js"; * Gets the details of a single transaction. */ export async function dataEvmTransactionsGetTransaction( - client$: AvaCloudSDKCore, - request: operations.GetTransactionRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetTransactionRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.GetTransactionResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.GetTransactionResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetTransactionRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetTransactionRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(GetTransactionServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetTransactionServerList[0], { charEncoding: "percent" })(); - const pathParams$ = { - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - txHash: encodeSimple$("txHash", payload$.txHash, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + txHash: encodeSimple$("txHash", payload$.txHash, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/v1/chains/{chainId}/transactions/{txHash}")(pathParams$); + const path$ = pathToFunc("/v1/chains/{chainId}/transactions/{txHash}")( + pathParams$, + ); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getTransaction", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getTransaction", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.GetTransactionResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.GetTransactionResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.GetTransactionResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.GetTransactionResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataEvmTransactionsGetTransactionsForBlock.ts b/src/funcs/dataEvmTransactionsGetTransactionsForBlock.ts index b77739e..5f87395 100644 --- a/src/funcs/dataEvmTransactionsGetTransactionsForBlock.ts +++ b/src/funcs/dataEvmTransactionsGetTransactionsForBlock.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -31,147 +31,160 @@ import { Result } from "../types/fp.js"; * Lists the transactions that occured in a given block. */ export async function dataEvmTransactionsGetTransactionsForBlock( - client$: AvaCloudSDKCore, - request: operations.GetTransactionsForBlockRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetTransactionsForBlockRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.ListNativeTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.ListNativeTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetTransactionsForBlockRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetTransactionsForBlockRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(GetTransactionsForBlockServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetTransactionsForBlockServerList[0], { + charEncoding: "percent", + })(); - const pathParams$ = { - blockId: encodeSimple$("blockId", payload$.blockId, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + blockId: encodeSimple$("blockId", payload$.blockId, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; - const path$ = pathToFunc("/v1/chains/{chainId}/blocks/{blockId}/transactions")(pathParams$); + const path$ = pathToFunc( + "/v1/chains/{chainId}/blocks/{blockId}/transactions", + )(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getTransactionsForBlock", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getTransactionsForBlock", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.ListNativeTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.ListNativeTransactionsResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.ListNativeTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.ListNativeTransactionsResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataEvmTransactionsListContractDeployments.ts b/src/funcs/dataEvmTransactionsListContractDeployments.ts index f1e689a..477e6e2 100644 --- a/src/funcs/dataEvmTransactionsListContractDeployments.ts +++ b/src/funcs/dataEvmTransactionsListContractDeployments.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListContractDeploymentsServerList } from "../models/operations/listcontractdeployments.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List deployed contracts @@ -35,195 +40,210 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists all contracts deployed by the given address. */ export async function dataEvmTransactionsListContractDeployments( - client$: AvaCloudSDKCore, - request: operations.ListContractDeploymentsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListContractDeploymentsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListContractDeploymentsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListContractDeploymentsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListContractDeploymentsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListContractDeploymentsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListContractDeploymentsServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/chains/{chainId}/contracts/{address}/deployments", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listContractDeployments", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListContractDeploymentsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListContractDeploymentsResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListContractDeploymentsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListContractDeploymentsServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/chains/{chainId}/contracts/{address}/deployments")(pathParams$); - - const query$ = encodeFormQuery$({ - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listContractDeployments", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataEvmTransactionsListContractDeployments( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListContractDeploymentsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListContractDeploymentsResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListContractDeploymentsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataEvmTransactionsListContractDeployments( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataEvmTransactionsListErc1155Transactions.ts b/src/funcs/dataEvmTransactionsListErc1155Transactions.ts index 3df40de..419f13c 100644 --- a/src/funcs/dataEvmTransactionsListErc1155Transactions.ts +++ b/src/funcs/dataEvmTransactionsListErc1155Transactions.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListErc1155TransactionsServerList } from "../models/operations/listerc1155transactions.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List ERC-1155 transfers @@ -35,199 +40,212 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists ERC-1155 transfers for an address. Filterable by block range. */ export async function dataEvmTransactionsListErc1155Transactions( - client$: AvaCloudSDKCore, - request: operations.ListErc1155TransactionsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListErc1155TransactionsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListErc1155TransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListErc1155TransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListErc1155TransactionsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListErc1155TransactionsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListErc1155TransactionsServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/chains/{chainId}/addresses/{address}/transactions:listErc1155", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "endBlock": payload$.endBlock, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "startBlock": payload$.startBlock, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listErc1155Transactions", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListErc1155TransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListErc1155TransactionsResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListErc1155TransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListErc1155TransactionsServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/chains/{chainId}/addresses/{address}/transactions:listErc1155")( - pathParams$ - ); - - const query$ = encodeFormQuery$({ - endBlock: payload$.endBlock, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - startBlock: payload$.startBlock, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listErc1155Transactions", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataEvmTransactionsListErc1155Transactions( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListErc1155TransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListErc1155TransactionsResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListErc1155TransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataEvmTransactionsListErc1155Transactions( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataEvmTransactionsListErc20Transactions.ts b/src/funcs/dataEvmTransactionsListErc20Transactions.ts index 6af9de6..176d5aa 100644 --- a/src/funcs/dataEvmTransactionsListErc20Transactions.ts +++ b/src/funcs/dataEvmTransactionsListErc20Transactions.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListErc20TransactionsServerList } from "../models/operations/listerc20transactions.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List ERC-20 transfers @@ -35,199 +40,212 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists ERC-20 transfers for an address. Filterable by block range. */ export async function dataEvmTransactionsListErc20Transactions( - client$: AvaCloudSDKCore, - request: operations.ListErc20TransactionsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListErc20TransactionsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListErc20TransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListErc20TransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListErc20TransactionsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListErc20TransactionsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListErc20TransactionsServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/chains/{chainId}/addresses/{address}/transactions:listErc20", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "endBlock": payload$.endBlock, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "startBlock": payload$.startBlock, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listErc20Transactions", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListErc20TransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListErc20TransactionsResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListErc20TransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListErc20TransactionsServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/chains/{chainId}/addresses/{address}/transactions:listErc20")( - pathParams$ - ); - - const query$ = encodeFormQuery$({ - endBlock: payload$.endBlock, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - startBlock: payload$.startBlock, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listErc20Transactions", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataEvmTransactionsListErc20Transactions( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListErc20TransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListErc20TransactionsResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListErc20TransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataEvmTransactionsListErc20Transactions( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataEvmTransactionsListErc721Transactions.ts b/src/funcs/dataEvmTransactionsListErc721Transactions.ts index 23b6344..40def8b 100644 --- a/src/funcs/dataEvmTransactionsListErc721Transactions.ts +++ b/src/funcs/dataEvmTransactionsListErc721Transactions.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListErc721TransactionsServerList } from "../models/operations/listerc721transactions.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List ERC-721 transfers @@ -35,199 +40,212 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists ERC-721 transfers for an address. Filterable by block range. */ export async function dataEvmTransactionsListErc721Transactions( - client$: AvaCloudSDKCore, - request: operations.ListErc721TransactionsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListErc721TransactionsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListErc721TransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListErc721TransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListErc721TransactionsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListErc721TransactionsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListErc721TransactionsServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/chains/{chainId}/addresses/{address}/transactions:listErc721", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "endBlock": payload$.endBlock, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "startBlock": payload$.startBlock, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listErc721Transactions", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListErc721TransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListErc721TransactionsResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListErc721TransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListErc721TransactionsServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/chains/{chainId}/addresses/{address}/transactions:listErc721")( - pathParams$ - ); - - const query$ = encodeFormQuery$({ - endBlock: payload$.endBlock, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - startBlock: payload$.startBlock, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listErc721Transactions", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataEvmTransactionsListErc721Transactions( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListErc721TransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListErc721TransactionsResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListErc721TransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataEvmTransactionsListErc721Transactions( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataEvmTransactionsListInternalTransactions.ts b/src/funcs/dataEvmTransactionsListInternalTransactions.ts index 2913cb7..a91691a 100644 --- a/src/funcs/dataEvmTransactionsListInternalTransactions.ts +++ b/src/funcs/dataEvmTransactionsListInternalTransactions.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListInternalTransactionsServerList } from "../models/operations/listinternaltransactions.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List internal transactions @@ -37,199 +42,212 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Note that the internal transactions list only contains `CALL` or `CALLCODE` transactions with a non-zero value and `CREATE`/`CREATE2` transactions. To get a complete list of internal transactions use the `debug_` prefixed RPC methods on an archive node. */ export async function dataEvmTransactionsListInternalTransactions( - client$: AvaCloudSDKCore, - request: operations.ListInternalTransactionsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListInternalTransactionsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListInternalTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListInternalTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListInternalTransactionsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListInternalTransactionsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListInternalTransactionsServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/chains/{chainId}/addresses/{address}/transactions:listInternals", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "endBlock": payload$.endBlock, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "startBlock": payload$.startBlock, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listInternalTransactions", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListInternalTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListInternalTransactionsResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListInternalTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListInternalTransactionsServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/chains/{chainId}/addresses/{address}/transactions:listInternals")( - pathParams$ - ); - - const query$ = encodeFormQuery$({ - endBlock: payload$.endBlock, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - startBlock: payload$.startBlock, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listInternalTransactions", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataEvmTransactionsListInternalTransactions( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListInternalTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListInternalTransactionsResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListInternalTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataEvmTransactionsListInternalTransactions( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataEvmTransactionsListLatestTransactions.ts b/src/funcs/dataEvmTransactionsListLatestTransactions.ts index 2699c36..7bd86a4 100644 --- a/src/funcs/dataEvmTransactionsListLatestTransactions.ts +++ b/src/funcs/dataEvmTransactionsListLatestTransactions.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListLatestTransactionsServerList } from "../models/operations/listlatesttransactions.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List latest transactions @@ -35,192 +40,205 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists the latest transactions. Filterable by status. */ export async function dataEvmTransactionsListLatestTransactions( - client$: AvaCloudSDKCore, - request: operations.ListLatestTransactionsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListLatestTransactionsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListLatestTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListLatestTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = typeof request === "undefined" ? {} : request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListLatestTransactionsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListLatestTransactionsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListLatestTransactionsServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc("/v1/chains/{chainId}/transactions")(pathParams$); + + const query$ = encodeFormQuery$({ + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "status": payload$.status, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listLatestTransactions", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListLatestTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListLatestTransactionsResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListLatestTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListLatestTransactionsServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/chains/{chainId}/transactions")(pathParams$); - - const query$ = encodeFormQuery$({ - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - status: payload$.status, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listLatestTransactions", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataEvmTransactionsListLatestTransactions( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListLatestTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListLatestTransactionsResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListLatestTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataEvmTransactionsListLatestTransactions( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataEvmTransactionsListNativeTransactions.ts b/src/funcs/dataEvmTransactionsListNativeTransactions.ts index a854207..89df511 100644 --- a/src/funcs/dataEvmTransactionsListNativeTransactions.ts +++ b/src/funcs/dataEvmTransactionsListNativeTransactions.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListNativeTransactionsServerList } from "../models/operations/listnativetransactions.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List native transactions @@ -35,199 +40,212 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists native transactions for an address. Filterable by block range. */ export async function dataEvmTransactionsListNativeTransactions( - client$: AvaCloudSDKCore, - request: operations.ListNativeTransactionsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListNativeTransactionsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListNativeTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListNativeTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListNativeTransactionsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListNativeTransactionsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListNativeTransactionsServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/chains/{chainId}/addresses/{address}/transactions:listNative", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "endBlock": payload$.endBlock, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "startBlock": payload$.startBlock, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listNativeTransactions", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListNativeTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListNativeTransactionsResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListNativeTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListNativeTransactionsServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/chains/{chainId}/addresses/{address}/transactions:listNative")( - pathParams$ - ); - - const query$ = encodeFormQuery$({ - endBlock: payload$.endBlock, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - startBlock: payload$.startBlock, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listNativeTransactions", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataEvmTransactionsListNativeTransactions( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListNativeTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListNativeTransactionsResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListNativeTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataEvmTransactionsListNativeTransactions( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataEvmTransactionsListTransactions.ts b/src/funcs/dataEvmTransactionsListTransactions.ts index f906bc4..de90419 100644 --- a/src/funcs/dataEvmTransactionsListTransactions.ts +++ b/src/funcs/dataEvmTransactionsListTransactions.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListTransactionsServerList } from "../models/operations/listtransactions.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List transactions @@ -37,198 +42,210 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Filterable by block ranges. */ export async function dataEvmTransactionsListTransactions( - client$: AvaCloudSDKCore, - request: operations.ListTransactionsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListTransactionsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListTransactionsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListTransactionsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListTransactionsServerList[0], { charEncoding: "percent" })(); + + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/chains/{chainId}/addresses/{address}/transactions", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "endBlock": payload$.endBlock, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "sortOrder": payload$.sortOrder, + "startBlock": payload$.startBlock, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listTransactions", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListTransactionsResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListTransactionsServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/chains/{chainId}/addresses/{address}/transactions")(pathParams$); - - const query$ = encodeFormQuery$({ - endBlock: payload$.endBlock, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - sortOrder: payload$.sortOrder, - startBlock: payload$.startBlock, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listTransactions", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataEvmTransactionsListTransactions( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListTransactionsResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataEvmTransactionsListTransactions( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataEvmTransactionsListTransfers.ts b/src/funcs/dataEvmTransactionsListTransfers.ts index fb75567..efd03d5 100644 --- a/src/funcs/dataEvmTransactionsListTransfers.ts +++ b/src/funcs/dataEvmTransactionsListTransfers.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListTransfersServerList } from "../models/operations/listtransfers.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List ERC transfers @@ -35,196 +40,209 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists ERC transfers for an ERC-20, ERC-721, or ERC-1155 contract address. */ export async function dataEvmTransactionsListTransfers( - client$: AvaCloudSDKCore, - request: operations.ListTransfersRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListTransfersRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListTransfersResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListTransfersResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListTransfersRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListTransfersRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListTransfersServerList[0], { charEncoding: "percent" })(); + + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc("/v1/chains/{chainId}/tokens/{address}/transfers")( + pathParams$, + ); + + const query$ = encodeFormQuery$({ + "endBlock": payload$.endBlock, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "startBlock": payload$.startBlock, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listTransfers", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListTransfersResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListTransfersResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListTransfersResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || pathToFunc(ListTransfersServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/chains/{chainId}/tokens/{address}/transfers")(pathParams$); - - const query$ = encodeFormQuery$({ - endBlock: payload$.endBlock, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - startBlock: payload$.startBlock, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listTransfers", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataEvmTransactionsListTransfers( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListTransfersResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListTransfersResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListTransfersResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataEvmTransactionsListTransfers( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataHealthCheckDataHealthCheck.ts b/src/funcs/dataHealthCheckDataHealthCheck.ts index cdf40d0..935ea90 100644 --- a/src/funcs/dataHealthCheckDataHealthCheck.ts +++ b/src/funcs/dataHealthCheckDataHealthCheck.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -25,100 +25,96 @@ import { Result } from "../types/fp.js"; * Get the health of the service */ export async function dataHealthCheckDataHealthCheck( - client$: AvaCloudSDKCore, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - operations.DataHealthCheckResponseBody, - | errors.DataHealthCheckResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.DataHealthCheckResponseBody, + | errors.DataHealthCheckResponseBody + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const baseURL$ = - options?.serverURL || - pathToFunc(DataHealthCheckServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(DataHealthCheckServerList[0], { charEncoding: "percent" })(); - const path$ = pathToFunc("/v1/health-check")(); + const path$ = pathToFunc("/v1/health-check")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "data-health-check", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "data-health-check", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["4XX", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["4XX", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - operations.DataHealthCheckResponseBody, - | errors.DataHealthCheckResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.DataHealthCheckResponseBody$inboundSchema), - m$.jsonErr(503, errors.DataHealthCheckResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + operations.DataHealthCheckResponseBody, + | errors.DataHealthCheckResponseBody + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.DataHealthCheckResponseBody$inboundSchema), + m$.jsonErr(503, errors.DataHealthCheckResponseBody$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataNftsGetTokenDetails.ts b/src/funcs/dataNftsGetTokenDetails.ts index 623edf5..4cc150f 100644 --- a/src/funcs/dataNftsGetTokenDetails.ts +++ b/src/funcs/dataNftsGetTokenDetails.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -30,153 +30,161 @@ import { Result } from "../types/fp.js"; * Gets token details for a specific token of an NFT contract. */ export async function dataNftsGetTokenDetails( - client$: AvaCloudSDKCore, - request: operations.GetTokenDetailsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetTokenDetailsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - operations.GetTokenDetailsResponseBody, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetTokenDetailsResponseBody, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetTokenDetailsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetTokenDetailsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(GetTokenDetailsServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetTokenDetailsServerList[0], { charEncoding: "percent" })(); - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - tokenId: encodeSimple$("tokenId", payload$.tokenId, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + tokenId: encodeSimple$("tokenId", payload$.tokenId, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}")( - pathParams$ - ); + const path$ = pathToFunc( + "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}", + )(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getTokenDetails", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getTokenDetails", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - operations.GetTokenDetailsResponseBody, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetTokenDetailsResponseBody$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + operations.GetTokenDetailsResponseBody, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetTokenDetailsResponseBody$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataNftsListTokens.ts b/src/funcs/dataNftsListTokens.ts index 5573b50..744d972 100644 --- a/src/funcs/dataNftsListTokens.ts +++ b/src/funcs/dataNftsListTokens.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListTokensServerList } from "../models/operations/listtokens.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List tokens @@ -35,194 +40,207 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists tokens for an NFT contract. */ export async function dataNftsListTokens( - client$: AvaCloudSDKCore, - request: operations.ListTokensRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListTokensRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListTokensResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListTokensResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListTokensRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListTokensRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListTokensServerList[0], { charEncoding: "percent" })(); + + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/chains/{chainId}/nfts/collections/{address}/tokens", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listTokens", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListTokensResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListTokensResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListTokensResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || pathToFunc(ListTokensServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/chains/{chainId}/nfts/collections/{address}/tokens")(pathParams$); - - const query$ = encodeFormQuery$({ - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listTokens", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataNftsListTokens( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListTokensResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListTokensResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListTokensResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataNftsListTokens( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataNftsReindexNft.ts b/src/funcs/dataNftsReindexNft.ts index 81e181e..c4e7029 100644 --- a/src/funcs/dataNftsReindexNft.ts +++ b/src/funcs/dataNftsReindexNft.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { AvaCloudSDKCore } from "../core.js"; import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; @@ -10,11 +11,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -22,7 +23,6 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ReindexNftServerList } from "../models/operations/reindexnft.js"; import { Result } from "../types/fp.js"; -import * as z from "zod"; /** * Reindex NFT metadata @@ -31,152 +31,161 @@ import * as z from "zod"; * Triggers reindexing of token metadata for an NFT token. Reindexing can only be called once per hour for each NFT token. */ export async function dataNftsReindexNft( - client$: AvaCloudSDKCore, - request: operations.ReindexNftRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ReindexNftRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + void, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ReindexNftRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const input$ = request; - const baseURL$ = - options?.serverURL || pathToFunc(ReindexNftServerList[0], { charEncoding: "percent" })(); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ReindexNftRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - tokenId: encodeSimple$("tokenId", payload$.tokenId, { - explode: false, - charEncoding: "percent", - }), - }; + const baseURL$ = options?.serverURL + || pathToFunc(ReindexNftServerList[0], { charEncoding: "percent" })(); - const path$ = pathToFunc( - "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}:reindex" - )(pathParams$); + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + tokenId: encodeSimple$("tokenId", payload$.tokenId, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - Accept: "application/json", - }); + const path$ = pathToFunc( + "/v1/chains/{chainId}/nfts/collections/{address}/tokens/{tokenId}:reindex", + )(pathParams$); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "reindexNft", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + Accept: "application/json", + }); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "reindexNft", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, z.void()), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + void, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, z.void()), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataOperationsGetOperationResult.ts b/src/funcs/dataOperationsGetOperationResult.ts index c46a492..30321ef 100644 --- a/src/funcs/dataOperationsGetOperationResult.ts +++ b/src/funcs/dataOperationsGetOperationResult.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -31,143 +31,153 @@ import { Result } from "../types/fp.js"; * Gets operation details for the given operation id. */ export async function dataOperationsGetOperationResult( - client$: AvaCloudSDKCore, - request: operations.GetOperationResultRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetOperationResultRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.OperationStatusResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.OperationStatusResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetOperationResultRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetOperationResultRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(GetOperationResultServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetOperationResultServerList[0], { + charEncoding: "percent", + })(); - const pathParams$ = { - operationId: encodeSimple$("operationId", payload$.operationId, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + operationId: encodeSimple$("operationId", payload$.operationId, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/v1/operations/{operationId}")(pathParams$); + const path$ = pathToFunc("/v1/operations/{operationId}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getOperationResult", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getOperationResult", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.OperationStatusResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.OperationStatusResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.OperationStatusResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.OperationStatusResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataOperationsPostTransactionExportJob.ts b/src/funcs/dataOperationsPostTransactionExportJob.ts index dd22427..e9f34c9 100644 --- a/src/funcs/dataOperationsPostTransactionExportJob.ts +++ b/src/funcs/dataOperationsPostTransactionExportJob.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -33,137 +33,149 @@ import { Result } from "../types/fp.js"; * The transaction export operation runs asynchronously in the background. The status of the job can be retrieved from the `/v1/operations/:operationId` endpoint using the `operationId` returned from this endpoint. */ export async function dataOperationsPostTransactionExportJob( - client$: AvaCloudSDKCore, - request: operations.PostTransactionExportJobRequestBody, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.PostTransactionExportJobRequestBody, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.OperationStatusResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.OperationStatusResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.PostTransactionExportJobRequestBody$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.PostTransactionExportJobRequestBody$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$, { explode: true }); - const baseURL$ = - options?.serverURL || - pathToFunc(PostTransactionExportJobServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(PostTransactionExportJobServerList[0], { + charEncoding: "percent", + })(); - const path$ = pathToFunc("/v1/operations/transactions:export")(); + const path$ = pathToFunc("/v1/operations/transactions:export")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "postTransactionExportJob", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "postTransactionExportJob", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.OperationStatusResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.OperationStatusResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.OperationStatusResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.OperationStatusResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataPrimaryNetworkBalancesGetBalancesByAddresses.ts b/src/funcs/dataPrimaryNetworkBalancesGetBalancesByAddresses.ts index 5a64b42..8ef6016 100644 --- a/src/funcs/dataPrimaryNetworkBalancesGetBalancesByAddresses.ts +++ b/src/funcs/dataPrimaryNetworkBalancesGetBalancesByAddresses.ts @@ -4,8 +4,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -13,11 +13,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -35,155 +35,166 @@ import { Result } from "../types/fp.js"; * C-Chain balances returned are only the shared atomic memory balance. For EVM balance, use the `/v1/chains/:chainId/addresses/:addressId/balances:getNative` endpoint. */ export async function dataPrimaryNetworkBalancesGetBalancesByAddresses( - client$: AvaCloudSDKCore, - request: operations.GetBalancesByAddressesRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetBalancesByAddressesRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - operations.GetBalancesByAddressesResponseBody, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetBalancesByAddressesResponseBody, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetBalancesByAddressesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetBalancesByAddressesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(GetBalancesByAddressesServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetBalancesByAddressesServerList[0], { + charEncoding: "percent", + })(); - const pathParams$ = { - blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { - explode: false, - charEncoding: "percent", - }), - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { + explode: false, + charEncoding: "percent", + }), + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; - const path$ = pathToFunc("/v1/networks/{network}/blockchains/{blockchainId}/balances")( - pathParams$ - ); + const path$ = pathToFunc( + "/v1/networks/{network}/blockchains/{blockchainId}/balances", + )(pathParams$); - const query$ = encodeFormQuery$({ - addresses: payload$.addresses, - blockTimestamp: payload$.blockTimestamp, - }); + const query$ = encodeFormQuery$({ + "addresses": payload$.addresses, + "blockTimestamp": payload$.blockTimestamp, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getBalancesByAddresses", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getBalancesByAddresses", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - operations.GetBalancesByAddressesResponseBody, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetBalancesByAddressesResponseBody$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + operations.GetBalancesByAddressesResponseBody, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetBalancesByAddressesResponseBody$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataPrimaryNetworkBlocksGetBlockById.ts b/src/funcs/dataPrimaryNetworkBlocksGetBlockById.ts index 58cc09e..613449c 100644 --- a/src/funcs/dataPrimaryNetworkBlocksGetBlockById.ts +++ b/src/funcs/dataPrimaryNetworkBlocksGetBlockById.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -31,152 +31,161 @@ import { Result } from "../types/fp.js"; * Gets a block by block height or block hash on one of the Primary Network chains. */ export async function dataPrimaryNetworkBlocksGetBlockById( - client$: AvaCloudSDKCore, - request: operations.GetBlockByIdRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetBlockByIdRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.GetPrimaryNetworkBlockResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.GetPrimaryNetworkBlockResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetBlockByIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetBlockByIdRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || pathToFunc(GetBlockByIdServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetBlockByIdServerList[0], { charEncoding: "percent" })(); - const pathParams$ = { - blockId: encodeSimple$("blockId", payload$.blockId, { - explode: false, - charEncoding: "percent", - }), - blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { - explode: false, - charEncoding: "percent", - }), - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + blockId: encodeSimple$("blockId", payload$.blockId, { + explode: false, + charEncoding: "percent", + }), + blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { + explode: false, + charEncoding: "percent", + }), + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; - const path$ = pathToFunc("/v1/networks/{network}/blockchains/{blockchainId}/blocks/{blockId}")( - pathParams$ - ); + const path$ = pathToFunc( + "/v1/networks/{network}/blockchains/{blockchainId}/blocks/{blockId}", + )(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getBlockById", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getBlockById", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.GetPrimaryNetworkBlockResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.GetPrimaryNetworkBlockResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.GetPrimaryNetworkBlockResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.GetPrimaryNetworkBlockResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataPrimaryNetworkBlocksListLatestPrimaryNetworkBlocks.ts b/src/funcs/dataPrimaryNetworkBlocksListLatestPrimaryNetworkBlocks.ts index cb7f8d5..413fac1 100644 --- a/src/funcs/dataPrimaryNetworkBlocksListLatestPrimaryNetworkBlocks.ts +++ b/src/funcs/dataPrimaryNetworkBlocksListLatestPrimaryNetworkBlocks.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListLatestPrimaryNetworkBlocksServerList } from "../models/operations/listlatestprimarynetworkblocks.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List latest blocks @@ -35,199 +40,214 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists latest blocks on one of the Primary Network chains. */ export async function dataPrimaryNetworkBlocksListLatestPrimaryNetworkBlocks( - client$: AvaCloudSDKCore, - request: operations.ListLatestPrimaryNetworkBlocksRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListLatestPrimaryNetworkBlocksRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListLatestPrimaryNetworkBlocksResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListLatestPrimaryNetworkBlocksResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListLatestPrimaryNetworkBlocksRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListLatestPrimaryNetworkBlocksRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListLatestPrimaryNetworkBlocksServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { + explode: false, + charEncoding: "percent", + }), + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/networks/{network}/blockchains/{blockchainId}/blocks", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listLatestPrimaryNetworkBlocks", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListLatestPrimaryNetworkBlocksResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json( + 200, + operations.ListLatestPrimaryNetworkBlocksResponse$inboundSchema, + { key: "Result" }, + ), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListLatestPrimaryNetworkBlocksResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListLatestPrimaryNetworkBlocksServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { - explode: false, - charEncoding: "percent", - }), - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/networks/{network}/blockchains/{blockchainId}/blocks")( - pathParams$ - ); - - const query$ = encodeFormQuery$({ - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listLatestPrimaryNetworkBlocks", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataPrimaryNetworkBlocksListLatestPrimaryNetworkBlocks( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListLatestPrimaryNetworkBlocksResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListLatestPrimaryNetworkBlocksResponse$inboundSchema, { - key: "Result", - }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListLatestPrimaryNetworkBlocksResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataPrimaryNetworkBlocksListLatestPrimaryNetworkBlocks( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataPrimaryNetworkBlocksListPrimaryNetworkBlocksByNodeId.ts b/src/funcs/dataPrimaryNetworkBlocksListPrimaryNetworkBlocksByNodeId.ts index 4271734..aa5e646 100644 --- a/src/funcs/dataPrimaryNetworkBlocksListPrimaryNetworkBlocksByNodeId.ts +++ b/src/funcs/dataPrimaryNetworkBlocksListPrimaryNetworkBlocksByNodeId.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListPrimaryNetworkBlocksByNodeIdServerList } from "../models/operations/listprimarynetworkblocksbynodeid.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List blocks proposed by node @@ -35,203 +40,218 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists the latest blocks proposed by a given NodeID on one of the Primary Network chains. */ export async function dataPrimaryNetworkBlocksListPrimaryNetworkBlocksByNodeId( - client$: AvaCloudSDKCore, - request: operations.ListPrimaryNetworkBlocksByNodeIdRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListPrimaryNetworkBlocksByNodeIdRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListPrimaryNetworkBlocksByNodeIdResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListPrimaryNetworkBlocksByNodeIdResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListPrimaryNetworkBlocksByNodeIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListPrimaryNetworkBlocksByNodeIdRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListPrimaryNetworkBlocksByNodeIdServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { + explode: false, + charEncoding: "percent", + }), + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + nodeId: encodeSimple$("nodeId", payload$.nodeId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/v1/networks/{network}/blockchains/{blockchainId}/nodes/{nodeId}/blocks", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listPrimaryNetworkBlocksByNodeId", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListPrimaryNetworkBlocksByNodeIdResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json( + 200, + operations.ListPrimaryNetworkBlocksByNodeIdResponse$inboundSchema, + { key: "Result" }, + ), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListPrimaryNetworkBlocksByNodeIdResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListPrimaryNetworkBlocksByNodeIdServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { - explode: false, - charEncoding: "percent", - }), - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - nodeId: encodeSimple$("nodeId", payload$.nodeId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc( - "/v1/networks/{network}/blockchains/{blockchainId}/nodes/{nodeId}/blocks" - )(pathParams$); - - const query$ = encodeFormQuery$({ - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listPrimaryNetworkBlocksByNodeId", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataPrimaryNetworkBlocksListPrimaryNetworkBlocksByNodeId( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListPrimaryNetworkBlocksByNodeIdResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListPrimaryNetworkBlocksByNodeIdResponse$inboundSchema, { - key: "Result", - }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListPrimaryNetworkBlocksByNodeIdResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataPrimaryNetworkBlocksListPrimaryNetworkBlocksByNodeId( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataPrimaryNetworkGetAssetDetails.ts b/src/funcs/dataPrimaryNetworkGetAssetDetails.ts index 13c88ce..7eeadbd 100644 --- a/src/funcs/dataPrimaryNetworkGetAssetDetails.ts +++ b/src/funcs/dataPrimaryNetworkGetAssetDetails.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -31,153 +31,161 @@ import { Result } from "../types/fp.js"; * Gets asset details corresponding to the given asset id on the X-Chain. */ export async function dataPrimaryNetworkGetAssetDetails( - client$: AvaCloudSDKCore, - request: operations.GetAssetDetailsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetAssetDetailsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.XChainAssetDetails, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.XChainAssetDetails, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetAssetDetailsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetAssetDetailsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(GetAssetDetailsServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetAssetDetailsServerList[0], { charEncoding: "percent" })(); - const pathParams$ = { - assetId: encodeSimple$("assetId", payload$.assetId, { - explode: false, - charEncoding: "percent", - }), - blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { - explode: false, - charEncoding: "percent", - }), - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + assetId: encodeSimple$("assetId", payload$.assetId, { + explode: false, + charEncoding: "percent", + }), + blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { + explode: false, + charEncoding: "percent", + }), + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; - const path$ = pathToFunc("/v1/networks/{network}/blockchains/{blockchainId}/assets/{assetId}")( - pathParams$ - ); + const path$ = pathToFunc( + "/v1/networks/{network}/blockchains/{blockchainId}/assets/{assetId}", + )(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getAssetDetails", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getAssetDetails", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.XChainAssetDetails, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.XChainAssetDetails$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.XChainAssetDetails, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.XChainAssetDetails$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataPrimaryNetworkGetChainIdsForAddresses.ts b/src/funcs/dataPrimaryNetworkGetChainIdsForAddresses.ts index c85a9a6..43b5c63 100644 --- a/src/funcs/dataPrimaryNetworkGetChainIdsForAddresses.ts +++ b/src/funcs/dataPrimaryNetworkGetChainIdsForAddresses.ts @@ -4,8 +4,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -34,148 +34,161 @@ import { Result } from "../types/fp.js"; * Returns Primary Network chains that each address has touched in the form of an address mapped array. If an address has had any on-chain interaction for a chain, that chain's chain id will be returned. */ export async function dataPrimaryNetworkGetChainIdsForAddresses( - client$: AvaCloudSDKCore, - request: operations.GetChainIdsForAddressesRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetChainIdsForAddressesRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.ChainAddressChainIdMapListResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.ChainAddressChainIdMapListResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetChainIdsForAddressesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetChainIdsForAddressesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(GetChainIdsForAddressesServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetChainIdsForAddressesServerList[0], { + charEncoding: "percent", + })(); - const pathParams$ = { - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; - const path$ = pathToFunc("/v1/networks/{network}/addresses:listChainIds")(pathParams$); + const path$ = pathToFunc("/v1/networks/{network}/addresses:listChainIds")( + pathParams$, + ); - const query$ = encodeFormQuery$({ - addresses: payload$.addresses, - }); + const query$ = encodeFormQuery$({ + "addresses": payload$.addresses, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getChainIdsForAddresses", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getChainIdsForAddresses", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.ChainAddressChainIdMapListResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.ChainAddressChainIdMapListResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.ChainAddressChainIdMapListResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.ChainAddressChainIdMapListResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataPrimaryNetworkGetNetworkDetails.ts b/src/funcs/dataPrimaryNetworkGetNetworkDetails.ts index c937dbe..3adbedc 100644 --- a/src/funcs/dataPrimaryNetworkGetNetworkDetails.ts +++ b/src/funcs/dataPrimaryNetworkGetNetworkDetails.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -31,143 +31,154 @@ import { Result } from "../types/fp.js"; * Gets network details such as validator and delegator stats. */ export async function dataPrimaryNetworkGetNetworkDetails( - client$: AvaCloudSDKCore, - request: operations.GetNetworkDetailsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetNetworkDetailsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.GetNetworkDetailsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.GetNetworkDetailsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = typeof request === "undefined" ? {} : request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetNetworkDetailsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetNetworkDetailsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(GetNetworkDetailsServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetNetworkDetailsServerList[0], { + charEncoding: "percent", + })(); - const pathParams$ = { - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; - const path$ = pathToFunc("/v1/networks/{network}")(pathParams$); + const path$ = pathToFunc("/v1/networks/{network}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getNetworkDetails", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getNetworkDetails", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.GetNetworkDetailsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.GetNetworkDetailsResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.GetNetworkDetailsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.GetNetworkDetailsResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataPrimaryNetworkGetSingleValidatorDetails.ts b/src/funcs/dataPrimaryNetworkGetSingleValidatorDetails.ts index 14d26ac..2e56acd 100644 --- a/src/funcs/dataPrimaryNetworkGetSingleValidatorDetails.ts +++ b/src/funcs/dataPrimaryNetworkGetSingleValidatorDetails.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { GetSingleValidatorDetailsServerList } from "../models/operations/getsinglevalidatordetails.js"; import * as operations from "../models/operations/index.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * Get single validator details @@ -35,197 +40,212 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * List validator details for a single validator. Filterable by validation status. */ export async function dataPrimaryNetworkGetSingleValidatorDetails( - client$: AvaCloudSDKCore, - request: operations.GetSingleValidatorDetailsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetSingleValidatorDetailsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.GetSingleValidatorDetailsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.GetSingleValidatorDetailsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetSingleValidatorDetailsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetSingleValidatorDetailsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(GetSingleValidatorDetailsServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + nodeId: encodeSimple$("nodeId", payload$.nodeId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/v1/networks/{network}/validators/{nodeId}")( + pathParams$, + ); + + const query$ = encodeFormQuery$({ + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "sortOrder": payload$.sortOrder, + "validationStatus": payload$.validationStatus, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getSingleValidatorDetails", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.GetSingleValidatorDetailsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetSingleValidatorDetailsResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.GetSingleValidatorDetailsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(GetSingleValidatorDetailsServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - nodeId: encodeSimple$("nodeId", payload$.nodeId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/networks/{network}/validators/{nodeId}")(pathParams$); - - const query$ = encodeFormQuery$({ - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - sortOrder: payload$.sortOrder, - validationStatus: payload$.validationStatus, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getSingleValidatorDetails", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataPrimaryNetworkGetSingleValidatorDetails( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.GetSingleValidatorDetailsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetSingleValidatorDetailsResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.GetSingleValidatorDetailsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataPrimaryNetworkGetSingleValidatorDetails( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataPrimaryNetworkGetSubnetById.ts b/src/funcs/dataPrimaryNetworkGetSubnetById.ts index 851a089..96ac65f 100644 --- a/src/funcs/dataPrimaryNetworkGetSubnetById.ts +++ b/src/funcs/dataPrimaryNetworkGetSubnetById.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -31,146 +31,157 @@ import { Result } from "../types/fp.js"; * Get details of the Subnet registered on the network. */ export async function dataPrimaryNetworkGetSubnetById( - client$: AvaCloudSDKCore, - request: operations.GetSubnetByIdRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetSubnetByIdRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.Subnet, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.Subnet, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetSubnetByIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetSubnetByIdRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || pathToFunc(GetSubnetByIdServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetSubnetByIdServerList[0], { charEncoding: "percent" })(); - const pathParams$ = { - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - subnetId: encodeSimple$("subnetId", payload$.subnetId, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + subnetId: encodeSimple$("subnetId", payload$.subnetId, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/v1/networks/{network}/subnets/{subnetId}")(pathParams$); + const path$ = pathToFunc("/v1/networks/{network}/subnets/{subnetId}")( + pathParams$, + ); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getSubnetById", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getSubnetById", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.Subnet, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.Subnet$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.Subnet, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.Subnet$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataPrimaryNetworkListBlockchains.ts b/src/funcs/dataPrimaryNetworkListBlockchains.ts index 658ece6..740c9be 100644 --- a/src/funcs/dataPrimaryNetworkListBlockchains.ts +++ b/src/funcs/dataPrimaryNetworkListBlockchains.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListBlockchainsServerList } from "../models/operations/listblockchains.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List blockchains @@ -35,192 +40,202 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists all blockchains registered on the network. */ export async function dataPrimaryNetworkListBlockchains( - client$: AvaCloudSDKCore, - request: operations.ListBlockchainsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListBlockchainsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListBlockchainsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListBlockchainsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = typeof request === "undefined" ? {} : request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListBlockchainsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListBlockchainsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListBlockchainsServerList[0], { charEncoding: "percent" })(); + + const pathParams$ = { + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc("/v1/networks/{network}/blockchains")(pathParams$); + + const query$ = encodeFormQuery$({ + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "sortOrder": payload$.sortOrder, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listBlockchains", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListBlockchainsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListBlockchainsResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListBlockchainsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListBlockchainsServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/networks/{network}/blockchains")(pathParams$); - - const query$ = encodeFormQuery$({ - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - sortOrder: payload$.sortOrder, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listBlockchains", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataPrimaryNetworkListBlockchains( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListBlockchainsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListBlockchainsResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListBlockchainsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataPrimaryNetworkListBlockchains( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataPrimaryNetworkListDelegators.ts b/src/funcs/dataPrimaryNetworkListDelegators.ts index 23ed8c2..b0bdcf7 100644 --- a/src/funcs/dataPrimaryNetworkListDelegators.ts +++ b/src/funcs/dataPrimaryNetworkListDelegators.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListDelegatorsServerList } from "../models/operations/listdelegators.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List delegators @@ -35,195 +40,205 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists details for delegators. */ export async function dataPrimaryNetworkListDelegators( - client$: AvaCloudSDKCore, - request: operations.ListDelegatorsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListDelegatorsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListDelegatorsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListDelegatorsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = typeof request === "undefined" ? {} : request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListDelegatorsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListDelegatorsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListDelegatorsServerList[0], { charEncoding: "percent" })(); + + const pathParams$ = { + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc("/v1/networks/{network}/delegators")(pathParams$); + + const query$ = encodeFormQuery$({ + "delegationStatus": payload$.delegationStatus, + "nodeIds": payload$.nodeIds, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "rewardAddresses": payload$.rewardAddresses, + "sortOrder": payload$.sortOrder, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listDelegators", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListDelegatorsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListDelegatorsResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListDelegatorsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListDelegatorsServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/networks/{network}/delegators")(pathParams$); - - const query$ = encodeFormQuery$({ - delegationStatus: payload$.delegationStatus, - nodeIds: payload$.nodeIds, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - rewardAddresses: payload$.rewardAddresses, - sortOrder: payload$.sortOrder, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listDelegators", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataPrimaryNetworkListDelegators( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListDelegatorsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListDelegatorsResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListDelegatorsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataPrimaryNetworkListDelegators( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataPrimaryNetworkListSubnets.ts b/src/funcs/dataPrimaryNetworkListSubnets.ts index 5b2d841..888df75 100644 --- a/src/funcs/dataPrimaryNetworkListSubnets.ts +++ b/src/funcs/dataPrimaryNetworkListSubnets.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListSubnetsServerList } from "../models/operations/listsubnets.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List subnets @@ -35,191 +40,202 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists all subnets registered on the network. */ export async function dataPrimaryNetworkListSubnets( - client$: AvaCloudSDKCore, - request: operations.ListSubnetsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListSubnetsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListSubnetsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListSubnetsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = typeof request === "undefined" ? {} : request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListSubnetsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListSubnetsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListSubnetsServerList[0], { charEncoding: "percent" })(); + + const pathParams$ = { + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc("/v1/networks/{network}/subnets")(pathParams$); + + const query$ = encodeFormQuery$({ + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "sortOrder": payload$.sortOrder, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listSubnets", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListSubnetsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListSubnetsResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListSubnetsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || pathToFunc(ListSubnetsServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/networks/{network}/subnets")(pathParams$); - - const query$ = encodeFormQuery$({ - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - sortOrder: payload$.sortOrder, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listSubnets", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataPrimaryNetworkListSubnets( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListSubnetsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListSubnetsResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListSubnetsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataPrimaryNetworkListSubnets( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataPrimaryNetworkListValidators.ts b/src/funcs/dataPrimaryNetworkListValidators.ts index c03f184..6211d93 100644 --- a/src/funcs/dataPrimaryNetworkListValidators.ts +++ b/src/funcs/dataPrimaryNetworkListValidators.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListValidatorsServerList } from "../models/operations/listvalidators.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List validators @@ -35,204 +40,214 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists details for validators. By default, returns details for all validators. Filterable by validator node ids and minimum delegation capacity. */ export async function dataPrimaryNetworkListValidators( - client$: AvaCloudSDKCore, - request: operations.ListValidatorsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListValidatorsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListValidatorsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListValidatorsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = typeof request === "undefined" ? {} : request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListValidatorsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListValidatorsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListValidatorsServerList[0], { charEncoding: "percent" })(); + + const pathParams$ = { + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc("/v1/networks/{network}/validators")(pathParams$); + + const query$ = encodeFormQuery$({ + "maxDelegationCapacity": payload$.maxDelegationCapacity, + "maxFeePercentage": payload$.maxFeePercentage, + "maxTimeRemaining": payload$.maxTimeRemaining, + "maxUptimePerformance": payload$.maxUptimePerformance, + "minDelegationCapacity": payload$.minDelegationCapacity, + "minFeePercentage": payload$.minFeePercentage, + "minTimeRemaining": payload$.minTimeRemaining, + "minUptimePerformance": payload$.minUptimePerformance, + "nodeIds": payload$.nodeIds, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "sortBy": payload$.sortBy, + "sortOrder": payload$.sortOrder, + "subnetId": payload$.subnetId, + "validationStatus": payload$.validationStatus, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listValidators", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListValidatorsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListValidatorsResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListValidatorsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListValidatorsServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/networks/{network}/validators")(pathParams$); - - const query$ = encodeFormQuery$({ - maxDelegationCapacity: payload$.maxDelegationCapacity, - maxFeePercentage: payload$.maxFeePercentage, - maxTimeRemaining: payload$.maxTimeRemaining, - maxUptimePerformance: payload$.maxUptimePerformance, - minDelegationCapacity: payload$.minDelegationCapacity, - minFeePercentage: payload$.minFeePercentage, - minTimeRemaining: payload$.minTimeRemaining, - minUptimePerformance: payload$.minUptimePerformance, - nodeIds: payload$.nodeIds, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - sortBy: payload$.sortBy, - sortOrder: payload$.sortOrder, - subnetId: payload$.subnetId, - validationStatus: payload$.validationStatus, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listValidators", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataPrimaryNetworkListValidators( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListValidatorsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListValidatorsResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListValidatorsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataPrimaryNetworkListValidators( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataPrimaryNetworkRewardsListHistoricalPrimaryNetworkRewards.ts b/src/funcs/dataPrimaryNetworkRewardsListHistoricalPrimaryNetworkRewards.ts index 22b2279..ac102a4 100644 --- a/src/funcs/dataPrimaryNetworkRewardsListHistoricalPrimaryNetworkRewards.ts +++ b/src/funcs/dataPrimaryNetworkRewardsListHistoricalPrimaryNetworkRewards.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListHistoricalPrimaryNetworkRewardsServerList } from "../models/operations/listhistoricalprimarynetworkrewards.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List historical rewards @@ -35,198 +40,211 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists historical rewards on the Primary Network for the supplied addresses. */ export async function dataPrimaryNetworkRewardsListHistoricalPrimaryNetworkRewards( - client$: AvaCloudSDKCore, - request: operations.ListHistoricalPrimaryNetworkRewardsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListHistoricalPrimaryNetworkRewardsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListHistoricalPrimaryNetworkRewardsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListHistoricalPrimaryNetworkRewardsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = typeof request === "undefined" ? {} : request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.ListHistoricalPrimaryNetworkRewardsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListHistoricalPrimaryNetworkRewardsRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListHistoricalPrimaryNetworkRewardsServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc("/v1/networks/{network}/rewards")(pathParams$); + + const query$ = encodeFormQuery$({ + "addresses": payload$.addresses, + "currency": payload$.currency, + "nodeIds": payload$.nodeIds, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "sortOrder": payload$.sortOrder, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listHistoricalPrimaryNetworkRewards", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListHistoricalPrimaryNetworkRewardsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json( + 200, + operations.ListHistoricalPrimaryNetworkRewardsResponse$inboundSchema, + { key: "Result" }, + ), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListHistoricalPrimaryNetworkRewardsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListHistoricalPrimaryNetworkRewardsServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/networks/{network}/rewards")(pathParams$); - - const query$ = encodeFormQuery$({ - addresses: payload$.addresses, - currency: payload$.currency, - nodeIds: payload$.nodeIds, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - sortOrder: payload$.sortOrder, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listHistoricalPrimaryNetworkRewards", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataPrimaryNetworkRewardsListHistoricalPrimaryNetworkRewards( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListHistoricalPrimaryNetworkRewardsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListHistoricalPrimaryNetworkRewardsResponse$inboundSchema, { - key: "Result", - }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListHistoricalPrimaryNetworkRewardsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataPrimaryNetworkRewardsListHistoricalPrimaryNetworkRewards( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataPrimaryNetworkRewardsListPendingPrimaryNetworkRewards.ts b/src/funcs/dataPrimaryNetworkRewardsListPendingPrimaryNetworkRewards.ts index 21b64ba..4a620c8 100644 --- a/src/funcs/dataPrimaryNetworkRewardsListPendingPrimaryNetworkRewards.ts +++ b/src/funcs/dataPrimaryNetworkRewardsListPendingPrimaryNetworkRewards.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListPendingPrimaryNetworkRewardsServerList } from "../models/operations/listpendingprimarynetworkrewards.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List pending rewards @@ -35,196 +40,213 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists pending rewards on the Primary Network for the supplied addresses. */ export async function dataPrimaryNetworkRewardsListPendingPrimaryNetworkRewards( - client$: AvaCloudSDKCore, - request: operations.ListPendingPrimaryNetworkRewardsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListPendingPrimaryNetworkRewardsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListPendingPrimaryNetworkRewardsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListPendingPrimaryNetworkRewardsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = typeof request === "undefined" ? {} : request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListPendingPrimaryNetworkRewardsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListPendingPrimaryNetworkRewardsRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListPendingPrimaryNetworkRewardsServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc("/v1/networks/{network}/rewards:listPending")( + pathParams$, + ); + + const query$ = encodeFormQuery$({ + "addresses": payload$.addresses, + "nodeIds": payload$.nodeIds, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "sortOrder": payload$.sortOrder, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listPendingPrimaryNetworkRewards", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListPendingPrimaryNetworkRewardsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json( + 200, + operations.ListPendingPrimaryNetworkRewardsResponse$inboundSchema, + { key: "Result" }, + ), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListPendingPrimaryNetworkRewardsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListPendingPrimaryNetworkRewardsServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/networks/{network}/rewards:listPending")(pathParams$); - - const query$ = encodeFormQuery$({ - addresses: payload$.addresses, - nodeIds: payload$.nodeIds, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - sortOrder: payload$.sortOrder, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listPendingPrimaryNetworkRewards", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataPrimaryNetworkRewardsListPendingPrimaryNetworkRewards( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListPendingPrimaryNetworkRewardsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListPendingPrimaryNetworkRewardsResponse$inboundSchema, { - key: "Result", - }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListPendingPrimaryNetworkRewardsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataPrimaryNetworkRewardsListPendingPrimaryNetworkRewards( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataPrimaryNetworkTransactionsGetTxByHash.ts b/src/funcs/dataPrimaryNetworkTransactionsGetTxByHash.ts index 56108c4..9fa1a33 100644 --- a/src/funcs/dataPrimaryNetworkTransactionsGetTxByHash.ts +++ b/src/funcs/dataPrimaryNetworkTransactionsGetTxByHash.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -30,152 +30,161 @@ import { Result } from "../types/fp.js"; * Gets the details of a single transaction on one of the Primary Network chains. */ export async function dataPrimaryNetworkTransactionsGetTxByHash( - client$: AvaCloudSDKCore, - request: operations.GetTxByHashRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetTxByHashRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - operations.GetTxByHashResponseBody, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetTxByHashResponseBody, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetTxByHashRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetTxByHashRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || pathToFunc(GetTxByHashServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetTxByHashServerList[0], { charEncoding: "percent" })(); - const pathParams$ = { - blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { - explode: false, - charEncoding: "percent", - }), - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - txHash: encodeSimple$("txHash", payload$.txHash, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { + explode: false, + charEncoding: "percent", + }), + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + txHash: encodeSimple$("txHash", payload$.txHash, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc( - "/v1/networks/{network}/blockchains/{blockchainId}/transactions/{txHash}" - )(pathParams$); + const path$ = pathToFunc( + "/v1/networks/{network}/blockchains/{blockchainId}/transactions/{txHash}", + )(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getTxByHash", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getTxByHash", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - operations.GetTxByHashResponseBody, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetTxByHashResponseBody$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + operations.GetTxByHashResponseBody, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetTxByHashResponseBody$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataPrimaryNetworkTransactionsListActivePrimaryNetworkStakingTransactions.ts b/src/funcs/dataPrimaryNetworkTransactionsListActivePrimaryNetworkStakingTransactions.ts index 2987407..12b2ab5 100644 --- a/src/funcs/dataPrimaryNetworkTransactionsListActivePrimaryNetworkStakingTransactions.ts +++ b/src/funcs/dataPrimaryNetworkTransactionsListActivePrimaryNetworkStakingTransactions.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListActivePrimaryNetworkStakingTransactionsServerList } from "../models/operations/listactiveprimarynetworkstakingtransactions.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List staking transactions @@ -35,209 +40,220 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists active staking transactions on the P-Chain for the supplied addresses. */ export async function dataPrimaryNetworkTransactionsListActivePrimaryNetworkStakingTransactions( - client$: AvaCloudSDKCore, - request: operations.ListActivePrimaryNetworkStakingTransactionsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListActivePrimaryNetworkStakingTransactionsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListActivePrimaryNetworkStakingTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListActivePrimaryNetworkStakingTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.ListActivePrimaryNetworkStakingTransactionsRequest$outboundSchema.parse( - value$ - ), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations + .ListActivePrimaryNetworkStakingTransactionsRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListActivePrimaryNetworkStakingTransactionsServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { + explode: false, + charEncoding: "percent", + }), + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/networks/{network}/blockchains/{blockchainId}/transactions:listStaking", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "addresses": payload$.addresses, + "endTimestamp": payload$.endTimestamp, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "sortOrder": payload$.sortOrder, + "startTimestamp": payload$.startTimestamp, + "txTypes": payload$.txTypes, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listActivePrimaryNetworkStakingTransactions", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListActivePrimaryNetworkStakingTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json( + 200, + operations + .ListActivePrimaryNetworkStakingTransactionsResponse$inboundSchema, + { key: "Result" }, + ), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListActivePrimaryNetworkStakingTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListActivePrimaryNetworkStakingTransactionsServerList[0], { - charEncoding: "percent", - })(); - - const pathParams$ = { - blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { - explode: false, - charEncoding: "percent", - }), - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc( - "/v1/networks/{network}/blockchains/{blockchainId}/transactions:listStaking" - )(pathParams$); - - const query$ = encodeFormQuery$({ - addresses: payload$.addresses, - endTimestamp: payload$.endTimestamp, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - sortOrder: payload$.sortOrder, - startTimestamp: payload$.startTimestamp, - txTypes: payload$.txTypes, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listActivePrimaryNetworkStakingTransactions", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataPrimaryNetworkTransactionsListActivePrimaryNetworkStakingTransactions( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListActivePrimaryNetworkStakingTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListActivePrimaryNetworkStakingTransactionsResponse$inboundSchema, { - key: "Result", - }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListActivePrimaryNetworkStakingTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataPrimaryNetworkTransactionsListActivePrimaryNetworkStakingTransactions( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataPrimaryNetworkTransactionsListAssetTransactions.ts b/src/funcs/dataPrimaryNetworkTransactionsListAssetTransactions.ts index 4441733..6fee538 100644 --- a/src/funcs/dataPrimaryNetworkTransactionsListAssetTransactions.ts +++ b/src/funcs/dataPrimaryNetworkTransactionsListAssetTransactions.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListAssetTransactionsServerList } from "../models/operations/listassettransactions.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List asset transactions @@ -35,204 +40,217 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists asset transactions corresponding to the given asset id on the X-Chain. */ export async function dataPrimaryNetworkTransactionsListAssetTransactions( - client$: AvaCloudSDKCore, - request: operations.ListAssetTransactionsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListAssetTransactionsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListAssetTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListAssetTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListAssetTransactionsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListAssetTransactionsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListAssetTransactionsServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + assetId: encodeSimple$("assetId", payload$.assetId, { + explode: false, + charEncoding: "percent", + }), + blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { + explode: false, + charEncoding: "percent", + }), + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/networks/{network}/blockchains/{blockchainId}/assets/{assetId}/transactions", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "endTimestamp": payload$.endTimestamp, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "startTimestamp": payload$.startTimestamp, + "txTypes": payload$.txTypes, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listAssetTransactions", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListAssetTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListAssetTransactionsResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListAssetTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListAssetTransactionsServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - assetId: encodeSimple$("assetId", payload$.assetId, { - explode: false, - charEncoding: "percent", - }), - blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { - explode: false, - charEncoding: "percent", - }), - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc( - "/v1/networks/{network}/blockchains/{blockchainId}/assets/{assetId}/transactions" - )(pathParams$); - - const query$ = encodeFormQuery$({ - endTimestamp: payload$.endTimestamp, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - startTimestamp: payload$.startTimestamp, - txTypes: payload$.txTypes, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listAssetTransactions", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataPrimaryNetworkTransactionsListAssetTransactions( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListAssetTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListAssetTransactionsResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListAssetTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataPrimaryNetworkTransactionsListAssetTransactions( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataPrimaryNetworkTransactionsListLatestPrimaryNetworkTransactions.ts b/src/funcs/dataPrimaryNetworkTransactionsListLatestPrimaryNetworkTransactions.ts index 93c5fe8..c754e1c 100644 --- a/src/funcs/dataPrimaryNetworkTransactionsListLatestPrimaryNetworkTransactions.ts +++ b/src/funcs/dataPrimaryNetworkTransactionsListLatestPrimaryNetworkTransactions.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListLatestPrimaryNetworkTransactionsServerList } from "../models/operations/listlatestprimarynetworktransactions.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List latest transactions @@ -39,207 +44,218 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Given that each transaction may return a large number of UTXO objects, bounded only by the maximum transaction size, the query may return less transactions than the provided page size. The result will contain less results than the page size if the number of utxos contained in the resulting transactions reach a performance threshold. */ export async function dataPrimaryNetworkTransactionsListLatestPrimaryNetworkTransactions( - client$: AvaCloudSDKCore, - request: operations.ListLatestPrimaryNetworkTransactionsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListLatestPrimaryNetworkTransactionsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListLatestPrimaryNetworkTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListLatestPrimaryNetworkTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => - operations.ListLatestPrimaryNetworkTransactionsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListLatestPrimaryNetworkTransactionsRequest$outboundSchema + .parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListLatestPrimaryNetworkTransactionsServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { + explode: false, + charEncoding: "percent", + }), + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/networks/{network}/blockchains/{blockchainId}/transactions", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "addresses": payload$.addresses, + "endTimestamp": payload$.endTimestamp, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "sortOrder": payload$.sortOrder, + "startTimestamp": payload$.startTimestamp, + "txTypes": payload$.txTypes, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listLatestPrimaryNetworkTransactions", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListLatestPrimaryNetworkTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json( + 200, + operations.ListLatestPrimaryNetworkTransactionsResponse$inboundSchema, + { key: "Result" }, + ), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListLatestPrimaryNetworkTransactionsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListLatestPrimaryNetworkTransactionsServerList[0], { - charEncoding: "percent", - })(); - - const pathParams$ = { - blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { - explode: false, - charEncoding: "percent", - }), - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/networks/{network}/blockchains/{blockchainId}/transactions")( - pathParams$ - ); - - const query$ = encodeFormQuery$({ - addresses: payload$.addresses, - endTimestamp: payload$.endTimestamp, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - sortOrder: payload$.sortOrder, - startTimestamp: payload$.startTimestamp, - txTypes: payload$.txTypes, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listLatestPrimaryNetworkTransactions", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataPrimaryNetworkTransactionsListLatestPrimaryNetworkTransactions( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListLatestPrimaryNetworkTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListLatestPrimaryNetworkTransactionsResponse$inboundSchema, { - key: "Result", - }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListLatestPrimaryNetworkTransactionsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataPrimaryNetworkTransactionsListLatestPrimaryNetworkTransactions( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataPrimaryNetworkUtxosGetUtxosByAddresses.ts b/src/funcs/dataPrimaryNetworkUtxosGetUtxosByAddresses.ts index eb0f611..d86fb83 100644 --- a/src/funcs/dataPrimaryNetworkUtxosGetUtxosByAddresses.ts +++ b/src/funcs/dataPrimaryNetworkUtxosGetUtxosByAddresses.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { GetUtxosByAddressesServerList } from "../models/operations/getutxosbyaddresses.js"; import * as operations from "../models/operations/index.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List UTXOs @@ -35,201 +40,214 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists UTXOs on one of the Primary Network chains for the supplied addresses. */ export async function dataPrimaryNetworkUtxosGetUtxosByAddresses( - client$: AvaCloudSDKCore, - request: operations.GetUtxosByAddressesRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetUtxosByAddressesRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.GetUtxosByAddressesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.GetUtxosByAddressesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetUtxosByAddressesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetUtxosByAddressesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(GetUtxosByAddressesServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { + explode: false, + charEncoding: "percent", + }), + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/networks/{network}/blockchains/{blockchainId}/utxos", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "addresses": payload$.addresses, + "assetId": payload$.assetId, + "includeSpent": payload$.includeSpent, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "sortOrder": payload$.sortOrder, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getUtxosByAddresses", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.GetUtxosByAddressesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetUtxosByAddressesResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.GetUtxosByAddressesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(GetUtxosByAddressesServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { - explode: false, - charEncoding: "percent", - }), - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/networks/{network}/blockchains/{blockchainId}/utxos")( - pathParams$ - ); - - const query$ = encodeFormQuery$({ - addresses: payload$.addresses, - assetId: payload$.assetId, - includeSpent: payload$.includeSpent, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - sortOrder: payload$.sortOrder, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getUtxosByAddresses", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataPrimaryNetworkUtxosGetUtxosByAddresses( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.GetUtxosByAddressesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetUtxosByAddressesResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.GetUtxosByAddressesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataPrimaryNetworkUtxosGetUtxosByAddresses( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataPrimaryNetworkVerticesGetVertexByHash.ts b/src/funcs/dataPrimaryNetworkVerticesGetVertexByHash.ts index 822516f..28ee75e 100644 --- a/src/funcs/dataPrimaryNetworkVerticesGetVertexByHash.ts +++ b/src/funcs/dataPrimaryNetworkVerticesGetVertexByHash.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -31,153 +31,161 @@ import { Result } from "../types/fp.js"; * Gets a single vertex on the X-Chain. */ export async function dataPrimaryNetworkVerticesGetVertexByHash( - client$: AvaCloudSDKCore, - request: operations.GetVertexByHashRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetVertexByHashRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.XChainVertex, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.XChainVertex, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetVertexByHashRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetVertexByHashRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(GetVertexByHashServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetVertexByHashServerList[0], { charEncoding: "percent" })(); - const pathParams$ = { - blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { - explode: false, - charEncoding: "percent", - }), - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - vertexHash: encodeSimple$("vertexHash", payload$.vertexHash, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { + explode: false, + charEncoding: "percent", + }), + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + vertexHash: encodeSimple$("vertexHash", payload$.vertexHash, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc( - "/v1/networks/{network}/blockchains/{blockchainId}/vertices/{vertexHash}" - )(pathParams$); + const path$ = pathToFunc( + "/v1/networks/{network}/blockchains/{blockchainId}/vertices/{vertexHash}", + )(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getVertexByHash", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getVertexByHash", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.XChainVertex, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.XChainVertex$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.XChainVertex, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.XChainVertex$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataPrimaryNetworkVerticesGetVertexByHeight.ts b/src/funcs/dataPrimaryNetworkVerticesGetVertexByHeight.ts index 8bda772..a4e4cb9 100644 --- a/src/funcs/dataPrimaryNetworkVerticesGetVertexByHeight.ts +++ b/src/funcs/dataPrimaryNetworkVerticesGetVertexByHeight.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { GetVertexByHeightServerList } from "../models/operations/getvertexbyheight.js"; import * as operations from "../models/operations/index.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List vertices by height @@ -35,199 +40,212 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists vertices at the given vertex height on the X-Chain. */ export async function dataPrimaryNetworkVerticesGetVertexByHeight( - client$: AvaCloudSDKCore, - request: operations.GetVertexByHeightRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetVertexByHeightRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.GetVertexByHeightResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.GetVertexByHeightResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetVertexByHeightRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetVertexByHeightRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(GetVertexByHeightServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { + explode: false, + charEncoding: "percent", + }), + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/networks/{network}/blockchains/{blockchainId}/vertices:listByHeight", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "sortOrder": payload$.sortOrder, + "vertexHeight": payload$.vertexHeight, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getVertexByHeight", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.GetVertexByHeightResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetVertexByHeightResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.GetVertexByHeightResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(GetVertexByHeightServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { - explode: false, - charEncoding: "percent", - }), - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc( - "/v1/networks/{network}/blockchains/{blockchainId}/vertices:listByHeight" - )(pathParams$); - - const query$ = encodeFormQuery$({ - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - sortOrder: payload$.sortOrder, - vertexHeight: payload$.vertexHeight, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getVertexByHeight", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataPrimaryNetworkVerticesGetVertexByHeight( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.GetVertexByHeightResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetVertexByHeightResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.GetVertexByHeightResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataPrimaryNetworkVerticesGetVertexByHeight( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataPrimaryNetworkVerticesListLatestXChainVertices.ts b/src/funcs/dataPrimaryNetworkVerticesListLatestXChainVertices.ts index d198a8e..e592cbc 100644 --- a/src/funcs/dataPrimaryNetworkVerticesListLatestXChainVertices.ts +++ b/src/funcs/dataPrimaryNetworkVerticesListLatestXChainVertices.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListLatestXChainVerticesServerList } from "../models/operations/listlatestxchainvertices.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List vertices @@ -35,197 +40,210 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists latest vertices on the X-Chain. */ export async function dataPrimaryNetworkVerticesListLatestXChainVertices( - client$: AvaCloudSDKCore, - request: operations.ListLatestXChainVerticesRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListLatestXChainVerticesRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListLatestXChainVerticesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListLatestXChainVerticesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListLatestXChainVerticesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListLatestXChainVerticesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListLatestXChainVerticesServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { + explode: false, + charEncoding: "percent", + }), + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v1/networks/{network}/blockchains/{blockchainId}/vertices", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listLatestXChainVertices", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListLatestXChainVerticesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListLatestXChainVerticesResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListLatestXChainVerticesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListLatestXChainVerticesServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - blockchainId: encodeSimple$("blockchainId", payload$.blockchainId, { - explode: false, - charEncoding: "percent", - }), - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v1/networks/{network}/blockchains/{blockchainId}/vertices")( - pathParams$ - ); - - const query$ = encodeFormQuery$({ - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listLatestXChainVertices", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataPrimaryNetworkVerticesListLatestXChainVertices( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListLatestXChainVerticesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListLatestXChainVerticesResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListLatestXChainVerticesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataPrimaryNetworkVerticesListLatestXChainVertices( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataTeleporterGetTeleporterMessage.ts b/src/funcs/dataTeleporterGetTeleporterMessage.ts index 2deca70..1763d0f 100644 --- a/src/funcs/dataTeleporterGetTeleporterMessage.ts +++ b/src/funcs/dataTeleporterGetTeleporterMessage.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -30,143 +30,153 @@ import { Result } from "../types/fp.js"; * Gets a teleporter message by message ID. */ export async function dataTeleporterGetTeleporterMessage( - client$: AvaCloudSDKCore, - request: operations.GetTeleporterMessageRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetTeleporterMessageRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - operations.GetTeleporterMessageResponseBody, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetTeleporterMessageResponseBody, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetTeleporterMessageRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetTeleporterMessageRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(GetTeleporterMessageServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetTeleporterMessageServerList[0], { + charEncoding: "percent", + })(); - const pathParams$ = { - messageId: encodeSimple$("messageId", payload$.messageId, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + messageId: encodeSimple$("messageId", payload$.messageId, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/v1/teleporter/messages/{messageId}")(pathParams$); + const path$ = pathToFunc("/v1/teleporter/messages/{messageId}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getTeleporterMessage", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getTeleporterMessage", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - operations.GetTeleporterMessageResponseBody, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetTeleporterMessageResponseBody$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + operations.GetTeleporterMessageResponseBody, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetTeleporterMessageResponseBody$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataTeleporterListTeleporterMessages.ts b/src/funcs/dataTeleporterListTeleporterMessages.ts index b4b9064..0f1cab4 100644 --- a/src/funcs/dataTeleporterListTeleporterMessages.ts +++ b/src/funcs/dataTeleporterListTeleporterMessages.ts @@ -11,11 +11,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -23,7 +23,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListTeleporterMessagesServerList } from "../models/operations/listteleportermessages.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List teleporter messages @@ -32,190 +37,202 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists teleporter messages. Ordered by timestamp in descending order. */ export async function dataTeleporterListTeleporterMessages( - client$: AvaCloudSDKCore, - request: operations.ListTeleporterMessagesRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListTeleporterMessagesRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListTeleporterMessagesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListTeleporterMessagesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = typeof request === "undefined" ? {} : request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListTeleporterMessagesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListTeleporterMessagesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListTeleporterMessagesServerList[0], { + charEncoding: "percent", + })(); + + const path$ = pathToFunc("/v1/teleporter/messages")(); + + const query$ = encodeFormQuery$({ + "blockchainId": payload$.blockchainId, + "destinationBlockchainId": payload$.destinationBlockchainId, + "from": payload$.from, + "network": payload$.network, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "sourceBlockchainId": payload$.sourceBlockchainId, + "to": payload$.to, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listTeleporterMessages", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListTeleporterMessagesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListTeleporterMessagesResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListTeleporterMessagesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(ListTeleporterMessagesServerList[0], { charEncoding: "percent" })(); - - const path$ = pathToFunc("/v1/teleporter/messages")(); - - const query$ = encodeFormQuery$({ - blockchainId: payload$.blockchainId, - destinationBlockchainId: payload$.destinationBlockchainId, - from: payload$.from, - network: payload$.network, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - sourceBlockchainId: payload$.sourceBlockchainId, - to: payload$.to, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listTeleporterMessages", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataTeleporterListTeleporterMessages( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListTeleporterMessagesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListTeleporterMessagesResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListTeleporterMessagesResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataTeleporterListTeleporterMessages( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataTeleporterListTeleporterMessagesByAddress.ts b/src/funcs/dataTeleporterListTeleporterMessagesByAddress.ts new file mode 100644 index 0000000..fbc433b --- /dev/null +++ b/src/funcs/dataTeleporterListTeleporterMessagesByAddress.ts @@ -0,0 +1,197 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { AvaCloudSDKCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.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 { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKError } from "../models/errors/sdkerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { ListTeleporterMessagesByAddressServerList } from "../models/operations/listteleportermessagesbyaddress.js"; +import { Result } from "../types/fp.js"; + +/** + * List teleporter messages by address + * + * @remarks + * Lists teleporter messages by address. Ordered by timestamp in descending order. + */ +export async function dataTeleporterListTeleporterMessagesByAddress( + client$: AvaCloudSDKCore, + request: operations.ListTeleporterMessagesByAddressRequest, + options?: RequestOptions & { serverURL?: string }, +): Promise< + Result< + components.ListTeleporterMessagesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListTeleporterMessagesByAddressRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListTeleporterMessagesByAddressServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/v1/teleporter/addresses/{address}/messages")( + pathParams$, + ); + + const query$ = encodeFormQuery$({ + "network": payload$.network, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listTeleporterMessagesByAddress", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + components.ListTeleporterMessagesResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.ListTeleporterMessagesResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/src/funcs/dataUsageMetricsGetApiLogs.ts b/src/funcs/dataUsageMetricsGetApiLogs.ts index 064c2fe..ac14141 100644 --- a/src/funcs/dataUsageMetricsGetApiLogs.ts +++ b/src/funcs/dataUsageMetricsGetApiLogs.ts @@ -11,11 +11,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -23,7 +23,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { GetApiLogsServerList } from "../models/operations/getapilogs.js"; import * as operations from "../models/operations/index.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * Get logs for requests made by client @@ -32,191 +37,201 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Gets logs for requests made by client over a specified time interval for a specific organization. */ export async function dataUsageMetricsGetApiLogs( - client$: AvaCloudSDKCore, - request: operations.GetApiLogsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetApiLogsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.GetApiLogsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.GetApiLogsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = typeof request === "undefined" ? {} : request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetApiLogsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetApiLogsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(GetApiLogsServerList[0], { charEncoding: "percent" })(); + + const path$ = pathToFunc("/v1/apiLogs")(); + + const query$ = encodeFormQuery$({ + "apiKeyId": payload$.apiKeyId, + "chainId": payload$.chainId, + "endTimestamp": payload$.endTimestamp, + "orgId": payload$.orgId, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "requestPath": payload$.requestPath, + "requestType": payload$.requestType, + "responseCode": payload$.responseCode, + "startTimestamp": payload$.startTimestamp, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getApiLogs", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.GetApiLogsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetApiLogsResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.GetApiLogsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || pathToFunc(GetApiLogsServerList[0], { charEncoding: "percent" })(); - - const path$ = pathToFunc("/v1/apiLogs")(); - - const query$ = encodeFormQuery$({ - apiKeyId: payload$.apiKeyId, - chainId: payload$.chainId, - endTimestamp: payload$.endTimestamp, - orgId: payload$.orgId, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - requestPath: payload$.requestPath, - requestType: payload$.requestType, - responseCode: payload$.responseCode, - startTimestamp: payload$.startTimestamp, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getApiLogs", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataUsageMetricsGetApiLogs( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.GetApiLogsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetApiLogsResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.GetApiLogsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataUsageMetricsGetApiLogs( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataUsageMetricsGetApiUsageMetrics.ts b/src/funcs/dataUsageMetricsGetApiUsageMetrics.ts index 25b046f..88a9eff 100644 --- a/src/funcs/dataUsageMetricsGetApiUsageMetrics.ts +++ b/src/funcs/dataUsageMetricsGetApiUsageMetrics.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -31,150 +31,160 @@ import { Result } from "../types/fp.js"; * Gets metrics for Glacier API usage over a specified time interval aggregated at the specified time-duration granularity. */ export async function dataUsageMetricsGetApiUsageMetrics( - client$: AvaCloudSDKCore, - request: operations.GetApiUsageMetricsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetApiUsageMetricsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.UsageMetricsResponseDTO, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.UsageMetricsResponseDTO, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = typeof request === "undefined" ? {} : request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetApiUsageMetricsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetApiUsageMetricsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(GetApiUsageMetricsServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetApiUsageMetricsServerList[0], { + charEncoding: "percent", + })(); - const path$ = pathToFunc("/v1/apiUsageMetrics")(); + const path$ = pathToFunc("/v1/apiUsageMetrics")(); - const query$ = encodeFormQuery$({ - apiKeyId: payload$.apiKeyId, - chainId: payload$.chainId, - endTimestamp: payload$.endTimestamp, - groupBy: payload$.groupBy, - orgId: payload$.orgId, - requestPath: payload$.requestPath, - requestType: payload$.requestType, - responseCode: payload$.responseCode, - startTimestamp: payload$.startTimestamp, - timeInterval: payload$.timeInterval, - }); + const query$ = encodeFormQuery$({ + "apiKeyId": payload$.apiKeyId, + "chainId": payload$.chainId, + "endTimestamp": payload$.endTimestamp, + "groupBy": payload$.groupBy, + "orgId": payload$.orgId, + "requestPath": payload$.requestPath, + "requestType": payload$.requestType, + "responseCode": payload$.responseCode, + "startTimestamp": payload$.startTimestamp, + "timeInterval": payload$.timeInterval, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getApiUsageMetrics", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getApiUsageMetrics", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.UsageMetricsResponseDTO, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.UsageMetricsResponseDTO$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.UsageMetricsResponseDTO, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.UsageMetricsResponseDTO$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataWebhooksAddAddressesToWebhook.ts b/src/funcs/dataWebhooksAddAddressesToWebhook.ts index 37dc454..22fe69e 100644 --- a/src/funcs/dataWebhooksAddAddressesToWebhook.ts +++ b/src/funcs/dataWebhooksAddAddressesToWebhook.ts @@ -3,7 +3,10 @@ */ import { AvaCloudSDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; @@ -11,11 +14,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -31,141 +34,156 @@ import { Result } from "../types/fp.js"; * Add addresses to webhook. */ export async function dataWebhooksAddAddressesToWebhook( - client$: AvaCloudSDKCore, - request: operations.AddAddressesToWebhookRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.AddAddressesToWebhookRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.WebhookResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.WebhookResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.AddAddressesToWebhookRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.AddressesChangeRequest, { explode: true }); + const input$ = request; - const baseURL$ = - options?.serverURL || - pathToFunc(AddAddressesToWebhookServerList[0], { charEncoding: "percent" })(); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.AddAddressesToWebhookRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.AddressesChangeRequest, { + explode: true, + }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const baseURL$ = options?.serverURL + || pathToFunc(AddAddressesToWebhookServerList[0], { + charEncoding: "percent", + })(); - const path$ = pathToFunc("/v1/webhooks/{id}/addresses")(pathParams$); + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/webhooks/{id}/addresses")(pathParams$); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "addAddressesToWebhook", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "PATCH", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "addAddressesToWebhook", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "PATCH", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.WebhookResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.WebhookResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.WebhookResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.WebhookResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataWebhooksCreateWebhook.ts b/src/funcs/dataWebhooksCreateWebhook.ts index f7c703c..d2c5474 100644 --- a/src/funcs/dataWebhooksCreateWebhook.ts +++ b/src/funcs/dataWebhooksCreateWebhook.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -30,136 +30,144 @@ import { Result } from "../types/fp.js"; * Create a new webhook. */ export async function dataWebhooksCreateWebhook( - client$: AvaCloudSDKCore, - request: components.CreateWebhookRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: components.CreateWebhookRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.WebhookResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.WebhookResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => components.CreateWebhookRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => components.CreateWebhookRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$, { explode: true }); - const baseURL$ = - options?.serverURL || pathToFunc(CreateWebhookServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(CreateWebhookServerList[0], { charEncoding: "percent" })(); - const path$ = pathToFunc("/v1/webhooks")(); + const path$ = pathToFunc("/v1/webhooks")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "createWebhook", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "createWebhook", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.WebhookResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.WebhookResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.WebhookResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.WebhookResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataWebhooksDeactivateWebhook.ts b/src/funcs/dataWebhooksDeactivateWebhook.ts index c4fb90b..f0d231c 100644 --- a/src/funcs/dataWebhooksDeactivateWebhook.ts +++ b/src/funcs/dataWebhooksDeactivateWebhook.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -31,140 +31,153 @@ import { Result } from "../types/fp.js"; * Deactivates a webhook by ID. */ export async function dataWebhooksDeactivateWebhook( - client$: AvaCloudSDKCore, - request: operations.DeactivateWebhookRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.DeactivateWebhookRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.WebhookResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.WebhookResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.DeactivateWebhookRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.DeactivateWebhookRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(DeactivateWebhookServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(DeactivateWebhookServerList[0], { + charEncoding: "percent", + })(); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/v1/webhooks/{id}")(pathParams$); + const path$ = pathToFunc("/v1/webhooks/{id}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "deactivateWebhook", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "deactivateWebhook", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "DELETE", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.WebhookResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.WebhookResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.WebhookResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.WebhookResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataWebhooksGenerateSharedSecret.ts b/src/funcs/dataWebhooksGenerateSharedSecret.ts index 74a6778..2a0ff3c 100644 --- a/src/funcs/dataWebhooksGenerateSharedSecret.ts +++ b/src/funcs/dataWebhooksGenerateSharedSecret.ts @@ -9,11 +9,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -28,121 +28,130 @@ import { Result } from "../types/fp.js"; * Generates a new shared secret. */ export async function dataWebhooksGenerateSharedSecret( - client$: AvaCloudSDKCore, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.SharedSecretsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.SharedSecretsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const baseURL$ = - options?.serverURL || - pathToFunc(GenerateSharedSecretServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GenerateSharedSecretServerList[0], { + charEncoding: "percent", + })(); - const path$ = pathToFunc("/v1/webhooks:generateOrRotateSharedSecret")(); + const path$ = pathToFunc("/v1/webhooks:generateOrRotateSharedSecret")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "generateSharedSecret", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "generateSharedSecret", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - baseURL: baseURL$, - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + baseURL: baseURL$, + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.SharedSecretsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.SharedSecretsResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.SharedSecretsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.SharedSecretsResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataWebhooksGetAddressesFromWebhook.ts b/src/funcs/dataWebhooksGetAddressesFromWebhook.ts index d36fe7b..d570864 100644 --- a/src/funcs/dataWebhooksGetAddressesFromWebhook.ts +++ b/src/funcs/dataWebhooksGetAddressesFromWebhook.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { GetAddressesFromWebhookServerList } from "../models/operations/getaddressesfromwebhook.js"; import * as operations from "../models/operations/index.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List adresses by webhook @@ -35,188 +40,203 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * List adresses by webhook. */ export async function dataWebhooksGetAddressesFromWebhook( - client$: AvaCloudSDKCore, - request: operations.GetAddressesFromWebhookRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetAddressesFromWebhookRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.GetAddressesFromWebhookResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.GetAddressesFromWebhookResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetAddressesFromWebhookRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetAddressesFromWebhookRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(GetAddressesFromWebhookServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/v1/webhooks/{id}/addresses")(pathParams$); + + const query$ = encodeFormQuery$({ + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getAddressesFromWebhook", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.GetAddressesFromWebhookResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetAddressesFromWebhookResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.GetAddressesFromWebhookResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(GetAddressesFromWebhookServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; - - const path$ = pathToFunc("/v1/webhooks/{id}/addresses")(pathParams$); - - const query$ = encodeFormQuery$({ - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getAddressesFromWebhook", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataWebhooksGetAddressesFromWebhook( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.GetAddressesFromWebhookResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetAddressesFromWebhookResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.GetAddressesFromWebhookResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataWebhooksGetAddressesFromWebhook( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataWebhooksGetSharedSecret.ts b/src/funcs/dataWebhooksGetSharedSecret.ts index 55db268..76b8d9e 100644 --- a/src/funcs/dataWebhooksGetSharedSecret.ts +++ b/src/funcs/dataWebhooksGetSharedSecret.ts @@ -9,11 +9,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -28,121 +28,128 @@ import { Result } from "../types/fp.js"; * Get a previously generated shared secret. */ export async function dataWebhooksGetSharedSecret( - client$: AvaCloudSDKCore, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.SharedSecretsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.SharedSecretsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const baseURL$ = - options?.serverURL || - pathToFunc(GetSharedSecretServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetSharedSecretServerList[0], { charEncoding: "percent" })(); - const path$ = pathToFunc("/v1/webhooks:getSharedSecret")(); + const path$ = pathToFunc("/v1/webhooks:getSharedSecret")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getSharedSecret", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getSharedSecret", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.SharedSecretsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.SharedSecretsResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.SharedSecretsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.SharedSecretsResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataWebhooksGetWebhook.ts b/src/funcs/dataWebhooksGetWebhook.ts index dac3400..eaa8b16 100644 --- a/src/funcs/dataWebhooksGetWebhook.ts +++ b/src/funcs/dataWebhooksGetWebhook.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -31,139 +31,150 @@ import { Result } from "../types/fp.js"; * Retrieves a webhook by ID. */ export async function dataWebhooksGetWebhook( - client$: AvaCloudSDKCore, - request: operations.GetWebhookRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetWebhookRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.WebhookResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.WebhookResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetWebhookRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetWebhookRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || pathToFunc(GetWebhookServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetWebhookServerList[0], { charEncoding: "percent" })(); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/v1/webhooks/{id}")(pathParams$); + const path$ = pathToFunc("/v1/webhooks/{id}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getWebhook", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getWebhook", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.WebhookResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.WebhookResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.WebhookResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.WebhookResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataWebhooksListWebhooks.ts b/src/funcs/dataWebhooksListWebhooks.ts index 1f8e84a..853e2d1 100644 --- a/src/funcs/dataWebhooksListWebhooks.ts +++ b/src/funcs/dataWebhooksListWebhooks.ts @@ -11,11 +11,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -23,7 +23,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListWebhooksServerList } from "../models/operations/listwebhooks.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * List webhooks @@ -32,184 +37,194 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Lists webhooks for the user. */ export async function dataWebhooksListWebhooks( - client$: AvaCloudSDKCore, - request: operations.ListWebhooksRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListWebhooksRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListWebhooksResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListWebhooksResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = typeof request === "undefined" ? {} : request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListWebhooksRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListWebhooksRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListWebhooksServerList[0], { charEncoding: "percent" })(); + + const path$ = pathToFunc("/v1/webhooks")(); + + const query$ = encodeFormQuery$({ + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "status": payload$.status, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listWebhooks", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListWebhooksResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListWebhooksResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListWebhooksResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || pathToFunc(ListWebhooksServerList[0], { charEncoding: "percent" })(); - - const path$ = pathToFunc("/v1/webhooks")(); - - const query$ = encodeFormQuery$({ - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - status: payload$.status, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listWebhooks", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + dataWebhooksListWebhooks( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListWebhooksResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListWebhooksResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListWebhooksResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - dataWebhooksListWebhooks( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/dataWebhooksRemoveAddressesFromWebhook.ts b/src/funcs/dataWebhooksRemoveAddressesFromWebhook.ts index 5a8381d..e6e5a15 100644 --- a/src/funcs/dataWebhooksRemoveAddressesFromWebhook.ts +++ b/src/funcs/dataWebhooksRemoveAddressesFromWebhook.ts @@ -3,7 +3,10 @@ */ import { AvaCloudSDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; @@ -11,11 +14,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -31,141 +34,156 @@ import { Result } from "../types/fp.js"; * Remove addresses from webhook. */ export async function dataWebhooksRemoveAddressesFromWebhook( - client$: AvaCloudSDKCore, - request: operations.RemoveAddressesFromWebhookRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.RemoveAddressesFromWebhookRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.WebhookResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.WebhookResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.RemoveAddressesFromWebhookRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.AddressesChangeRequest, { explode: true }); + const input$ = request; - const baseURL$ = - options?.serverURL || - pathToFunc(RemoveAddressesFromWebhookServerList[0], { charEncoding: "percent" })(); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.RemoveAddressesFromWebhookRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.AddressesChangeRequest, { + explode: true, + }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const baseURL$ = options?.serverURL + || pathToFunc(RemoveAddressesFromWebhookServerList[0], { + charEncoding: "percent", + })(); - const path$ = pathToFunc("/v1/webhooks/{id}/addresses")(pathParams$); + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/webhooks/{id}/addresses")(pathParams$); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "removeAddressesFromWebhook", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "DELETE", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "removeAddressesFromWebhook", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.WebhookResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.WebhookResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.WebhookResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.WebhookResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/dataWebhooksUpdateWebhook.ts b/src/funcs/dataWebhooksUpdateWebhook.ts index d7abcda..3e7fb66 100644 --- a/src/funcs/dataWebhooksUpdateWebhook.ts +++ b/src/funcs/dataWebhooksUpdateWebhook.ts @@ -3,7 +3,10 @@ */ import { AvaCloudSDKCore } from "../core.js"; -import { encodeJSON as encodeJSON$, encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; @@ -11,11 +14,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -31,140 +34,153 @@ import { Result } from "../types/fp.js"; * Updates an existing webhook. */ export async function dataWebhooksUpdateWebhook( - client$: AvaCloudSDKCore, - request: operations.UpdateWebhookRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.UpdateWebhookRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.WebhookResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.WebhookResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UpdateWebhookRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$.UpdateWebhookRequest, { explode: true }); + const input$ = request; - const baseURL$ = - options?.serverURL || pathToFunc(UpdateWebhookServerList[0], { charEncoding: "percent" })(); + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.UpdateWebhookRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.UpdateWebhookRequest, { + explode: true, + }); - const pathParams$ = { - id: encodeSimple$("id", payload$.id, { explode: false, charEncoding: "percent" }), - }; + const baseURL$ = options?.serverURL + || pathToFunc(UpdateWebhookServerList[0], { charEncoding: "percent" })(); - const path$ = pathToFunc("/v1/webhooks/{id}")(pathParams$); + const pathParams$ = { + id: encodeSimple$("id", payload$.id, { + explode: false, + charEncoding: "percent", + }), + }; - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const path$ = pathToFunc("/v1/webhooks/{id}")(pathParams$); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "updateWebhook", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "PATCH", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "updateWebhook", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "PATCH", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.WebhookResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.WebhookResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.WebhookResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.WebhookResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/metricsChainMetricsGetEvmChainMetrics.ts b/src/funcs/metricsChainMetricsGetEvmChainMetrics.ts index 2913ab2..3dfb668 100644 --- a/src/funcs/metricsChainMetricsGetEvmChainMetrics.ts +++ b/src/funcs/metricsChainMetricsGetEvmChainMetrics.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { GetEvmChainMetricsServerList } from "../models/operations/getevmchainmetrics.js"; import * as operations from "../models/operations/index.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * Get metrics for EVM chains @@ -35,198 +40,213 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Gets metrics for an EVM chain over a specified time interval aggregated at the specified time-interval granularity. */ export async function metricsChainMetricsGetEvmChainMetrics( - client$: AvaCloudSDKCore, - request: operations.GetEvmChainMetricsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetEvmChainMetricsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.GetEvmChainMetricsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.GetEvmChainMetricsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetEvmChainMetricsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetEvmChainMetricsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(GetEvmChainMetricsServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + metric: encodeSimple$("metric", payload$.metric, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/v2/chains/{chainId}/metrics/{metric}")( + pathParams$, + ); + + const query$ = encodeFormQuery$({ + "endTimestamp": payload$.endTimestamp, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "startTimestamp": payload$.startTimestamp, + "timeInterval": payload$.timeInterval, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getEvmChainMetrics", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.GetEvmChainMetricsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetEvmChainMetricsResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.GetEvmChainMetricsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(GetEvmChainMetricsServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - metric: encodeSimple$("metric", payload$.metric, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v2/chains/{chainId}/metrics/{metric}")(pathParams$); - - const query$ = encodeFormQuery$({ - endTimestamp: payload$.endTimestamp, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - startTimestamp: payload$.startTimestamp, - timeInterval: payload$.timeInterval, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getEvmChainMetrics", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + metricsChainMetricsGetEvmChainMetrics( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.GetEvmChainMetricsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetEvmChainMetricsResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.GetEvmChainMetricsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - metricsChainMetricsGetEvmChainMetrics( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/metricsChainMetricsGetEvmChainRollingWindowMetrics.ts b/src/funcs/metricsChainMetricsGetEvmChainRollingWindowMetrics.ts index 34022fc..e341e07 100644 --- a/src/funcs/metricsChainMetricsGetEvmChainRollingWindowMetrics.ts +++ b/src/funcs/metricsChainMetricsGetEvmChainRollingWindowMetrics.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -31,147 +31,162 @@ import { Result } from "../types/fp.js"; * Gets the rolling window metrics for an EVM chain for the last hour, day, month, year, and all time. */ export async function metricsChainMetricsGetEvmChainRollingWindowMetrics( - client$: AvaCloudSDKCore, - request: operations.GetEvmChainRollingWindowMetricsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetEvmChainRollingWindowMetricsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.RollingWindowMetricsApiResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.RollingWindowMetricsApiResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetEvmChainRollingWindowMetricsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetEvmChainRollingWindowMetricsRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(GetEvmChainRollingWindowMetricsServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetEvmChainRollingWindowMetricsServerList[0], { + charEncoding: "percent", + })(); - const pathParams$ = { - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - metric: encodeSimple$("metric", payload$.metric, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + metric: encodeSimple$("metric", payload$.metric, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/v2/chains/{chainId}/rollingWindowMetrics/{metric}")(pathParams$); + const path$ = pathToFunc( + "/v2/chains/{chainId}/rollingWindowMetrics/{metric}", + )(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getEvmChainRollingWindowMetrics", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getEvmChainRollingWindowMetrics", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.RollingWindowMetricsApiResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.RollingWindowMetricsApiResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.RollingWindowMetricsApiResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.RollingWindowMetricsApiResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/metricsChainMetricsGetStakingMetrics.ts b/src/funcs/metricsChainMetricsGetStakingMetrics.ts index 94a4982..283e8b9 100644 --- a/src/funcs/metricsChainMetricsGetStakingMetrics.ts +++ b/src/funcs/metricsChainMetricsGetStakingMetrics.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { GetStakingMetricsServerList } from "../models/operations/getstakingmetrics.js"; import * as operations from "../models/operations/index.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * Get staking metrics for a given subnet @@ -35,198 +40,213 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Gets staking metrics for a given subnet. */ export async function metricsChainMetricsGetStakingMetrics( - client$: AvaCloudSDKCore, - request: operations.GetStakingMetricsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetStakingMetricsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.GetStakingMetricsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.GetStakingMetricsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetStakingMetricsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetStakingMetricsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(GetStakingMetricsServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + metric: encodeSimple$("metric", payload$.metric, { + explode: false, + charEncoding: "percent", + }), + network: encodeSimple$( + "network", + payload$.network ?? client$.options$.network, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc("/v2/networks/{network}/metrics/{metric}")( + pathParams$, + ); + + const query$ = encodeFormQuery$({ + "endTimestamp": payload$.endTimestamp, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "startTimestamp": payload$.startTimestamp, + "subnetId": payload$.subnetId, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getStakingMetrics", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.GetStakingMetricsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetStakingMetricsResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.GetStakingMetricsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(GetStakingMetricsServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - metric: encodeSimple$("metric", payload$.metric, { - explode: false, - charEncoding: "percent", - }), - network: encodeSimple$("network", payload$.network ?? client$.options$.network, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v2/networks/{network}/metrics/{metric}")(pathParams$); - - const query$ = encodeFormQuery$({ - endTimestamp: payload$.endTimestamp, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - startTimestamp: payload$.startTimestamp, - subnetId: payload$.subnetId, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getStakingMetrics", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + metricsChainMetricsGetStakingMetrics( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.GetStakingMetricsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetStakingMetricsResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.GetStakingMetricsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - metricsChainMetricsGetStakingMetrics( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/metricsChainMetricsGetTeleporterMetricsByChain.ts b/src/funcs/metricsChainMetricsGetTeleporterMetricsByChain.ts new file mode 100644 index 0000000..9ab4e39 --- /dev/null +++ b/src/funcs/metricsChainMetricsGetTeleporterMetricsByChain.ts @@ -0,0 +1,192 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { AvaCloudSDKCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.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 { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKError } from "../models/errors/sdkerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { GetTeleporterMetricsByChainServerList } from "../models/operations/getteleportermetricsbychain.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +/** + * Get teleporter metrics for EVM chains + * + * @remarks + * Gets teleporter metrics for an EVM chain. + */ +export async function metricsChainMetricsGetTeleporterMetricsByChain( + client$: AvaCloudSDKCore, + request: operations.GetTeleporterMetricsByChainRequest, + options?: RequestOptions & { serverURL?: string }, +): Promise< + Result< + components.TeleporterChainMetricsApiResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetTeleporterMetricsByChainRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(GetTeleporterMetricsByChainServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + metric: encodeSimple$("metric", payload$.metric, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/v2/chains/{chainId}/teleporterMetrics/{metric}")( + pathParams$, + ); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getTeleporterMetricsByChain", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + components.TeleporterChainMetricsApiResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.TeleporterChainMetricsApiResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/src/funcs/metricsEvmChainsGetChain.ts b/src/funcs/metricsEvmChainsGetChain.ts index f5a5f39..d754bd8 100644 --- a/src/funcs/metricsEvmChainsGetChain.ts +++ b/src/funcs/metricsEvmChainsGetChain.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -28,145 +28,154 @@ import { Result } from "../types/fp.js"; * Get chain information for supported blockchain * * @remarks - * Get chain information for Popsicle API supported blockchain. + * Get chain information for Metrics API supported blockchain. */ export async function metricsEvmChainsGetChain( - client$: AvaCloudSDKCore, - request: operations.GetChainRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetChainRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.Chain, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.Chain, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = typeof request === "undefined" ? {} : request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetChainRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetChainRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || pathToFunc(GetChainServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetChainServerList[0], { charEncoding: "percent" })(); - const pathParams$ = { - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; - const path$ = pathToFunc("/v2/chains/{chainId}")(pathParams$); + const path$ = pathToFunc("/v2/chains/{chainId}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getChain", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getChain", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.Chain, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.Chain$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.Chain, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.Chain$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/metricsEvmChainsListChains.ts b/src/funcs/metricsEvmChainsListChains.ts index e9ef045..871d7c1 100644 --- a/src/funcs/metricsEvmChainsListChains.ts +++ b/src/funcs/metricsEvmChainsListChains.ts @@ -11,11 +11,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -23,192 +23,207 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { ListChainsServerList } from "../models/operations/listchains.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * Get a list of supported blockchains * * @remarks - * Get a list of Popsicle API supported blockchains. + * Get a list of Metrics API supported blockchains. */ export async function metricsEvmChainsListChains( - client$: AvaCloudSDKCore, - request: operations.ListChainsRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.ListChainsRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.ListChainsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.ListChainsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = typeof request === "undefined" ? {} : request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ListChainsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListChainsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(ListChainsServerList[0], { charEncoding: "percent" })(); + + const path$ = pathToFunc("/v2/chains")(); + + const query$ = encodeFormQuery$({ + "network": payload$.network, + "pageToken": payload$.pageToken, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "listChains", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.ListChainsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.ListChainsResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.ListChainsResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || pathToFunc(ListChainsServerList[0], { charEncoding: "percent" })(); - - const path$ = pathToFunc("/v2/chains")(); - - const query$ = encodeFormQuery$({ - network: payload$.network, - pageToken: payload$.pageToken, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "listChains", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + metricsEvmChainsListChains( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.ListChainsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.ListChainsResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.ListChainsResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - metricsEvmChainsListChains( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/metricsHealthCheckMetricsHealthCheck.ts b/src/funcs/metricsHealthCheckMetricsHealthCheck.ts index 466d3b1..8f1690f 100644 --- a/src/funcs/metricsHealthCheckMetricsHealthCheck.ts +++ b/src/funcs/metricsHealthCheckMetricsHealthCheck.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -25,100 +25,98 @@ import { Result } from "../types/fp.js"; * Get the health of the service */ export async function metricsHealthCheckMetricsHealthCheck( - client$: AvaCloudSDKCore, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - operations.MetricsHealthCheckResponseBody, - | errors.MetricsHealthCheckResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.MetricsHealthCheckResponseBody, + | errors.MetricsHealthCheckResponseBody + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const baseURL$ = - options?.serverURL || - pathToFunc(MetricsHealthCheckServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(MetricsHealthCheckServerList[0], { + charEncoding: "percent", + })(); - const path$ = pathToFunc("/v2/health-check")(); + const path$ = pathToFunc("/v2/health-check")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "metrics-health-check", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "metrics-health-check", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["4XX", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["4XX", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - operations.MetricsHealthCheckResponseBody, - | errors.MetricsHealthCheckResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.MetricsHealthCheckResponseBody$inboundSchema), - m$.jsonErr(503, errors.MetricsHealthCheckResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + operations.MetricsHealthCheckResponseBody, + | errors.MetricsHealthCheckResponseBody + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.MetricsHealthCheckResponseBody$inboundSchema), + m$.jsonErr(503, errors.MetricsHealthCheckResponseBody$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/metricsLookingGlassCompositeQuery.ts b/src/funcs/metricsLookingGlassCompositeQuery.ts index 350d0d3..20295f3 100644 --- a/src/funcs/metricsLookingGlassCompositeQuery.ts +++ b/src/funcs/metricsLookingGlassCompositeQuery.ts @@ -11,11 +11,11 @@ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -30,137 +30,145 @@ import { Result } from "../types/fp.js"; * Composite query to get list of addresses from multiple subqueries. */ export async function metricsLookingGlassCompositeQuery( - client$: AvaCloudSDKCore, - request: components.CompositeQueryRequestDto, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: components.CompositeQueryRequestDto, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - components.CompositeQueryResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + components.CompositeQueryResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => components.CompositeQueryRequestDto$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = encodeJSON$("body", payload$, { explode: true }); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + components.CompositeQueryRequestDto$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$, { explode: true }); - const baseURL$ = - options?.serverURL || - pathToFunc(CompositeQueryV2ServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(CompositeQueryV2ServerList[0], { charEncoding: "percent" })(); - const path$ = pathToFunc("/v2/lookingGlass/compositeQuery")(); + const path$ = pathToFunc("/v2/lookingGlass/compositeQuery")(); - const headers$ = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "compositeQueryV2", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "compositeQueryV2", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - baseURL: baseURL$, - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + baseURL: baseURL$, + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const [result$] = await m$.match< - components.CompositeQueryResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, components.CompositeQueryResponse$inboundSchema), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + const [result$] = await m$.match< + components.CompositeQueryResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, components.CompositeQueryResponse$inboundSchema), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/metricsLookingGlassGetAddressesByBalanceOverTime.ts b/src/funcs/metricsLookingGlassGetAddressesByBalanceOverTime.ts index 5140eba..830cd4e 100644 --- a/src/funcs/metricsLookingGlassGetAddressesByBalanceOverTime.ts +++ b/src/funcs/metricsLookingGlassGetAddressesByBalanceOverTime.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { GetAddressesByBalanceOverTimeServerList } from "../models/operations/getaddressesbybalanceovertime.js"; import * as operations from "../models/operations/index.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * Get addresses by balance over time @@ -35,200 +40,217 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Get list of addresses and their latest balances that have held more than a certain threshold of a given token during the specified time frame. */ export async function metricsLookingGlassGetAddressesByBalanceOverTime( - client$: AvaCloudSDKCore, - request: operations.GetAddressesByBalanceOverTimeRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetAddressesByBalanceOverTimeRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.GetAddressesByBalanceOverTimeResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.GetAddressesByBalanceOverTimeResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetAddressesByBalanceOverTimeRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetAddressesByBalanceOverTimeRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(GetAddressesByBalanceOverTimeServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc("/v2/chains/{chainId}/contracts/{address}/balances")( + pathParams$, + ); + + const query$ = encodeFormQuery$({ + "endTimestamp": payload$.endTimestamp, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "startTimestamp": payload$.startTimestamp, + "threshold": payload$.threshold, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getAddressesByBalanceOverTime", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.GetAddressesByBalanceOverTimeResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json( + 200, + operations.GetAddressesByBalanceOverTimeResponse$inboundSchema, + { key: "Result" }, + ), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.GetAddressesByBalanceOverTimeResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(GetAddressesByBalanceOverTimeServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v2/chains/{chainId}/contracts/{address}/balances")(pathParams$); - - const query$ = encodeFormQuery$({ - endTimestamp: payload$.endTimestamp, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - startTimestamp: payload$.startTimestamp, - threshold: payload$.threshold, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getAddressesByBalanceOverTime", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + metricsLookingGlassGetAddressesByBalanceOverTime( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.GetAddressesByBalanceOverTimeResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetAddressesByBalanceOverTimeResponse$inboundSchema, { - key: "Result", - }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.GetAddressesByBalanceOverTimeResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - metricsLookingGlassGetAddressesByBalanceOverTime( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/metricsLookingGlassGetAddressesByBtcbBridged.ts b/src/funcs/metricsLookingGlassGetAddressesByBtcbBridged.ts index 6373b24..1f6c3da 100644 --- a/src/funcs/metricsLookingGlassGetAddressesByBtcbBridged.ts +++ b/src/funcs/metricsLookingGlassGetAddressesByBtcbBridged.ts @@ -11,11 +11,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -23,7 +23,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { GetAddressesByBtcbBridgedServerList } from "../models/operations/getaddressesbybtcbbridged.js"; import * as operations from "../models/operations/index.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * Get addresses by BTCb bridged balance @@ -32,185 +37,197 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Get list of addresses and their net bridged amounts that have bridged more than a certain threshold. */ export async function metricsLookingGlassGetAddressesByBtcbBridged( - client$: AvaCloudSDKCore, - request: operations.GetAddressesByBtcbBridgedRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetAddressesByBtcbBridgedRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.GetAddressesByBtcbBridgedResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.GetAddressesByBtcbBridgedResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetAddressesByBtcbBridgedRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetAddressesByBtcbBridgedRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(GetAddressesByBtcbBridgedServerList[0], { + charEncoding: "percent", + })(); + + const path$ = pathToFunc("/v2/chains/43114/btcb/bridged:getAddresses")(); + + const query$ = encodeFormQuery$({ + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "threshold": payload$.threshold, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getAddressesByBtcbBridged", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.GetAddressesByBtcbBridgedResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetAddressesByBtcbBridgedResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.GetAddressesByBtcbBridgedResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(GetAddressesByBtcbBridgedServerList[0], { charEncoding: "percent" })(); - - const path$ = pathToFunc("/v2/chains/43114/btcb/bridged:getAddresses")(); - - const query$ = encodeFormQuery$({ - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - threshold: payload$.threshold, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getAddressesByBtcbBridged", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + metricsLookingGlassGetAddressesByBtcbBridged( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.GetAddressesByBtcbBridgedResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetAddressesByBtcbBridgedResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.GetAddressesByBtcbBridgedResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - metricsLookingGlassGetAddressesByBtcbBridged( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/metricsLookingGlassGetNftHoldersByContractAddress.ts b/src/funcs/metricsLookingGlassGetNftHoldersByContractAddress.ts index a48a069..bbfe037 100644 --- a/src/funcs/metricsLookingGlassGetNftHoldersByContractAddress.ts +++ b/src/funcs/metricsLookingGlassGetNftHoldersByContractAddress.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { GetNftHoldersByContractAddressServerList } from "../models/operations/getnftholdersbycontractaddress.js"; import * as operations from "../models/operations/index.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * Get NFT holders by contract address @@ -35,199 +40,214 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Get list of NFT holders and number of NFTs held by contract address. */ export async function metricsLookingGlassGetNftHoldersByContractAddress( - client$: AvaCloudSDKCore, - request: operations.GetNftHoldersByContractAddressRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetNftHoldersByContractAddressRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.GetNftHoldersByContractAddressResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.GetNftHoldersByContractAddressResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetNftHoldersByContractAddressRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetNftHoldersByContractAddressRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(GetNftHoldersByContractAddressServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + address: encodeSimple$("address", payload$.address, { + explode: false, + charEncoding: "percent", + }), + chainId: encodeSimple$( + "chainId", + payload$.chainId ?? client$.options$.chainId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/v2/chains/{chainId}/contracts/{address}/nfts:listHolders", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getNftHoldersByContractAddress", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.GetNftHoldersByContractAddressResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json( + 200, + operations.GetNftHoldersByContractAddressResponse$inboundSchema, + { key: "Result" }, + ), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.GetNftHoldersByContractAddressResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(GetNftHoldersByContractAddressServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - address: encodeSimple$("address", payload$.address, { - explode: false, - charEncoding: "percent", - }), - chainId: encodeSimple$("chainId", payload$.chainId ?? client$.options$.chainId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v2/chains/{chainId}/contracts/{address}/nfts:listHolders")( - pathParams$ - ); - - const query$ = encodeFormQuery$({ - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getNftHoldersByContractAddress", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + metricsLookingGlassGetNftHoldersByContractAddress( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.GetNftHoldersByContractAddressResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetNftHoldersByContractAddressResponse$inboundSchema, { - key: "Result", - }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.GetNftHoldersByContractAddressResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - metricsLookingGlassGetNftHoldersByContractAddress( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/funcs/metricsLookingGlassGetValidatorsByDateRange.ts b/src/funcs/metricsLookingGlassGetValidatorsByDateRange.ts index f0dbdca..03b775c 100644 --- a/src/funcs/metricsLookingGlassGetValidatorsByDateRange.ts +++ b/src/funcs/metricsLookingGlassGetValidatorsByDateRange.ts @@ -5,8 +5,8 @@ import { AvaCloudSDKCore } from "../core.js"; import { dlv } from "../lib/dlv.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -14,11 +14,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKError } from "../models/errors/sdkerror.js"; @@ -26,7 +26,12 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { GetValidatorsByDateRangeServerList } from "../models/operations/getvalidatorsbydaterange.js"; import * as operations from "../models/operations/index.js"; import { Result } from "../types/fp.js"; -import { createPageIterator, haltIterator, PageIterator, Paginator } from "../types/operations.js"; +import { + createPageIterator, + haltIterator, + PageIterator, + Paginator, +} from "../types/operations.js"; /** * Get addresses running validators during a given time frame @@ -35,194 +40,208 @@ import { createPageIterator, haltIterator, PageIterator, Paginator } from "../ty * Get list of addresses and AddValidatorTx timestamps set to receive awards for validation periods during the specified time frame. */ export async function metricsLookingGlassGetValidatorsByDateRange( - client$: AvaCloudSDKCore, - request: operations.GetValidatorsByDateRangeRequest, - options?: RequestOptions & { serverURL?: string } + client$: AvaCloudSDKCore, + request: operations.GetValidatorsByDateRangeRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - PageIterator< - Result< - operations.GetValidatorsByDateRangeResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + PageIterator< + Result< + operations.GetValidatorsByDateRangeResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError > + > > { - const input$ = request; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetValidatorsByDateRangeRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return haltIterator(parsed$); + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetValidatorsByDateRangeRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return haltIterator(parsed$); + } + const payload$ = parsed$.value; + const body$ = null; + + const baseURL$ = options?.serverURL + || pathToFunc(GetValidatorsByDateRangeServerList[0], { + charEncoding: "percent", + })(); + + const pathParams$ = { + subnetId: encodeSimple$("subnetId", payload$.subnetId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/v2/subnets/{subnetId}/validators:getAddresses")( + pathParams$, + ); + + const query$ = encodeFormQuery$({ + "endTimestamp": payload$.endTimestamp, + "network": payload$.network, + "pageSize": payload$.pageSize, + "pageToken": payload$.pageToken, + "startTimestamp": payload$.startTimestamp, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const apiKey$ = await extractSecurity(client$.options$.apiKey); + const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; + const context = { + operationID: "getValidatorsByDateRange", + oAuth2Scopes: [], + securitySource: client$.options$.apiKey, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return haltIterator(requestRes); + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "403", + "404", + "429", + "4XX", + "500", + "502", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 120000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["5XX"], + }); + if (!doResult.ok) { + return haltIterator(doResult); + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$, raw$] = await m$.match< + operations.GetValidatorsByDateRangeResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetValidatorsByDateRangeResponse$inboundSchema, { + key: "Result", + }), + m$.jsonErr(400, errors.BadRequest$inboundSchema), + m$.jsonErr(401, errors.Unauthorized$inboundSchema), + m$.jsonErr(403, errors.Forbidden$inboundSchema), + m$.jsonErr(404, errors.NotFound$inboundSchema), + m$.jsonErr(429, errors.TooManyRequests$inboundSchema), + m$.jsonErr(500, errors.InternalServerError$inboundSchema), + m$.jsonErr(502, errors.BadGateway$inboundSchema), + m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return haltIterator(result$); + } + + const nextFunc = ( + responseData: unknown, + ): Paginator< + Result< + operations.GetValidatorsByDateRangeResponse, + | errors.BadRequest + | errors.Unauthorized + | errors.Forbidden + | errors.NotFound + | errors.TooManyRequests + | errors.InternalServerError + | errors.BadGateway + | errors.ServiceUnavailable + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > + > => { + const nextCursor = dlv(responseData, "nextPageToken"); + + if (nextCursor == null) { + return () => null; } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(GetValidatorsByDateRangeServerList[0], { charEncoding: "percent" })(); - - const pathParams$ = { - subnetId: encodeSimple$("subnetId", payload$.subnetId, { - explode: false, - charEncoding: "percent", - }), - }; - - const path$ = pathToFunc("/v2/subnets/{subnetId}/validators:getAddresses")(pathParams$); - - const query$ = encodeFormQuery$({ - endTimestamp: payload$.endTimestamp, - network: payload$.network, - pageSize: payload$.pageSize, - pageToken: payload$.pageToken, - startTimestamp: payload$.startTimestamp, - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const apiKey$ = await extractSecurity(client$.options$.apiKey); - const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ }; - const context = { - operationID: "getValidatorsByDateRange", - oAuth2Scopes: [], - securitySource: client$.options$.apiKey, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, + + return () => + metricsLookingGlassGetValidatorsByDateRange( + client$, { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + ...input$, + pageToken: nextCursor, }, - options - ); - if (!requestRes.ok) { - return haltIterator(requestRes); - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "502", "503", "5XX"], - retryConfig: options?.retries || - client$.options$.retryConfig || { - strategy: "backoff", - backoff: { - initialInterval: 500, - maxInterval: 60000, - exponent: 1.5, - maxElapsedTime: 120000, - }, - retryConnectionErrors: true, - }, - retryCodes: options?.retryCodes || ["5XX"], - }); - if (!doResult.ok) { - return haltIterator(doResult); - } - const response = doResult.value; - - const responseFields$ = { - HttpMeta: { Response: response, Request: request$ }, - }; - - const [result$, raw$] = await m$.match< - operations.GetValidatorsByDateRangeResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetValidatorsByDateRangeResponse$inboundSchema, { key: "Result" }), - m$.jsonErr(400, errors.BadRequest$inboundSchema), - m$.jsonErr(401, errors.Unauthorized$inboundSchema), - m$.jsonErr(403, errors.Forbidden$inboundSchema), - m$.jsonErr(404, errors.NotFound$inboundSchema), - m$.jsonErr(429, errors.TooManyRequests$inboundSchema), - m$.jsonErr(500, errors.InternalServerError$inboundSchema), - m$.jsonErr(502, errors.BadGateway$inboundSchema), - m$.jsonErr(503, errors.ServiceUnavailable$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return haltIterator(result$); - } + options, + ); + }; - const nextFunc = ( - responseData: unknown - ): Paginator< - Result< - operations.GetValidatorsByDateRangeResponse, - | errors.BadRequest - | errors.Unauthorized - | errors.Forbidden - | errors.NotFound - | errors.TooManyRequests - | errors.InternalServerError - | errors.BadGateway - | errors.ServiceUnavailable - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > - > => { - const nextCursor = dlv(responseData, "nextPageToken"); - - if (nextCursor == null) { - return () => null; - } - - return () => - metricsLookingGlassGetValidatorsByDateRange( - client$, - { - ...input$, - pageToken: nextCursor, - }, - options - ); - }; - - const page$ = { ...result$, next: nextFunc(raw$) }; - return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; + const page$ = { ...result$, next: nextFunc(raw$) }; + return { ...page$, ...createPageIterator(page$, (v) => !v.ok) }; } diff --git a/src/hooks/hooks.ts b/src/hooks/hooks.ts index a6b6e17..d1b3396 100644 --- a/src/hooks/hooks.ts +++ b/src/hooks/hooks.ts @@ -4,100 +4,109 @@ import { RequestInput } from "../lib/http.js"; import { - AfterErrorContext, - AfterErrorHook, - AfterSuccessContext, - AfterSuccessHook, - BeforeRequestContext, - BeforeRequestHook, - BeforeCreateRequestHook, - BeforeCreateRequestContext, - Hooks, - SDKInitHook, - SDKInitOptions, + AfterErrorContext, + AfterErrorHook, + AfterSuccessContext, + AfterSuccessHook, + BeforeCreateRequestContext, + BeforeCreateRequestHook, + BeforeRequestContext, + BeforeRequestHook, + Hooks, + SDKInitHook, + SDKInitOptions, } from "./types.js"; import { initHooks } from "./registration.js"; export class SDKHooks implements Hooks { - sdkInitHooks: SDKInitHook[] = []; - beforeCreateRequestHooks: BeforeCreateRequestHook[] = []; - beforeRequestHooks: BeforeRequestHook[] = []; - afterSuccessHooks: AfterSuccessHook[] = []; - afterErrorHooks: AfterErrorHook[] = []; - - constructor() { - initHooks(this); + sdkInitHooks: SDKInitHook[] = []; + beforeCreateRequestHooks: BeforeCreateRequestHook[] = []; + beforeRequestHooks: BeforeRequestHook[] = []; + afterSuccessHooks: AfterSuccessHook[] = []; + afterErrorHooks: AfterErrorHook[] = []; + + constructor() { + initHooks(this); + } + + registerSDKInitHook(hook: SDKInitHook) { + this.sdkInitHooks.push(hook); + } + + registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook) { + this.beforeCreateRequestHooks.push(hook); + } + + registerBeforeRequestHook(hook: BeforeRequestHook) { + this.beforeRequestHooks.push(hook); + } + + registerAfterSuccessHook(hook: AfterSuccessHook) { + this.afterSuccessHooks.push(hook); + } + + registerAfterErrorHook(hook: AfterErrorHook) { + this.afterErrorHooks.push(hook); + } + + sdkInit(opts: SDKInitOptions): SDKInitOptions { + return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts); + } + + beforeCreateRequest( + hookCtx: BeforeCreateRequestContext, + input: RequestInput, + ): RequestInput { + let inp = input; + + for (const hook of this.beforeCreateRequestHooks) { + inp = hook.beforeCreateRequest(hookCtx, inp); } - registerSDKInitHook(hook: SDKInitHook) { - this.sdkInitHooks.push(hook); - } + return inp; + } - registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook) { - this.beforeCreateRequestHooks.push(hook); - } + async beforeRequest( + hookCtx: BeforeRequestContext, + request: Request, + ): Promise { + let req = request; - registerBeforeRequestHook(hook: BeforeRequestHook) { - this.beforeRequestHooks.push(hook); + for (const hook of this.beforeRequestHooks) { + req = await hook.beforeRequest(hookCtx, req); } - registerAfterSuccessHook(hook: AfterSuccessHook) { - this.afterSuccessHooks.push(hook); - } + return req; + } - registerAfterErrorHook(hook: AfterErrorHook) { - this.afterErrorHooks.push(hook); - } + async afterSuccess( + hookCtx: AfterSuccessContext, + response: Response, + ): Promise { + let res = response; - sdkInit(opts: SDKInitOptions): SDKInitOptions { - return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts); + for (const hook of this.afterSuccessHooks) { + res = await hook.afterSuccess(hookCtx, res); } - beforeCreateRequest(hookCtx: BeforeCreateRequestContext, input: RequestInput): RequestInput { - let inp = input; - - for (const hook of this.beforeCreateRequestHooks) { - inp = hook.beforeCreateRequest(hookCtx, inp); - } - - return inp; + return res; + } + + async afterError( + hookCtx: AfterErrorContext, + response: Response | null, + error: unknown, + ): Promise<{ response: Response | null; error: unknown }> { + let res = response; + let err = error; + + for (const hook of this.afterErrorHooks) { + const result = await hook.afterError(hookCtx, res, err); + res = result.response; + err = result.error; } - async beforeRequest(hookCtx: BeforeRequestContext, request: Request): Promise { - let req = request; - - for (const hook of this.beforeRequestHooks) { - req = await hook.beforeRequest(hookCtx, req); - } - - return req; - } - - async afterSuccess(hookCtx: AfterSuccessContext, response: Response): Promise { - let res = response; - - for (const hook of this.afterSuccessHooks) { - res = await hook.afterSuccess(hookCtx, res); - } - - return res; - } - - async afterError( - hookCtx: AfterErrorContext, - response: Response | null, - error: unknown - ): Promise<{ response: Response | null; error: unknown }> { - let res = response; - let err = error; - - for (const hook of this.afterErrorHooks) { - const result = await hook.afterError(hookCtx, res, err); - res = result.response; - err = result.error; - } - - return { response: res, error: err }; - } + return { response: res, error: err }; + } } diff --git a/src/hooks/index.ts b/src/hooks/index.ts index 8f0e4db..f60ec7a 100644 --- a/src/hooks/index.ts +++ b/src/hooks/index.ts @@ -2,5 +2,5 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./types.js"; export * from "./hooks.js"; +export * from "./types.js"; diff --git a/src/hooks/types.ts b/src/hooks/types.ts index 3a31914..656b9e3 100644 --- a/src/hooks/types.ts +++ b/src/hooks/types.ts @@ -5,16 +5,16 @@ import { HTTPClient, RequestInput } from "../lib/http.js"; export type HookContext = { - operationID: string; - oAuth2Scopes?: string[]; - securitySource?: any | (() => Promise); + operationID: string; + oAuth2Scopes?: string[]; + securitySource?: any | (() => Promise); }; export type Awaitable = T | Promise; export type SDKInitOptions = { - baseURL: URL | null; - client: HTTPClient; + baseURL: URL | null; + client: HTTPClient; }; export type BeforeCreateRequestContext = HookContext & {}; @@ -27,63 +27,72 @@ export type AfterErrorContext = HookContext & {}; * hook can return a new baseURL and HTTP client to be used by the SDK. */ export interface SDKInitHook { - sdkInit: (opts: SDKInitOptions) => SDKInitOptions; + sdkInit: (opts: SDKInitOptions) => SDKInitOptions; } export interface BeforeCreateRequestHook { - /** - * A hook that is called before the SDK creates a `Request` object. The hook - * can modify how a request is constructed since certain modifications, like - * changing the request URL, cannot be done on a request object directly. - */ - beforeCreateRequest: (hookCtx: BeforeCreateRequestContext, input: RequestInput) => RequestInput; + /** + * A hook that is called before the SDK creates a `Request` object. The hook + * can modify how a request is constructed since certain modifications, like + * changing the request URL, cannot be done on a request object directly. + */ + beforeCreateRequest: ( + hookCtx: BeforeCreateRequestContext, + input: RequestInput, + ) => RequestInput; } export interface BeforeRequestHook { - /** - * A hook that is called before the SDK sends a request. The hook can - * introduce instrumentation code such as logging, tracing and metrics or - * replace the request before it is sent or throw an error to stop the - * request from being sent. - */ - beforeRequest: (hookCtx: BeforeRequestContext, request: Request) => Awaitable; + /** + * A hook that is called before the SDK sends a request. The hook can + * introduce instrumentation code such as logging, tracing and metrics or + * replace the request before it is sent or throw an error to stop the + * request from being sent. + */ + beforeRequest: ( + hookCtx: BeforeRequestContext, + request: Request, + ) => Awaitable; } export interface AfterSuccessHook { - /** - * A hook that is called after the SDK receives a response. The hook can - * introduce instrumentation code such as logging, tracing and metrics or - * modify the response before it is handled or throw an error to stop the - * response from being handled. - */ - afterSuccess: (hookCtx: AfterSuccessContext, response: Response) => Awaitable; + /** + * A hook that is called after the SDK receives a response. The hook can + * introduce instrumentation code such as logging, tracing and metrics or + * modify the response before it is handled or throw an error to stop the + * response from being handled. + */ + afterSuccess: ( + hookCtx: AfterSuccessContext, + response: Response, + ) => Awaitable; } export interface AfterErrorHook { - /** - * A hook that is called after the SDK encounters an error, or a - * non-successful response. The hook can introduce instrumentation code such - * as logging, tracing and metrics or modify the response or error values. - */ - afterError: ( - hookCtx: AfterErrorContext, - response: Response | null, - error: unknown - ) => Awaitable<{ - response: Response | null; - error: unknown; - }>; + /** + * A hook that is called after the SDK encounters an error, or a + * non-successful response. The hook can introduce instrumentation code such + * as logging, tracing and metrics or modify the response or error values. + */ + afterError: ( + hookCtx: AfterErrorContext, + response: Response | null, + error: unknown, + ) => Awaitable<{ + response: Response | null; + error: unknown; + }>; } export interface Hooks { - /** Registers a hook to be used by the SDK for initialization event. */ - registerSDKInitHook(hook: SDKInitHook): void; - /** Registers a hook to be used by the SDK for to modify `Request` construction. */ - registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook): void; - /** Registers a hook to be used by the SDK for the before request event. */ - registerBeforeRequestHook(hook: BeforeRequestHook): void; - /** Registers a hook to be used by the SDK for the after success event. */ - registerAfterSuccessHook(hook: AfterSuccessHook): void; - /** Registers a hook to be used by the SDK for the after error event. */ - registerAfterErrorHook(hook: AfterErrorHook): void; + /** Registers a hook to be used by the SDK for initialization event. */ + registerSDKInitHook(hook: SDKInitHook): void; + /** Registers a hook to be used by the SDK for to modify `Request` construction. */ + registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook): void; + /** Registers a hook to be used by the SDK for the before request event. */ + registerBeforeRequestHook(hook: BeforeRequestHook): void; + /** Registers a hook to be used by the SDK for the after success event. */ + registerAfterSuccessHook(hook: AfterSuccessHook): void; + /** Registers a hook to be used by the SDK for the after error event. */ + registerAfterErrorHook(hook: AfterErrorHook): void; } diff --git a/src/index.ts b/src/index.ts index c6fc7f0..5ddc765 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,6 +2,6 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./sdk/sdk.js"; export * from "./lib/config.js"; export * as files from "./lib/files.js"; +export * from "./sdk/sdk.js"; diff --git a/src/lib/config.ts b/src/lib/config.ts index e37bfdb..a4e88b3 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -9,48 +9,49 @@ import { RetryConfig } from "./retries.js"; import { pathToFunc } from "./url.js"; export type SDKOptions = { - apiKey?: string | (() => Promise); - - /** - * Allows setting the chainId parameter for all supported operations - */ - chainId?: string | undefined; - - /** - * Allows setting the network parameter for all supported operations - */ - network?: components.GlobalParamNetwork | undefined; - - httpClient?: HTTPClient; - /** - * Allows overriding the default server URL used by the SDK - */ - serverURL?: string; - /** - * Allows overriding the default retry config used by the SDK - */ - retryConfig?: RetryConfig; - timeoutMs?: number; - debugLogger?: Logger; + apiKey?: string | (() => Promise); + + /** + * Allows setting the chainId parameter for all supported operations + */ + chainId?: string | undefined; + + /** + * Allows setting the network parameter for all supported operations + */ + network?: components.GlobalParamNetwork | undefined; + + httpClient?: HTTPClient; + /** + * Allows overriding the default server URL used by the SDK + */ + serverURL?: string; + /** + * Allows overriding the default retry config used by the SDK + */ + retryConfig?: RetryConfig; + timeoutMs?: number; + debugLogger?: Logger; }; export function serverURLFromOptions(options: SDKOptions): URL | null { - const serverURL = options.serverURL; + const serverURL = options.serverURL; - if (!serverURL) { - return null; - } + if (!serverURL) { + return null; + } - const params: Record = {}; + const params: Record = {}; - const u = pathToFunc(serverURL)(params); - return new URL(u); + const u = pathToFunc(serverURL)(params); + return new URL(u); } export const SDK_METADATA = { - language: "typescript", - openapiDocVersion: "Beta", - sdkVersion: "0.4.1", - genVersion: "2.411.5", - userAgent: "speakeasy-sdk/typescript 0.4.1 2.411.5 Beta @avalabs/avacloud-sdk", + language: "typescript", + openapiDocVersion: "Beta", + sdkVersion: "0.5.0", + genVersion: "2.415.8", + userAgent: + "speakeasy-sdk/typescript 0.5.0 2.415.8 Beta @avalabs/avacloud-sdk", } as const; diff --git a/src/lib/matchers.ts b/src/lib/matchers.ts index dcb468b..55a9e14 100644 --- a/src/lib/matchers.ts +++ b/src/lib/matchers.ts @@ -2,271 +2,285 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { safeParse } from "./schemas.js"; -import { StatusCodePredicate, matchResponse, matchStatusCode } from "./http.js"; -import { isPlainObject } from "./is-plain-object.js"; import { SDKError } from "../models/errors/sdkerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { Result } from "../types/fp.js"; +import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js"; +import { isPlainObject } from "./is-plain-object.js"; +import { safeParse } from "./schemas.js"; -export type Encoding = "json" | "text" | "bytes" | "stream" | "sse" | "nil" | "fail"; +export type Encoding = + | "json" + | "text" + | "bytes" + | "stream" + | "sse" + | "nil" + | "fail"; const DEFAULT_CONTENT_TYPES: Record = { - json: "application/json", - text: "text/plain", - bytes: "application/octet-stream", - stream: "application/octet-stream", - sse: "text/event-stream", - nil: "*", - fail: "*", + json: "application/json", + text: "text/plain", + bytes: "application/octet-stream", + stream: "application/octet-stream", + sse: "text/event-stream", + nil: "*", + fail: "*", }; type Schema = { parse(raw: unknown): T }; -type MatchOptions = { ctype?: string; hdrs?: boolean; key?: string; sseSentinel?: string }; +type MatchOptions = { + ctype?: string; + hdrs?: boolean; + key?: string; + sseSentinel?: string; +}; export type ValueMatcher = MatchOptions & { - enc: Encoding; - codes: StatusCodePredicate; - schema: Schema; + enc: Encoding; + codes: StatusCodePredicate; + schema: Schema; }; export type ErrorMatcher = MatchOptions & { - enc: Encoding; - codes: StatusCodePredicate; - schema: Schema; - err: true; + enc: Encoding; + codes: StatusCodePredicate; + schema: Schema; + err: true; }; export type FailMatcher = { - enc: "fail"; - codes: StatusCodePredicate; + enc: "fail"; + codes: StatusCodePredicate; }; export type Matcher = ValueMatcher | ErrorMatcher | FailMatcher; export function jsonErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "json", codes, schema }; + return { ...options, err: true, enc: "json", codes, schema }; } export function json( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "json", codes, schema }; + return { ...options, enc: "json", codes, schema }; } export function textErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "text", codes, schema }; + return { ...options, err: true, enc: "text", codes, schema }; } export function text( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "text", codes, schema }; + return { ...options, enc: "text", codes, schema }; } export function bytesErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "bytes", codes, schema }; + return { ...options, err: true, enc: "bytes", codes, schema }; } export function bytes( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "bytes", codes, schema }; + return { ...options, enc: "bytes", codes, schema }; } export function streamErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "stream", codes, schema }; + return { ...options, err: true, enc: "stream", codes, schema }; } export function stream( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "stream", codes, schema }; + return { ...options, enc: "stream", codes, schema }; } export function sseErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "sse", codes, schema }; + return { ...options, err: true, enc: "sse", codes, schema }; } export function sse( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "sse", codes, schema }; + return { ...options, enc: "sse", codes, schema }; } export function nilErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "nil", codes, schema }; + return { ...options, err: true, enc: "nil", codes, schema }; } export function nil( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "nil", codes, schema }; + return { ...options, enc: "nil", codes, schema }; } export function fail(codes: StatusCodePredicate): FailMatcher { - return { enc: "fail", codes }; + return { enc: "fail", codes }; } -export type MatchedValue = Matchers extends Matcher[] ? T : never; -export type MatchedError = Matchers extends Matcher[] ? E : never; +export type MatchedValue = Matchers extends Matcher[] + ? T + : never; +export type MatchedError = Matchers extends Matcher[] + ? E + : never; export type MatchFunc = ( - response: Response, - options?: { resultKey?: string; extraFields?: Record } + response: Response, + options?: { resultKey?: string; extraFields?: Record }, ) => Promise<[result: Result, raw: unknown]>; export function match( - ...matchers: Array> + ...matchers: Array> ): MatchFunc { - return async function matchFunc( - response: Response, - options?: { resultKey?: string; extraFields?: Record } - ): Promise<[result: Result, raw: unknown]> { - let raw: unknown; - let matcher: Matcher | undefined; - for (const match of matchers) { - const { codes } = match; - const ctpattern = "ctype" in match ? match.ctype : DEFAULT_CONTENT_TYPES[match.enc]; - if (ctpattern && matchResponse(response, codes, ctpattern)) { - matcher = match; - break; - } else if (!ctpattern && matchStatusCode(response, codes)) { - matcher = match; - break; - } - } + return async function matchFunc( + response: Response, + options?: { resultKey?: string; extraFields?: Record }, + ): Promise< + [result: Result, raw: unknown] + > { + let raw: unknown; + let matcher: Matcher | undefined; + for (const match of matchers) { + const { codes } = match; + const ctpattern = "ctype" in match + ? match.ctype + : DEFAULT_CONTENT_TYPES[match.enc]; + if (ctpattern && matchResponse(response, codes, ctpattern)) { + matcher = match; + break; + } else if (!ctpattern && matchStatusCode(response, codes)) { + matcher = match; + break; + } + } - if (!matcher) { - const responseBody = await response.text(); - return [ - { - ok: false, - error: new SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ), - }, - responseBody, - ]; - } + if (!matcher) { + const responseBody = await response.text(); + return [{ + ok: false, + error: new SDKError( + "Unexpected API response status or content-type", + response, + responseBody, + ), + }, responseBody]; + } - const encoding = matcher.enc; - switch (encoding) { - case "json": - raw = await response.json(); - break; - case "bytes": - raw = await response.arrayBuffer(); - break; - case "stream": - raw = response.body; - break; - case "text": - raw = await response.text(); - break; - case "sse": - raw = response.body; - break; - case "nil": - raw = await discardResponseBody(response); - break; - case "fail": - raw = await response.text(); - break; - default: - encoding satisfies never; - throw new Error(`Unsupported response type: ${encoding}`); - } + const encoding = matcher.enc; + switch (encoding) { + case "json": + raw = await response.json(); + break; + case "bytes": + raw = await response.arrayBuffer(); + break; + case "stream": + raw = response.body; + break; + case "text": + raw = await response.text(); + break; + case "sse": + raw = response.body; + break; + case "nil": + raw = await discardResponseBody(response); + break; + case "fail": + raw = await response.text(); + break; + default: + encoding satisfies never; + throw new Error(`Unsupported response type: ${encoding}`); + } - if (matcher.enc === "fail") { - return [ - { - ok: false, - error: new SDKError( - "API error occurred", - response, - typeof raw === "string" ? raw : "" - ), - }, - raw, - ]; - } + if (matcher.enc === "fail") { + return [{ + ok: false, + error: new SDKError( + "API error occurred", + response, + typeof raw === "string" ? raw : "", + ), + }, raw]; + } - const resultKey = matcher.key || options?.resultKey; - let data: unknown; + const resultKey = matcher.key || options?.resultKey; + let data: unknown; - if ("err" in matcher) { - data = { - ...options?.extraFields, - ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), - ...(isPlainObject(raw) ? raw : null), - }; - } else if (resultKey) { - data = { - ...options?.extraFields, - ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), - [resultKey]: raw, - }; - } else if (matcher.hdrs) { - data = { - ...options?.extraFields, - ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), - ...(isPlainObject(raw) ? raw : null), - }; - } else { - data = raw; - } + if ("err" in matcher) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + ...(isPlainObject(raw) ? raw : null), + }; + } else if (resultKey) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + [resultKey]: raw, + }; + } else if (matcher.hdrs) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + ...(isPlainObject(raw) ? raw : null), + }; + } else { + data = raw; + } - if ("err" in matcher) { - const result = safeParse( - data, - (v: unknown) => matcher.schema.parse(v), - "Response validation failed" - ); - return [result.ok ? { ok: false, error: result.value } : result, raw]; - } else { - return [ - safeParse( - data, - (v: unknown) => matcher.schema.parse(v), - "Response validation failed" - ), - raw, - ]; - } - }; + if ("err" in matcher) { + const result = safeParse( + data, + (v: unknown) => matcher.schema.parse(v), + "Response validation failed", + ); + return [result.ok ? { ok: false, error: result.value } : result, raw]; + } else { + return [ + safeParse( + data, + (v: unknown) => matcher.schema.parse(v), + "Response validation failed", + ), + raw, + ]; + } + }; } const headerValRE = /, */; @@ -275,13 +289,13 @@ const headerValRE = /, */; * entries. Values are represented as an array to account for repeated headers. */ export function unpackHeaders(headers: Headers): Record { - const out: Record = {}; + const out: Record = {}; - for (const [k, v] of headers.entries()) { - out[k] = v.split(headerValRE); - } + for (const [k, v] of headers.entries()) { + out[k] = v.split(headerValRE); + } - return out; + return out; } /** @@ -291,18 +305,18 @@ export function unpackHeaders(headers: Headers): Record { * https://undici.nodejs.org/#/?id=garbage-collection */ export async function discardResponseBody(res: Response) { - const reader = res.body?.getReader(); - if (reader == null) { - return; - } + const reader = res.body?.getReader(); + if (reader == null) { + return; + } - try { - let done = false; - while (!done) { - const res = await reader.read(); - done = res.done; - } - } finally { - reader.releaseLock(); + try { + let done = false; + while (!done) { + const res = await reader.read(); + done = res.done; } + } finally { + reader.releaseLock(); + } } diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts index 37b0b13..f3856dc 100644 --- a/src/lib/schemas.ts +++ b/src/lib/schemas.ts @@ -2,7 +2,14 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { output, ZodEffects, ZodError, ZodObject, ZodRawShape, ZodTypeAny } from "zod"; +import { + output, + ZodEffects, + ZodError, + ZodObject, + ZodRawShape, + ZodTypeAny, +} from "zod"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { ERR, OK, Result } from "../types/fp.js"; @@ -11,15 +18,19 @@ import { ERR, OK, Result } from "../types/fp.js"; * intercepts this error and converts it to an SDKValidationError so as to not * leak Zod implementation details to user code. */ -export function parse(rawValue: Inp, fn: (value: Inp) => Out, errorMessage: string): Out { - try { - return fn(rawValue); - } catch (err) { - if (err instanceof ZodError) { - throw new SDKValidationError(errorMessage, err, rawValue); - } - throw err; +export function parse( + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, +): Out { + try { + return fn(rawValue); + } catch (err) { + if (err instanceof ZodError) { + throw new SDKValidationError(errorMessage, err, rawValue); } + throw err; + } } /** @@ -28,47 +39,48 @@ export function parse(rawValue: Inp, fn: (value: Inp) => Out, errorMes * leak Zod implementation details to user code. */ export function safeParse( - rawValue: Inp, - fn: (value: Inp) => Out, - errorMessage: string + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, ): Result { - try { - return OK(fn(rawValue)); - } catch (err) { - return ERR(new SDKValidationError(errorMessage, err, rawValue)); - } + try { + return OK(fn(rawValue)); + } catch (err) { + return ERR(new SDKValidationError(errorMessage, err, rawValue)); + } } export function collectExtraKeys< - Shape extends ZodRawShape, - Catchall extends ZodTypeAny, - K extends string + Shape extends ZodRawShape, + Catchall extends ZodTypeAny, + K extends string, >( - obj: ZodObject, - extrasKey: K + obj: ZodObject, + extrasKey: K, ): ZodEffects< - typeof obj, - output> & { - [k in K]: Record>; - } + typeof obj, + & output> + & { + [k in K]: Record>; + } > { - return obj.transform((val) => { - const extras: Record> = {}; - const { shape } = obj; - for (const [key] of Object.entries(val)) { - if (key in shape) { - continue; - } + return obj.transform((val) => { + const extras: Record> = {}; + const { shape } = obj; + for (const [key] of Object.entries(val)) { + if (key in shape) { + continue; + } - const v = val[key]; - if (typeof v === "undefined") { - continue; - } + const v = val[key]; + if (typeof v === "undefined") { + continue; + } - extras[key] = v; - delete val[key]; - } + extras[key] = v; + delete val[key]; + } - return { ...val, [extrasKey]: extras }; - }); + return { ...val, [extrasKey]: extras }; + }); } diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index f741c47..5e2a890 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -2,368 +2,383 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { - HTTPClient, - matchContentType, - matchStatusCode, - isAbortError, - isTimeoutError, - isConnectionError, -} from "./http.js"; -import { SecurityState } from "./security.js"; -import { retry, RetryConfig } from "./retries.js"; -import { Logger } from "./logger.js"; -import { encodeForm } from "./encodings.js"; -import { stringToBase64 } from "./base64.js"; -import { SDKOptions, SDK_METADATA, serverURLFromOptions } from "./config.js"; import { SDKHooks } from "../hooks/hooks.js"; import { HookContext } from "../hooks/types.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { ERR, OK, Result } from "../types/fp.js"; +import { stringToBase64 } from "./base64.js"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "./config.js"; +import { encodeForm } from "./encodings.js"; +import { + HTTPClient, + isAbortError, + isConnectionError, + isTimeoutError, + matchContentType, + matchStatusCode, +} from "./http.js"; +import { Logger } from "./logger.js"; +import { retry, RetryConfig } from "./retries.js"; +import { SecurityState } from "./security.js"; export type RequestOptions = { - /** - * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If - * `fetchOptions.signal` is set then it will take precedence over this option. - */ - timeoutMs?: number; - /** - * Set or override a retry policy on HTTP calls. - */ - retries?: RetryConfig; - /** - * Specifies the status codes which should be retried using the given retry policy. - */ - retryCodes?: string[]; - /** - * Sets various request options on the `fetch` call made by an SDK method. - * - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request} - */ - fetchOptions?: Omit; + /** + * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If + * `fetchOptions.signal` is set then it will take precedence over this option. + */ + timeoutMs?: number; + /** + * Set or override a retry policy on HTTP calls. + */ + retries?: RetryConfig; + /** + * Specifies the status codes which should be retried using the given retry policy. + */ + retryCodes?: string[]; + /** + * Sets various request options on the `fetch` call made by an SDK method. + * + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request} + */ + fetchOptions?: Omit; }; type RequestConfig = { - method: string; - path: string; - baseURL?: string | URL; - query?: string; - body?: RequestInit["body"]; - headers?: HeadersInit; - security?: SecurityState | null; - uaHeader?: string; - timeoutMs?: number; + method: string; + path: string; + baseURL?: string | URL; + query?: string; + body?: RequestInit["body"]; + headers?: HeadersInit; + security?: SecurityState | null; + uaHeader?: string; + timeoutMs?: number; }; const gt: unknown = typeof globalThis === "undefined" ? null : globalThis; -const webWorkerLike = - typeof gt === "object" && - gt != null && - "importScripts" in gt && - typeof gt["importScripts"] === "function"; -const isBrowserLike = - webWorkerLike || - (typeof navigator !== "undefined" && "serviceWorker" in navigator) || - (typeof window === "object" && typeof window.document !== "undefined"); +const webWorkerLike = typeof gt === "object" + && gt != null + && "importScripts" in gt + && typeof gt["importScripts"] === "function"; +const isBrowserLike = webWorkerLike + || (typeof navigator !== "undefined" && "serviceWorker" in navigator) + || (typeof window === "object" && typeof window.document !== "undefined"); export class ClientSDK { - private readonly httpClient: HTTPClient; - protected readonly baseURL: URL | null; - protected readonly hooks$: SDKHooks; - protected readonly logger?: Logger | undefined; - public readonly options$: SDKOptions & { hooks?: SDKHooks }; - - constructor(options: SDKOptions = {}) { - const opt = options as unknown; - if ( - typeof opt === "object" && - opt != null && - "hooks" in opt && - opt.hooks instanceof SDKHooks - ) { - this.hooks$ = opt.hooks; - } else { - this.hooks$ = new SDKHooks(); - } - this.options$ = { ...options, hooks: this.hooks$ }; + private readonly httpClient: HTTPClient; + protected readonly baseURL: URL | null; + protected readonly hooks$: SDKHooks; + protected readonly logger?: Logger | undefined; + public readonly options$: SDKOptions & { hooks?: SDKHooks }; + + constructor(options: SDKOptions = {}) { + const opt = options as unknown; + if ( + typeof opt === "object" + && opt != null + && "hooks" in opt + && opt.hooks instanceof SDKHooks + ) { + this.hooks$ = opt.hooks; + } else { + this.hooks$ = new SDKHooks(); + } + this.options$ = { ...options, hooks: this.hooks$ }; - const url = serverURLFromOptions(options); - if (url) { - url.pathname = url.pathname.replace(/\/+$/, "") + "/"; - } - const { baseURL, client } = this.hooks$.sdkInit({ - baseURL: url, - client: options.httpClient || new HTTPClient(), - }); - this.baseURL = baseURL; - this.httpClient = client; - this.logger = options.debugLogger; + const url = serverURLFromOptions(options); + if (url) { + url.pathname = url.pathname.replace(/\/+$/, "") + "/"; } + const { baseURL, client } = this.hooks$.sdkInit({ + baseURL: url, + client: options.httpClient || new HTTPClient(), + }); + this.baseURL = baseURL; + this.httpClient = client; + this.logger = options.debugLogger; + } + + public createRequest$( + context: HookContext, + conf: RequestConfig, + options?: RequestOptions, + ): Result { + const { method, path, query, headers: opHeaders, security } = conf; + + const base = conf.baseURL ?? this.baseURL; + if (!base) { + return ERR(new InvalidRequestError("No base URL provided for operation")); + } + const reqURL = new URL(base); + const inputURL = new URL(path, reqURL); - public createRequest$( - context: HookContext, - conf: RequestConfig, - options?: RequestOptions - ): Result { - const { method, path, query, headers: opHeaders, security } = conf; + if (path) { + reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); + } - const base = conf.baseURL ?? this.baseURL; - if (!base) { - return ERR(new InvalidRequestError("No base URL provided for operation")); - } - const reqURL = new URL(base); - const inputURL = new URL(path, reqURL); + let finalQuery = query || ""; - if (path) { - reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); - } + const secQuery: string[] = []; + for (const [k, v] of Object.entries(security?.queryParams || {})) { + secQuery.push(encodeForm(k, v, { charEncoding: "percent" })); + } + if (secQuery.length) { + finalQuery += `&${secQuery.join("&")}`; + } - let finalQuery = query || ""; + if (finalQuery) { + const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; + reqURL.search = `?${q}`; + } - const secQuery: string[] = []; - for (const [k, v] of Object.entries(security?.queryParams || {})) { - secQuery.push(encodeForm(k, v, { charEncoding: "percent" })); - } - if (secQuery.length) { - finalQuery += `&${secQuery.join("&")}`; - } + const headers = new Headers(opHeaders); - if (finalQuery) { - const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; - reqURL.search = `?${q}`; - } + const username = security?.basic.username; + const password = security?.basic.password; + if (username != null || password != null) { + const encoded = stringToBase64( + [username || "", password || ""].join(":"), + ); + headers.set("Authorization", `Basic ${encoded}`); + } - const headers = new Headers(opHeaders); + const securityHeaders = new Headers(security?.headers || {}); + for (const [k, v] of securityHeaders) { + headers.set(k, v); + } - const username = security?.basic.username; - const password = security?.basic.password; - if (username != null || password != null) { - const encoded = stringToBase64([username || "", password || ""].join(":")); - headers.set("Authorization", `Basic ${encoded}`); - } + let cookie = headers.get("cookie") || ""; + for (const [k, v] of Object.entries(security?.cookies || {})) { + cookie += `; ${k}=${v}`; + } + cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; + headers.set("cookie", cookie); - const securityHeaders = new Headers(security?.headers || {}); - for (const [k, v] of securityHeaders) { - headers.set(k, v); - } + const userHeaders = new Headers(options?.fetchOptions?.headers); + for (const [k, v] of userHeaders) { + headers.set(k, v); + } - let cookie = headers.get("cookie") || ""; - for (const [k, v] of Object.entries(security?.cookies || {})) { - cookie += `; ${k}=${v}`; - } - cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; - headers.set("cookie", cookie); + // Only set user agent header in non-browser-like environments since CORS + // policy disallows setting it in browsers e.g. Chrome throws an error. + if (!isBrowserLike) { + headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent); + } - const userHeaders = new Headers(options?.fetchOptions?.headers); - for (const [k, v] of userHeaders) { - headers.set(k, v); - } + let fetchOptions = options?.fetchOptions; + if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { + const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); + if (!fetchOptions) { + fetchOptions = { signal: timeoutSignal }; + } else { + fetchOptions.signal = timeoutSignal; + } + } - // Only set user agent header in non-browser-like environments since CORS - // policy disallows setting it in browsers e.g. Chrome throws an error. - if (!isBrowserLike) { - headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent); - } + if (conf.body instanceof ReadableStream) { + if (!fetchOptions) { + fetchOptions = { + // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 + duplex: "half", + }; + } else { + // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 + fetchOptions.duplex = "half"; + } + } - let fetchOptions = options?.fetchOptions; - if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { - const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); - if (!fetchOptions) { - fetchOptions = { signal: timeoutSignal }; - } else { - fetchOptions.signal = timeoutSignal; - } - } + let input; + try { + input = this.hooks$.beforeCreateRequest(context, { + url: reqURL, + options: { + ...fetchOptions, + body: conf.body ?? null, + headers, + method, + }, + }); + } catch (err: unknown) { + return ERR( + new UnexpectedClientError("Create request hook failed to execute", { + cause: err, + }), + ); + } + + return OK(new Request(input.url, input.options)); + } + + public async do$( + request: Request, + options: { + context: HookContext; + errorCodes: number | string | (number | string)[]; + retryConfig?: RetryConfig | undefined; + retryCodes?: string[] | undefined; + }, + ): Promise< + Result< + Response, + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + | UnexpectedClientError + > + > { + const { context, errorCodes } = options; + const retryConfig = options.retryConfig || { strategy: "none" }; + const retryCodes = options.retryCodes || []; + + return retry( + async () => { + const req = await this.hooks$.beforeRequest(context, request.clone()); + await logRequest(this.logger, req).catch((e) => + this.logger?.log("Failed to log request:", e) + ); - if (conf.body instanceof ReadableStream) { - if (!fetchOptions) { - fetchOptions = { - // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 - duplex: "half", - }; - } else { - // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 - fetchOptions.duplex = "half"; - } + let response = await this.httpClient.request(req); + + if (matchStatusCode(response, errorCodes)) { + const result = await this.hooks$.afterError(context, response, null); + if (result.error) { + throw result.error; + } + response = result.response || response; + } else { + response = await this.hooks$.afterSuccess(context, response); } - let input; - try { - input = this.hooks$.beforeCreateRequest(context, { - url: reqURL, - options: { - ...fetchOptions, - body: conf.body ?? null, - headers, - method, - }, - }); - } catch (err: unknown) { + await logResponse(this.logger, response, req) + .catch(e => this.logger?.log("Failed to log response:", e)); + + return response; + }, + { config: retryConfig, statusCodes: retryCodes }, + ).then( + (r) => OK(r), + (err) => { + switch (true) { + case isAbortError(err): return ERR( - new UnexpectedClientError("Create request hook failed to execute", { cause: err }) + new RequestAbortedError("Request aborted by client", { + cause: err, + }), + ); + case isTimeoutError(err): + return ERR( + new RequestTimeoutError("Request timed out", { cause: err }), + ); + case isConnectionError(err): + return ERR( + new ConnectionError("Unable to make request", { cause: err }), + ); + default: + return ERR( + new UnexpectedClientError("Unexpected HTTP client error", { + cause: err, + }), ); } - - return OK(new Request(input.url, input.options)); - } - - public async do$( - request: Request, - options: { - context: HookContext; - errorCodes: number | string | (number | string)[]; - retryConfig?: RetryConfig | undefined; - retryCodes?: string[] | undefined; - } - ): Promise< - Result< - Response, - RequestAbortedError | RequestTimeoutError | ConnectionError | UnexpectedClientError - > - > { - const { context, errorCodes } = options; - const retryConfig = options.retryConfig || { strategy: "none" }; - const retryCodes = options.retryCodes || []; - - return retry( - async () => { - const req = await this.hooks$.beforeRequest(context, request.clone()); - await logRequest(this.logger, req).catch((e) => - this.logger?.log("Failed to log request:", e) - ); - - let response = await this.httpClient.request(req); - - if (matchStatusCode(response, errorCodes)) { - const result = await this.hooks$.afterError(context, response, null); - if (result.error) { - throw result.error; - } - response = result.response || response; - } else { - response = await this.hooks$.afterSuccess(context, response); - } - - await logResponse(this.logger, response, req).catch((e) => - this.logger?.log("Failed to log response:", e) - ); - - return response; - }, - { config: retryConfig, statusCodes: retryCodes } - ).then( - (r) => OK(r), - (err) => { - switch (true) { - case isAbortError(err): - return ERR( - new RequestAbortedError("Request aborted by client", { cause: err }) - ); - case isTimeoutError(err): - return ERR(new RequestTimeoutError("Request timed out", { cause: err })); - case isConnectionError(err): - return ERR(new ConnectionError("Unable to make request", { cause: err })); - default: - return ERR( - new UnexpectedClientError("Unexpected HTTP client error", { - cause: err, - }) - ); - } - } - ); - } + }, + ); + } } const jsonLikeContentTypeRE = /^application\/(?:.{0,100}\+)?json/; async function logRequest(logger: Logger | undefined, req: Request) { - if (!logger) { - return; - } - - const contentType = req.headers.get("content-type"); - const ct = contentType?.split(";")[0] || ""; - - logger.group(`> Request: ${req.method} ${req.url}`); - - logger.group("Headers:"); - for (const [k, v] of req.headers.entries()) { - logger.log(`${k}: ${v}`); - } - logger.groupEnd(); - - logger.group("Body:"); - switch (true) { - case jsonLikeContentTypeRE.test(ct): - logger.log(await req.clone().json()); - break; - case ct.startsWith("text/"): - logger.log(await req.clone().text()); - break; - case ct === "multipart/form-data": { - const body = await req.clone().formData(); - for (const [k, v] of body) { - const vlabel = v instanceof Blob ? "" : v; - logger.log(`${k}: ${vlabel}`); - } - break; - } - default: - logger.log(`<${contentType}>`); - break; + if (!logger) { + return; + } + + const contentType = req.headers.get("content-type"); + const ct = contentType?.split(";")[0] || ""; + + logger.group(`> Request: ${req.method} ${req.url}`); + + logger.group("Headers:"); + for (const [k, v] of req.headers.entries()) { + logger.log(`${k}: ${v}`); + } + logger.groupEnd(); + + logger.group("Body:"); + switch (true) { + case jsonLikeContentTypeRE.test(ct): + logger.log(await req.clone().json()); + break; + case ct.startsWith("text/"): + logger.log(await req.clone().text()); + break; + case ct === "multipart/form-data": { + const body = await req.clone().formData(); + for (const [k, v] of body) { + const vlabel = v instanceof Blob ? "" : v; + logger.log(`${k}: ${vlabel}`); + } + break; } - logger.groupEnd(); + default: + logger.log(`<${contentType}>`); + break; + } + logger.groupEnd(); - logger.groupEnd(); + logger.groupEnd(); } -async function logResponse(logger: Logger | undefined, res: Response, req: Request) { - if (!logger) { - return; - } - - const contentType = res.headers.get("content-type"); - const ct = contentType?.split(";")[0] || ""; - - logger.group(`< Response: ${req.method} ${req.url}`); - logger.log("Status Code:", res.status, res.statusText); - - logger.group("Headers:"); - for (const [k, v] of res.headers.entries()) { - logger.log(`${k}: ${v}`); - } - logger.groupEnd(); - - logger.group("Body:"); - switch (true) { - case matchContentType(res, "application/json") || jsonLikeContentTypeRE.test(ct): - logger.log(await res.clone().json()); - break; - case matchContentType(res, "text/event-stream"): - logger.log(`<${contentType}>`); - break; - case matchContentType(res, "text/*"): - logger.log(await res.clone().text()); - break; - case matchContentType(res, "multipart/form-data"): { - const body = await res.clone().formData(); - for (const [k, v] of body) { - const vlabel = v instanceof Blob ? "" : v; - logger.log(`${k}: ${vlabel}`); - } - break; - } - default: - logger.log(`<${contentType}>`); - break; +async function logResponse( + logger: Logger | undefined, + res: Response, + req: Request, +) { + if (!logger) { + return; + } + + const contentType = res.headers.get("content-type"); + const ct = contentType?.split(";")[0] || ""; + + logger.group(`< Response: ${req.method} ${req.url}`); + logger.log("Status Code:", res.status, res.statusText); + + logger.group("Headers:"); + for (const [k, v] of res.headers.entries()) { + logger.log(`${k}: ${v}`); + } + logger.groupEnd(); + + logger.group("Body:"); + switch (true) { + case matchContentType(res, "application/json") + || jsonLikeContentTypeRE.test(ct): + logger.log(await res.clone().json()); + break; + case matchContentType(res, "text/event-stream"): + logger.log(`<${contentType}>`); + break; + case matchContentType(res, "text/*"): + logger.log(await res.clone().text()); + break; + case matchContentType(res, "multipart/form-data"): { + const body = await res.clone().formData(); + for (const [k, v] of body) { + const vlabel = v instanceof Blob ? "" : v; + logger.log(`${k}: ${vlabel}`); + } + break; } - logger.groupEnd(); + default: + logger.log(`<${contentType}>`); + break; + } + logger.groupEnd(); - logger.groupEnd(); + logger.groupEnd(); } diff --git a/src/lib/security.ts b/src/lib/security.ts index e740623..06e612c 100644 --- a/src/lib/security.ts +++ b/src/lib/security.ts @@ -5,199 +5,213 @@ import * as components from "../models/components/index.js"; export enum SecurityErrorCode { - Incomplete = "incomplete", - UnrecognisedSecurityType = "unrecognized_security_type", + Incomplete = "incomplete", + UnrecognisedSecurityType = "unrecognized_security_type", } export class SecurityError extends Error { - constructor(public code: SecurityErrorCode, message: string) { - super(message); - this.name = "SecurityError"; - } - - static incomplete(): SecurityError { - return new SecurityError( - SecurityErrorCode.Incomplete, - "Security requirements not met in order to perform the operation" - ); - } - static unrecognizedType(type: string): SecurityError { - return new SecurityError( - SecurityErrorCode.UnrecognisedSecurityType, - `Unrecognised security type: ${type}` - ); - } + constructor( + public code: SecurityErrorCode, + message: string, + ) { + super(message); + this.name = "SecurityError"; + } + + static incomplete(): SecurityError { + return new SecurityError( + SecurityErrorCode.Incomplete, + "Security requirements not met in order to perform the operation", + ); + } + static unrecognizedType(type: string): SecurityError { + return new SecurityError( + SecurityErrorCode.UnrecognisedSecurityType, + `Unrecognised security type: ${type}`, + ); + } } export type SecurityState = { - basic: { username?: string | undefined; password?: string | undefined }; - headers: Record; - queryParams: Record; - cookies: Record; + basic: { username?: string | undefined; password?: string | undefined }; + headers: Record; + queryParams: Record; + cookies: Record; }; type SecurityInputBasic = { - type: "http:basic"; - value: { username?: string | undefined; password?: string | undefined } | null | undefined; + type: "http:basic"; + value: + | { username?: string | undefined; password?: string | undefined } + | null + | undefined; }; type SecurityInputBearer = { - type: "http:bearer"; - value: string | null | undefined; - fieldName: string; + type: "http:bearer"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputAPIKey = { - type: "apiKey:header" | "apiKey:query" | "apiKey:cookie"; - value: string | null | undefined; - fieldName: string; + type: "apiKey:header" | "apiKey:query" | "apiKey:cookie"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputOIDC = { - type: "openIdConnect"; - value: string | null | undefined; - fieldName: string; + type: "openIdConnect"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputOAuth2 = { - type: "oauth2"; - value: string | null | undefined; - fieldName: string; + type: "oauth2"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputOAuth2ClientCredentials = { - type: "oauth2:client_credentials"; - value: string | null | undefined; - fieldName: string; + type: "oauth2:client_credentials"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputCustom = { - type: "http:custom"; - value: any | null | undefined; - fieldName: string; + type: "http:custom"; + value: any | null | undefined; + fieldName: string; }; export type SecurityInput = - | SecurityInputBasic - | SecurityInputBearer - | SecurityInputAPIKey - | SecurityInputOAuth2 - | SecurityInputOAuth2ClientCredentials - | SecurityInputOIDC - | SecurityInputCustom; - -export function resolveSecurity(...options: SecurityInput[][]): SecurityState | null { - const state: SecurityState = { - basic: { username: "", password: "" }, - headers: {}, - queryParams: {}, - cookies: {}, - }; - - const option = options.find((opts) => { - return opts.every((o) => { - if (o.value == null) { - return false; - } else if (o.type === "http:basic") { - return o.value.username != null || o.value.password != null; - } else if (o.type === "http:custom") { - return null; - } else if (typeof o.value === "string") { - return !!o.value; - } else { - throw new Error( - `Unrecognized security type: ${o.type} (value type: ${typeof o.value})` - ); - } - }); - }); - if (option == null) { + | SecurityInputBasic + | SecurityInputBearer + | SecurityInputAPIKey + | SecurityInputOAuth2 + | SecurityInputOAuth2ClientCredentials + | SecurityInputOIDC + | SecurityInputCustom; + +export function resolveSecurity( + ...options: SecurityInput[][] +): SecurityState | null { + const state: SecurityState = { + basic: { username: "", password: "" }, + headers: {}, + queryParams: {}, + cookies: {}, + }; + + const option = options.find((opts) => { + return opts.every((o) => { + if (o.value == null) { + return false; + } else if (o.type === "http:basic") { + return o.value.username != null || o.value.password != null; + } else if (o.type === "http:custom") { return null; + } else if (typeof o.value === "string") { + return !!o.value; + } else { + throw new Error( + `Unrecognized security type: ${o.type} (value type: ${typeof o + .value})`, + ); + } + }); + }); + if (option == null) { + return null; + } + + option.forEach((spec) => { + if (spec.value == null) { + return; } - option.forEach((spec) => { - if (spec.value == null) { - return; - } - - const { type } = spec; - - switch (type) { - case "apiKey:header": - state.headers[spec.fieldName] = spec.value; - break; - case "apiKey:query": - state.queryParams[spec.fieldName] = spec.value; - break; - case "apiKey:cookie": - state.cookies[spec.fieldName] = spec.value; - break; - case "http:basic": - applyBasic(state, spec); - break; - case "http:custom": - break; - case "http:bearer": - applyBearer(state, spec); - break; - case "oauth2": - applyBearer(state, spec); - break; - case "oauth2:client_credentials": - break; - case "openIdConnect": - applyBearer(state, spec); - break; - default: - spec satisfies never; - throw SecurityError.unrecognizedType(type); - } - }); + const { type } = spec; + + switch (type) { + case "apiKey:header": + state.headers[spec.fieldName] = spec.value; + break; + case "apiKey:query": + state.queryParams[spec.fieldName] = spec.value; + break; + case "apiKey:cookie": + state.cookies[spec.fieldName] = spec.value; + break; + case "http:basic": + applyBasic(state, spec); + break; + case "http:custom": + break; + case "http:bearer": + applyBearer(state, spec); + break; + case "oauth2": + applyBearer(state, spec); + break; + case "oauth2:client_credentials": + break; + case "openIdConnect": + applyBearer(state, spec); + break; + default: + spec satisfies never; + throw SecurityError.unrecognizedType(type); + } + }); - return state; + return state; } -function applyBasic(state: SecurityState, spec: SecurityInputBasic) { - if (spec.value == null) { - return; - } +function applyBasic( + state: SecurityState, + spec: SecurityInputBasic, +) { + if (spec.value == null) { + return; + } - state.basic = spec.value; + state.basic = spec.value; } function applyBearer( - state: SecurityState, - spec: SecurityInputBearer | SecurityInputOAuth2 | SecurityInputOIDC + state: SecurityState, + spec: SecurityInputBearer | SecurityInputOAuth2 | SecurityInputOIDC, ) { - if (spec.value == null) { - return; - } + if (spec.value == null) { + return; + } - let value = spec.value; - if (value.slice(0, 7).toLowerCase() !== "bearer ") { - value = `Bearer ${value}`; - } + let value = spec.value; + if (value.slice(0, 7).toLowerCase() !== "bearer ") { + value = `Bearer ${value}`; + } - state.headers[spec.fieldName] = value; + state.headers[spec.fieldName] = value; } export function resolveGlobalSecurity( - security: Partial | null | undefined + security: Partial | null | undefined, ): SecurityState | null { - return resolveSecurity([ - { - fieldName: "x-glacier-api-key", - type: "apiKey:header", - value: security?.apiKey, - }, - ]); + return resolveSecurity( + [ + { + fieldName: "x-glacier-api-key", + type: "apiKey:header", + value: security?.apiKey, + }, + ], + ); } -export async function extractSecurity>( - sec: T | (() => Promise) | undefined -): Promise { - if (sec == null) { - return; - } +export async function extractSecurity< + T extends string | Record, +>(sec: T | (() => Promise) | undefined): Promise { + if (sec == null) { + return; + } - return typeof sec === "function" ? sec() : sec; + return typeof sec === "function" ? sec() : sec; } diff --git a/src/models/components/activedelegatordetails.ts b/src/models/components/activedelegatordetails.ts index 472677b..6bb2c1b 100644 --- a/src/models/components/activedelegatordetails.ts +++ b/src/models/components/activedelegatordetails.ts @@ -2,98 +2,101 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const ActiveDelegatorDetailsDelegationStatus = { - Active: "active", + Active: "active", } as const; export type ActiveDelegatorDetailsDelegationStatus = ClosedEnum< - typeof ActiveDelegatorDetailsDelegationStatus + typeof ActiveDelegatorDetailsDelegationStatus >; export type ActiveDelegatorDetails = { - txHash: string; - nodeId: string; - rewardAddresses: Array; - amountDelegated: string; - delegationFee: string; - startTimestamp: number; - endTimestamp: number; - estimatedGrossReward: string; - estimatedNetReward: string; - delegationStatus: ActiveDelegatorDetailsDelegationStatus; + txHash: string; + nodeId: string; + rewardAddresses: Array; + amountDelegated: string; + delegationFee: string; + startTimestamp: number; + endTimestamp: number; + estimatedGrossReward: string; + estimatedNetReward: string; + delegationStatus: ActiveDelegatorDetailsDelegationStatus; }; /** @internal */ -export const ActiveDelegatorDetailsDelegationStatus$inboundSchema: z.ZodNativeEnum< - typeof ActiveDelegatorDetailsDelegationStatus -> = z.nativeEnum(ActiveDelegatorDetailsDelegationStatus); +export const ActiveDelegatorDetailsDelegationStatus$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + ActiveDelegatorDetailsDelegationStatus, + ); /** @internal */ -export const ActiveDelegatorDetailsDelegationStatus$outboundSchema: z.ZodNativeEnum< - typeof ActiveDelegatorDetailsDelegationStatus -> = ActiveDelegatorDetailsDelegationStatus$inboundSchema; +export const ActiveDelegatorDetailsDelegationStatus$outboundSchema: + z.ZodNativeEnum = + ActiveDelegatorDetailsDelegationStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ActiveDelegatorDetailsDelegationStatus$ { - /** @deprecated use `ActiveDelegatorDetailsDelegationStatus$inboundSchema` instead. */ - export const inboundSchema = ActiveDelegatorDetailsDelegationStatus$inboundSchema; - /** @deprecated use `ActiveDelegatorDetailsDelegationStatus$outboundSchema` instead. */ - export const outboundSchema = ActiveDelegatorDetailsDelegationStatus$outboundSchema; + /** @deprecated use `ActiveDelegatorDetailsDelegationStatus$inboundSchema` instead. */ + export const inboundSchema = + ActiveDelegatorDetailsDelegationStatus$inboundSchema; + /** @deprecated use `ActiveDelegatorDetailsDelegationStatus$outboundSchema` instead. */ + export const outboundSchema = + ActiveDelegatorDetailsDelegationStatus$outboundSchema; } /** @internal */ export const ActiveDelegatorDetails$inboundSchema: z.ZodType< - ActiveDelegatorDetails, - z.ZodTypeDef, - unknown + ActiveDelegatorDetails, + z.ZodTypeDef, + unknown > = z.object({ - txHash: z.string(), - nodeId: z.string(), - rewardAddresses: z.array(z.string()), - amountDelegated: z.string(), - delegationFee: z.string(), - startTimestamp: z.number(), - endTimestamp: z.number(), - estimatedGrossReward: z.string(), - estimatedNetReward: z.string(), - delegationStatus: ActiveDelegatorDetailsDelegationStatus$inboundSchema, + txHash: z.string(), + nodeId: z.string(), + rewardAddresses: z.array(z.string()), + amountDelegated: z.string(), + delegationFee: z.string(), + startTimestamp: z.number(), + endTimestamp: z.number(), + estimatedGrossReward: z.string(), + estimatedNetReward: z.string(), + delegationStatus: ActiveDelegatorDetailsDelegationStatus$inboundSchema, }); /** @internal */ export type ActiveDelegatorDetails$Outbound = { - txHash: string; - nodeId: string; - rewardAddresses: Array; - amountDelegated: string; - delegationFee: string; - startTimestamp: number; - endTimestamp: number; - estimatedGrossReward: string; - estimatedNetReward: string; - delegationStatus: string; + txHash: string; + nodeId: string; + rewardAddresses: Array; + amountDelegated: string; + delegationFee: string; + startTimestamp: number; + endTimestamp: number; + estimatedGrossReward: string; + estimatedNetReward: string; + delegationStatus: string; }; /** @internal */ export const ActiveDelegatorDetails$outboundSchema: z.ZodType< - ActiveDelegatorDetails$Outbound, - z.ZodTypeDef, - ActiveDelegatorDetails + ActiveDelegatorDetails$Outbound, + z.ZodTypeDef, + ActiveDelegatorDetails > = z.object({ - txHash: z.string(), - nodeId: z.string(), - rewardAddresses: z.array(z.string()), - amountDelegated: z.string(), - delegationFee: z.string(), - startTimestamp: z.number(), - endTimestamp: z.number(), - estimatedGrossReward: z.string(), - estimatedNetReward: z.string(), - delegationStatus: ActiveDelegatorDetailsDelegationStatus$outboundSchema, + txHash: z.string(), + nodeId: z.string(), + rewardAddresses: z.array(z.string()), + amountDelegated: z.string(), + delegationFee: z.string(), + startTimestamp: z.number(), + endTimestamp: z.number(), + estimatedGrossReward: z.string(), + estimatedNetReward: z.string(), + delegationStatus: ActiveDelegatorDetailsDelegationStatus$outboundSchema, }); /** @@ -101,10 +104,10 @@ export const ActiveDelegatorDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ActiveDelegatorDetails$ { - /** @deprecated use `ActiveDelegatorDetails$inboundSchema` instead. */ - export const inboundSchema = ActiveDelegatorDetails$inboundSchema; - /** @deprecated use `ActiveDelegatorDetails$outboundSchema` instead. */ - export const outboundSchema = ActiveDelegatorDetails$outboundSchema; - /** @deprecated use `ActiveDelegatorDetails$Outbound` instead. */ - export type Outbound = ActiveDelegatorDetails$Outbound; + /** @deprecated use `ActiveDelegatorDetails$inboundSchema` instead. */ + export const inboundSchema = ActiveDelegatorDetails$inboundSchema; + /** @deprecated use `ActiveDelegatorDetails$outboundSchema` instead. */ + export const outboundSchema = ActiveDelegatorDetails$outboundSchema; + /** @deprecated use `ActiveDelegatorDetails$Outbound` instead. */ + export type Outbound = ActiveDelegatorDetails$Outbound; } diff --git a/src/models/components/activevalidatordetails.ts b/src/models/components/activevalidatordetails.ts index 2df7824..fda7ff6 100644 --- a/src/models/components/activevalidatordetails.ts +++ b/src/models/components/activevalidatordetails.ts @@ -2,147 +2,150 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - BlsCredentials, - BlsCredentials$inboundSchema, - BlsCredentials$Outbound, - BlsCredentials$outboundSchema, + BlsCredentials, + BlsCredentials$inboundSchema, + BlsCredentials$Outbound, + BlsCredentials$outboundSchema, } from "./blscredentials.js"; import { - Rewards, - Rewards$inboundSchema, - Rewards$Outbound, - Rewards$outboundSchema, + Rewards, + Rewards$inboundSchema, + Rewards$Outbound, + Rewards$outboundSchema, } from "./rewards.js"; import { - ValidatorHealthDetails, - ValidatorHealthDetails$inboundSchema, - ValidatorHealthDetails$Outbound, - ValidatorHealthDetails$outboundSchema, + ValidatorHealthDetails, + ValidatorHealthDetails$inboundSchema, + ValidatorHealthDetails$Outbound, + ValidatorHealthDetails$outboundSchema, } from "./validatorhealthdetails.js"; -import * as z from "zod"; export const ActiveValidatorDetailsValidationStatus = { - Active: "active", + Active: "active", } as const; export type ActiveValidatorDetailsValidationStatus = ClosedEnum< - typeof ActiveValidatorDetailsValidationStatus + typeof ActiveValidatorDetailsValidationStatus >; export type ActiveValidatorDetails = { - txHash: string; - nodeId: string; - subnetId: string; - amountStaked: string; - delegationFee?: string | undefined; - startTimestamp: number; - endTimestamp: number; - /** - * Present for AddPermissionlessValidatorTx - */ - blsCredentials?: BlsCredentials | undefined; - stakePercentage: number; - delegatorCount: number; - amountDelegated?: string | undefined; - uptimePerformance: number; - avalancheGoVersion?: string | undefined; - delegationCapacity?: string | undefined; - potentialRewards: Rewards; - validationStatus: ActiveValidatorDetailsValidationStatus; - validatorHealth: ValidatorHealthDetails; + txHash: string; + nodeId: string; + subnetId: string; + amountStaked: string; + delegationFee?: string | undefined; + startTimestamp: number; + endTimestamp: number; + /** + * Present for AddPermissionlessValidatorTx + */ + blsCredentials?: BlsCredentials | undefined; + stakePercentage: number; + delegatorCount: number; + amountDelegated?: string | undefined; + uptimePerformance: number; + avalancheGoVersion?: string | undefined; + delegationCapacity?: string | undefined; + potentialRewards: Rewards; + validationStatus: ActiveValidatorDetailsValidationStatus; + validatorHealth: ValidatorHealthDetails; }; /** @internal */ -export const ActiveValidatorDetailsValidationStatus$inboundSchema: z.ZodNativeEnum< - typeof ActiveValidatorDetailsValidationStatus -> = z.nativeEnum(ActiveValidatorDetailsValidationStatus); +export const ActiveValidatorDetailsValidationStatus$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + ActiveValidatorDetailsValidationStatus, + ); /** @internal */ -export const ActiveValidatorDetailsValidationStatus$outboundSchema: z.ZodNativeEnum< - typeof ActiveValidatorDetailsValidationStatus -> = ActiveValidatorDetailsValidationStatus$inboundSchema; +export const ActiveValidatorDetailsValidationStatus$outboundSchema: + z.ZodNativeEnum = + ActiveValidatorDetailsValidationStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ActiveValidatorDetailsValidationStatus$ { - /** @deprecated use `ActiveValidatorDetailsValidationStatus$inboundSchema` instead. */ - export const inboundSchema = ActiveValidatorDetailsValidationStatus$inboundSchema; - /** @deprecated use `ActiveValidatorDetailsValidationStatus$outboundSchema` instead. */ - export const outboundSchema = ActiveValidatorDetailsValidationStatus$outboundSchema; + /** @deprecated use `ActiveValidatorDetailsValidationStatus$inboundSchema` instead. */ + export const inboundSchema = + ActiveValidatorDetailsValidationStatus$inboundSchema; + /** @deprecated use `ActiveValidatorDetailsValidationStatus$outboundSchema` instead. */ + export const outboundSchema = + ActiveValidatorDetailsValidationStatus$outboundSchema; } /** @internal */ export const ActiveValidatorDetails$inboundSchema: z.ZodType< - ActiveValidatorDetails, - z.ZodTypeDef, - unknown + ActiveValidatorDetails, + z.ZodTypeDef, + unknown > = z.object({ - txHash: z.string(), - nodeId: z.string(), - subnetId: z.string(), - amountStaked: z.string(), - delegationFee: z.string().optional(), - startTimestamp: z.number(), - endTimestamp: z.number(), - blsCredentials: BlsCredentials$inboundSchema.optional(), - stakePercentage: z.number(), - delegatorCount: z.number(), - amountDelegated: z.string().optional(), - uptimePerformance: z.number(), - avalancheGoVersion: z.string().optional(), - delegationCapacity: z.string().optional(), - potentialRewards: Rewards$inboundSchema, - validationStatus: ActiveValidatorDetailsValidationStatus$inboundSchema, - validatorHealth: ValidatorHealthDetails$inboundSchema, + txHash: z.string(), + nodeId: z.string(), + subnetId: z.string(), + amountStaked: z.string(), + delegationFee: z.string().optional(), + startTimestamp: z.number(), + endTimestamp: z.number(), + blsCredentials: BlsCredentials$inboundSchema.optional(), + stakePercentage: z.number(), + delegatorCount: z.number(), + amountDelegated: z.string().optional(), + uptimePerformance: z.number(), + avalancheGoVersion: z.string().optional(), + delegationCapacity: z.string().optional(), + potentialRewards: Rewards$inboundSchema, + validationStatus: ActiveValidatorDetailsValidationStatus$inboundSchema, + validatorHealth: ValidatorHealthDetails$inboundSchema, }); /** @internal */ export type ActiveValidatorDetails$Outbound = { - txHash: string; - nodeId: string; - subnetId: string; - amountStaked: string; - delegationFee?: string | undefined; - startTimestamp: number; - endTimestamp: number; - blsCredentials?: BlsCredentials$Outbound | undefined; - stakePercentage: number; - delegatorCount: number; - amountDelegated?: string | undefined; - uptimePerformance: number; - avalancheGoVersion?: string | undefined; - delegationCapacity?: string | undefined; - potentialRewards: Rewards$Outbound; - validationStatus: string; - validatorHealth: ValidatorHealthDetails$Outbound; + txHash: string; + nodeId: string; + subnetId: string; + amountStaked: string; + delegationFee?: string | undefined; + startTimestamp: number; + endTimestamp: number; + blsCredentials?: BlsCredentials$Outbound | undefined; + stakePercentage: number; + delegatorCount: number; + amountDelegated?: string | undefined; + uptimePerformance: number; + avalancheGoVersion?: string | undefined; + delegationCapacity?: string | undefined; + potentialRewards: Rewards$Outbound; + validationStatus: string; + validatorHealth: ValidatorHealthDetails$Outbound; }; /** @internal */ export const ActiveValidatorDetails$outboundSchema: z.ZodType< - ActiveValidatorDetails$Outbound, - z.ZodTypeDef, - ActiveValidatorDetails + ActiveValidatorDetails$Outbound, + z.ZodTypeDef, + ActiveValidatorDetails > = z.object({ - txHash: z.string(), - nodeId: z.string(), - subnetId: z.string(), - amountStaked: z.string(), - delegationFee: z.string().optional(), - startTimestamp: z.number(), - endTimestamp: z.number(), - blsCredentials: BlsCredentials$outboundSchema.optional(), - stakePercentage: z.number(), - delegatorCount: z.number(), - amountDelegated: z.string().optional(), - uptimePerformance: z.number(), - avalancheGoVersion: z.string().optional(), - delegationCapacity: z.string().optional(), - potentialRewards: Rewards$outboundSchema, - validationStatus: ActiveValidatorDetailsValidationStatus$outboundSchema, - validatorHealth: ValidatorHealthDetails$outboundSchema, + txHash: z.string(), + nodeId: z.string(), + subnetId: z.string(), + amountStaked: z.string(), + delegationFee: z.string().optional(), + startTimestamp: z.number(), + endTimestamp: z.number(), + blsCredentials: BlsCredentials$outboundSchema.optional(), + stakePercentage: z.number(), + delegatorCount: z.number(), + amountDelegated: z.string().optional(), + uptimePerformance: z.number(), + avalancheGoVersion: z.string().optional(), + delegationCapacity: z.string().optional(), + potentialRewards: Rewards$outboundSchema, + validationStatus: ActiveValidatorDetailsValidationStatus$outboundSchema, + validatorHealth: ValidatorHealthDetails$outboundSchema, }); /** @@ -150,10 +153,10 @@ export const ActiveValidatorDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ActiveValidatorDetails$ { - /** @deprecated use `ActiveValidatorDetails$inboundSchema` instead. */ - export const inboundSchema = ActiveValidatorDetails$inboundSchema; - /** @deprecated use `ActiveValidatorDetails$outboundSchema` instead. */ - export const outboundSchema = ActiveValidatorDetails$outboundSchema; - /** @deprecated use `ActiveValidatorDetails$Outbound` instead. */ - export type Outbound = ActiveValidatorDetails$Outbound; + /** @deprecated use `ActiveValidatorDetails$inboundSchema` instead. */ + export const inboundSchema = ActiveValidatorDetails$inboundSchema; + /** @deprecated use `ActiveValidatorDetails$outboundSchema` instead. */ + export const outboundSchema = ActiveValidatorDetails$outboundSchema; + /** @deprecated use `ActiveValidatorDetails$Outbound` instead. */ + export type Outbound = ActiveValidatorDetails$Outbound; } diff --git a/src/models/components/addressactivitymetadata.ts b/src/models/components/addressactivitymetadata.ts index ed22b5c..4cc50cf 100644 --- a/src/models/components/addressactivitymetadata.ts +++ b/src/models/components/addressactivitymetadata.ts @@ -5,40 +5,40 @@ import * as z from "zod"; export type AddressActivityMetadata = { - /** - * Ethereum address(es) for the address_activity event type - */ - addresses: Array; - /** - * Array of hexadecimal strings of the event signatures. - */ - eventSignatures?: Array | undefined; + /** + * Ethereum address(es) for the address_activity event type + */ + addresses: Array; + /** + * Array of hexadecimal strings of the event signatures. + */ + eventSignatures?: Array | undefined; }; /** @internal */ export const AddressActivityMetadata$inboundSchema: z.ZodType< - AddressActivityMetadata, - z.ZodTypeDef, - unknown + AddressActivityMetadata, + z.ZodTypeDef, + unknown > = z.object({ - addresses: z.array(z.string()), - eventSignatures: z.array(z.string()).optional(), + addresses: z.array(z.string()), + eventSignatures: z.array(z.string()).optional(), }); /** @internal */ export type AddressActivityMetadata$Outbound = { - addresses: Array; - eventSignatures?: Array | undefined; + addresses: Array; + eventSignatures?: Array | undefined; }; /** @internal */ export const AddressActivityMetadata$outboundSchema: z.ZodType< - AddressActivityMetadata$Outbound, - z.ZodTypeDef, - AddressActivityMetadata + AddressActivityMetadata$Outbound, + z.ZodTypeDef, + AddressActivityMetadata > = z.object({ - addresses: z.array(z.string()), - eventSignatures: z.array(z.string()).optional(), + addresses: z.array(z.string()), + eventSignatures: z.array(z.string()).optional(), }); /** @@ -46,10 +46,10 @@ export const AddressActivityMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AddressActivityMetadata$ { - /** @deprecated use `AddressActivityMetadata$inboundSchema` instead. */ - export const inboundSchema = AddressActivityMetadata$inboundSchema; - /** @deprecated use `AddressActivityMetadata$outboundSchema` instead. */ - export const outboundSchema = AddressActivityMetadata$outboundSchema; - /** @deprecated use `AddressActivityMetadata$Outbound` instead. */ - export type Outbound = AddressActivityMetadata$Outbound; + /** @deprecated use `AddressActivityMetadata$inboundSchema` instead. */ + export const inboundSchema = AddressActivityMetadata$inboundSchema; + /** @deprecated use `AddressActivityMetadata$outboundSchema` instead. */ + export const outboundSchema = AddressActivityMetadata$outboundSchema; + /** @deprecated use `AddressActivityMetadata$Outbound` instead. */ + export type Outbound = AddressActivityMetadata$Outbound; } diff --git a/src/models/components/addressdetails.ts b/src/models/components/addressdetails.ts index 8d67ea1..8b5ec85 100644 --- a/src/models/components/addressdetails.ts +++ b/src/models/components/addressdetails.ts @@ -5,37 +5,40 @@ import * as z from "zod"; export type AddressDetails = { - /** - * An EVM address. - */ - address: string; - /** - * Route dependent value associated with an address at a given point in time. - */ - sortKey: string; + /** + * An EVM address. + */ + address: string; + /** + * Route dependent value associated with an address at a given point in time. + */ + sortKey: string; }; /** @internal */ -export const AddressDetails$inboundSchema: z.ZodType = - z.object({ - address: z.string(), - sortKey: z.string(), - }); +export const AddressDetails$inboundSchema: z.ZodType< + AddressDetails, + z.ZodTypeDef, + unknown +> = z.object({ + address: z.string(), + sortKey: z.string(), +}); /** @internal */ export type AddressDetails$Outbound = { - address: string; - sortKey: string; + address: string; + sortKey: string; }; /** @internal */ export const AddressDetails$outboundSchema: z.ZodType< - AddressDetails$Outbound, - z.ZodTypeDef, - AddressDetails + AddressDetails$Outbound, + z.ZodTypeDef, + AddressDetails > = z.object({ - address: z.string(), - sortKey: z.string(), + address: z.string(), + sortKey: z.string(), }); /** @@ -43,10 +46,10 @@ export const AddressDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AddressDetails$ { - /** @deprecated use `AddressDetails$inboundSchema` instead. */ - export const inboundSchema = AddressDetails$inboundSchema; - /** @deprecated use `AddressDetails$outboundSchema` instead. */ - export const outboundSchema = AddressDetails$outboundSchema; - /** @deprecated use `AddressDetails$Outbound` instead. */ - export type Outbound = AddressDetails$Outbound; + /** @deprecated use `AddressDetails$inboundSchema` instead. */ + export const inboundSchema = AddressDetails$inboundSchema; + /** @deprecated use `AddressDetails$outboundSchema` instead. */ + export const outboundSchema = AddressDetails$outboundSchema; + /** @deprecated use `AddressDetails$Outbound` instead. */ + export type Outbound = AddressDetails$Outbound; } diff --git a/src/models/components/addresseschangerequest.ts b/src/models/components/addresseschangerequest.ts index 3bcf9b5..831cb8f 100644 --- a/src/models/components/addresseschangerequest.ts +++ b/src/models/components/addresseschangerequest.ts @@ -5,33 +5,33 @@ import * as z from "zod"; export type AddressesChangeRequest = { - /** - * Ethereum address(es) for the address_activity event type - */ - addresses: Array; + /** + * Ethereum address(es) for the address_activity event type + */ + addresses: Array; }; /** @internal */ export const AddressesChangeRequest$inboundSchema: z.ZodType< - AddressesChangeRequest, - z.ZodTypeDef, - unknown + AddressesChangeRequest, + z.ZodTypeDef, + unknown > = z.object({ - addresses: z.array(z.string()), + addresses: z.array(z.string()), }); /** @internal */ export type AddressesChangeRequest$Outbound = { - addresses: Array; + addresses: Array; }; /** @internal */ export const AddressesChangeRequest$outboundSchema: z.ZodType< - AddressesChangeRequest$Outbound, - z.ZodTypeDef, - AddressesChangeRequest + AddressesChangeRequest$Outbound, + z.ZodTypeDef, + AddressesChangeRequest > = z.object({ - addresses: z.array(z.string()), + addresses: z.array(z.string()), }); /** @@ -39,10 +39,10 @@ export const AddressesChangeRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AddressesChangeRequest$ { - /** @deprecated use `AddressesChangeRequest$inboundSchema` instead. */ - export const inboundSchema = AddressesChangeRequest$inboundSchema; - /** @deprecated use `AddressesChangeRequest$outboundSchema` instead. */ - export const outboundSchema = AddressesChangeRequest$outboundSchema; - /** @deprecated use `AddressesChangeRequest$Outbound` instead. */ - export type Outbound = AddressesChangeRequest$Outbound; + /** @deprecated use `AddressesChangeRequest$inboundSchema` instead. */ + export const inboundSchema = AddressesChangeRequest$inboundSchema; + /** @deprecated use `AddressesChangeRequest$outboundSchema` instead. */ + export const outboundSchema = AddressesChangeRequest$outboundSchema; + /** @deprecated use `AddressesChangeRequest$Outbound` instead. */ + export type Outbound = AddressesChangeRequest$Outbound; } diff --git a/src/models/components/aggregatedassetamount.ts b/src/models/components/aggregatedassetamount.ts index 27435ad..eb28b01 100644 --- a/src/models/components/aggregatedassetamount.ts +++ b/src/models/components/aggregatedassetamount.ts @@ -2,80 +2,80 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PrimaryNetworkAssetType, - PrimaryNetworkAssetType$inboundSchema, - PrimaryNetworkAssetType$outboundSchema, + PrimaryNetworkAssetType, + PrimaryNetworkAssetType$inboundSchema, + PrimaryNetworkAssetType$outboundSchema, } from "./primarynetworkassettype.js"; -import * as z from "zod"; export type AggregatedAssetAmount = { - /** - * Unique ID for an asset. - */ - assetId: string; - /** - * Name of this asset. - */ - name: string; - /** - * Symbol for this asset (max 4 characters). - */ - symbol: string; - /** - * Denomination of this asset to represent fungibility. - */ - denomination: number; - /** - * Type of asset like SECP256K1 or NFT. - */ - type: PrimaryNetworkAssetType; - /** - * Amount of the asset. - */ - amount: string; - utxoCount: number; + /** + * Unique ID for an asset. + */ + assetId: string; + /** + * Name of this asset. + */ + name: string; + /** + * Symbol for this asset (max 4 characters). + */ + symbol: string; + /** + * Denomination of this asset to represent fungibility. + */ + denomination: number; + /** + * Type of asset like SECP256K1 or NFT. + */ + type: PrimaryNetworkAssetType; + /** + * Amount of the asset. + */ + amount: string; + utxoCount: number; }; /** @internal */ export const AggregatedAssetAmount$inboundSchema: z.ZodType< - AggregatedAssetAmount, - z.ZodTypeDef, - unknown + AggregatedAssetAmount, + z.ZodTypeDef, + unknown > = z.object({ - assetId: z.string(), - name: z.string(), - symbol: z.string(), - denomination: z.number(), - type: PrimaryNetworkAssetType$inboundSchema, - amount: z.string(), - utxoCount: z.number(), + assetId: z.string(), + name: z.string(), + symbol: z.string(), + denomination: z.number(), + type: PrimaryNetworkAssetType$inboundSchema, + amount: z.string(), + utxoCount: z.number(), }); /** @internal */ export type AggregatedAssetAmount$Outbound = { - assetId: string; - name: string; - symbol: string; - denomination: number; - type: string; - amount: string; - utxoCount: number; + assetId: string; + name: string; + symbol: string; + denomination: number; + type: string; + amount: string; + utxoCount: number; }; /** @internal */ export const AggregatedAssetAmount$outboundSchema: z.ZodType< - AggregatedAssetAmount$Outbound, - z.ZodTypeDef, - AggregatedAssetAmount + AggregatedAssetAmount$Outbound, + z.ZodTypeDef, + AggregatedAssetAmount > = z.object({ - assetId: z.string(), - name: z.string(), - symbol: z.string(), - denomination: z.number(), - type: PrimaryNetworkAssetType$outboundSchema, - amount: z.string(), - utxoCount: z.number(), + assetId: z.string(), + name: z.string(), + symbol: z.string(), + denomination: z.number(), + type: PrimaryNetworkAssetType$outboundSchema, + amount: z.string(), + utxoCount: z.number(), }); /** @@ -83,10 +83,10 @@ export const AggregatedAssetAmount$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AggregatedAssetAmount$ { - /** @deprecated use `AggregatedAssetAmount$inboundSchema` instead. */ - export const inboundSchema = AggregatedAssetAmount$inboundSchema; - /** @deprecated use `AggregatedAssetAmount$outboundSchema` instead. */ - export const outboundSchema = AggregatedAssetAmount$outboundSchema; - /** @deprecated use `AggregatedAssetAmount$Outbound` instead. */ - export type Outbound = AggregatedAssetAmount$Outbound; + /** @deprecated use `AggregatedAssetAmount$inboundSchema` instead. */ + export const inboundSchema = AggregatedAssetAmount$inboundSchema; + /** @deprecated use `AggregatedAssetAmount$outboundSchema` instead. */ + export const outboundSchema = AggregatedAssetAmount$outboundSchema; + /** @deprecated use `AggregatedAssetAmount$Outbound` instead. */ + export type Outbound = AggregatedAssetAmount$Outbound; } diff --git a/src/models/components/alltimeerc20balancequerydto.ts b/src/models/components/alltimeerc20balancequerydto.ts index 6313da1..3bad139 100644 --- a/src/models/components/alltimeerc20balancequerydto.ts +++ b/src/models/components/alltimeerc20balancequerydto.ts @@ -2,34 +2,36 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - DateRangeErc20MinBalanceParam, - DateRangeErc20MinBalanceParam$inboundSchema, - DateRangeErc20MinBalanceParam$Outbound, - DateRangeErc20MinBalanceParam$outboundSchema, + DateRangeErc20MinBalanceParam, + DateRangeErc20MinBalanceParam$inboundSchema, + DateRangeErc20MinBalanceParam$Outbound, + DateRangeErc20MinBalanceParam$outboundSchema, } from "./daterangeerc20minbalanceparam.js"; -import * as z from "zod"; export const AllTimeErc20BalanceQueryDtoType = { - AllTimeErc20Balance: "AllTimeErc20Balance", + AllTimeErc20Balance: "AllTimeErc20Balance", } as const; -export type AllTimeErc20BalanceQueryDtoType = ClosedEnum; +export type AllTimeErc20BalanceQueryDtoType = ClosedEnum< + typeof AllTimeErc20BalanceQueryDtoType +>; export type AllTimeErc20BalanceQueryDto = { - id: string; - type: AllTimeErc20BalanceQueryDtoType; - params: DateRangeErc20MinBalanceParam; + id: string; + type: AllTimeErc20BalanceQueryDtoType; + params: DateRangeErc20MinBalanceParam; }; /** @internal */ export const AllTimeErc20BalanceQueryDtoType$inboundSchema: z.ZodNativeEnum< - typeof AllTimeErc20BalanceQueryDtoType + typeof AllTimeErc20BalanceQueryDtoType > = z.nativeEnum(AllTimeErc20BalanceQueryDtoType); /** @internal */ export const AllTimeErc20BalanceQueryDtoType$outboundSchema: z.ZodNativeEnum< - typeof AllTimeErc20BalanceQueryDtoType + typeof AllTimeErc20BalanceQueryDtoType > = AllTimeErc20BalanceQueryDtoType$inboundSchema; /** @@ -37,39 +39,39 @@ export const AllTimeErc20BalanceQueryDtoType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AllTimeErc20BalanceQueryDtoType$ { - /** @deprecated use `AllTimeErc20BalanceQueryDtoType$inboundSchema` instead. */ - export const inboundSchema = AllTimeErc20BalanceQueryDtoType$inboundSchema; - /** @deprecated use `AllTimeErc20BalanceQueryDtoType$outboundSchema` instead. */ - export const outboundSchema = AllTimeErc20BalanceQueryDtoType$outboundSchema; + /** @deprecated use `AllTimeErc20BalanceQueryDtoType$inboundSchema` instead. */ + export const inboundSchema = AllTimeErc20BalanceQueryDtoType$inboundSchema; + /** @deprecated use `AllTimeErc20BalanceQueryDtoType$outboundSchema` instead. */ + export const outboundSchema = AllTimeErc20BalanceQueryDtoType$outboundSchema; } /** @internal */ export const AllTimeErc20BalanceQueryDto$inboundSchema: z.ZodType< - AllTimeErc20BalanceQueryDto, - z.ZodTypeDef, - unknown + AllTimeErc20BalanceQueryDto, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), - type: AllTimeErc20BalanceQueryDtoType$inboundSchema, - params: DateRangeErc20MinBalanceParam$inboundSchema, + id: z.string(), + type: AllTimeErc20BalanceQueryDtoType$inboundSchema, + params: DateRangeErc20MinBalanceParam$inboundSchema, }); /** @internal */ export type AllTimeErc20BalanceQueryDto$Outbound = { - id: string; - type: string; - params: DateRangeErc20MinBalanceParam$Outbound; + id: string; + type: string; + params: DateRangeErc20MinBalanceParam$Outbound; }; /** @internal */ export const AllTimeErc20BalanceQueryDto$outboundSchema: z.ZodType< - AllTimeErc20BalanceQueryDto$Outbound, - z.ZodTypeDef, - AllTimeErc20BalanceQueryDto + AllTimeErc20BalanceQueryDto$Outbound, + z.ZodTypeDef, + AllTimeErc20BalanceQueryDto > = z.object({ - id: z.string(), - type: AllTimeErc20BalanceQueryDtoType$outboundSchema, - params: DateRangeErc20MinBalanceParam$outboundSchema, + id: z.string(), + type: AllTimeErc20BalanceQueryDtoType$outboundSchema, + params: DateRangeErc20MinBalanceParam$outboundSchema, }); /** @@ -77,10 +79,10 @@ export const AllTimeErc20BalanceQueryDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AllTimeErc20BalanceQueryDto$ { - /** @deprecated use `AllTimeErc20BalanceQueryDto$inboundSchema` instead. */ - export const inboundSchema = AllTimeErc20BalanceQueryDto$inboundSchema; - /** @deprecated use `AllTimeErc20BalanceQueryDto$outboundSchema` instead. */ - export const outboundSchema = AllTimeErc20BalanceQueryDto$outboundSchema; - /** @deprecated use `AllTimeErc20BalanceQueryDto$Outbound` instead. */ - export type Outbound = AllTimeErc20BalanceQueryDto$Outbound; + /** @deprecated use `AllTimeErc20BalanceQueryDto$inboundSchema` instead. */ + export const inboundSchema = AllTimeErc20BalanceQueryDto$inboundSchema; + /** @deprecated use `AllTimeErc20BalanceQueryDto$outboundSchema` instead. */ + export const outboundSchema = AllTimeErc20BalanceQueryDto$outboundSchema; + /** @deprecated use `AllTimeErc20BalanceQueryDto$Outbound` instead. */ + export type Outbound = AllTimeErc20BalanceQueryDto$Outbound; } diff --git a/src/models/components/alltimenativebalancequerydto.ts b/src/models/components/alltimenativebalancequerydto.ts index 30f14c5..ead14ee 100644 --- a/src/models/components/alltimenativebalancequerydto.ts +++ b/src/models/components/alltimenativebalancequerydto.ts @@ -2,70 +2,73 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - DateRangeMinBalanceParam, - DateRangeMinBalanceParam$inboundSchema, - DateRangeMinBalanceParam$Outbound, - DateRangeMinBalanceParam$outboundSchema, + DateRangeMinBalanceParam, + DateRangeMinBalanceParam$inboundSchema, + DateRangeMinBalanceParam$Outbound, + DateRangeMinBalanceParam$outboundSchema, } from "./daterangeminbalanceparam.js"; -import * as z from "zod"; export const Type = { - AllTimeNativeBalance: "AllTimeNativeBalance", + AllTimeNativeBalance: "AllTimeNativeBalance", } as const; export type Type = ClosedEnum; export type AllTimeNativeBalanceQueryDto = { - id: string; - type: Type; - params: DateRangeMinBalanceParam; + id: string; + type: Type; + params: DateRangeMinBalanceParam; }; /** @internal */ -export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Type); +export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + Type, +); /** @internal */ -export const Type$outboundSchema: z.ZodNativeEnum = Type$inboundSchema; +export const Type$outboundSchema: z.ZodNativeEnum = + Type$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Type$ { - /** @deprecated use `Type$inboundSchema` instead. */ - export const inboundSchema = Type$inboundSchema; - /** @deprecated use `Type$outboundSchema` instead. */ - export const outboundSchema = Type$outboundSchema; + /** @deprecated use `Type$inboundSchema` instead. */ + export const inboundSchema = Type$inboundSchema; + /** @deprecated use `Type$outboundSchema` instead. */ + export const outboundSchema = Type$outboundSchema; } /** @internal */ export const AllTimeNativeBalanceQueryDto$inboundSchema: z.ZodType< - AllTimeNativeBalanceQueryDto, - z.ZodTypeDef, - unknown + AllTimeNativeBalanceQueryDto, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), - type: Type$inboundSchema, - params: DateRangeMinBalanceParam$inboundSchema, + id: z.string(), + type: Type$inboundSchema, + params: DateRangeMinBalanceParam$inboundSchema, }); /** @internal */ export type AllTimeNativeBalanceQueryDto$Outbound = { - id: string; - type: string; - params: DateRangeMinBalanceParam$Outbound; + id: string; + type: string; + params: DateRangeMinBalanceParam$Outbound; }; /** @internal */ export const AllTimeNativeBalanceQueryDto$outboundSchema: z.ZodType< - AllTimeNativeBalanceQueryDto$Outbound, - z.ZodTypeDef, - AllTimeNativeBalanceQueryDto + AllTimeNativeBalanceQueryDto$Outbound, + z.ZodTypeDef, + AllTimeNativeBalanceQueryDto > = z.object({ - id: z.string(), - type: Type$outboundSchema, - params: DateRangeMinBalanceParam$outboundSchema, + id: z.string(), + type: Type$outboundSchema, + params: DateRangeMinBalanceParam$outboundSchema, }); /** @@ -73,10 +76,10 @@ export const AllTimeNativeBalanceQueryDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AllTimeNativeBalanceQueryDto$ { - /** @deprecated use `AllTimeNativeBalanceQueryDto$inboundSchema` instead. */ - export const inboundSchema = AllTimeNativeBalanceQueryDto$inboundSchema; - /** @deprecated use `AllTimeNativeBalanceQueryDto$outboundSchema` instead. */ - export const outboundSchema = AllTimeNativeBalanceQueryDto$outboundSchema; - /** @deprecated use `AllTimeNativeBalanceQueryDto$Outbound` instead. */ - export type Outbound = AllTimeNativeBalanceQueryDto$Outbound; + /** @deprecated use `AllTimeNativeBalanceQueryDto$inboundSchema` instead. */ + export const inboundSchema = AllTimeNativeBalanceQueryDto$inboundSchema; + /** @deprecated use `AllTimeNativeBalanceQueryDto$outboundSchema` instead. */ + export const outboundSchema = AllTimeNativeBalanceQueryDto$outboundSchema; + /** @deprecated use `AllTimeNativeBalanceQueryDto$Outbound` instead. */ + export type Outbound = AllTimeNativeBalanceQueryDto$Outbound; } diff --git a/src/models/components/alltimenftholdersquerydto.ts b/src/models/components/alltimenftholdersquerydto.ts index 90edf0e..c600ce8 100644 --- a/src/models/components/alltimenftholdersquerydto.ts +++ b/src/models/components/alltimenftholdersquerydto.ts @@ -2,42 +2,44 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - DateRangeNftHoldersParam, - DateRangeNftHoldersParam$inboundSchema, - DateRangeNftHoldersParam$Outbound, - DateRangeNftHoldersParam$outboundSchema, + DateRangeNftHoldersParam, + DateRangeNftHoldersParam$inboundSchema, + DateRangeNftHoldersParam$Outbound, + DateRangeNftHoldersParam$outboundSchema, } from "./daterangenftholdersparam.js"; import { - TimestampRangeNftHoldersParam, - TimestampRangeNftHoldersParam$inboundSchema, - TimestampRangeNftHoldersParam$Outbound, - TimestampRangeNftHoldersParam$outboundSchema, + TimestampRangeNftHoldersParam, + TimestampRangeNftHoldersParam$inboundSchema, + TimestampRangeNftHoldersParam$Outbound, + TimestampRangeNftHoldersParam$outboundSchema, } from "./timestamprangenftholdersparam.js"; -import * as z from "zod"; export const AllTimeNftHoldersQueryDtoType = { - AllTimeNftHolders: "AllTimeNftHolders", + AllTimeNftHolders: "AllTimeNftHolders", } as const; -export type AllTimeNftHoldersQueryDtoType = ClosedEnum; +export type AllTimeNftHoldersQueryDtoType = ClosedEnum< + typeof AllTimeNftHoldersQueryDtoType +>; export type Params = TimestampRangeNftHoldersParam | DateRangeNftHoldersParam; export type AllTimeNftHoldersQueryDto = { - id: string; - type: AllTimeNftHoldersQueryDtoType; - params: TimestampRangeNftHoldersParam | DateRangeNftHoldersParam; + id: string; + type: AllTimeNftHoldersQueryDtoType; + params: TimestampRangeNftHoldersParam | DateRangeNftHoldersParam; }; /** @internal */ export const AllTimeNftHoldersQueryDtoType$inboundSchema: z.ZodNativeEnum< - typeof AllTimeNftHoldersQueryDtoType + typeof AllTimeNftHoldersQueryDtoType > = z.nativeEnum(AllTimeNftHoldersQueryDtoType); /** @internal */ export const AllTimeNftHoldersQueryDtoType$outboundSchema: z.ZodNativeEnum< - typeof AllTimeNftHoldersQueryDtoType + typeof AllTimeNftHoldersQueryDtoType > = AllTimeNftHoldersQueryDtoType$inboundSchema; /** @@ -45,27 +47,32 @@ export const AllTimeNftHoldersQueryDtoType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AllTimeNftHoldersQueryDtoType$ { - /** @deprecated use `AllTimeNftHoldersQueryDtoType$inboundSchema` instead. */ - export const inboundSchema = AllTimeNftHoldersQueryDtoType$inboundSchema; - /** @deprecated use `AllTimeNftHoldersQueryDtoType$outboundSchema` instead. */ - export const outboundSchema = AllTimeNftHoldersQueryDtoType$outboundSchema; + /** @deprecated use `AllTimeNftHoldersQueryDtoType$inboundSchema` instead. */ + export const inboundSchema = AllTimeNftHoldersQueryDtoType$inboundSchema; + /** @deprecated use `AllTimeNftHoldersQueryDtoType$outboundSchema` instead. */ + export const outboundSchema = AllTimeNftHoldersQueryDtoType$outboundSchema; } /** @internal */ -export const Params$inboundSchema: z.ZodType = z.union([ +export const Params$inboundSchema: z.ZodType = z + .union([ TimestampRangeNftHoldersParam$inboundSchema, DateRangeNftHoldersParam$inboundSchema, -]); + ]); /** @internal */ export type Params$Outbound = - | TimestampRangeNftHoldersParam$Outbound - | DateRangeNftHoldersParam$Outbound; + | TimestampRangeNftHoldersParam$Outbound + | DateRangeNftHoldersParam$Outbound; /** @internal */ -export const Params$outboundSchema: z.ZodType = z.union([ - TimestampRangeNftHoldersParam$outboundSchema, - DateRangeNftHoldersParam$outboundSchema, +export const Params$outboundSchema: z.ZodType< + Params$Outbound, + z.ZodTypeDef, + Params +> = z.union([ + TimestampRangeNftHoldersParam$outboundSchema, + DateRangeNftHoldersParam$outboundSchema, ]); /** @@ -73,47 +80,49 @@ export const Params$outboundSchema: z.ZodType = z.object({ - id: z.string(), - type: AllTimeNftHoldersQueryDtoType$inboundSchema, - params: z.union([ - TimestampRangeNftHoldersParam$inboundSchema, - DateRangeNftHoldersParam$inboundSchema, - ]), + id: z.string(), + type: AllTimeNftHoldersQueryDtoType$inboundSchema, + params: z.union([ + TimestampRangeNftHoldersParam$inboundSchema, + DateRangeNftHoldersParam$inboundSchema, + ]), }); /** @internal */ export type AllTimeNftHoldersQueryDto$Outbound = { - id: string; - type: string; - params: TimestampRangeNftHoldersParam$Outbound | DateRangeNftHoldersParam$Outbound; + id: string; + type: string; + params: + | TimestampRangeNftHoldersParam$Outbound + | DateRangeNftHoldersParam$Outbound; }; /** @internal */ export const AllTimeNftHoldersQueryDto$outboundSchema: z.ZodType< - AllTimeNftHoldersQueryDto$Outbound, - z.ZodTypeDef, - AllTimeNftHoldersQueryDto + AllTimeNftHoldersQueryDto$Outbound, + z.ZodTypeDef, + AllTimeNftHoldersQueryDto > = z.object({ - id: z.string(), - type: AllTimeNftHoldersQueryDtoType$outboundSchema, - params: z.union([ - TimestampRangeNftHoldersParam$outboundSchema, - DateRangeNftHoldersParam$outboundSchema, - ]), + id: z.string(), + type: AllTimeNftHoldersQueryDtoType$outboundSchema, + params: z.union([ + TimestampRangeNftHoldersParam$outboundSchema, + DateRangeNftHoldersParam$outboundSchema, + ]), }); /** @@ -121,10 +130,10 @@ export const AllTimeNftHoldersQueryDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AllTimeNftHoldersQueryDto$ { - /** @deprecated use `AllTimeNftHoldersQueryDto$inboundSchema` instead. */ - export const inboundSchema = AllTimeNftHoldersQueryDto$inboundSchema; - /** @deprecated use `AllTimeNftHoldersQueryDto$outboundSchema` instead. */ - export const outboundSchema = AllTimeNftHoldersQueryDto$outboundSchema; - /** @deprecated use `AllTimeNftHoldersQueryDto$Outbound` instead. */ - export type Outbound = AllTimeNftHoldersQueryDto$Outbound; + /** @deprecated use `AllTimeNftHoldersQueryDto$inboundSchema` instead. */ + export const inboundSchema = AllTimeNftHoldersQueryDto$inboundSchema; + /** @deprecated use `AllTimeNftHoldersQueryDto$outboundSchema` instead. */ + export const outboundSchema = AllTimeNftHoldersQueryDto$outboundSchema; + /** @deprecated use `AllTimeNftHoldersQueryDto$Outbound` instead. */ + export type Outbound = AllTimeNftHoldersQueryDto$Outbound; } diff --git a/src/models/components/alltimestarsarenabalancequerydto.ts b/src/models/components/alltimestarsarenabalancequerydto.ts index de56fe5..8ca7535 100644 --- a/src/models/components/alltimestarsarenabalancequerydto.ts +++ b/src/models/components/alltimestarsarenabalancequerydto.ts @@ -2,76 +2,79 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - DateRangeStarsArenaMinBalanceParam, - DateRangeStarsArenaMinBalanceParam$inboundSchema, - DateRangeStarsArenaMinBalanceParam$Outbound, - DateRangeStarsArenaMinBalanceParam$outboundSchema, + DateRangeStarsArenaMinBalanceParam, + DateRangeStarsArenaMinBalanceParam$inboundSchema, + DateRangeStarsArenaMinBalanceParam$Outbound, + DateRangeStarsArenaMinBalanceParam$outboundSchema, } from "./daterangestarsarenaminbalanceparam.js"; -import * as z from "zod"; export const AllTimeStarsArenaBalanceQueryDtoType = { - AllTimeStarsArenaBalance: "AllTimeStarsArenaBalance", + AllTimeStarsArenaBalance: "AllTimeStarsArenaBalance", } as const; export type AllTimeStarsArenaBalanceQueryDtoType = ClosedEnum< - typeof AllTimeStarsArenaBalanceQueryDtoType + typeof AllTimeStarsArenaBalanceQueryDtoType >; export type AllTimeStarsArenaBalanceQueryDto = { - id: string; - type: AllTimeStarsArenaBalanceQueryDtoType; - params: DateRangeStarsArenaMinBalanceParam; + id: string; + type: AllTimeStarsArenaBalanceQueryDtoType; + params: DateRangeStarsArenaMinBalanceParam; }; /** @internal */ -export const AllTimeStarsArenaBalanceQueryDtoType$inboundSchema: z.ZodNativeEnum< - typeof AllTimeStarsArenaBalanceQueryDtoType -> = z.nativeEnum(AllTimeStarsArenaBalanceQueryDtoType); +export const AllTimeStarsArenaBalanceQueryDtoType$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + AllTimeStarsArenaBalanceQueryDtoType, + ); /** @internal */ -export const AllTimeStarsArenaBalanceQueryDtoType$outboundSchema: z.ZodNativeEnum< - typeof AllTimeStarsArenaBalanceQueryDtoType -> = AllTimeStarsArenaBalanceQueryDtoType$inboundSchema; +export const AllTimeStarsArenaBalanceQueryDtoType$outboundSchema: + z.ZodNativeEnum = + AllTimeStarsArenaBalanceQueryDtoType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AllTimeStarsArenaBalanceQueryDtoType$ { - /** @deprecated use `AllTimeStarsArenaBalanceQueryDtoType$inboundSchema` instead. */ - export const inboundSchema = AllTimeStarsArenaBalanceQueryDtoType$inboundSchema; - /** @deprecated use `AllTimeStarsArenaBalanceQueryDtoType$outboundSchema` instead. */ - export const outboundSchema = AllTimeStarsArenaBalanceQueryDtoType$outboundSchema; + /** @deprecated use `AllTimeStarsArenaBalanceQueryDtoType$inboundSchema` instead. */ + export const inboundSchema = + AllTimeStarsArenaBalanceQueryDtoType$inboundSchema; + /** @deprecated use `AllTimeStarsArenaBalanceQueryDtoType$outboundSchema` instead. */ + export const outboundSchema = + AllTimeStarsArenaBalanceQueryDtoType$outboundSchema; } /** @internal */ export const AllTimeStarsArenaBalanceQueryDto$inboundSchema: z.ZodType< - AllTimeStarsArenaBalanceQueryDto, - z.ZodTypeDef, - unknown + AllTimeStarsArenaBalanceQueryDto, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), - type: AllTimeStarsArenaBalanceQueryDtoType$inboundSchema, - params: DateRangeStarsArenaMinBalanceParam$inboundSchema, + id: z.string(), + type: AllTimeStarsArenaBalanceQueryDtoType$inboundSchema, + params: DateRangeStarsArenaMinBalanceParam$inboundSchema, }); /** @internal */ export type AllTimeStarsArenaBalanceQueryDto$Outbound = { - id: string; - type: string; - params: DateRangeStarsArenaMinBalanceParam$Outbound; + id: string; + type: string; + params: DateRangeStarsArenaMinBalanceParam$Outbound; }; /** @internal */ export const AllTimeStarsArenaBalanceQueryDto$outboundSchema: z.ZodType< - AllTimeStarsArenaBalanceQueryDto$Outbound, - z.ZodTypeDef, - AllTimeStarsArenaBalanceQueryDto + AllTimeStarsArenaBalanceQueryDto$Outbound, + z.ZodTypeDef, + AllTimeStarsArenaBalanceQueryDto > = z.object({ - id: z.string(), - type: AllTimeStarsArenaBalanceQueryDtoType$outboundSchema, - params: DateRangeStarsArenaMinBalanceParam$outboundSchema, + id: z.string(), + type: AllTimeStarsArenaBalanceQueryDtoType$outboundSchema, + params: DateRangeStarsArenaMinBalanceParam$outboundSchema, }); /** @@ -79,10 +82,10 @@ export const AllTimeStarsArenaBalanceQueryDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AllTimeStarsArenaBalanceQueryDto$ { - /** @deprecated use `AllTimeStarsArenaBalanceQueryDto$inboundSchema` instead. */ - export const inboundSchema = AllTimeStarsArenaBalanceQueryDto$inboundSchema; - /** @deprecated use `AllTimeStarsArenaBalanceQueryDto$outboundSchema` instead. */ - export const outboundSchema = AllTimeStarsArenaBalanceQueryDto$outboundSchema; - /** @deprecated use `AllTimeStarsArenaBalanceQueryDto$Outbound` instead. */ - export type Outbound = AllTimeStarsArenaBalanceQueryDto$Outbound; + /** @deprecated use `AllTimeStarsArenaBalanceQueryDto$inboundSchema` instead. */ + export const inboundSchema = AllTimeStarsArenaBalanceQueryDto$inboundSchema; + /** @deprecated use `AllTimeStarsArenaBalanceQueryDto$outboundSchema` instead. */ + export const outboundSchema = AllTimeStarsArenaBalanceQueryDto$outboundSchema; + /** @deprecated use `AllTimeStarsArenaBalanceQueryDto$Outbound` instead. */ + export type Outbound = AllTimeStarsArenaBalanceQueryDto$Outbound; } diff --git a/src/models/components/anytimeerc20balancequerydto.ts b/src/models/components/anytimeerc20balancequerydto.ts index 1fe01d9..6100428 100644 --- a/src/models/components/anytimeerc20balancequerydto.ts +++ b/src/models/components/anytimeerc20balancequerydto.ts @@ -2,34 +2,36 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - DateRangeErc20MinBalanceParam, - DateRangeErc20MinBalanceParam$inboundSchema, - DateRangeErc20MinBalanceParam$Outbound, - DateRangeErc20MinBalanceParam$outboundSchema, + DateRangeErc20MinBalanceParam, + DateRangeErc20MinBalanceParam$inboundSchema, + DateRangeErc20MinBalanceParam$Outbound, + DateRangeErc20MinBalanceParam$outboundSchema, } from "./daterangeerc20minbalanceparam.js"; -import * as z from "zod"; export const AnyTimeErc20BalanceQueryDtoType = { - AnyTimeErc20Balance: "AnyTimeErc20Balance", + AnyTimeErc20Balance: "AnyTimeErc20Balance", } as const; -export type AnyTimeErc20BalanceQueryDtoType = ClosedEnum; +export type AnyTimeErc20BalanceQueryDtoType = ClosedEnum< + typeof AnyTimeErc20BalanceQueryDtoType +>; export type AnyTimeErc20BalanceQueryDto = { - id: string; - type: AnyTimeErc20BalanceQueryDtoType; - params: DateRangeErc20MinBalanceParam; + id: string; + type: AnyTimeErc20BalanceQueryDtoType; + params: DateRangeErc20MinBalanceParam; }; /** @internal */ export const AnyTimeErc20BalanceQueryDtoType$inboundSchema: z.ZodNativeEnum< - typeof AnyTimeErc20BalanceQueryDtoType + typeof AnyTimeErc20BalanceQueryDtoType > = z.nativeEnum(AnyTimeErc20BalanceQueryDtoType); /** @internal */ export const AnyTimeErc20BalanceQueryDtoType$outboundSchema: z.ZodNativeEnum< - typeof AnyTimeErc20BalanceQueryDtoType + typeof AnyTimeErc20BalanceQueryDtoType > = AnyTimeErc20BalanceQueryDtoType$inboundSchema; /** @@ -37,39 +39,39 @@ export const AnyTimeErc20BalanceQueryDtoType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AnyTimeErc20BalanceQueryDtoType$ { - /** @deprecated use `AnyTimeErc20BalanceQueryDtoType$inboundSchema` instead. */ - export const inboundSchema = AnyTimeErc20BalanceQueryDtoType$inboundSchema; - /** @deprecated use `AnyTimeErc20BalanceQueryDtoType$outboundSchema` instead. */ - export const outboundSchema = AnyTimeErc20BalanceQueryDtoType$outboundSchema; + /** @deprecated use `AnyTimeErc20BalanceQueryDtoType$inboundSchema` instead. */ + export const inboundSchema = AnyTimeErc20BalanceQueryDtoType$inboundSchema; + /** @deprecated use `AnyTimeErc20BalanceQueryDtoType$outboundSchema` instead. */ + export const outboundSchema = AnyTimeErc20BalanceQueryDtoType$outboundSchema; } /** @internal */ export const AnyTimeErc20BalanceQueryDto$inboundSchema: z.ZodType< - AnyTimeErc20BalanceQueryDto, - z.ZodTypeDef, - unknown + AnyTimeErc20BalanceQueryDto, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), - type: AnyTimeErc20BalanceQueryDtoType$inboundSchema, - params: DateRangeErc20MinBalanceParam$inboundSchema, + id: z.string(), + type: AnyTimeErc20BalanceQueryDtoType$inboundSchema, + params: DateRangeErc20MinBalanceParam$inboundSchema, }); /** @internal */ export type AnyTimeErc20BalanceQueryDto$Outbound = { - id: string; - type: string; - params: DateRangeErc20MinBalanceParam$Outbound; + id: string; + type: string; + params: DateRangeErc20MinBalanceParam$Outbound; }; /** @internal */ export const AnyTimeErc20BalanceQueryDto$outboundSchema: z.ZodType< - AnyTimeErc20BalanceQueryDto$Outbound, - z.ZodTypeDef, - AnyTimeErc20BalanceQueryDto + AnyTimeErc20BalanceQueryDto$Outbound, + z.ZodTypeDef, + AnyTimeErc20BalanceQueryDto > = z.object({ - id: z.string(), - type: AnyTimeErc20BalanceQueryDtoType$outboundSchema, - params: DateRangeErc20MinBalanceParam$outboundSchema, + id: z.string(), + type: AnyTimeErc20BalanceQueryDtoType$outboundSchema, + params: DateRangeErc20MinBalanceParam$outboundSchema, }); /** @@ -77,10 +79,10 @@ export const AnyTimeErc20BalanceQueryDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AnyTimeErc20BalanceQueryDto$ { - /** @deprecated use `AnyTimeErc20BalanceQueryDto$inboundSchema` instead. */ - export const inboundSchema = AnyTimeErc20BalanceQueryDto$inboundSchema; - /** @deprecated use `AnyTimeErc20BalanceQueryDto$outboundSchema` instead. */ - export const outboundSchema = AnyTimeErc20BalanceQueryDto$outboundSchema; - /** @deprecated use `AnyTimeErc20BalanceQueryDto$Outbound` instead. */ - export type Outbound = AnyTimeErc20BalanceQueryDto$Outbound; + /** @deprecated use `AnyTimeErc20BalanceQueryDto$inboundSchema` instead. */ + export const inboundSchema = AnyTimeErc20BalanceQueryDto$inboundSchema; + /** @deprecated use `AnyTimeErc20BalanceQueryDto$outboundSchema` instead. */ + export const outboundSchema = AnyTimeErc20BalanceQueryDto$outboundSchema; + /** @deprecated use `AnyTimeErc20BalanceQueryDto$Outbound` instead. */ + export type Outbound = AnyTimeErc20BalanceQueryDto$Outbound; } diff --git a/src/models/components/anytimenativebalancequerydto.ts b/src/models/components/anytimenativebalancequerydto.ts index c2d21be..8857be4 100644 --- a/src/models/components/anytimenativebalancequerydto.ts +++ b/src/models/components/anytimenativebalancequerydto.ts @@ -2,34 +2,36 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - DateRangeMinBalanceParam, - DateRangeMinBalanceParam$inboundSchema, - DateRangeMinBalanceParam$Outbound, - DateRangeMinBalanceParam$outboundSchema, + DateRangeMinBalanceParam, + DateRangeMinBalanceParam$inboundSchema, + DateRangeMinBalanceParam$Outbound, + DateRangeMinBalanceParam$outboundSchema, } from "./daterangeminbalanceparam.js"; -import * as z from "zod"; export const AnyTimeNativeBalanceQueryDtoType = { - AnyTimeNativeBalance: "AnyTimeNativeBalance", + AnyTimeNativeBalance: "AnyTimeNativeBalance", } as const; -export type AnyTimeNativeBalanceQueryDtoType = ClosedEnum; +export type AnyTimeNativeBalanceQueryDtoType = ClosedEnum< + typeof AnyTimeNativeBalanceQueryDtoType +>; export type AnyTimeNativeBalanceQueryDto = { - id: string; - type: AnyTimeNativeBalanceQueryDtoType; - params: DateRangeMinBalanceParam; + id: string; + type: AnyTimeNativeBalanceQueryDtoType; + params: DateRangeMinBalanceParam; }; /** @internal */ export const AnyTimeNativeBalanceQueryDtoType$inboundSchema: z.ZodNativeEnum< - typeof AnyTimeNativeBalanceQueryDtoType + typeof AnyTimeNativeBalanceQueryDtoType > = z.nativeEnum(AnyTimeNativeBalanceQueryDtoType); /** @internal */ export const AnyTimeNativeBalanceQueryDtoType$outboundSchema: z.ZodNativeEnum< - typeof AnyTimeNativeBalanceQueryDtoType + typeof AnyTimeNativeBalanceQueryDtoType > = AnyTimeNativeBalanceQueryDtoType$inboundSchema; /** @@ -37,39 +39,39 @@ export const AnyTimeNativeBalanceQueryDtoType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AnyTimeNativeBalanceQueryDtoType$ { - /** @deprecated use `AnyTimeNativeBalanceQueryDtoType$inboundSchema` instead. */ - export const inboundSchema = AnyTimeNativeBalanceQueryDtoType$inboundSchema; - /** @deprecated use `AnyTimeNativeBalanceQueryDtoType$outboundSchema` instead. */ - export const outboundSchema = AnyTimeNativeBalanceQueryDtoType$outboundSchema; + /** @deprecated use `AnyTimeNativeBalanceQueryDtoType$inboundSchema` instead. */ + export const inboundSchema = AnyTimeNativeBalanceQueryDtoType$inboundSchema; + /** @deprecated use `AnyTimeNativeBalanceQueryDtoType$outboundSchema` instead. */ + export const outboundSchema = AnyTimeNativeBalanceQueryDtoType$outboundSchema; } /** @internal */ export const AnyTimeNativeBalanceQueryDto$inboundSchema: z.ZodType< - AnyTimeNativeBalanceQueryDto, - z.ZodTypeDef, - unknown + AnyTimeNativeBalanceQueryDto, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), - type: AnyTimeNativeBalanceQueryDtoType$inboundSchema, - params: DateRangeMinBalanceParam$inboundSchema, + id: z.string(), + type: AnyTimeNativeBalanceQueryDtoType$inboundSchema, + params: DateRangeMinBalanceParam$inboundSchema, }); /** @internal */ export type AnyTimeNativeBalanceQueryDto$Outbound = { - id: string; - type: string; - params: DateRangeMinBalanceParam$Outbound; + id: string; + type: string; + params: DateRangeMinBalanceParam$Outbound; }; /** @internal */ export const AnyTimeNativeBalanceQueryDto$outboundSchema: z.ZodType< - AnyTimeNativeBalanceQueryDto$Outbound, - z.ZodTypeDef, - AnyTimeNativeBalanceQueryDto + AnyTimeNativeBalanceQueryDto$Outbound, + z.ZodTypeDef, + AnyTimeNativeBalanceQueryDto > = z.object({ - id: z.string(), - type: AnyTimeNativeBalanceQueryDtoType$outboundSchema, - params: DateRangeMinBalanceParam$outboundSchema, + id: z.string(), + type: AnyTimeNativeBalanceQueryDtoType$outboundSchema, + params: DateRangeMinBalanceParam$outboundSchema, }); /** @@ -77,10 +79,10 @@ export const AnyTimeNativeBalanceQueryDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AnyTimeNativeBalanceQueryDto$ { - /** @deprecated use `AnyTimeNativeBalanceQueryDto$inboundSchema` instead. */ - export const inboundSchema = AnyTimeNativeBalanceQueryDto$inboundSchema; - /** @deprecated use `AnyTimeNativeBalanceQueryDto$outboundSchema` instead. */ - export const outboundSchema = AnyTimeNativeBalanceQueryDto$outboundSchema; - /** @deprecated use `AnyTimeNativeBalanceQueryDto$Outbound` instead. */ - export type Outbound = AnyTimeNativeBalanceQueryDto$Outbound; + /** @deprecated use `AnyTimeNativeBalanceQueryDto$inboundSchema` instead. */ + export const inboundSchema = AnyTimeNativeBalanceQueryDto$inboundSchema; + /** @deprecated use `AnyTimeNativeBalanceQueryDto$outboundSchema` instead. */ + export const outboundSchema = AnyTimeNativeBalanceQueryDto$outboundSchema; + /** @deprecated use `AnyTimeNativeBalanceQueryDto$Outbound` instead. */ + export type Outbound = AnyTimeNativeBalanceQueryDto$Outbound; } diff --git a/src/models/components/anytimenftholdersquerydto.ts b/src/models/components/anytimenftholdersquerydto.ts index 8b53a5b..11af3e2 100644 --- a/src/models/components/anytimenftholdersquerydto.ts +++ b/src/models/components/anytimenftholdersquerydto.ts @@ -2,44 +2,46 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - DateRangeNftHoldersParam, - DateRangeNftHoldersParam$inboundSchema, - DateRangeNftHoldersParam$Outbound, - DateRangeNftHoldersParam$outboundSchema, + DateRangeNftHoldersParam, + DateRangeNftHoldersParam$inboundSchema, + DateRangeNftHoldersParam$Outbound, + DateRangeNftHoldersParam$outboundSchema, } from "./daterangenftholdersparam.js"; import { - TimestampRangeNftHoldersParam, - TimestampRangeNftHoldersParam$inboundSchema, - TimestampRangeNftHoldersParam$Outbound, - TimestampRangeNftHoldersParam$outboundSchema, + TimestampRangeNftHoldersParam, + TimestampRangeNftHoldersParam$inboundSchema, + TimestampRangeNftHoldersParam$Outbound, + TimestampRangeNftHoldersParam$outboundSchema, } from "./timestamprangenftholdersparam.js"; -import * as z from "zod"; export const AnyTimeNftHoldersQueryDtoType = { - AnyTimeNftHolders: "AnyTimeNftHolders", + AnyTimeNftHolders: "AnyTimeNftHolders", } as const; -export type AnyTimeNftHoldersQueryDtoType = ClosedEnum; +export type AnyTimeNftHoldersQueryDtoType = ClosedEnum< + typeof AnyTimeNftHoldersQueryDtoType +>; export type AnyTimeNftHoldersQueryDtoParams = - | TimestampRangeNftHoldersParam - | DateRangeNftHoldersParam; + | TimestampRangeNftHoldersParam + | DateRangeNftHoldersParam; export type AnyTimeNftHoldersQueryDto = { - id: string; - type: AnyTimeNftHoldersQueryDtoType; - params: TimestampRangeNftHoldersParam | DateRangeNftHoldersParam; + id: string; + type: AnyTimeNftHoldersQueryDtoType; + params: TimestampRangeNftHoldersParam | DateRangeNftHoldersParam; }; /** @internal */ export const AnyTimeNftHoldersQueryDtoType$inboundSchema: z.ZodNativeEnum< - typeof AnyTimeNftHoldersQueryDtoType + typeof AnyTimeNftHoldersQueryDtoType > = z.nativeEnum(AnyTimeNftHoldersQueryDtoType); /** @internal */ export const AnyTimeNftHoldersQueryDtoType$outboundSchema: z.ZodNativeEnum< - typeof AnyTimeNftHoldersQueryDtoType + typeof AnyTimeNftHoldersQueryDtoType > = AnyTimeNftHoldersQueryDtoType$inboundSchema; /** @@ -47,32 +49,35 @@ export const AnyTimeNftHoldersQueryDtoType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AnyTimeNftHoldersQueryDtoType$ { - /** @deprecated use `AnyTimeNftHoldersQueryDtoType$inboundSchema` instead. */ - export const inboundSchema = AnyTimeNftHoldersQueryDtoType$inboundSchema; - /** @deprecated use `AnyTimeNftHoldersQueryDtoType$outboundSchema` instead. */ - export const outboundSchema = AnyTimeNftHoldersQueryDtoType$outboundSchema; + /** @deprecated use `AnyTimeNftHoldersQueryDtoType$inboundSchema` instead. */ + export const inboundSchema = AnyTimeNftHoldersQueryDtoType$inboundSchema; + /** @deprecated use `AnyTimeNftHoldersQueryDtoType$outboundSchema` instead. */ + export const outboundSchema = AnyTimeNftHoldersQueryDtoType$outboundSchema; } /** @internal */ export const AnyTimeNftHoldersQueryDtoParams$inboundSchema: z.ZodType< - AnyTimeNftHoldersQueryDtoParams, - z.ZodTypeDef, - unknown -> = z.union([TimestampRangeNftHoldersParam$inboundSchema, DateRangeNftHoldersParam$inboundSchema]); + AnyTimeNftHoldersQueryDtoParams, + z.ZodTypeDef, + unknown +> = z.union([ + TimestampRangeNftHoldersParam$inboundSchema, + DateRangeNftHoldersParam$inboundSchema, +]); /** @internal */ export type AnyTimeNftHoldersQueryDtoParams$Outbound = - | TimestampRangeNftHoldersParam$Outbound - | DateRangeNftHoldersParam$Outbound; + | TimestampRangeNftHoldersParam$Outbound + | DateRangeNftHoldersParam$Outbound; /** @internal */ export const AnyTimeNftHoldersQueryDtoParams$outboundSchema: z.ZodType< - AnyTimeNftHoldersQueryDtoParams$Outbound, - z.ZodTypeDef, - AnyTimeNftHoldersQueryDtoParams + AnyTimeNftHoldersQueryDtoParams$Outbound, + z.ZodTypeDef, + AnyTimeNftHoldersQueryDtoParams > = z.union([ - TimestampRangeNftHoldersParam$outboundSchema, - DateRangeNftHoldersParam$outboundSchema, + TimestampRangeNftHoldersParam$outboundSchema, + DateRangeNftHoldersParam$outboundSchema, ]); /** @@ -80,47 +85,49 @@ export const AnyTimeNftHoldersQueryDtoParams$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AnyTimeNftHoldersQueryDtoParams$ { - /** @deprecated use `AnyTimeNftHoldersQueryDtoParams$inboundSchema` instead. */ - export const inboundSchema = AnyTimeNftHoldersQueryDtoParams$inboundSchema; - /** @deprecated use `AnyTimeNftHoldersQueryDtoParams$outboundSchema` instead. */ - export const outboundSchema = AnyTimeNftHoldersQueryDtoParams$outboundSchema; - /** @deprecated use `AnyTimeNftHoldersQueryDtoParams$Outbound` instead. */ - export type Outbound = AnyTimeNftHoldersQueryDtoParams$Outbound; + /** @deprecated use `AnyTimeNftHoldersQueryDtoParams$inboundSchema` instead. */ + export const inboundSchema = AnyTimeNftHoldersQueryDtoParams$inboundSchema; + /** @deprecated use `AnyTimeNftHoldersQueryDtoParams$outboundSchema` instead. */ + export const outboundSchema = AnyTimeNftHoldersQueryDtoParams$outboundSchema; + /** @deprecated use `AnyTimeNftHoldersQueryDtoParams$Outbound` instead. */ + export type Outbound = AnyTimeNftHoldersQueryDtoParams$Outbound; } /** @internal */ export const AnyTimeNftHoldersQueryDto$inboundSchema: z.ZodType< - AnyTimeNftHoldersQueryDto, - z.ZodTypeDef, - unknown + AnyTimeNftHoldersQueryDto, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), - type: AnyTimeNftHoldersQueryDtoType$inboundSchema, - params: z.union([ - TimestampRangeNftHoldersParam$inboundSchema, - DateRangeNftHoldersParam$inboundSchema, - ]), + id: z.string(), + type: AnyTimeNftHoldersQueryDtoType$inboundSchema, + params: z.union([ + TimestampRangeNftHoldersParam$inboundSchema, + DateRangeNftHoldersParam$inboundSchema, + ]), }); /** @internal */ export type AnyTimeNftHoldersQueryDto$Outbound = { - id: string; - type: string; - params: TimestampRangeNftHoldersParam$Outbound | DateRangeNftHoldersParam$Outbound; + id: string; + type: string; + params: + | TimestampRangeNftHoldersParam$Outbound + | DateRangeNftHoldersParam$Outbound; }; /** @internal */ export const AnyTimeNftHoldersQueryDto$outboundSchema: z.ZodType< - AnyTimeNftHoldersQueryDto$Outbound, - z.ZodTypeDef, - AnyTimeNftHoldersQueryDto + AnyTimeNftHoldersQueryDto$Outbound, + z.ZodTypeDef, + AnyTimeNftHoldersQueryDto > = z.object({ - id: z.string(), - type: AnyTimeNftHoldersQueryDtoType$outboundSchema, - params: z.union([ - TimestampRangeNftHoldersParam$outboundSchema, - DateRangeNftHoldersParam$outboundSchema, - ]), + id: z.string(), + type: AnyTimeNftHoldersQueryDtoType$outboundSchema, + params: z.union([ + TimestampRangeNftHoldersParam$outboundSchema, + DateRangeNftHoldersParam$outboundSchema, + ]), }); /** @@ -128,10 +135,10 @@ export const AnyTimeNftHoldersQueryDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AnyTimeNftHoldersQueryDto$ { - /** @deprecated use `AnyTimeNftHoldersQueryDto$inboundSchema` instead. */ - export const inboundSchema = AnyTimeNftHoldersQueryDto$inboundSchema; - /** @deprecated use `AnyTimeNftHoldersQueryDto$outboundSchema` instead. */ - export const outboundSchema = AnyTimeNftHoldersQueryDto$outboundSchema; - /** @deprecated use `AnyTimeNftHoldersQueryDto$Outbound` instead. */ - export type Outbound = AnyTimeNftHoldersQueryDto$Outbound; + /** @deprecated use `AnyTimeNftHoldersQueryDto$inboundSchema` instead. */ + export const inboundSchema = AnyTimeNftHoldersQueryDto$inboundSchema; + /** @deprecated use `AnyTimeNftHoldersQueryDto$outboundSchema` instead. */ + export const outboundSchema = AnyTimeNftHoldersQueryDto$outboundSchema; + /** @deprecated use `AnyTimeNftHoldersQueryDto$Outbound` instead. */ + export type Outbound = AnyTimeNftHoldersQueryDto$Outbound; } diff --git a/src/models/components/anytimestarsarenabalancequerydto.ts b/src/models/components/anytimestarsarenabalancequerydto.ts index 670cb23..938a647 100644 --- a/src/models/components/anytimestarsarenabalancequerydto.ts +++ b/src/models/components/anytimestarsarenabalancequerydto.ts @@ -2,76 +2,79 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - DateRangeStarsArenaMinBalanceParam, - DateRangeStarsArenaMinBalanceParam$inboundSchema, - DateRangeStarsArenaMinBalanceParam$Outbound, - DateRangeStarsArenaMinBalanceParam$outboundSchema, + DateRangeStarsArenaMinBalanceParam, + DateRangeStarsArenaMinBalanceParam$inboundSchema, + DateRangeStarsArenaMinBalanceParam$Outbound, + DateRangeStarsArenaMinBalanceParam$outboundSchema, } from "./daterangestarsarenaminbalanceparam.js"; -import * as z from "zod"; export const AnyTimeStarsArenaBalanceQueryDtoType = { - AnyTimeStarsArenaBalance: "AnyTimeStarsArenaBalance", + AnyTimeStarsArenaBalance: "AnyTimeStarsArenaBalance", } as const; export type AnyTimeStarsArenaBalanceQueryDtoType = ClosedEnum< - typeof AnyTimeStarsArenaBalanceQueryDtoType + typeof AnyTimeStarsArenaBalanceQueryDtoType >; export type AnyTimeStarsArenaBalanceQueryDto = { - id: string; - type: AnyTimeStarsArenaBalanceQueryDtoType; - params: DateRangeStarsArenaMinBalanceParam; + id: string; + type: AnyTimeStarsArenaBalanceQueryDtoType; + params: DateRangeStarsArenaMinBalanceParam; }; /** @internal */ -export const AnyTimeStarsArenaBalanceQueryDtoType$inboundSchema: z.ZodNativeEnum< - typeof AnyTimeStarsArenaBalanceQueryDtoType -> = z.nativeEnum(AnyTimeStarsArenaBalanceQueryDtoType); +export const AnyTimeStarsArenaBalanceQueryDtoType$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + AnyTimeStarsArenaBalanceQueryDtoType, + ); /** @internal */ -export const AnyTimeStarsArenaBalanceQueryDtoType$outboundSchema: z.ZodNativeEnum< - typeof AnyTimeStarsArenaBalanceQueryDtoType -> = AnyTimeStarsArenaBalanceQueryDtoType$inboundSchema; +export const AnyTimeStarsArenaBalanceQueryDtoType$outboundSchema: + z.ZodNativeEnum = + AnyTimeStarsArenaBalanceQueryDtoType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AnyTimeStarsArenaBalanceQueryDtoType$ { - /** @deprecated use `AnyTimeStarsArenaBalanceQueryDtoType$inboundSchema` instead. */ - export const inboundSchema = AnyTimeStarsArenaBalanceQueryDtoType$inboundSchema; - /** @deprecated use `AnyTimeStarsArenaBalanceQueryDtoType$outboundSchema` instead. */ - export const outboundSchema = AnyTimeStarsArenaBalanceQueryDtoType$outboundSchema; + /** @deprecated use `AnyTimeStarsArenaBalanceQueryDtoType$inboundSchema` instead. */ + export const inboundSchema = + AnyTimeStarsArenaBalanceQueryDtoType$inboundSchema; + /** @deprecated use `AnyTimeStarsArenaBalanceQueryDtoType$outboundSchema` instead. */ + export const outboundSchema = + AnyTimeStarsArenaBalanceQueryDtoType$outboundSchema; } /** @internal */ export const AnyTimeStarsArenaBalanceQueryDto$inboundSchema: z.ZodType< - AnyTimeStarsArenaBalanceQueryDto, - z.ZodTypeDef, - unknown + AnyTimeStarsArenaBalanceQueryDto, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), - type: AnyTimeStarsArenaBalanceQueryDtoType$inboundSchema, - params: DateRangeStarsArenaMinBalanceParam$inboundSchema, + id: z.string(), + type: AnyTimeStarsArenaBalanceQueryDtoType$inboundSchema, + params: DateRangeStarsArenaMinBalanceParam$inboundSchema, }); /** @internal */ export type AnyTimeStarsArenaBalanceQueryDto$Outbound = { - id: string; - type: string; - params: DateRangeStarsArenaMinBalanceParam$Outbound; + id: string; + type: string; + params: DateRangeStarsArenaMinBalanceParam$Outbound; }; /** @internal */ export const AnyTimeStarsArenaBalanceQueryDto$outboundSchema: z.ZodType< - AnyTimeStarsArenaBalanceQueryDto$Outbound, - z.ZodTypeDef, - AnyTimeStarsArenaBalanceQueryDto + AnyTimeStarsArenaBalanceQueryDto$Outbound, + z.ZodTypeDef, + AnyTimeStarsArenaBalanceQueryDto > = z.object({ - id: z.string(), - type: AnyTimeStarsArenaBalanceQueryDtoType$outboundSchema, - params: DateRangeStarsArenaMinBalanceParam$outboundSchema, + id: z.string(), + type: AnyTimeStarsArenaBalanceQueryDtoType$outboundSchema, + params: DateRangeStarsArenaMinBalanceParam$outboundSchema, }); /** @@ -79,10 +82,10 @@ export const AnyTimeStarsArenaBalanceQueryDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AnyTimeStarsArenaBalanceQueryDto$ { - /** @deprecated use `AnyTimeStarsArenaBalanceQueryDto$inboundSchema` instead. */ - export const inboundSchema = AnyTimeStarsArenaBalanceQueryDto$inboundSchema; - /** @deprecated use `AnyTimeStarsArenaBalanceQueryDto$outboundSchema` instead. */ - export const outboundSchema = AnyTimeStarsArenaBalanceQueryDto$outboundSchema; - /** @deprecated use `AnyTimeStarsArenaBalanceQueryDto$Outbound` instead. */ - export type Outbound = AnyTimeStarsArenaBalanceQueryDto$Outbound; + /** @deprecated use `AnyTimeStarsArenaBalanceQueryDto$inboundSchema` instead. */ + export const inboundSchema = AnyTimeStarsArenaBalanceQueryDto$inboundSchema; + /** @deprecated use `AnyTimeStarsArenaBalanceQueryDto$outboundSchema` instead. */ + export const outboundSchema = AnyTimeStarsArenaBalanceQueryDto$outboundSchema; + /** @deprecated use `AnyTimeStarsArenaBalanceQueryDto$Outbound` instead. */ + export type Outbound = AnyTimeStarsArenaBalanceQueryDto$Outbound; } diff --git a/src/models/components/assetamount.ts b/src/models/components/assetamount.ts index f646112..2cb9cb8 100644 --- a/src/models/components/assetamount.ts +++ b/src/models/components/assetamount.ts @@ -2,72 +2,76 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PrimaryNetworkAssetType, - PrimaryNetworkAssetType$inboundSchema, - PrimaryNetworkAssetType$outboundSchema, + PrimaryNetworkAssetType, + PrimaryNetworkAssetType$inboundSchema, + PrimaryNetworkAssetType$outboundSchema, } from "./primarynetworkassettype.js"; -import * as z from "zod"; export type AssetAmount = { - /** - * Unique ID for an asset. - */ - assetId: string; - /** - * Name of this asset. - */ - name: string; - /** - * Symbol for this asset (max 4 characters). - */ - symbol: string; - /** - * Denomination of this asset to represent fungibility. - */ - denomination: number; - /** - * Type of asset like SECP256K1 or NFT. - */ - type: PrimaryNetworkAssetType; - /** - * Amount of the asset. - */ - amount: string; + /** + * Unique ID for an asset. + */ + assetId: string; + /** + * Name of this asset. + */ + name: string; + /** + * Symbol for this asset (max 4 characters). + */ + symbol: string; + /** + * Denomination of this asset to represent fungibility. + */ + denomination: number; + /** + * Type of asset like SECP256K1 or NFT. + */ + type: PrimaryNetworkAssetType; + /** + * Amount of the asset. + */ + amount: string; }; /** @internal */ -export const AssetAmount$inboundSchema: z.ZodType = z.object({ - assetId: z.string(), - name: z.string(), - symbol: z.string(), - denomination: z.number(), - type: PrimaryNetworkAssetType$inboundSchema, - amount: z.string(), +export const AssetAmount$inboundSchema: z.ZodType< + AssetAmount, + z.ZodTypeDef, + unknown +> = z.object({ + assetId: z.string(), + name: z.string(), + symbol: z.string(), + denomination: z.number(), + type: PrimaryNetworkAssetType$inboundSchema, + amount: z.string(), }); /** @internal */ export type AssetAmount$Outbound = { - assetId: string; - name: string; - symbol: string; - denomination: number; - type: string; - amount: string; + assetId: string; + name: string; + symbol: string; + denomination: number; + type: string; + amount: string; }; /** @internal */ export const AssetAmount$outboundSchema: z.ZodType< - AssetAmount$Outbound, - z.ZodTypeDef, - AssetAmount + AssetAmount$Outbound, + z.ZodTypeDef, + AssetAmount > = z.object({ - assetId: z.string(), - name: z.string(), - symbol: z.string(), - denomination: z.number(), - type: PrimaryNetworkAssetType$outboundSchema, - amount: z.string(), + assetId: z.string(), + name: z.string(), + symbol: z.string(), + denomination: z.number(), + type: PrimaryNetworkAssetType$outboundSchema, + amount: z.string(), }); /** @@ -75,10 +79,10 @@ export const AssetAmount$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AssetAmount$ { - /** @deprecated use `AssetAmount$inboundSchema` instead. */ - export const inboundSchema = AssetAmount$inboundSchema; - /** @deprecated use `AssetAmount$outboundSchema` instead. */ - export const outboundSchema = AssetAmount$outboundSchema; - /** @deprecated use `AssetAmount$Outbound` instead. */ - export type Outbound = AssetAmount$Outbound; + /** @deprecated use `AssetAmount$inboundSchema` instead. */ + export const inboundSchema = AssetAmount$inboundSchema; + /** @deprecated use `AssetAmount$outboundSchema` instead. */ + export const outboundSchema = AssetAmount$outboundSchema; + /** @deprecated use `AssetAmount$Outbound` instead. */ + export type Outbound = AssetAmount$Outbound; } diff --git a/src/models/components/assetwithpriceinfo.ts b/src/models/components/assetwithpriceinfo.ts index eb65aa2..68b6a90 100644 --- a/src/models/components/assetwithpriceinfo.ts +++ b/src/models/components/assetwithpriceinfo.ts @@ -2,84 +2,89 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { Money, Money$inboundSchema, Money$Outbound, Money$outboundSchema } from "./money.js"; +import * as z from "zod"; +import { + Money, + Money$inboundSchema, + Money$Outbound, + Money$outboundSchema, +} from "./money.js"; import { - PrimaryNetworkAssetType, - PrimaryNetworkAssetType$inboundSchema, - PrimaryNetworkAssetType$outboundSchema, + PrimaryNetworkAssetType, + PrimaryNetworkAssetType$inboundSchema, + PrimaryNetworkAssetType$outboundSchema, } from "./primarynetworkassettype.js"; -import * as z from "zod"; export type AssetWithPriceInfo = { - /** - * Unique ID for an asset. - */ - assetId: string; - /** - * Name of this asset. - */ - name: string; - /** - * Symbol for this asset (max 4 characters). - */ - symbol: string; - /** - * Denomination of this asset to represent fungibility. - */ - denomination: number; - /** - * Type of asset like SECP256K1 or NFT. - */ - type: PrimaryNetworkAssetType; - /** - * Amount of the asset. - */ - amount: string; - /** - * The historical asset price at the time the reward was granted, if available. Note, this is only provided if the reward occured more than 24 hours ago. - */ - historicalPrice?: Money | undefined; + /** + * Unique ID for an asset. + */ + assetId: string; + /** + * Name of this asset. + */ + name: string; + /** + * Symbol for this asset (max 4 characters). + */ + symbol: string; + /** + * Denomination of this asset to represent fungibility. + */ + denomination: number; + /** + * Type of asset like SECP256K1 or NFT. + */ + type: PrimaryNetworkAssetType; + /** + * Amount of the asset. + */ + amount: string; + /** + * The historical asset price at the time the reward was granted, if available. Note, this is only provided if the reward occured more than 24 hours ago. + */ + historicalPrice?: Money | undefined; }; /** @internal */ export const AssetWithPriceInfo$inboundSchema: z.ZodType< - AssetWithPriceInfo, - z.ZodTypeDef, - unknown + AssetWithPriceInfo, + z.ZodTypeDef, + unknown > = z.object({ - assetId: z.string(), - name: z.string(), - symbol: z.string(), - denomination: z.number(), - type: PrimaryNetworkAssetType$inboundSchema, - amount: z.string(), - historicalPrice: Money$inboundSchema.optional(), + assetId: z.string(), + name: z.string(), + symbol: z.string(), + denomination: z.number(), + type: PrimaryNetworkAssetType$inboundSchema, + amount: z.string(), + historicalPrice: Money$inboundSchema.optional(), }); /** @internal */ export type AssetWithPriceInfo$Outbound = { - assetId: string; - name: string; - symbol: string; - denomination: number; - type: string; - amount: string; - historicalPrice?: Money$Outbound | undefined; + assetId: string; + name: string; + symbol: string; + denomination: number; + type: string; + amount: string; + historicalPrice?: Money$Outbound | undefined; }; /** @internal */ export const AssetWithPriceInfo$outboundSchema: z.ZodType< - AssetWithPriceInfo$Outbound, - z.ZodTypeDef, - AssetWithPriceInfo + AssetWithPriceInfo$Outbound, + z.ZodTypeDef, + AssetWithPriceInfo > = z.object({ - assetId: z.string(), - name: z.string(), - symbol: z.string(), - denomination: z.number(), - type: PrimaryNetworkAssetType$outboundSchema, - amount: z.string(), - historicalPrice: Money$outboundSchema.optional(), + assetId: z.string(), + name: z.string(), + symbol: z.string(), + denomination: z.number(), + type: PrimaryNetworkAssetType$outboundSchema, + amount: z.string(), + historicalPrice: Money$outboundSchema.optional(), }); /** @@ -87,10 +92,10 @@ export const AssetWithPriceInfo$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AssetWithPriceInfo$ { - /** @deprecated use `AssetWithPriceInfo$inboundSchema` instead. */ - export const inboundSchema = AssetWithPriceInfo$inboundSchema; - /** @deprecated use `AssetWithPriceInfo$outboundSchema` instead. */ - export const outboundSchema = AssetWithPriceInfo$outboundSchema; - /** @deprecated use `AssetWithPriceInfo$Outbound` instead. */ - export type Outbound = AssetWithPriceInfo$Outbound; + /** @deprecated use `AssetWithPriceInfo$inboundSchema` instead. */ + export const inboundSchema = AssetWithPriceInfo$inboundSchema; + /** @deprecated use `AssetWithPriceInfo$outboundSchema` instead. */ + export const outboundSchema = AssetWithPriceInfo$outboundSchema; + /** @deprecated use `AssetWithPriceInfo$Outbound` instead. */ + export type Outbound = AssetWithPriceInfo$Outbound; } diff --git a/src/models/components/blockchain.ts b/src/models/components/blockchain.ts index bf8e2ca..3194b0c 100644 --- a/src/models/components/blockchain.ts +++ b/src/models/components/blockchain.ts @@ -5,54 +5,61 @@ import * as z from "zod"; export type Blockchain = { - createBlockTimestamp: number; - createBlockNumber: string; - blockchainId: string; - vmId: string; - subnetId: string; - blockchainName: string; + createBlockTimestamp: number; + createBlockNumber: string; + blockchainId: string; + vmId: string; + subnetId: string; + blockchainName: string; }; /** @internal */ -export const Blockchain$inboundSchema: z.ZodType = z.object({ - createBlockTimestamp: z.number(), - createBlockNumber: z.string(), - blockchainId: z.string(), - vmId: z.string(), - subnetId: z.string(), - blockchainName: z.string(), +export const Blockchain$inboundSchema: z.ZodType< + Blockchain, + z.ZodTypeDef, + unknown +> = z.object({ + createBlockTimestamp: z.number(), + createBlockNumber: z.string(), + blockchainId: z.string(), + vmId: z.string(), + subnetId: z.string(), + blockchainName: z.string(), }); /** @internal */ export type Blockchain$Outbound = { - createBlockTimestamp: number; - createBlockNumber: string; - blockchainId: string; - vmId: string; - subnetId: string; - blockchainName: string; + createBlockTimestamp: number; + createBlockNumber: string; + blockchainId: string; + vmId: string; + subnetId: string; + blockchainName: string; }; /** @internal */ -export const Blockchain$outboundSchema: z.ZodType = - z.object({ - createBlockTimestamp: z.number(), - createBlockNumber: z.string(), - blockchainId: z.string(), - vmId: z.string(), - subnetId: z.string(), - blockchainName: z.string(), - }); +export const Blockchain$outboundSchema: z.ZodType< + Blockchain$Outbound, + z.ZodTypeDef, + Blockchain +> = z.object({ + createBlockTimestamp: z.number(), + createBlockNumber: z.string(), + blockchainId: z.string(), + vmId: z.string(), + subnetId: z.string(), + blockchainName: z.string(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Blockchain$ { - /** @deprecated use `Blockchain$inboundSchema` instead. */ - export const inboundSchema = Blockchain$inboundSchema; - /** @deprecated use `Blockchain$outboundSchema` instead. */ - export const outboundSchema = Blockchain$outboundSchema; - /** @deprecated use `Blockchain$Outbound` instead. */ - export type Outbound = Blockchain$Outbound; + /** @deprecated use `Blockchain$inboundSchema` instead. */ + export const inboundSchema = Blockchain$inboundSchema; + /** @deprecated use `Blockchain$outboundSchema` instead. */ + export const outboundSchema = Blockchain$outboundSchema; + /** @deprecated use `Blockchain$Outbound` instead. */ + export type Outbound = Blockchain$Outbound; } diff --git a/src/models/components/blockchainid.ts b/src/models/components/blockchainid.ts index 2cc02ff..5e5a8ed 100644 --- a/src/models/components/blockchainid.ts +++ b/src/models/components/blockchainid.ts @@ -2,41 +2,41 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const BlockchainId = { - ElevenNonillionOneHundredAndElevenOctillionOneHundredAndElevenSeptillionOneHundredAndElevenSextillionOneHundredAndElevenQuintillionOneHundredAndElevenQuadrillionOneHundredAndElevenTrillionOneHundredAndElevenBillionOneHundredAndElevenMillionOneHundredAndElevenThousandOneHundredAndElevenLpoYY: - "11111111111111111111111111111111LpoYY", - TwooYmbnv4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM: - "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - TwoJVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm: - "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm", - Twoq9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAx5UQxse55x1Q5: - "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5", - YH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp: - "yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp", - PChain: "p-chain", - XChain: "x-chain", - CChain: "c-chain", + ElevenNonillionOneHundredAndElevenOctillionOneHundredAndElevenSeptillionOneHundredAndElevenSextillionOneHundredAndElevenQuintillionOneHundredAndElevenQuadrillionOneHundredAndElevenTrillionOneHundredAndElevenBillionOneHundredAndElevenMillionOneHundredAndElevenThousandOneHundredAndElevenLpoYY: + "11111111111111111111111111111111LpoYY", + TwooYmbnv4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM: + "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + TwoJVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm: + "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm", + Twoq9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAx5UQxse55x1Q5: + "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5", + YH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp: + "yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp", + PChain: "p-chain", + XChain: "x-chain", + CChain: "c-chain", } as const; export type BlockchainId = ClosedEnum; /** @internal */ export const BlockchainId$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(BlockchainId); + z.nativeEnum(BlockchainId); /** @internal */ export const BlockchainId$outboundSchema: z.ZodNativeEnum = - BlockchainId$inboundSchema; + BlockchainId$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BlockchainId$ { - /** @deprecated use `BlockchainId$inboundSchema` instead. */ - export const inboundSchema = BlockchainId$inboundSchema; - /** @deprecated use `BlockchainId$outboundSchema` instead. */ - export const outboundSchema = BlockchainId$outboundSchema; + /** @deprecated use `BlockchainId$inboundSchema` instead. */ + export const inboundSchema = BlockchainId$inboundSchema; + /** @deprecated use `BlockchainId$outboundSchema` instead. */ + export const outboundSchema = BlockchainId$outboundSchema; } diff --git a/src/models/components/blockchainids.ts b/src/models/components/blockchainids.ts index f38611d..7dc83e8 100644 --- a/src/models/components/blockchainids.ts +++ b/src/models/components/blockchainids.ts @@ -2,38 +2,40 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const BlockchainIds = { - ElevenNonillionOneHundredAndElevenOctillionOneHundredAndElevenSeptillionOneHundredAndElevenSextillionOneHundredAndElevenQuintillionOneHundredAndElevenQuadrillionOneHundredAndElevenTrillionOneHundredAndElevenBillionOneHundredAndElevenMillionOneHundredAndElevenThousandOneHundredAndElevenLpoYY: - "11111111111111111111111111111111LpoYY", - TwooYmbnv4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM: - "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - TwoJVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm: - "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm", - Twoq9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAx5UQxse55x1Q5: - "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5", - YH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp: - "yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp", + ElevenNonillionOneHundredAndElevenOctillionOneHundredAndElevenSeptillionOneHundredAndElevenSextillionOneHundredAndElevenQuintillionOneHundredAndElevenQuadrillionOneHundredAndElevenTrillionOneHundredAndElevenBillionOneHundredAndElevenMillionOneHundredAndElevenThousandOneHundredAndElevenLpoYY: + "11111111111111111111111111111111LpoYY", + TwooYmbnv4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM: + "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + TwoJVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm: + "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm", + Twoq9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAx5UQxse55x1Q5: + "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5", + YH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp: + "yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp", } as const; export type BlockchainIds = ClosedEnum; /** @internal */ -export const BlockchainIds$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(BlockchainIds); +export const BlockchainIds$inboundSchema: z.ZodNativeEnum< + typeof BlockchainIds +> = z.nativeEnum(BlockchainIds); /** @internal */ -export const BlockchainIds$outboundSchema: z.ZodNativeEnum = - BlockchainIds$inboundSchema; +export const BlockchainIds$outboundSchema: z.ZodNativeEnum< + typeof BlockchainIds +> = BlockchainIds$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BlockchainIds$ { - /** @deprecated use `BlockchainIds$inboundSchema` instead. */ - export const inboundSchema = BlockchainIds$inboundSchema; - /** @deprecated use `BlockchainIds$outboundSchema` instead. */ - export const outboundSchema = BlockchainIds$outboundSchema; + /** @deprecated use `BlockchainIds$inboundSchema` instead. */ + export const inboundSchema = BlockchainIds$inboundSchema; + /** @deprecated use `BlockchainIds$outboundSchema` instead. */ + export const outboundSchema = BlockchainIds$outboundSchema; } diff --git a/src/models/components/blockchaininfo.ts b/src/models/components/blockchaininfo.ts index 7d1784a..4d30658 100644 --- a/src/models/components/blockchaininfo.ts +++ b/src/models/components/blockchaininfo.ts @@ -5,27 +5,30 @@ import * as z from "zod"; export type BlockchainInfo = { - blockchainId: string; + blockchainId: string; }; /** @internal */ -export const BlockchainInfo$inboundSchema: z.ZodType = - z.object({ - blockchainId: z.string(), - }); +export const BlockchainInfo$inboundSchema: z.ZodType< + BlockchainInfo, + z.ZodTypeDef, + unknown +> = z.object({ + blockchainId: z.string(), +}); /** @internal */ export type BlockchainInfo$Outbound = { - blockchainId: string; + blockchainId: string; }; /** @internal */ export const BlockchainInfo$outboundSchema: z.ZodType< - BlockchainInfo$Outbound, - z.ZodTypeDef, - BlockchainInfo + BlockchainInfo$Outbound, + z.ZodTypeDef, + BlockchainInfo > = z.object({ - blockchainId: z.string(), + blockchainId: z.string(), }); /** @@ -33,10 +36,10 @@ export const BlockchainInfo$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BlockchainInfo$ { - /** @deprecated use `BlockchainInfo$inboundSchema` instead. */ - export const inboundSchema = BlockchainInfo$inboundSchema; - /** @deprecated use `BlockchainInfo$outboundSchema` instead. */ - export const outboundSchema = BlockchainInfo$outboundSchema; - /** @deprecated use `BlockchainInfo$Outbound` instead. */ - export type Outbound = BlockchainInfo$Outbound; + /** @deprecated use `BlockchainInfo$inboundSchema` instead. */ + export const inboundSchema = BlockchainInfo$inboundSchema; + /** @deprecated use `BlockchainInfo$outboundSchema` instead. */ + export const outboundSchema = BlockchainInfo$outboundSchema; + /** @deprecated use `BlockchainInfo$Outbound` instead. */ + export type Outbound = BlockchainInfo$Outbound; } diff --git a/src/models/components/blscredentials.ts b/src/models/components/blscredentials.ts index 526227b..308fbcf 100644 --- a/src/models/components/blscredentials.ts +++ b/src/models/components/blscredentials.ts @@ -5,31 +5,34 @@ import * as z from "zod"; export type BlsCredentials = { - publicKey: string; - proofOfPossession: string; + publicKey: string; + proofOfPossession: string; }; /** @internal */ -export const BlsCredentials$inboundSchema: z.ZodType = - z.object({ - publicKey: z.string(), - proofOfPossession: z.string(), - }); +export const BlsCredentials$inboundSchema: z.ZodType< + BlsCredentials, + z.ZodTypeDef, + unknown +> = z.object({ + publicKey: z.string(), + proofOfPossession: z.string(), +}); /** @internal */ export type BlsCredentials$Outbound = { - publicKey: string; - proofOfPossession: string; + publicKey: string; + proofOfPossession: string; }; /** @internal */ export const BlsCredentials$outboundSchema: z.ZodType< - BlsCredentials$Outbound, - z.ZodTypeDef, - BlsCredentials + BlsCredentials$Outbound, + z.ZodTypeDef, + BlsCredentials > = z.object({ - publicKey: z.string(), - proofOfPossession: z.string(), + publicKey: z.string(), + proofOfPossession: z.string(), }); /** @@ -37,10 +40,10 @@ export const BlsCredentials$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BlsCredentials$ { - /** @deprecated use `BlsCredentials$inboundSchema` instead. */ - export const inboundSchema = BlsCredentials$inboundSchema; - /** @deprecated use `BlsCredentials$outboundSchema` instead. */ - export const outboundSchema = BlsCredentials$outboundSchema; - /** @deprecated use `BlsCredentials$Outbound` instead. */ - export type Outbound = BlsCredentials$Outbound; + /** @deprecated use `BlsCredentials$inboundSchema` instead. */ + export const inboundSchema = BlsCredentials$inboundSchema; + /** @deprecated use `BlsCredentials$outboundSchema` instead. */ + export const outboundSchema = BlsCredentials$outboundSchema; + /** @deprecated use `BlsCredentials$Outbound` instead. */ + export type Outbound = BlsCredentials$Outbound; } diff --git a/src/models/components/cchainatomicbalances.ts b/src/models/components/cchainatomicbalances.ts index 40a0d0f..865840c 100644 --- a/src/models/components/cchainatomicbalances.ts +++ b/src/models/components/cchainatomicbalances.ts @@ -2,43 +2,43 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - CChainSharedAssetBalance, - CChainSharedAssetBalance$inboundSchema, - CChainSharedAssetBalance$Outbound, - CChainSharedAssetBalance$outboundSchema, + CChainSharedAssetBalance, + CChainSharedAssetBalance$inboundSchema, + CChainSharedAssetBalance$Outbound, + CChainSharedAssetBalance$outboundSchema, } from "./cchainsharedassetbalance.js"; -import * as z from "zod"; export type CChainAtomicBalances = { - atomicMemoryUnlocked: Array; - atomicMemoryLocked: Array; + atomicMemoryUnlocked: Array; + atomicMemoryLocked: Array; }; /** @internal */ export const CChainAtomicBalances$inboundSchema: z.ZodType< - CChainAtomicBalances, - z.ZodTypeDef, - unknown + CChainAtomicBalances, + z.ZodTypeDef, + unknown > = z.object({ - atomicMemoryUnlocked: z.array(CChainSharedAssetBalance$inboundSchema), - atomicMemoryLocked: z.array(CChainSharedAssetBalance$inboundSchema), + atomicMemoryUnlocked: z.array(CChainSharedAssetBalance$inboundSchema), + atomicMemoryLocked: z.array(CChainSharedAssetBalance$inboundSchema), }); /** @internal */ export type CChainAtomicBalances$Outbound = { - atomicMemoryUnlocked: Array; - atomicMemoryLocked: Array; + atomicMemoryUnlocked: Array; + atomicMemoryLocked: Array; }; /** @internal */ export const CChainAtomicBalances$outboundSchema: z.ZodType< - CChainAtomicBalances$Outbound, - z.ZodTypeDef, - CChainAtomicBalances + CChainAtomicBalances$Outbound, + z.ZodTypeDef, + CChainAtomicBalances > = z.object({ - atomicMemoryUnlocked: z.array(CChainSharedAssetBalance$outboundSchema), - atomicMemoryLocked: z.array(CChainSharedAssetBalance$outboundSchema), + atomicMemoryUnlocked: z.array(CChainSharedAssetBalance$outboundSchema), + atomicMemoryLocked: z.array(CChainSharedAssetBalance$outboundSchema), }); /** @@ -46,10 +46,10 @@ export const CChainAtomicBalances$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CChainAtomicBalances$ { - /** @deprecated use `CChainAtomicBalances$inboundSchema` instead. */ - export const inboundSchema = CChainAtomicBalances$inboundSchema; - /** @deprecated use `CChainAtomicBalances$outboundSchema` instead. */ - export const outboundSchema = CChainAtomicBalances$outboundSchema; - /** @deprecated use `CChainAtomicBalances$Outbound` instead. */ - export type Outbound = CChainAtomicBalances$Outbound; + /** @deprecated use `CChainAtomicBalances$inboundSchema` instead. */ + export const inboundSchema = CChainAtomicBalances$inboundSchema; + /** @deprecated use `CChainAtomicBalances$outboundSchema` instead. */ + export const outboundSchema = CChainAtomicBalances$outboundSchema; + /** @deprecated use `CChainAtomicBalances$Outbound` instead. */ + export type Outbound = CChainAtomicBalances$Outbound; } diff --git a/src/models/components/cchainexporttransaction.ts b/src/models/components/cchainexporttransaction.ts index ca7659e..c5fd4e8 100644 --- a/src/models/components/cchainexporttransaction.ts +++ b/src/models/components/cchainexporttransaction.ts @@ -2,27 +2,32 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - AssetAmount, - AssetAmount$inboundSchema, - AssetAmount$Outbound, - AssetAmount$outboundSchema, + AssetAmount, + AssetAmount$inboundSchema, + AssetAmount$Outbound, + AssetAmount$outboundSchema, } from "./assetamount.js"; import { - EVMInput, - EVMInput$inboundSchema, - EVMInput$Outbound, - EVMInput$outboundSchema, + EVMInput, + EVMInput$inboundSchema, + EVMInput$Outbound, + EVMInput$outboundSchema, } from "./evminput.js"; -import { Utxo, Utxo$inboundSchema, Utxo$Outbound, Utxo$outboundSchema } from "./utxo.js"; -import * as z from "zod"; +import { + Utxo, + Utxo$inboundSchema, + Utxo$Outbound, + Utxo$outboundSchema, +} from "./utxo.js"; /** * Type of transaction. */ export const TxType = { - ExportTx: "ExportTx", + ExportTx: "ExportTx", } as const; /** * Type of transaction. @@ -30,121 +35,123 @@ export const TxType = { export type TxType = ClosedEnum; export type CChainExportTransaction = { - /** - * Unique ID for this transaction. - */ - txHash: string; - /** - * Height of the block this transaction belongs to. - */ - blockHeight: number; - /** - * Hash of the block this transaction belongs to. - */ - blockHash: string; - /** - * Latest timestamp in seconds this transaction was accepted. - */ - timestamp: number; - /** - * Hex encoded memo bytes for this transaction. - */ - memo: string; - /** - * Assets unlocked by inputs of this transaction. - */ - amountUnlocked: Array; - /** - * Assets created by outputs of this transaction. - */ - amountCreated: Array; - /** - * Source chain for an atomic transaction. - */ - sourceChain: string; - /** - * Destination chain for an atomic transaction. - */ - destinationChain: string; - /** - * Type of transaction. - */ - txType: TxType; - evmInputs: Array; - emittedUtxos: Array; + /** + * Unique ID for this transaction. + */ + txHash: string; + /** + * Height of the block this transaction belongs to. + */ + blockHeight: number; + /** + * Hash of the block this transaction belongs to. + */ + blockHash: string; + /** + * Latest timestamp in seconds this transaction was accepted. + */ + timestamp: number; + /** + * Hex encoded memo bytes for this transaction. + */ + memo: string; + /** + * Assets unlocked by inputs of this transaction. + */ + amountUnlocked: Array; + /** + * Assets created by outputs of this transaction. + */ + amountCreated: Array; + /** + * Source chain for an atomic transaction. + */ + sourceChain: string; + /** + * Destination chain for an atomic transaction. + */ + destinationChain: string; + /** + * Type of transaction. + */ + txType: TxType; + evmInputs: Array; + emittedUtxos: Array; }; /** @internal */ -export const TxType$inboundSchema: z.ZodNativeEnum = z.nativeEnum(TxType); +export const TxType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(TxType); /** @internal */ -export const TxType$outboundSchema: z.ZodNativeEnum = TxType$inboundSchema; +export const TxType$outboundSchema: z.ZodNativeEnum = + TxType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TxType$ { - /** @deprecated use `TxType$inboundSchema` instead. */ - export const inboundSchema = TxType$inboundSchema; - /** @deprecated use `TxType$outboundSchema` instead. */ - export const outboundSchema = TxType$outboundSchema; + /** @deprecated use `TxType$inboundSchema` instead. */ + export const inboundSchema = TxType$inboundSchema; + /** @deprecated use `TxType$outboundSchema` instead. */ + export const outboundSchema = TxType$outboundSchema; } /** @internal */ export const CChainExportTransaction$inboundSchema: z.ZodType< - CChainExportTransaction, - z.ZodTypeDef, - unknown + CChainExportTransaction, + z.ZodTypeDef, + unknown > = z.object({ - txHash: z.string(), - blockHeight: z.number(), - blockHash: z.string(), - timestamp: z.number(), - memo: z.string(), - amountUnlocked: z.array(AssetAmount$inboundSchema), - amountCreated: z.array(AssetAmount$inboundSchema), - sourceChain: z.string(), - destinationChain: z.string(), - txType: TxType$inboundSchema, - evmInputs: z.array(EVMInput$inboundSchema), - emittedUtxos: z.array(Utxo$inboundSchema), + txHash: z.string(), + blockHeight: z.number(), + blockHash: z.string(), + timestamp: z.number(), + memo: z.string(), + amountUnlocked: z.array(AssetAmount$inboundSchema), + amountCreated: z.array(AssetAmount$inboundSchema), + sourceChain: z.string(), + destinationChain: z.string(), + txType: TxType$inboundSchema, + evmInputs: z.array(EVMInput$inboundSchema), + emittedUtxos: z.array(Utxo$inboundSchema), }); /** @internal */ export type CChainExportTransaction$Outbound = { - txHash: string; - blockHeight: number; - blockHash: string; - timestamp: number; - memo: string; - amountUnlocked: Array; - amountCreated: Array; - sourceChain: string; - destinationChain: string; - txType: string; - evmInputs: Array; - emittedUtxos: Array; + txHash: string; + blockHeight: number; + blockHash: string; + timestamp: number; + memo: string; + amountUnlocked: Array; + amountCreated: Array; + sourceChain: string; + destinationChain: string; + txType: string; + evmInputs: Array; + emittedUtxos: Array; }; /** @internal */ export const CChainExportTransaction$outboundSchema: z.ZodType< - CChainExportTransaction$Outbound, - z.ZodTypeDef, - CChainExportTransaction + CChainExportTransaction$Outbound, + z.ZodTypeDef, + CChainExportTransaction > = z.object({ - txHash: z.string(), - blockHeight: z.number(), - blockHash: z.string(), - timestamp: z.number(), - memo: z.string(), - amountUnlocked: z.array(AssetAmount$outboundSchema), - amountCreated: z.array(AssetAmount$outboundSchema), - sourceChain: z.string(), - destinationChain: z.string(), - txType: TxType$outboundSchema, - evmInputs: z.array(EVMInput$outboundSchema), - emittedUtxos: z.array(Utxo$outboundSchema), + txHash: z.string(), + blockHeight: z.number(), + blockHash: z.string(), + timestamp: z.number(), + memo: z.string(), + amountUnlocked: z.array(AssetAmount$outboundSchema), + amountCreated: z.array(AssetAmount$outboundSchema), + sourceChain: z.string(), + destinationChain: z.string(), + txType: TxType$outboundSchema, + evmInputs: z.array(EVMInput$outboundSchema), + emittedUtxos: z.array(Utxo$outboundSchema), }); /** @@ -152,10 +159,10 @@ export const CChainExportTransaction$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CChainExportTransaction$ { - /** @deprecated use `CChainExportTransaction$inboundSchema` instead. */ - export const inboundSchema = CChainExportTransaction$inboundSchema; - /** @deprecated use `CChainExportTransaction$outboundSchema` instead. */ - export const outboundSchema = CChainExportTransaction$outboundSchema; - /** @deprecated use `CChainExportTransaction$Outbound` instead. */ - export type Outbound = CChainExportTransaction$Outbound; + /** @deprecated use `CChainExportTransaction$inboundSchema` instead. */ + export const inboundSchema = CChainExportTransaction$inboundSchema; + /** @deprecated use `CChainExportTransaction$outboundSchema` instead. */ + export const outboundSchema = CChainExportTransaction$outboundSchema; + /** @deprecated use `CChainExportTransaction$Outbound` instead. */ + export type Outbound = CChainExportTransaction$Outbound; } diff --git a/src/models/components/cchainimporttransaction.ts b/src/models/components/cchainimporttransaction.ts index 33efc4b..4e2e8d6 100644 --- a/src/models/components/cchainimporttransaction.ts +++ b/src/models/components/cchainimporttransaction.ts @@ -2,86 +2,93 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - AssetAmount, - AssetAmount$inboundSchema, - AssetAmount$Outbound, - AssetAmount$outboundSchema, + AssetAmount, + AssetAmount$inboundSchema, + AssetAmount$Outbound, + AssetAmount$outboundSchema, } from "./assetamount.js"; import { - EVMOutput, - EVMOutput$inboundSchema, - EVMOutput$Outbound, - EVMOutput$outboundSchema, + EVMOutput, + EVMOutput$inboundSchema, + EVMOutput$Outbound, + EVMOutput$outboundSchema, } from "./evmoutput.js"; -import { Utxo, Utxo$inboundSchema, Utxo$Outbound, Utxo$outboundSchema } from "./utxo.js"; -import * as z from "zod"; +import { + Utxo, + Utxo$inboundSchema, + Utxo$Outbound, + Utxo$outboundSchema, +} from "./utxo.js"; /** * Type of transaction. */ export const CChainImportTransactionTxType = { - ImportTx: "ImportTx", + ImportTx: "ImportTx", } as const; /** * Type of transaction. */ -export type CChainImportTransactionTxType = ClosedEnum; +export type CChainImportTransactionTxType = ClosedEnum< + typeof CChainImportTransactionTxType +>; export type CChainImportTransaction = { - /** - * Unique ID for this transaction. - */ - txHash: string; - /** - * Height of the block this transaction belongs to. - */ - blockHeight: number; - /** - * Hash of the block this transaction belongs to. - */ - blockHash: string; - /** - * Latest timestamp in seconds this transaction was accepted. - */ - timestamp: number; - /** - * Hex encoded memo bytes for this transaction. - */ - memo: string; - /** - * Assets unlocked by inputs of this transaction. - */ - amountUnlocked: Array; - /** - * Assets created by outputs of this transaction. - */ - amountCreated: Array; - /** - * Source chain for an atomic transaction. - */ - sourceChain: string; - /** - * Destination chain for an atomic transaction. - */ - destinationChain: string; - /** - * Type of transaction. - */ - txType: CChainImportTransactionTxType; - evmOutputs: Array; - consumedUtxos: Array; + /** + * Unique ID for this transaction. + */ + txHash: string; + /** + * Height of the block this transaction belongs to. + */ + blockHeight: number; + /** + * Hash of the block this transaction belongs to. + */ + blockHash: string; + /** + * Latest timestamp in seconds this transaction was accepted. + */ + timestamp: number; + /** + * Hex encoded memo bytes for this transaction. + */ + memo: string; + /** + * Assets unlocked by inputs of this transaction. + */ + amountUnlocked: Array; + /** + * Assets created by outputs of this transaction. + */ + amountCreated: Array; + /** + * Source chain for an atomic transaction. + */ + sourceChain: string; + /** + * Destination chain for an atomic transaction. + */ + destinationChain: string; + /** + * Type of transaction. + */ + txType: CChainImportTransactionTxType; + evmOutputs: Array; + consumedUtxos: Array; }; /** @internal */ export const CChainImportTransactionTxType$inboundSchema: z.ZodNativeEnum< - typeof CChainImportTransactionTxType + typeof CChainImportTransactionTxType > = z.nativeEnum(CChainImportTransactionTxType); /** @internal */ export const CChainImportTransactionTxType$outboundSchema: z.ZodNativeEnum< - typeof CChainImportTransactionTxType + typeof CChainImportTransactionTxType > = CChainImportTransactionTxType$inboundSchema; /** @@ -89,66 +96,66 @@ export const CChainImportTransactionTxType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CChainImportTransactionTxType$ { - /** @deprecated use `CChainImportTransactionTxType$inboundSchema` instead. */ - export const inboundSchema = CChainImportTransactionTxType$inboundSchema; - /** @deprecated use `CChainImportTransactionTxType$outboundSchema` instead. */ - export const outboundSchema = CChainImportTransactionTxType$outboundSchema; + /** @deprecated use `CChainImportTransactionTxType$inboundSchema` instead. */ + export const inboundSchema = CChainImportTransactionTxType$inboundSchema; + /** @deprecated use `CChainImportTransactionTxType$outboundSchema` instead. */ + export const outboundSchema = CChainImportTransactionTxType$outboundSchema; } /** @internal */ export const CChainImportTransaction$inboundSchema: z.ZodType< - CChainImportTransaction, - z.ZodTypeDef, - unknown + CChainImportTransaction, + z.ZodTypeDef, + unknown > = z.object({ - txHash: z.string(), - blockHeight: z.number(), - blockHash: z.string(), - timestamp: z.number(), - memo: z.string(), - amountUnlocked: z.array(AssetAmount$inboundSchema), - amountCreated: z.array(AssetAmount$inboundSchema), - sourceChain: z.string(), - destinationChain: z.string(), - txType: CChainImportTransactionTxType$inboundSchema, - evmOutputs: z.array(EVMOutput$inboundSchema), - consumedUtxos: z.array(Utxo$inboundSchema), + txHash: z.string(), + blockHeight: z.number(), + blockHash: z.string(), + timestamp: z.number(), + memo: z.string(), + amountUnlocked: z.array(AssetAmount$inboundSchema), + amountCreated: z.array(AssetAmount$inboundSchema), + sourceChain: z.string(), + destinationChain: z.string(), + txType: CChainImportTransactionTxType$inboundSchema, + evmOutputs: z.array(EVMOutput$inboundSchema), + consumedUtxos: z.array(Utxo$inboundSchema), }); /** @internal */ export type CChainImportTransaction$Outbound = { - txHash: string; - blockHeight: number; - blockHash: string; - timestamp: number; - memo: string; - amountUnlocked: Array; - amountCreated: Array; - sourceChain: string; - destinationChain: string; - txType: string; - evmOutputs: Array; - consumedUtxos: Array; + txHash: string; + blockHeight: number; + blockHash: string; + timestamp: number; + memo: string; + amountUnlocked: Array; + amountCreated: Array; + sourceChain: string; + destinationChain: string; + txType: string; + evmOutputs: Array; + consumedUtxos: Array; }; /** @internal */ export const CChainImportTransaction$outboundSchema: z.ZodType< - CChainImportTransaction$Outbound, - z.ZodTypeDef, - CChainImportTransaction + CChainImportTransaction$Outbound, + z.ZodTypeDef, + CChainImportTransaction > = z.object({ - txHash: z.string(), - blockHeight: z.number(), - blockHash: z.string(), - timestamp: z.number(), - memo: z.string(), - amountUnlocked: z.array(AssetAmount$outboundSchema), - amountCreated: z.array(AssetAmount$outboundSchema), - sourceChain: z.string(), - destinationChain: z.string(), - txType: CChainImportTransactionTxType$outboundSchema, - evmOutputs: z.array(EVMOutput$outboundSchema), - consumedUtxos: z.array(Utxo$outboundSchema), + txHash: z.string(), + blockHeight: z.number(), + blockHash: z.string(), + timestamp: z.number(), + memo: z.string(), + amountUnlocked: z.array(AssetAmount$outboundSchema), + amountCreated: z.array(AssetAmount$outboundSchema), + sourceChain: z.string(), + destinationChain: z.string(), + txType: CChainImportTransactionTxType$outboundSchema, + evmOutputs: z.array(EVMOutput$outboundSchema), + consumedUtxos: z.array(Utxo$outboundSchema), }); /** @@ -156,10 +163,10 @@ export const CChainImportTransaction$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CChainImportTransaction$ { - /** @deprecated use `CChainImportTransaction$inboundSchema` instead. */ - export const inboundSchema = CChainImportTransaction$inboundSchema; - /** @deprecated use `CChainImportTransaction$outboundSchema` instead. */ - export const outboundSchema = CChainImportTransaction$outboundSchema; - /** @deprecated use `CChainImportTransaction$Outbound` instead. */ - export type Outbound = CChainImportTransaction$Outbound; + /** @deprecated use `CChainImportTransaction$inboundSchema` instead. */ + export const inboundSchema = CChainImportTransaction$inboundSchema; + /** @deprecated use `CChainImportTransaction$outboundSchema` instead. */ + export const outboundSchema = CChainImportTransaction$outboundSchema; + /** @deprecated use `CChainImportTransaction$Outbound` instead. */ + export type Outbound = CChainImportTransaction$Outbound; } diff --git a/src/models/components/cchainsharedassetbalance.ts b/src/models/components/cchainsharedassetbalance.ts index 723c280..a6af5d8 100644 --- a/src/models/components/cchainsharedassetbalance.ts +++ b/src/models/components/cchainsharedassetbalance.ts @@ -2,84 +2,84 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PrimaryNetworkAssetType, - PrimaryNetworkAssetType$inboundSchema, - PrimaryNetworkAssetType$outboundSchema, + PrimaryNetworkAssetType, + PrimaryNetworkAssetType$inboundSchema, + PrimaryNetworkAssetType$outboundSchema, } from "./primarynetworkassettype.js"; -import * as z from "zod"; export type CChainSharedAssetBalance = { - /** - * Unique ID for an asset. - */ - assetId: string; - /** - * Name of this asset. - */ - name: string; - /** - * Symbol for this asset (max 4 characters). - */ - symbol: string; - /** - * Denomination of this asset to represent fungibility. - */ - denomination: number; - /** - * Type of asset like SECP256K1 or NFT. - */ - type: PrimaryNetworkAssetType; - /** - * Amount of the asset. - */ - amount: string; - utxoCount: number; - sharedWithChainId: string; + /** + * Unique ID for an asset. + */ + assetId: string; + /** + * Name of this asset. + */ + name: string; + /** + * Symbol for this asset (max 4 characters). + */ + symbol: string; + /** + * Denomination of this asset to represent fungibility. + */ + denomination: number; + /** + * Type of asset like SECP256K1 or NFT. + */ + type: PrimaryNetworkAssetType; + /** + * Amount of the asset. + */ + amount: string; + utxoCount: number; + sharedWithChainId: string; }; /** @internal */ export const CChainSharedAssetBalance$inboundSchema: z.ZodType< - CChainSharedAssetBalance, - z.ZodTypeDef, - unknown + CChainSharedAssetBalance, + z.ZodTypeDef, + unknown > = z.object({ - assetId: z.string(), - name: z.string(), - symbol: z.string(), - denomination: z.number(), - type: PrimaryNetworkAssetType$inboundSchema, - amount: z.string(), - utxoCount: z.number(), - sharedWithChainId: z.string(), + assetId: z.string(), + name: z.string(), + symbol: z.string(), + denomination: z.number(), + type: PrimaryNetworkAssetType$inboundSchema, + amount: z.string(), + utxoCount: z.number(), + sharedWithChainId: z.string(), }); /** @internal */ export type CChainSharedAssetBalance$Outbound = { - assetId: string; - name: string; - symbol: string; - denomination: number; - type: string; - amount: string; - utxoCount: number; - sharedWithChainId: string; + assetId: string; + name: string; + symbol: string; + denomination: number; + type: string; + amount: string; + utxoCount: number; + sharedWithChainId: string; }; /** @internal */ export const CChainSharedAssetBalance$outboundSchema: z.ZodType< - CChainSharedAssetBalance$Outbound, - z.ZodTypeDef, - CChainSharedAssetBalance + CChainSharedAssetBalance$Outbound, + z.ZodTypeDef, + CChainSharedAssetBalance > = z.object({ - assetId: z.string(), - name: z.string(), - symbol: z.string(), - denomination: z.number(), - type: PrimaryNetworkAssetType$outboundSchema, - amount: z.string(), - utxoCount: z.number(), - sharedWithChainId: z.string(), + assetId: z.string(), + name: z.string(), + symbol: z.string(), + denomination: z.number(), + type: PrimaryNetworkAssetType$outboundSchema, + amount: z.string(), + utxoCount: z.number(), + sharedWithChainId: z.string(), }); /** @@ -87,10 +87,10 @@ export const CChainSharedAssetBalance$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CChainSharedAssetBalance$ { - /** @deprecated use `CChainSharedAssetBalance$inboundSchema` instead. */ - export const inboundSchema = CChainSharedAssetBalance$inboundSchema; - /** @deprecated use `CChainSharedAssetBalance$outboundSchema` instead. */ - export const outboundSchema = CChainSharedAssetBalance$outboundSchema; - /** @deprecated use `CChainSharedAssetBalance$Outbound` instead. */ - export type Outbound = CChainSharedAssetBalance$Outbound; + /** @deprecated use `CChainSharedAssetBalance$inboundSchema` instead. */ + export const inboundSchema = CChainSharedAssetBalance$inboundSchema; + /** @deprecated use `CChainSharedAssetBalance$outboundSchema` instead. */ + export const outboundSchema = CChainSharedAssetBalance$outboundSchema; + /** @deprecated use `CChainSharedAssetBalance$Outbound` instead. */ + export type Outbound = CChainSharedAssetBalance$Outbound; } diff --git a/src/models/components/chain.ts b/src/models/components/chain.ts index b197682..fb1d4ee 100644 --- a/src/models/components/chain.ts +++ b/src/models/components/chain.ts @@ -2,58 +2,63 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - NetworkType, - NetworkType$inboundSchema, - NetworkType$outboundSchema, + NetworkType, + NetworkType$inboundSchema, + NetworkType$outboundSchema, } from "./networktype.js"; -import * as z from "zod"; export type Chain = { - /** - * EVM ChainID for the blockchain. - */ - evmChainId: number; - /** - * Blockchain alias for easy identification of blockchains. - */ - chainName: string; - /** - * Unique blockchain ID for this blockchain. - */ - blockchainId: string; - /** - * Subnet ID this blockchain belongs to. - */ - subnetId: string; - network: NetworkType; + /** + * EVM ChainID for the blockchain. + */ + evmChainId: number; + /** + * Blockchain alias for easy identification of blockchains. + */ + chainName: string; + /** + * Unique blockchain ID for this blockchain. + */ + blockchainId: string; + /** + * Subnet ID this blockchain belongs to. + */ + subnetId: string; + network: NetworkType; }; /** @internal */ -export const Chain$inboundSchema: z.ZodType = z.object({ +export const Chain$inboundSchema: z.ZodType = z + .object({ evmChainId: z.number(), chainName: z.string(), blockchainId: z.string(), subnetId: z.string(), network: NetworkType$inboundSchema, -}); + }); /** @internal */ export type Chain$Outbound = { - evmChainId: number; - chainName: string; - blockchainId: string; - subnetId: string; - network: string; + evmChainId: number; + chainName: string; + blockchainId: string; + subnetId: string; + network: string; }; /** @internal */ -export const Chain$outboundSchema: z.ZodType = z.object({ - evmChainId: z.number(), - chainName: z.string(), - blockchainId: z.string(), - subnetId: z.string(), - network: NetworkType$outboundSchema, +export const Chain$outboundSchema: z.ZodType< + Chain$Outbound, + z.ZodTypeDef, + Chain +> = z.object({ + evmChainId: z.number(), + chainName: z.string(), + blockchainId: z.string(), + subnetId: z.string(), + network: NetworkType$outboundSchema, }); /** @@ -61,10 +66,10 @@ export const Chain$outboundSchema: z.ZodType; + address: string; + blockchainIds: Array; }; /** @internal */ export const ChainAddressChainIdMap$inboundSchema: z.ZodType< - ChainAddressChainIdMap, - z.ZodTypeDef, - unknown + ChainAddressChainIdMap, + z.ZodTypeDef, + unknown > = z.object({ - address: z.string(), - blockchainIds: z.array(BlockchainIds$inboundSchema), + address: z.string(), + blockchainIds: z.array(BlockchainIds$inboundSchema), }); /** @internal */ export type ChainAddressChainIdMap$Outbound = { - address: string; - blockchainIds: Array; + address: string; + blockchainIds: Array; }; /** @internal */ export const ChainAddressChainIdMap$outboundSchema: z.ZodType< - ChainAddressChainIdMap$Outbound, - z.ZodTypeDef, - ChainAddressChainIdMap + ChainAddressChainIdMap$Outbound, + z.ZodTypeDef, + ChainAddressChainIdMap > = z.object({ - address: z.string(), - blockchainIds: z.array(BlockchainIds$outboundSchema), + address: z.string(), + blockchainIds: z.array(BlockchainIds$outboundSchema), }); /** @@ -45,10 +45,10 @@ export const ChainAddressChainIdMap$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ChainAddressChainIdMap$ { - /** @deprecated use `ChainAddressChainIdMap$inboundSchema` instead. */ - export const inboundSchema = ChainAddressChainIdMap$inboundSchema; - /** @deprecated use `ChainAddressChainIdMap$outboundSchema` instead. */ - export const outboundSchema = ChainAddressChainIdMap$outboundSchema; - /** @deprecated use `ChainAddressChainIdMap$Outbound` instead. */ - export type Outbound = ChainAddressChainIdMap$Outbound; + /** @deprecated use `ChainAddressChainIdMap$inboundSchema` instead. */ + export const inboundSchema = ChainAddressChainIdMap$inboundSchema; + /** @deprecated use `ChainAddressChainIdMap$outboundSchema` instead. */ + export const outboundSchema = ChainAddressChainIdMap$outboundSchema; + /** @deprecated use `ChainAddressChainIdMap$Outbound` instead. */ + export type Outbound = ChainAddressChainIdMap$Outbound; } diff --git a/src/models/components/chainaddresschainidmaplistresponse.ts b/src/models/components/chainaddresschainidmaplistresponse.ts index 19b3f6b..cee82aa 100644 --- a/src/models/components/chainaddresschainidmaplistresponse.ts +++ b/src/models/components/chainaddresschainidmaplistresponse.ts @@ -2,39 +2,39 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - ChainAddressChainIdMap, - ChainAddressChainIdMap$inboundSchema, - ChainAddressChainIdMap$Outbound, - ChainAddressChainIdMap$outboundSchema, + ChainAddressChainIdMap, + ChainAddressChainIdMap$inboundSchema, + ChainAddressChainIdMap$Outbound, + ChainAddressChainIdMap$outboundSchema, } from "./chainaddresschainidmap.js"; -import * as z from "zod"; export type ChainAddressChainIdMapListResponse = { - addresses: Array; + addresses: Array; }; /** @internal */ export const ChainAddressChainIdMapListResponse$inboundSchema: z.ZodType< - ChainAddressChainIdMapListResponse, - z.ZodTypeDef, - unknown + ChainAddressChainIdMapListResponse, + z.ZodTypeDef, + unknown > = z.object({ - addresses: z.array(ChainAddressChainIdMap$inboundSchema), + addresses: z.array(ChainAddressChainIdMap$inboundSchema), }); /** @internal */ export type ChainAddressChainIdMapListResponse$Outbound = { - addresses: Array; + addresses: Array; }; /** @internal */ export const ChainAddressChainIdMapListResponse$outboundSchema: z.ZodType< - ChainAddressChainIdMapListResponse$Outbound, - z.ZodTypeDef, - ChainAddressChainIdMapListResponse + ChainAddressChainIdMapListResponse$Outbound, + z.ZodTypeDef, + ChainAddressChainIdMapListResponse > = z.object({ - addresses: z.array(ChainAddressChainIdMap$outboundSchema), + addresses: z.array(ChainAddressChainIdMap$outboundSchema), }); /** @@ -42,10 +42,11 @@ export const ChainAddressChainIdMapListResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ChainAddressChainIdMapListResponse$ { - /** @deprecated use `ChainAddressChainIdMapListResponse$inboundSchema` instead. */ - export const inboundSchema = ChainAddressChainIdMapListResponse$inboundSchema; - /** @deprecated use `ChainAddressChainIdMapListResponse$outboundSchema` instead. */ - export const outboundSchema = ChainAddressChainIdMapListResponse$outboundSchema; - /** @deprecated use `ChainAddressChainIdMapListResponse$Outbound` instead. */ - export type Outbound = ChainAddressChainIdMapListResponse$Outbound; + /** @deprecated use `ChainAddressChainIdMapListResponse$inboundSchema` instead. */ + export const inboundSchema = ChainAddressChainIdMapListResponse$inboundSchema; + /** @deprecated use `ChainAddressChainIdMapListResponse$outboundSchema` instead. */ + export const outboundSchema = + ChainAddressChainIdMapListResponse$outboundSchema; + /** @deprecated use `ChainAddressChainIdMapListResponse$Outbound` instead. */ + export type Outbound = ChainAddressChainIdMapListResponse$Outbound; } diff --git a/src/models/components/chaininfo.ts b/src/models/components/chaininfo.ts index e185a6f..544654a 100644 --- a/src/models/components/chaininfo.ts +++ b/src/models/components/chaininfo.ts @@ -2,148 +2,162 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - ChainStatus, - ChainStatus$inboundSchema, - ChainStatus$outboundSchema, + ChainStatus, + ChainStatus$inboundSchema, + ChainStatus$outboundSchema, } from "./chainstatus.js"; import { - NetworkToken, - NetworkToken$inboundSchema, - NetworkToken$Outbound, - NetworkToken$outboundSchema, + NetworkToken, + NetworkToken$inboundSchema, + NetworkToken$Outbound, + NetworkToken$outboundSchema, } from "./networktoken.js"; import { - UtilityAddresses, - UtilityAddresses$inboundSchema, - UtilityAddresses$Outbound, - UtilityAddresses$outboundSchema, + UtilityAddresses, + UtilityAddresses$inboundSchema, + UtilityAddresses$Outbound, + UtilityAddresses$outboundSchema, } from "./utilityaddresses.js"; -import { VmName, VmName$inboundSchema, VmName$outboundSchema } from "./vmname.js"; -import * as z from "zod"; +import { + VmName, + VmName$inboundSchema, + VmName$outboundSchema, +} from "./vmname.js"; export const EnabledFeatures = { - NftIndexing: "nftIndexing", - Webhooks: "webhooks", + NftIndexing: "nftIndexing", + Webhooks: "webhooks", + Teleporter: "teleporter", } as const; export type EnabledFeatures = ClosedEnum; export type ChainInfo = { - chainId: string; - /** - * Status of chain nodes. Chain nodes can become temporarily `UNAVAILABLE` for several reasons, such as validator stake falling below threshold. If chain nodes are `UNAVAILABLE`, requests that rely on data from the chain nodes may return 503 errors. - */ - status: ChainStatus; - chainName: string; - description: string; - platformChainId?: string | undefined; - subnetId?: string | undefined; - vmId?: string | undefined; - vmName: VmName; - explorerUrl?: string | undefined; - rpcUrl: string; - wsUrl?: string | undefined; - isTestnet: boolean; - utilityAddresses?: UtilityAddresses | undefined; - networkToken: NetworkToken; - chainLogoUri?: string | undefined; - private?: boolean | undefined; - enabledFeatures?: Array | undefined; + chainId: string; + /** + * Status of chain nodes. Chain nodes can become temporarily `UNAVAILABLE` for several reasons, such as validator stake falling below threshold. If chain nodes are `UNAVAILABLE`, requests that rely on data from the chain nodes may return 503 errors. + */ + status: ChainStatus; + chainName: string; + description: string; + platformChainId?: string | undefined; + subnetId?: string | undefined; + vmId?: string | undefined; + vmName: VmName; + explorerUrl?: string | undefined; + rpcUrl: string; + wsUrl?: string | undefined; + isTestnet: boolean; + utilityAddresses?: UtilityAddresses | undefined; + networkToken: NetworkToken; + chainLogoUri?: string | undefined; + private?: boolean | undefined; + enabledFeatures?: Array | undefined; }; /** @internal */ -export const EnabledFeatures$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(EnabledFeatures); +export const EnabledFeatures$inboundSchema: z.ZodNativeEnum< + typeof EnabledFeatures +> = z.nativeEnum(EnabledFeatures); /** @internal */ -export const EnabledFeatures$outboundSchema: z.ZodNativeEnum = - EnabledFeatures$inboundSchema; +export const EnabledFeatures$outboundSchema: z.ZodNativeEnum< + typeof EnabledFeatures +> = EnabledFeatures$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EnabledFeatures$ { - /** @deprecated use `EnabledFeatures$inboundSchema` instead. */ - export const inboundSchema = EnabledFeatures$inboundSchema; - /** @deprecated use `EnabledFeatures$outboundSchema` instead. */ - export const outboundSchema = EnabledFeatures$outboundSchema; + /** @deprecated use `EnabledFeatures$inboundSchema` instead. */ + export const inboundSchema = EnabledFeatures$inboundSchema; + /** @deprecated use `EnabledFeatures$outboundSchema` instead. */ + export const outboundSchema = EnabledFeatures$outboundSchema; } /** @internal */ -export const ChainInfo$inboundSchema: z.ZodType = z.object({ - chainId: z.string(), - status: ChainStatus$inboundSchema, - chainName: z.string(), - description: z.string(), - platformChainId: z.string().optional(), - subnetId: z.string().optional(), - vmId: z.string().optional(), - vmName: VmName$inboundSchema, - explorerUrl: z.string().optional(), - rpcUrl: z.string(), - wsUrl: z.string().optional(), - isTestnet: z.boolean(), - utilityAddresses: UtilityAddresses$inboundSchema.optional(), - networkToken: NetworkToken$inboundSchema, - chainLogoUri: z.string().optional(), - private: z.boolean().optional(), - enabledFeatures: z.array(EnabledFeatures$inboundSchema).optional(), +export const ChainInfo$inboundSchema: z.ZodType< + ChainInfo, + z.ZodTypeDef, + unknown +> = z.object({ + chainId: z.string(), + status: ChainStatus$inboundSchema, + chainName: z.string(), + description: z.string(), + platformChainId: z.string().optional(), + subnetId: z.string().optional(), + vmId: z.string().optional(), + vmName: VmName$inboundSchema, + explorerUrl: z.string().optional(), + rpcUrl: z.string(), + wsUrl: z.string().optional(), + isTestnet: z.boolean(), + utilityAddresses: UtilityAddresses$inboundSchema.optional(), + networkToken: NetworkToken$inboundSchema, + chainLogoUri: z.string().optional(), + private: z.boolean().optional(), + enabledFeatures: z.array(EnabledFeatures$inboundSchema).optional(), }); /** @internal */ export type ChainInfo$Outbound = { - chainId: string; - status: string; - chainName: string; - description: string; - platformChainId?: string | undefined; - subnetId?: string | undefined; - vmId?: string | undefined; - vmName: string; - explorerUrl?: string | undefined; - rpcUrl: string; - wsUrl?: string | undefined; - isTestnet: boolean; - utilityAddresses?: UtilityAddresses$Outbound | undefined; - networkToken: NetworkToken$Outbound; - chainLogoUri?: string | undefined; - private?: boolean | undefined; - enabledFeatures?: Array | undefined; + chainId: string; + status: string; + chainName: string; + description: string; + platformChainId?: string | undefined; + subnetId?: string | undefined; + vmId?: string | undefined; + vmName: string; + explorerUrl?: string | undefined; + rpcUrl: string; + wsUrl?: string | undefined; + isTestnet: boolean; + utilityAddresses?: UtilityAddresses$Outbound | undefined; + networkToken: NetworkToken$Outbound; + chainLogoUri?: string | undefined; + private?: boolean | undefined; + enabledFeatures?: Array | undefined; }; /** @internal */ -export const ChainInfo$outboundSchema: z.ZodType = - z.object({ - chainId: z.string(), - status: ChainStatus$outboundSchema, - chainName: z.string(), - description: z.string(), - platformChainId: z.string().optional(), - subnetId: z.string().optional(), - vmId: z.string().optional(), - vmName: VmName$outboundSchema, - explorerUrl: z.string().optional(), - rpcUrl: z.string(), - wsUrl: z.string().optional(), - isTestnet: z.boolean(), - utilityAddresses: UtilityAddresses$outboundSchema.optional(), - networkToken: NetworkToken$outboundSchema, - chainLogoUri: z.string().optional(), - private: z.boolean().optional(), - enabledFeatures: z.array(EnabledFeatures$outboundSchema).optional(), - }); +export const ChainInfo$outboundSchema: z.ZodType< + ChainInfo$Outbound, + z.ZodTypeDef, + ChainInfo +> = z.object({ + chainId: z.string(), + status: ChainStatus$outboundSchema, + chainName: z.string(), + description: z.string(), + platformChainId: z.string().optional(), + subnetId: z.string().optional(), + vmId: z.string().optional(), + vmName: VmName$outboundSchema, + explorerUrl: z.string().optional(), + rpcUrl: z.string(), + wsUrl: z.string().optional(), + isTestnet: z.boolean(), + utilityAddresses: UtilityAddresses$outboundSchema.optional(), + networkToken: NetworkToken$outboundSchema, + chainLogoUri: z.string().optional(), + private: z.boolean().optional(), + enabledFeatures: z.array(EnabledFeatures$outboundSchema).optional(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ChainInfo$ { - /** @deprecated use `ChainInfo$inboundSchema` instead. */ - export const inboundSchema = ChainInfo$inboundSchema; - /** @deprecated use `ChainInfo$outboundSchema` instead. */ - export const outboundSchema = ChainInfo$outboundSchema; - /** @deprecated use `ChainInfo$Outbound` instead. */ - export type Outbound = ChainInfo$Outbound; + /** @deprecated use `ChainInfo$inboundSchema` instead. */ + export const inboundSchema = ChainInfo$inboundSchema; + /** @deprecated use `ChainInfo$outboundSchema` instead. */ + export const outboundSchema = ChainInfo$outboundSchema; + /** @deprecated use `ChainInfo$Outbound` instead. */ + export type Outbound = ChainInfo$Outbound; } diff --git a/src/models/components/chainmetric.ts b/src/models/components/chainmetric.ts index d790f3c..6fb28a3 100644 --- a/src/models/components/chainmetric.ts +++ b/src/models/components/chainmetric.ts @@ -2,42 +2,42 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const ChainMetric = { - ActiveAddresses: "activeAddresses", - ActiveSenders: "activeSenders", - CumulativeTxCount: "cumulativeTxCount", - CumulativeAddresses: "cumulativeAddresses", - CumulativeContracts: "cumulativeContracts", - CumulativeDeployers: "cumulativeDeployers", - GasUsed: "gasUsed", - TxCount: "txCount", - AvgGps: "avgGps", - MaxGps: "maxGps", - AvgTps: "avgTps", - MaxTps: "maxTps", - AvgGasPrice: "avgGasPrice", - MaxGasPrice: "maxGasPrice", + ActiveAddresses: "activeAddresses", + ActiveSenders: "activeSenders", + CumulativeTxCount: "cumulativeTxCount", + CumulativeAddresses: "cumulativeAddresses", + CumulativeContracts: "cumulativeContracts", + CumulativeDeployers: "cumulativeDeployers", + GasUsed: "gasUsed", + TxCount: "txCount", + AvgGps: "avgGps", + MaxGps: "maxGps", + AvgTps: "avgTps", + MaxTps: "maxTps", + AvgGasPrice: "avgGasPrice", + MaxGasPrice: "maxGasPrice", } as const; export type ChainMetric = ClosedEnum; /** @internal */ -export const ChainMetric$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(ChainMetric); +export const ChainMetric$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(ChainMetric); /** @internal */ export const ChainMetric$outboundSchema: z.ZodNativeEnum = - ChainMetric$inboundSchema; + ChainMetric$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ChainMetric$ { - /** @deprecated use `ChainMetric$inboundSchema` instead. */ - export const inboundSchema = ChainMetric$inboundSchema; - /** @deprecated use `ChainMetric$outboundSchema` instead. */ - export const outboundSchema = ChainMetric$outboundSchema; + /** @deprecated use `ChainMetric$inboundSchema` instead. */ + export const inboundSchema = ChainMetric$inboundSchema; + /** @deprecated use `ChainMetric$outboundSchema` instead. */ + export const outboundSchema = ChainMetric$outboundSchema; } diff --git a/src/models/components/chainrollingwindowmetric.ts b/src/models/components/chainrollingwindowmetric.ts index ff39b4d..481932f 100644 --- a/src/models/components/chainrollingwindowmetric.ts +++ b/src/models/components/chainrollingwindowmetric.ts @@ -2,29 +2,31 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const ChainRollingWindowMetric = { - GasUsed: "gasUsed", - TxCount: "txCount", - AvgGps: "avgGps", - MaxGps: "maxGps", - AvgTps: "avgTps", - MaxTps: "maxTps", - AvgGasPrice: "avgGasPrice", - MaxGasPrice: "maxGasPrice", + GasUsed: "gasUsed", + TxCount: "txCount", + AvgGps: "avgGps", + MaxGps: "maxGps", + AvgTps: "avgTps", + MaxTps: "maxTps", + AvgGasPrice: "avgGasPrice", + MaxGasPrice: "maxGasPrice", } as const; -export type ChainRollingWindowMetric = ClosedEnum; +export type ChainRollingWindowMetric = ClosedEnum< + typeof ChainRollingWindowMetric +>; /** @internal */ export const ChainRollingWindowMetric$inboundSchema: z.ZodNativeEnum< - typeof ChainRollingWindowMetric + typeof ChainRollingWindowMetric > = z.nativeEnum(ChainRollingWindowMetric); /** @internal */ export const ChainRollingWindowMetric$outboundSchema: z.ZodNativeEnum< - typeof ChainRollingWindowMetric + typeof ChainRollingWindowMetric > = ChainRollingWindowMetric$inboundSchema; /** @@ -32,8 +34,8 @@ export const ChainRollingWindowMetric$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ChainRollingWindowMetric$ { - /** @deprecated use `ChainRollingWindowMetric$inboundSchema` instead. */ - export const inboundSchema = ChainRollingWindowMetric$inboundSchema; - /** @deprecated use `ChainRollingWindowMetric$outboundSchema` instead. */ - export const outboundSchema = ChainRollingWindowMetric$outboundSchema; + /** @deprecated use `ChainRollingWindowMetric$inboundSchema` instead. */ + export const inboundSchema = ChainRollingWindowMetric$inboundSchema; + /** @deprecated use `ChainRollingWindowMetric$outboundSchema` instead. */ + export const outboundSchema = ChainRollingWindowMetric$outboundSchema; } diff --git a/src/models/components/chainrollingwindowmetricsvalue.ts b/src/models/components/chainrollingwindowmetricsvalue.ts index e8dbe0a..d8ca995 100644 --- a/src/models/components/chainrollingwindowmetricsvalue.ts +++ b/src/models/components/chainrollingwindowmetricsvalue.ts @@ -5,61 +5,61 @@ import * as z from "zod"; export type ChainRollingWindowMetricsValue = { - /** - * Aggregated value for the current metrics in last hour. - */ - lastHour: number; - /** - * Aggregated value for the current metrics in last day. - */ - lastDay: number; - /** - * Aggregated value for the current metrics in last month. - */ - lastMonth: number; - /** - * Aggregated value for the current metrics in last year. - */ - lastYear: number; - /** - * Aggregated value for the current metrics for all time. - */ - allTime: number; + /** + * Aggregated value for the current metrics in last hour. + */ + lastHour: number; + /** + * Aggregated value for the current metrics in last day. + */ + lastDay: number; + /** + * Aggregated value for the current metrics in last month. + */ + lastMonth: number; + /** + * Aggregated value for the current metrics in last year. + */ + lastYear: number; + /** + * Aggregated value for the current metrics for all time. + */ + allTime: number; }; /** @internal */ export const ChainRollingWindowMetricsValue$inboundSchema: z.ZodType< - ChainRollingWindowMetricsValue, - z.ZodTypeDef, - unknown + ChainRollingWindowMetricsValue, + z.ZodTypeDef, + unknown > = z.object({ - lastHour: z.number(), - lastDay: z.number(), - lastMonth: z.number(), - lastYear: z.number(), - allTime: z.number(), + lastHour: z.number(), + lastDay: z.number(), + lastMonth: z.number(), + lastYear: z.number(), + allTime: z.number(), }); /** @internal */ export type ChainRollingWindowMetricsValue$Outbound = { - lastHour: number; - lastDay: number; - lastMonth: number; - lastYear: number; - allTime: number; + lastHour: number; + lastDay: number; + lastMonth: number; + lastYear: number; + allTime: number; }; /** @internal */ export const ChainRollingWindowMetricsValue$outboundSchema: z.ZodType< - ChainRollingWindowMetricsValue$Outbound, - z.ZodTypeDef, - ChainRollingWindowMetricsValue + ChainRollingWindowMetricsValue$Outbound, + z.ZodTypeDef, + ChainRollingWindowMetricsValue > = z.object({ - lastHour: z.number(), - lastDay: z.number(), - lastMonth: z.number(), - lastYear: z.number(), - allTime: z.number(), + lastHour: z.number(), + lastDay: z.number(), + lastMonth: z.number(), + lastYear: z.number(), + allTime: z.number(), }); /** @@ -67,10 +67,10 @@ export const ChainRollingWindowMetricsValue$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ChainRollingWindowMetricsValue$ { - /** @deprecated use `ChainRollingWindowMetricsValue$inboundSchema` instead. */ - export const inboundSchema = ChainRollingWindowMetricsValue$inboundSchema; - /** @deprecated use `ChainRollingWindowMetricsValue$outboundSchema` instead. */ - export const outboundSchema = ChainRollingWindowMetricsValue$outboundSchema; - /** @deprecated use `ChainRollingWindowMetricsValue$Outbound` instead. */ - export type Outbound = ChainRollingWindowMetricsValue$Outbound; + /** @deprecated use `ChainRollingWindowMetricsValue$inboundSchema` instead. */ + export const inboundSchema = ChainRollingWindowMetricsValue$inboundSchema; + /** @deprecated use `ChainRollingWindowMetricsValue$outboundSchema` instead. */ + export const outboundSchema = ChainRollingWindowMetricsValue$outboundSchema; + /** @deprecated use `ChainRollingWindowMetricsValue$Outbound` instead. */ + export type Outbound = ChainRollingWindowMetricsValue$Outbound; } diff --git a/src/models/components/chainstatus.ts b/src/models/components/chainstatus.ts index ad85026..63b7087 100644 --- a/src/models/components/chainstatus.ts +++ b/src/models/components/chainstatus.ts @@ -2,15 +2,15 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * Status of chain nodes. Chain nodes can become temporarily `UNAVAILABLE` for several reasons, such as validator stake falling below threshold. If chain nodes are `UNAVAILABLE`, requests that rely on data from the chain nodes may return 503 errors. */ export const ChainStatus = { - Ok: "OK", - Unavailable: "UNAVAILABLE", + Ok: "OK", + Unavailable: "UNAVAILABLE", } as const; /** * Status of chain nodes. Chain nodes can become temporarily `UNAVAILABLE` for several reasons, such as validator stake falling below threshold. If chain nodes are `UNAVAILABLE`, requests that rely on data from the chain nodes may return 503 errors. @@ -18,20 +18,20 @@ export const ChainStatus = { export type ChainStatus = ClosedEnum; /** @internal */ -export const ChainStatus$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(ChainStatus); +export const ChainStatus$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(ChainStatus); /** @internal */ export const ChainStatus$outboundSchema: z.ZodNativeEnum = - ChainStatus$inboundSchema; + ChainStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ChainStatus$ { - /** @deprecated use `ChainStatus$inboundSchema` instead. */ - export const inboundSchema = ChainStatus$inboundSchema; - /** @deprecated use `ChainStatus$outboundSchema` instead. */ - export const outboundSchema = ChainStatus$outboundSchema; + /** @deprecated use `ChainStatus$inboundSchema` instead. */ + export const inboundSchema = ChainStatus$inboundSchema; + /** @deprecated use `ChainStatus$outboundSchema` instead. */ + export const outboundSchema = ChainStatus$outboundSchema; } diff --git a/src/models/components/completeddelegatordetails.ts b/src/models/components/completeddelegatordetails.ts index 153101b..fd304f8 100644 --- a/src/models/components/completeddelegatordetails.ts +++ b/src/models/components/completeddelegatordetails.ts @@ -2,94 +2,96 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const DelegationStatus = { - Completed: "completed", + Completed: "completed", } as const; export type DelegationStatus = ClosedEnum; export type CompletedDelegatorDetails = { - txHash: string; - nodeId: string; - rewardAddresses: Array; - amountDelegated: string; - delegationFee: string; - startTimestamp: number; - endTimestamp: number; - grossReward: string; - netReward: string; - delegationStatus: DelegationStatus; + txHash: string; + nodeId: string; + rewardAddresses: Array; + amountDelegated: string; + delegationFee: string; + startTimestamp: number; + endTimestamp: number; + grossReward: string; + netReward: string; + delegationStatus: DelegationStatus; }; /** @internal */ -export const DelegationStatus$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(DelegationStatus); +export const DelegationStatus$inboundSchema: z.ZodNativeEnum< + typeof DelegationStatus +> = z.nativeEnum(DelegationStatus); /** @internal */ -export const DelegationStatus$outboundSchema: z.ZodNativeEnum = - DelegationStatus$inboundSchema; +export const DelegationStatus$outboundSchema: z.ZodNativeEnum< + typeof DelegationStatus +> = DelegationStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DelegationStatus$ { - /** @deprecated use `DelegationStatus$inboundSchema` instead. */ - export const inboundSchema = DelegationStatus$inboundSchema; - /** @deprecated use `DelegationStatus$outboundSchema` instead. */ - export const outboundSchema = DelegationStatus$outboundSchema; + /** @deprecated use `DelegationStatus$inboundSchema` instead. */ + export const inboundSchema = DelegationStatus$inboundSchema; + /** @deprecated use `DelegationStatus$outboundSchema` instead. */ + export const outboundSchema = DelegationStatus$outboundSchema; } /** @internal */ export const CompletedDelegatorDetails$inboundSchema: z.ZodType< - CompletedDelegatorDetails, - z.ZodTypeDef, - unknown + CompletedDelegatorDetails, + z.ZodTypeDef, + unknown > = z.object({ - txHash: z.string(), - nodeId: z.string(), - rewardAddresses: z.array(z.string()), - amountDelegated: z.string(), - delegationFee: z.string(), - startTimestamp: z.number(), - endTimestamp: z.number(), - grossReward: z.string(), - netReward: z.string(), - delegationStatus: DelegationStatus$inboundSchema, + txHash: z.string(), + nodeId: z.string(), + rewardAddresses: z.array(z.string()), + amountDelegated: z.string(), + delegationFee: z.string(), + startTimestamp: z.number(), + endTimestamp: z.number(), + grossReward: z.string(), + netReward: z.string(), + delegationStatus: DelegationStatus$inboundSchema, }); /** @internal */ export type CompletedDelegatorDetails$Outbound = { - txHash: string; - nodeId: string; - rewardAddresses: Array; - amountDelegated: string; - delegationFee: string; - startTimestamp: number; - endTimestamp: number; - grossReward: string; - netReward: string; - delegationStatus: string; + txHash: string; + nodeId: string; + rewardAddresses: Array; + amountDelegated: string; + delegationFee: string; + startTimestamp: number; + endTimestamp: number; + grossReward: string; + netReward: string; + delegationStatus: string; }; /** @internal */ export const CompletedDelegatorDetails$outboundSchema: z.ZodType< - CompletedDelegatorDetails$Outbound, - z.ZodTypeDef, - CompletedDelegatorDetails + CompletedDelegatorDetails$Outbound, + z.ZodTypeDef, + CompletedDelegatorDetails > = z.object({ - txHash: z.string(), - nodeId: z.string(), - rewardAddresses: z.array(z.string()), - amountDelegated: z.string(), - delegationFee: z.string(), - startTimestamp: z.number(), - endTimestamp: z.number(), - grossReward: z.string(), - netReward: z.string(), - delegationStatus: DelegationStatus$outboundSchema, + txHash: z.string(), + nodeId: z.string(), + rewardAddresses: z.array(z.string()), + amountDelegated: z.string(), + delegationFee: z.string(), + startTimestamp: z.number(), + endTimestamp: z.number(), + grossReward: z.string(), + netReward: z.string(), + delegationStatus: DelegationStatus$outboundSchema, }); /** @@ -97,10 +99,10 @@ export const CompletedDelegatorDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CompletedDelegatorDetails$ { - /** @deprecated use `CompletedDelegatorDetails$inboundSchema` instead. */ - export const inboundSchema = CompletedDelegatorDetails$inboundSchema; - /** @deprecated use `CompletedDelegatorDetails$outboundSchema` instead. */ - export const outboundSchema = CompletedDelegatorDetails$outboundSchema; - /** @deprecated use `CompletedDelegatorDetails$Outbound` instead. */ - export type Outbound = CompletedDelegatorDetails$Outbound; + /** @deprecated use `CompletedDelegatorDetails$inboundSchema` instead. */ + export const inboundSchema = CompletedDelegatorDetails$inboundSchema; + /** @deprecated use `CompletedDelegatorDetails$outboundSchema` instead. */ + export const outboundSchema = CompletedDelegatorDetails$outboundSchema; + /** @deprecated use `CompletedDelegatorDetails$Outbound` instead. */ + export type Outbound = CompletedDelegatorDetails$Outbound; } diff --git a/src/models/components/completedvalidatordetails.ts b/src/models/components/completedvalidatordetails.ts index 49d9553..e79d988 100644 --- a/src/models/components/completedvalidatordetails.ts +++ b/src/models/components/completedvalidatordetails.ts @@ -2,113 +2,115 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - BlsCredentials, - BlsCredentials$inboundSchema, - BlsCredentials$Outbound, - BlsCredentials$outboundSchema, + BlsCredentials, + BlsCredentials$inboundSchema, + BlsCredentials$Outbound, + BlsCredentials$outboundSchema, } from "./blscredentials.js"; import { - Rewards, - Rewards$inboundSchema, - Rewards$Outbound, - Rewards$outboundSchema, + Rewards, + Rewards$inboundSchema, + Rewards$Outbound, + Rewards$outboundSchema, } from "./rewards.js"; -import * as z from "zod"; export const ValidationStatus = { - Completed: "completed", + Completed: "completed", } as const; export type ValidationStatus = ClosedEnum; export type CompletedValidatorDetails = { - txHash: string; - nodeId: string; - subnetId: string; - amountStaked: string; - delegationFee?: string | undefined; - startTimestamp: number; - endTimestamp: number; - /** - * Present for AddPermissionlessValidatorTx - */ - blsCredentials?: BlsCredentials | undefined; - delegatorCount: number; - rewards: Rewards; - validationStatus: ValidationStatus; + txHash: string; + nodeId: string; + subnetId: string; + amountStaked: string; + delegationFee?: string | undefined; + startTimestamp: number; + endTimestamp: number; + /** + * Present for AddPermissionlessValidatorTx + */ + blsCredentials?: BlsCredentials | undefined; + delegatorCount: number; + rewards: Rewards; + validationStatus: ValidationStatus; }; /** @internal */ -export const ValidationStatus$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(ValidationStatus); +export const ValidationStatus$inboundSchema: z.ZodNativeEnum< + typeof ValidationStatus +> = z.nativeEnum(ValidationStatus); /** @internal */ -export const ValidationStatus$outboundSchema: z.ZodNativeEnum = - ValidationStatus$inboundSchema; +export const ValidationStatus$outboundSchema: z.ZodNativeEnum< + typeof ValidationStatus +> = ValidationStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ValidationStatus$ { - /** @deprecated use `ValidationStatus$inboundSchema` instead. */ - export const inboundSchema = ValidationStatus$inboundSchema; - /** @deprecated use `ValidationStatus$outboundSchema` instead. */ - export const outboundSchema = ValidationStatus$outboundSchema; + /** @deprecated use `ValidationStatus$inboundSchema` instead. */ + export const inboundSchema = ValidationStatus$inboundSchema; + /** @deprecated use `ValidationStatus$outboundSchema` instead. */ + export const outboundSchema = ValidationStatus$outboundSchema; } /** @internal */ export const CompletedValidatorDetails$inboundSchema: z.ZodType< - CompletedValidatorDetails, - z.ZodTypeDef, - unknown + CompletedValidatorDetails, + z.ZodTypeDef, + unknown > = z.object({ - txHash: z.string(), - nodeId: z.string(), - subnetId: z.string(), - amountStaked: z.string(), - delegationFee: z.string().optional(), - startTimestamp: z.number(), - endTimestamp: z.number(), - blsCredentials: BlsCredentials$inboundSchema.optional(), - delegatorCount: z.number(), - rewards: Rewards$inboundSchema, - validationStatus: ValidationStatus$inboundSchema, + txHash: z.string(), + nodeId: z.string(), + subnetId: z.string(), + amountStaked: z.string(), + delegationFee: z.string().optional(), + startTimestamp: z.number(), + endTimestamp: z.number(), + blsCredentials: BlsCredentials$inboundSchema.optional(), + delegatorCount: z.number(), + rewards: Rewards$inboundSchema, + validationStatus: ValidationStatus$inboundSchema, }); /** @internal */ export type CompletedValidatorDetails$Outbound = { - txHash: string; - nodeId: string; - subnetId: string; - amountStaked: string; - delegationFee?: string | undefined; - startTimestamp: number; - endTimestamp: number; - blsCredentials?: BlsCredentials$Outbound | undefined; - delegatorCount: number; - rewards: Rewards$Outbound; - validationStatus: string; + txHash: string; + nodeId: string; + subnetId: string; + amountStaked: string; + delegationFee?: string | undefined; + startTimestamp: number; + endTimestamp: number; + blsCredentials?: BlsCredentials$Outbound | undefined; + delegatorCount: number; + rewards: Rewards$Outbound; + validationStatus: string; }; /** @internal */ export const CompletedValidatorDetails$outboundSchema: z.ZodType< - CompletedValidatorDetails$Outbound, - z.ZodTypeDef, - CompletedValidatorDetails + CompletedValidatorDetails$Outbound, + z.ZodTypeDef, + CompletedValidatorDetails > = z.object({ - txHash: z.string(), - nodeId: z.string(), - subnetId: z.string(), - amountStaked: z.string(), - delegationFee: z.string().optional(), - startTimestamp: z.number(), - endTimestamp: z.number(), - blsCredentials: BlsCredentials$outboundSchema.optional(), - delegatorCount: z.number(), - rewards: Rewards$outboundSchema, - validationStatus: ValidationStatus$outboundSchema, + txHash: z.string(), + nodeId: z.string(), + subnetId: z.string(), + amountStaked: z.string(), + delegationFee: z.string().optional(), + startTimestamp: z.number(), + endTimestamp: z.number(), + blsCredentials: BlsCredentials$outboundSchema.optional(), + delegatorCount: z.number(), + rewards: Rewards$outboundSchema, + validationStatus: ValidationStatus$outboundSchema, }); /** @@ -116,10 +118,10 @@ export const CompletedValidatorDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CompletedValidatorDetails$ { - /** @deprecated use `CompletedValidatorDetails$inboundSchema` instead. */ - export const inboundSchema = CompletedValidatorDetails$inboundSchema; - /** @deprecated use `CompletedValidatorDetails$outboundSchema` instead. */ - export const outboundSchema = CompletedValidatorDetails$outboundSchema; - /** @deprecated use `CompletedValidatorDetails$Outbound` instead. */ - export type Outbound = CompletedValidatorDetails$Outbound; + /** @deprecated use `CompletedValidatorDetails$inboundSchema` instead. */ + export const inboundSchema = CompletedValidatorDetails$inboundSchema; + /** @deprecated use `CompletedValidatorDetails$outboundSchema` instead. */ + export const outboundSchema = CompletedValidatorDetails$outboundSchema; + /** @deprecated use `CompletedValidatorDetails$Outbound` instead. */ + export type Outbound = CompletedValidatorDetails$Outbound; } diff --git a/src/models/components/compositequeryrequestdto.ts b/src/models/components/compositequeryrequestdto.ts index 9f30f04..6286151 100644 --- a/src/models/components/compositequeryrequestdto.ts +++ b/src/models/components/compositequeryrequestdto.ts @@ -2,70 +2,95 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - AllTimeErc20BalanceQueryDto, - AllTimeErc20BalanceQueryDto$inboundSchema, - AllTimeErc20BalanceQueryDto$Outbound, - AllTimeErc20BalanceQueryDto$outboundSchema, + AllTimeErc20BalanceQueryDto, + AllTimeErc20BalanceQueryDto$inboundSchema, + AllTimeErc20BalanceQueryDto$Outbound, + AllTimeErc20BalanceQueryDto$outboundSchema, } from "./alltimeerc20balancequerydto.js"; import { - AllTimeNativeBalanceQueryDto, - AllTimeNativeBalanceQueryDto$inboundSchema, - AllTimeNativeBalanceQueryDto$Outbound, - AllTimeNativeBalanceQueryDto$outboundSchema, + AllTimeNativeBalanceQueryDto, + AllTimeNativeBalanceQueryDto$inboundSchema, + AllTimeNativeBalanceQueryDto$Outbound, + AllTimeNativeBalanceQueryDto$outboundSchema, } from "./alltimenativebalancequerydto.js"; import { - AllTimeNftHoldersQueryDto, - AllTimeNftHoldersQueryDto$inboundSchema, - AllTimeNftHoldersQueryDto$Outbound, - AllTimeNftHoldersQueryDto$outboundSchema, + AllTimeNftHoldersQueryDto, + AllTimeNftHoldersQueryDto$inboundSchema, + AllTimeNftHoldersQueryDto$Outbound, + AllTimeNftHoldersQueryDto$outboundSchema, } from "./alltimenftholdersquerydto.js"; import { - AllTimeStarsArenaBalanceQueryDto, - AllTimeStarsArenaBalanceQueryDto$inboundSchema, - AllTimeStarsArenaBalanceQueryDto$Outbound, - AllTimeStarsArenaBalanceQueryDto$outboundSchema, + AllTimeStarsArenaBalanceQueryDto, + AllTimeStarsArenaBalanceQueryDto$inboundSchema, + AllTimeStarsArenaBalanceQueryDto$Outbound, + AllTimeStarsArenaBalanceQueryDto$outboundSchema, } from "./alltimestarsarenabalancequerydto.js"; import { - AnyTimeErc20BalanceQueryDto, - AnyTimeErc20BalanceQueryDto$inboundSchema, - AnyTimeErc20BalanceQueryDto$Outbound, - AnyTimeErc20BalanceQueryDto$outboundSchema, + AnyTimeErc20BalanceQueryDto, + AnyTimeErc20BalanceQueryDto$inboundSchema, + AnyTimeErc20BalanceQueryDto$Outbound, + AnyTimeErc20BalanceQueryDto$outboundSchema, } from "./anytimeerc20balancequerydto.js"; import { - AnyTimeNativeBalanceQueryDto, - AnyTimeNativeBalanceQueryDto$inboundSchema, - AnyTimeNativeBalanceQueryDto$Outbound, - AnyTimeNativeBalanceQueryDto$outboundSchema, + AnyTimeNativeBalanceQueryDto, + AnyTimeNativeBalanceQueryDto$inboundSchema, + AnyTimeNativeBalanceQueryDto$Outbound, + AnyTimeNativeBalanceQueryDto$outboundSchema, } from "./anytimenativebalancequerydto.js"; import { - AnyTimeNftHoldersQueryDto, - AnyTimeNftHoldersQueryDto$inboundSchema, - AnyTimeNftHoldersQueryDto$Outbound, - AnyTimeNftHoldersQueryDto$outboundSchema, + AnyTimeNftHoldersQueryDto, + AnyTimeNftHoldersQueryDto$inboundSchema, + AnyTimeNftHoldersQueryDto$Outbound, + AnyTimeNftHoldersQueryDto$outboundSchema, } from "./anytimenftholdersquerydto.js"; import { - AnyTimeStarsArenaBalanceQueryDto, - AnyTimeStarsArenaBalanceQueryDto$inboundSchema, - AnyTimeStarsArenaBalanceQueryDto$Outbound, - AnyTimeStarsArenaBalanceQueryDto$outboundSchema, + AnyTimeStarsArenaBalanceQueryDto, + AnyTimeStarsArenaBalanceQueryDto$inboundSchema, + AnyTimeStarsArenaBalanceQueryDto$Outbound, + AnyTimeStarsArenaBalanceQueryDto$outboundSchema, } from "./anytimestarsarenabalancequerydto.js"; import { - LatestBalanceQueryDto, - LatestBalanceQueryDto$inboundSchema, - LatestBalanceQueryDto$Outbound, - LatestBalanceQueryDto$outboundSchema, + LatestBalanceQueryDto, + LatestBalanceQueryDto$inboundSchema, + LatestBalanceQueryDto$Outbound, + LatestBalanceQueryDto$outboundSchema, } from "./latestbalancequerydto.js"; import { - LatestStarsArenaBalanceQueryDto, - LatestStarsArenaBalanceQueryDto$inboundSchema, - LatestStarsArenaBalanceQueryDto$Outbound, - LatestStarsArenaBalanceQueryDto$outboundSchema, + LatestStarsArenaBalanceQueryDto, + LatestStarsArenaBalanceQueryDto$inboundSchema, + LatestStarsArenaBalanceQueryDto$Outbound, + LatestStarsArenaBalanceQueryDto$outboundSchema, } from "./lateststarsarenabalancequerydto.js"; -import { Operator, Operator$inboundSchema, Operator$outboundSchema } from "./operator.js"; -import * as z from "zod"; +import { + Operator, + Operator$inboundSchema, + Operator$outboundSchema, +} from "./operator.js"; export type Queries = + | (AllTimeNativeBalanceQueryDto & { type: "AllTimeNativeBalance" }) + | (AnyTimeNativeBalanceQueryDto & { type: "AnyTimeNativeBalance" }) + | (AllTimeErc20BalanceQueryDto & { type: "AllTimeErc20Balance" }) + | (AnyTimeErc20BalanceQueryDto & { type: "AnyTimeErc20Balance" }) + | (AllTimeNftHoldersQueryDto & { type: "AllTimeNftHolders" }) + | (AnyTimeNftHoldersQueryDto & { type: "AnyTimeNftHolders" }) + | (LatestBalanceQueryDto & { type: "LatestBalance" }) + | (AllTimeStarsArenaBalanceQueryDto & { type: "AllTimeStarsArenaBalance" }) + | (AnyTimeStarsArenaBalanceQueryDto & { type: "AnyTimeStarsArenaBalance" }) + | (LatestStarsArenaBalanceQueryDto & { type: "LatestBalanceStarsArena" }); + +export type CompositeQueryRequestDto = { + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. + */ + pageSize?: number | undefined; + queries: Array< | (AllTimeNativeBalanceQueryDto & { type: "AllTimeNativeBalance" }) | (AnyTimeNativeBalanceQueryDto & { type: "AnyTimeNativeBalance" }) | (AllTimeErc20BalanceQueryDto & { type: "AllTimeErc20Balance" }) @@ -75,123 +100,141 @@ export type Queries = | (LatestBalanceQueryDto & { type: "LatestBalance" }) | (AllTimeStarsArenaBalanceQueryDto & { type: "AllTimeStarsArenaBalance" }) | (AnyTimeStarsArenaBalanceQueryDto & { type: "AnyTimeStarsArenaBalance" }) - | (LatestStarsArenaBalanceQueryDto & { type: "LatestBalanceStarsArena" }); - -export type CompositeQueryRequestDto = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. - */ - pageSize?: number | undefined; - queries: Array< - | (AllTimeNativeBalanceQueryDto & { type: "AllTimeNativeBalance" }) - | (AnyTimeNativeBalanceQueryDto & { type: "AnyTimeNativeBalance" }) - | (AllTimeErc20BalanceQueryDto & { type: "AllTimeErc20Balance" }) - | (AnyTimeErc20BalanceQueryDto & { type: "AnyTimeErc20Balance" }) - | (AllTimeNftHoldersQueryDto & { type: "AllTimeNftHolders" }) - | (AnyTimeNftHoldersQueryDto & { type: "AnyTimeNftHolders" }) - | (LatestBalanceQueryDto & { type: "LatestBalance" }) - | (AllTimeStarsArenaBalanceQueryDto & { type: "AllTimeStarsArenaBalance" }) - | (AnyTimeStarsArenaBalanceQueryDto & { type: "AnyTimeStarsArenaBalance" }) - | (LatestStarsArenaBalanceQueryDto & { type: "LatestBalanceStarsArena" }) - >; - operator: Operator; + | (LatestStarsArenaBalanceQueryDto & { type: "LatestBalanceStarsArena" }) + >; + operator: Operator; }; /** @internal */ -export const Queries$inboundSchema: z.ZodType = z.union([ +export const Queries$inboundSchema: z.ZodType = + z.union([ AllTimeNativeBalanceQueryDto$inboundSchema.and( - z.object({ type: z.literal("AllTimeNativeBalance") }).transform((v) => ({ type: v.type })) + z.object({ type: z.literal("AllTimeNativeBalance") }).transform((v) => ({ + type: v.type, + })), ), AnyTimeNativeBalanceQueryDto$inboundSchema.and( - z.object({ type: z.literal("AnyTimeNativeBalance") }).transform((v) => ({ type: v.type })) + z.object({ type: z.literal("AnyTimeNativeBalance") }).transform((v) => ({ + type: v.type, + })), ), AllTimeErc20BalanceQueryDto$inboundSchema.and( - z.object({ type: z.literal("AllTimeErc20Balance") }).transform((v) => ({ type: v.type })) + z.object({ type: z.literal("AllTimeErc20Balance") }).transform((v) => ({ + type: v.type, + })), ), AnyTimeErc20BalanceQueryDto$inboundSchema.and( - z.object({ type: z.literal("AnyTimeErc20Balance") }).transform((v) => ({ type: v.type })) + z.object({ type: z.literal("AnyTimeErc20Balance") }).transform((v) => ({ + type: v.type, + })), ), AllTimeNftHoldersQueryDto$inboundSchema.and( - z.object({ type: z.literal("AllTimeNftHolders") }).transform((v) => ({ type: v.type })) + z.object({ type: z.literal("AllTimeNftHolders") }).transform((v) => ({ + type: v.type, + })), ), AnyTimeNftHoldersQueryDto$inboundSchema.and( - z.object({ type: z.literal("AnyTimeNftHolders") }).transform((v) => ({ type: v.type })) + z.object({ type: z.literal("AnyTimeNftHolders") }).transform((v) => ({ + type: v.type, + })), ), LatestBalanceQueryDto$inboundSchema.and( - z.object({ type: z.literal("LatestBalance") }).transform((v) => ({ type: v.type })) + z.object({ type: z.literal("LatestBalance") }).transform((v) => ({ + type: v.type, + })), ), AllTimeStarsArenaBalanceQueryDto$inboundSchema.and( - z - .object({ type: z.literal("AllTimeStarsArenaBalance") }) - .transform((v) => ({ type: v.type })) + z.object({ type: z.literal("AllTimeStarsArenaBalance") }).transform(( + v, + ) => ({ type: v.type })), ), AnyTimeStarsArenaBalanceQueryDto$inboundSchema.and( - z - .object({ type: z.literal("AnyTimeStarsArenaBalance") }) - .transform((v) => ({ type: v.type })) + z.object({ type: z.literal("AnyTimeStarsArenaBalance") }).transform(( + v, + ) => ({ type: v.type })), ), LatestStarsArenaBalanceQueryDto$inboundSchema.and( - z - .object({ type: z.literal("LatestBalanceStarsArena") }) - .transform((v) => ({ type: v.type })) + z.object({ type: z.literal("LatestBalanceStarsArena") }).transform(( + v, + ) => ({ type: v.type })), ), -]); + ]); /** @internal */ export type Queries$Outbound = - | (AllTimeNativeBalanceQueryDto$Outbound & { type: "AllTimeNativeBalance" }) - | (AnyTimeNativeBalanceQueryDto$Outbound & { type: "AnyTimeNativeBalance" }) - | (AllTimeErc20BalanceQueryDto$Outbound & { type: "AllTimeErc20Balance" }) - | (AnyTimeErc20BalanceQueryDto$Outbound & { type: "AnyTimeErc20Balance" }) - | (AllTimeNftHoldersQueryDto$Outbound & { type: "AllTimeNftHolders" }) - | (AnyTimeNftHoldersQueryDto$Outbound & { type: "AnyTimeNftHolders" }) - | (LatestBalanceQueryDto$Outbound & { type: "LatestBalance" }) - | (AllTimeStarsArenaBalanceQueryDto$Outbound & { type: "AllTimeStarsArenaBalance" }) - | (AnyTimeStarsArenaBalanceQueryDto$Outbound & { type: "AnyTimeStarsArenaBalance" }) - | (LatestStarsArenaBalanceQueryDto$Outbound & { type: "LatestBalanceStarsArena" }); + | (AllTimeNativeBalanceQueryDto$Outbound & { type: "AllTimeNativeBalance" }) + | (AnyTimeNativeBalanceQueryDto$Outbound & { type: "AnyTimeNativeBalance" }) + | (AllTimeErc20BalanceQueryDto$Outbound & { type: "AllTimeErc20Balance" }) + | (AnyTimeErc20BalanceQueryDto$Outbound & { type: "AnyTimeErc20Balance" }) + | (AllTimeNftHoldersQueryDto$Outbound & { type: "AllTimeNftHolders" }) + | (AnyTimeNftHoldersQueryDto$Outbound & { type: "AnyTimeNftHolders" }) + | (LatestBalanceQueryDto$Outbound & { type: "LatestBalance" }) + | (AllTimeStarsArenaBalanceQueryDto$Outbound & { + type: "AllTimeStarsArenaBalance"; + }) + | (AnyTimeStarsArenaBalanceQueryDto$Outbound & { + type: "AnyTimeStarsArenaBalance"; + }) + | (LatestStarsArenaBalanceQueryDto$Outbound & { + type: "LatestBalanceStarsArena"; + }); /** @internal */ -export const Queries$outboundSchema: z.ZodType = z.union([ - AllTimeNativeBalanceQueryDto$outboundSchema.and( - z.object({ type: z.literal("AllTimeNativeBalance") }).transform((v) => ({ type: v.type })) - ), - AnyTimeNativeBalanceQueryDto$outboundSchema.and( - z.object({ type: z.literal("AnyTimeNativeBalance") }).transform((v) => ({ type: v.type })) - ), - AllTimeErc20BalanceQueryDto$outboundSchema.and( - z.object({ type: z.literal("AllTimeErc20Balance") }).transform((v) => ({ type: v.type })) - ), - AnyTimeErc20BalanceQueryDto$outboundSchema.and( - z.object({ type: z.literal("AnyTimeErc20Balance") }).transform((v) => ({ type: v.type })) - ), - AllTimeNftHoldersQueryDto$outboundSchema.and( - z.object({ type: z.literal("AllTimeNftHolders") }).transform((v) => ({ type: v.type })) - ), - AnyTimeNftHoldersQueryDto$outboundSchema.and( - z.object({ type: z.literal("AnyTimeNftHolders") }).transform((v) => ({ type: v.type })) - ), - LatestBalanceQueryDto$outboundSchema.and( - z.object({ type: z.literal("LatestBalance") }).transform((v) => ({ type: v.type })) - ), - AllTimeStarsArenaBalanceQueryDto$outboundSchema.and( - z - .object({ type: z.literal("AllTimeStarsArenaBalance") }) - .transform((v) => ({ type: v.type })) - ), - AnyTimeStarsArenaBalanceQueryDto$outboundSchema.and( - z - .object({ type: z.literal("AnyTimeStarsArenaBalance") }) - .transform((v) => ({ type: v.type })) - ), - LatestStarsArenaBalanceQueryDto$outboundSchema.and( - z - .object({ type: z.literal("LatestBalanceStarsArena") }) - .transform((v) => ({ type: v.type })) - ), +export const Queries$outboundSchema: z.ZodType< + Queries$Outbound, + z.ZodTypeDef, + Queries +> = z.union([ + AllTimeNativeBalanceQueryDto$outboundSchema.and( + z.object({ type: z.literal("AllTimeNativeBalance") }).transform((v) => ({ + type: v.type, + })), + ), + AnyTimeNativeBalanceQueryDto$outboundSchema.and( + z.object({ type: z.literal("AnyTimeNativeBalance") }).transform((v) => ({ + type: v.type, + })), + ), + AllTimeErc20BalanceQueryDto$outboundSchema.and( + z.object({ type: z.literal("AllTimeErc20Balance") }).transform((v) => ({ + type: v.type, + })), + ), + AnyTimeErc20BalanceQueryDto$outboundSchema.and( + z.object({ type: z.literal("AnyTimeErc20Balance") }).transform((v) => ({ + type: v.type, + })), + ), + AllTimeNftHoldersQueryDto$outboundSchema.and( + z.object({ type: z.literal("AllTimeNftHolders") }).transform((v) => ({ + type: v.type, + })), + ), + AnyTimeNftHoldersQueryDto$outboundSchema.and( + z.object({ type: z.literal("AnyTimeNftHolders") }).transform((v) => ({ + type: v.type, + })), + ), + LatestBalanceQueryDto$outboundSchema.and( + z.object({ type: z.literal("LatestBalance") }).transform((v) => ({ + type: v.type, + })), + ), + AllTimeStarsArenaBalanceQueryDto$outboundSchema.and( + z.object({ type: z.literal("AllTimeStarsArenaBalance") }).transform(( + v, + ) => ({ type: v.type })), + ), + AnyTimeStarsArenaBalanceQueryDto$outboundSchema.and( + z.object({ type: z.literal("AnyTimeStarsArenaBalance") }).transform(( + v, + ) => ({ type: v.type })), + ), + LatestStarsArenaBalanceQueryDto$outboundSchema.and( + z.object({ type: z.literal("LatestBalanceStarsArena") }).transform((v) => ({ + type: v.type, + })), + ), ]); /** @@ -199,157 +242,167 @@ export const Queries$outboundSchema: z.ZodType = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(1000), - queries: z.array( - z.union([ - AllTimeNativeBalanceQueryDto$inboundSchema.and( - z - .object({ type: z.literal("AllTimeNativeBalance") }) - .transform((v) => ({ type: v.type })) - ), - AnyTimeNativeBalanceQueryDto$inboundSchema.and( - z - .object({ type: z.literal("AnyTimeNativeBalance") }) - .transform((v) => ({ type: v.type })) - ), - AllTimeErc20BalanceQueryDto$inboundSchema.and( - z - .object({ type: z.literal("AllTimeErc20Balance") }) - .transform((v) => ({ type: v.type })) - ), - AnyTimeErc20BalanceQueryDto$inboundSchema.and( - z - .object({ type: z.literal("AnyTimeErc20Balance") }) - .transform((v) => ({ type: v.type })) - ), - AllTimeNftHoldersQueryDto$inboundSchema.and( - z - .object({ type: z.literal("AllTimeNftHolders") }) - .transform((v) => ({ type: v.type })) - ), - AnyTimeNftHoldersQueryDto$inboundSchema.and( - z - .object({ type: z.literal("AnyTimeNftHolders") }) - .transform((v) => ({ type: v.type })) - ), - LatestBalanceQueryDto$inboundSchema.and( - z.object({ type: z.literal("LatestBalance") }).transform((v) => ({ type: v.type })) - ), - AllTimeStarsArenaBalanceQueryDto$inboundSchema.and( - z - .object({ type: z.literal("AllTimeStarsArenaBalance") }) - .transform((v) => ({ type: v.type })) - ), - AnyTimeStarsArenaBalanceQueryDto$inboundSchema.and( - z - .object({ type: z.literal("AnyTimeStarsArenaBalance") }) - .transform((v) => ({ type: v.type })) - ), - LatestStarsArenaBalanceQueryDto$inboundSchema.and( - z - .object({ type: z.literal("LatestBalanceStarsArena") }) - .transform((v) => ({ type: v.type })) - ), - ]) - ), - operator: Operator$inboundSchema, + pageToken: z.string().optional(), + pageSize: z.number().int().default(1000), + queries: z.array( + z.union([ + AllTimeNativeBalanceQueryDto$inboundSchema.and( + z.object({ type: z.literal("AllTimeNativeBalance") }).transform(( + v, + ) => ({ type: v.type })), + ), + AnyTimeNativeBalanceQueryDto$inboundSchema.and( + z.object({ type: z.literal("AnyTimeNativeBalance") }).transform(( + v, + ) => ({ type: v.type })), + ), + AllTimeErc20BalanceQueryDto$inboundSchema.and( + z.object({ type: z.literal("AllTimeErc20Balance") }).transform((v) => ({ + type: v.type, + })), + ), + AnyTimeErc20BalanceQueryDto$inboundSchema.and( + z.object({ type: z.literal("AnyTimeErc20Balance") }).transform((v) => ({ + type: v.type, + })), + ), + AllTimeNftHoldersQueryDto$inboundSchema.and( + z.object({ type: z.literal("AllTimeNftHolders") }).transform((v) => ({ + type: v.type, + })), + ), + AnyTimeNftHoldersQueryDto$inboundSchema.and( + z.object({ type: z.literal("AnyTimeNftHolders") }).transform((v) => ({ + type: v.type, + })), + ), + LatestBalanceQueryDto$inboundSchema.and( + z.object({ type: z.literal("LatestBalance") }).transform((v) => ({ + type: v.type, + })), + ), + AllTimeStarsArenaBalanceQueryDto$inboundSchema.and( + z.object({ type: z.literal("AllTimeStarsArenaBalance") }).transform(( + v, + ) => ({ type: v.type })), + ), + AnyTimeStarsArenaBalanceQueryDto$inboundSchema.and( + z.object({ type: z.literal("AnyTimeStarsArenaBalance") }).transform(( + v, + ) => ({ type: v.type })), + ), + LatestStarsArenaBalanceQueryDto$inboundSchema.and( + z.object({ type: z.literal("LatestBalanceStarsArena") }).transform(( + v, + ) => ({ type: v.type })), + ), + ]), + ), + operator: Operator$inboundSchema, }); /** @internal */ export type CompositeQueryRequestDto$Outbound = { - pageToken?: string | undefined; - pageSize: number; - queries: Array< - | (AllTimeNativeBalanceQueryDto$Outbound & { type: "AllTimeNativeBalance" }) - | (AnyTimeNativeBalanceQueryDto$Outbound & { type: "AnyTimeNativeBalance" }) - | (AllTimeErc20BalanceQueryDto$Outbound & { type: "AllTimeErc20Balance" }) - | (AnyTimeErc20BalanceQueryDto$Outbound & { type: "AnyTimeErc20Balance" }) - | (AllTimeNftHoldersQueryDto$Outbound & { type: "AllTimeNftHolders" }) - | (AnyTimeNftHoldersQueryDto$Outbound & { type: "AnyTimeNftHolders" }) - | (LatestBalanceQueryDto$Outbound & { type: "LatestBalance" }) - | (AllTimeStarsArenaBalanceQueryDto$Outbound & { type: "AllTimeStarsArenaBalance" }) - | (AnyTimeStarsArenaBalanceQueryDto$Outbound & { type: "AnyTimeStarsArenaBalance" }) - | (LatestStarsArenaBalanceQueryDto$Outbound & { type: "LatestBalanceStarsArena" }) - >; - operator: string; + pageToken?: string | undefined; + pageSize: number; + queries: Array< + | (AllTimeNativeBalanceQueryDto$Outbound & { type: "AllTimeNativeBalance" }) + | (AnyTimeNativeBalanceQueryDto$Outbound & { type: "AnyTimeNativeBalance" }) + | (AllTimeErc20BalanceQueryDto$Outbound & { type: "AllTimeErc20Balance" }) + | (AnyTimeErc20BalanceQueryDto$Outbound & { type: "AnyTimeErc20Balance" }) + | (AllTimeNftHoldersQueryDto$Outbound & { type: "AllTimeNftHolders" }) + | (AnyTimeNftHoldersQueryDto$Outbound & { type: "AnyTimeNftHolders" }) + | (LatestBalanceQueryDto$Outbound & { type: "LatestBalance" }) + | (AllTimeStarsArenaBalanceQueryDto$Outbound & { + type: "AllTimeStarsArenaBalance"; + }) + | (AnyTimeStarsArenaBalanceQueryDto$Outbound & { + type: "AnyTimeStarsArenaBalance"; + }) + | (LatestStarsArenaBalanceQueryDto$Outbound & { + type: "LatestBalanceStarsArena"; + }) + >; + operator: string; }; /** @internal */ export const CompositeQueryRequestDto$outboundSchema: z.ZodType< - CompositeQueryRequestDto$Outbound, - z.ZodTypeDef, - CompositeQueryRequestDto + CompositeQueryRequestDto$Outbound, + z.ZodTypeDef, + CompositeQueryRequestDto > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(1000), - queries: z.array( - z.union([ - AllTimeNativeBalanceQueryDto$outboundSchema.and( - z - .object({ type: z.literal("AllTimeNativeBalance") }) - .transform((v) => ({ type: v.type })) - ), - AnyTimeNativeBalanceQueryDto$outboundSchema.and( - z - .object({ type: z.literal("AnyTimeNativeBalance") }) - .transform((v) => ({ type: v.type })) - ), - AllTimeErc20BalanceQueryDto$outboundSchema.and( - z - .object({ type: z.literal("AllTimeErc20Balance") }) - .transform((v) => ({ type: v.type })) - ), - AnyTimeErc20BalanceQueryDto$outboundSchema.and( - z - .object({ type: z.literal("AnyTimeErc20Balance") }) - .transform((v) => ({ type: v.type })) - ), - AllTimeNftHoldersQueryDto$outboundSchema.and( - z - .object({ type: z.literal("AllTimeNftHolders") }) - .transform((v) => ({ type: v.type })) - ), - AnyTimeNftHoldersQueryDto$outboundSchema.and( - z - .object({ type: z.literal("AnyTimeNftHolders") }) - .transform((v) => ({ type: v.type })) - ), - LatestBalanceQueryDto$outboundSchema.and( - z.object({ type: z.literal("LatestBalance") }).transform((v) => ({ type: v.type })) - ), - AllTimeStarsArenaBalanceQueryDto$outboundSchema.and( - z - .object({ type: z.literal("AllTimeStarsArenaBalance") }) - .transform((v) => ({ type: v.type })) - ), - AnyTimeStarsArenaBalanceQueryDto$outboundSchema.and( - z - .object({ type: z.literal("AnyTimeStarsArenaBalance") }) - .transform((v) => ({ type: v.type })) - ), - LatestStarsArenaBalanceQueryDto$outboundSchema.and( - z - .object({ type: z.literal("LatestBalanceStarsArena") }) - .transform((v) => ({ type: v.type })) - ), - ]) - ), - operator: Operator$outboundSchema, + pageToken: z.string().optional(), + pageSize: z.number().int().default(1000), + queries: z.array( + z.union([ + AllTimeNativeBalanceQueryDto$outboundSchema.and( + z.object({ type: z.literal("AllTimeNativeBalance") }).transform(( + v, + ) => ({ type: v.type })), + ), + AnyTimeNativeBalanceQueryDto$outboundSchema.and( + z.object({ type: z.literal("AnyTimeNativeBalance") }).transform(( + v, + ) => ({ type: v.type })), + ), + AllTimeErc20BalanceQueryDto$outboundSchema.and( + z.object({ type: z.literal("AllTimeErc20Balance") }).transform((v) => ({ + type: v.type, + })), + ), + AnyTimeErc20BalanceQueryDto$outboundSchema.and( + z.object({ type: z.literal("AnyTimeErc20Balance") }).transform((v) => ({ + type: v.type, + })), + ), + AllTimeNftHoldersQueryDto$outboundSchema.and( + z.object({ type: z.literal("AllTimeNftHolders") }).transform((v) => ({ + type: v.type, + })), + ), + AnyTimeNftHoldersQueryDto$outboundSchema.and( + z.object({ type: z.literal("AnyTimeNftHolders") }).transform((v) => ({ + type: v.type, + })), + ), + LatestBalanceQueryDto$outboundSchema.and( + z.object({ type: z.literal("LatestBalance") }).transform((v) => ({ + type: v.type, + })), + ), + AllTimeStarsArenaBalanceQueryDto$outboundSchema.and( + z.object({ type: z.literal("AllTimeStarsArenaBalance") }).transform(( + v, + ) => ({ type: v.type })), + ), + AnyTimeStarsArenaBalanceQueryDto$outboundSchema.and( + z.object({ type: z.literal("AnyTimeStarsArenaBalance") }).transform(( + v, + ) => ({ type: v.type })), + ), + LatestStarsArenaBalanceQueryDto$outboundSchema.and( + z.object({ type: z.literal("LatestBalanceStarsArena") }).transform(( + v, + ) => ({ type: v.type })), + ), + ]), + ), + operator: Operator$outboundSchema, }); /** @@ -357,10 +410,10 @@ export const CompositeQueryRequestDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CompositeQueryRequestDto$ { - /** @deprecated use `CompositeQueryRequestDto$inboundSchema` instead. */ - export const inboundSchema = CompositeQueryRequestDto$inboundSchema; - /** @deprecated use `CompositeQueryRequestDto$outboundSchema` instead. */ - export const outboundSchema = CompositeQueryRequestDto$outboundSchema; - /** @deprecated use `CompositeQueryRequestDto$Outbound` instead. */ - export type Outbound = CompositeQueryRequestDto$Outbound; + /** @deprecated use `CompositeQueryRequestDto$inboundSchema` instead. */ + export const inboundSchema = CompositeQueryRequestDto$inboundSchema; + /** @deprecated use `CompositeQueryRequestDto$outboundSchema` instead. */ + export const outboundSchema = CompositeQueryRequestDto$outboundSchema; + /** @deprecated use `CompositeQueryRequestDto$Outbound` instead. */ + export type Outbound = CompositeQueryRequestDto$Outbound; } diff --git a/src/models/components/compositequeryresponse.ts b/src/models/components/compositequeryresponse.ts index 7c5fc3b..1461d08 100644 --- a/src/models/components/compositequeryresponse.ts +++ b/src/models/components/compositequeryresponse.ts @@ -5,51 +5,51 @@ import * as z from "zod"; export type CompositeQueryResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - /** - * The number of results for each subquery by query id. - */ - subQueryCounts: { [k: string]: number }; - /** - * The total number of addresses returned by the composite query. - */ - totalCount: number; - addresses: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + /** + * The number of results for each subquery by query id. + */ + subQueryCounts: { [k: string]: number }; + /** + * The total number of addresses returned by the composite query. + */ + totalCount: number; + addresses: Array; }; /** @internal */ export const CompositeQueryResponse$inboundSchema: z.ZodType< - CompositeQueryResponse, - z.ZodTypeDef, - unknown + CompositeQueryResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - subQueryCounts: z.record(z.number()), - totalCount: z.number(), - addresses: z.array(z.string()), + nextPageToken: z.string().optional(), + subQueryCounts: z.record(z.number()), + totalCount: z.number(), + addresses: z.array(z.string()), }); /** @internal */ export type CompositeQueryResponse$Outbound = { - nextPageToken?: string | undefined; - subQueryCounts: { [k: string]: number }; - totalCount: number; - addresses: Array; + nextPageToken?: string | undefined; + subQueryCounts: { [k: string]: number }; + totalCount: number; + addresses: Array; }; /** @internal */ export const CompositeQueryResponse$outboundSchema: z.ZodType< - CompositeQueryResponse$Outbound, - z.ZodTypeDef, - CompositeQueryResponse + CompositeQueryResponse$Outbound, + z.ZodTypeDef, + CompositeQueryResponse > = z.object({ - nextPageToken: z.string().optional(), - subQueryCounts: z.record(z.number()), - totalCount: z.number(), - addresses: z.array(z.string()), + nextPageToken: z.string().optional(), + subQueryCounts: z.record(z.number()), + totalCount: z.number(), + addresses: z.array(z.string()), }); /** @@ -57,10 +57,10 @@ export const CompositeQueryResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CompositeQueryResponse$ { - /** @deprecated use `CompositeQueryResponse$inboundSchema` instead. */ - export const inboundSchema = CompositeQueryResponse$inboundSchema; - /** @deprecated use `CompositeQueryResponse$outboundSchema` instead. */ - export const outboundSchema = CompositeQueryResponse$outboundSchema; - /** @deprecated use `CompositeQueryResponse$Outbound` instead. */ - export type Outbound = CompositeQueryResponse$Outbound; + /** @deprecated use `CompositeQueryResponse$inboundSchema` instead. */ + export const inboundSchema = CompositeQueryResponse$inboundSchema; + /** @deprecated use `CompositeQueryResponse$outboundSchema` instead. */ + export const outboundSchema = CompositeQueryResponse$outboundSchema; + /** @deprecated use `CompositeQueryResponse$Outbound` instead. */ + export type Outbound = CompositeQueryResponse$Outbound; } diff --git a/src/models/components/contractdeploymentdetails.ts b/src/models/components/contractdeploymentdetails.ts index de76997..2b4c178 100644 --- a/src/models/components/contractdeploymentdetails.ts +++ b/src/models/components/contractdeploymentdetails.ts @@ -5,44 +5,44 @@ import * as z from "zod"; export type ContractDeploymentDetails = { - txHash: string; - /** - * The address that initiated the transaction which deployed this contract. - */ - deployerAddress: string; - /** - * The contract address which deployed this contract via smart contract. This field is only populated when the contract was deployed as part of smart contract execution. - */ - deployerContractAddress?: string | undefined; + txHash: string; + /** + * The address that initiated the transaction which deployed this contract. + */ + deployerAddress: string; + /** + * The contract address which deployed this contract via smart contract. This field is only populated when the contract was deployed as part of smart contract execution. + */ + deployerContractAddress?: string | undefined; }; /** @internal */ export const ContractDeploymentDetails$inboundSchema: z.ZodType< - ContractDeploymentDetails, - z.ZodTypeDef, - unknown + ContractDeploymentDetails, + z.ZodTypeDef, + unknown > = z.object({ - txHash: z.string(), - deployerAddress: z.string(), - deployerContractAddress: z.string().optional(), + txHash: z.string(), + deployerAddress: z.string(), + deployerContractAddress: z.string().optional(), }); /** @internal */ export type ContractDeploymentDetails$Outbound = { - txHash: string; - deployerAddress: string; - deployerContractAddress?: string | undefined; + txHash: string; + deployerAddress: string; + deployerContractAddress?: string | undefined; }; /** @internal */ export const ContractDeploymentDetails$outboundSchema: z.ZodType< - ContractDeploymentDetails$Outbound, - z.ZodTypeDef, - ContractDeploymentDetails + ContractDeploymentDetails$Outbound, + z.ZodTypeDef, + ContractDeploymentDetails > = z.object({ - txHash: z.string(), - deployerAddress: z.string(), - deployerContractAddress: z.string().optional(), + txHash: z.string(), + deployerAddress: z.string(), + deployerContractAddress: z.string().optional(), }); /** @@ -50,10 +50,10 @@ export const ContractDeploymentDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ContractDeploymentDetails$ { - /** @deprecated use `ContractDeploymentDetails$inboundSchema` instead. */ - export const inboundSchema = ContractDeploymentDetails$inboundSchema; - /** @deprecated use `ContractDeploymentDetails$outboundSchema` instead. */ - export const outboundSchema = ContractDeploymentDetails$outboundSchema; - /** @deprecated use `ContractDeploymentDetails$Outbound` instead. */ - export type Outbound = ContractDeploymentDetails$Outbound; + /** @deprecated use `ContractDeploymentDetails$inboundSchema` instead. */ + export const inboundSchema = ContractDeploymentDetails$inboundSchema; + /** @deprecated use `ContractDeploymentDetails$outboundSchema` instead. */ + export const outboundSchema = ContractDeploymentDetails$outboundSchema; + /** @deprecated use `ContractDeploymentDetails$Outbound` instead. */ + export type Outbound = ContractDeploymentDetails$Outbound; } diff --git a/src/models/components/createevmtransactionexportrequest.ts b/src/models/components/createevmtransactionexportrequest.ts index 34616be..c10e151 100644 --- a/src/models/components/createevmtransactionexportrequest.ts +++ b/src/models/components/createevmtransactionexportrequest.ts @@ -2,70 +2,70 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - EvmNetworkOptions, - EvmNetworkOptions$inboundSchema, - EvmNetworkOptions$Outbound, - EvmNetworkOptions$outboundSchema, + EvmNetworkOptions, + EvmNetworkOptions$inboundSchema, + EvmNetworkOptions$Outbound, + EvmNetworkOptions$outboundSchema, } from "./evmnetworkoptions.js"; import { - EVMOperationType, - EVMOperationType$inboundSchema, - EVMOperationType$outboundSchema, + EVMOperationType, + EVMOperationType$inboundSchema, + EVMOperationType$outboundSchema, } from "./evmoperationtype.js"; -import * as z from "zod"; export type CreateEvmTransactionExportRequest = { - type: EVMOperationType; - firstDate: string; - lastDate: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - startDate: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - endDate: string; - options: EvmNetworkOptions; + type: EVMOperationType; + firstDate: string; + lastDate: string; + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + startDate: string; + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + endDate: string; + options: EvmNetworkOptions; }; /** @internal */ export const CreateEvmTransactionExportRequest$inboundSchema: z.ZodType< - CreateEvmTransactionExportRequest, - z.ZodTypeDef, - unknown + CreateEvmTransactionExportRequest, + z.ZodTypeDef, + unknown > = z.object({ - type: EVMOperationType$inboundSchema, - firstDate: z.string(), - lastDate: z.string(), - startDate: z.string(), - endDate: z.string(), - options: EvmNetworkOptions$inboundSchema, + type: EVMOperationType$inboundSchema, + firstDate: z.string(), + lastDate: z.string(), + startDate: z.string(), + endDate: z.string(), + options: EvmNetworkOptions$inboundSchema, }); /** @internal */ export type CreateEvmTransactionExportRequest$Outbound = { - type: string; - firstDate: string; - lastDate: string; - startDate: string; - endDate: string; - options: EvmNetworkOptions$Outbound; + type: string; + firstDate: string; + lastDate: string; + startDate: string; + endDate: string; + options: EvmNetworkOptions$Outbound; }; /** @internal */ export const CreateEvmTransactionExportRequest$outboundSchema: z.ZodType< - CreateEvmTransactionExportRequest$Outbound, - z.ZodTypeDef, - CreateEvmTransactionExportRequest + CreateEvmTransactionExportRequest$Outbound, + z.ZodTypeDef, + CreateEvmTransactionExportRequest > = z.object({ - type: EVMOperationType$outboundSchema, - firstDate: z.string(), - lastDate: z.string(), - startDate: z.string(), - endDate: z.string(), - options: EvmNetworkOptions$outboundSchema, + type: EVMOperationType$outboundSchema, + firstDate: z.string(), + lastDate: z.string(), + startDate: z.string(), + endDate: z.string(), + options: EvmNetworkOptions$outboundSchema, }); /** @@ -73,10 +73,11 @@ export const CreateEvmTransactionExportRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateEvmTransactionExportRequest$ { - /** @deprecated use `CreateEvmTransactionExportRequest$inboundSchema` instead. */ - export const inboundSchema = CreateEvmTransactionExportRequest$inboundSchema; - /** @deprecated use `CreateEvmTransactionExportRequest$outboundSchema` instead. */ - export const outboundSchema = CreateEvmTransactionExportRequest$outboundSchema; - /** @deprecated use `CreateEvmTransactionExportRequest$Outbound` instead. */ - export type Outbound = CreateEvmTransactionExportRequest$Outbound; + /** @deprecated use `CreateEvmTransactionExportRequest$inboundSchema` instead. */ + export const inboundSchema = CreateEvmTransactionExportRequest$inboundSchema; + /** @deprecated use `CreateEvmTransactionExportRequest$outboundSchema` instead. */ + export const outboundSchema = + CreateEvmTransactionExportRequest$outboundSchema; + /** @deprecated use `CreateEvmTransactionExportRequest$Outbound` instead. */ + export type Outbound = CreateEvmTransactionExportRequest$Outbound; } diff --git a/src/models/components/createprimarynetworktransactionexportrequest.ts b/src/models/components/createprimarynetworktransactionexportrequest.ts index e3db144..ca85ad4 100644 --- a/src/models/components/createprimarynetworktransactionexportrequest.ts +++ b/src/models/components/createprimarynetworktransactionexportrequest.ts @@ -2,81 +2,85 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PrimaryNetworkOperationType, - PrimaryNetworkOperationType$inboundSchema, - PrimaryNetworkOperationType$outboundSchema, + PrimaryNetworkOperationType, + PrimaryNetworkOperationType$inboundSchema, + PrimaryNetworkOperationType$outboundSchema, } from "./primarynetworkoperationtype.js"; import { - PrimaryNetworkOptions, - PrimaryNetworkOptions$inboundSchema, - PrimaryNetworkOptions$Outbound, - PrimaryNetworkOptions$outboundSchema, + PrimaryNetworkOptions, + PrimaryNetworkOptions$inboundSchema, + PrimaryNetworkOptions$Outbound, + PrimaryNetworkOptions$outboundSchema, } from "./primarynetworkoptions.js"; -import * as z from "zod"; export type CreatePrimaryNetworkTransactionExportRequest = { - type: PrimaryNetworkOperationType; - firstDate: string; - lastDate: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - startDate: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - endDate: string; - options: PrimaryNetworkOptions; + type: PrimaryNetworkOperationType; + firstDate: string; + lastDate: string; + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + startDate: string; + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + endDate: string; + options: PrimaryNetworkOptions; }; /** @internal */ -export const CreatePrimaryNetworkTransactionExportRequest$inboundSchema: z.ZodType< +export const CreatePrimaryNetworkTransactionExportRequest$inboundSchema: + z.ZodType< CreatePrimaryNetworkTransactionExportRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ type: PrimaryNetworkOperationType$inboundSchema, firstDate: z.string(), lastDate: z.string(), startDate: z.string(), endDate: z.string(), options: PrimaryNetworkOptions$inboundSchema, -}); + }); /** @internal */ export type CreatePrimaryNetworkTransactionExportRequest$Outbound = { - type: string; - firstDate: string; - lastDate: string; - startDate: string; - endDate: string; - options: PrimaryNetworkOptions$Outbound; + type: string; + firstDate: string; + lastDate: string; + startDate: string; + endDate: string; + options: PrimaryNetworkOptions$Outbound; }; /** @internal */ -export const CreatePrimaryNetworkTransactionExportRequest$outboundSchema: z.ZodType< +export const CreatePrimaryNetworkTransactionExportRequest$outboundSchema: + z.ZodType< CreatePrimaryNetworkTransactionExportRequest$Outbound, z.ZodTypeDef, CreatePrimaryNetworkTransactionExportRequest -> = z.object({ + > = z.object({ type: PrimaryNetworkOperationType$outboundSchema, firstDate: z.string(), lastDate: z.string(), startDate: z.string(), endDate: z.string(), options: PrimaryNetworkOptions$outboundSchema, -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreatePrimaryNetworkTransactionExportRequest$ { - /** @deprecated use `CreatePrimaryNetworkTransactionExportRequest$inboundSchema` instead. */ - export const inboundSchema = CreatePrimaryNetworkTransactionExportRequest$inboundSchema; - /** @deprecated use `CreatePrimaryNetworkTransactionExportRequest$outboundSchema` instead. */ - export const outboundSchema = CreatePrimaryNetworkTransactionExportRequest$outboundSchema; - /** @deprecated use `CreatePrimaryNetworkTransactionExportRequest$Outbound` instead. */ - export type Outbound = CreatePrimaryNetworkTransactionExportRequest$Outbound; + /** @deprecated use `CreatePrimaryNetworkTransactionExportRequest$inboundSchema` instead. */ + export const inboundSchema = + CreatePrimaryNetworkTransactionExportRequest$inboundSchema; + /** @deprecated use `CreatePrimaryNetworkTransactionExportRequest$outboundSchema` instead. */ + export const outboundSchema = + CreatePrimaryNetworkTransactionExportRequest$outboundSchema; + /** @deprecated use `CreatePrimaryNetworkTransactionExportRequest$Outbound` instead. */ + export type Outbound = CreatePrimaryNetworkTransactionExportRequest$Outbound; } diff --git a/src/models/components/createwebhookrequest.ts b/src/models/components/createwebhookrequest.ts index b002c81..6542d71 100644 --- a/src/models/components/createwebhookrequest.ts +++ b/src/models/components/createwebhookrequest.ts @@ -2,49 +2,54 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - AddressActivityMetadata, - AddressActivityMetadata$inboundSchema, - AddressActivityMetadata$Outbound, - AddressActivityMetadata$outboundSchema, + AddressActivityMetadata, + AddressActivityMetadata$inboundSchema, + AddressActivityMetadata$Outbound, + AddressActivityMetadata$outboundSchema, } from "./addressactivitymetadata.js"; -import { EventType, EventType$inboundSchema, EventType$outboundSchema } from "./eventtype.js"; -import * as z from "zod"; +import { + EventType, + EventType$inboundSchema, + EventType$outboundSchema, +} from "./eventtype.js"; export type CreateWebhookRequestMetadata = AddressActivityMetadata; export type CreateWebhookRequest = { - url: string; - chainId: string; - eventType: EventType; - metadata: AddressActivityMetadata; - name?: string | undefined; - description?: string | undefined; - /** - * Whether to include traces in the webhook payload. - */ - includeInternalTxs?: boolean | undefined; - /** - * Whether to include logs in the webhook payload. - */ - includeLogs?: boolean | undefined; + url: string; + chainId: string; + eventType: EventType; + metadata: AddressActivityMetadata; + name?: string | undefined; + description?: string | undefined; + /** + * Whether to include traces in the webhook payload. + */ + includeInternalTxs?: boolean | undefined; + /** + * Whether to include logs in the webhook payload. + */ + includeLogs?: boolean | undefined; }; /** @internal */ export const CreateWebhookRequestMetadata$inboundSchema: z.ZodType< - CreateWebhookRequestMetadata, - z.ZodTypeDef, - unknown + CreateWebhookRequestMetadata, + z.ZodTypeDef, + unknown > = AddressActivityMetadata$inboundSchema; /** @internal */ -export type CreateWebhookRequestMetadata$Outbound = AddressActivityMetadata$Outbound; +export type CreateWebhookRequestMetadata$Outbound = + AddressActivityMetadata$Outbound; /** @internal */ export const CreateWebhookRequestMetadata$outboundSchema: z.ZodType< - CreateWebhookRequestMetadata$Outbound, - z.ZodTypeDef, - CreateWebhookRequestMetadata + CreateWebhookRequestMetadata$Outbound, + z.ZodTypeDef, + CreateWebhookRequestMetadata > = AddressActivityMetadata$outboundSchema; /** @@ -52,56 +57,56 @@ export const CreateWebhookRequestMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateWebhookRequestMetadata$ { - /** @deprecated use `CreateWebhookRequestMetadata$inboundSchema` instead. */ - export const inboundSchema = CreateWebhookRequestMetadata$inboundSchema; - /** @deprecated use `CreateWebhookRequestMetadata$outboundSchema` instead. */ - export const outboundSchema = CreateWebhookRequestMetadata$outboundSchema; - /** @deprecated use `CreateWebhookRequestMetadata$Outbound` instead. */ - export type Outbound = CreateWebhookRequestMetadata$Outbound; + /** @deprecated use `CreateWebhookRequestMetadata$inboundSchema` instead. */ + export const inboundSchema = CreateWebhookRequestMetadata$inboundSchema; + /** @deprecated use `CreateWebhookRequestMetadata$outboundSchema` instead. */ + export const outboundSchema = CreateWebhookRequestMetadata$outboundSchema; + /** @deprecated use `CreateWebhookRequestMetadata$Outbound` instead. */ + export type Outbound = CreateWebhookRequestMetadata$Outbound; } /** @internal */ export const CreateWebhookRequest$inboundSchema: z.ZodType< - CreateWebhookRequest, - z.ZodTypeDef, - unknown + CreateWebhookRequest, + z.ZodTypeDef, + unknown > = z.object({ - url: z.string(), - chainId: z.string(), - eventType: EventType$inboundSchema, - metadata: AddressActivityMetadata$inboundSchema, - name: z.string().optional(), - description: z.string().optional(), - includeInternalTxs: z.boolean().optional(), - includeLogs: z.boolean().optional(), + url: z.string(), + chainId: z.string(), + eventType: EventType$inboundSchema, + metadata: AddressActivityMetadata$inboundSchema, + name: z.string().optional(), + description: z.string().optional(), + includeInternalTxs: z.boolean().optional(), + includeLogs: z.boolean().optional(), }); /** @internal */ export type CreateWebhookRequest$Outbound = { - url: string; - chainId: string; - eventType: string; - metadata: AddressActivityMetadata$Outbound; - name?: string | undefined; - description?: string | undefined; - includeInternalTxs?: boolean | undefined; - includeLogs?: boolean | undefined; + url: string; + chainId: string; + eventType: string; + metadata: AddressActivityMetadata$Outbound; + name?: string | undefined; + description?: string | undefined; + includeInternalTxs?: boolean | undefined; + includeLogs?: boolean | undefined; }; /** @internal */ export const CreateWebhookRequest$outboundSchema: z.ZodType< - CreateWebhookRequest$Outbound, - z.ZodTypeDef, - CreateWebhookRequest + CreateWebhookRequest$Outbound, + z.ZodTypeDef, + CreateWebhookRequest > = z.object({ - url: z.string(), - chainId: z.string(), - eventType: EventType$outboundSchema, - metadata: AddressActivityMetadata$outboundSchema, - name: z.string().optional(), - description: z.string().optional(), - includeInternalTxs: z.boolean().optional(), - includeLogs: z.boolean().optional(), + url: z.string(), + chainId: z.string(), + eventType: EventType$outboundSchema, + metadata: AddressActivityMetadata$outboundSchema, + name: z.string().optional(), + description: z.string().optional(), + includeInternalTxs: z.boolean().optional(), + includeLogs: z.boolean().optional(), }); /** @@ -109,10 +114,10 @@ export const CreateWebhookRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateWebhookRequest$ { - /** @deprecated use `CreateWebhookRequest$inboundSchema` instead. */ - export const inboundSchema = CreateWebhookRequest$inboundSchema; - /** @deprecated use `CreateWebhookRequest$outboundSchema` instead. */ - export const outboundSchema = CreateWebhookRequest$outboundSchema; - /** @deprecated use `CreateWebhookRequest$Outbound` instead. */ - export type Outbound = CreateWebhookRequest$Outbound; + /** @deprecated use `CreateWebhookRequest$inboundSchema` instead. */ + export const inboundSchema = CreateWebhookRequest$inboundSchema; + /** @deprecated use `CreateWebhookRequest$outboundSchema` instead. */ + export const outboundSchema = CreateWebhookRequest$outboundSchema; + /** @deprecated use `CreateWebhookRequest$Outbound` instead. */ + export type Outbound = CreateWebhookRequest$Outbound; } diff --git a/src/models/components/currencycode.ts b/src/models/components/currencycode.ts index 003518b..116b7c8 100644 --- a/src/models/components/currencycode.ts +++ b/src/models/components/currencycode.ts @@ -2,27 +2,27 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * ISO 4217 currency code. */ export const CurrencyCode = { - Usd: "usd", - Eur: "eur", - Aud: "aud", - Cad: "cad", - Chf: "chf", - Clp: "clp", - Cny: "cny", - Czk: "czk", - Dkk: "dkk", - Gbp: "gbp", - Hkd: "hkd", - Huf: "huf", - Jpy: "jpy", - Nzd: "nzd", + Usd: "usd", + Eur: "eur", + Aud: "aud", + Cad: "cad", + Chf: "chf", + Clp: "clp", + Cny: "cny", + Czk: "czk", + Dkk: "dkk", + Gbp: "gbp", + Hkd: "hkd", + Huf: "huf", + Jpy: "jpy", + Nzd: "nzd", } as const; /** * ISO 4217 currency code. @@ -31,19 +31,19 @@ export type CurrencyCode = ClosedEnum; /** @internal */ export const CurrencyCode$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(CurrencyCode); + z.nativeEnum(CurrencyCode); /** @internal */ export const CurrencyCode$outboundSchema: z.ZodNativeEnum = - CurrencyCode$inboundSchema; + CurrencyCode$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CurrencyCode$ { - /** @deprecated use `CurrencyCode$inboundSchema` instead. */ - export const inboundSchema = CurrencyCode$inboundSchema; - /** @deprecated use `CurrencyCode$outboundSchema` instead. */ - export const outboundSchema = CurrencyCode$outboundSchema; + /** @deprecated use `CurrencyCode$inboundSchema` instead. */ + export const inboundSchema = CurrencyCode$inboundSchema; + /** @deprecated use `CurrencyCode$outboundSchema` instead. */ + export const outboundSchema = CurrencyCode$outboundSchema; } diff --git a/src/models/components/datalistchainsresponse.ts b/src/models/components/datalistchainsresponse.ts index 1068e20..6d864f1 100644 --- a/src/models/components/datalistchainsresponse.ts +++ b/src/models/components/datalistchainsresponse.ts @@ -2,39 +2,39 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - ChainInfo, - ChainInfo$inboundSchema, - ChainInfo$Outbound, - ChainInfo$outboundSchema, + ChainInfo, + ChainInfo$inboundSchema, + ChainInfo$Outbound, + ChainInfo$outboundSchema, } from "./chaininfo.js"; -import * as z from "zod"; export type DataListChainsResponse = { - chains: Array; + chains: Array; }; /** @internal */ export const DataListChainsResponse$inboundSchema: z.ZodType< - DataListChainsResponse, - z.ZodTypeDef, - unknown + DataListChainsResponse, + z.ZodTypeDef, + unknown > = z.object({ - chains: z.array(ChainInfo$inboundSchema), + chains: z.array(ChainInfo$inboundSchema), }); /** @internal */ export type DataListChainsResponse$Outbound = { - chains: Array; + chains: Array; }; /** @internal */ export const DataListChainsResponse$outboundSchema: z.ZodType< - DataListChainsResponse$Outbound, - z.ZodTypeDef, - DataListChainsResponse + DataListChainsResponse$Outbound, + z.ZodTypeDef, + DataListChainsResponse > = z.object({ - chains: z.array(ChainInfo$outboundSchema), + chains: z.array(ChainInfo$outboundSchema), }); /** @@ -42,10 +42,10 @@ export const DataListChainsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DataListChainsResponse$ { - /** @deprecated use `DataListChainsResponse$inboundSchema` instead. */ - export const inboundSchema = DataListChainsResponse$inboundSchema; - /** @deprecated use `DataListChainsResponse$outboundSchema` instead. */ - export const outboundSchema = DataListChainsResponse$outboundSchema; - /** @deprecated use `DataListChainsResponse$Outbound` instead. */ - export type Outbound = DataListChainsResponse$Outbound; + /** @deprecated use `DataListChainsResponse$inboundSchema` instead. */ + export const inboundSchema = DataListChainsResponse$inboundSchema; + /** @deprecated use `DataListChainsResponse$outboundSchema` instead. */ + export const outboundSchema = DataListChainsResponse$outboundSchema; + /** @deprecated use `DataListChainsResponse$Outbound` instead. */ + export type Outbound = DataListChainsResponse$Outbound; } diff --git a/src/models/components/daterangeerc20minbalanceparam.ts b/src/models/components/daterangeerc20minbalanceparam.ts index 8a3bcc9..250f1ea 100644 --- a/src/models/components/daterangeerc20minbalanceparam.ts +++ b/src/models/components/daterangeerc20minbalanceparam.ts @@ -5,46 +5,46 @@ import * as z from "zod"; export type DateRangeErc20MinBalanceParam = { - firstDate: string; - lastDate: string; - minBalance: string; - evmChainId: string; - contractAddress: string; + firstDate: string; + lastDate: string; + minBalance: string; + evmChainId: string; + contractAddress: string; }; /** @internal */ export const DateRangeErc20MinBalanceParam$inboundSchema: z.ZodType< - DateRangeErc20MinBalanceParam, - z.ZodTypeDef, - unknown + DateRangeErc20MinBalanceParam, + z.ZodTypeDef, + unknown > = z.object({ - firstDate: z.string(), - lastDate: z.string(), - minBalance: z.string(), - evmChainId: z.string(), - contractAddress: z.string(), + firstDate: z.string(), + lastDate: z.string(), + minBalance: z.string(), + evmChainId: z.string(), + contractAddress: z.string(), }); /** @internal */ export type DateRangeErc20MinBalanceParam$Outbound = { - firstDate: string; - lastDate: string; - minBalance: string; - evmChainId: string; - contractAddress: string; + firstDate: string; + lastDate: string; + minBalance: string; + evmChainId: string; + contractAddress: string; }; /** @internal */ export const DateRangeErc20MinBalanceParam$outboundSchema: z.ZodType< - DateRangeErc20MinBalanceParam$Outbound, - z.ZodTypeDef, - DateRangeErc20MinBalanceParam + DateRangeErc20MinBalanceParam$Outbound, + z.ZodTypeDef, + DateRangeErc20MinBalanceParam > = z.object({ - firstDate: z.string(), - lastDate: z.string(), - minBalance: z.string(), - evmChainId: z.string(), - contractAddress: z.string(), + firstDate: z.string(), + lastDate: z.string(), + minBalance: z.string(), + evmChainId: z.string(), + contractAddress: z.string(), }); /** @@ -52,10 +52,10 @@ export const DateRangeErc20MinBalanceParam$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DateRangeErc20MinBalanceParam$ { - /** @deprecated use `DateRangeErc20MinBalanceParam$inboundSchema` instead. */ - export const inboundSchema = DateRangeErc20MinBalanceParam$inboundSchema; - /** @deprecated use `DateRangeErc20MinBalanceParam$outboundSchema` instead. */ - export const outboundSchema = DateRangeErc20MinBalanceParam$outboundSchema; - /** @deprecated use `DateRangeErc20MinBalanceParam$Outbound` instead. */ - export type Outbound = DateRangeErc20MinBalanceParam$Outbound; + /** @deprecated use `DateRangeErc20MinBalanceParam$inboundSchema` instead. */ + export const inboundSchema = DateRangeErc20MinBalanceParam$inboundSchema; + /** @deprecated use `DateRangeErc20MinBalanceParam$outboundSchema` instead. */ + export const outboundSchema = DateRangeErc20MinBalanceParam$outboundSchema; + /** @deprecated use `DateRangeErc20MinBalanceParam$Outbound` instead. */ + export type Outbound = DateRangeErc20MinBalanceParam$Outbound; } diff --git a/src/models/components/daterangeminbalanceparam.ts b/src/models/components/daterangeminbalanceparam.ts index 0f611ca..10c1256 100644 --- a/src/models/components/daterangeminbalanceparam.ts +++ b/src/models/components/daterangeminbalanceparam.ts @@ -5,42 +5,42 @@ import * as z from "zod"; export type DateRangeMinBalanceParam = { - firstDate: string; - lastDate: string; - minBalance: string; - evmChainId: string; + firstDate: string; + lastDate: string; + minBalance: string; + evmChainId: string; }; /** @internal */ export const DateRangeMinBalanceParam$inboundSchema: z.ZodType< - DateRangeMinBalanceParam, - z.ZodTypeDef, - unknown + DateRangeMinBalanceParam, + z.ZodTypeDef, + unknown > = z.object({ - firstDate: z.string(), - lastDate: z.string(), - minBalance: z.string(), - evmChainId: z.string(), + firstDate: z.string(), + lastDate: z.string(), + minBalance: z.string(), + evmChainId: z.string(), }); /** @internal */ export type DateRangeMinBalanceParam$Outbound = { - firstDate: string; - lastDate: string; - minBalance: string; - evmChainId: string; + firstDate: string; + lastDate: string; + minBalance: string; + evmChainId: string; }; /** @internal */ export const DateRangeMinBalanceParam$outboundSchema: z.ZodType< - DateRangeMinBalanceParam$Outbound, - z.ZodTypeDef, - DateRangeMinBalanceParam + DateRangeMinBalanceParam$Outbound, + z.ZodTypeDef, + DateRangeMinBalanceParam > = z.object({ - firstDate: z.string(), - lastDate: z.string(), - minBalance: z.string(), - evmChainId: z.string(), + firstDate: z.string(), + lastDate: z.string(), + minBalance: z.string(), + evmChainId: z.string(), }); /** @@ -48,10 +48,10 @@ export const DateRangeMinBalanceParam$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DateRangeMinBalanceParam$ { - /** @deprecated use `DateRangeMinBalanceParam$inboundSchema` instead. */ - export const inboundSchema = DateRangeMinBalanceParam$inboundSchema; - /** @deprecated use `DateRangeMinBalanceParam$outboundSchema` instead. */ - export const outboundSchema = DateRangeMinBalanceParam$outboundSchema; - /** @deprecated use `DateRangeMinBalanceParam$Outbound` instead. */ - export type Outbound = DateRangeMinBalanceParam$Outbound; + /** @deprecated use `DateRangeMinBalanceParam$inboundSchema` instead. */ + export const inboundSchema = DateRangeMinBalanceParam$inboundSchema; + /** @deprecated use `DateRangeMinBalanceParam$outboundSchema` instead. */ + export const outboundSchema = DateRangeMinBalanceParam$outboundSchema; + /** @deprecated use `DateRangeMinBalanceParam$Outbound` instead. */ + export type Outbound = DateRangeMinBalanceParam$Outbound; } diff --git a/src/models/components/daterangenftholdersparam.ts b/src/models/components/daterangenftholdersparam.ts index f15b400..fdbe90f 100644 --- a/src/models/components/daterangenftholdersparam.ts +++ b/src/models/components/daterangenftholdersparam.ts @@ -5,42 +5,42 @@ import * as z from "zod"; export type DateRangeNftHoldersParam = { - firstDate: string; - lastDate: string; - evmChainId: string; - contractAddress: string; + firstDate: string; + lastDate: string; + evmChainId: string; + contractAddress: string; }; /** @internal */ export const DateRangeNftHoldersParam$inboundSchema: z.ZodType< - DateRangeNftHoldersParam, - z.ZodTypeDef, - unknown + DateRangeNftHoldersParam, + z.ZodTypeDef, + unknown > = z.object({ - firstDate: z.string(), - lastDate: z.string(), - evmChainId: z.string(), - contractAddress: z.string(), + firstDate: z.string(), + lastDate: z.string(), + evmChainId: z.string(), + contractAddress: z.string(), }); /** @internal */ export type DateRangeNftHoldersParam$Outbound = { - firstDate: string; - lastDate: string; - evmChainId: string; - contractAddress: string; + firstDate: string; + lastDate: string; + evmChainId: string; + contractAddress: string; }; /** @internal */ export const DateRangeNftHoldersParam$outboundSchema: z.ZodType< - DateRangeNftHoldersParam$Outbound, - z.ZodTypeDef, - DateRangeNftHoldersParam + DateRangeNftHoldersParam$Outbound, + z.ZodTypeDef, + DateRangeNftHoldersParam > = z.object({ - firstDate: z.string(), - lastDate: z.string(), - evmChainId: z.string(), - contractAddress: z.string(), + firstDate: z.string(), + lastDate: z.string(), + evmChainId: z.string(), + contractAddress: z.string(), }); /** @@ -48,10 +48,10 @@ export const DateRangeNftHoldersParam$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DateRangeNftHoldersParam$ { - /** @deprecated use `DateRangeNftHoldersParam$inboundSchema` instead. */ - export const inboundSchema = DateRangeNftHoldersParam$inboundSchema; - /** @deprecated use `DateRangeNftHoldersParam$outboundSchema` instead. */ - export const outboundSchema = DateRangeNftHoldersParam$outboundSchema; - /** @deprecated use `DateRangeNftHoldersParam$Outbound` instead. */ - export type Outbound = DateRangeNftHoldersParam$Outbound; + /** @deprecated use `DateRangeNftHoldersParam$inboundSchema` instead. */ + export const inboundSchema = DateRangeNftHoldersParam$inboundSchema; + /** @deprecated use `DateRangeNftHoldersParam$outboundSchema` instead. */ + export const outboundSchema = DateRangeNftHoldersParam$outboundSchema; + /** @deprecated use `DateRangeNftHoldersParam$Outbound` instead. */ + export type Outbound = DateRangeNftHoldersParam$Outbound; } diff --git a/src/models/components/daterangestarsarenaminbalanceparam.ts b/src/models/components/daterangestarsarenaminbalanceparam.ts index 36f09c1..48fc86e 100644 --- a/src/models/components/daterangestarsarenaminbalanceparam.ts +++ b/src/models/components/daterangestarsarenaminbalanceparam.ts @@ -5,42 +5,42 @@ import * as z from "zod"; export type DateRangeStarsArenaMinBalanceParam = { - firstDate: string; - lastDate: string; - minBalance: string; - subjectAddress: string; + firstDate: string; + lastDate: string; + minBalance: string; + subjectAddress: string; }; /** @internal */ export const DateRangeStarsArenaMinBalanceParam$inboundSchema: z.ZodType< - DateRangeStarsArenaMinBalanceParam, - z.ZodTypeDef, - unknown + DateRangeStarsArenaMinBalanceParam, + z.ZodTypeDef, + unknown > = z.object({ - firstDate: z.string(), - lastDate: z.string(), - minBalance: z.string(), - subjectAddress: z.string(), + firstDate: z.string(), + lastDate: z.string(), + minBalance: z.string(), + subjectAddress: z.string(), }); /** @internal */ export type DateRangeStarsArenaMinBalanceParam$Outbound = { - firstDate: string; - lastDate: string; - minBalance: string; - subjectAddress: string; + firstDate: string; + lastDate: string; + minBalance: string; + subjectAddress: string; }; /** @internal */ export const DateRangeStarsArenaMinBalanceParam$outboundSchema: z.ZodType< - DateRangeStarsArenaMinBalanceParam$Outbound, - z.ZodTypeDef, - DateRangeStarsArenaMinBalanceParam + DateRangeStarsArenaMinBalanceParam$Outbound, + z.ZodTypeDef, + DateRangeStarsArenaMinBalanceParam > = z.object({ - firstDate: z.string(), - lastDate: z.string(), - minBalance: z.string(), - subjectAddress: z.string(), + firstDate: z.string(), + lastDate: z.string(), + minBalance: z.string(), + subjectAddress: z.string(), }); /** @@ -48,10 +48,11 @@ export const DateRangeStarsArenaMinBalanceParam$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DateRangeStarsArenaMinBalanceParam$ { - /** @deprecated use `DateRangeStarsArenaMinBalanceParam$inboundSchema` instead. */ - export const inboundSchema = DateRangeStarsArenaMinBalanceParam$inboundSchema; - /** @deprecated use `DateRangeStarsArenaMinBalanceParam$outboundSchema` instead. */ - export const outboundSchema = DateRangeStarsArenaMinBalanceParam$outboundSchema; - /** @deprecated use `DateRangeStarsArenaMinBalanceParam$Outbound` instead. */ - export type Outbound = DateRangeStarsArenaMinBalanceParam$Outbound; + /** @deprecated use `DateRangeStarsArenaMinBalanceParam$inboundSchema` instead. */ + export const inboundSchema = DateRangeStarsArenaMinBalanceParam$inboundSchema; + /** @deprecated use `DateRangeStarsArenaMinBalanceParam$outboundSchema` instead. */ + export const outboundSchema = + DateRangeStarsArenaMinBalanceParam$outboundSchema; + /** @deprecated use `DateRangeStarsArenaMinBalanceParam$Outbound` instead. */ + export type Outbound = DateRangeStarsArenaMinBalanceParam$Outbound; } diff --git a/src/models/components/delegationstatustype.ts b/src/models/components/delegationstatustype.ts index e53f8c8..e69e43d 100644 --- a/src/models/components/delegationstatustype.ts +++ b/src/models/components/delegationstatustype.ts @@ -2,31 +2,33 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const DelegationStatusType = { - Completed: "completed", - Active: "active", - Pending: "pending", + Completed: "completed", + Active: "active", + Pending: "pending", } as const; export type DelegationStatusType = ClosedEnum; /** @internal */ -export const DelegationStatusType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(DelegationStatusType); +export const DelegationStatusType$inboundSchema: z.ZodNativeEnum< + typeof DelegationStatusType +> = z.nativeEnum(DelegationStatusType); /** @internal */ -export const DelegationStatusType$outboundSchema: z.ZodNativeEnum = - DelegationStatusType$inboundSchema; +export const DelegationStatusType$outboundSchema: z.ZodNativeEnum< + typeof DelegationStatusType +> = DelegationStatusType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DelegationStatusType$ { - /** @deprecated use `DelegationStatusType$inboundSchema` instead. */ - export const inboundSchema = DelegationStatusType$inboundSchema; - /** @deprecated use `DelegationStatusType$outboundSchema` instead. */ - export const outboundSchema = DelegationStatusType$outboundSchema; + /** @deprecated use `DelegationStatusType$inboundSchema` instead. */ + export const inboundSchema = DelegationStatusType$inboundSchema; + /** @deprecated use `DelegationStatusType$outboundSchema` instead. */ + export const outboundSchema = DelegationStatusType$outboundSchema; } diff --git a/src/models/components/delegatorsdetails.ts b/src/models/components/delegatorsdetails.ts index aa26497..84583b0 100644 --- a/src/models/components/delegatorsdetails.ts +++ b/src/models/components/delegatorsdetails.ts @@ -5,31 +5,34 @@ import * as z from "zod"; export type DelegatorsDetails = { - delegatorCount: number; - totalAmountStaked: string; + delegatorCount: number; + totalAmountStaked: string; }; /** @internal */ -export const DelegatorsDetails$inboundSchema: z.ZodType = - z.object({ - delegatorCount: z.number(), - totalAmountStaked: z.string(), - }); +export const DelegatorsDetails$inboundSchema: z.ZodType< + DelegatorsDetails, + z.ZodTypeDef, + unknown +> = z.object({ + delegatorCount: z.number(), + totalAmountStaked: z.string(), +}); /** @internal */ export type DelegatorsDetails$Outbound = { - delegatorCount: number; - totalAmountStaked: string; + delegatorCount: number; + totalAmountStaked: string; }; /** @internal */ export const DelegatorsDetails$outboundSchema: z.ZodType< - DelegatorsDetails$Outbound, - z.ZodTypeDef, - DelegatorsDetails + DelegatorsDetails$Outbound, + z.ZodTypeDef, + DelegatorsDetails > = z.object({ - delegatorCount: z.number(), - totalAmountStaked: z.string(), + delegatorCount: z.number(), + totalAmountStaked: z.string(), }); /** @@ -37,10 +40,10 @@ export const DelegatorsDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DelegatorsDetails$ { - /** @deprecated use `DelegatorsDetails$inboundSchema` instead. */ - export const inboundSchema = DelegatorsDetails$inboundSchema; - /** @deprecated use `DelegatorsDetails$outboundSchema` instead. */ - export const outboundSchema = DelegatorsDetails$outboundSchema; - /** @deprecated use `DelegatorsDetails$Outbound` instead. */ - export type Outbound = DelegatorsDetails$Outbound; + /** @deprecated use `DelegatorsDetails$inboundSchema` instead. */ + export const inboundSchema = DelegatorsDetails$inboundSchema; + /** @deprecated use `DelegatorsDetails$outboundSchema` instead. */ + export const outboundSchema = DelegatorsDetails$outboundSchema; + /** @deprecated use `DelegatorsDetails$Outbound` instead. */ + export type Outbound = DelegatorsDetails$Outbound; } diff --git a/src/models/components/deliveredsourcenotindexedteleportermessage.ts b/src/models/components/deliveredsourcenotindexedteleportermessage.ts index 18b60ee..1c3e678 100644 --- a/src/models/components/deliveredsourcenotindexedteleportermessage.ts +++ b/src/models/components/deliveredsourcenotindexedteleportermessage.ts @@ -2,124 +2,125 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - TeleporterDestinationTransaction, - TeleporterDestinationTransaction$inboundSchema, - TeleporterDestinationTransaction$Outbound, - TeleporterDestinationTransaction$outboundSchema, + TeleporterDestinationTransaction, + TeleporterDestinationTransaction$inboundSchema, + TeleporterDestinationTransaction$Outbound, + TeleporterDestinationTransaction$outboundSchema, } from "./teleporterdestinationtransaction.js"; import { - TeleporterReceipt, - TeleporterReceipt$inboundSchema, - TeleporterReceipt$Outbound, - TeleporterReceipt$outboundSchema, + TeleporterReceipt, + TeleporterReceipt$inboundSchema, + TeleporterReceipt$Outbound, + TeleporterReceipt$outboundSchema, } from "./teleporterreceipt.js"; import { - TeleporterRewardDetails, - TeleporterRewardDetails$inboundSchema, - TeleporterRewardDetails$Outbound, - TeleporterRewardDetails$outboundSchema, + TeleporterRewardDetails, + TeleporterRewardDetails$inboundSchema, + TeleporterRewardDetails$Outbound, + TeleporterRewardDetails$outboundSchema, } from "./teleporterrewarddetails.js"; -import * as z from "zod"; export const DeliveredSourceNotIndexedTeleporterMessageStatus = { - DeliveredSourceNotIndexed: "delivered_source_not_indexed", + DeliveredSourceNotIndexed: "delivered_source_not_indexed", } as const; export type DeliveredSourceNotIndexedTeleporterMessageStatus = ClosedEnum< - typeof DeliveredSourceNotIndexedTeleporterMessageStatus + typeof DeliveredSourceNotIndexedTeleporterMessageStatus >; export type DeliveredSourceNotIndexedTeleporterMessage = { - messageId: string; - teleporterContractAddress: string; - sourceBlockchainId: string; - destinationBlockchainId: string; - sourceEvmChainId: string; - destinationEvmChainId: string; - messageNonce: string; - from: string; - to: string; - data?: string | undefined; - messageExecuted: boolean; - receipts: Array; - receiptDelivered: boolean; - rewardDetails: TeleporterRewardDetails; - destinationTransaction: TeleporterDestinationTransaction; - status: DeliveredSourceNotIndexedTeleporterMessageStatus; + messageId: string; + teleporterContractAddress: string; + sourceBlockchainId: string; + destinationBlockchainId: string; + sourceEvmChainId: string; + destinationEvmChainId: string; + messageNonce: string; + from: string; + to: string; + data?: string | undefined; + messageExecuted: boolean; + receipts: Array; + receiptDelivered: boolean; + rewardDetails: TeleporterRewardDetails; + destinationTransaction: TeleporterDestinationTransaction; + status: DeliveredSourceNotIndexedTeleporterMessageStatus; }; /** @internal */ -export const DeliveredSourceNotIndexedTeleporterMessageStatus$inboundSchema: z.ZodNativeEnum< - typeof DeliveredSourceNotIndexedTeleporterMessageStatus -> = z.nativeEnum(DeliveredSourceNotIndexedTeleporterMessageStatus); +export const DeliveredSourceNotIndexedTeleporterMessageStatus$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(DeliveredSourceNotIndexedTeleporterMessageStatus); /** @internal */ -export const DeliveredSourceNotIndexedTeleporterMessageStatus$outboundSchema: z.ZodNativeEnum< - typeof DeliveredSourceNotIndexedTeleporterMessageStatus -> = DeliveredSourceNotIndexedTeleporterMessageStatus$inboundSchema; +export const DeliveredSourceNotIndexedTeleporterMessageStatus$outboundSchema: + z.ZodNativeEnum = + DeliveredSourceNotIndexedTeleporterMessageStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeliveredSourceNotIndexedTeleporterMessageStatus$ { - /** @deprecated use `DeliveredSourceNotIndexedTeleporterMessageStatus$inboundSchema` instead. */ - export const inboundSchema = DeliveredSourceNotIndexedTeleporterMessageStatus$inboundSchema; - /** @deprecated use `DeliveredSourceNotIndexedTeleporterMessageStatus$outboundSchema` instead. */ - export const outboundSchema = DeliveredSourceNotIndexedTeleporterMessageStatus$outboundSchema; + /** @deprecated use `DeliveredSourceNotIndexedTeleporterMessageStatus$inboundSchema` instead. */ + export const inboundSchema = + DeliveredSourceNotIndexedTeleporterMessageStatus$inboundSchema; + /** @deprecated use `DeliveredSourceNotIndexedTeleporterMessageStatus$outboundSchema` instead. */ + export const outboundSchema = + DeliveredSourceNotIndexedTeleporterMessageStatus$outboundSchema; } /** @internal */ -export const DeliveredSourceNotIndexedTeleporterMessage$inboundSchema: z.ZodType< - DeliveredSourceNotIndexedTeleporterMessage, - z.ZodTypeDef, - unknown -> = z.object({ - messageId: z.string(), - teleporterContractAddress: z.string(), - sourceBlockchainId: z.string(), - destinationBlockchainId: z.string(), - sourceEvmChainId: z.string(), - destinationEvmChainId: z.string(), - messageNonce: z.string(), - from: z.string(), - to: z.string(), - data: z.string().optional(), - messageExecuted: z.boolean(), - receipts: z.array(TeleporterReceipt$inboundSchema), - receiptDelivered: z.boolean(), - rewardDetails: TeleporterRewardDetails$inboundSchema, - destinationTransaction: TeleporterDestinationTransaction$inboundSchema, - status: DeliveredSourceNotIndexedTeleporterMessageStatus$inboundSchema, -}); +export const DeliveredSourceNotIndexedTeleporterMessage$inboundSchema: + z.ZodType = + z.object({ + messageId: z.string(), + teleporterContractAddress: z.string(), + sourceBlockchainId: z.string(), + destinationBlockchainId: z.string(), + sourceEvmChainId: z.string(), + destinationEvmChainId: z.string(), + messageNonce: z.string(), + from: z.string(), + to: z.string(), + data: z.string().optional(), + messageExecuted: z.boolean(), + receipts: z.array(TeleporterReceipt$inboundSchema), + receiptDelivered: z.boolean(), + rewardDetails: TeleporterRewardDetails$inboundSchema, + destinationTransaction: TeleporterDestinationTransaction$inboundSchema, + status: DeliveredSourceNotIndexedTeleporterMessageStatus$inboundSchema, + }); /** @internal */ export type DeliveredSourceNotIndexedTeleporterMessage$Outbound = { - messageId: string; - teleporterContractAddress: string; - sourceBlockchainId: string; - destinationBlockchainId: string; - sourceEvmChainId: string; - destinationEvmChainId: string; - messageNonce: string; - from: string; - to: string; - data?: string | undefined; - messageExecuted: boolean; - receipts: Array; - receiptDelivered: boolean; - rewardDetails: TeleporterRewardDetails$Outbound; - destinationTransaction: TeleporterDestinationTransaction$Outbound; - status: string; + messageId: string; + teleporterContractAddress: string; + sourceBlockchainId: string; + destinationBlockchainId: string; + sourceEvmChainId: string; + destinationEvmChainId: string; + messageNonce: string; + from: string; + to: string; + data?: string | undefined; + messageExecuted: boolean; + receipts: Array; + receiptDelivered: boolean; + rewardDetails: TeleporterRewardDetails$Outbound; + destinationTransaction: TeleporterDestinationTransaction$Outbound; + status: string; }; /** @internal */ -export const DeliveredSourceNotIndexedTeleporterMessage$outboundSchema: z.ZodType< +export const DeliveredSourceNotIndexedTeleporterMessage$outboundSchema: + z.ZodType< DeliveredSourceNotIndexedTeleporterMessage$Outbound, z.ZodTypeDef, DeliveredSourceNotIndexedTeleporterMessage -> = z.object({ + > = z.object({ messageId: z.string(), teleporterContractAddress: z.string(), sourceBlockchainId: z.string(), @@ -136,17 +137,19 @@ export const DeliveredSourceNotIndexedTeleporterMessage$outboundSchema: z.ZodTyp rewardDetails: TeleporterRewardDetails$outboundSchema, destinationTransaction: TeleporterDestinationTransaction$outboundSchema, status: DeliveredSourceNotIndexedTeleporterMessageStatus$outboundSchema, -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeliveredSourceNotIndexedTeleporterMessage$ { - /** @deprecated use `DeliveredSourceNotIndexedTeleporterMessage$inboundSchema` instead. */ - export const inboundSchema = DeliveredSourceNotIndexedTeleporterMessage$inboundSchema; - /** @deprecated use `DeliveredSourceNotIndexedTeleporterMessage$outboundSchema` instead. */ - export const outboundSchema = DeliveredSourceNotIndexedTeleporterMessage$outboundSchema; - /** @deprecated use `DeliveredSourceNotIndexedTeleporterMessage$Outbound` instead. */ - export type Outbound = DeliveredSourceNotIndexedTeleporterMessage$Outbound; + /** @deprecated use `DeliveredSourceNotIndexedTeleporterMessage$inboundSchema` instead. */ + export const inboundSchema = + DeliveredSourceNotIndexedTeleporterMessage$inboundSchema; + /** @deprecated use `DeliveredSourceNotIndexedTeleporterMessage$outboundSchema` instead. */ + export const outboundSchema = + DeliveredSourceNotIndexedTeleporterMessage$outboundSchema; + /** @deprecated use `DeliveredSourceNotIndexedTeleporterMessage$Outbound` instead. */ + export type Outbound = DeliveredSourceNotIndexedTeleporterMessage$Outbound; } diff --git a/src/models/components/deliveredteleportermessage.ts b/src/models/components/deliveredteleportermessage.ts index dae9d0a..ef7dc17 100644 --- a/src/models/components/deliveredteleportermessage.ts +++ b/src/models/components/deliveredteleportermessage.ts @@ -2,66 +2,68 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - TeleporterDestinationTransaction, - TeleporterDestinationTransaction$inboundSchema, - TeleporterDestinationTransaction$Outbound, - TeleporterDestinationTransaction$outboundSchema, + TeleporterDestinationTransaction, + TeleporterDestinationTransaction$inboundSchema, + TeleporterDestinationTransaction$Outbound, + TeleporterDestinationTransaction$outboundSchema, } from "./teleporterdestinationtransaction.js"; import { - TeleporterReceipt, - TeleporterReceipt$inboundSchema, - TeleporterReceipt$Outbound, - TeleporterReceipt$outboundSchema, + TeleporterReceipt, + TeleporterReceipt$inboundSchema, + TeleporterReceipt$Outbound, + TeleporterReceipt$outboundSchema, } from "./teleporterreceipt.js"; import { - TeleporterRewardDetails, - TeleporterRewardDetails$inboundSchema, - TeleporterRewardDetails$Outbound, - TeleporterRewardDetails$outboundSchema, + TeleporterRewardDetails, + TeleporterRewardDetails$inboundSchema, + TeleporterRewardDetails$Outbound, + TeleporterRewardDetails$outboundSchema, } from "./teleporterrewarddetails.js"; import { - TeleporterSourceTransaction, - TeleporterSourceTransaction$inboundSchema, - TeleporterSourceTransaction$Outbound, - TeleporterSourceTransaction$outboundSchema, + TeleporterSourceTransaction, + TeleporterSourceTransaction$inboundSchema, + TeleporterSourceTransaction$Outbound, + TeleporterSourceTransaction$outboundSchema, } from "./teleportersourcetransaction.js"; -import * as z from "zod"; export const DeliveredTeleporterMessageStatus = { - Delivered: "delivered", + Delivered: "delivered", } as const; -export type DeliveredTeleporterMessageStatus = ClosedEnum; +export type DeliveredTeleporterMessageStatus = ClosedEnum< + typeof DeliveredTeleporterMessageStatus +>; export type DeliveredTeleporterMessage = { - messageId: string; - teleporterContractAddress: string; - sourceBlockchainId: string; - destinationBlockchainId: string; - sourceEvmChainId: string; - destinationEvmChainId: string; - messageNonce: string; - from: string; - to: string; - data?: string | undefined; - messageExecuted: boolean; - receipts: Array; - receiptDelivered: boolean; - rewardDetails: TeleporterRewardDetails; - sourceTransaction: TeleporterSourceTransaction; - destinationTransaction: TeleporterDestinationTransaction; - status: DeliveredTeleporterMessageStatus; + messageId: string; + teleporterContractAddress: string; + sourceBlockchainId: string; + destinationBlockchainId: string; + sourceEvmChainId: string; + destinationEvmChainId: string; + messageNonce: string; + from: string; + to: string; + data?: string | undefined; + messageExecuted: boolean; + receipts: Array; + receiptDelivered: boolean; + rewardDetails: TeleporterRewardDetails; + sourceTransaction: TeleporterSourceTransaction; + destinationTransaction: TeleporterDestinationTransaction; + status: DeliveredTeleporterMessageStatus; }; /** @internal */ export const DeliveredTeleporterMessageStatus$inboundSchema: z.ZodNativeEnum< - typeof DeliveredTeleporterMessageStatus + typeof DeliveredTeleporterMessageStatus > = z.nativeEnum(DeliveredTeleporterMessageStatus); /** @internal */ export const DeliveredTeleporterMessageStatus$outboundSchema: z.ZodNativeEnum< - typeof DeliveredTeleporterMessageStatus + typeof DeliveredTeleporterMessageStatus > = DeliveredTeleporterMessageStatus$inboundSchema; /** @@ -69,81 +71,81 @@ export const DeliveredTeleporterMessageStatus$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeliveredTeleporterMessageStatus$ { - /** @deprecated use `DeliveredTeleporterMessageStatus$inboundSchema` instead. */ - export const inboundSchema = DeliveredTeleporterMessageStatus$inboundSchema; - /** @deprecated use `DeliveredTeleporterMessageStatus$outboundSchema` instead. */ - export const outboundSchema = DeliveredTeleporterMessageStatus$outboundSchema; + /** @deprecated use `DeliveredTeleporterMessageStatus$inboundSchema` instead. */ + export const inboundSchema = DeliveredTeleporterMessageStatus$inboundSchema; + /** @deprecated use `DeliveredTeleporterMessageStatus$outboundSchema` instead. */ + export const outboundSchema = DeliveredTeleporterMessageStatus$outboundSchema; } /** @internal */ export const DeliveredTeleporterMessage$inboundSchema: z.ZodType< - DeliveredTeleporterMessage, - z.ZodTypeDef, - unknown + DeliveredTeleporterMessage, + z.ZodTypeDef, + unknown > = z.object({ - messageId: z.string(), - teleporterContractAddress: z.string(), - sourceBlockchainId: z.string(), - destinationBlockchainId: z.string(), - sourceEvmChainId: z.string(), - destinationEvmChainId: z.string(), - messageNonce: z.string(), - from: z.string(), - to: z.string(), - data: z.string().optional(), - messageExecuted: z.boolean(), - receipts: z.array(TeleporterReceipt$inboundSchema), - receiptDelivered: z.boolean(), - rewardDetails: TeleporterRewardDetails$inboundSchema, - sourceTransaction: TeleporterSourceTransaction$inboundSchema, - destinationTransaction: TeleporterDestinationTransaction$inboundSchema, - status: DeliveredTeleporterMessageStatus$inboundSchema, + messageId: z.string(), + teleporterContractAddress: z.string(), + sourceBlockchainId: z.string(), + destinationBlockchainId: z.string(), + sourceEvmChainId: z.string(), + destinationEvmChainId: z.string(), + messageNonce: z.string(), + from: z.string(), + to: z.string(), + data: z.string().optional(), + messageExecuted: z.boolean(), + receipts: z.array(TeleporterReceipt$inboundSchema), + receiptDelivered: z.boolean(), + rewardDetails: TeleporterRewardDetails$inboundSchema, + sourceTransaction: TeleporterSourceTransaction$inboundSchema, + destinationTransaction: TeleporterDestinationTransaction$inboundSchema, + status: DeliveredTeleporterMessageStatus$inboundSchema, }); /** @internal */ export type DeliveredTeleporterMessage$Outbound = { - messageId: string; - teleporterContractAddress: string; - sourceBlockchainId: string; - destinationBlockchainId: string; - sourceEvmChainId: string; - destinationEvmChainId: string; - messageNonce: string; - from: string; - to: string; - data?: string | undefined; - messageExecuted: boolean; - receipts: Array; - receiptDelivered: boolean; - rewardDetails: TeleporterRewardDetails$Outbound; - sourceTransaction: TeleporterSourceTransaction$Outbound; - destinationTransaction: TeleporterDestinationTransaction$Outbound; - status: string; + messageId: string; + teleporterContractAddress: string; + sourceBlockchainId: string; + destinationBlockchainId: string; + sourceEvmChainId: string; + destinationEvmChainId: string; + messageNonce: string; + from: string; + to: string; + data?: string | undefined; + messageExecuted: boolean; + receipts: Array; + receiptDelivered: boolean; + rewardDetails: TeleporterRewardDetails$Outbound; + sourceTransaction: TeleporterSourceTransaction$Outbound; + destinationTransaction: TeleporterDestinationTransaction$Outbound; + status: string; }; /** @internal */ export const DeliveredTeleporterMessage$outboundSchema: z.ZodType< - DeliveredTeleporterMessage$Outbound, - z.ZodTypeDef, - DeliveredTeleporterMessage + DeliveredTeleporterMessage$Outbound, + z.ZodTypeDef, + DeliveredTeleporterMessage > = z.object({ - messageId: z.string(), - teleporterContractAddress: z.string(), - sourceBlockchainId: z.string(), - destinationBlockchainId: z.string(), - sourceEvmChainId: z.string(), - destinationEvmChainId: z.string(), - messageNonce: z.string(), - from: z.string(), - to: z.string(), - data: z.string().optional(), - messageExecuted: z.boolean(), - receipts: z.array(TeleporterReceipt$outboundSchema), - receiptDelivered: z.boolean(), - rewardDetails: TeleporterRewardDetails$outboundSchema, - sourceTransaction: TeleporterSourceTransaction$outboundSchema, - destinationTransaction: TeleporterDestinationTransaction$outboundSchema, - status: DeliveredTeleporterMessageStatus$outboundSchema, + messageId: z.string(), + teleporterContractAddress: z.string(), + sourceBlockchainId: z.string(), + destinationBlockchainId: z.string(), + sourceEvmChainId: z.string(), + destinationEvmChainId: z.string(), + messageNonce: z.string(), + from: z.string(), + to: z.string(), + data: z.string().optional(), + messageExecuted: z.boolean(), + receipts: z.array(TeleporterReceipt$outboundSchema), + receiptDelivered: z.boolean(), + rewardDetails: TeleporterRewardDetails$outboundSchema, + sourceTransaction: TeleporterSourceTransaction$outboundSchema, + destinationTransaction: TeleporterDestinationTransaction$outboundSchema, + status: DeliveredTeleporterMessageStatus$outboundSchema, }); /** @@ -151,10 +153,10 @@ export const DeliveredTeleporterMessage$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeliveredTeleporterMessage$ { - /** @deprecated use `DeliveredTeleporterMessage$inboundSchema` instead. */ - export const inboundSchema = DeliveredTeleporterMessage$inboundSchema; - /** @deprecated use `DeliveredTeleporterMessage$outboundSchema` instead. */ - export const outboundSchema = DeliveredTeleporterMessage$outboundSchema; - /** @deprecated use `DeliveredTeleporterMessage$Outbound` instead. */ - export type Outbound = DeliveredTeleporterMessage$Outbound; + /** @deprecated use `DeliveredTeleporterMessage$inboundSchema` instead. */ + export const inboundSchema = DeliveredTeleporterMessage$inboundSchema; + /** @deprecated use `DeliveredTeleporterMessage$outboundSchema` instead. */ + export const outboundSchema = DeliveredTeleporterMessage$outboundSchema; + /** @deprecated use `DeliveredTeleporterMessage$Outbound` instead. */ + export type Outbound = DeliveredTeleporterMessage$Outbound; } diff --git a/src/models/components/erc1155contract.ts b/src/models/components/erc1155contract.ts index 55fbcc6..1cfd041 100644 --- a/src/models/components/erc1155contract.ts +++ b/src/models/components/erc1155contract.ts @@ -2,140 +2,145 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - ContractDeploymentDetails, - ContractDeploymentDetails$inboundSchema, - ContractDeploymentDetails$Outbound, - ContractDeploymentDetails$outboundSchema, + ContractDeploymentDetails, + ContractDeploymentDetails$inboundSchema, + ContractDeploymentDetails$Outbound, + ContractDeploymentDetails$outboundSchema, } from "./contractdeploymentdetails.js"; import { - ImageAsset, - ImageAsset$inboundSchema, - ImageAsset$Outbound, - ImageAsset$outboundSchema, + ImageAsset, + ImageAsset$inboundSchema, + ImageAsset$Outbound, + ImageAsset$outboundSchema, } from "./imageasset.js"; import { - PricingProviders, - PricingProviders$inboundSchema, - PricingProviders$Outbound, - PricingProviders$outboundSchema, + PricingProviders, + PricingProviders$inboundSchema, + PricingProviders$Outbound, + PricingProviders$outboundSchema, } from "./pricingproviders.js"; import { - ResourceLink, - ResourceLink$inboundSchema, - ResourceLink$Outbound, - ResourceLink$outboundSchema, + ResourceLink, + ResourceLink$inboundSchema, + ResourceLink$Outbound, + ResourceLink$outboundSchema, } from "./resourcelink.js"; -import * as z from "zod"; export const Erc1155ContractErcType = { - Erc1155: "ERC-1155", + Erc1155: "ERC-1155", } as const; export type Erc1155ContractErcType = ClosedEnum; export type Erc1155Contract = { - /** - * The contract name. - */ - name?: string | undefined; - description?: string | undefined; - officialSite?: string | undefined; - email?: string | undefined; - logoAsset?: ImageAsset | undefined; - bannerAsset?: ImageAsset | undefined; - color?: string | undefined; - resourceLinks?: Array | undefined; - tags?: Array | undefined; - /** - * A wallet or contract address in mixed-case checksum encoding. - */ - address: string; - deploymentDetails: ContractDeploymentDetails; - ercType: Erc1155ContractErcType; - /** - * The contract symbol. - */ - symbol?: string | undefined; - pricingProviders?: PricingProviders | undefined; + /** + * The contract name. + */ + name?: string | undefined; + description?: string | undefined; + officialSite?: string | undefined; + email?: string | undefined; + logoAsset?: ImageAsset | undefined; + bannerAsset?: ImageAsset | undefined; + color?: string | undefined; + resourceLinks?: Array | undefined; + tags?: Array | undefined; + /** + * A wallet or contract address in mixed-case checksum encoding. + */ + address: string; + deploymentDetails: ContractDeploymentDetails; + ercType: Erc1155ContractErcType; + /** + * The contract symbol. + */ + symbol?: string | undefined; + pricingProviders?: PricingProviders | undefined; }; /** @internal */ -export const Erc1155ContractErcType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(Erc1155ContractErcType); +export const Erc1155ContractErcType$inboundSchema: z.ZodNativeEnum< + typeof Erc1155ContractErcType +> = z.nativeEnum(Erc1155ContractErcType); /** @internal */ -export const Erc1155ContractErcType$outboundSchema: z.ZodNativeEnum = - Erc1155ContractErcType$inboundSchema; +export const Erc1155ContractErcType$outboundSchema: z.ZodNativeEnum< + typeof Erc1155ContractErcType +> = Erc1155ContractErcType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc1155ContractErcType$ { - /** @deprecated use `Erc1155ContractErcType$inboundSchema` instead. */ - export const inboundSchema = Erc1155ContractErcType$inboundSchema; - /** @deprecated use `Erc1155ContractErcType$outboundSchema` instead. */ - export const outboundSchema = Erc1155ContractErcType$outboundSchema; + /** @deprecated use `Erc1155ContractErcType$inboundSchema` instead. */ + export const inboundSchema = Erc1155ContractErcType$inboundSchema; + /** @deprecated use `Erc1155ContractErcType$outboundSchema` instead. */ + export const outboundSchema = Erc1155ContractErcType$outboundSchema; } /** @internal */ -export const Erc1155Contract$inboundSchema: z.ZodType = - z.object({ - name: z.string().optional(), - description: z.string().optional(), - officialSite: z.string().optional(), - email: z.string().optional(), - logoAsset: ImageAsset$inboundSchema.optional(), - bannerAsset: ImageAsset$inboundSchema.optional(), - color: z.string().optional(), - resourceLinks: z.array(ResourceLink$inboundSchema).optional(), - tags: z.array(z.string()).optional(), - address: z.string(), - deploymentDetails: ContractDeploymentDetails$inboundSchema, - ercType: Erc1155ContractErcType$inboundSchema, - symbol: z.string().optional(), - pricingProviders: PricingProviders$inboundSchema.optional(), - }); +export const Erc1155Contract$inboundSchema: z.ZodType< + Erc1155Contract, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + description: z.string().optional(), + officialSite: z.string().optional(), + email: z.string().optional(), + logoAsset: ImageAsset$inboundSchema.optional(), + bannerAsset: ImageAsset$inboundSchema.optional(), + color: z.string().optional(), + resourceLinks: z.array(ResourceLink$inboundSchema).optional(), + tags: z.array(z.string()).optional(), + address: z.string(), + deploymentDetails: ContractDeploymentDetails$inboundSchema, + ercType: Erc1155ContractErcType$inboundSchema, + symbol: z.string().optional(), + pricingProviders: PricingProviders$inboundSchema.optional(), +}); /** @internal */ export type Erc1155Contract$Outbound = { - name?: string | undefined; - description?: string | undefined; - officialSite?: string | undefined; - email?: string | undefined; - logoAsset?: ImageAsset$Outbound | undefined; - bannerAsset?: ImageAsset$Outbound | undefined; - color?: string | undefined; - resourceLinks?: Array | undefined; - tags?: Array | undefined; - address: string; - deploymentDetails: ContractDeploymentDetails$Outbound; - ercType: string; - symbol?: string | undefined; - pricingProviders?: PricingProviders$Outbound | undefined; + name?: string | undefined; + description?: string | undefined; + officialSite?: string | undefined; + email?: string | undefined; + logoAsset?: ImageAsset$Outbound | undefined; + bannerAsset?: ImageAsset$Outbound | undefined; + color?: string | undefined; + resourceLinks?: Array | undefined; + tags?: Array | undefined; + address: string; + deploymentDetails: ContractDeploymentDetails$Outbound; + ercType: string; + symbol?: string | undefined; + pricingProviders?: PricingProviders$Outbound | undefined; }; /** @internal */ export const Erc1155Contract$outboundSchema: z.ZodType< - Erc1155Contract$Outbound, - z.ZodTypeDef, - Erc1155Contract + Erc1155Contract$Outbound, + z.ZodTypeDef, + Erc1155Contract > = z.object({ - name: z.string().optional(), - description: z.string().optional(), - officialSite: z.string().optional(), - email: z.string().optional(), - logoAsset: ImageAsset$outboundSchema.optional(), - bannerAsset: ImageAsset$outboundSchema.optional(), - color: z.string().optional(), - resourceLinks: z.array(ResourceLink$outboundSchema).optional(), - tags: z.array(z.string()).optional(), - address: z.string(), - deploymentDetails: ContractDeploymentDetails$outboundSchema, - ercType: Erc1155ContractErcType$outboundSchema, - symbol: z.string().optional(), - pricingProviders: PricingProviders$outboundSchema.optional(), + name: z.string().optional(), + description: z.string().optional(), + officialSite: z.string().optional(), + email: z.string().optional(), + logoAsset: ImageAsset$outboundSchema.optional(), + bannerAsset: ImageAsset$outboundSchema.optional(), + color: z.string().optional(), + resourceLinks: z.array(ResourceLink$outboundSchema).optional(), + tags: z.array(z.string()).optional(), + address: z.string(), + deploymentDetails: ContractDeploymentDetails$outboundSchema, + ercType: Erc1155ContractErcType$outboundSchema, + symbol: z.string().optional(), + pricingProviders: PricingProviders$outboundSchema.optional(), }); /** @@ -143,10 +148,10 @@ export const Erc1155Contract$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc1155Contract$ { - /** @deprecated use `Erc1155Contract$inboundSchema` instead. */ - export const inboundSchema = Erc1155Contract$inboundSchema; - /** @deprecated use `Erc1155Contract$outboundSchema` instead. */ - export const outboundSchema = Erc1155Contract$outboundSchema; - /** @deprecated use `Erc1155Contract$Outbound` instead. */ - export type Outbound = Erc1155Contract$Outbound; + /** @deprecated use `Erc1155Contract$inboundSchema` instead. */ + export const inboundSchema = Erc1155Contract$inboundSchema; + /** @deprecated use `Erc1155Contract$outboundSchema` instead. */ + export const outboundSchema = Erc1155Contract$outboundSchema; + /** @deprecated use `Erc1155Contract$Outbound` instead. */ + export type Outbound = Erc1155Contract$Outbound; } diff --git a/src/models/components/erc1155token.ts b/src/models/components/erc1155token.ts index 1b266ba..1be3951 100644 --- a/src/models/components/erc1155token.ts +++ b/src/models/components/erc1155token.ts @@ -2,79 +2,85 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - Erc1155TokenMetadata, - Erc1155TokenMetadata$inboundSchema, - Erc1155TokenMetadata$Outbound, - Erc1155TokenMetadata$outboundSchema, + Erc1155TokenMetadata, + Erc1155TokenMetadata$inboundSchema, + Erc1155TokenMetadata$Outbound, + Erc1155TokenMetadata$outboundSchema, } from "./erc1155tokenmetadata.js"; -import * as z from "zod"; export const Erc1155TokenErcType = { - Erc1155: "ERC-1155", + Erc1155: "ERC-1155", } as const; export type Erc1155TokenErcType = ClosedEnum; export type Erc1155Token = { - /** - * A wallet or contract address in mixed-case checksum encoding. - */ - address: string; - ercType: Erc1155TokenErcType; - tokenId: string; - tokenUri: string; - metadata: Erc1155TokenMetadata; + /** + * A wallet or contract address in mixed-case checksum encoding. + */ + address: string; + ercType: Erc1155TokenErcType; + tokenId: string; + tokenUri: string; + metadata: Erc1155TokenMetadata; }; /** @internal */ -export const Erc1155TokenErcType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(Erc1155TokenErcType); +export const Erc1155TokenErcType$inboundSchema: z.ZodNativeEnum< + typeof Erc1155TokenErcType +> = z.nativeEnum(Erc1155TokenErcType); /** @internal */ -export const Erc1155TokenErcType$outboundSchema: z.ZodNativeEnum = - Erc1155TokenErcType$inboundSchema; +export const Erc1155TokenErcType$outboundSchema: z.ZodNativeEnum< + typeof Erc1155TokenErcType +> = Erc1155TokenErcType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc1155TokenErcType$ { - /** @deprecated use `Erc1155TokenErcType$inboundSchema` instead. */ - export const inboundSchema = Erc1155TokenErcType$inboundSchema; - /** @deprecated use `Erc1155TokenErcType$outboundSchema` instead. */ - export const outboundSchema = Erc1155TokenErcType$outboundSchema; + /** @deprecated use `Erc1155TokenErcType$inboundSchema` instead. */ + export const inboundSchema = Erc1155TokenErcType$inboundSchema; + /** @deprecated use `Erc1155TokenErcType$outboundSchema` instead. */ + export const outboundSchema = Erc1155TokenErcType$outboundSchema; } /** @internal */ -export const Erc1155Token$inboundSchema: z.ZodType = z.object({ - address: z.string(), - ercType: Erc1155TokenErcType$inboundSchema, - tokenId: z.string(), - tokenUri: z.string(), - metadata: Erc1155TokenMetadata$inboundSchema, +export const Erc1155Token$inboundSchema: z.ZodType< + Erc1155Token, + z.ZodTypeDef, + unknown +> = z.object({ + address: z.string(), + ercType: Erc1155TokenErcType$inboundSchema, + tokenId: z.string(), + tokenUri: z.string(), + metadata: Erc1155TokenMetadata$inboundSchema, }); /** @internal */ export type Erc1155Token$Outbound = { - address: string; - ercType: string; - tokenId: string; - tokenUri: string; - metadata: Erc1155TokenMetadata$Outbound; + address: string; + ercType: string; + tokenId: string; + tokenUri: string; + metadata: Erc1155TokenMetadata$Outbound; }; /** @internal */ export const Erc1155Token$outboundSchema: z.ZodType< - Erc1155Token$Outbound, - z.ZodTypeDef, - Erc1155Token + Erc1155Token$Outbound, + z.ZodTypeDef, + Erc1155Token > = z.object({ - address: z.string(), - ercType: Erc1155TokenErcType$outboundSchema, - tokenId: z.string(), - tokenUri: z.string(), - metadata: Erc1155TokenMetadata$outboundSchema, + address: z.string(), + ercType: Erc1155TokenErcType$outboundSchema, + tokenId: z.string(), + tokenUri: z.string(), + metadata: Erc1155TokenMetadata$outboundSchema, }); /** @@ -82,10 +88,10 @@ export const Erc1155Token$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc1155Token$ { - /** @deprecated use `Erc1155Token$inboundSchema` instead. */ - export const inboundSchema = Erc1155Token$inboundSchema; - /** @deprecated use `Erc1155Token$outboundSchema` instead. */ - export const outboundSchema = Erc1155Token$outboundSchema; - /** @deprecated use `Erc1155Token$Outbound` instead. */ - export type Outbound = Erc1155Token$Outbound; + /** @deprecated use `Erc1155Token$inboundSchema` instead. */ + export const inboundSchema = Erc1155Token$inboundSchema; + /** @deprecated use `Erc1155Token$outboundSchema` instead. */ + export const outboundSchema = Erc1155Token$outboundSchema; + /** @deprecated use `Erc1155Token$Outbound` instead. */ + export type Outbound = Erc1155Token$Outbound; } diff --git a/src/models/components/erc1155tokenbalance.ts b/src/models/components/erc1155tokenbalance.ts index d5644ed..7cfb6e9 100644 --- a/src/models/components/erc1155tokenbalance.ts +++ b/src/models/components/erc1155tokenbalance.ts @@ -2,47 +2,49 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - Erc1155TokenMetadata, - Erc1155TokenMetadata$inboundSchema, - Erc1155TokenMetadata$Outbound, - Erc1155TokenMetadata$outboundSchema, + Erc1155TokenMetadata, + Erc1155TokenMetadata$inboundSchema, + Erc1155TokenMetadata$Outbound, + Erc1155TokenMetadata$outboundSchema, } from "./erc1155tokenmetadata.js"; -import * as z from "zod"; export const Erc1155TokenBalanceErcType = { - Erc1155: "ERC-1155", + Erc1155: "ERC-1155", } as const; -export type Erc1155TokenBalanceErcType = ClosedEnum; +export type Erc1155TokenBalanceErcType = ClosedEnum< + typeof Erc1155TokenBalanceErcType +>; export type Erc1155TokenBalance = { - /** - * A wallet or contract address in mixed-case checksum encoding. - */ - address: string; - ercType: Erc1155TokenBalanceErcType; - tokenId: string; - tokenUri: string; - metadata: Erc1155TokenMetadata; - /** - * The evm chain id. - */ - chainId: string; - /** - * The address balance for the token, in units specified by the `decimals` value for the contract. - */ - balance: string; + /** + * A wallet or contract address in mixed-case checksum encoding. + */ + address: string; + ercType: Erc1155TokenBalanceErcType; + tokenId: string; + tokenUri: string; + metadata: Erc1155TokenMetadata; + /** + * The evm chain id. + */ + chainId: string; + /** + * The address balance for the token, in units specified by the `decimals` value for the contract. + */ + balance: string; }; /** @internal */ export const Erc1155TokenBalanceErcType$inboundSchema: z.ZodNativeEnum< - typeof Erc1155TokenBalanceErcType + typeof Erc1155TokenBalanceErcType > = z.nativeEnum(Erc1155TokenBalanceErcType); /** @internal */ export const Erc1155TokenBalanceErcType$outboundSchema: z.ZodNativeEnum< - typeof Erc1155TokenBalanceErcType + typeof Erc1155TokenBalanceErcType > = Erc1155TokenBalanceErcType$inboundSchema; /** @@ -50,51 +52,51 @@ export const Erc1155TokenBalanceErcType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc1155TokenBalanceErcType$ { - /** @deprecated use `Erc1155TokenBalanceErcType$inboundSchema` instead. */ - export const inboundSchema = Erc1155TokenBalanceErcType$inboundSchema; - /** @deprecated use `Erc1155TokenBalanceErcType$outboundSchema` instead. */ - export const outboundSchema = Erc1155TokenBalanceErcType$outboundSchema; + /** @deprecated use `Erc1155TokenBalanceErcType$inboundSchema` instead. */ + export const inboundSchema = Erc1155TokenBalanceErcType$inboundSchema; + /** @deprecated use `Erc1155TokenBalanceErcType$outboundSchema` instead. */ + export const outboundSchema = Erc1155TokenBalanceErcType$outboundSchema; } /** @internal */ export const Erc1155TokenBalance$inboundSchema: z.ZodType< - Erc1155TokenBalance, - z.ZodTypeDef, - unknown + Erc1155TokenBalance, + z.ZodTypeDef, + unknown > = z.object({ - address: z.string(), - ercType: Erc1155TokenBalanceErcType$inboundSchema, - tokenId: z.string(), - tokenUri: z.string(), - metadata: Erc1155TokenMetadata$inboundSchema, - chainId: z.string(), - balance: z.string(), + address: z.string(), + ercType: Erc1155TokenBalanceErcType$inboundSchema, + tokenId: z.string(), + tokenUri: z.string(), + metadata: Erc1155TokenMetadata$inboundSchema, + chainId: z.string(), + balance: z.string(), }); /** @internal */ export type Erc1155TokenBalance$Outbound = { - address: string; - ercType: string; - tokenId: string; - tokenUri: string; - metadata: Erc1155TokenMetadata$Outbound; - chainId: string; - balance: string; + address: string; + ercType: string; + tokenId: string; + tokenUri: string; + metadata: Erc1155TokenMetadata$Outbound; + chainId: string; + balance: string; }; /** @internal */ export const Erc1155TokenBalance$outboundSchema: z.ZodType< - Erc1155TokenBalance$Outbound, - z.ZodTypeDef, - Erc1155TokenBalance + Erc1155TokenBalance$Outbound, + z.ZodTypeDef, + Erc1155TokenBalance > = z.object({ - address: z.string(), - ercType: Erc1155TokenBalanceErcType$outboundSchema, - tokenId: z.string(), - tokenUri: z.string(), - metadata: Erc1155TokenMetadata$outboundSchema, - chainId: z.string(), - balance: z.string(), + address: z.string(), + ercType: Erc1155TokenBalanceErcType$outboundSchema, + tokenId: z.string(), + tokenUri: z.string(), + metadata: Erc1155TokenMetadata$outboundSchema, + chainId: z.string(), + balance: z.string(), }); /** @@ -102,10 +104,10 @@ export const Erc1155TokenBalance$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc1155TokenBalance$ { - /** @deprecated use `Erc1155TokenBalance$inboundSchema` instead. */ - export const inboundSchema = Erc1155TokenBalance$inboundSchema; - /** @deprecated use `Erc1155TokenBalance$outboundSchema` instead. */ - export const outboundSchema = Erc1155TokenBalance$outboundSchema; - /** @deprecated use `Erc1155TokenBalance$Outbound` instead. */ - export type Outbound = Erc1155TokenBalance$Outbound; + /** @deprecated use `Erc1155TokenBalance$inboundSchema` instead. */ + export const inboundSchema = Erc1155TokenBalance$inboundSchema; + /** @deprecated use `Erc1155TokenBalance$outboundSchema` instead. */ + export const outboundSchema = Erc1155TokenBalance$outboundSchema; + /** @deprecated use `Erc1155TokenBalance$Outbound` instead. */ + export type Outbound = Erc1155TokenBalance$Outbound; } diff --git a/src/models/components/erc1155tokenmetadata.ts b/src/models/components/erc1155tokenmetadata.ts index a4768cc..4f79dc7 100644 --- a/src/models/components/erc1155tokenmetadata.ts +++ b/src/models/components/erc1155tokenmetadata.ts @@ -2,81 +2,81 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - NftTokenMetadataStatus, - NftTokenMetadataStatus$inboundSchema, - NftTokenMetadataStatus$outboundSchema, + NftTokenMetadataStatus, + NftTokenMetadataStatus$inboundSchema, + NftTokenMetadataStatus$outboundSchema, } from "./nfttokenmetadatastatus.js"; -import * as z from "zod"; export type Erc1155TokenMetadata = { - /** - * The metadata indexing status of the nft. - */ - indexStatus: NftTokenMetadataStatus; - metadataLastUpdatedTimestamp?: number | undefined; - name?: string | undefined; - symbol?: string | undefined; - imageUri?: string | undefined; - description?: string | undefined; - animationUri?: string | undefined; - externalUrl?: string | undefined; - background?: string | undefined; - decimals?: number | undefined; - properties?: string | undefined; + /** + * The metadata indexing status of the nft. + */ + indexStatus: NftTokenMetadataStatus; + metadataLastUpdatedTimestamp?: number | undefined; + name?: string | undefined; + symbol?: string | undefined; + imageUri?: string | undefined; + description?: string | undefined; + animationUri?: string | undefined; + externalUrl?: string | undefined; + background?: string | undefined; + decimals?: number | undefined; + properties?: string | undefined; }; /** @internal */ export const Erc1155TokenMetadata$inboundSchema: z.ZodType< - Erc1155TokenMetadata, - z.ZodTypeDef, - unknown + Erc1155TokenMetadata, + z.ZodTypeDef, + unknown > = z.object({ - indexStatus: NftTokenMetadataStatus$inboundSchema, - metadataLastUpdatedTimestamp: z.number().optional(), - name: z.string().optional(), - symbol: z.string().optional(), - imageUri: z.string().optional(), - description: z.string().optional(), - animationUri: z.string().optional(), - externalUrl: z.string().optional(), - background: z.string().optional(), - decimals: z.number().optional(), - properties: z.string().optional(), + indexStatus: NftTokenMetadataStatus$inboundSchema, + metadataLastUpdatedTimestamp: z.number().optional(), + name: z.string().optional(), + symbol: z.string().optional(), + imageUri: z.string().optional(), + description: z.string().optional(), + animationUri: z.string().optional(), + externalUrl: z.string().optional(), + background: z.string().optional(), + decimals: z.number().optional(), + properties: z.string().optional(), }); /** @internal */ export type Erc1155TokenMetadata$Outbound = { - indexStatus: string; - metadataLastUpdatedTimestamp?: number | undefined; - name?: string | undefined; - symbol?: string | undefined; - imageUri?: string | undefined; - description?: string | undefined; - animationUri?: string | undefined; - externalUrl?: string | undefined; - background?: string | undefined; - decimals?: number | undefined; - properties?: string | undefined; + indexStatus: string; + metadataLastUpdatedTimestamp?: number | undefined; + name?: string | undefined; + symbol?: string | undefined; + imageUri?: string | undefined; + description?: string | undefined; + animationUri?: string | undefined; + externalUrl?: string | undefined; + background?: string | undefined; + decimals?: number | undefined; + properties?: string | undefined; }; /** @internal */ export const Erc1155TokenMetadata$outboundSchema: z.ZodType< - Erc1155TokenMetadata$Outbound, - z.ZodTypeDef, - Erc1155TokenMetadata + Erc1155TokenMetadata$Outbound, + z.ZodTypeDef, + Erc1155TokenMetadata > = z.object({ - indexStatus: NftTokenMetadataStatus$outboundSchema, - metadataLastUpdatedTimestamp: z.number().optional(), - name: z.string().optional(), - symbol: z.string().optional(), - imageUri: z.string().optional(), - description: z.string().optional(), - animationUri: z.string().optional(), - externalUrl: z.string().optional(), - background: z.string().optional(), - decimals: z.number().optional(), - properties: z.string().optional(), + indexStatus: NftTokenMetadataStatus$outboundSchema, + metadataLastUpdatedTimestamp: z.number().optional(), + name: z.string().optional(), + symbol: z.string().optional(), + imageUri: z.string().optional(), + description: z.string().optional(), + animationUri: z.string().optional(), + externalUrl: z.string().optional(), + background: z.string().optional(), + decimals: z.number().optional(), + properties: z.string().optional(), }); /** @@ -84,10 +84,10 @@ export const Erc1155TokenMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc1155TokenMetadata$ { - /** @deprecated use `Erc1155TokenMetadata$inboundSchema` instead. */ - export const inboundSchema = Erc1155TokenMetadata$inboundSchema; - /** @deprecated use `Erc1155TokenMetadata$outboundSchema` instead. */ - export const outboundSchema = Erc1155TokenMetadata$outboundSchema; - /** @deprecated use `Erc1155TokenMetadata$Outbound` instead. */ - export type Outbound = Erc1155TokenMetadata$Outbound; + /** @deprecated use `Erc1155TokenMetadata$inboundSchema` instead. */ + export const inboundSchema = Erc1155TokenMetadata$inboundSchema; + /** @deprecated use `Erc1155TokenMetadata$outboundSchema` instead. */ + export const outboundSchema = Erc1155TokenMetadata$outboundSchema; + /** @deprecated use `Erc1155TokenMetadata$Outbound` instead. */ + export type Outbound = Erc1155TokenMetadata$Outbound; } diff --git a/src/models/components/erc1155transfer.ts b/src/models/components/erc1155transfer.ts index 0f8e975..c81da01 100644 --- a/src/models/components/erc1155transfer.ts +++ b/src/models/components/erc1155transfer.ts @@ -2,86 +2,89 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Erc1155Token, - Erc1155Token$inboundSchema, - Erc1155Token$Outbound, - Erc1155Token$outboundSchema, + Erc1155Token, + Erc1155Token$inboundSchema, + Erc1155Token$Outbound, + Erc1155Token$outboundSchema, } from "./erc1155token.js"; import { - RichAddress, - RichAddress$inboundSchema, - RichAddress$Outbound, - RichAddress$outboundSchema, + RichAddress, + RichAddress$inboundSchema, + RichAddress$Outbound, + RichAddress$outboundSchema, } from "./richaddress.js"; -import * as z from "zod"; export type Erc1155Transfer = { - /** - * The block number on the chain. - */ - blockNumber: string; - /** - * The block finality timestamp. - */ - blockTimestamp: number; - /** - * The block hash identifier. - */ - blockHash: string; - /** - * The transaction hash identifier. - */ - txHash: string; - from: RichAddress; - to: RichAddress; - logIndex: number; - value: string; - erc1155Token: Erc1155Token; + /** + * The block number on the chain. + */ + blockNumber: string; + /** + * The block finality timestamp. + */ + blockTimestamp: number; + /** + * The block hash identifier. + */ + blockHash: string; + /** + * The transaction hash identifier. + */ + txHash: string; + from: RichAddress; + to: RichAddress; + logIndex: number; + value: string; + erc1155Token: Erc1155Token; }; /** @internal */ -export const Erc1155Transfer$inboundSchema: z.ZodType = - z.object({ - blockNumber: z.string(), - blockTimestamp: z.number(), - blockHash: z.string(), - txHash: z.string(), - from: RichAddress$inboundSchema, - to: RichAddress$inboundSchema, - logIndex: z.number(), - value: z.string(), - erc1155Token: Erc1155Token$inboundSchema, - }); +export const Erc1155Transfer$inboundSchema: z.ZodType< + Erc1155Transfer, + z.ZodTypeDef, + unknown +> = z.object({ + blockNumber: z.string(), + blockTimestamp: z.number(), + blockHash: z.string(), + txHash: z.string(), + from: RichAddress$inboundSchema, + to: RichAddress$inboundSchema, + logIndex: z.number(), + value: z.string(), + erc1155Token: Erc1155Token$inboundSchema, +}); /** @internal */ export type Erc1155Transfer$Outbound = { - blockNumber: string; - blockTimestamp: number; - blockHash: string; - txHash: string; - from: RichAddress$Outbound; - to: RichAddress$Outbound; - logIndex: number; - value: string; - erc1155Token: Erc1155Token$Outbound; + blockNumber: string; + blockTimestamp: number; + blockHash: string; + txHash: string; + from: RichAddress$Outbound; + to: RichAddress$Outbound; + logIndex: number; + value: string; + erc1155Token: Erc1155Token$Outbound; }; /** @internal */ export const Erc1155Transfer$outboundSchema: z.ZodType< - Erc1155Transfer$Outbound, - z.ZodTypeDef, - Erc1155Transfer + Erc1155Transfer$Outbound, + z.ZodTypeDef, + Erc1155Transfer > = z.object({ - blockNumber: z.string(), - blockTimestamp: z.number(), - blockHash: z.string(), - txHash: z.string(), - from: RichAddress$outboundSchema, - to: RichAddress$outboundSchema, - logIndex: z.number(), - value: z.string(), - erc1155Token: Erc1155Token$outboundSchema, + blockNumber: z.string(), + blockTimestamp: z.number(), + blockHash: z.string(), + txHash: z.string(), + from: RichAddress$outboundSchema, + to: RichAddress$outboundSchema, + logIndex: z.number(), + value: z.string(), + erc1155Token: Erc1155Token$outboundSchema, }); /** @@ -89,10 +92,10 @@ export const Erc1155Transfer$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc1155Transfer$ { - /** @deprecated use `Erc1155Transfer$inboundSchema` instead. */ - export const inboundSchema = Erc1155Transfer$inboundSchema; - /** @deprecated use `Erc1155Transfer$outboundSchema` instead. */ - export const outboundSchema = Erc1155Transfer$outboundSchema; - /** @deprecated use `Erc1155Transfer$Outbound` instead. */ - export type Outbound = Erc1155Transfer$Outbound; + /** @deprecated use `Erc1155Transfer$inboundSchema` instead. */ + export const inboundSchema = Erc1155Transfer$inboundSchema; + /** @deprecated use `Erc1155Transfer$outboundSchema` instead. */ + export const outboundSchema = Erc1155Transfer$outboundSchema; + /** @deprecated use `Erc1155Transfer$Outbound` instead. */ + export type Outbound = Erc1155Transfer$Outbound; } diff --git a/src/models/components/erc1155transferdetails.ts b/src/models/components/erc1155transferdetails.ts index c2660bf..0c1cf63 100644 --- a/src/models/components/erc1155transferdetails.ts +++ b/src/models/components/erc1155transferdetails.ts @@ -2,61 +2,61 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Erc1155Token, - Erc1155Token$inboundSchema, - Erc1155Token$Outbound, - Erc1155Token$outboundSchema, + Erc1155Token, + Erc1155Token$inboundSchema, + Erc1155Token$Outbound, + Erc1155Token$outboundSchema, } from "./erc1155token.js"; import { - RichAddress, - RichAddress$inboundSchema, - RichAddress$Outbound, - RichAddress$outboundSchema, + RichAddress, + RichAddress$inboundSchema, + RichAddress$Outbound, + RichAddress$outboundSchema, } from "./richaddress.js"; -import * as z from "zod"; export type Erc1155TransferDetails = { - from: RichAddress; - to: RichAddress; - logIndex: number; - value: string; - erc1155Token: Erc1155Token; + from: RichAddress; + to: RichAddress; + logIndex: number; + value: string; + erc1155Token: Erc1155Token; }; /** @internal */ export const Erc1155TransferDetails$inboundSchema: z.ZodType< - Erc1155TransferDetails, - z.ZodTypeDef, - unknown + Erc1155TransferDetails, + z.ZodTypeDef, + unknown > = z.object({ - from: RichAddress$inboundSchema, - to: RichAddress$inboundSchema, - logIndex: z.number(), - value: z.string(), - erc1155Token: Erc1155Token$inboundSchema, + from: RichAddress$inboundSchema, + to: RichAddress$inboundSchema, + logIndex: z.number(), + value: z.string(), + erc1155Token: Erc1155Token$inboundSchema, }); /** @internal */ export type Erc1155TransferDetails$Outbound = { - from: RichAddress$Outbound; - to: RichAddress$Outbound; - logIndex: number; - value: string; - erc1155Token: Erc1155Token$Outbound; + from: RichAddress$Outbound; + to: RichAddress$Outbound; + logIndex: number; + value: string; + erc1155Token: Erc1155Token$Outbound; }; /** @internal */ export const Erc1155TransferDetails$outboundSchema: z.ZodType< - Erc1155TransferDetails$Outbound, - z.ZodTypeDef, - Erc1155TransferDetails + Erc1155TransferDetails$Outbound, + z.ZodTypeDef, + Erc1155TransferDetails > = z.object({ - from: RichAddress$outboundSchema, - to: RichAddress$outboundSchema, - logIndex: z.number(), - value: z.string(), - erc1155Token: Erc1155Token$outboundSchema, + from: RichAddress$outboundSchema, + to: RichAddress$outboundSchema, + logIndex: z.number(), + value: z.string(), + erc1155Token: Erc1155Token$outboundSchema, }); /** @@ -64,10 +64,10 @@ export const Erc1155TransferDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc1155TransferDetails$ { - /** @deprecated use `Erc1155TransferDetails$inboundSchema` instead. */ - export const inboundSchema = Erc1155TransferDetails$inboundSchema; - /** @deprecated use `Erc1155TransferDetails$outboundSchema` instead. */ - export const outboundSchema = Erc1155TransferDetails$outboundSchema; - /** @deprecated use `Erc1155TransferDetails$Outbound` instead. */ - export type Outbound = Erc1155TransferDetails$Outbound; + /** @deprecated use `Erc1155TransferDetails$inboundSchema` instead. */ + export const inboundSchema = Erc1155TransferDetails$inboundSchema; + /** @deprecated use `Erc1155TransferDetails$outboundSchema` instead. */ + export const outboundSchema = Erc1155TransferDetails$outboundSchema; + /** @deprecated use `Erc1155TransferDetails$Outbound` instead. */ + export type Outbound = Erc1155TransferDetails$Outbound; } diff --git a/src/models/components/erc20contract.ts b/src/models/components/erc20contract.ts index f0c1c57..be85a22 100644 --- a/src/models/components/erc20contract.ts +++ b/src/models/components/erc20contract.ts @@ -2,147 +2,152 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - ContractDeploymentDetails, - ContractDeploymentDetails$inboundSchema, - ContractDeploymentDetails$Outbound, - ContractDeploymentDetails$outboundSchema, + ContractDeploymentDetails, + ContractDeploymentDetails$inboundSchema, + ContractDeploymentDetails$Outbound, + ContractDeploymentDetails$outboundSchema, } from "./contractdeploymentdetails.js"; import { - ImageAsset, - ImageAsset$inboundSchema, - ImageAsset$Outbound, - ImageAsset$outboundSchema, + ImageAsset, + ImageAsset$inboundSchema, + ImageAsset$Outbound, + ImageAsset$outboundSchema, } from "./imageasset.js"; import { - PricingProviders, - PricingProviders$inboundSchema, - PricingProviders$Outbound, - PricingProviders$outboundSchema, + PricingProviders, + PricingProviders$inboundSchema, + PricingProviders$Outbound, + PricingProviders$outboundSchema, } from "./pricingproviders.js"; import { - ResourceLink, - ResourceLink$inboundSchema, - ResourceLink$Outbound, - ResourceLink$outboundSchema, + ResourceLink, + ResourceLink$inboundSchema, + ResourceLink$Outbound, + ResourceLink$outboundSchema, } from "./resourcelink.js"; -import * as z from "zod"; export const Erc20ContractErcType = { - Erc20: "ERC-20", + Erc20: "ERC-20", } as const; export type Erc20ContractErcType = ClosedEnum; export type Erc20Contract = { - /** - * The contract name. - */ - name?: string | undefined; - description?: string | undefined; - officialSite?: string | undefined; - email?: string | undefined; - logoAsset?: ImageAsset | undefined; - bannerAsset?: ImageAsset | undefined; - color?: string | undefined; - resourceLinks?: Array | undefined; - tags?: Array | undefined; - /** - * A wallet or contract address in mixed-case checksum encoding. - */ - address: string; - deploymentDetails: ContractDeploymentDetails; - ercType: Erc20ContractErcType; - /** - * The contract symbol. - */ - symbol?: string | undefined; - /** - * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation. - */ - decimals: number; - pricingProviders?: PricingProviders | undefined; + /** + * The contract name. + */ + name?: string | undefined; + description?: string | undefined; + officialSite?: string | undefined; + email?: string | undefined; + logoAsset?: ImageAsset | undefined; + bannerAsset?: ImageAsset | undefined; + color?: string | undefined; + resourceLinks?: Array | undefined; + tags?: Array | undefined; + /** + * A wallet or contract address in mixed-case checksum encoding. + */ + address: string; + deploymentDetails: ContractDeploymentDetails; + ercType: Erc20ContractErcType; + /** + * The contract symbol. + */ + symbol?: string | undefined; + /** + * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation. + */ + decimals: number; + pricingProviders?: PricingProviders | undefined; }; /** @internal */ -export const Erc20ContractErcType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(Erc20ContractErcType); +export const Erc20ContractErcType$inboundSchema: z.ZodNativeEnum< + typeof Erc20ContractErcType +> = z.nativeEnum(Erc20ContractErcType); /** @internal */ -export const Erc20ContractErcType$outboundSchema: z.ZodNativeEnum = - Erc20ContractErcType$inboundSchema; +export const Erc20ContractErcType$outboundSchema: z.ZodNativeEnum< + typeof Erc20ContractErcType +> = Erc20ContractErcType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc20ContractErcType$ { - /** @deprecated use `Erc20ContractErcType$inboundSchema` instead. */ - export const inboundSchema = Erc20ContractErcType$inboundSchema; - /** @deprecated use `Erc20ContractErcType$outboundSchema` instead. */ - export const outboundSchema = Erc20ContractErcType$outboundSchema; + /** @deprecated use `Erc20ContractErcType$inboundSchema` instead. */ + export const inboundSchema = Erc20ContractErcType$inboundSchema; + /** @deprecated use `Erc20ContractErcType$outboundSchema` instead. */ + export const outboundSchema = Erc20ContractErcType$outboundSchema; } /** @internal */ -export const Erc20Contract$inboundSchema: z.ZodType = - z.object({ - name: z.string().optional(), - description: z.string().optional(), - officialSite: z.string().optional(), - email: z.string().optional(), - logoAsset: ImageAsset$inboundSchema.optional(), - bannerAsset: ImageAsset$inboundSchema.optional(), - color: z.string().optional(), - resourceLinks: z.array(ResourceLink$inboundSchema).optional(), - tags: z.array(z.string()).optional(), - address: z.string(), - deploymentDetails: ContractDeploymentDetails$inboundSchema, - ercType: Erc20ContractErcType$inboundSchema, - symbol: z.string().optional(), - decimals: z.number(), - pricingProviders: PricingProviders$inboundSchema.optional(), - }); +export const Erc20Contract$inboundSchema: z.ZodType< + Erc20Contract, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + description: z.string().optional(), + officialSite: z.string().optional(), + email: z.string().optional(), + logoAsset: ImageAsset$inboundSchema.optional(), + bannerAsset: ImageAsset$inboundSchema.optional(), + color: z.string().optional(), + resourceLinks: z.array(ResourceLink$inboundSchema).optional(), + tags: z.array(z.string()).optional(), + address: z.string(), + deploymentDetails: ContractDeploymentDetails$inboundSchema, + ercType: Erc20ContractErcType$inboundSchema, + symbol: z.string().optional(), + decimals: z.number(), + pricingProviders: PricingProviders$inboundSchema.optional(), +}); /** @internal */ export type Erc20Contract$Outbound = { - name?: string | undefined; - description?: string | undefined; - officialSite?: string | undefined; - email?: string | undefined; - logoAsset?: ImageAsset$Outbound | undefined; - bannerAsset?: ImageAsset$Outbound | undefined; - color?: string | undefined; - resourceLinks?: Array | undefined; - tags?: Array | undefined; - address: string; - deploymentDetails: ContractDeploymentDetails$Outbound; - ercType: string; - symbol?: string | undefined; - decimals: number; - pricingProviders?: PricingProviders$Outbound | undefined; + name?: string | undefined; + description?: string | undefined; + officialSite?: string | undefined; + email?: string | undefined; + logoAsset?: ImageAsset$Outbound | undefined; + bannerAsset?: ImageAsset$Outbound | undefined; + color?: string | undefined; + resourceLinks?: Array | undefined; + tags?: Array | undefined; + address: string; + deploymentDetails: ContractDeploymentDetails$Outbound; + ercType: string; + symbol?: string | undefined; + decimals: number; + pricingProviders?: PricingProviders$Outbound | undefined; }; /** @internal */ export const Erc20Contract$outboundSchema: z.ZodType< - Erc20Contract$Outbound, - z.ZodTypeDef, - Erc20Contract + Erc20Contract$Outbound, + z.ZodTypeDef, + Erc20Contract > = z.object({ - name: z.string().optional(), - description: z.string().optional(), - officialSite: z.string().optional(), - email: z.string().optional(), - logoAsset: ImageAsset$outboundSchema.optional(), - bannerAsset: ImageAsset$outboundSchema.optional(), - color: z.string().optional(), - resourceLinks: z.array(ResourceLink$outboundSchema).optional(), - tags: z.array(z.string()).optional(), - address: z.string(), - deploymentDetails: ContractDeploymentDetails$outboundSchema, - ercType: Erc20ContractErcType$outboundSchema, - symbol: z.string().optional(), - decimals: z.number(), - pricingProviders: PricingProviders$outboundSchema.optional(), + name: z.string().optional(), + description: z.string().optional(), + officialSite: z.string().optional(), + email: z.string().optional(), + logoAsset: ImageAsset$outboundSchema.optional(), + bannerAsset: ImageAsset$outboundSchema.optional(), + color: z.string().optional(), + resourceLinks: z.array(ResourceLink$outboundSchema).optional(), + tags: z.array(z.string()).optional(), + address: z.string(), + deploymentDetails: ContractDeploymentDetails$outboundSchema, + ercType: Erc20ContractErcType$outboundSchema, + symbol: z.string().optional(), + decimals: z.number(), + pricingProviders: PricingProviders$outboundSchema.optional(), }); /** @@ -150,10 +155,10 @@ export const Erc20Contract$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc20Contract$ { - /** @deprecated use `Erc20Contract$inboundSchema` instead. */ - export const inboundSchema = Erc20Contract$inboundSchema; - /** @deprecated use `Erc20Contract$outboundSchema` instead. */ - export const outboundSchema = Erc20Contract$outboundSchema; - /** @deprecated use `Erc20Contract$Outbound` instead. */ - export type Outbound = Erc20Contract$Outbound; + /** @deprecated use `Erc20Contract$inboundSchema` instead. */ + export const inboundSchema = Erc20Contract$inboundSchema; + /** @deprecated use `Erc20Contract$outboundSchema` instead. */ + export const outboundSchema = Erc20Contract$outboundSchema; + /** @deprecated use `Erc20Contract$Outbound` instead. */ + export type Outbound = Erc20Contract$Outbound; } diff --git a/src/models/components/erc20token.ts b/src/models/components/erc20token.ts index b476670..64e733d 100644 --- a/src/models/components/erc20token.ts +++ b/src/models/components/erc20token.ts @@ -2,105 +2,119 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; -import { Money, Money$inboundSchema, Money$Outbound, Money$outboundSchema } from "./money.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; +import { + Money, + Money$inboundSchema, + Money$Outbound, + Money$outboundSchema, +} from "./money.js"; export const Erc20TokenErcType = { - Erc20: "ERC-20", + Erc20: "ERC-20", } as const; export type Erc20TokenErcType = ClosedEnum; export type Erc20Token = { - /** - * A wallet or contract address in mixed-case checksum encoding. - */ - address: string; - /** - * The contract name. - */ - name: string; - /** - * The contract symbol. - */ - symbol: string; - /** - * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation. - */ - decimals: number; - /** - * The logo uri for the address. - */ - logoUri?: string | undefined; - ercType: Erc20TokenErcType; - /** - * The token price, if available. - */ - price?: Money | undefined; + /** + * A wallet or contract address in mixed-case checksum encoding. + */ + address: string; + /** + * The contract name. + */ + name: string; + /** + * The contract symbol. + */ + symbol: string; + /** + * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation. + */ + decimals: number; + /** + * The logo uri for the address. + */ + logoUri?: string | undefined; + ercType: Erc20TokenErcType; + /** + * The token price, if available. + */ + price?: Money | undefined; }; /** @internal */ -export const Erc20TokenErcType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(Erc20TokenErcType); +export const Erc20TokenErcType$inboundSchema: z.ZodNativeEnum< + typeof Erc20TokenErcType +> = z.nativeEnum(Erc20TokenErcType); /** @internal */ -export const Erc20TokenErcType$outboundSchema: z.ZodNativeEnum = - Erc20TokenErcType$inboundSchema; +export const Erc20TokenErcType$outboundSchema: z.ZodNativeEnum< + typeof Erc20TokenErcType +> = Erc20TokenErcType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc20TokenErcType$ { - /** @deprecated use `Erc20TokenErcType$inboundSchema` instead. */ - export const inboundSchema = Erc20TokenErcType$inboundSchema; - /** @deprecated use `Erc20TokenErcType$outboundSchema` instead. */ - export const outboundSchema = Erc20TokenErcType$outboundSchema; + /** @deprecated use `Erc20TokenErcType$inboundSchema` instead. */ + export const inboundSchema = Erc20TokenErcType$inboundSchema; + /** @deprecated use `Erc20TokenErcType$outboundSchema` instead. */ + export const outboundSchema = Erc20TokenErcType$outboundSchema; } /** @internal */ -export const Erc20Token$inboundSchema: z.ZodType = z.object({ - address: z.string(), - name: z.string(), - symbol: z.string(), - decimals: z.number(), - logoUri: z.string().optional(), - ercType: Erc20TokenErcType$inboundSchema, - price: Money$inboundSchema.optional(), +export const Erc20Token$inboundSchema: z.ZodType< + Erc20Token, + z.ZodTypeDef, + unknown +> = z.object({ + address: z.string(), + name: z.string(), + symbol: z.string(), + decimals: z.number(), + logoUri: z.string().optional(), + ercType: Erc20TokenErcType$inboundSchema, + price: Money$inboundSchema.optional(), }); /** @internal */ export type Erc20Token$Outbound = { - address: string; - name: string; - symbol: string; - decimals: number; - logoUri?: string | undefined; - ercType: string; - price?: Money$Outbound | undefined; + address: string; + name: string; + symbol: string; + decimals: number; + logoUri?: string | undefined; + ercType: string; + price?: Money$Outbound | undefined; }; /** @internal */ -export const Erc20Token$outboundSchema: z.ZodType = - z.object({ - address: z.string(), - name: z.string(), - symbol: z.string(), - decimals: z.number(), - logoUri: z.string().optional(), - ercType: Erc20TokenErcType$outboundSchema, - price: Money$outboundSchema.optional(), - }); +export const Erc20Token$outboundSchema: z.ZodType< + Erc20Token$Outbound, + z.ZodTypeDef, + Erc20Token +> = z.object({ + address: z.string(), + name: z.string(), + symbol: z.string(), + decimals: z.number(), + logoUri: z.string().optional(), + ercType: Erc20TokenErcType$outboundSchema, + price: Money$outboundSchema.optional(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc20Token$ { - /** @deprecated use `Erc20Token$inboundSchema` instead. */ - export const inboundSchema = Erc20Token$inboundSchema; - /** @deprecated use `Erc20Token$outboundSchema` instead. */ - export const outboundSchema = Erc20Token$outboundSchema; - /** @deprecated use `Erc20Token$Outbound` instead. */ - export type Outbound = Erc20Token$Outbound; + /** @deprecated use `Erc20Token$inboundSchema` instead. */ + export const inboundSchema = Erc20Token$inboundSchema; + /** @deprecated use `Erc20Token$outboundSchema` instead. */ + export const outboundSchema = Erc20Token$outboundSchema; + /** @deprecated use `Erc20Token$Outbound` instead. */ + export type Outbound = Erc20Token$Outbound; } diff --git a/src/models/components/erc20tokenbalance.ts b/src/models/components/erc20tokenbalance.ts index 73fd646..e233dd4 100644 --- a/src/models/components/erc20tokenbalance.ts +++ b/src/models/components/erc20tokenbalance.ts @@ -2,63 +2,70 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; -import { Money, Money$inboundSchema, Money$Outbound, Money$outboundSchema } from "./money.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; +import { + Money, + Money$inboundSchema, + Money$Outbound, + Money$outboundSchema, +} from "./money.js"; export const Erc20TokenBalanceErcType = { - Erc20: "ERC-20", + Erc20: "ERC-20", } as const; -export type Erc20TokenBalanceErcType = ClosedEnum; +export type Erc20TokenBalanceErcType = ClosedEnum< + typeof Erc20TokenBalanceErcType +>; export type Erc20TokenBalance = { - /** - * A wallet or contract address in mixed-case checksum encoding. - */ - address: string; - /** - * The contract name. - */ - name: string; - /** - * The contract symbol. - */ - symbol: string; - /** - * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation. - */ - decimals: number; - /** - * The logo uri for the address. - */ - logoUri?: string | undefined; - ercType: Erc20TokenBalanceErcType; - /** - * The token price, if available. - */ - price?: Money | undefined; - /** - * The evm chain id. - */ - chainId: string; - /** - * The address balance for the token, in units specified by the `decimals` value for the contract. - */ - balance: string; - /** - * The monetary value of the balance, if a price is available for the token. - */ - balanceValue?: Money | undefined; + /** + * A wallet or contract address in mixed-case checksum encoding. + */ + address: string; + /** + * The contract name. + */ + name: string; + /** + * The contract symbol. + */ + symbol: string; + /** + * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation. + */ + decimals: number; + /** + * The logo uri for the address. + */ + logoUri?: string | undefined; + ercType: Erc20TokenBalanceErcType; + /** + * The token price, if available. + */ + price?: Money | undefined; + /** + * The evm chain id. + */ + chainId: string; + /** + * The address balance for the token, in units specified by the `decimals` value for the contract. + */ + balance: string; + /** + * The monetary value of the balance, if a price is available for the token. + */ + balanceValue?: Money | undefined; }; /** @internal */ export const Erc20TokenBalanceErcType$inboundSchema: z.ZodNativeEnum< - typeof Erc20TokenBalanceErcType + typeof Erc20TokenBalanceErcType > = z.nativeEnum(Erc20TokenBalanceErcType); /** @internal */ export const Erc20TokenBalanceErcType$outboundSchema: z.ZodNativeEnum< - typeof Erc20TokenBalanceErcType + typeof Erc20TokenBalanceErcType > = Erc20TokenBalanceErcType$inboundSchema; /** @@ -66,57 +73,60 @@ export const Erc20TokenBalanceErcType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc20TokenBalanceErcType$ { - /** @deprecated use `Erc20TokenBalanceErcType$inboundSchema` instead. */ - export const inboundSchema = Erc20TokenBalanceErcType$inboundSchema; - /** @deprecated use `Erc20TokenBalanceErcType$outboundSchema` instead. */ - export const outboundSchema = Erc20TokenBalanceErcType$outboundSchema; + /** @deprecated use `Erc20TokenBalanceErcType$inboundSchema` instead. */ + export const inboundSchema = Erc20TokenBalanceErcType$inboundSchema; + /** @deprecated use `Erc20TokenBalanceErcType$outboundSchema` instead. */ + export const outboundSchema = Erc20TokenBalanceErcType$outboundSchema; } /** @internal */ -export const Erc20TokenBalance$inboundSchema: z.ZodType = - z.object({ - address: z.string(), - name: z.string(), - symbol: z.string(), - decimals: z.number(), - logoUri: z.string().optional(), - ercType: Erc20TokenBalanceErcType$inboundSchema, - price: Money$inboundSchema.optional(), - chainId: z.string(), - balance: z.string(), - balanceValue: Money$inboundSchema.optional(), - }); +export const Erc20TokenBalance$inboundSchema: z.ZodType< + Erc20TokenBalance, + z.ZodTypeDef, + unknown +> = z.object({ + address: z.string(), + name: z.string(), + symbol: z.string(), + decimals: z.number(), + logoUri: z.string().optional(), + ercType: Erc20TokenBalanceErcType$inboundSchema, + price: Money$inboundSchema.optional(), + chainId: z.string(), + balance: z.string(), + balanceValue: Money$inboundSchema.optional(), +}); /** @internal */ export type Erc20TokenBalance$Outbound = { - address: string; - name: string; - symbol: string; - decimals: number; - logoUri?: string | undefined; - ercType: string; - price?: Money$Outbound | undefined; - chainId: string; - balance: string; - balanceValue?: Money$Outbound | undefined; + address: string; + name: string; + symbol: string; + decimals: number; + logoUri?: string | undefined; + ercType: string; + price?: Money$Outbound | undefined; + chainId: string; + balance: string; + balanceValue?: Money$Outbound | undefined; }; /** @internal */ export const Erc20TokenBalance$outboundSchema: z.ZodType< - Erc20TokenBalance$Outbound, - z.ZodTypeDef, - Erc20TokenBalance + Erc20TokenBalance$Outbound, + z.ZodTypeDef, + Erc20TokenBalance > = z.object({ - address: z.string(), - name: z.string(), - symbol: z.string(), - decimals: z.number(), - logoUri: z.string().optional(), - ercType: Erc20TokenBalanceErcType$outboundSchema, - price: Money$outboundSchema.optional(), - chainId: z.string(), - balance: z.string(), - balanceValue: Money$outboundSchema.optional(), + address: z.string(), + name: z.string(), + symbol: z.string(), + decimals: z.number(), + logoUri: z.string().optional(), + ercType: Erc20TokenBalanceErcType$outboundSchema, + price: Money$outboundSchema.optional(), + chainId: z.string(), + balance: z.string(), + balanceValue: Money$outboundSchema.optional(), }); /** @@ -124,10 +134,10 @@ export const Erc20TokenBalance$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc20TokenBalance$ { - /** @deprecated use `Erc20TokenBalance$inboundSchema` instead. */ - export const inboundSchema = Erc20TokenBalance$inboundSchema; - /** @deprecated use `Erc20TokenBalance$outboundSchema` instead. */ - export const outboundSchema = Erc20TokenBalance$outboundSchema; - /** @deprecated use `Erc20TokenBalance$Outbound` instead. */ - export type Outbound = Erc20TokenBalance$Outbound; + /** @deprecated use `Erc20TokenBalance$inboundSchema` instead. */ + export const inboundSchema = Erc20TokenBalance$inboundSchema; + /** @deprecated use `Erc20TokenBalance$outboundSchema` instead. */ + export const outboundSchema = Erc20TokenBalance$outboundSchema; + /** @deprecated use `Erc20TokenBalance$Outbound` instead. */ + export type Outbound = Erc20TokenBalance$Outbound; } diff --git a/src/models/components/erc20transfer.ts b/src/models/components/erc20transfer.ts index cbcaf53..2b0286f 100644 --- a/src/models/components/erc20transfer.ts +++ b/src/models/components/erc20transfer.ts @@ -2,86 +2,89 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Erc20Token, - Erc20Token$inboundSchema, - Erc20Token$Outbound, - Erc20Token$outboundSchema, + Erc20Token, + Erc20Token$inboundSchema, + Erc20Token$Outbound, + Erc20Token$outboundSchema, } from "./erc20token.js"; import { - RichAddress, - RichAddress$inboundSchema, - RichAddress$Outbound, - RichAddress$outboundSchema, + RichAddress, + RichAddress$inboundSchema, + RichAddress$Outbound, + RichAddress$outboundSchema, } from "./richaddress.js"; -import * as z from "zod"; export type Erc20Transfer = { - /** - * The block number on the chain. - */ - blockNumber: string; - /** - * The block finality timestamp. - */ - blockTimestamp: number; - /** - * The block hash identifier. - */ - blockHash: string; - /** - * The transaction hash identifier. - */ - txHash: string; - from: RichAddress; - to: RichAddress; - logIndex: number; - value: string; - erc20Token: Erc20Token; + /** + * The block number on the chain. + */ + blockNumber: string; + /** + * The block finality timestamp. + */ + blockTimestamp: number; + /** + * The block hash identifier. + */ + blockHash: string; + /** + * The transaction hash identifier. + */ + txHash: string; + from: RichAddress; + to: RichAddress; + logIndex: number; + value: string; + erc20Token: Erc20Token; }; /** @internal */ -export const Erc20Transfer$inboundSchema: z.ZodType = - z.object({ - blockNumber: z.string(), - blockTimestamp: z.number(), - blockHash: z.string(), - txHash: z.string(), - from: RichAddress$inboundSchema, - to: RichAddress$inboundSchema, - logIndex: z.number(), - value: z.string(), - erc20Token: Erc20Token$inboundSchema, - }); +export const Erc20Transfer$inboundSchema: z.ZodType< + Erc20Transfer, + z.ZodTypeDef, + unknown +> = z.object({ + blockNumber: z.string(), + blockTimestamp: z.number(), + blockHash: z.string(), + txHash: z.string(), + from: RichAddress$inboundSchema, + to: RichAddress$inboundSchema, + logIndex: z.number(), + value: z.string(), + erc20Token: Erc20Token$inboundSchema, +}); /** @internal */ export type Erc20Transfer$Outbound = { - blockNumber: string; - blockTimestamp: number; - blockHash: string; - txHash: string; - from: RichAddress$Outbound; - to: RichAddress$Outbound; - logIndex: number; - value: string; - erc20Token: Erc20Token$Outbound; + blockNumber: string; + blockTimestamp: number; + blockHash: string; + txHash: string; + from: RichAddress$Outbound; + to: RichAddress$Outbound; + logIndex: number; + value: string; + erc20Token: Erc20Token$Outbound; }; /** @internal */ export const Erc20Transfer$outboundSchema: z.ZodType< - Erc20Transfer$Outbound, - z.ZodTypeDef, - Erc20Transfer + Erc20Transfer$Outbound, + z.ZodTypeDef, + Erc20Transfer > = z.object({ - blockNumber: z.string(), - blockTimestamp: z.number(), - blockHash: z.string(), - txHash: z.string(), - from: RichAddress$outboundSchema, - to: RichAddress$outboundSchema, - logIndex: z.number(), - value: z.string(), - erc20Token: Erc20Token$outboundSchema, + blockNumber: z.string(), + blockTimestamp: z.number(), + blockHash: z.string(), + txHash: z.string(), + from: RichAddress$outboundSchema, + to: RichAddress$outboundSchema, + logIndex: z.number(), + value: z.string(), + erc20Token: Erc20Token$outboundSchema, }); /** @@ -89,10 +92,10 @@ export const Erc20Transfer$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc20Transfer$ { - /** @deprecated use `Erc20Transfer$inboundSchema` instead. */ - export const inboundSchema = Erc20Transfer$inboundSchema; - /** @deprecated use `Erc20Transfer$outboundSchema` instead. */ - export const outboundSchema = Erc20Transfer$outboundSchema; - /** @deprecated use `Erc20Transfer$Outbound` instead. */ - export type Outbound = Erc20Transfer$Outbound; + /** @deprecated use `Erc20Transfer$inboundSchema` instead. */ + export const inboundSchema = Erc20Transfer$inboundSchema; + /** @deprecated use `Erc20Transfer$outboundSchema` instead. */ + export const outboundSchema = Erc20Transfer$outboundSchema; + /** @deprecated use `Erc20Transfer$Outbound` instead. */ + export type Outbound = Erc20Transfer$Outbound; } diff --git a/src/models/components/erc20transferdetails.ts b/src/models/components/erc20transferdetails.ts index 8e7c1f4..9e9321e 100644 --- a/src/models/components/erc20transferdetails.ts +++ b/src/models/components/erc20transferdetails.ts @@ -2,61 +2,61 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Erc20Token, - Erc20Token$inboundSchema, - Erc20Token$Outbound, - Erc20Token$outboundSchema, + Erc20Token, + Erc20Token$inboundSchema, + Erc20Token$Outbound, + Erc20Token$outboundSchema, } from "./erc20token.js"; import { - RichAddress, - RichAddress$inboundSchema, - RichAddress$Outbound, - RichAddress$outboundSchema, + RichAddress, + RichAddress$inboundSchema, + RichAddress$Outbound, + RichAddress$outboundSchema, } from "./richaddress.js"; -import * as z from "zod"; export type Erc20TransferDetails = { - from: RichAddress; - to: RichAddress; - logIndex: number; - value: string; - erc20Token: Erc20Token; + from: RichAddress; + to: RichAddress; + logIndex: number; + value: string; + erc20Token: Erc20Token; }; /** @internal */ export const Erc20TransferDetails$inboundSchema: z.ZodType< - Erc20TransferDetails, - z.ZodTypeDef, - unknown + Erc20TransferDetails, + z.ZodTypeDef, + unknown > = z.object({ - from: RichAddress$inboundSchema, - to: RichAddress$inboundSchema, - logIndex: z.number(), - value: z.string(), - erc20Token: Erc20Token$inboundSchema, + from: RichAddress$inboundSchema, + to: RichAddress$inboundSchema, + logIndex: z.number(), + value: z.string(), + erc20Token: Erc20Token$inboundSchema, }); /** @internal */ export type Erc20TransferDetails$Outbound = { - from: RichAddress$Outbound; - to: RichAddress$Outbound; - logIndex: number; - value: string; - erc20Token: Erc20Token$Outbound; + from: RichAddress$Outbound; + to: RichAddress$Outbound; + logIndex: number; + value: string; + erc20Token: Erc20Token$Outbound; }; /** @internal */ export const Erc20TransferDetails$outboundSchema: z.ZodType< - Erc20TransferDetails$Outbound, - z.ZodTypeDef, - Erc20TransferDetails + Erc20TransferDetails$Outbound, + z.ZodTypeDef, + Erc20TransferDetails > = z.object({ - from: RichAddress$outboundSchema, - to: RichAddress$outboundSchema, - logIndex: z.number(), - value: z.string(), - erc20Token: Erc20Token$outboundSchema, + from: RichAddress$outboundSchema, + to: RichAddress$outboundSchema, + logIndex: z.number(), + value: z.string(), + erc20Token: Erc20Token$outboundSchema, }); /** @@ -64,10 +64,10 @@ export const Erc20TransferDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc20TransferDetails$ { - /** @deprecated use `Erc20TransferDetails$inboundSchema` instead. */ - export const inboundSchema = Erc20TransferDetails$inboundSchema; - /** @deprecated use `Erc20TransferDetails$outboundSchema` instead. */ - export const outboundSchema = Erc20TransferDetails$outboundSchema; - /** @deprecated use `Erc20TransferDetails$Outbound` instead. */ - export type Outbound = Erc20TransferDetails$Outbound; + /** @deprecated use `Erc20TransferDetails$inboundSchema` instead. */ + export const inboundSchema = Erc20TransferDetails$inboundSchema; + /** @deprecated use `Erc20TransferDetails$outboundSchema` instead. */ + export const outboundSchema = Erc20TransferDetails$outboundSchema; + /** @deprecated use `Erc20TransferDetails$Outbound` instead. */ + export type Outbound = Erc20TransferDetails$Outbound; } diff --git a/src/models/components/erc721contract.ts b/src/models/components/erc721contract.ts index 965bd7c..3148b8c 100644 --- a/src/models/components/erc721contract.ts +++ b/src/models/components/erc721contract.ts @@ -2,130 +2,135 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - ContractDeploymentDetails, - ContractDeploymentDetails$inboundSchema, - ContractDeploymentDetails$Outbound, - ContractDeploymentDetails$outboundSchema, + ContractDeploymentDetails, + ContractDeploymentDetails$inboundSchema, + ContractDeploymentDetails$Outbound, + ContractDeploymentDetails$outboundSchema, } from "./contractdeploymentdetails.js"; import { - ImageAsset, - ImageAsset$inboundSchema, - ImageAsset$Outbound, - ImageAsset$outboundSchema, + ImageAsset, + ImageAsset$inboundSchema, + ImageAsset$Outbound, + ImageAsset$outboundSchema, } from "./imageasset.js"; import { - ResourceLink, - ResourceLink$inboundSchema, - ResourceLink$Outbound, - ResourceLink$outboundSchema, + ResourceLink, + ResourceLink$inboundSchema, + ResourceLink$Outbound, + ResourceLink$outboundSchema, } from "./resourcelink.js"; -import * as z from "zod"; export const Erc721ContractErcType = { - Erc721: "ERC-721", + Erc721: "ERC-721", } as const; export type Erc721ContractErcType = ClosedEnum; export type Erc721Contract = { - /** - * The contract name. - */ - name?: string | undefined; - description?: string | undefined; - officialSite?: string | undefined; - email?: string | undefined; - logoAsset?: ImageAsset | undefined; - bannerAsset?: ImageAsset | undefined; - color?: string | undefined; - resourceLinks?: Array | undefined; - tags?: Array | undefined; - /** - * A wallet or contract address in mixed-case checksum encoding. - */ - address: string; - deploymentDetails: ContractDeploymentDetails; - ercType: Erc721ContractErcType; - /** - * The contract symbol. - */ - symbol?: string | undefined; + /** + * The contract name. + */ + name?: string | undefined; + description?: string | undefined; + officialSite?: string | undefined; + email?: string | undefined; + logoAsset?: ImageAsset | undefined; + bannerAsset?: ImageAsset | undefined; + color?: string | undefined; + resourceLinks?: Array | undefined; + tags?: Array | undefined; + /** + * A wallet or contract address in mixed-case checksum encoding. + */ + address: string; + deploymentDetails: ContractDeploymentDetails; + ercType: Erc721ContractErcType; + /** + * The contract symbol. + */ + symbol?: string | undefined; }; /** @internal */ -export const Erc721ContractErcType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(Erc721ContractErcType); +export const Erc721ContractErcType$inboundSchema: z.ZodNativeEnum< + typeof Erc721ContractErcType +> = z.nativeEnum(Erc721ContractErcType); /** @internal */ -export const Erc721ContractErcType$outboundSchema: z.ZodNativeEnum = - Erc721ContractErcType$inboundSchema; +export const Erc721ContractErcType$outboundSchema: z.ZodNativeEnum< + typeof Erc721ContractErcType +> = Erc721ContractErcType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc721ContractErcType$ { - /** @deprecated use `Erc721ContractErcType$inboundSchema` instead. */ - export const inboundSchema = Erc721ContractErcType$inboundSchema; - /** @deprecated use `Erc721ContractErcType$outboundSchema` instead. */ - export const outboundSchema = Erc721ContractErcType$outboundSchema; + /** @deprecated use `Erc721ContractErcType$inboundSchema` instead. */ + export const inboundSchema = Erc721ContractErcType$inboundSchema; + /** @deprecated use `Erc721ContractErcType$outboundSchema` instead. */ + export const outboundSchema = Erc721ContractErcType$outboundSchema; } /** @internal */ -export const Erc721Contract$inboundSchema: z.ZodType = - z.object({ - name: z.string().optional(), - description: z.string().optional(), - officialSite: z.string().optional(), - email: z.string().optional(), - logoAsset: ImageAsset$inboundSchema.optional(), - bannerAsset: ImageAsset$inboundSchema.optional(), - color: z.string().optional(), - resourceLinks: z.array(ResourceLink$inboundSchema).optional(), - tags: z.array(z.string()).optional(), - address: z.string(), - deploymentDetails: ContractDeploymentDetails$inboundSchema, - ercType: Erc721ContractErcType$inboundSchema, - symbol: z.string().optional(), - }); +export const Erc721Contract$inboundSchema: z.ZodType< + Erc721Contract, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + description: z.string().optional(), + officialSite: z.string().optional(), + email: z.string().optional(), + logoAsset: ImageAsset$inboundSchema.optional(), + bannerAsset: ImageAsset$inboundSchema.optional(), + color: z.string().optional(), + resourceLinks: z.array(ResourceLink$inboundSchema).optional(), + tags: z.array(z.string()).optional(), + address: z.string(), + deploymentDetails: ContractDeploymentDetails$inboundSchema, + ercType: Erc721ContractErcType$inboundSchema, + symbol: z.string().optional(), +}); /** @internal */ export type Erc721Contract$Outbound = { - name?: string | undefined; - description?: string | undefined; - officialSite?: string | undefined; - email?: string | undefined; - logoAsset?: ImageAsset$Outbound | undefined; - bannerAsset?: ImageAsset$Outbound | undefined; - color?: string | undefined; - resourceLinks?: Array | undefined; - tags?: Array | undefined; - address: string; - deploymentDetails: ContractDeploymentDetails$Outbound; - ercType: string; - symbol?: string | undefined; + name?: string | undefined; + description?: string | undefined; + officialSite?: string | undefined; + email?: string | undefined; + logoAsset?: ImageAsset$Outbound | undefined; + bannerAsset?: ImageAsset$Outbound | undefined; + color?: string | undefined; + resourceLinks?: Array | undefined; + tags?: Array | undefined; + address: string; + deploymentDetails: ContractDeploymentDetails$Outbound; + ercType: string; + symbol?: string | undefined; }; /** @internal */ export const Erc721Contract$outboundSchema: z.ZodType< - Erc721Contract$Outbound, - z.ZodTypeDef, - Erc721Contract + Erc721Contract$Outbound, + z.ZodTypeDef, + Erc721Contract > = z.object({ - name: z.string().optional(), - description: z.string().optional(), - officialSite: z.string().optional(), - email: z.string().optional(), - logoAsset: ImageAsset$outboundSchema.optional(), - bannerAsset: ImageAsset$outboundSchema.optional(), - color: z.string().optional(), - resourceLinks: z.array(ResourceLink$outboundSchema).optional(), - tags: z.array(z.string()).optional(), - address: z.string(), - deploymentDetails: ContractDeploymentDetails$outboundSchema, - ercType: Erc721ContractErcType$outboundSchema, - symbol: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + officialSite: z.string().optional(), + email: z.string().optional(), + logoAsset: ImageAsset$outboundSchema.optional(), + bannerAsset: ImageAsset$outboundSchema.optional(), + color: z.string().optional(), + resourceLinks: z.array(ResourceLink$outboundSchema).optional(), + tags: z.array(z.string()).optional(), + address: z.string(), + deploymentDetails: ContractDeploymentDetails$outboundSchema, + ercType: Erc721ContractErcType$outboundSchema, + symbol: z.string().optional(), }); /** @@ -133,10 +138,10 @@ export const Erc721Contract$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc721Contract$ { - /** @deprecated use `Erc721Contract$inboundSchema` instead. */ - export const inboundSchema = Erc721Contract$inboundSchema; - /** @deprecated use `Erc721Contract$outboundSchema` instead. */ - export const outboundSchema = Erc721Contract$outboundSchema; - /** @deprecated use `Erc721Contract$Outbound` instead. */ - export type Outbound = Erc721Contract$Outbound; + /** @deprecated use `Erc721Contract$inboundSchema` instead. */ + export const inboundSchema = Erc721Contract$inboundSchema; + /** @deprecated use `Erc721Contract$outboundSchema` instead. */ + export const outboundSchema = Erc721Contract$outboundSchema; + /** @deprecated use `Erc721Contract$Outbound` instead. */ + export type Outbound = Erc721Contract$Outbound; } diff --git a/src/models/components/erc721token.ts b/src/models/components/erc721token.ts index 52c7dd4..fdb1a16 100644 --- a/src/models/components/erc721token.ts +++ b/src/models/components/erc721token.ts @@ -2,98 +2,104 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - Erc721TokenMetadata, - Erc721TokenMetadata$inboundSchema, - Erc721TokenMetadata$Outbound, - Erc721TokenMetadata$outboundSchema, + Erc721TokenMetadata, + Erc721TokenMetadata$inboundSchema, + Erc721TokenMetadata$Outbound, + Erc721TokenMetadata$outboundSchema, } from "./erc721tokenmetadata.js"; -import * as z from "zod"; export const ErcType = { - Erc721: "ERC-721", + Erc721: "ERC-721", } as const; export type ErcType = ClosedEnum; export type Erc721Token = { - /** - * A wallet or contract address in mixed-case checksum encoding. - */ - address: string; - /** - * The contract name. - */ - name: string; - /** - * The contract symbol. - */ - symbol: string; - ercType: ErcType; - tokenId: string; - tokenUri: string; - metadata: Erc721TokenMetadata; - /** - * A wallet or contract address in mixed-case checksum encoding. - */ - ownerAddress?: string | undefined; + /** + * A wallet or contract address in mixed-case checksum encoding. + */ + address: string; + /** + * The contract name. + */ + name: string; + /** + * The contract symbol. + */ + symbol: string; + ercType: ErcType; + tokenId: string; + tokenUri: string; + metadata: Erc721TokenMetadata; + /** + * A wallet or contract address in mixed-case checksum encoding. + */ + ownerAddress?: string | undefined; }; /** @internal */ -export const ErcType$inboundSchema: z.ZodNativeEnum = z.nativeEnum(ErcType); +export const ErcType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(ErcType); /** @internal */ -export const ErcType$outboundSchema: z.ZodNativeEnum = ErcType$inboundSchema; +export const ErcType$outboundSchema: z.ZodNativeEnum = + ErcType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ErcType$ { - /** @deprecated use `ErcType$inboundSchema` instead. */ - export const inboundSchema = ErcType$inboundSchema; - /** @deprecated use `ErcType$outboundSchema` instead. */ - export const outboundSchema = ErcType$outboundSchema; + /** @deprecated use `ErcType$inboundSchema` instead. */ + export const inboundSchema = ErcType$inboundSchema; + /** @deprecated use `ErcType$outboundSchema` instead. */ + export const outboundSchema = ErcType$outboundSchema; } /** @internal */ -export const Erc721Token$inboundSchema: z.ZodType = z.object({ - address: z.string(), - name: z.string(), - symbol: z.string(), - ercType: ErcType$inboundSchema, - tokenId: z.string(), - tokenUri: z.string(), - metadata: Erc721TokenMetadata$inboundSchema, - ownerAddress: z.string().optional(), +export const Erc721Token$inboundSchema: z.ZodType< + Erc721Token, + z.ZodTypeDef, + unknown +> = z.object({ + address: z.string(), + name: z.string(), + symbol: z.string(), + ercType: ErcType$inboundSchema, + tokenId: z.string(), + tokenUri: z.string(), + metadata: Erc721TokenMetadata$inboundSchema, + ownerAddress: z.string().optional(), }); /** @internal */ export type Erc721Token$Outbound = { - address: string; - name: string; - symbol: string; - ercType: string; - tokenId: string; - tokenUri: string; - metadata: Erc721TokenMetadata$Outbound; - ownerAddress?: string | undefined; + address: string; + name: string; + symbol: string; + ercType: string; + tokenId: string; + tokenUri: string; + metadata: Erc721TokenMetadata$Outbound; + ownerAddress?: string | undefined; }; /** @internal */ export const Erc721Token$outboundSchema: z.ZodType< - Erc721Token$Outbound, - z.ZodTypeDef, - Erc721Token + Erc721Token$Outbound, + z.ZodTypeDef, + Erc721Token > = z.object({ - address: z.string(), - name: z.string(), - symbol: z.string(), - ercType: ErcType$outboundSchema, - tokenId: z.string(), - tokenUri: z.string(), - metadata: Erc721TokenMetadata$outboundSchema, - ownerAddress: z.string().optional(), + address: z.string(), + name: z.string(), + symbol: z.string(), + ercType: ErcType$outboundSchema, + tokenId: z.string(), + tokenUri: z.string(), + metadata: Erc721TokenMetadata$outboundSchema, + ownerAddress: z.string().optional(), }); /** @@ -101,10 +107,10 @@ export const Erc721Token$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc721Token$ { - /** @deprecated use `Erc721Token$inboundSchema` instead. */ - export const inboundSchema = Erc721Token$inboundSchema; - /** @deprecated use `Erc721Token$outboundSchema` instead. */ - export const outboundSchema = Erc721Token$outboundSchema; - /** @deprecated use `Erc721Token$Outbound` instead. */ - export type Outbound = Erc721Token$Outbound; + /** @deprecated use `Erc721Token$inboundSchema` instead. */ + export const inboundSchema = Erc721Token$inboundSchema; + /** @deprecated use `Erc721Token$outboundSchema` instead. */ + export const outboundSchema = Erc721Token$outboundSchema; + /** @deprecated use `Erc721Token$Outbound` instead. */ + export type Outbound = Erc721Token$Outbound; } diff --git a/src/models/components/erc721tokenbalance.ts b/src/models/components/erc721tokenbalance.ts index 2d43319..51e24b8 100644 --- a/src/models/components/erc721tokenbalance.ts +++ b/src/models/components/erc721tokenbalance.ts @@ -2,55 +2,57 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - Erc721TokenMetadata, - Erc721TokenMetadata$inboundSchema, - Erc721TokenMetadata$Outbound, - Erc721TokenMetadata$outboundSchema, + Erc721TokenMetadata, + Erc721TokenMetadata$inboundSchema, + Erc721TokenMetadata$Outbound, + Erc721TokenMetadata$outboundSchema, } from "./erc721tokenmetadata.js"; -import * as z from "zod"; export const Erc721TokenBalanceErcType = { - Erc721: "ERC-721", + Erc721: "ERC-721", } as const; -export type Erc721TokenBalanceErcType = ClosedEnum; +export type Erc721TokenBalanceErcType = ClosedEnum< + typeof Erc721TokenBalanceErcType +>; export type Erc721TokenBalance = { - /** - * A wallet or contract address in mixed-case checksum encoding. - */ - address: string; - /** - * The contract name. - */ - name: string; - /** - * The contract symbol. - */ - symbol: string; - ercType: Erc721TokenBalanceErcType; - tokenId: string; - tokenUri: string; - metadata: Erc721TokenMetadata; - /** - * A wallet or contract address in mixed-case checksum encoding. - */ - ownerAddress?: string | undefined; - /** - * The evm chain id. - */ - chainId: string; + /** + * A wallet or contract address in mixed-case checksum encoding. + */ + address: string; + /** + * The contract name. + */ + name: string; + /** + * The contract symbol. + */ + symbol: string; + ercType: Erc721TokenBalanceErcType; + tokenId: string; + tokenUri: string; + metadata: Erc721TokenMetadata; + /** + * A wallet or contract address in mixed-case checksum encoding. + */ + ownerAddress?: string | undefined; + /** + * The evm chain id. + */ + chainId: string; }; /** @internal */ export const Erc721TokenBalanceErcType$inboundSchema: z.ZodNativeEnum< - typeof Erc721TokenBalanceErcType + typeof Erc721TokenBalanceErcType > = z.nativeEnum(Erc721TokenBalanceErcType); /** @internal */ export const Erc721TokenBalanceErcType$outboundSchema: z.ZodNativeEnum< - typeof Erc721TokenBalanceErcType + typeof Erc721TokenBalanceErcType > = Erc721TokenBalanceErcType$inboundSchema; /** @@ -58,57 +60,57 @@ export const Erc721TokenBalanceErcType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc721TokenBalanceErcType$ { - /** @deprecated use `Erc721TokenBalanceErcType$inboundSchema` instead. */ - export const inboundSchema = Erc721TokenBalanceErcType$inboundSchema; - /** @deprecated use `Erc721TokenBalanceErcType$outboundSchema` instead. */ - export const outboundSchema = Erc721TokenBalanceErcType$outboundSchema; + /** @deprecated use `Erc721TokenBalanceErcType$inboundSchema` instead. */ + export const inboundSchema = Erc721TokenBalanceErcType$inboundSchema; + /** @deprecated use `Erc721TokenBalanceErcType$outboundSchema` instead. */ + export const outboundSchema = Erc721TokenBalanceErcType$outboundSchema; } /** @internal */ export const Erc721TokenBalance$inboundSchema: z.ZodType< - Erc721TokenBalance, - z.ZodTypeDef, - unknown + Erc721TokenBalance, + z.ZodTypeDef, + unknown > = z.object({ - address: z.string(), - name: z.string(), - symbol: z.string(), - ercType: Erc721TokenBalanceErcType$inboundSchema, - tokenId: z.string(), - tokenUri: z.string(), - metadata: Erc721TokenMetadata$inboundSchema, - ownerAddress: z.string().optional(), - chainId: z.string(), + address: z.string(), + name: z.string(), + symbol: z.string(), + ercType: Erc721TokenBalanceErcType$inboundSchema, + tokenId: z.string(), + tokenUri: z.string(), + metadata: Erc721TokenMetadata$inboundSchema, + ownerAddress: z.string().optional(), + chainId: z.string(), }); /** @internal */ export type Erc721TokenBalance$Outbound = { - address: string; - name: string; - symbol: string; - ercType: string; - tokenId: string; - tokenUri: string; - metadata: Erc721TokenMetadata$Outbound; - ownerAddress?: string | undefined; - chainId: string; + address: string; + name: string; + symbol: string; + ercType: string; + tokenId: string; + tokenUri: string; + metadata: Erc721TokenMetadata$Outbound; + ownerAddress?: string | undefined; + chainId: string; }; /** @internal */ export const Erc721TokenBalance$outboundSchema: z.ZodType< - Erc721TokenBalance$Outbound, - z.ZodTypeDef, - Erc721TokenBalance + Erc721TokenBalance$Outbound, + z.ZodTypeDef, + Erc721TokenBalance > = z.object({ - address: z.string(), - name: z.string(), - symbol: z.string(), - ercType: Erc721TokenBalanceErcType$outboundSchema, - tokenId: z.string(), - tokenUri: z.string(), - metadata: Erc721TokenMetadata$outboundSchema, - ownerAddress: z.string().optional(), - chainId: z.string(), + address: z.string(), + name: z.string(), + symbol: z.string(), + ercType: Erc721TokenBalanceErcType$outboundSchema, + tokenId: z.string(), + tokenUri: z.string(), + metadata: Erc721TokenMetadata$outboundSchema, + ownerAddress: z.string().optional(), + chainId: z.string(), }); /** @@ -116,10 +118,10 @@ export const Erc721TokenBalance$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc721TokenBalance$ { - /** @deprecated use `Erc721TokenBalance$inboundSchema` instead. */ - export const inboundSchema = Erc721TokenBalance$inboundSchema; - /** @deprecated use `Erc721TokenBalance$outboundSchema` instead. */ - export const outboundSchema = Erc721TokenBalance$outboundSchema; - /** @deprecated use `Erc721TokenBalance$Outbound` instead. */ - export type Outbound = Erc721TokenBalance$Outbound; + /** @deprecated use `Erc721TokenBalance$inboundSchema` instead. */ + export const inboundSchema = Erc721TokenBalance$inboundSchema; + /** @deprecated use `Erc721TokenBalance$outboundSchema` instead. */ + export const outboundSchema = Erc721TokenBalance$outboundSchema; + /** @deprecated use `Erc721TokenBalance$Outbound` instead. */ + export type Outbound = Erc721TokenBalance$Outbound; } diff --git a/src/models/components/erc721tokenmetadata.ts b/src/models/components/erc721tokenmetadata.ts index 69334d2..d0c53ed 100644 --- a/src/models/components/erc721tokenmetadata.ts +++ b/src/models/components/erc721tokenmetadata.ts @@ -2,77 +2,77 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - NftTokenMetadataStatus, - NftTokenMetadataStatus$inboundSchema, - NftTokenMetadataStatus$outboundSchema, + NftTokenMetadataStatus, + NftTokenMetadataStatus$inboundSchema, + NftTokenMetadataStatus$outboundSchema, } from "./nfttokenmetadatastatus.js"; -import * as z from "zod"; export type Erc721TokenMetadata = { - /** - * The metadata indexing status of the nft. - */ - indexStatus: NftTokenMetadataStatus; - metadataLastUpdatedTimestamp?: number | undefined; - name?: string | undefined; - symbol?: string | undefined; - imageUri?: string | undefined; - description?: string | undefined; - animationUri?: string | undefined; - externalUrl?: string | undefined; - background?: string | undefined; - attributes?: string | undefined; + /** + * The metadata indexing status of the nft. + */ + indexStatus: NftTokenMetadataStatus; + metadataLastUpdatedTimestamp?: number | undefined; + name?: string | undefined; + symbol?: string | undefined; + imageUri?: string | undefined; + description?: string | undefined; + animationUri?: string | undefined; + externalUrl?: string | undefined; + background?: string | undefined; + attributes?: string | undefined; }; /** @internal */ export const Erc721TokenMetadata$inboundSchema: z.ZodType< - Erc721TokenMetadata, - z.ZodTypeDef, - unknown + Erc721TokenMetadata, + z.ZodTypeDef, + unknown > = z.object({ - indexStatus: NftTokenMetadataStatus$inboundSchema, - metadataLastUpdatedTimestamp: z.number().optional(), - name: z.string().optional(), - symbol: z.string().optional(), - imageUri: z.string().optional(), - description: z.string().optional(), - animationUri: z.string().optional(), - externalUrl: z.string().optional(), - background: z.string().optional(), - attributes: z.string().optional(), + indexStatus: NftTokenMetadataStatus$inboundSchema, + metadataLastUpdatedTimestamp: z.number().optional(), + name: z.string().optional(), + symbol: z.string().optional(), + imageUri: z.string().optional(), + description: z.string().optional(), + animationUri: z.string().optional(), + externalUrl: z.string().optional(), + background: z.string().optional(), + attributes: z.string().optional(), }); /** @internal */ export type Erc721TokenMetadata$Outbound = { - indexStatus: string; - metadataLastUpdatedTimestamp?: number | undefined; - name?: string | undefined; - symbol?: string | undefined; - imageUri?: string | undefined; - description?: string | undefined; - animationUri?: string | undefined; - externalUrl?: string | undefined; - background?: string | undefined; - attributes?: string | undefined; + indexStatus: string; + metadataLastUpdatedTimestamp?: number | undefined; + name?: string | undefined; + symbol?: string | undefined; + imageUri?: string | undefined; + description?: string | undefined; + animationUri?: string | undefined; + externalUrl?: string | undefined; + background?: string | undefined; + attributes?: string | undefined; }; /** @internal */ export const Erc721TokenMetadata$outboundSchema: z.ZodType< - Erc721TokenMetadata$Outbound, - z.ZodTypeDef, - Erc721TokenMetadata + Erc721TokenMetadata$Outbound, + z.ZodTypeDef, + Erc721TokenMetadata > = z.object({ - indexStatus: NftTokenMetadataStatus$outboundSchema, - metadataLastUpdatedTimestamp: z.number().optional(), - name: z.string().optional(), - symbol: z.string().optional(), - imageUri: z.string().optional(), - description: z.string().optional(), - animationUri: z.string().optional(), - externalUrl: z.string().optional(), - background: z.string().optional(), - attributes: z.string().optional(), + indexStatus: NftTokenMetadataStatus$outboundSchema, + metadataLastUpdatedTimestamp: z.number().optional(), + name: z.string().optional(), + symbol: z.string().optional(), + imageUri: z.string().optional(), + description: z.string().optional(), + animationUri: z.string().optional(), + externalUrl: z.string().optional(), + background: z.string().optional(), + attributes: z.string().optional(), }); /** @@ -80,10 +80,10 @@ export const Erc721TokenMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc721TokenMetadata$ { - /** @deprecated use `Erc721TokenMetadata$inboundSchema` instead. */ - export const inboundSchema = Erc721TokenMetadata$inboundSchema; - /** @deprecated use `Erc721TokenMetadata$outboundSchema` instead. */ - export const outboundSchema = Erc721TokenMetadata$outboundSchema; - /** @deprecated use `Erc721TokenMetadata$Outbound` instead. */ - export type Outbound = Erc721TokenMetadata$Outbound; + /** @deprecated use `Erc721TokenMetadata$inboundSchema` instead. */ + export const inboundSchema = Erc721TokenMetadata$inboundSchema; + /** @deprecated use `Erc721TokenMetadata$outboundSchema` instead. */ + export const outboundSchema = Erc721TokenMetadata$outboundSchema; + /** @deprecated use `Erc721TokenMetadata$Outbound` instead. */ + export type Outbound = Erc721TokenMetadata$Outbound; } diff --git a/src/models/components/erc721transfer.ts b/src/models/components/erc721transfer.ts index 6b4fd4d..708b4c2 100644 --- a/src/models/components/erc721transfer.ts +++ b/src/models/components/erc721transfer.ts @@ -2,82 +2,85 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Erc721Token, - Erc721Token$inboundSchema, - Erc721Token$Outbound, - Erc721Token$outboundSchema, + Erc721Token, + Erc721Token$inboundSchema, + Erc721Token$Outbound, + Erc721Token$outboundSchema, } from "./erc721token.js"; import { - RichAddress, - RichAddress$inboundSchema, - RichAddress$Outbound, - RichAddress$outboundSchema, + RichAddress, + RichAddress$inboundSchema, + RichAddress$Outbound, + RichAddress$outboundSchema, } from "./richaddress.js"; -import * as z from "zod"; export type Erc721Transfer = { - /** - * The block number on the chain. - */ - blockNumber: string; - /** - * The block finality timestamp. - */ - blockTimestamp: number; - /** - * The block hash identifier. - */ - blockHash: string; - /** - * The transaction hash identifier. - */ - txHash: string; - from: RichAddress; - to: RichAddress; - logIndex: number; - erc721Token: Erc721Token; + /** + * The block number on the chain. + */ + blockNumber: string; + /** + * The block finality timestamp. + */ + blockTimestamp: number; + /** + * The block hash identifier. + */ + blockHash: string; + /** + * The transaction hash identifier. + */ + txHash: string; + from: RichAddress; + to: RichAddress; + logIndex: number; + erc721Token: Erc721Token; }; /** @internal */ -export const Erc721Transfer$inboundSchema: z.ZodType = - z.object({ - blockNumber: z.string(), - blockTimestamp: z.number(), - blockHash: z.string(), - txHash: z.string(), - from: RichAddress$inboundSchema, - to: RichAddress$inboundSchema, - logIndex: z.number(), - erc721Token: Erc721Token$inboundSchema, - }); +export const Erc721Transfer$inboundSchema: z.ZodType< + Erc721Transfer, + z.ZodTypeDef, + unknown +> = z.object({ + blockNumber: z.string(), + blockTimestamp: z.number(), + blockHash: z.string(), + txHash: z.string(), + from: RichAddress$inboundSchema, + to: RichAddress$inboundSchema, + logIndex: z.number(), + erc721Token: Erc721Token$inboundSchema, +}); /** @internal */ export type Erc721Transfer$Outbound = { - blockNumber: string; - blockTimestamp: number; - blockHash: string; - txHash: string; - from: RichAddress$Outbound; - to: RichAddress$Outbound; - logIndex: number; - erc721Token: Erc721Token$Outbound; + blockNumber: string; + blockTimestamp: number; + blockHash: string; + txHash: string; + from: RichAddress$Outbound; + to: RichAddress$Outbound; + logIndex: number; + erc721Token: Erc721Token$Outbound; }; /** @internal */ export const Erc721Transfer$outboundSchema: z.ZodType< - Erc721Transfer$Outbound, - z.ZodTypeDef, - Erc721Transfer + Erc721Transfer$Outbound, + z.ZodTypeDef, + Erc721Transfer > = z.object({ - blockNumber: z.string(), - blockTimestamp: z.number(), - blockHash: z.string(), - txHash: z.string(), - from: RichAddress$outboundSchema, - to: RichAddress$outboundSchema, - logIndex: z.number(), - erc721Token: Erc721Token$outboundSchema, + blockNumber: z.string(), + blockTimestamp: z.number(), + blockHash: z.string(), + txHash: z.string(), + from: RichAddress$outboundSchema, + to: RichAddress$outboundSchema, + logIndex: z.number(), + erc721Token: Erc721Token$outboundSchema, }); /** @@ -85,10 +88,10 @@ export const Erc721Transfer$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc721Transfer$ { - /** @deprecated use `Erc721Transfer$inboundSchema` instead. */ - export const inboundSchema = Erc721Transfer$inboundSchema; - /** @deprecated use `Erc721Transfer$outboundSchema` instead. */ - export const outboundSchema = Erc721Transfer$outboundSchema; - /** @deprecated use `Erc721Transfer$Outbound` instead. */ - export type Outbound = Erc721Transfer$Outbound; + /** @deprecated use `Erc721Transfer$inboundSchema` instead. */ + export const inboundSchema = Erc721Transfer$inboundSchema; + /** @deprecated use `Erc721Transfer$outboundSchema` instead. */ + export const outboundSchema = Erc721Transfer$outboundSchema; + /** @deprecated use `Erc721Transfer$Outbound` instead. */ + export type Outbound = Erc721Transfer$Outbound; } diff --git a/src/models/components/erc721transferdetails.ts b/src/models/components/erc721transferdetails.ts index 015186f..141c112 100644 --- a/src/models/components/erc721transferdetails.ts +++ b/src/models/components/erc721transferdetails.ts @@ -2,57 +2,57 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Erc721Token, - Erc721Token$inboundSchema, - Erc721Token$Outbound, - Erc721Token$outboundSchema, + Erc721Token, + Erc721Token$inboundSchema, + Erc721Token$Outbound, + Erc721Token$outboundSchema, } from "./erc721token.js"; import { - RichAddress, - RichAddress$inboundSchema, - RichAddress$Outbound, - RichAddress$outboundSchema, + RichAddress, + RichAddress$inboundSchema, + RichAddress$Outbound, + RichAddress$outboundSchema, } from "./richaddress.js"; -import * as z from "zod"; export type Erc721TransferDetails = { - from: RichAddress; - to: RichAddress; - logIndex: number; - erc721Token: Erc721Token; + from: RichAddress; + to: RichAddress; + logIndex: number; + erc721Token: Erc721Token; }; /** @internal */ export const Erc721TransferDetails$inboundSchema: z.ZodType< - Erc721TransferDetails, - z.ZodTypeDef, - unknown + Erc721TransferDetails, + z.ZodTypeDef, + unknown > = z.object({ - from: RichAddress$inboundSchema, - to: RichAddress$inboundSchema, - logIndex: z.number(), - erc721Token: Erc721Token$inboundSchema, + from: RichAddress$inboundSchema, + to: RichAddress$inboundSchema, + logIndex: z.number(), + erc721Token: Erc721Token$inboundSchema, }); /** @internal */ export type Erc721TransferDetails$Outbound = { - from: RichAddress$Outbound; - to: RichAddress$Outbound; - logIndex: number; - erc721Token: Erc721Token$Outbound; + from: RichAddress$Outbound; + to: RichAddress$Outbound; + logIndex: number; + erc721Token: Erc721Token$Outbound; }; /** @internal */ export const Erc721TransferDetails$outboundSchema: z.ZodType< - Erc721TransferDetails$Outbound, - z.ZodTypeDef, - Erc721TransferDetails + Erc721TransferDetails$Outbound, + z.ZodTypeDef, + Erc721TransferDetails > = z.object({ - from: RichAddress$outboundSchema, - to: RichAddress$outboundSchema, - logIndex: z.number(), - erc721Token: Erc721Token$outboundSchema, + from: RichAddress$outboundSchema, + to: RichAddress$outboundSchema, + logIndex: z.number(), + erc721Token: Erc721Token$outboundSchema, }); /** @@ -60,10 +60,10 @@ export const Erc721TransferDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Erc721TransferDetails$ { - /** @deprecated use `Erc721TransferDetails$inboundSchema` instead. */ - export const inboundSchema = Erc721TransferDetails$inboundSchema; - /** @deprecated use `Erc721TransferDetails$outboundSchema` instead. */ - export const outboundSchema = Erc721TransferDetails$outboundSchema; - /** @deprecated use `Erc721TransferDetails$Outbound` instead. */ - export type Outbound = Erc721TransferDetails$Outbound; + /** @deprecated use `Erc721TransferDetails$inboundSchema` instead. */ + export const inboundSchema = Erc721TransferDetails$inboundSchema; + /** @deprecated use `Erc721TransferDetails$outboundSchema` instead. */ + export const outboundSchema = Erc721TransferDetails$outboundSchema; + /** @deprecated use `Erc721TransferDetails$Outbound` instead. */ + export type Outbound = Erc721TransferDetails$Outbound; } diff --git a/src/models/components/eventtype.ts b/src/models/components/eventtype.ts index 4db9bc0..e377968 100644 --- a/src/models/components/eventtype.ts +++ b/src/models/components/eventtype.ts @@ -2,27 +2,29 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const EventType = { - AddressActivity: "address_activity", + AddressActivity: "address_activity", } as const; export type EventType = ClosedEnum; /** @internal */ -export const EventType$inboundSchema: z.ZodNativeEnum = z.nativeEnum(EventType); +export const EventType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(EventType); /** @internal */ -export const EventType$outboundSchema: z.ZodNativeEnum = EventType$inboundSchema; +export const EventType$outboundSchema: z.ZodNativeEnum = + EventType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EventType$ { - /** @deprecated use `EventType$inboundSchema` instead. */ - export const inboundSchema = EventType$inboundSchema; - /** @deprecated use `EventType$outboundSchema` instead. */ - export const outboundSchema = EventType$outboundSchema; + /** @deprecated use `EventType$inboundSchema` instead. */ + export const inboundSchema = EventType$inboundSchema; + /** @deprecated use `EventType$outboundSchema` instead. */ + export const outboundSchema = EventType$outboundSchema; } diff --git a/src/models/components/evmblock.ts b/src/models/components/evmblock.ts index 9a71c33..a227214 100644 --- a/src/models/components/evmblock.ts +++ b/src/models/components/evmblock.ts @@ -5,104 +5,111 @@ import * as z from "zod"; export type EvmBlock = { - /** - * The block number on the chain. - */ - blockNumber: string; - /** - * The block finality timestamp. - */ - blockTimestamp: number; - /** - * The block hash identifier. - */ - blockHash: string; - /** - * The number of evm transactions in the block. - */ - txCount: number; - /** - * The base gas fee for a transaction to be included in the block. - */ - baseFee: string; - /** - * The gas used for transactions in the block. - */ - gasUsed: string; - /** - * The total gas limit set for transactions in the block. - */ - gasLimit: string; - gasCost: string; - /** - * The hash of the parent block. - */ - parentHash: string; - /** - * The amount of fees spent/burned for transactions in the block. - */ - feesSpent: string; - /** - * The cumulative number of transactions for the chain including this block. - */ - cumulativeTransactions: string; + /** + * The block number on the chain. + */ + blockNumber: string; + /** + * The block finality timestamp. + */ + blockTimestamp: number; + /** + * The block hash identifier. + */ + blockHash: string; + /** + * The number of evm transactions in the block. + */ + txCount: number; + /** + * The base gas fee for a transaction to be included in the block. + */ + baseFee: string; + /** + * The gas used for transactions in the block. + */ + gasUsed: string; + /** + * The total gas limit set for transactions in the block. + */ + gasLimit: string; + gasCost: string; + /** + * The hash of the parent block. + */ + parentHash: string; + /** + * The amount of fees spent/burned for transactions in the block. + */ + feesSpent: string; + /** + * The cumulative number of transactions for the chain including this block. + */ + cumulativeTransactions: string; }; /** @internal */ -export const EvmBlock$inboundSchema: z.ZodType = z.object({ - blockNumber: z.string(), - blockTimestamp: z.number(), - blockHash: z.string(), - txCount: z.number(), - baseFee: z.string(), - gasUsed: z.string(), - gasLimit: z.string(), - gasCost: z.string(), - parentHash: z.string(), - feesSpent: z.string(), - cumulativeTransactions: z.string(), +export const EvmBlock$inboundSchema: z.ZodType< + EvmBlock, + z.ZodTypeDef, + unknown +> = z.object({ + blockNumber: z.string(), + blockTimestamp: z.number(), + blockHash: z.string(), + txCount: z.number(), + baseFee: z.string(), + gasUsed: z.string(), + gasLimit: z.string(), + gasCost: z.string(), + parentHash: z.string(), + feesSpent: z.string(), + cumulativeTransactions: z.string(), }); /** @internal */ export type EvmBlock$Outbound = { - blockNumber: string; - blockTimestamp: number; - blockHash: string; - txCount: number; - baseFee: string; - gasUsed: string; - gasLimit: string; - gasCost: string; - parentHash: string; - feesSpent: string; - cumulativeTransactions: string; + blockNumber: string; + blockTimestamp: number; + blockHash: string; + txCount: number; + baseFee: string; + gasUsed: string; + gasLimit: string; + gasCost: string; + parentHash: string; + feesSpent: string; + cumulativeTransactions: string; }; /** @internal */ -export const EvmBlock$outboundSchema: z.ZodType = - z.object({ - blockNumber: z.string(), - blockTimestamp: z.number(), - blockHash: z.string(), - txCount: z.number(), - baseFee: z.string(), - gasUsed: z.string(), - gasLimit: z.string(), - gasCost: z.string(), - parentHash: z.string(), - feesSpent: z.string(), - cumulativeTransactions: z.string(), - }); +export const EvmBlock$outboundSchema: z.ZodType< + EvmBlock$Outbound, + z.ZodTypeDef, + EvmBlock +> = z.object({ + blockNumber: z.string(), + blockTimestamp: z.number(), + blockHash: z.string(), + txCount: z.number(), + baseFee: z.string(), + gasUsed: z.string(), + gasLimit: z.string(), + gasCost: z.string(), + parentHash: z.string(), + feesSpent: z.string(), + cumulativeTransactions: z.string(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EvmBlock$ { - /** @deprecated use `EvmBlock$inboundSchema` instead. */ - export const inboundSchema = EvmBlock$inboundSchema; - /** @deprecated use `EvmBlock$outboundSchema` instead. */ - export const outboundSchema = EvmBlock$outboundSchema; - /** @deprecated use `EvmBlock$Outbound` instead. */ - export type Outbound = EvmBlock$Outbound; + /** @deprecated use `EvmBlock$inboundSchema` instead. */ + export const inboundSchema = EvmBlock$inboundSchema; + /** @deprecated use `EvmBlock$outboundSchema` instead. */ + export const outboundSchema = EvmBlock$outboundSchema; + /** @deprecated use `EvmBlock$Outbound` instead. */ + export type Outbound = EvmBlock$Outbound; } diff --git a/src/models/components/evminput.ts b/src/models/components/evminput.ts index 7b5181a..82a54b1 100644 --- a/src/models/components/evminput.ts +++ b/src/models/components/evminput.ts @@ -2,66 +2,73 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - AssetAmount, - AssetAmount$inboundSchema, - AssetAmount$Outbound, - AssetAmount$outboundSchema, + AssetAmount, + AssetAmount$inboundSchema, + AssetAmount$Outbound, + AssetAmount$outboundSchema, } from "./assetamount.js"; import { - UtxoCredential, - UtxoCredential$inboundSchema, - UtxoCredential$Outbound, - UtxoCredential$outboundSchema, + UtxoCredential, + UtxoCredential$inboundSchema, + UtxoCredential$Outbound, + UtxoCredential$outboundSchema, } from "./utxocredential.js"; -import * as z from "zod"; export type EVMInput = { - /** - * EVM address from which the asset is exported in ExportTx. - */ - fromAddress: string; - /** - * AssetAmount details for the asset being transferred. - */ - asset: AssetAmount; - /** - * Credentials that signed this transaction. - */ - credentials: Array; + /** + * EVM address from which the asset is exported in ExportTx. + */ + fromAddress: string; + /** + * AssetAmount details for the asset being transferred. + */ + asset: AssetAmount; + /** + * Credentials that signed this transaction. + */ + credentials: Array; }; /** @internal */ -export const EVMInput$inboundSchema: z.ZodType = z.object({ - fromAddress: z.string(), - asset: AssetAmount$inboundSchema, - credentials: z.array(UtxoCredential$inboundSchema), +export const EVMInput$inboundSchema: z.ZodType< + EVMInput, + z.ZodTypeDef, + unknown +> = z.object({ + fromAddress: z.string(), + asset: AssetAmount$inboundSchema, + credentials: z.array(UtxoCredential$inboundSchema), }); /** @internal */ export type EVMInput$Outbound = { - fromAddress: string; - asset: AssetAmount$Outbound; - credentials: Array; + fromAddress: string; + asset: AssetAmount$Outbound; + credentials: Array; }; /** @internal */ -export const EVMInput$outboundSchema: z.ZodType = - z.object({ - fromAddress: z.string(), - asset: AssetAmount$outboundSchema, - credentials: z.array(UtxoCredential$outboundSchema), - }); +export const EVMInput$outboundSchema: z.ZodType< + EVMInput$Outbound, + z.ZodTypeDef, + EVMInput +> = z.object({ + fromAddress: z.string(), + asset: AssetAmount$outboundSchema, + credentials: z.array(UtxoCredential$outboundSchema), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EVMInput$ { - /** @deprecated use `EVMInput$inboundSchema` instead. */ - export const inboundSchema = EVMInput$inboundSchema; - /** @deprecated use `EVMInput$outboundSchema` instead. */ - export const outboundSchema = EVMInput$outboundSchema; - /** @deprecated use `EVMInput$Outbound` instead. */ - export type Outbound = EVMInput$Outbound; + /** @deprecated use `EVMInput$inboundSchema` instead. */ + export const inboundSchema = EVMInput$inboundSchema; + /** @deprecated use `EVMInput$outboundSchema` instead. */ + export const outboundSchema = EVMInput$outboundSchema; + /** @deprecated use `EVMInput$Outbound` instead. */ + export type Outbound = EVMInput$Outbound; } diff --git a/src/models/components/evmnetworkoptions.ts b/src/models/components/evmnetworkoptions.ts index 5a17222..5bfdba4 100644 --- a/src/models/components/evmnetworkoptions.ts +++ b/src/models/components/evmnetworkoptions.ts @@ -5,31 +5,34 @@ import * as z from "zod"; export type EvmNetworkOptions = { - addresses: Array; - includeChains: Array; + addresses: Array; + includeChains: Array; }; /** @internal */ -export const EvmNetworkOptions$inboundSchema: z.ZodType = - z.object({ - addresses: z.array(z.string()), - includeChains: z.array(z.string()), - }); +export const EvmNetworkOptions$inboundSchema: z.ZodType< + EvmNetworkOptions, + z.ZodTypeDef, + unknown +> = z.object({ + addresses: z.array(z.string()), + includeChains: z.array(z.string()), +}); /** @internal */ export type EvmNetworkOptions$Outbound = { - addresses: Array; - includeChains: Array; + addresses: Array; + includeChains: Array; }; /** @internal */ export const EvmNetworkOptions$outboundSchema: z.ZodType< - EvmNetworkOptions$Outbound, - z.ZodTypeDef, - EvmNetworkOptions + EvmNetworkOptions$Outbound, + z.ZodTypeDef, + EvmNetworkOptions > = z.object({ - addresses: z.array(z.string()), - includeChains: z.array(z.string()), + addresses: z.array(z.string()), + includeChains: z.array(z.string()), }); /** @@ -37,10 +40,10 @@ export const EvmNetworkOptions$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EvmNetworkOptions$ { - /** @deprecated use `EvmNetworkOptions$inboundSchema` instead. */ - export const inboundSchema = EvmNetworkOptions$inboundSchema; - /** @deprecated use `EvmNetworkOptions$outboundSchema` instead. */ - export const outboundSchema = EvmNetworkOptions$outboundSchema; - /** @deprecated use `EvmNetworkOptions$Outbound` instead. */ - export type Outbound = EvmNetworkOptions$Outbound; + /** @deprecated use `EvmNetworkOptions$inboundSchema` instead. */ + export const inboundSchema = EvmNetworkOptions$inboundSchema; + /** @deprecated use `EvmNetworkOptions$outboundSchema` instead. */ + export const outboundSchema = EvmNetworkOptions$outboundSchema; + /** @deprecated use `EvmNetworkOptions$Outbound` instead. */ + export type Outbound = EvmNetworkOptions$Outbound; } diff --git a/src/models/components/evmoperationtype.ts b/src/models/components/evmoperationtype.ts index 3427274..ced8e58 100644 --- a/src/models/components/evmoperationtype.ts +++ b/src/models/components/evmoperationtype.ts @@ -2,29 +2,31 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const EVMOperationType = { - TransactionExportEvm: "TRANSACTION_EXPORT_EVM", + TransactionExportEvm: "TRANSACTION_EXPORT_EVM", } as const; export type EVMOperationType = ClosedEnum; /** @internal */ -export const EVMOperationType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(EVMOperationType); +export const EVMOperationType$inboundSchema: z.ZodNativeEnum< + typeof EVMOperationType +> = z.nativeEnum(EVMOperationType); /** @internal */ -export const EVMOperationType$outboundSchema: z.ZodNativeEnum = - EVMOperationType$inboundSchema; +export const EVMOperationType$outboundSchema: z.ZodNativeEnum< + typeof EVMOperationType +> = EVMOperationType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EVMOperationType$ { - /** @deprecated use `EVMOperationType$inboundSchema` instead. */ - export const inboundSchema = EVMOperationType$inboundSchema; - /** @deprecated use `EVMOperationType$outboundSchema` instead. */ - export const outboundSchema = EVMOperationType$outboundSchema; + /** @deprecated use `EVMOperationType$inboundSchema` instead. */ + export const inboundSchema = EVMOperationType$inboundSchema; + /** @deprecated use `EVMOperationType$outboundSchema` instead. */ + export const outboundSchema = EVMOperationType$outboundSchema; } diff --git a/src/models/components/evmoutput.ts b/src/models/components/evmoutput.ts index 18e2405..f817fa1 100644 --- a/src/models/components/evmoutput.ts +++ b/src/models/components/evmoutput.ts @@ -2,53 +2,60 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - AssetAmount, - AssetAmount$inboundSchema, - AssetAmount$Outbound, - AssetAmount$outboundSchema, + AssetAmount, + AssetAmount$inboundSchema, + AssetAmount$Outbound, + AssetAmount$outboundSchema, } from "./assetamount.js"; -import * as z from "zod"; export type EVMOutput = { - /** - * EVM address to which the asset is imported in ImportTx - */ - toAddress: string; - /** - * AssetAmount details for the asset being transferred. - */ - asset: AssetAmount; + /** + * EVM address to which the asset is imported in ImportTx + */ + toAddress: string; + /** + * AssetAmount details for the asset being transferred. + */ + asset: AssetAmount; }; /** @internal */ -export const EVMOutput$inboundSchema: z.ZodType = z.object({ - toAddress: z.string(), - asset: AssetAmount$inboundSchema, +export const EVMOutput$inboundSchema: z.ZodType< + EVMOutput, + z.ZodTypeDef, + unknown +> = z.object({ + toAddress: z.string(), + asset: AssetAmount$inboundSchema, }); /** @internal */ export type EVMOutput$Outbound = { - toAddress: string; - asset: AssetAmount$Outbound; + toAddress: string; + asset: AssetAmount$Outbound; }; /** @internal */ -export const EVMOutput$outboundSchema: z.ZodType = - z.object({ - toAddress: z.string(), - asset: AssetAmount$outboundSchema, - }); +export const EVMOutput$outboundSchema: z.ZodType< + EVMOutput$Outbound, + z.ZodTypeDef, + EVMOutput +> = z.object({ + toAddress: z.string(), + asset: AssetAmount$outboundSchema, +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EVMOutput$ { - /** @deprecated use `EVMOutput$inboundSchema` instead. */ - export const inboundSchema = EVMOutput$inboundSchema; - /** @deprecated use `EVMOutput$outboundSchema` instead. */ - export const outboundSchema = EVMOutput$outboundSchema; - /** @deprecated use `EVMOutput$Outbound` instead. */ - export type Outbound = EVMOutput$Outbound; + /** @deprecated use `EVMOutput$inboundSchema` instead. */ + export const inboundSchema = EVMOutput$inboundSchema; + /** @deprecated use `EVMOutput$outboundSchema` instead. */ + export const outboundSchema = EVMOutput$outboundSchema; + /** @deprecated use `EVMOutput$Outbound` instead. */ + export type Outbound = EVMOutput$Outbound; } diff --git a/src/models/components/fullnativetransactiondetails.ts b/src/models/components/fullnativetransactiondetails.ts index e87a990..e2063d4 100644 --- a/src/models/components/fullnativetransactiondetails.ts +++ b/src/models/components/fullnativetransactiondetails.ts @@ -2,148 +2,153 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { Method, Method$inboundSchema, Method$Outbound, Method$outboundSchema } from "./method.js"; +import * as z from "zod"; +import { + Method, + Method$inboundSchema, + Method$Outbound, + Method$outboundSchema, +} from "./method.js"; import { - RichAddress, - RichAddress$inboundSchema, - RichAddress$Outbound, - RichAddress$outboundSchema, + RichAddress, + RichAddress$inboundSchema, + RichAddress$Outbound, + RichAddress$outboundSchema, } from "./richaddress.js"; -import * as z from "zod"; export type FullNativeTransactionDetails = { - /** - * The block number on the chain. - */ - blockNumber: string; - /** - * The block finality timestamp. - */ - blockTimestamp: number; - /** - * The block hash identifier. - */ - blockHash: string; - /** - * The index at which the transaction occured in the block (0-indexed). - */ - blockIndex: number; - /** - * The transaction hash identifier. - */ - txHash: string; - /** - * The transaction status, which is either 0 (failed) or 1 (successful). - */ - txStatus: string; - /** - * The transaction type. - */ - txType: number; - /** - * The gas limit set for the transaction. - */ - gasLimit: string; - /** - * The amount of gas used. - */ - gasUsed: string; - /** - * The gas price denominated by the number of decimals of the native token. - */ - gasPrice: string; - /** - * The nonce used by the sender of the transaction. - */ - nonce: string; - from: RichAddress; - to: RichAddress; - method?: Method | undefined; - value: string; - /** - * The data sent for the transaction. - */ - input: string; - baseFeePerGas: string; - maxFeePerGas?: string | undefined; - maxPriorityFeePerGas?: string | undefined; + /** + * The block number on the chain. + */ + blockNumber: string; + /** + * The block finality timestamp. + */ + blockTimestamp: number; + /** + * The block hash identifier. + */ + blockHash: string; + /** + * The index at which the transaction occured in the block (0-indexed). + */ + blockIndex: number; + /** + * The transaction hash identifier. + */ + txHash: string; + /** + * The transaction status, which is either 0 (failed) or 1 (successful). + */ + txStatus: string; + /** + * The transaction type. + */ + txType: number; + /** + * The gas limit set for the transaction. + */ + gasLimit: string; + /** + * The amount of gas used. + */ + gasUsed: string; + /** + * The gas price denominated by the number of decimals of the native token. + */ + gasPrice: string; + /** + * The nonce used by the sender of the transaction. + */ + nonce: string; + from: RichAddress; + to: RichAddress; + method?: Method | undefined; + value: string; + /** + * The data sent for the transaction. + */ + input: string; + baseFeePerGas: string; + maxFeePerGas?: string | undefined; + maxPriorityFeePerGas?: string | undefined; }; /** @internal */ export const FullNativeTransactionDetails$inboundSchema: z.ZodType< - FullNativeTransactionDetails, - z.ZodTypeDef, - unknown + FullNativeTransactionDetails, + z.ZodTypeDef, + unknown > = z.object({ - blockNumber: z.string(), - blockTimestamp: z.number(), - blockHash: z.string(), - blockIndex: z.number(), - txHash: z.string(), - txStatus: z.string(), - txType: z.number(), - gasLimit: z.string(), - gasUsed: z.string(), - gasPrice: z.string(), - nonce: z.string(), - from: RichAddress$inboundSchema, - to: RichAddress$inboundSchema, - method: Method$inboundSchema.optional(), - value: z.string(), - input: z.string(), - baseFeePerGas: z.string(), - maxFeePerGas: z.string().optional(), - maxPriorityFeePerGas: z.string().optional(), + blockNumber: z.string(), + blockTimestamp: z.number(), + blockHash: z.string(), + blockIndex: z.number(), + txHash: z.string(), + txStatus: z.string(), + txType: z.number(), + gasLimit: z.string(), + gasUsed: z.string(), + gasPrice: z.string(), + nonce: z.string(), + from: RichAddress$inboundSchema, + to: RichAddress$inboundSchema, + method: Method$inboundSchema.optional(), + value: z.string(), + input: z.string(), + baseFeePerGas: z.string(), + maxFeePerGas: z.string().optional(), + maxPriorityFeePerGas: z.string().optional(), }); /** @internal */ export type FullNativeTransactionDetails$Outbound = { - blockNumber: string; - blockTimestamp: number; - blockHash: string; - blockIndex: number; - txHash: string; - txStatus: string; - txType: number; - gasLimit: string; - gasUsed: string; - gasPrice: string; - nonce: string; - from: RichAddress$Outbound; - to: RichAddress$Outbound; - method?: Method$Outbound | undefined; - value: string; - input: string; - baseFeePerGas: string; - maxFeePerGas?: string | undefined; - maxPriorityFeePerGas?: string | undefined; + blockNumber: string; + blockTimestamp: number; + blockHash: string; + blockIndex: number; + txHash: string; + txStatus: string; + txType: number; + gasLimit: string; + gasUsed: string; + gasPrice: string; + nonce: string; + from: RichAddress$Outbound; + to: RichAddress$Outbound; + method?: Method$Outbound | undefined; + value: string; + input: string; + baseFeePerGas: string; + maxFeePerGas?: string | undefined; + maxPriorityFeePerGas?: string | undefined; }; /** @internal */ export const FullNativeTransactionDetails$outboundSchema: z.ZodType< - FullNativeTransactionDetails$Outbound, - z.ZodTypeDef, - FullNativeTransactionDetails + FullNativeTransactionDetails$Outbound, + z.ZodTypeDef, + FullNativeTransactionDetails > = z.object({ - blockNumber: z.string(), - blockTimestamp: z.number(), - blockHash: z.string(), - blockIndex: z.number(), - txHash: z.string(), - txStatus: z.string(), - txType: z.number(), - gasLimit: z.string(), - gasUsed: z.string(), - gasPrice: z.string(), - nonce: z.string(), - from: RichAddress$outboundSchema, - to: RichAddress$outboundSchema, - method: Method$outboundSchema.optional(), - value: z.string(), - input: z.string(), - baseFeePerGas: z.string(), - maxFeePerGas: z.string().optional(), - maxPriorityFeePerGas: z.string().optional(), + blockNumber: z.string(), + blockTimestamp: z.number(), + blockHash: z.string(), + blockIndex: z.number(), + txHash: z.string(), + txStatus: z.string(), + txType: z.number(), + gasLimit: z.string(), + gasUsed: z.string(), + gasPrice: z.string(), + nonce: z.string(), + from: RichAddress$outboundSchema, + to: RichAddress$outboundSchema, + method: Method$outboundSchema.optional(), + value: z.string(), + input: z.string(), + baseFeePerGas: z.string(), + maxFeePerGas: z.string().optional(), + maxPriorityFeePerGas: z.string().optional(), }); /** @@ -151,10 +156,10 @@ export const FullNativeTransactionDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace FullNativeTransactionDetails$ { - /** @deprecated use `FullNativeTransactionDetails$inboundSchema` instead. */ - export const inboundSchema = FullNativeTransactionDetails$inboundSchema; - /** @deprecated use `FullNativeTransactionDetails$outboundSchema` instead. */ - export const outboundSchema = FullNativeTransactionDetails$outboundSchema; - /** @deprecated use `FullNativeTransactionDetails$Outbound` instead. */ - export type Outbound = FullNativeTransactionDetails$Outbound; + /** @deprecated use `FullNativeTransactionDetails$inboundSchema` instead. */ + export const inboundSchema = FullNativeTransactionDetails$inboundSchema; + /** @deprecated use `FullNativeTransactionDetails$outboundSchema` instead. */ + export const outboundSchema = FullNativeTransactionDetails$outboundSchema; + /** @deprecated use `FullNativeTransactionDetails$Outbound` instead. */ + export type Outbound = FullNativeTransactionDetails$Outbound; } diff --git a/src/models/components/getchainresponse.ts b/src/models/components/getchainresponse.ts index 030aff5..e1550af 100644 --- a/src/models/components/getchainresponse.ts +++ b/src/models/components/getchainresponse.ts @@ -2,64 +2,71 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - ChainStatus, - ChainStatus$inboundSchema, - ChainStatus$outboundSchema, + ChainStatus, + ChainStatus$inboundSchema, + ChainStatus$outboundSchema, } from "./chainstatus.js"; import { - NetworkToken, - NetworkToken$inboundSchema, - NetworkToken$Outbound, - NetworkToken$outboundSchema, + NetworkToken, + NetworkToken$inboundSchema, + NetworkToken$Outbound, + NetworkToken$outboundSchema, } from "./networktoken.js"; import { - UtilityAddresses, - UtilityAddresses$inboundSchema, - UtilityAddresses$Outbound, - UtilityAddresses$outboundSchema, + UtilityAddresses, + UtilityAddresses$inboundSchema, + UtilityAddresses$Outbound, + UtilityAddresses$outboundSchema, } from "./utilityaddresses.js"; -import { VmName, VmName$inboundSchema, VmName$outboundSchema } from "./vmname.js"; -import * as z from "zod"; +import { + VmName, + VmName$inboundSchema, + VmName$outboundSchema, +} from "./vmname.js"; export const GetChainResponseEnabledFeatures = { - NftIndexing: "nftIndexing", - Webhooks: "webhooks", + NftIndexing: "nftIndexing", + Webhooks: "webhooks", + Teleporter: "teleporter", } as const; -export type GetChainResponseEnabledFeatures = ClosedEnum; +export type GetChainResponseEnabledFeatures = ClosedEnum< + typeof GetChainResponseEnabledFeatures +>; export type GetChainResponse = { - chainId: string; - /** - * Status of chain nodes. Chain nodes can become temporarily `UNAVAILABLE` for several reasons, such as validator stake falling below threshold. If chain nodes are `UNAVAILABLE`, requests that rely on data from the chain nodes may return 503 errors. - */ - status: ChainStatus; - chainName: string; - description: string; - platformChainId?: string | undefined; - subnetId?: string | undefined; - vmId?: string | undefined; - vmName: VmName; - explorerUrl?: string | undefined; - rpcUrl: string; - wsUrl?: string | undefined; - isTestnet: boolean; - utilityAddresses?: UtilityAddresses | undefined; - networkToken: NetworkToken; - chainLogoUri?: string | undefined; - private?: boolean | undefined; - enabledFeatures?: Array | undefined; + chainId: string; + /** + * Status of chain nodes. Chain nodes can become temporarily `UNAVAILABLE` for several reasons, such as validator stake falling below threshold. If chain nodes are `UNAVAILABLE`, requests that rely on data from the chain nodes may return 503 errors. + */ + status: ChainStatus; + chainName: string; + description: string; + platformChainId?: string | undefined; + subnetId?: string | undefined; + vmId?: string | undefined; + vmName: VmName; + explorerUrl?: string | undefined; + rpcUrl: string; + wsUrl?: string | undefined; + isTestnet: boolean; + utilityAddresses?: UtilityAddresses | undefined; + networkToken: NetworkToken; + chainLogoUri?: string | undefined; + private?: boolean | undefined; + enabledFeatures?: Array | undefined; }; /** @internal */ export const GetChainResponseEnabledFeatures$inboundSchema: z.ZodNativeEnum< - typeof GetChainResponseEnabledFeatures + typeof GetChainResponseEnabledFeatures > = z.nativeEnum(GetChainResponseEnabledFeatures); /** @internal */ export const GetChainResponseEnabledFeatures$outboundSchema: z.ZodNativeEnum< - typeof GetChainResponseEnabledFeatures + typeof GetChainResponseEnabledFeatures > = GetChainResponseEnabledFeatures$inboundSchema; /** @@ -67,78 +74,83 @@ export const GetChainResponseEnabledFeatures$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetChainResponseEnabledFeatures$ { - /** @deprecated use `GetChainResponseEnabledFeatures$inboundSchema` instead. */ - export const inboundSchema = GetChainResponseEnabledFeatures$inboundSchema; - /** @deprecated use `GetChainResponseEnabledFeatures$outboundSchema` instead. */ - export const outboundSchema = GetChainResponseEnabledFeatures$outboundSchema; + /** @deprecated use `GetChainResponseEnabledFeatures$inboundSchema` instead. */ + export const inboundSchema = GetChainResponseEnabledFeatures$inboundSchema; + /** @deprecated use `GetChainResponseEnabledFeatures$outboundSchema` instead. */ + export const outboundSchema = GetChainResponseEnabledFeatures$outboundSchema; } /** @internal */ -export const GetChainResponse$inboundSchema: z.ZodType = - z.object({ - chainId: z.string(), - status: ChainStatus$inboundSchema, - chainName: z.string(), - description: z.string(), - platformChainId: z.string().optional(), - subnetId: z.string().optional(), - vmId: z.string().optional(), - vmName: VmName$inboundSchema, - explorerUrl: z.string().optional(), - rpcUrl: z.string(), - wsUrl: z.string().optional(), - isTestnet: z.boolean(), - utilityAddresses: UtilityAddresses$inboundSchema.optional(), - networkToken: NetworkToken$inboundSchema, - chainLogoUri: z.string().optional(), - private: z.boolean().optional(), - enabledFeatures: z.array(GetChainResponseEnabledFeatures$inboundSchema).optional(), - }); +export const GetChainResponse$inboundSchema: z.ZodType< + GetChainResponse, + z.ZodTypeDef, + unknown +> = z.object({ + chainId: z.string(), + status: ChainStatus$inboundSchema, + chainName: z.string(), + description: z.string(), + platformChainId: z.string().optional(), + subnetId: z.string().optional(), + vmId: z.string().optional(), + vmName: VmName$inboundSchema, + explorerUrl: z.string().optional(), + rpcUrl: z.string(), + wsUrl: z.string().optional(), + isTestnet: z.boolean(), + utilityAddresses: UtilityAddresses$inboundSchema.optional(), + networkToken: NetworkToken$inboundSchema, + chainLogoUri: z.string().optional(), + private: z.boolean().optional(), + enabledFeatures: z.array(GetChainResponseEnabledFeatures$inboundSchema) + .optional(), +}); /** @internal */ export type GetChainResponse$Outbound = { - chainId: string; - status: string; - chainName: string; - description: string; - platformChainId?: string | undefined; - subnetId?: string | undefined; - vmId?: string | undefined; - vmName: string; - explorerUrl?: string | undefined; - rpcUrl: string; - wsUrl?: string | undefined; - isTestnet: boolean; - utilityAddresses?: UtilityAddresses$Outbound | undefined; - networkToken: NetworkToken$Outbound; - chainLogoUri?: string | undefined; - private?: boolean | undefined; - enabledFeatures?: Array | undefined; + chainId: string; + status: string; + chainName: string; + description: string; + platformChainId?: string | undefined; + subnetId?: string | undefined; + vmId?: string | undefined; + vmName: string; + explorerUrl?: string | undefined; + rpcUrl: string; + wsUrl?: string | undefined; + isTestnet: boolean; + utilityAddresses?: UtilityAddresses$Outbound | undefined; + networkToken: NetworkToken$Outbound; + chainLogoUri?: string | undefined; + private?: boolean | undefined; + enabledFeatures?: Array | undefined; }; /** @internal */ export const GetChainResponse$outboundSchema: z.ZodType< - GetChainResponse$Outbound, - z.ZodTypeDef, - GetChainResponse + GetChainResponse$Outbound, + z.ZodTypeDef, + GetChainResponse > = z.object({ - chainId: z.string(), - status: ChainStatus$outboundSchema, - chainName: z.string(), - description: z.string(), - platformChainId: z.string().optional(), - subnetId: z.string().optional(), - vmId: z.string().optional(), - vmName: VmName$outboundSchema, - explorerUrl: z.string().optional(), - rpcUrl: z.string(), - wsUrl: z.string().optional(), - isTestnet: z.boolean(), - utilityAddresses: UtilityAddresses$outboundSchema.optional(), - networkToken: NetworkToken$outboundSchema, - chainLogoUri: z.string().optional(), - private: z.boolean().optional(), - enabledFeatures: z.array(GetChainResponseEnabledFeatures$outboundSchema).optional(), + chainId: z.string(), + status: ChainStatus$outboundSchema, + chainName: z.string(), + description: z.string(), + platformChainId: z.string().optional(), + subnetId: z.string().optional(), + vmId: z.string().optional(), + vmName: VmName$outboundSchema, + explorerUrl: z.string().optional(), + rpcUrl: z.string(), + wsUrl: z.string().optional(), + isTestnet: z.boolean(), + utilityAddresses: UtilityAddresses$outboundSchema.optional(), + networkToken: NetworkToken$outboundSchema, + chainLogoUri: z.string().optional(), + private: z.boolean().optional(), + enabledFeatures: z.array(GetChainResponseEnabledFeatures$outboundSchema) + .optional(), }); /** @@ -146,10 +158,10 @@ export const GetChainResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetChainResponse$ { - /** @deprecated use `GetChainResponse$inboundSchema` instead. */ - export const inboundSchema = GetChainResponse$inboundSchema; - /** @deprecated use `GetChainResponse$outboundSchema` instead. */ - export const outboundSchema = GetChainResponse$outboundSchema; - /** @deprecated use `GetChainResponse$Outbound` instead. */ - export type Outbound = GetChainResponse$Outbound; + /** @deprecated use `GetChainResponse$inboundSchema` instead. */ + export const inboundSchema = GetChainResponse$inboundSchema; + /** @deprecated use `GetChainResponse$outboundSchema` instead. */ + export const outboundSchema = GetChainResponse$outboundSchema; + /** @deprecated use `GetChainResponse$Outbound` instead. */ + export type Outbound = GetChainResponse$Outbound; } diff --git a/src/models/components/getevmblockresponse.ts b/src/models/components/getevmblockresponse.ts index e0dd56a..4613595 100644 --- a/src/models/components/getevmblockresponse.ts +++ b/src/models/components/getevmblockresponse.ts @@ -5,100 +5,100 @@ import * as z from "zod"; export type GetEvmBlockResponse = { - /** - * The block number on the chain. - */ - blockNumber: string; - /** - * The block finality timestamp. - */ - blockTimestamp: number; - /** - * The block hash identifier. - */ - blockHash: string; - /** - * The number of evm transactions in the block. - */ - txCount: number; - /** - * The base gas fee for a transaction to be included in the block. - */ - baseFee: string; - /** - * The gas used for transactions in the block. - */ - gasUsed: string; - /** - * The total gas limit set for transactions in the block. - */ - gasLimit: string; - gasCost: string; - /** - * The hash of the parent block. - */ - parentHash: string; - /** - * The amount of fees spent/burned for transactions in the block. - */ - feesSpent: string; - /** - * The cumulative number of transactions for the chain including this block. - */ - cumulativeTransactions: string; + /** + * The block number on the chain. + */ + blockNumber: string; + /** + * The block finality timestamp. + */ + blockTimestamp: number; + /** + * The block hash identifier. + */ + blockHash: string; + /** + * The number of evm transactions in the block. + */ + txCount: number; + /** + * The base gas fee for a transaction to be included in the block. + */ + baseFee: string; + /** + * The gas used for transactions in the block. + */ + gasUsed: string; + /** + * The total gas limit set for transactions in the block. + */ + gasLimit: string; + gasCost: string; + /** + * The hash of the parent block. + */ + parentHash: string; + /** + * The amount of fees spent/burned for transactions in the block. + */ + feesSpent: string; + /** + * The cumulative number of transactions for the chain including this block. + */ + cumulativeTransactions: string; }; /** @internal */ export const GetEvmBlockResponse$inboundSchema: z.ZodType< - GetEvmBlockResponse, - z.ZodTypeDef, - unknown + GetEvmBlockResponse, + z.ZodTypeDef, + unknown > = z.object({ - blockNumber: z.string(), - blockTimestamp: z.number(), - blockHash: z.string(), - txCount: z.number(), - baseFee: z.string(), - gasUsed: z.string(), - gasLimit: z.string(), - gasCost: z.string(), - parentHash: z.string(), - feesSpent: z.string(), - cumulativeTransactions: z.string(), + blockNumber: z.string(), + blockTimestamp: z.number(), + blockHash: z.string(), + txCount: z.number(), + baseFee: z.string(), + gasUsed: z.string(), + gasLimit: z.string(), + gasCost: z.string(), + parentHash: z.string(), + feesSpent: z.string(), + cumulativeTransactions: z.string(), }); /** @internal */ export type GetEvmBlockResponse$Outbound = { - blockNumber: string; - blockTimestamp: number; - blockHash: string; - txCount: number; - baseFee: string; - gasUsed: string; - gasLimit: string; - gasCost: string; - parentHash: string; - feesSpent: string; - cumulativeTransactions: string; + blockNumber: string; + blockTimestamp: number; + blockHash: string; + txCount: number; + baseFee: string; + gasUsed: string; + gasLimit: string; + gasCost: string; + parentHash: string; + feesSpent: string; + cumulativeTransactions: string; }; /** @internal */ export const GetEvmBlockResponse$outboundSchema: z.ZodType< - GetEvmBlockResponse$Outbound, - z.ZodTypeDef, - GetEvmBlockResponse + GetEvmBlockResponse$Outbound, + z.ZodTypeDef, + GetEvmBlockResponse > = z.object({ - blockNumber: z.string(), - blockTimestamp: z.number(), - blockHash: z.string(), - txCount: z.number(), - baseFee: z.string(), - gasUsed: z.string(), - gasLimit: z.string(), - gasCost: z.string(), - parentHash: z.string(), - feesSpent: z.string(), - cumulativeTransactions: z.string(), + blockNumber: z.string(), + blockTimestamp: z.number(), + blockHash: z.string(), + txCount: z.number(), + baseFee: z.string(), + gasUsed: z.string(), + gasLimit: z.string(), + gasCost: z.string(), + parentHash: z.string(), + feesSpent: z.string(), + cumulativeTransactions: z.string(), }); /** @@ -106,10 +106,10 @@ export const GetEvmBlockResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetEvmBlockResponse$ { - /** @deprecated use `GetEvmBlockResponse$inboundSchema` instead. */ - export const inboundSchema = GetEvmBlockResponse$inboundSchema; - /** @deprecated use `GetEvmBlockResponse$outboundSchema` instead. */ - export const outboundSchema = GetEvmBlockResponse$outboundSchema; - /** @deprecated use `GetEvmBlockResponse$Outbound` instead. */ - export type Outbound = GetEvmBlockResponse$Outbound; + /** @deprecated use `GetEvmBlockResponse$inboundSchema` instead. */ + export const inboundSchema = GetEvmBlockResponse$inboundSchema; + /** @deprecated use `GetEvmBlockResponse$outboundSchema` instead. */ + export const outboundSchema = GetEvmBlockResponse$outboundSchema; + /** @deprecated use `GetEvmBlockResponse$Outbound` instead. */ + export type Outbound = GetEvmBlockResponse$Outbound; } diff --git a/src/models/components/getnativebalanceresponse.ts b/src/models/components/getnativebalanceresponse.ts index f9e113a..18a1983 100644 --- a/src/models/components/getnativebalanceresponse.ts +++ b/src/models/components/getnativebalanceresponse.ts @@ -2,42 +2,42 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - NativeTokenBalance, - NativeTokenBalance$inboundSchema, - NativeTokenBalance$Outbound, - NativeTokenBalance$outboundSchema, + NativeTokenBalance, + NativeTokenBalance$inboundSchema, + NativeTokenBalance$Outbound, + NativeTokenBalance$outboundSchema, } from "./nativetokenbalance.js"; -import * as z from "zod"; export type GetNativeBalanceResponse = { - /** - * The native token balance for the address. - */ - nativeTokenBalance: NativeTokenBalance; + /** + * The native token balance for the address. + */ + nativeTokenBalance: NativeTokenBalance; }; /** @internal */ export const GetNativeBalanceResponse$inboundSchema: z.ZodType< - GetNativeBalanceResponse, - z.ZodTypeDef, - unknown + GetNativeBalanceResponse, + z.ZodTypeDef, + unknown > = z.object({ - nativeTokenBalance: NativeTokenBalance$inboundSchema, + nativeTokenBalance: NativeTokenBalance$inboundSchema, }); /** @internal */ export type GetNativeBalanceResponse$Outbound = { - nativeTokenBalance: NativeTokenBalance$Outbound; + nativeTokenBalance: NativeTokenBalance$Outbound; }; /** @internal */ export const GetNativeBalanceResponse$outboundSchema: z.ZodType< - GetNativeBalanceResponse$Outbound, - z.ZodTypeDef, - GetNativeBalanceResponse + GetNativeBalanceResponse$Outbound, + z.ZodTypeDef, + GetNativeBalanceResponse > = z.object({ - nativeTokenBalance: NativeTokenBalance$outboundSchema, + nativeTokenBalance: NativeTokenBalance$outboundSchema, }); /** @@ -45,10 +45,10 @@ export const GetNativeBalanceResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetNativeBalanceResponse$ { - /** @deprecated use `GetNativeBalanceResponse$inboundSchema` instead. */ - export const inboundSchema = GetNativeBalanceResponse$inboundSchema; - /** @deprecated use `GetNativeBalanceResponse$outboundSchema` instead. */ - export const outboundSchema = GetNativeBalanceResponse$outboundSchema; - /** @deprecated use `GetNativeBalanceResponse$Outbound` instead. */ - export type Outbound = GetNativeBalanceResponse$Outbound; + /** @deprecated use `GetNativeBalanceResponse$inboundSchema` instead. */ + export const inboundSchema = GetNativeBalanceResponse$inboundSchema; + /** @deprecated use `GetNativeBalanceResponse$outboundSchema` instead. */ + export const outboundSchema = GetNativeBalanceResponse$outboundSchema; + /** @deprecated use `GetNativeBalanceResponse$Outbound` instead. */ + export type Outbound = GetNativeBalanceResponse$Outbound; } diff --git a/src/models/components/getnetworkdetailsresponse.ts b/src/models/components/getnetworkdetailsresponse.ts index 02c6ad7..c2c52b7 100644 --- a/src/models/components/getnetworkdetailsresponse.ts +++ b/src/models/components/getnetworkdetailsresponse.ts @@ -2,49 +2,49 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - DelegatorsDetails, - DelegatorsDetails$inboundSchema, - DelegatorsDetails$Outbound, - DelegatorsDetails$outboundSchema, + DelegatorsDetails, + DelegatorsDetails$inboundSchema, + DelegatorsDetails$Outbound, + DelegatorsDetails$outboundSchema, } from "./delegatorsdetails.js"; import { - ValidatorsDetails, - ValidatorsDetails$inboundSchema, - ValidatorsDetails$Outbound, - ValidatorsDetails$outboundSchema, + ValidatorsDetails, + ValidatorsDetails$inboundSchema, + ValidatorsDetails$Outbound, + ValidatorsDetails$outboundSchema, } from "./validatorsdetails.js"; -import * as z from "zod"; export type GetNetworkDetailsResponse = { - validatorDetails: ValidatorsDetails; - delegatorDetails: DelegatorsDetails; + validatorDetails: ValidatorsDetails; + delegatorDetails: DelegatorsDetails; }; /** @internal */ export const GetNetworkDetailsResponse$inboundSchema: z.ZodType< - GetNetworkDetailsResponse, - z.ZodTypeDef, - unknown + GetNetworkDetailsResponse, + z.ZodTypeDef, + unknown > = z.object({ - validatorDetails: ValidatorsDetails$inboundSchema, - delegatorDetails: DelegatorsDetails$inboundSchema, + validatorDetails: ValidatorsDetails$inboundSchema, + delegatorDetails: DelegatorsDetails$inboundSchema, }); /** @internal */ export type GetNetworkDetailsResponse$Outbound = { - validatorDetails: ValidatorsDetails$Outbound; - delegatorDetails: DelegatorsDetails$Outbound; + validatorDetails: ValidatorsDetails$Outbound; + delegatorDetails: DelegatorsDetails$Outbound; }; /** @internal */ export const GetNetworkDetailsResponse$outboundSchema: z.ZodType< - GetNetworkDetailsResponse$Outbound, - z.ZodTypeDef, - GetNetworkDetailsResponse + GetNetworkDetailsResponse$Outbound, + z.ZodTypeDef, + GetNetworkDetailsResponse > = z.object({ - validatorDetails: ValidatorsDetails$outboundSchema, - delegatorDetails: DelegatorsDetails$outboundSchema, + validatorDetails: ValidatorsDetails$outboundSchema, + delegatorDetails: DelegatorsDetails$outboundSchema, }); /** @@ -52,10 +52,10 @@ export const GetNetworkDetailsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetNetworkDetailsResponse$ { - /** @deprecated use `GetNetworkDetailsResponse$inboundSchema` instead. */ - export const inboundSchema = GetNetworkDetailsResponse$inboundSchema; - /** @deprecated use `GetNetworkDetailsResponse$outboundSchema` instead. */ - export const outboundSchema = GetNetworkDetailsResponse$outboundSchema; - /** @deprecated use `GetNetworkDetailsResponse$Outbound` instead. */ - export type Outbound = GetNetworkDetailsResponse$Outbound; + /** @deprecated use `GetNetworkDetailsResponse$inboundSchema` instead. */ + export const inboundSchema = GetNetworkDetailsResponse$inboundSchema; + /** @deprecated use `GetNetworkDetailsResponse$outboundSchema` instead. */ + export const outboundSchema = GetNetworkDetailsResponse$outboundSchema; + /** @deprecated use `GetNetworkDetailsResponse$Outbound` instead. */ + export type Outbound = GetNetworkDetailsResponse$Outbound; } diff --git a/src/models/components/getprimarynetworkblockresponse.ts b/src/models/components/getprimarynetworkblockresponse.ts index 8936a3c..5ab99cb 100644 --- a/src/models/components/getprimarynetworkblockresponse.ts +++ b/src/models/components/getprimarynetworkblockresponse.ts @@ -2,75 +2,75 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - ProposerDetails, - ProposerDetails$inboundSchema, - ProposerDetails$Outbound, - ProposerDetails$outboundSchema, + ProposerDetails, + ProposerDetails$inboundSchema, + ProposerDetails$Outbound, + ProposerDetails$outboundSchema, } from "./proposerdetails.js"; -import * as z from "zod"; export type GetPrimaryNetworkBlockResponse = { - blockNumber: string; - blockHash: string; - parentHash: string; - blockTimestamp: number; - blockType: string; - txCount: number; - transactions: Array; - blockSizeBytes: number; - currentSupply?: string | undefined; - proposerDetails?: ProposerDetails | undefined; + blockNumber: string; + blockHash: string; + parentHash: string; + blockTimestamp: number; + blockType: string; + txCount: number; + transactions: Array; + blockSizeBytes: number; + currentSupply?: string | undefined; + proposerDetails?: ProposerDetails | undefined; }; /** @internal */ export const GetPrimaryNetworkBlockResponse$inboundSchema: z.ZodType< - GetPrimaryNetworkBlockResponse, - z.ZodTypeDef, - unknown + GetPrimaryNetworkBlockResponse, + z.ZodTypeDef, + unknown > = z.object({ - blockNumber: z.string(), - blockHash: z.string(), - parentHash: z.string(), - blockTimestamp: z.number(), - blockType: z.string(), - txCount: z.number(), - transactions: z.array(z.string()), - blockSizeBytes: z.number(), - currentSupply: z.string().optional(), - proposerDetails: ProposerDetails$inboundSchema.optional(), + blockNumber: z.string(), + blockHash: z.string(), + parentHash: z.string(), + blockTimestamp: z.number(), + blockType: z.string(), + txCount: z.number(), + transactions: z.array(z.string()), + blockSizeBytes: z.number(), + currentSupply: z.string().optional(), + proposerDetails: ProposerDetails$inboundSchema.optional(), }); /** @internal */ export type GetPrimaryNetworkBlockResponse$Outbound = { - blockNumber: string; - blockHash: string; - parentHash: string; - blockTimestamp: number; - blockType: string; - txCount: number; - transactions: Array; - blockSizeBytes: number; - currentSupply?: string | undefined; - proposerDetails?: ProposerDetails$Outbound | undefined; + blockNumber: string; + blockHash: string; + parentHash: string; + blockTimestamp: number; + blockType: string; + txCount: number; + transactions: Array; + blockSizeBytes: number; + currentSupply?: string | undefined; + proposerDetails?: ProposerDetails$Outbound | undefined; }; /** @internal */ export const GetPrimaryNetworkBlockResponse$outboundSchema: z.ZodType< - GetPrimaryNetworkBlockResponse$Outbound, - z.ZodTypeDef, - GetPrimaryNetworkBlockResponse + GetPrimaryNetworkBlockResponse$Outbound, + z.ZodTypeDef, + GetPrimaryNetworkBlockResponse > = z.object({ - blockNumber: z.string(), - blockHash: z.string(), - parentHash: z.string(), - blockTimestamp: z.number(), - blockType: z.string(), - txCount: z.number(), - transactions: z.array(z.string()), - blockSizeBytes: z.number(), - currentSupply: z.string().optional(), - proposerDetails: ProposerDetails$outboundSchema.optional(), + blockNumber: z.string(), + blockHash: z.string(), + parentHash: z.string(), + blockTimestamp: z.number(), + blockType: z.string(), + txCount: z.number(), + transactions: z.array(z.string()), + blockSizeBytes: z.number(), + currentSupply: z.string().optional(), + proposerDetails: ProposerDetails$outboundSchema.optional(), }); /** @@ -78,10 +78,10 @@ export const GetPrimaryNetworkBlockResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPrimaryNetworkBlockResponse$ { - /** @deprecated use `GetPrimaryNetworkBlockResponse$inboundSchema` instead. */ - export const inboundSchema = GetPrimaryNetworkBlockResponse$inboundSchema; - /** @deprecated use `GetPrimaryNetworkBlockResponse$outboundSchema` instead. */ - export const outboundSchema = GetPrimaryNetworkBlockResponse$outboundSchema; - /** @deprecated use `GetPrimaryNetworkBlockResponse$Outbound` instead. */ - export type Outbound = GetPrimaryNetworkBlockResponse$Outbound; + /** @deprecated use `GetPrimaryNetworkBlockResponse$inboundSchema` instead. */ + export const inboundSchema = GetPrimaryNetworkBlockResponse$inboundSchema; + /** @deprecated use `GetPrimaryNetworkBlockResponse$outboundSchema` instead. */ + export const outboundSchema = GetPrimaryNetworkBlockResponse$outboundSchema; + /** @deprecated use `GetPrimaryNetworkBlockResponse$Outbound` instead. */ + export type Outbound = GetPrimaryNetworkBlockResponse$Outbound; } diff --git a/src/models/components/gettransactionresponse.ts b/src/models/components/gettransactionresponse.ts index bbf1add..bfb1baa 100644 --- a/src/models/components/gettransactionresponse.ts +++ b/src/models/components/gettransactionresponse.ts @@ -2,101 +2,116 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Erc1155TransferDetails, - Erc1155TransferDetails$inboundSchema, - Erc1155TransferDetails$Outbound, - Erc1155TransferDetails$outboundSchema, + Erc1155TransferDetails, + Erc1155TransferDetails$inboundSchema, + Erc1155TransferDetails$Outbound, + Erc1155TransferDetails$outboundSchema, } from "./erc1155transferdetails.js"; import { - Erc20TransferDetails, - Erc20TransferDetails$inboundSchema, - Erc20TransferDetails$Outbound, - Erc20TransferDetails$outboundSchema, + Erc20TransferDetails, + Erc20TransferDetails$inboundSchema, + Erc20TransferDetails$Outbound, + Erc20TransferDetails$outboundSchema, } from "./erc20transferdetails.js"; import { - Erc721TransferDetails, - Erc721TransferDetails$inboundSchema, - Erc721TransferDetails$Outbound, - Erc721TransferDetails$outboundSchema, + Erc721TransferDetails, + Erc721TransferDetails$inboundSchema, + Erc721TransferDetails$Outbound, + Erc721TransferDetails$outboundSchema, } from "./erc721transferdetails.js"; import { - FullNativeTransactionDetails, - FullNativeTransactionDetails$inboundSchema, - FullNativeTransactionDetails$Outbound, - FullNativeTransactionDetails$outboundSchema, + FullNativeTransactionDetails, + FullNativeTransactionDetails$inboundSchema, + FullNativeTransactionDetails$Outbound, + FullNativeTransactionDetails$outboundSchema, } from "./fullnativetransactiondetails.js"; import { - InternalTransactionDetails, - InternalTransactionDetails$inboundSchema, - InternalTransactionDetails$Outbound, - InternalTransactionDetails$outboundSchema, + InternalTransactionDetails, + InternalTransactionDetails$inboundSchema, + InternalTransactionDetails$Outbound, + InternalTransactionDetails$outboundSchema, } from "./internaltransactiondetails.js"; import { - NetworkTokenDetails, - NetworkTokenDetails$inboundSchema, - NetworkTokenDetails$Outbound, - NetworkTokenDetails$outboundSchema, + NetworkTokenDetails, + NetworkTokenDetails$inboundSchema, + NetworkTokenDetails$Outbound, + NetworkTokenDetails$outboundSchema, } from "./networktokendetails.js"; -import * as z from "zod"; +import { + TeleporterMessageInfo, + TeleporterMessageInfo$inboundSchema, + TeleporterMessageInfo$Outbound, + TeleporterMessageInfo$outboundSchema, +} from "./teleportermessageinfo.js"; export type GetTransactionResponse = { - /** - * The list of ERC-20 transfers. - */ - erc20Transfers?: Array | undefined; - /** - * The list of ERC-721 transfers. - */ - erc721Transfers?: Array | undefined; - /** - * The list of ERC-1155 transfers. - */ - erc1155Transfers?: Array | undefined; - /** - * The list of internal transactions. Note that this list only includes CALL and CALLCODE internal transactions that had a non-zero value and CREATE/CREATE2 calls. Use a client provider to recieve a full debug trace of the transaction. - */ - internalTransactions?: Array | undefined; - networkTokenDetails: NetworkTokenDetails; - nativeTransaction: FullNativeTransactionDetails; + /** + * The list of ERC-20 transfers. + */ + erc20Transfers?: Array | undefined; + /** + * The list of ERC-721 transfers. + */ + erc721Transfers?: Array | undefined; + /** + * The list of ERC-1155 transfers. + */ + erc1155Transfers?: Array | undefined; + /** + * The list of internal transactions. Note that this list only includes CALL and CALLCODE internal transactions that had a non-zero value and CREATE/CREATE2 calls. Use a client provider to recieve a full debug trace of the transaction. + */ + internalTransactions?: Array | undefined; + networkTokenDetails: NetworkTokenDetails; + nativeTransaction: FullNativeTransactionDetails; + /** + * Corresponding teleporter message info if available. + */ + teleporterMessageInfo?: TeleporterMessageInfo | undefined; }; /** @internal */ export const GetTransactionResponse$inboundSchema: z.ZodType< - GetTransactionResponse, - z.ZodTypeDef, - unknown + GetTransactionResponse, + z.ZodTypeDef, + unknown > = z.object({ - erc20Transfers: z.array(Erc20TransferDetails$inboundSchema).optional(), - erc721Transfers: z.array(Erc721TransferDetails$inboundSchema).optional(), - erc1155Transfers: z.array(Erc1155TransferDetails$inboundSchema).optional(), - internalTransactions: z.array(InternalTransactionDetails$inboundSchema).optional(), - networkTokenDetails: NetworkTokenDetails$inboundSchema, - nativeTransaction: FullNativeTransactionDetails$inboundSchema, + erc20Transfers: z.array(Erc20TransferDetails$inboundSchema).optional(), + erc721Transfers: z.array(Erc721TransferDetails$inboundSchema).optional(), + erc1155Transfers: z.array(Erc1155TransferDetails$inboundSchema).optional(), + internalTransactions: z.array(InternalTransactionDetails$inboundSchema) + .optional(), + networkTokenDetails: NetworkTokenDetails$inboundSchema, + nativeTransaction: FullNativeTransactionDetails$inboundSchema, + teleporterMessageInfo: TeleporterMessageInfo$inboundSchema.optional(), }); /** @internal */ export type GetTransactionResponse$Outbound = { - erc20Transfers?: Array | undefined; - erc721Transfers?: Array | undefined; - erc1155Transfers?: Array | undefined; - internalTransactions?: Array | undefined; - networkTokenDetails: NetworkTokenDetails$Outbound; - nativeTransaction: FullNativeTransactionDetails$Outbound; + erc20Transfers?: Array | undefined; + erc721Transfers?: Array | undefined; + erc1155Transfers?: Array | undefined; + internalTransactions?: Array | undefined; + networkTokenDetails: NetworkTokenDetails$Outbound; + nativeTransaction: FullNativeTransactionDetails$Outbound; + teleporterMessageInfo?: TeleporterMessageInfo$Outbound | undefined; }; /** @internal */ export const GetTransactionResponse$outboundSchema: z.ZodType< - GetTransactionResponse$Outbound, - z.ZodTypeDef, - GetTransactionResponse + GetTransactionResponse$Outbound, + z.ZodTypeDef, + GetTransactionResponse > = z.object({ - erc20Transfers: z.array(Erc20TransferDetails$outboundSchema).optional(), - erc721Transfers: z.array(Erc721TransferDetails$outboundSchema).optional(), - erc1155Transfers: z.array(Erc1155TransferDetails$outboundSchema).optional(), - internalTransactions: z.array(InternalTransactionDetails$outboundSchema).optional(), - networkTokenDetails: NetworkTokenDetails$outboundSchema, - nativeTransaction: FullNativeTransactionDetails$outboundSchema, + erc20Transfers: z.array(Erc20TransferDetails$outboundSchema).optional(), + erc721Transfers: z.array(Erc721TransferDetails$outboundSchema).optional(), + erc1155Transfers: z.array(Erc1155TransferDetails$outboundSchema).optional(), + internalTransactions: z.array(InternalTransactionDetails$outboundSchema) + .optional(), + networkTokenDetails: NetworkTokenDetails$outboundSchema, + nativeTransaction: FullNativeTransactionDetails$outboundSchema, + teleporterMessageInfo: TeleporterMessageInfo$outboundSchema.optional(), }); /** @@ -104,10 +119,10 @@ export const GetTransactionResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTransactionResponse$ { - /** @deprecated use `GetTransactionResponse$inboundSchema` instead. */ - export const inboundSchema = GetTransactionResponse$inboundSchema; - /** @deprecated use `GetTransactionResponse$outboundSchema` instead. */ - export const outboundSchema = GetTransactionResponse$outboundSchema; - /** @deprecated use `GetTransactionResponse$Outbound` instead. */ - export type Outbound = GetTransactionResponse$Outbound; + /** @deprecated use `GetTransactionResponse$inboundSchema` instead. */ + export const inboundSchema = GetTransactionResponse$inboundSchema; + /** @deprecated use `GetTransactionResponse$outboundSchema` instead. */ + export const outboundSchema = GetTransactionResponse$outboundSchema; + /** @deprecated use `GetTransactionResponse$Outbound` instead. */ + export type Outbound = GetTransactionResponse$Outbound; } diff --git a/src/models/components/glacierapifeature.ts b/src/models/components/glacierapifeature.ts index fe9a516..174f2b5 100644 --- a/src/models/components/glacierapifeature.ts +++ b/src/models/components/glacierapifeature.ts @@ -2,30 +2,33 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const GlacierApiFeature = { - NftIndexing: "nftIndexing", - Webhooks: "webhooks", + NftIndexing: "nftIndexing", + Webhooks: "webhooks", + Teleporter: "teleporter", } as const; export type GlacierApiFeature = ClosedEnum; /** @internal */ -export const GlacierApiFeature$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(GlacierApiFeature); +export const GlacierApiFeature$inboundSchema: z.ZodNativeEnum< + typeof GlacierApiFeature +> = z.nativeEnum(GlacierApiFeature); /** @internal */ -export const GlacierApiFeature$outboundSchema: z.ZodNativeEnum = - GlacierApiFeature$inboundSchema; +export const GlacierApiFeature$outboundSchema: z.ZodNativeEnum< + typeof GlacierApiFeature +> = GlacierApiFeature$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GlacierApiFeature$ { - /** @deprecated use `GlacierApiFeature$inboundSchema` instead. */ - export const inboundSchema = GlacierApiFeature$inboundSchema; - /** @deprecated use `GlacierApiFeature$outboundSchema` instead. */ - export const outboundSchema = GlacierApiFeature$outboundSchema; + /** @deprecated use `GlacierApiFeature$inboundSchema` instead. */ + export const inboundSchema = GlacierApiFeature$inboundSchema; + /** @deprecated use `GlacierApiFeature$outboundSchema` instead. */ + export const outboundSchema = GlacierApiFeature$outboundSchema; } diff --git a/src/models/components/globalparamnetwork.ts b/src/models/components/globalparamnetwork.ts index 65a6b70..6e47ddf 100644 --- a/src/models/components/globalparamnetwork.ts +++ b/src/models/components/globalparamnetwork.ts @@ -2,30 +2,32 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const GlobalParamNetwork = { - Mainnet: "mainnet", - Fuji: "fuji", + Mainnet: "mainnet", + Fuji: "fuji", } as const; export type GlobalParamNetwork = ClosedEnum; /** @internal */ -export const GlobalParamNetwork$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(GlobalParamNetwork); +export const GlobalParamNetwork$inboundSchema: z.ZodNativeEnum< + typeof GlobalParamNetwork +> = z.nativeEnum(GlobalParamNetwork); /** @internal */ -export const GlobalParamNetwork$outboundSchema: z.ZodNativeEnum = - GlobalParamNetwork$inboundSchema; +export const GlobalParamNetwork$outboundSchema: z.ZodNativeEnum< + typeof GlobalParamNetwork +> = GlobalParamNetwork$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GlobalParamNetwork$ { - /** @deprecated use `GlobalParamNetwork$inboundSchema` instead. */ - export const inboundSchema = GlobalParamNetwork$inboundSchema; - /** @deprecated use `GlobalParamNetwork$outboundSchema` instead. */ - export const outboundSchema = GlobalParamNetwork$outboundSchema; + /** @deprecated use `GlobalParamNetwork$inboundSchema` instead. */ + export const inboundSchema = GlobalParamNetwork$inboundSchema; + /** @deprecated use `GlobalParamNetwork$outboundSchema` instead. */ + export const outboundSchema = GlobalParamNetwork$outboundSchema; } diff --git a/src/models/components/historicalreward.ts b/src/models/components/historicalreward.ts index 94cabbe..a935c88 100644 --- a/src/models/components/historicalreward.ts +++ b/src/models/components/historicalreward.ts @@ -2,80 +2,87 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - AssetWithPriceInfo, - AssetWithPriceInfo$inboundSchema, - AssetWithPriceInfo$Outbound, - AssetWithPriceInfo$outboundSchema, + AssetWithPriceInfo, + AssetWithPriceInfo$inboundSchema, + AssetWithPriceInfo$Outbound, + AssetWithPriceInfo$outboundSchema, } from "./assetwithpriceinfo.js"; -import { RewardType, RewardType$inboundSchema, RewardType$outboundSchema } from "./rewardtype.js"; -import * as z from "zod"; +import { + RewardType, + RewardType$inboundSchema, + RewardType$outboundSchema, +} from "./rewardtype.js"; export type HistoricalReward = { - /** - * An array of P-Chain wallet addresses. - */ - addresses: Array; - txHash: string; - amountStaked: string; - nodeId: string; - startTimestamp: number; - endTimestamp: number; - rewardType: RewardType; - utxoId: string; - outputIndex: number; - reward: AssetWithPriceInfo; - rewardTxHash: string; + /** + * An array of P-Chain wallet addresses. + */ + addresses: Array; + txHash: string; + amountStaked: string; + nodeId: string; + startTimestamp: number; + endTimestamp: number; + rewardType: RewardType; + utxoId: string; + outputIndex: number; + reward: AssetWithPriceInfo; + rewardTxHash: string; }; /** @internal */ -export const HistoricalReward$inboundSchema: z.ZodType = - z.object({ - addresses: z.array(z.string()), - txHash: z.string(), - amountStaked: z.string(), - nodeId: z.string(), - startTimestamp: z.number(), - endTimestamp: z.number(), - rewardType: RewardType$inboundSchema, - utxoId: z.string(), - outputIndex: z.number(), - reward: AssetWithPriceInfo$inboundSchema, - rewardTxHash: z.string(), - }); +export const HistoricalReward$inboundSchema: z.ZodType< + HistoricalReward, + z.ZodTypeDef, + unknown +> = z.object({ + addresses: z.array(z.string()), + txHash: z.string(), + amountStaked: z.string(), + nodeId: z.string(), + startTimestamp: z.number(), + endTimestamp: z.number(), + rewardType: RewardType$inboundSchema, + utxoId: z.string(), + outputIndex: z.number(), + reward: AssetWithPriceInfo$inboundSchema, + rewardTxHash: z.string(), +}); /** @internal */ export type HistoricalReward$Outbound = { - addresses: Array; - txHash: string; - amountStaked: string; - nodeId: string; - startTimestamp: number; - endTimestamp: number; - rewardType: string; - utxoId: string; - outputIndex: number; - reward: AssetWithPriceInfo$Outbound; - rewardTxHash: string; + addresses: Array; + txHash: string; + amountStaked: string; + nodeId: string; + startTimestamp: number; + endTimestamp: number; + rewardType: string; + utxoId: string; + outputIndex: number; + reward: AssetWithPriceInfo$Outbound; + rewardTxHash: string; }; /** @internal */ export const HistoricalReward$outboundSchema: z.ZodType< - HistoricalReward$Outbound, - z.ZodTypeDef, - HistoricalReward + HistoricalReward$Outbound, + z.ZodTypeDef, + HistoricalReward > = z.object({ - addresses: z.array(z.string()), - txHash: z.string(), - amountStaked: z.string(), - nodeId: z.string(), - startTimestamp: z.number(), - endTimestamp: z.number(), - rewardType: RewardType$outboundSchema, - utxoId: z.string(), - outputIndex: z.number(), - reward: AssetWithPriceInfo$outboundSchema, - rewardTxHash: z.string(), + addresses: z.array(z.string()), + txHash: z.string(), + amountStaked: z.string(), + nodeId: z.string(), + startTimestamp: z.number(), + endTimestamp: z.number(), + rewardType: RewardType$outboundSchema, + utxoId: z.string(), + outputIndex: z.number(), + reward: AssetWithPriceInfo$outboundSchema, + rewardTxHash: z.string(), }); /** @@ -83,10 +90,10 @@ export const HistoricalReward$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace HistoricalReward$ { - /** @deprecated use `HistoricalReward$inboundSchema` instead. */ - export const inboundSchema = HistoricalReward$inboundSchema; - /** @deprecated use `HistoricalReward$outboundSchema` instead. */ - export const outboundSchema = HistoricalReward$outboundSchema; - /** @deprecated use `HistoricalReward$Outbound` instead. */ - export type Outbound = HistoricalReward$Outbound; + /** @deprecated use `HistoricalReward$inboundSchema` instead. */ + export const inboundSchema = HistoricalReward$inboundSchema; + /** @deprecated use `HistoricalReward$outboundSchema` instead. */ + export const outboundSchema = HistoricalReward$outboundSchema; + /** @deprecated use `HistoricalReward$Outbound` instead. */ + export type Outbound = HistoricalReward$Outbound; } diff --git a/src/models/components/imageasset.ts b/src/models/components/imageasset.ts index 5bbcdb7..2c3077d 100644 --- a/src/models/components/imageasset.ts +++ b/src/models/components/imageasset.ts @@ -5,41 +5,48 @@ import * as z from "zod"; export type ImageAsset = { - assetId?: string | undefined; - /** - * OUTPUT ONLY - */ - imageUri?: string | undefined; + assetId?: string | undefined; + /** + * OUTPUT ONLY + */ + imageUri?: string | undefined; }; /** @internal */ -export const ImageAsset$inboundSchema: z.ZodType = z.object({ - assetId: z.string().optional(), - imageUri: z.string().optional(), +export const ImageAsset$inboundSchema: z.ZodType< + ImageAsset, + z.ZodTypeDef, + unknown +> = z.object({ + assetId: z.string().optional(), + imageUri: z.string().optional(), }); /** @internal */ export type ImageAsset$Outbound = { - assetId?: string | undefined; - imageUri?: string | undefined; + assetId?: string | undefined; + imageUri?: string | undefined; }; /** @internal */ -export const ImageAsset$outboundSchema: z.ZodType = - z.object({ - assetId: z.string().optional(), - imageUri: z.string().optional(), - }); +export const ImageAsset$outboundSchema: z.ZodType< + ImageAsset$Outbound, + z.ZodTypeDef, + ImageAsset +> = z.object({ + assetId: z.string().optional(), + imageUri: z.string().optional(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ImageAsset$ { - /** @deprecated use `ImageAsset$inboundSchema` instead. */ - export const inboundSchema = ImageAsset$inboundSchema; - /** @deprecated use `ImageAsset$outboundSchema` instead. */ - export const outboundSchema = ImageAsset$outboundSchema; - /** @deprecated use `ImageAsset$Outbound` instead. */ - export type Outbound = ImageAsset$Outbound; + /** @deprecated use `ImageAsset$inboundSchema` instead. */ + export const inboundSchema = ImageAsset$inboundSchema; + /** @deprecated use `ImageAsset$outboundSchema` instead. */ + export const outboundSchema = ImageAsset$outboundSchema; + /** @deprecated use `ImageAsset$Outbound` instead. */ + export type Outbound = ImageAsset$Outbound; } diff --git a/src/models/components/index.ts b/src/models/components/index.ts index ce94c64..5051c58 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -188,7 +188,11 @@ export * from "./sortorder.js"; export * from "./stakingdistribution.js"; export * from "./subnet.js"; export * from "./subnetownershipinfo.js"; +export * from "./teleporterchainmetricsapiresponse.js"; export * from "./teleporterdestinationtransaction.js"; +export * from "./teleportermessageinfo.js"; +export * from "./teleportermetric.js"; +export * from "./teleportermetricsvalue.js"; export * from "./teleporterreceipt.js"; export * from "./teleporterrewarddetails.js"; export * from "./teleportersourcetransaction.js"; @@ -197,6 +201,7 @@ export * from "./timeintervalgranularityextended.js"; export * from "./timestamprangenftholdersparam.js"; export * from "./tokentype.js"; export * from "./transactiondetails.js"; +export * from "./transactiondirectiontype.js"; export * from "./transactionexportmetadata.js"; export * from "./transactionmethodtype.js"; export * from "./transactionstatus.js"; diff --git a/src/models/components/internaltransaction.ts b/src/models/components/internaltransaction.ts index 09aa0cd..493e5c0 100644 --- a/src/models/components/internaltransaction.ts +++ b/src/models/components/internaltransaction.ts @@ -2,99 +2,99 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - InternalTransactionOpCall, - InternalTransactionOpCall$inboundSchema, - InternalTransactionOpCall$outboundSchema, + InternalTransactionOpCall, + InternalTransactionOpCall$inboundSchema, + InternalTransactionOpCall$outboundSchema, } from "./internaltransactionopcall.js"; import { - RichAddress, - RichAddress$inboundSchema, - RichAddress$Outbound, - RichAddress$outboundSchema, + RichAddress, + RichAddress$inboundSchema, + RichAddress$Outbound, + RichAddress$outboundSchema, } from "./richaddress.js"; -import * as z from "zod"; export type InternalTransaction = { - /** - * The block number on the chain. - */ - blockNumber: string; - /** - * The block finality timestamp. - */ - blockTimestamp: number; - /** - * The block hash identifier. - */ - blockHash: string; - /** - * The transaction hash identifier. - */ - txHash: string; - from: RichAddress; - to: RichAddress; - internalTxType: InternalTransactionOpCall; - value: string; - /** - * True if the internal transaction was reverted. - */ - isReverted: boolean; - gasUsed: string; - gasLimit: string; + /** + * The block number on the chain. + */ + blockNumber: string; + /** + * The block finality timestamp. + */ + blockTimestamp: number; + /** + * The block hash identifier. + */ + blockHash: string; + /** + * The transaction hash identifier. + */ + txHash: string; + from: RichAddress; + to: RichAddress; + internalTxType: InternalTransactionOpCall; + value: string; + /** + * True if the internal transaction was reverted. + */ + isReverted: boolean; + gasUsed: string; + gasLimit: string; }; /** @internal */ export const InternalTransaction$inboundSchema: z.ZodType< - InternalTransaction, - z.ZodTypeDef, - unknown + InternalTransaction, + z.ZodTypeDef, + unknown > = z.object({ - blockNumber: z.string(), - blockTimestamp: z.number(), - blockHash: z.string(), - txHash: z.string(), - from: RichAddress$inboundSchema, - to: RichAddress$inboundSchema, - internalTxType: InternalTransactionOpCall$inboundSchema, - value: z.string(), - isReverted: z.boolean(), - gasUsed: z.string(), - gasLimit: z.string(), + blockNumber: z.string(), + blockTimestamp: z.number(), + blockHash: z.string(), + txHash: z.string(), + from: RichAddress$inboundSchema, + to: RichAddress$inboundSchema, + internalTxType: InternalTransactionOpCall$inboundSchema, + value: z.string(), + isReverted: z.boolean(), + gasUsed: z.string(), + gasLimit: z.string(), }); /** @internal */ export type InternalTransaction$Outbound = { - blockNumber: string; - blockTimestamp: number; - blockHash: string; - txHash: string; - from: RichAddress$Outbound; - to: RichAddress$Outbound; - internalTxType: string; - value: string; - isReverted: boolean; - gasUsed: string; - gasLimit: string; + blockNumber: string; + blockTimestamp: number; + blockHash: string; + txHash: string; + from: RichAddress$Outbound; + to: RichAddress$Outbound; + internalTxType: string; + value: string; + isReverted: boolean; + gasUsed: string; + gasLimit: string; }; /** @internal */ export const InternalTransaction$outboundSchema: z.ZodType< - InternalTransaction$Outbound, - z.ZodTypeDef, - InternalTransaction + InternalTransaction$Outbound, + z.ZodTypeDef, + InternalTransaction > = z.object({ - blockNumber: z.string(), - blockTimestamp: z.number(), - blockHash: z.string(), - txHash: z.string(), - from: RichAddress$outboundSchema, - to: RichAddress$outboundSchema, - internalTxType: InternalTransactionOpCall$outboundSchema, - value: z.string(), - isReverted: z.boolean(), - gasUsed: z.string(), - gasLimit: z.string(), + blockNumber: z.string(), + blockTimestamp: z.number(), + blockHash: z.string(), + txHash: z.string(), + from: RichAddress$outboundSchema, + to: RichAddress$outboundSchema, + internalTxType: InternalTransactionOpCall$outboundSchema, + value: z.string(), + isReverted: z.boolean(), + gasUsed: z.string(), + gasLimit: z.string(), }); /** @@ -102,10 +102,10 @@ export const InternalTransaction$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace InternalTransaction$ { - /** @deprecated use `InternalTransaction$inboundSchema` instead. */ - export const inboundSchema = InternalTransaction$inboundSchema; - /** @deprecated use `InternalTransaction$outboundSchema` instead. */ - export const outboundSchema = InternalTransaction$outboundSchema; - /** @deprecated use `InternalTransaction$Outbound` instead. */ - export type Outbound = InternalTransaction$Outbound; + /** @deprecated use `InternalTransaction$inboundSchema` instead. */ + export const inboundSchema = InternalTransaction$inboundSchema; + /** @deprecated use `InternalTransaction$outboundSchema` instead. */ + export const outboundSchema = InternalTransaction$outboundSchema; + /** @deprecated use `InternalTransaction$Outbound` instead. */ + export type Outbound = InternalTransaction$Outbound; } diff --git a/src/models/components/internaltransactiondetails.ts b/src/models/components/internaltransactiondetails.ts index a45f99c..12e831e 100644 --- a/src/models/components/internaltransactiondetails.ts +++ b/src/models/components/internaltransactiondetails.ts @@ -2,71 +2,71 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - InternalTransactionOpCall, - InternalTransactionOpCall$inboundSchema, - InternalTransactionOpCall$outboundSchema, + InternalTransactionOpCall, + InternalTransactionOpCall$inboundSchema, + InternalTransactionOpCall$outboundSchema, } from "./internaltransactionopcall.js"; import { - RichAddress, - RichAddress$inboundSchema, - RichAddress$Outbound, - RichAddress$outboundSchema, + RichAddress, + RichAddress$inboundSchema, + RichAddress$Outbound, + RichAddress$outboundSchema, } from "./richaddress.js"; -import * as z from "zod"; export type InternalTransactionDetails = { - from: RichAddress; - to: RichAddress; - internalTxType: InternalTransactionOpCall; - value: string; - /** - * True if the internal transaction was reverted. - */ - isReverted: boolean; - gasUsed: string; - gasLimit: string; + from: RichAddress; + to: RichAddress; + internalTxType: InternalTransactionOpCall; + value: string; + /** + * True if the internal transaction was reverted. + */ + isReverted: boolean; + gasUsed: string; + gasLimit: string; }; /** @internal */ export const InternalTransactionDetails$inboundSchema: z.ZodType< - InternalTransactionDetails, - z.ZodTypeDef, - unknown + InternalTransactionDetails, + z.ZodTypeDef, + unknown > = z.object({ - from: RichAddress$inboundSchema, - to: RichAddress$inboundSchema, - internalTxType: InternalTransactionOpCall$inboundSchema, - value: z.string(), - isReverted: z.boolean(), - gasUsed: z.string(), - gasLimit: z.string(), + from: RichAddress$inboundSchema, + to: RichAddress$inboundSchema, + internalTxType: InternalTransactionOpCall$inboundSchema, + value: z.string(), + isReverted: z.boolean(), + gasUsed: z.string(), + gasLimit: z.string(), }); /** @internal */ export type InternalTransactionDetails$Outbound = { - from: RichAddress$Outbound; - to: RichAddress$Outbound; - internalTxType: string; - value: string; - isReverted: boolean; - gasUsed: string; - gasLimit: string; + from: RichAddress$Outbound; + to: RichAddress$Outbound; + internalTxType: string; + value: string; + isReverted: boolean; + gasUsed: string; + gasLimit: string; }; /** @internal */ export const InternalTransactionDetails$outboundSchema: z.ZodType< - InternalTransactionDetails$Outbound, - z.ZodTypeDef, - InternalTransactionDetails + InternalTransactionDetails$Outbound, + z.ZodTypeDef, + InternalTransactionDetails > = z.object({ - from: RichAddress$outboundSchema, - to: RichAddress$outboundSchema, - internalTxType: InternalTransactionOpCall$outboundSchema, - value: z.string(), - isReverted: z.boolean(), - gasUsed: z.string(), - gasLimit: z.string(), + from: RichAddress$outboundSchema, + to: RichAddress$outboundSchema, + internalTxType: InternalTransactionOpCall$outboundSchema, + value: z.string(), + isReverted: z.boolean(), + gasUsed: z.string(), + gasLimit: z.string(), }); /** @@ -74,10 +74,10 @@ export const InternalTransactionDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace InternalTransactionDetails$ { - /** @deprecated use `InternalTransactionDetails$inboundSchema` instead. */ - export const inboundSchema = InternalTransactionDetails$inboundSchema; - /** @deprecated use `InternalTransactionDetails$outboundSchema` instead. */ - export const outboundSchema = InternalTransactionDetails$outboundSchema; - /** @deprecated use `InternalTransactionDetails$Outbound` instead. */ - export type Outbound = InternalTransactionDetails$Outbound; + /** @deprecated use `InternalTransactionDetails$inboundSchema` instead. */ + export const inboundSchema = InternalTransactionDetails$inboundSchema; + /** @deprecated use `InternalTransactionDetails$outboundSchema` instead. */ + export const outboundSchema = InternalTransactionDetails$outboundSchema; + /** @deprecated use `InternalTransactionDetails$Outbound` instead. */ + export type Outbound = InternalTransactionDetails$Outbound; } diff --git a/src/models/components/internaltransactionopcall.ts b/src/models/components/internaltransactionopcall.ts index 0ee8e3a..3067439 100644 --- a/src/models/components/internaltransactionopcall.ts +++ b/src/models/components/internaltransactionopcall.ts @@ -2,28 +2,30 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const InternalTransactionOpCall = { - Unknown: "UNKNOWN", - Call: "CALL", - Create: "CREATE", - Create2: "CREATE2", - Callcode: "CALLCODE", - Delegatecall: "DELEGATECALL", - Staticcall: "STATICCALL", + Unknown: "UNKNOWN", + Call: "CALL", + Create: "CREATE", + Create2: "CREATE2", + Callcode: "CALLCODE", + Delegatecall: "DELEGATECALL", + Staticcall: "STATICCALL", } as const; -export type InternalTransactionOpCall = ClosedEnum; +export type InternalTransactionOpCall = ClosedEnum< + typeof InternalTransactionOpCall +>; /** @internal */ export const InternalTransactionOpCall$inboundSchema: z.ZodNativeEnum< - typeof InternalTransactionOpCall + typeof InternalTransactionOpCall > = z.nativeEnum(InternalTransactionOpCall); /** @internal */ export const InternalTransactionOpCall$outboundSchema: z.ZodNativeEnum< - typeof InternalTransactionOpCall + typeof InternalTransactionOpCall > = InternalTransactionOpCall$inboundSchema; /** @@ -31,8 +33,8 @@ export const InternalTransactionOpCall$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace InternalTransactionOpCall$ { - /** @deprecated use `InternalTransactionOpCall$inboundSchema` instead. */ - export const inboundSchema = InternalTransactionOpCall$inboundSchema; - /** @deprecated use `InternalTransactionOpCall$outboundSchema` instead. */ - export const outboundSchema = InternalTransactionOpCall$outboundSchema; + /** @deprecated use `InternalTransactionOpCall$inboundSchema` instead. */ + export const inboundSchema = InternalTransactionOpCall$inboundSchema; + /** @deprecated use `InternalTransactionOpCall$outboundSchema` instead. */ + export const outboundSchema = InternalTransactionOpCall$outboundSchema; } diff --git a/src/models/components/latestbalanceparams.ts b/src/models/components/latestbalanceparams.ts index e92b70b..68dac89 100644 --- a/src/models/components/latestbalanceparams.ts +++ b/src/models/components/latestbalanceparams.ts @@ -2,46 +2,50 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { TokenType, TokenType$inboundSchema, TokenType$outboundSchema } from "./tokentype.js"; import * as z from "zod"; +import { + TokenType, + TokenType$inboundSchema, + TokenType$outboundSchema, +} from "./tokentype.js"; export type LatestBalanceParams = { - minBalance: string; - evmChainId: string; - tokenType: TokenType; - contractAddress?: string | undefined; + minBalance: string; + evmChainId: string; + tokenType: TokenType; + contractAddress?: string | undefined; }; /** @internal */ export const LatestBalanceParams$inboundSchema: z.ZodType< - LatestBalanceParams, - z.ZodTypeDef, - unknown + LatestBalanceParams, + z.ZodTypeDef, + unknown > = z.object({ - minBalance: z.string(), - evmChainId: z.string(), - tokenType: TokenType$inboundSchema, - contractAddress: z.string().optional(), + minBalance: z.string(), + evmChainId: z.string(), + tokenType: TokenType$inboundSchema, + contractAddress: z.string().optional(), }); /** @internal */ export type LatestBalanceParams$Outbound = { - minBalance: string; - evmChainId: string; - tokenType: string; - contractAddress?: string | undefined; + minBalance: string; + evmChainId: string; + tokenType: string; + contractAddress?: string | undefined; }; /** @internal */ export const LatestBalanceParams$outboundSchema: z.ZodType< - LatestBalanceParams$Outbound, - z.ZodTypeDef, - LatestBalanceParams + LatestBalanceParams$Outbound, + z.ZodTypeDef, + LatestBalanceParams > = z.object({ - minBalance: z.string(), - evmChainId: z.string(), - tokenType: TokenType$outboundSchema, - contractAddress: z.string().optional(), + minBalance: z.string(), + evmChainId: z.string(), + tokenType: TokenType$outboundSchema, + contractAddress: z.string().optional(), }); /** @@ -49,10 +53,10 @@ export const LatestBalanceParams$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LatestBalanceParams$ { - /** @deprecated use `LatestBalanceParams$inboundSchema` instead. */ - export const inboundSchema = LatestBalanceParams$inboundSchema; - /** @deprecated use `LatestBalanceParams$outboundSchema` instead. */ - export const outboundSchema = LatestBalanceParams$outboundSchema; - /** @deprecated use `LatestBalanceParams$Outbound` instead. */ - export type Outbound = LatestBalanceParams$Outbound; + /** @deprecated use `LatestBalanceParams$inboundSchema` instead. */ + export const inboundSchema = LatestBalanceParams$inboundSchema; + /** @deprecated use `LatestBalanceParams$outboundSchema` instead. */ + export const outboundSchema = LatestBalanceParams$outboundSchema; + /** @deprecated use `LatestBalanceParams$Outbound` instead. */ + export type Outbound = LatestBalanceParams$Outbound; } diff --git a/src/models/components/latestbalancequerydto.ts b/src/models/components/latestbalancequerydto.ts index 297cada..ba65311 100644 --- a/src/models/components/latestbalancequerydto.ts +++ b/src/models/components/latestbalancequerydto.ts @@ -2,34 +2,36 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - LatestBalanceParams, - LatestBalanceParams$inboundSchema, - LatestBalanceParams$Outbound, - LatestBalanceParams$outboundSchema, + LatestBalanceParams, + LatestBalanceParams$inboundSchema, + LatestBalanceParams$Outbound, + LatestBalanceParams$outboundSchema, } from "./latestbalanceparams.js"; -import * as z from "zod"; export const LatestBalanceQueryDtoType = { - LatestBalance: "LatestBalance", + LatestBalance: "LatestBalance", } as const; -export type LatestBalanceQueryDtoType = ClosedEnum; +export type LatestBalanceQueryDtoType = ClosedEnum< + typeof LatestBalanceQueryDtoType +>; export type LatestBalanceQueryDto = { - id: string; - type: LatestBalanceQueryDtoType; - params: LatestBalanceParams; + id: string; + type: LatestBalanceQueryDtoType; + params: LatestBalanceParams; }; /** @internal */ export const LatestBalanceQueryDtoType$inboundSchema: z.ZodNativeEnum< - typeof LatestBalanceQueryDtoType + typeof LatestBalanceQueryDtoType > = z.nativeEnum(LatestBalanceQueryDtoType); /** @internal */ export const LatestBalanceQueryDtoType$outboundSchema: z.ZodNativeEnum< - typeof LatestBalanceQueryDtoType + typeof LatestBalanceQueryDtoType > = LatestBalanceQueryDtoType$inboundSchema; /** @@ -37,39 +39,39 @@ export const LatestBalanceQueryDtoType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LatestBalanceQueryDtoType$ { - /** @deprecated use `LatestBalanceQueryDtoType$inboundSchema` instead. */ - export const inboundSchema = LatestBalanceQueryDtoType$inboundSchema; - /** @deprecated use `LatestBalanceQueryDtoType$outboundSchema` instead. */ - export const outboundSchema = LatestBalanceQueryDtoType$outboundSchema; + /** @deprecated use `LatestBalanceQueryDtoType$inboundSchema` instead. */ + export const inboundSchema = LatestBalanceQueryDtoType$inboundSchema; + /** @deprecated use `LatestBalanceQueryDtoType$outboundSchema` instead. */ + export const outboundSchema = LatestBalanceQueryDtoType$outboundSchema; } /** @internal */ export const LatestBalanceQueryDto$inboundSchema: z.ZodType< - LatestBalanceQueryDto, - z.ZodTypeDef, - unknown + LatestBalanceQueryDto, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), - type: LatestBalanceQueryDtoType$inboundSchema, - params: LatestBalanceParams$inboundSchema, + id: z.string(), + type: LatestBalanceQueryDtoType$inboundSchema, + params: LatestBalanceParams$inboundSchema, }); /** @internal */ export type LatestBalanceQueryDto$Outbound = { - id: string; - type: string; - params: LatestBalanceParams$Outbound; + id: string; + type: string; + params: LatestBalanceParams$Outbound; }; /** @internal */ export const LatestBalanceQueryDto$outboundSchema: z.ZodType< - LatestBalanceQueryDto$Outbound, - z.ZodTypeDef, - LatestBalanceQueryDto + LatestBalanceQueryDto$Outbound, + z.ZodTypeDef, + LatestBalanceQueryDto > = z.object({ - id: z.string(), - type: LatestBalanceQueryDtoType$outboundSchema, - params: LatestBalanceParams$outboundSchema, + id: z.string(), + type: LatestBalanceQueryDtoType$outboundSchema, + params: LatestBalanceParams$outboundSchema, }); /** @@ -77,10 +79,10 @@ export const LatestBalanceQueryDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LatestBalanceQueryDto$ { - /** @deprecated use `LatestBalanceQueryDto$inboundSchema` instead. */ - export const inboundSchema = LatestBalanceQueryDto$inboundSchema; - /** @deprecated use `LatestBalanceQueryDto$outboundSchema` instead. */ - export const outboundSchema = LatestBalanceQueryDto$outboundSchema; - /** @deprecated use `LatestBalanceQueryDto$Outbound` instead. */ - export type Outbound = LatestBalanceQueryDto$Outbound; + /** @deprecated use `LatestBalanceQueryDto$inboundSchema` instead. */ + export const inboundSchema = LatestBalanceQueryDto$inboundSchema; + /** @deprecated use `LatestBalanceQueryDto$outboundSchema` instead. */ + export const outboundSchema = LatestBalanceQueryDto$outboundSchema; + /** @deprecated use `LatestBalanceQueryDto$Outbound` instead. */ + export type Outbound = LatestBalanceQueryDto$Outbound; } diff --git a/src/models/components/lateststarsarenabalanceparams.ts b/src/models/components/lateststarsarenabalanceparams.ts index 6ca393b..d23ae2c 100644 --- a/src/models/components/lateststarsarenabalanceparams.ts +++ b/src/models/components/lateststarsarenabalanceparams.ts @@ -5,34 +5,34 @@ import * as z from "zod"; export type LatestStarsArenaBalanceParams = { - minBalance: string; - subjectAddress: string; + minBalance: string; + subjectAddress: string; }; /** @internal */ export const LatestStarsArenaBalanceParams$inboundSchema: z.ZodType< - LatestStarsArenaBalanceParams, - z.ZodTypeDef, - unknown + LatestStarsArenaBalanceParams, + z.ZodTypeDef, + unknown > = z.object({ - minBalance: z.string(), - subjectAddress: z.string(), + minBalance: z.string(), + subjectAddress: z.string(), }); /** @internal */ export type LatestStarsArenaBalanceParams$Outbound = { - minBalance: string; - subjectAddress: string; + minBalance: string; + subjectAddress: string; }; /** @internal */ export const LatestStarsArenaBalanceParams$outboundSchema: z.ZodType< - LatestStarsArenaBalanceParams$Outbound, - z.ZodTypeDef, - LatestStarsArenaBalanceParams + LatestStarsArenaBalanceParams$Outbound, + z.ZodTypeDef, + LatestStarsArenaBalanceParams > = z.object({ - minBalance: z.string(), - subjectAddress: z.string(), + minBalance: z.string(), + subjectAddress: z.string(), }); /** @@ -40,10 +40,10 @@ export const LatestStarsArenaBalanceParams$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LatestStarsArenaBalanceParams$ { - /** @deprecated use `LatestStarsArenaBalanceParams$inboundSchema` instead. */ - export const inboundSchema = LatestStarsArenaBalanceParams$inboundSchema; - /** @deprecated use `LatestStarsArenaBalanceParams$outboundSchema` instead. */ - export const outboundSchema = LatestStarsArenaBalanceParams$outboundSchema; - /** @deprecated use `LatestStarsArenaBalanceParams$Outbound` instead. */ - export type Outbound = LatestStarsArenaBalanceParams$Outbound; + /** @deprecated use `LatestStarsArenaBalanceParams$inboundSchema` instead. */ + export const inboundSchema = LatestStarsArenaBalanceParams$inboundSchema; + /** @deprecated use `LatestStarsArenaBalanceParams$outboundSchema` instead. */ + export const outboundSchema = LatestStarsArenaBalanceParams$outboundSchema; + /** @deprecated use `LatestStarsArenaBalanceParams$Outbound` instead. */ + export type Outbound = LatestStarsArenaBalanceParams$Outbound; } diff --git a/src/models/components/lateststarsarenabalancequerydto.ts b/src/models/components/lateststarsarenabalancequerydto.ts index 620b8ca..fdfb917 100644 --- a/src/models/components/lateststarsarenabalancequerydto.ts +++ b/src/models/components/lateststarsarenabalancequerydto.ts @@ -2,76 +2,78 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - LatestStarsArenaBalanceParams, - LatestStarsArenaBalanceParams$inboundSchema, - LatestStarsArenaBalanceParams$Outbound, - LatestStarsArenaBalanceParams$outboundSchema, + LatestStarsArenaBalanceParams, + LatestStarsArenaBalanceParams$inboundSchema, + LatestStarsArenaBalanceParams$Outbound, + LatestStarsArenaBalanceParams$outboundSchema, } from "./lateststarsarenabalanceparams.js"; -import * as z from "zod"; export const LatestStarsArenaBalanceQueryDtoType = { - LatestBalanceStarsArena: "LatestBalanceStarsArena", + LatestBalanceStarsArena: "LatestBalanceStarsArena", } as const; export type LatestStarsArenaBalanceQueryDtoType = ClosedEnum< - typeof LatestStarsArenaBalanceQueryDtoType + typeof LatestStarsArenaBalanceQueryDtoType >; export type LatestStarsArenaBalanceQueryDto = { - id: string; - type: LatestStarsArenaBalanceQueryDtoType; - params: LatestStarsArenaBalanceParams; + id: string; + type: LatestStarsArenaBalanceQueryDtoType; + params: LatestStarsArenaBalanceParams; }; /** @internal */ export const LatestStarsArenaBalanceQueryDtoType$inboundSchema: z.ZodNativeEnum< - typeof LatestStarsArenaBalanceQueryDtoType + typeof LatestStarsArenaBalanceQueryDtoType > = z.nativeEnum(LatestStarsArenaBalanceQueryDtoType); /** @internal */ -export const LatestStarsArenaBalanceQueryDtoType$outboundSchema: z.ZodNativeEnum< - typeof LatestStarsArenaBalanceQueryDtoType -> = LatestStarsArenaBalanceQueryDtoType$inboundSchema; +export const LatestStarsArenaBalanceQueryDtoType$outboundSchema: + z.ZodNativeEnum = + LatestStarsArenaBalanceQueryDtoType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LatestStarsArenaBalanceQueryDtoType$ { - /** @deprecated use `LatestStarsArenaBalanceQueryDtoType$inboundSchema` instead. */ - export const inboundSchema = LatestStarsArenaBalanceQueryDtoType$inboundSchema; - /** @deprecated use `LatestStarsArenaBalanceQueryDtoType$outboundSchema` instead. */ - export const outboundSchema = LatestStarsArenaBalanceQueryDtoType$outboundSchema; + /** @deprecated use `LatestStarsArenaBalanceQueryDtoType$inboundSchema` instead. */ + export const inboundSchema = + LatestStarsArenaBalanceQueryDtoType$inboundSchema; + /** @deprecated use `LatestStarsArenaBalanceQueryDtoType$outboundSchema` instead. */ + export const outboundSchema = + LatestStarsArenaBalanceQueryDtoType$outboundSchema; } /** @internal */ export const LatestStarsArenaBalanceQueryDto$inboundSchema: z.ZodType< - LatestStarsArenaBalanceQueryDto, - z.ZodTypeDef, - unknown + LatestStarsArenaBalanceQueryDto, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), - type: LatestStarsArenaBalanceQueryDtoType$inboundSchema, - params: LatestStarsArenaBalanceParams$inboundSchema, + id: z.string(), + type: LatestStarsArenaBalanceQueryDtoType$inboundSchema, + params: LatestStarsArenaBalanceParams$inboundSchema, }); /** @internal */ export type LatestStarsArenaBalanceQueryDto$Outbound = { - id: string; - type: string; - params: LatestStarsArenaBalanceParams$Outbound; + id: string; + type: string; + params: LatestStarsArenaBalanceParams$Outbound; }; /** @internal */ export const LatestStarsArenaBalanceQueryDto$outboundSchema: z.ZodType< - LatestStarsArenaBalanceQueryDto$Outbound, - z.ZodTypeDef, - LatestStarsArenaBalanceQueryDto + LatestStarsArenaBalanceQueryDto$Outbound, + z.ZodTypeDef, + LatestStarsArenaBalanceQueryDto > = z.object({ - id: z.string(), - type: LatestStarsArenaBalanceQueryDtoType$outboundSchema, - params: LatestStarsArenaBalanceParams$outboundSchema, + id: z.string(), + type: LatestStarsArenaBalanceQueryDtoType$outboundSchema, + params: LatestStarsArenaBalanceParams$outboundSchema, }); /** @@ -79,10 +81,10 @@ export const LatestStarsArenaBalanceQueryDto$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LatestStarsArenaBalanceQueryDto$ { - /** @deprecated use `LatestStarsArenaBalanceQueryDto$inboundSchema` instead. */ - export const inboundSchema = LatestStarsArenaBalanceQueryDto$inboundSchema; - /** @deprecated use `LatestStarsArenaBalanceQueryDto$outboundSchema` instead. */ - export const outboundSchema = LatestStarsArenaBalanceQueryDto$outboundSchema; - /** @deprecated use `LatestStarsArenaBalanceQueryDto$Outbound` instead. */ - export type Outbound = LatestStarsArenaBalanceQueryDto$Outbound; + /** @deprecated use `LatestStarsArenaBalanceQueryDto$inboundSchema` instead. */ + export const inboundSchema = LatestStarsArenaBalanceQueryDto$inboundSchema; + /** @deprecated use `LatestStarsArenaBalanceQueryDto$outboundSchema` instead. */ + export const outboundSchema = LatestStarsArenaBalanceQueryDto$outboundSchema; + /** @deprecated use `LatestStarsArenaBalanceQueryDto$Outbound` instead. */ + export type Outbound = LatestStarsArenaBalanceQueryDto$Outbound; } diff --git a/src/models/components/listblockchainsresponse.ts b/src/models/components/listblockchainsresponse.ts index 60bd2e4..3d2fe8e 100644 --- a/src/models/components/listblockchainsresponse.ts +++ b/src/models/components/listblockchainsresponse.ts @@ -2,46 +2,46 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Blockchain, - Blockchain$inboundSchema, - Blockchain$Outbound, - Blockchain$outboundSchema, + Blockchain, + Blockchain$inboundSchema, + Blockchain$Outbound, + Blockchain$outboundSchema, } from "./blockchain.js"; -import * as z from "zod"; export type ListBlockchainsResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - blockchains: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + blockchains: Array; }; /** @internal */ export const ListBlockchainsResponse$inboundSchema: z.ZodType< - ListBlockchainsResponse, - z.ZodTypeDef, - unknown + ListBlockchainsResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - blockchains: z.array(Blockchain$inboundSchema), + nextPageToken: z.string().optional(), + blockchains: z.array(Blockchain$inboundSchema), }); /** @internal */ export type ListBlockchainsResponse$Outbound = { - nextPageToken?: string | undefined; - blockchains: Array; + nextPageToken?: string | undefined; + blockchains: Array; }; /** @internal */ export const ListBlockchainsResponse$outboundSchema: z.ZodType< - ListBlockchainsResponse$Outbound, - z.ZodTypeDef, - ListBlockchainsResponse + ListBlockchainsResponse$Outbound, + z.ZodTypeDef, + ListBlockchainsResponse > = z.object({ - nextPageToken: z.string().optional(), - blockchains: z.array(Blockchain$outboundSchema), + nextPageToken: z.string().optional(), + blockchains: z.array(Blockchain$outboundSchema), }); /** @@ -49,10 +49,10 @@ export const ListBlockchainsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListBlockchainsResponse$ { - /** @deprecated use `ListBlockchainsResponse$inboundSchema` instead. */ - export const inboundSchema = ListBlockchainsResponse$inboundSchema; - /** @deprecated use `ListBlockchainsResponse$outboundSchema` instead. */ - export const outboundSchema = ListBlockchainsResponse$outboundSchema; - /** @deprecated use `ListBlockchainsResponse$Outbound` instead. */ - export type Outbound = ListBlockchainsResponse$Outbound; + /** @deprecated use `ListBlockchainsResponse$inboundSchema` instead. */ + export const inboundSchema = ListBlockchainsResponse$inboundSchema; + /** @deprecated use `ListBlockchainsResponse$outboundSchema` instead. */ + export const outboundSchema = ListBlockchainsResponse$outboundSchema; + /** @deprecated use `ListBlockchainsResponse$Outbound` instead. */ + export type Outbound = ListBlockchainsResponse$Outbound; } diff --git a/src/models/components/listcchainatomicbalancesresponse.ts b/src/models/components/listcchainatomicbalancesresponse.ts index 1ecd5c6..d90f405 100644 --- a/src/models/components/listcchainatomicbalancesresponse.ts +++ b/src/models/components/listcchainatomicbalancesresponse.ts @@ -2,49 +2,49 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - CChainAtomicBalances, - CChainAtomicBalances$inboundSchema, - CChainAtomicBalances$Outbound, - CChainAtomicBalances$outboundSchema, + CChainAtomicBalances, + CChainAtomicBalances$inboundSchema, + CChainAtomicBalances$Outbound, + CChainAtomicBalances$outboundSchema, } from "./cchainatomicbalances.js"; import { - PrimaryNetworkChainInfo, - PrimaryNetworkChainInfo$inboundSchema, - PrimaryNetworkChainInfo$Outbound, - PrimaryNetworkChainInfo$outboundSchema, + PrimaryNetworkChainInfo, + PrimaryNetworkChainInfo$inboundSchema, + PrimaryNetworkChainInfo$Outbound, + PrimaryNetworkChainInfo$outboundSchema, } from "./primarynetworkchaininfo.js"; -import * as z from "zod"; export type ListCChainAtomicBalancesResponse = { - balances: CChainAtomicBalances; - chainInfo: PrimaryNetworkChainInfo; + balances: CChainAtomicBalances; + chainInfo: PrimaryNetworkChainInfo; }; /** @internal */ export const ListCChainAtomicBalancesResponse$inboundSchema: z.ZodType< - ListCChainAtomicBalancesResponse, - z.ZodTypeDef, - unknown + ListCChainAtomicBalancesResponse, + z.ZodTypeDef, + unknown > = z.object({ - balances: CChainAtomicBalances$inboundSchema, - chainInfo: PrimaryNetworkChainInfo$inboundSchema, + balances: CChainAtomicBalances$inboundSchema, + chainInfo: PrimaryNetworkChainInfo$inboundSchema, }); /** @internal */ export type ListCChainAtomicBalancesResponse$Outbound = { - balances: CChainAtomicBalances$Outbound; - chainInfo: PrimaryNetworkChainInfo$Outbound; + balances: CChainAtomicBalances$Outbound; + chainInfo: PrimaryNetworkChainInfo$Outbound; }; /** @internal */ export const ListCChainAtomicBalancesResponse$outboundSchema: z.ZodType< - ListCChainAtomicBalancesResponse$Outbound, - z.ZodTypeDef, - ListCChainAtomicBalancesResponse + ListCChainAtomicBalancesResponse$Outbound, + z.ZodTypeDef, + ListCChainAtomicBalancesResponse > = z.object({ - balances: CChainAtomicBalances$outboundSchema, - chainInfo: PrimaryNetworkChainInfo$outboundSchema, + balances: CChainAtomicBalances$outboundSchema, + chainInfo: PrimaryNetworkChainInfo$outboundSchema, }); /** @@ -52,10 +52,10 @@ export const ListCChainAtomicBalancesResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListCChainAtomicBalancesResponse$ { - /** @deprecated use `ListCChainAtomicBalancesResponse$inboundSchema` instead. */ - export const inboundSchema = ListCChainAtomicBalancesResponse$inboundSchema; - /** @deprecated use `ListCChainAtomicBalancesResponse$outboundSchema` instead. */ - export const outboundSchema = ListCChainAtomicBalancesResponse$outboundSchema; - /** @deprecated use `ListCChainAtomicBalancesResponse$Outbound` instead. */ - export type Outbound = ListCChainAtomicBalancesResponse$Outbound; + /** @deprecated use `ListCChainAtomicBalancesResponse$inboundSchema` instead. */ + export const inboundSchema = ListCChainAtomicBalancesResponse$inboundSchema; + /** @deprecated use `ListCChainAtomicBalancesResponse$outboundSchema` instead. */ + export const outboundSchema = ListCChainAtomicBalancesResponse$outboundSchema; + /** @deprecated use `ListCChainAtomicBalancesResponse$Outbound` instead. */ + export type Outbound = ListCChainAtomicBalancesResponse$Outbound; } diff --git a/src/models/components/listcchainatomictransactionsresponse.ts b/src/models/components/listcchainatomictransactionsresponse.ts index 2128b76..6e28cc2 100644 --- a/src/models/components/listcchainatomictransactionsresponse.ts +++ b/src/models/components/listcchainatomictransactionsresponse.ts @@ -2,102 +2,121 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - CChainExportTransaction, - CChainExportTransaction$inboundSchema, - CChainExportTransaction$Outbound, - CChainExportTransaction$outboundSchema, + CChainExportTransaction, + CChainExportTransaction$inboundSchema, + CChainExportTransaction$Outbound, + CChainExportTransaction$outboundSchema, } from "./cchainexporttransaction.js"; import { - CChainImportTransaction, - CChainImportTransaction$inboundSchema, - CChainImportTransaction$Outbound, - CChainImportTransaction$outboundSchema, + CChainImportTransaction, + CChainImportTransaction$inboundSchema, + CChainImportTransaction$Outbound, + CChainImportTransaction$outboundSchema, } from "./cchainimporttransaction.js"; import { - PrimaryNetworkChainInfo, - PrimaryNetworkChainInfo$inboundSchema, - PrimaryNetworkChainInfo$Outbound, - PrimaryNetworkChainInfo$outboundSchema, + PrimaryNetworkChainInfo, + PrimaryNetworkChainInfo$inboundSchema, + PrimaryNetworkChainInfo$Outbound, + PrimaryNetworkChainInfo$outboundSchema, } from "./primarynetworkchaininfo.js"; -import * as z from "zod"; export type ListCChainAtomicTransactionsResponseTransactions = - | CChainExportTransaction - | CChainImportTransaction; + | CChainExportTransaction + | CChainImportTransaction; export type ListCChainAtomicTransactionsResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - transactions: Array; - chainInfo: PrimaryNetworkChainInfo; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + transactions: Array; + chainInfo: PrimaryNetworkChainInfo; }; /** @internal */ -export const ListCChainAtomicTransactionsResponseTransactions$inboundSchema: z.ZodType< +export const ListCChainAtomicTransactionsResponseTransactions$inboundSchema: + z.ZodType< ListCChainAtomicTransactionsResponseTransactions, z.ZodTypeDef, unknown -> = z.union([CChainExportTransaction$inboundSchema, CChainImportTransaction$inboundSchema]); + > = z.union([ + CChainExportTransaction$inboundSchema, + CChainImportTransaction$inboundSchema, + ]); /** @internal */ export type ListCChainAtomicTransactionsResponseTransactions$Outbound = - | CChainExportTransaction$Outbound - | CChainImportTransaction$Outbound; + | CChainExportTransaction$Outbound + | CChainImportTransaction$Outbound; /** @internal */ -export const ListCChainAtomicTransactionsResponseTransactions$outboundSchema: z.ZodType< +export const ListCChainAtomicTransactionsResponseTransactions$outboundSchema: + z.ZodType< ListCChainAtomicTransactionsResponseTransactions$Outbound, z.ZodTypeDef, ListCChainAtomicTransactionsResponseTransactions -> = z.union([CChainExportTransaction$outboundSchema, CChainImportTransaction$outboundSchema]); + > = z.union([ + CChainExportTransaction$outboundSchema, + CChainImportTransaction$outboundSchema, + ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListCChainAtomicTransactionsResponseTransactions$ { - /** @deprecated use `ListCChainAtomicTransactionsResponseTransactions$inboundSchema` instead. */ - export const inboundSchema = ListCChainAtomicTransactionsResponseTransactions$inboundSchema; - /** @deprecated use `ListCChainAtomicTransactionsResponseTransactions$outboundSchema` instead. */ - export const outboundSchema = ListCChainAtomicTransactionsResponseTransactions$outboundSchema; - /** @deprecated use `ListCChainAtomicTransactionsResponseTransactions$Outbound` instead. */ - export type Outbound = ListCChainAtomicTransactionsResponseTransactions$Outbound; + /** @deprecated use `ListCChainAtomicTransactionsResponseTransactions$inboundSchema` instead. */ + export const inboundSchema = + ListCChainAtomicTransactionsResponseTransactions$inboundSchema; + /** @deprecated use `ListCChainAtomicTransactionsResponseTransactions$outboundSchema` instead. */ + export const outboundSchema = + ListCChainAtomicTransactionsResponseTransactions$outboundSchema; + /** @deprecated use `ListCChainAtomicTransactionsResponseTransactions$Outbound` instead. */ + export type Outbound = + ListCChainAtomicTransactionsResponseTransactions$Outbound; } /** @internal */ export const ListCChainAtomicTransactionsResponse$inboundSchema: z.ZodType< - ListCChainAtomicTransactionsResponse, - z.ZodTypeDef, - unknown + ListCChainAtomicTransactionsResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - transactions: z.array( - z.union([CChainExportTransaction$inboundSchema, CChainImportTransaction$inboundSchema]) - ), - chainInfo: PrimaryNetworkChainInfo$inboundSchema, + nextPageToken: z.string().optional(), + transactions: z.array( + z.union([ + CChainExportTransaction$inboundSchema, + CChainImportTransaction$inboundSchema, + ]), + ), + chainInfo: PrimaryNetworkChainInfo$inboundSchema, }); /** @internal */ export type ListCChainAtomicTransactionsResponse$Outbound = { - nextPageToken?: string | undefined; - transactions: Array; - chainInfo: PrimaryNetworkChainInfo$Outbound; + nextPageToken?: string | undefined; + transactions: Array< + CChainExportTransaction$Outbound | CChainImportTransaction$Outbound + >; + chainInfo: PrimaryNetworkChainInfo$Outbound; }; /** @internal */ export const ListCChainAtomicTransactionsResponse$outboundSchema: z.ZodType< - ListCChainAtomicTransactionsResponse$Outbound, - z.ZodTypeDef, - ListCChainAtomicTransactionsResponse + ListCChainAtomicTransactionsResponse$Outbound, + z.ZodTypeDef, + ListCChainAtomicTransactionsResponse > = z.object({ - nextPageToken: z.string().optional(), - transactions: z.array( - z.union([CChainExportTransaction$outboundSchema, CChainImportTransaction$outboundSchema]) - ), - chainInfo: PrimaryNetworkChainInfo$outboundSchema, + nextPageToken: z.string().optional(), + transactions: z.array( + z.union([ + CChainExportTransaction$outboundSchema, + CChainImportTransaction$outboundSchema, + ]), + ), + chainInfo: PrimaryNetworkChainInfo$outboundSchema, }); /** @@ -105,10 +124,12 @@ export const ListCChainAtomicTransactionsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListCChainAtomicTransactionsResponse$ { - /** @deprecated use `ListCChainAtomicTransactionsResponse$inboundSchema` instead. */ - export const inboundSchema = ListCChainAtomicTransactionsResponse$inboundSchema; - /** @deprecated use `ListCChainAtomicTransactionsResponse$outboundSchema` instead. */ - export const outboundSchema = ListCChainAtomicTransactionsResponse$outboundSchema; - /** @deprecated use `ListCChainAtomicTransactionsResponse$Outbound` instead. */ - export type Outbound = ListCChainAtomicTransactionsResponse$Outbound; + /** @deprecated use `ListCChainAtomicTransactionsResponse$inboundSchema` instead. */ + export const inboundSchema = + ListCChainAtomicTransactionsResponse$inboundSchema; + /** @deprecated use `ListCChainAtomicTransactionsResponse$outboundSchema` instead. */ + export const outboundSchema = + ListCChainAtomicTransactionsResponse$outboundSchema; + /** @deprecated use `ListCChainAtomicTransactionsResponse$Outbound` instead. */ + export type Outbound = ListCChainAtomicTransactionsResponse$Outbound; } diff --git a/src/models/components/listcollectiblebalancesresponse.ts b/src/models/components/listcollectiblebalancesresponse.ts index 4148719..9e3128b 100644 --- a/src/models/components/listcollectiblebalancesresponse.ts +++ b/src/models/components/listcollectiblebalancesresponse.ts @@ -2,93 +2,107 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Erc1155TokenBalance, - Erc1155TokenBalance$inboundSchema, - Erc1155TokenBalance$Outbound, - Erc1155TokenBalance$outboundSchema, + Erc1155TokenBalance, + Erc1155TokenBalance$inboundSchema, + Erc1155TokenBalance$Outbound, + Erc1155TokenBalance$outboundSchema, } from "./erc1155tokenbalance.js"; import { - Erc721TokenBalance, - Erc721TokenBalance$inboundSchema, - Erc721TokenBalance$Outbound, - Erc721TokenBalance$outboundSchema, + Erc721TokenBalance, + Erc721TokenBalance$inboundSchema, + Erc721TokenBalance$Outbound, + Erc721TokenBalance$outboundSchema, } from "./erc721tokenbalance.js"; -import * as z from "zod"; export type CollectibleBalances = Erc1155TokenBalance | Erc721TokenBalance; export type ListCollectibleBalancesResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - /** - * The list of ERC-721 and ERC-1155 token balances for the address. - */ - collectibleBalances: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + /** + * The list of ERC-721 and ERC-1155 token balances for the address. + */ + collectibleBalances: Array; }; /** @internal */ export const CollectibleBalances$inboundSchema: z.ZodType< - CollectibleBalances, - z.ZodTypeDef, - unknown -> = z.union([Erc1155TokenBalance$inboundSchema, Erc721TokenBalance$inboundSchema]); + CollectibleBalances, + z.ZodTypeDef, + unknown +> = z.union([ + Erc1155TokenBalance$inboundSchema, + Erc721TokenBalance$inboundSchema, +]); /** @internal */ export type CollectibleBalances$Outbound = - | Erc1155TokenBalance$Outbound - | Erc721TokenBalance$Outbound; + | Erc1155TokenBalance$Outbound + | Erc721TokenBalance$Outbound; /** @internal */ export const CollectibleBalances$outboundSchema: z.ZodType< - CollectibleBalances$Outbound, - z.ZodTypeDef, - CollectibleBalances -> = z.union([Erc1155TokenBalance$outboundSchema, Erc721TokenBalance$outboundSchema]); + CollectibleBalances$Outbound, + z.ZodTypeDef, + CollectibleBalances +> = z.union([ + Erc1155TokenBalance$outboundSchema, + Erc721TokenBalance$outboundSchema, +]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CollectibleBalances$ { - /** @deprecated use `CollectibleBalances$inboundSchema` instead. */ - export const inboundSchema = CollectibleBalances$inboundSchema; - /** @deprecated use `CollectibleBalances$outboundSchema` instead. */ - export const outboundSchema = CollectibleBalances$outboundSchema; - /** @deprecated use `CollectibleBalances$Outbound` instead. */ - export type Outbound = CollectibleBalances$Outbound; + /** @deprecated use `CollectibleBalances$inboundSchema` instead. */ + export const inboundSchema = CollectibleBalances$inboundSchema; + /** @deprecated use `CollectibleBalances$outboundSchema` instead. */ + export const outboundSchema = CollectibleBalances$outboundSchema; + /** @deprecated use `CollectibleBalances$Outbound` instead. */ + export type Outbound = CollectibleBalances$Outbound; } /** @internal */ export const ListCollectibleBalancesResponse$inboundSchema: z.ZodType< - ListCollectibleBalancesResponse, - z.ZodTypeDef, - unknown + ListCollectibleBalancesResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - collectibleBalances: z.array( - z.union([Erc1155TokenBalance$inboundSchema, Erc721TokenBalance$inboundSchema]) - ), + nextPageToken: z.string().optional(), + collectibleBalances: z.array( + z.union([ + Erc1155TokenBalance$inboundSchema, + Erc721TokenBalance$inboundSchema, + ]), + ), }); /** @internal */ export type ListCollectibleBalancesResponse$Outbound = { - nextPageToken?: string | undefined; - collectibleBalances: Array; + nextPageToken?: string | undefined; + collectibleBalances: Array< + Erc1155TokenBalance$Outbound | Erc721TokenBalance$Outbound + >; }; /** @internal */ export const ListCollectibleBalancesResponse$outboundSchema: z.ZodType< - ListCollectibleBalancesResponse$Outbound, - z.ZodTypeDef, - ListCollectibleBalancesResponse + ListCollectibleBalancesResponse$Outbound, + z.ZodTypeDef, + ListCollectibleBalancesResponse > = z.object({ - nextPageToken: z.string().optional(), - collectibleBalances: z.array( - z.union([Erc1155TokenBalance$outboundSchema, Erc721TokenBalance$outboundSchema]) - ), + nextPageToken: z.string().optional(), + collectibleBalances: z.array( + z.union([ + Erc1155TokenBalance$outboundSchema, + Erc721TokenBalance$outboundSchema, + ]), + ), }); /** @@ -96,10 +110,10 @@ export const ListCollectibleBalancesResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListCollectibleBalancesResponse$ { - /** @deprecated use `ListCollectibleBalancesResponse$inboundSchema` instead. */ - export const inboundSchema = ListCollectibleBalancesResponse$inboundSchema; - /** @deprecated use `ListCollectibleBalancesResponse$outboundSchema` instead. */ - export const outboundSchema = ListCollectibleBalancesResponse$outboundSchema; - /** @deprecated use `ListCollectibleBalancesResponse$Outbound` instead. */ - export type Outbound = ListCollectibleBalancesResponse$Outbound; + /** @deprecated use `ListCollectibleBalancesResponse$inboundSchema` instead. */ + export const inboundSchema = ListCollectibleBalancesResponse$inboundSchema; + /** @deprecated use `ListCollectibleBalancesResponse$outboundSchema` instead. */ + export const outboundSchema = ListCollectibleBalancesResponse$outboundSchema; + /** @deprecated use `ListCollectibleBalancesResponse$Outbound` instead. */ + export type Outbound = ListCollectibleBalancesResponse$Outbound; } diff --git a/src/models/components/listcontractsresponse.ts b/src/models/components/listcontractsresponse.ts index c4de6f6..276058a 100644 --- a/src/models/components/listcontractsresponse.ts +++ b/src/models/components/listcontractsresponse.ts @@ -2,179 +2,202 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Erc1155Contract, - Erc1155Contract$inboundSchema, - Erc1155Contract$Outbound, - Erc1155Contract$outboundSchema, + Erc1155Contract, + Erc1155Contract$inboundSchema, + Erc1155Contract$Outbound, + Erc1155Contract$outboundSchema, } from "./erc1155contract.js"; import { - Erc20Contract, - Erc20Contract$inboundSchema, - Erc20Contract$Outbound, - Erc20Contract$outboundSchema, + Erc20Contract, + Erc20Contract$inboundSchema, + Erc20Contract$Outbound, + Erc20Contract$outboundSchema, } from "./erc20contract.js"; import { - Erc721Contract, - Erc721Contract$inboundSchema, - Erc721Contract$Outbound, - Erc721Contract$outboundSchema, + Erc721Contract, + Erc721Contract$inboundSchema, + Erc721Contract$Outbound, + Erc721Contract$outboundSchema, } from "./erc721contract.js"; import { - UnknownContract, - UnknownContract$inboundSchema, - UnknownContract$Outbound, - UnknownContract$outboundSchema, + UnknownContract, + UnknownContract$inboundSchema, + UnknownContract$Outbound, + UnknownContract$outboundSchema, } from "./unknowncontract.js"; -import * as z from "zod"; export type Contracts = + | (UnknownContract & { ercType: "UNKNOWN" }) + | (Erc721Contract & { ercType: "ERC-721" }) + | (Erc1155Contract & { ercType: "ERC-1155" }) + | (Erc20Contract & { ercType: "ERC-20" }); + +export type ListContractsResponse = { + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + contracts: Array< | (UnknownContract & { ercType: "UNKNOWN" }) | (Erc721Contract & { ercType: "ERC-721" }) | (Erc1155Contract & { ercType: "ERC-1155" }) - | (Erc20Contract & { ercType: "ERC-20" }); - -export type ListContractsResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - contracts: Array< - | (UnknownContract & { ercType: "UNKNOWN" }) - | (Erc721Contract & { ercType: "ERC-721" }) - | (Erc1155Contract & { ercType: "ERC-1155" }) - | (Erc20Contract & { ercType: "ERC-20" }) - >; + | (Erc20Contract & { ercType: "ERC-20" }) + >; }; /** @internal */ -export const Contracts$inboundSchema: z.ZodType = z.union([ - UnknownContract$inboundSchema.and( - z.object({ ercType: z.literal("UNKNOWN") }).transform((v) => ({ ercType: v.ercType })) - ), - Erc721Contract$inboundSchema.and( - z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ ercType: v.ercType })) - ), - Erc1155Contract$inboundSchema.and( - z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ ercType: v.ercType })) - ), - Erc20Contract$inboundSchema.and( - z.object({ ercType: z.literal("ERC-20") }).transform((v) => ({ ercType: v.ercType })) - ), +export const Contracts$inboundSchema: z.ZodType< + Contracts, + z.ZodTypeDef, + unknown +> = z.union([ + UnknownContract$inboundSchema.and( + z.object({ ercType: z.literal("UNKNOWN") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + Erc721Contract$inboundSchema.and( + z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + Erc1155Contract$inboundSchema.and( + z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + Erc20Contract$inboundSchema.and( + z.object({ ercType: z.literal("ERC-20") }).transform((v) => ({ + ercType: v.ercType, + })), + ), ]); /** @internal */ export type Contracts$Outbound = - | (UnknownContract$Outbound & { ercType: "UNKNOWN" }) - | (Erc721Contract$Outbound & { ercType: "ERC-721" }) - | (Erc1155Contract$Outbound & { ercType: "ERC-1155" }) - | (Erc20Contract$Outbound & { ercType: "ERC-20" }); + | (UnknownContract$Outbound & { ercType: "UNKNOWN" }) + | (Erc721Contract$Outbound & { ercType: "ERC-721" }) + | (Erc1155Contract$Outbound & { ercType: "ERC-1155" }) + | (Erc20Contract$Outbound & { ercType: "ERC-20" }); /** @internal */ -export const Contracts$outboundSchema: z.ZodType = - z.union([ - UnknownContract$outboundSchema.and( - z.object({ ercType: z.literal("UNKNOWN") }).transform((v) => ({ ercType: v.ercType })) - ), - Erc721Contract$outboundSchema.and( - z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ ercType: v.ercType })) - ), - Erc1155Contract$outboundSchema.and( - z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ ercType: v.ercType })) - ), - Erc20Contract$outboundSchema.and( - z.object({ ercType: z.literal("ERC-20") }).transform((v) => ({ ercType: v.ercType })) - ), - ]); +export const Contracts$outboundSchema: z.ZodType< + Contracts$Outbound, + z.ZodTypeDef, + Contracts +> = z.union([ + UnknownContract$outboundSchema.and( + z.object({ ercType: z.literal("UNKNOWN") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + Erc721Contract$outboundSchema.and( + z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + Erc1155Contract$outboundSchema.and( + z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + Erc20Contract$outboundSchema.and( + z.object({ ercType: z.literal("ERC-20") }).transform((v) => ({ + ercType: v.ercType, + })), + ), +]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Contracts$ { - /** @deprecated use `Contracts$inboundSchema` instead. */ - export const inboundSchema = Contracts$inboundSchema; - /** @deprecated use `Contracts$outboundSchema` instead. */ - export const outboundSchema = Contracts$outboundSchema; - /** @deprecated use `Contracts$Outbound` instead. */ - export type Outbound = Contracts$Outbound; + /** @deprecated use `Contracts$inboundSchema` instead. */ + export const inboundSchema = Contracts$inboundSchema; + /** @deprecated use `Contracts$outboundSchema` instead. */ + export const outboundSchema = Contracts$outboundSchema; + /** @deprecated use `Contracts$Outbound` instead. */ + export type Outbound = Contracts$Outbound; } /** @internal */ export const ListContractsResponse$inboundSchema: z.ZodType< - ListContractsResponse, - z.ZodTypeDef, - unknown + ListContractsResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - contracts: z.array( - z.union([ - UnknownContract$inboundSchema.and( - z - .object({ ercType: z.literal("UNKNOWN") }) - .transform((v) => ({ ercType: v.ercType })) - ), - Erc721Contract$inboundSchema.and( - z - .object({ ercType: z.literal("ERC-721") }) - .transform((v) => ({ ercType: v.ercType })) - ), - Erc1155Contract$inboundSchema.and( - z - .object({ ercType: z.literal("ERC-1155") }) - .transform((v) => ({ ercType: v.ercType })) - ), - Erc20Contract$inboundSchema.and( - z - .object({ ercType: z.literal("ERC-20") }) - .transform((v) => ({ ercType: v.ercType })) - ), - ]) - ), + nextPageToken: z.string().optional(), + contracts: z.array( + z.union([ + UnknownContract$inboundSchema.and( + z.object({ ercType: z.literal("UNKNOWN") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + Erc721Contract$inboundSchema.and( + z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + Erc1155Contract$inboundSchema.and( + z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + Erc20Contract$inboundSchema.and( + z.object({ ercType: z.literal("ERC-20") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + ]), + ), }); /** @internal */ export type ListContractsResponse$Outbound = { - nextPageToken?: string | undefined; - contracts: Array< - | (UnknownContract$Outbound & { ercType: "UNKNOWN" }) - | (Erc721Contract$Outbound & { ercType: "ERC-721" }) - | (Erc1155Contract$Outbound & { ercType: "ERC-1155" }) - | (Erc20Contract$Outbound & { ercType: "ERC-20" }) - >; + nextPageToken?: string | undefined; + contracts: Array< + | (UnknownContract$Outbound & { ercType: "UNKNOWN" }) + | (Erc721Contract$Outbound & { ercType: "ERC-721" }) + | (Erc1155Contract$Outbound & { ercType: "ERC-1155" }) + | (Erc20Contract$Outbound & { ercType: "ERC-20" }) + >; }; /** @internal */ export const ListContractsResponse$outboundSchema: z.ZodType< - ListContractsResponse$Outbound, - z.ZodTypeDef, - ListContractsResponse + ListContractsResponse$Outbound, + z.ZodTypeDef, + ListContractsResponse > = z.object({ - nextPageToken: z.string().optional(), - contracts: z.array( - z.union([ - UnknownContract$outboundSchema.and( - z - .object({ ercType: z.literal("UNKNOWN") }) - .transform((v) => ({ ercType: v.ercType })) - ), - Erc721Contract$outboundSchema.and( - z - .object({ ercType: z.literal("ERC-721") }) - .transform((v) => ({ ercType: v.ercType })) - ), - Erc1155Contract$outboundSchema.and( - z - .object({ ercType: z.literal("ERC-1155") }) - .transform((v) => ({ ercType: v.ercType })) - ), - Erc20Contract$outboundSchema.and( - z - .object({ ercType: z.literal("ERC-20") }) - .transform((v) => ({ ercType: v.ercType })) - ), - ]) - ), + nextPageToken: z.string().optional(), + contracts: z.array( + z.union([ + UnknownContract$outboundSchema.and( + z.object({ ercType: z.literal("UNKNOWN") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + Erc721Contract$outboundSchema.and( + z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + Erc1155Contract$outboundSchema.and( + z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + Erc20Contract$outboundSchema.and( + z.object({ ercType: z.literal("ERC-20") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + ]), + ), }); /** @@ -182,10 +205,10 @@ export const ListContractsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListContractsResponse$ { - /** @deprecated use `ListContractsResponse$inboundSchema` instead. */ - export const inboundSchema = ListContractsResponse$inboundSchema; - /** @deprecated use `ListContractsResponse$outboundSchema` instead. */ - export const outboundSchema = ListContractsResponse$outboundSchema; - /** @deprecated use `ListContractsResponse$Outbound` instead. */ - export type Outbound = ListContractsResponse$Outbound; + /** @deprecated use `ListContractsResponse$inboundSchema` instead. */ + export const inboundSchema = ListContractsResponse$inboundSchema; + /** @deprecated use `ListContractsResponse$outboundSchema` instead. */ + export const outboundSchema = ListContractsResponse$outboundSchema; + /** @deprecated use `ListContractsResponse$Outbound` instead. */ + export type Outbound = ListContractsResponse$Outbound; } diff --git a/src/models/components/listdelegatordetailsresponse.ts b/src/models/components/listdelegatordetailsresponse.ts index d1f507f..ac9f471 100644 --- a/src/models/components/listdelegatordetailsresponse.ts +++ b/src/models/components/listdelegatordetailsresponse.ts @@ -2,168 +2,175 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - ActiveDelegatorDetails, - ActiveDelegatorDetails$inboundSchema, - ActiveDelegatorDetails$Outbound, - ActiveDelegatorDetails$outboundSchema, + ActiveDelegatorDetails, + ActiveDelegatorDetails$inboundSchema, + ActiveDelegatorDetails$Outbound, + ActiveDelegatorDetails$outboundSchema, } from "./activedelegatordetails.js"; import { - CompletedDelegatorDetails, - CompletedDelegatorDetails$inboundSchema, - CompletedDelegatorDetails$Outbound, - CompletedDelegatorDetails$outboundSchema, + CompletedDelegatorDetails, + CompletedDelegatorDetails$inboundSchema, + CompletedDelegatorDetails$Outbound, + CompletedDelegatorDetails$outboundSchema, } from "./completeddelegatordetails.js"; import { - PendingDelegatorDetails, - PendingDelegatorDetails$inboundSchema, - PendingDelegatorDetails$Outbound, - PendingDelegatorDetails$outboundSchema, + PendingDelegatorDetails, + PendingDelegatorDetails$inboundSchema, + PendingDelegatorDetails$Outbound, + PendingDelegatorDetails$outboundSchema, } from "./pendingdelegatordetails.js"; -import * as z from "zod"; export type Delegators = - | (ActiveDelegatorDetails & { delegationStatus: "active" }) - | (PendingDelegatorDetails & { delegationStatus: "pending" }) - | (CompletedDelegatorDetails & { delegationStatus: "completed" }); + | (ActiveDelegatorDetails & { delegationStatus: "active" }) + | (PendingDelegatorDetails & { delegationStatus: "pending" }) + | (CompletedDelegatorDetails & { delegationStatus: "completed" }); export type ListDelegatorDetailsResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - /** - * The list of Delegator Details. - */ - delegators: Array< - | (ActiveDelegatorDetails & { delegationStatus: "active" }) - | (PendingDelegatorDetails & { delegationStatus: "pending" }) - | (CompletedDelegatorDetails & { delegationStatus: "completed" }) - >; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + /** + * The list of Delegator Details. + */ + delegators: Array< + | (ActiveDelegatorDetails & { delegationStatus: "active" }) + | (PendingDelegatorDetails & { delegationStatus: "pending" }) + | (CompletedDelegatorDetails & { delegationStatus: "completed" }) + >; }; /** @internal */ -export const Delegators$inboundSchema: z.ZodType = z.union([ - ActiveDelegatorDetails$inboundSchema.and( - z - .object({ delegationStatus: z.literal("active") }) - .transform((v) => ({ delegationStatus: v.delegationStatus })) - ), - PendingDelegatorDetails$inboundSchema.and( - z - .object({ delegationStatus: z.literal("pending") }) - .transform((v) => ({ delegationStatus: v.delegationStatus })) - ), - CompletedDelegatorDetails$inboundSchema.and( - z - .object({ delegationStatus: z.literal("completed") }) - .transform((v) => ({ delegationStatus: v.delegationStatus })) - ), +export const Delegators$inboundSchema: z.ZodType< + Delegators, + z.ZodTypeDef, + unknown +> = z.union([ + ActiveDelegatorDetails$inboundSchema.and( + z.object({ delegationStatus: z.literal("active") }).transform((v) => ({ + delegationStatus: v.delegationStatus, + })), + ), + PendingDelegatorDetails$inboundSchema.and( + z.object({ delegationStatus: z.literal("pending") }).transform((v) => ({ + delegationStatus: v.delegationStatus, + })), + ), + CompletedDelegatorDetails$inboundSchema.and( + z.object({ delegationStatus: z.literal("completed") }).transform((v) => ({ + delegationStatus: v.delegationStatus, + })), + ), ]); /** @internal */ export type Delegators$Outbound = - | (ActiveDelegatorDetails$Outbound & { delegationStatus: "active" }) - | (PendingDelegatorDetails$Outbound & { delegationStatus: "pending" }) - | (CompletedDelegatorDetails$Outbound & { delegationStatus: "completed" }); + | (ActiveDelegatorDetails$Outbound & { delegationStatus: "active" }) + | (PendingDelegatorDetails$Outbound & { delegationStatus: "pending" }) + | (CompletedDelegatorDetails$Outbound & { delegationStatus: "completed" }); /** @internal */ -export const Delegators$outboundSchema: z.ZodType = - z.union([ - ActiveDelegatorDetails$outboundSchema.and( - z - .object({ delegationStatus: z.literal("active") }) - .transform((v) => ({ delegationStatus: v.delegationStatus })) - ), - PendingDelegatorDetails$outboundSchema.and( - z - .object({ delegationStatus: z.literal("pending") }) - .transform((v) => ({ delegationStatus: v.delegationStatus })) - ), - CompletedDelegatorDetails$outboundSchema.and( - z - .object({ delegationStatus: z.literal("completed") }) - .transform((v) => ({ delegationStatus: v.delegationStatus })) - ), - ]); +export const Delegators$outboundSchema: z.ZodType< + Delegators$Outbound, + z.ZodTypeDef, + Delegators +> = z.union([ + ActiveDelegatorDetails$outboundSchema.and( + z.object({ delegationStatus: z.literal("active") }).transform((v) => ({ + delegationStatus: v.delegationStatus, + })), + ), + PendingDelegatorDetails$outboundSchema.and( + z.object({ delegationStatus: z.literal("pending") }).transform((v) => ({ + delegationStatus: v.delegationStatus, + })), + ), + CompletedDelegatorDetails$outboundSchema.and( + z.object({ delegationStatus: z.literal("completed") }).transform((v) => ({ + delegationStatus: v.delegationStatus, + })), + ), +]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Delegators$ { - /** @deprecated use `Delegators$inboundSchema` instead. */ - export const inboundSchema = Delegators$inboundSchema; - /** @deprecated use `Delegators$outboundSchema` instead. */ - export const outboundSchema = Delegators$outboundSchema; - /** @deprecated use `Delegators$Outbound` instead. */ - export type Outbound = Delegators$Outbound; + /** @deprecated use `Delegators$inboundSchema` instead. */ + export const inboundSchema = Delegators$inboundSchema; + /** @deprecated use `Delegators$outboundSchema` instead. */ + export const outboundSchema = Delegators$outboundSchema; + /** @deprecated use `Delegators$Outbound` instead. */ + export type Outbound = Delegators$Outbound; } /** @internal */ export const ListDelegatorDetailsResponse$inboundSchema: z.ZodType< - ListDelegatorDetailsResponse, - z.ZodTypeDef, - unknown + ListDelegatorDetailsResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - delegators: z.array( - z.union([ - ActiveDelegatorDetails$inboundSchema.and( - z - .object({ delegationStatus: z.literal("active") }) - .transform((v) => ({ delegationStatus: v.delegationStatus })) - ), - PendingDelegatorDetails$inboundSchema.and( - z - .object({ delegationStatus: z.literal("pending") }) - .transform((v) => ({ delegationStatus: v.delegationStatus })) - ), - CompletedDelegatorDetails$inboundSchema.and( - z - .object({ delegationStatus: z.literal("completed") }) - .transform((v) => ({ delegationStatus: v.delegationStatus })) - ), - ]) - ), + nextPageToken: z.string().optional(), + delegators: z.array( + z.union([ + ActiveDelegatorDetails$inboundSchema.and( + z.object({ delegationStatus: z.literal("active") }).transform((v) => ({ + delegationStatus: v.delegationStatus, + })), + ), + PendingDelegatorDetails$inboundSchema.and( + z.object({ delegationStatus: z.literal("pending") }).transform((v) => ({ + delegationStatus: v.delegationStatus, + })), + ), + CompletedDelegatorDetails$inboundSchema.and( + z.object({ delegationStatus: z.literal("completed") }).transform(( + v, + ) => ({ delegationStatus: v.delegationStatus })), + ), + ]), + ), }); /** @internal */ export type ListDelegatorDetailsResponse$Outbound = { - nextPageToken?: string | undefined; - delegators: Array< - | (ActiveDelegatorDetails$Outbound & { delegationStatus: "active" }) - | (PendingDelegatorDetails$Outbound & { delegationStatus: "pending" }) - | (CompletedDelegatorDetails$Outbound & { delegationStatus: "completed" }) - >; + nextPageToken?: string | undefined; + delegators: Array< + | (ActiveDelegatorDetails$Outbound & { delegationStatus: "active" }) + | (PendingDelegatorDetails$Outbound & { delegationStatus: "pending" }) + | (CompletedDelegatorDetails$Outbound & { delegationStatus: "completed" }) + >; }; /** @internal */ export const ListDelegatorDetailsResponse$outboundSchema: z.ZodType< - ListDelegatorDetailsResponse$Outbound, - z.ZodTypeDef, - ListDelegatorDetailsResponse + ListDelegatorDetailsResponse$Outbound, + z.ZodTypeDef, + ListDelegatorDetailsResponse > = z.object({ - nextPageToken: z.string().optional(), - delegators: z.array( - z.union([ - ActiveDelegatorDetails$outboundSchema.and( - z - .object({ delegationStatus: z.literal("active") }) - .transform((v) => ({ delegationStatus: v.delegationStatus })) - ), - PendingDelegatorDetails$outboundSchema.and( - z - .object({ delegationStatus: z.literal("pending") }) - .transform((v) => ({ delegationStatus: v.delegationStatus })) - ), - CompletedDelegatorDetails$outboundSchema.and( - z - .object({ delegationStatus: z.literal("completed") }) - .transform((v) => ({ delegationStatus: v.delegationStatus })) - ), - ]) - ), + nextPageToken: z.string().optional(), + delegators: z.array( + z.union([ + ActiveDelegatorDetails$outboundSchema.and( + z.object({ delegationStatus: z.literal("active") }).transform((v) => ({ + delegationStatus: v.delegationStatus, + })), + ), + PendingDelegatorDetails$outboundSchema.and( + z.object({ delegationStatus: z.literal("pending") }).transform((v) => ({ + delegationStatus: v.delegationStatus, + })), + ), + CompletedDelegatorDetails$outboundSchema.and( + z.object({ delegationStatus: z.literal("completed") }).transform(( + v, + ) => ({ delegationStatus: v.delegationStatus })), + ), + ]), + ), }); /** @@ -171,10 +178,10 @@ export const ListDelegatorDetailsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListDelegatorDetailsResponse$ { - /** @deprecated use `ListDelegatorDetailsResponse$inboundSchema` instead. */ - export const inboundSchema = ListDelegatorDetailsResponse$inboundSchema; - /** @deprecated use `ListDelegatorDetailsResponse$outboundSchema` instead. */ - export const outboundSchema = ListDelegatorDetailsResponse$outboundSchema; - /** @deprecated use `ListDelegatorDetailsResponse$Outbound` instead. */ - export type Outbound = ListDelegatorDetailsResponse$Outbound; + /** @deprecated use `ListDelegatorDetailsResponse$inboundSchema` instead. */ + export const inboundSchema = ListDelegatorDetailsResponse$inboundSchema; + /** @deprecated use `ListDelegatorDetailsResponse$outboundSchema` instead. */ + export const outboundSchema = ListDelegatorDetailsResponse$outboundSchema; + /** @deprecated use `ListDelegatorDetailsResponse$Outbound` instead. */ + export type Outbound = ListDelegatorDetailsResponse$Outbound; } diff --git a/src/models/components/listerc1155balancesresponse.ts b/src/models/components/listerc1155balancesresponse.ts index 0bbfeb7..65d1e84 100644 --- a/src/models/components/listerc1155balancesresponse.ts +++ b/src/models/components/listerc1155balancesresponse.ts @@ -2,49 +2,49 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Erc1155TokenBalance, - Erc1155TokenBalance$inboundSchema, - Erc1155TokenBalance$Outbound, - Erc1155TokenBalance$outboundSchema, + Erc1155TokenBalance, + Erc1155TokenBalance$inboundSchema, + Erc1155TokenBalance$Outbound, + Erc1155TokenBalance$outboundSchema, } from "./erc1155tokenbalance.js"; -import * as z from "zod"; export type ListErc1155BalancesResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - /** - * The list of ERC-1155 token balances for the address. - */ - erc1155TokenBalances: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + /** + * The list of ERC-1155 token balances for the address. + */ + erc1155TokenBalances: Array; }; /** @internal */ export const ListErc1155BalancesResponse$inboundSchema: z.ZodType< - ListErc1155BalancesResponse, - z.ZodTypeDef, - unknown + ListErc1155BalancesResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - erc1155TokenBalances: z.array(Erc1155TokenBalance$inboundSchema), + nextPageToken: z.string().optional(), + erc1155TokenBalances: z.array(Erc1155TokenBalance$inboundSchema), }); /** @internal */ export type ListErc1155BalancesResponse$Outbound = { - nextPageToken?: string | undefined; - erc1155TokenBalances: Array; + nextPageToken?: string | undefined; + erc1155TokenBalances: Array; }; /** @internal */ export const ListErc1155BalancesResponse$outboundSchema: z.ZodType< - ListErc1155BalancesResponse$Outbound, - z.ZodTypeDef, - ListErc1155BalancesResponse + ListErc1155BalancesResponse$Outbound, + z.ZodTypeDef, + ListErc1155BalancesResponse > = z.object({ - nextPageToken: z.string().optional(), - erc1155TokenBalances: z.array(Erc1155TokenBalance$outboundSchema), + nextPageToken: z.string().optional(), + erc1155TokenBalances: z.array(Erc1155TokenBalance$outboundSchema), }); /** @@ -52,10 +52,10 @@ export const ListErc1155BalancesResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc1155BalancesResponse$ { - /** @deprecated use `ListErc1155BalancesResponse$inboundSchema` instead. */ - export const inboundSchema = ListErc1155BalancesResponse$inboundSchema; - /** @deprecated use `ListErc1155BalancesResponse$outboundSchema` instead. */ - export const outboundSchema = ListErc1155BalancesResponse$outboundSchema; - /** @deprecated use `ListErc1155BalancesResponse$Outbound` instead. */ - export type Outbound = ListErc1155BalancesResponse$Outbound; + /** @deprecated use `ListErc1155BalancesResponse$inboundSchema` instead. */ + export const inboundSchema = ListErc1155BalancesResponse$inboundSchema; + /** @deprecated use `ListErc1155BalancesResponse$outboundSchema` instead. */ + export const outboundSchema = ListErc1155BalancesResponse$outboundSchema; + /** @deprecated use `ListErc1155BalancesResponse$Outbound` instead. */ + export type Outbound = ListErc1155BalancesResponse$Outbound; } diff --git a/src/models/components/listerc1155transactionsresponse.ts b/src/models/components/listerc1155transactionsresponse.ts index 5c689ca..5ad3628 100644 --- a/src/models/components/listerc1155transactionsresponse.ts +++ b/src/models/components/listerc1155transactionsresponse.ts @@ -2,46 +2,46 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Erc1155Transfer, - Erc1155Transfer$inboundSchema, - Erc1155Transfer$Outbound, - Erc1155Transfer$outboundSchema, + Erc1155Transfer, + Erc1155Transfer$inboundSchema, + Erc1155Transfer$Outbound, + Erc1155Transfer$outboundSchema, } from "./erc1155transfer.js"; -import * as z from "zod"; export type ListErc1155TransactionsResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - transactions: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + transactions: Array; }; /** @internal */ export const ListErc1155TransactionsResponse$inboundSchema: z.ZodType< - ListErc1155TransactionsResponse, - z.ZodTypeDef, - unknown + ListErc1155TransactionsResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - transactions: z.array(Erc1155Transfer$inboundSchema), + nextPageToken: z.string().optional(), + transactions: z.array(Erc1155Transfer$inboundSchema), }); /** @internal */ export type ListErc1155TransactionsResponse$Outbound = { - nextPageToken?: string | undefined; - transactions: Array; + nextPageToken?: string | undefined; + transactions: Array; }; /** @internal */ export const ListErc1155TransactionsResponse$outboundSchema: z.ZodType< - ListErc1155TransactionsResponse$Outbound, - z.ZodTypeDef, - ListErc1155TransactionsResponse + ListErc1155TransactionsResponse$Outbound, + z.ZodTypeDef, + ListErc1155TransactionsResponse > = z.object({ - nextPageToken: z.string().optional(), - transactions: z.array(Erc1155Transfer$outboundSchema), + nextPageToken: z.string().optional(), + transactions: z.array(Erc1155Transfer$outboundSchema), }); /** @@ -49,10 +49,10 @@ export const ListErc1155TransactionsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc1155TransactionsResponse$ { - /** @deprecated use `ListErc1155TransactionsResponse$inboundSchema` instead. */ - export const inboundSchema = ListErc1155TransactionsResponse$inboundSchema; - /** @deprecated use `ListErc1155TransactionsResponse$outboundSchema` instead. */ - export const outboundSchema = ListErc1155TransactionsResponse$outboundSchema; - /** @deprecated use `ListErc1155TransactionsResponse$Outbound` instead. */ - export type Outbound = ListErc1155TransactionsResponse$Outbound; + /** @deprecated use `ListErc1155TransactionsResponse$inboundSchema` instead. */ + export const inboundSchema = ListErc1155TransactionsResponse$inboundSchema; + /** @deprecated use `ListErc1155TransactionsResponse$outboundSchema` instead. */ + export const outboundSchema = ListErc1155TransactionsResponse$outboundSchema; + /** @deprecated use `ListErc1155TransactionsResponse$Outbound` instead. */ + export type Outbound = ListErc1155TransactionsResponse$Outbound; } diff --git a/src/models/components/listerc20balancesresponse.ts b/src/models/components/listerc20balancesresponse.ts index 4dc3ff0..8c904e7 100644 --- a/src/models/components/listerc20balancesresponse.ts +++ b/src/models/components/listerc20balancesresponse.ts @@ -2,49 +2,49 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Erc20TokenBalance, - Erc20TokenBalance$inboundSchema, - Erc20TokenBalance$Outbound, - Erc20TokenBalance$outboundSchema, + Erc20TokenBalance, + Erc20TokenBalance$inboundSchema, + Erc20TokenBalance$Outbound, + Erc20TokenBalance$outboundSchema, } from "./erc20tokenbalance.js"; -import * as z from "zod"; export type ListErc20BalancesResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - /** - * The list of ERC-20 token balances for the address. - */ - erc20TokenBalances: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + /** + * The list of ERC-20 token balances for the address. + */ + erc20TokenBalances: Array; }; /** @internal */ export const ListErc20BalancesResponse$inboundSchema: z.ZodType< - ListErc20BalancesResponse, - z.ZodTypeDef, - unknown + ListErc20BalancesResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - erc20TokenBalances: z.array(Erc20TokenBalance$inboundSchema), + nextPageToken: z.string().optional(), + erc20TokenBalances: z.array(Erc20TokenBalance$inboundSchema), }); /** @internal */ export type ListErc20BalancesResponse$Outbound = { - nextPageToken?: string | undefined; - erc20TokenBalances: Array; + nextPageToken?: string | undefined; + erc20TokenBalances: Array; }; /** @internal */ export const ListErc20BalancesResponse$outboundSchema: z.ZodType< - ListErc20BalancesResponse$Outbound, - z.ZodTypeDef, - ListErc20BalancesResponse + ListErc20BalancesResponse$Outbound, + z.ZodTypeDef, + ListErc20BalancesResponse > = z.object({ - nextPageToken: z.string().optional(), - erc20TokenBalances: z.array(Erc20TokenBalance$outboundSchema), + nextPageToken: z.string().optional(), + erc20TokenBalances: z.array(Erc20TokenBalance$outboundSchema), }); /** @@ -52,10 +52,10 @@ export const ListErc20BalancesResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc20BalancesResponse$ { - /** @deprecated use `ListErc20BalancesResponse$inboundSchema` instead. */ - export const inboundSchema = ListErc20BalancesResponse$inboundSchema; - /** @deprecated use `ListErc20BalancesResponse$outboundSchema` instead. */ - export const outboundSchema = ListErc20BalancesResponse$outboundSchema; - /** @deprecated use `ListErc20BalancesResponse$Outbound` instead. */ - export type Outbound = ListErc20BalancesResponse$Outbound; + /** @deprecated use `ListErc20BalancesResponse$inboundSchema` instead. */ + export const inboundSchema = ListErc20BalancesResponse$inboundSchema; + /** @deprecated use `ListErc20BalancesResponse$outboundSchema` instead. */ + export const outboundSchema = ListErc20BalancesResponse$outboundSchema; + /** @deprecated use `ListErc20BalancesResponse$Outbound` instead. */ + export type Outbound = ListErc20BalancesResponse$Outbound; } diff --git a/src/models/components/listerc20transactionsresponse.ts b/src/models/components/listerc20transactionsresponse.ts index 0ed425e..f797e10 100644 --- a/src/models/components/listerc20transactionsresponse.ts +++ b/src/models/components/listerc20transactionsresponse.ts @@ -2,46 +2,46 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Erc20Transfer, - Erc20Transfer$inboundSchema, - Erc20Transfer$Outbound, - Erc20Transfer$outboundSchema, + Erc20Transfer, + Erc20Transfer$inboundSchema, + Erc20Transfer$Outbound, + Erc20Transfer$outboundSchema, } from "./erc20transfer.js"; -import * as z from "zod"; export type ListErc20TransactionsResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - transactions: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + transactions: Array; }; /** @internal */ export const ListErc20TransactionsResponse$inboundSchema: z.ZodType< - ListErc20TransactionsResponse, - z.ZodTypeDef, - unknown + ListErc20TransactionsResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - transactions: z.array(Erc20Transfer$inboundSchema), + nextPageToken: z.string().optional(), + transactions: z.array(Erc20Transfer$inboundSchema), }); /** @internal */ export type ListErc20TransactionsResponse$Outbound = { - nextPageToken?: string | undefined; - transactions: Array; + nextPageToken?: string | undefined; + transactions: Array; }; /** @internal */ export const ListErc20TransactionsResponse$outboundSchema: z.ZodType< - ListErc20TransactionsResponse$Outbound, - z.ZodTypeDef, - ListErc20TransactionsResponse + ListErc20TransactionsResponse$Outbound, + z.ZodTypeDef, + ListErc20TransactionsResponse > = z.object({ - nextPageToken: z.string().optional(), - transactions: z.array(Erc20Transfer$outboundSchema), + nextPageToken: z.string().optional(), + transactions: z.array(Erc20Transfer$outboundSchema), }); /** @@ -49,10 +49,10 @@ export const ListErc20TransactionsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc20TransactionsResponse$ { - /** @deprecated use `ListErc20TransactionsResponse$inboundSchema` instead. */ - export const inboundSchema = ListErc20TransactionsResponse$inboundSchema; - /** @deprecated use `ListErc20TransactionsResponse$outboundSchema` instead. */ - export const outboundSchema = ListErc20TransactionsResponse$outboundSchema; - /** @deprecated use `ListErc20TransactionsResponse$Outbound` instead. */ - export type Outbound = ListErc20TransactionsResponse$Outbound; + /** @deprecated use `ListErc20TransactionsResponse$inboundSchema` instead. */ + export const inboundSchema = ListErc20TransactionsResponse$inboundSchema; + /** @deprecated use `ListErc20TransactionsResponse$outboundSchema` instead. */ + export const outboundSchema = ListErc20TransactionsResponse$outboundSchema; + /** @deprecated use `ListErc20TransactionsResponse$Outbound` instead. */ + export type Outbound = ListErc20TransactionsResponse$Outbound; } diff --git a/src/models/components/listerc721balancesresponse.ts b/src/models/components/listerc721balancesresponse.ts index 52c76c1..e3d4fe3 100644 --- a/src/models/components/listerc721balancesresponse.ts +++ b/src/models/components/listerc721balancesresponse.ts @@ -2,49 +2,49 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Erc721TokenBalance, - Erc721TokenBalance$inboundSchema, - Erc721TokenBalance$Outbound, - Erc721TokenBalance$outboundSchema, + Erc721TokenBalance, + Erc721TokenBalance$inboundSchema, + Erc721TokenBalance$Outbound, + Erc721TokenBalance$outboundSchema, } from "./erc721tokenbalance.js"; -import * as z from "zod"; export type ListErc721BalancesResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - /** - * The list of ERC-721 token balances for the address. - */ - erc721TokenBalances: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + /** + * The list of ERC-721 token balances for the address. + */ + erc721TokenBalances: Array; }; /** @internal */ export const ListErc721BalancesResponse$inboundSchema: z.ZodType< - ListErc721BalancesResponse, - z.ZodTypeDef, - unknown + ListErc721BalancesResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - erc721TokenBalances: z.array(Erc721TokenBalance$inboundSchema), + nextPageToken: z.string().optional(), + erc721TokenBalances: z.array(Erc721TokenBalance$inboundSchema), }); /** @internal */ export type ListErc721BalancesResponse$Outbound = { - nextPageToken?: string | undefined; - erc721TokenBalances: Array; + nextPageToken?: string | undefined; + erc721TokenBalances: Array; }; /** @internal */ export const ListErc721BalancesResponse$outboundSchema: z.ZodType< - ListErc721BalancesResponse$Outbound, - z.ZodTypeDef, - ListErc721BalancesResponse + ListErc721BalancesResponse$Outbound, + z.ZodTypeDef, + ListErc721BalancesResponse > = z.object({ - nextPageToken: z.string().optional(), - erc721TokenBalances: z.array(Erc721TokenBalance$outboundSchema), + nextPageToken: z.string().optional(), + erc721TokenBalances: z.array(Erc721TokenBalance$outboundSchema), }); /** @@ -52,10 +52,10 @@ export const ListErc721BalancesResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc721BalancesResponse$ { - /** @deprecated use `ListErc721BalancesResponse$inboundSchema` instead. */ - export const inboundSchema = ListErc721BalancesResponse$inboundSchema; - /** @deprecated use `ListErc721BalancesResponse$outboundSchema` instead. */ - export const outboundSchema = ListErc721BalancesResponse$outboundSchema; - /** @deprecated use `ListErc721BalancesResponse$Outbound` instead. */ - export type Outbound = ListErc721BalancesResponse$Outbound; + /** @deprecated use `ListErc721BalancesResponse$inboundSchema` instead. */ + export const inboundSchema = ListErc721BalancesResponse$inboundSchema; + /** @deprecated use `ListErc721BalancesResponse$outboundSchema` instead. */ + export const outboundSchema = ListErc721BalancesResponse$outboundSchema; + /** @deprecated use `ListErc721BalancesResponse$Outbound` instead. */ + export type Outbound = ListErc721BalancesResponse$Outbound; } diff --git a/src/models/components/listerc721transactionsresponse.ts b/src/models/components/listerc721transactionsresponse.ts index 45e6423..19ef60f 100644 --- a/src/models/components/listerc721transactionsresponse.ts +++ b/src/models/components/listerc721transactionsresponse.ts @@ -2,46 +2,46 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Erc721Transfer, - Erc721Transfer$inboundSchema, - Erc721Transfer$Outbound, - Erc721Transfer$outboundSchema, + Erc721Transfer, + Erc721Transfer$inboundSchema, + Erc721Transfer$Outbound, + Erc721Transfer$outboundSchema, } from "./erc721transfer.js"; -import * as z from "zod"; export type ListErc721TransactionsResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - transactions: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + transactions: Array; }; /** @internal */ export const ListErc721TransactionsResponse$inboundSchema: z.ZodType< - ListErc721TransactionsResponse, - z.ZodTypeDef, - unknown + ListErc721TransactionsResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - transactions: z.array(Erc721Transfer$inboundSchema), + nextPageToken: z.string().optional(), + transactions: z.array(Erc721Transfer$inboundSchema), }); /** @internal */ export type ListErc721TransactionsResponse$Outbound = { - nextPageToken?: string | undefined; - transactions: Array; + nextPageToken?: string | undefined; + transactions: Array; }; /** @internal */ export const ListErc721TransactionsResponse$outboundSchema: z.ZodType< - ListErc721TransactionsResponse$Outbound, - z.ZodTypeDef, - ListErc721TransactionsResponse + ListErc721TransactionsResponse$Outbound, + z.ZodTypeDef, + ListErc721TransactionsResponse > = z.object({ - nextPageToken: z.string().optional(), - transactions: z.array(Erc721Transfer$outboundSchema), + nextPageToken: z.string().optional(), + transactions: z.array(Erc721Transfer$outboundSchema), }); /** @@ -49,10 +49,10 @@ export const ListErc721TransactionsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc721TransactionsResponse$ { - /** @deprecated use `ListErc721TransactionsResponse$inboundSchema` instead. */ - export const inboundSchema = ListErc721TransactionsResponse$inboundSchema; - /** @deprecated use `ListErc721TransactionsResponse$outboundSchema` instead. */ - export const outboundSchema = ListErc721TransactionsResponse$outboundSchema; - /** @deprecated use `ListErc721TransactionsResponse$Outbound` instead. */ - export type Outbound = ListErc721TransactionsResponse$Outbound; + /** @deprecated use `ListErc721TransactionsResponse$inboundSchema` instead. */ + export const inboundSchema = ListErc721TransactionsResponse$inboundSchema; + /** @deprecated use `ListErc721TransactionsResponse$outboundSchema` instead. */ + export const outboundSchema = ListErc721TransactionsResponse$outboundSchema; + /** @deprecated use `ListErc721TransactionsResponse$Outbound` instead. */ + export type Outbound = ListErc721TransactionsResponse$Outbound; } diff --git a/src/models/components/listevmblocksresponse.ts b/src/models/components/listevmblocksresponse.ts index 9bc10b6..e50ad0a 100644 --- a/src/models/components/listevmblocksresponse.ts +++ b/src/models/components/listevmblocksresponse.ts @@ -2,46 +2,46 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - EvmBlock, - EvmBlock$inboundSchema, - EvmBlock$Outbound, - EvmBlock$outboundSchema, + EvmBlock, + EvmBlock$inboundSchema, + EvmBlock$Outbound, + EvmBlock$outboundSchema, } from "./evmblock.js"; -import * as z from "zod"; export type ListEvmBlocksResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - blocks: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + blocks: Array; }; /** @internal */ export const ListEvmBlocksResponse$inboundSchema: z.ZodType< - ListEvmBlocksResponse, - z.ZodTypeDef, - unknown + ListEvmBlocksResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - blocks: z.array(EvmBlock$inboundSchema), + nextPageToken: z.string().optional(), + blocks: z.array(EvmBlock$inboundSchema), }); /** @internal */ export type ListEvmBlocksResponse$Outbound = { - nextPageToken?: string | undefined; - blocks: Array; + nextPageToken?: string | undefined; + blocks: Array; }; /** @internal */ export const ListEvmBlocksResponse$outboundSchema: z.ZodType< - ListEvmBlocksResponse$Outbound, - z.ZodTypeDef, - ListEvmBlocksResponse + ListEvmBlocksResponse$Outbound, + z.ZodTypeDef, + ListEvmBlocksResponse > = z.object({ - nextPageToken: z.string().optional(), - blocks: z.array(EvmBlock$outboundSchema), + nextPageToken: z.string().optional(), + blocks: z.array(EvmBlock$outboundSchema), }); /** @@ -49,10 +49,10 @@ export const ListEvmBlocksResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListEvmBlocksResponse$ { - /** @deprecated use `ListEvmBlocksResponse$inboundSchema` instead. */ - export const inboundSchema = ListEvmBlocksResponse$inboundSchema; - /** @deprecated use `ListEvmBlocksResponse$outboundSchema` instead. */ - export const outboundSchema = ListEvmBlocksResponse$outboundSchema; - /** @deprecated use `ListEvmBlocksResponse$Outbound` instead. */ - export type Outbound = ListEvmBlocksResponse$Outbound; + /** @deprecated use `ListEvmBlocksResponse$inboundSchema` instead. */ + export const inboundSchema = ListEvmBlocksResponse$inboundSchema; + /** @deprecated use `ListEvmBlocksResponse$outboundSchema` instead. */ + export const outboundSchema = ListEvmBlocksResponse$outboundSchema; + /** @deprecated use `ListEvmBlocksResponse$Outbound` instead. */ + export type Outbound = ListEvmBlocksResponse$Outbound; } diff --git a/src/models/components/listhistoricalrewardsresponse.ts b/src/models/components/listhistoricalrewardsresponse.ts index e3de357..7e7f20f 100644 --- a/src/models/components/listhistoricalrewardsresponse.ts +++ b/src/models/components/listhistoricalrewardsresponse.ts @@ -2,46 +2,46 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - HistoricalReward, - HistoricalReward$inboundSchema, - HistoricalReward$Outbound, - HistoricalReward$outboundSchema, + HistoricalReward, + HistoricalReward$inboundSchema, + HistoricalReward$Outbound, + HistoricalReward$outboundSchema, } from "./historicalreward.js"; -import * as z from "zod"; export type ListHistoricalRewardsResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - historicalRewards: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + historicalRewards: Array; }; /** @internal */ export const ListHistoricalRewardsResponse$inboundSchema: z.ZodType< - ListHistoricalRewardsResponse, - z.ZodTypeDef, - unknown + ListHistoricalRewardsResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - historicalRewards: z.array(HistoricalReward$inboundSchema), + nextPageToken: z.string().optional(), + historicalRewards: z.array(HistoricalReward$inboundSchema), }); /** @internal */ export type ListHistoricalRewardsResponse$Outbound = { - nextPageToken?: string | undefined; - historicalRewards: Array; + nextPageToken?: string | undefined; + historicalRewards: Array; }; /** @internal */ export const ListHistoricalRewardsResponse$outboundSchema: z.ZodType< - ListHistoricalRewardsResponse$Outbound, - z.ZodTypeDef, - ListHistoricalRewardsResponse + ListHistoricalRewardsResponse$Outbound, + z.ZodTypeDef, + ListHistoricalRewardsResponse > = z.object({ - nextPageToken: z.string().optional(), - historicalRewards: z.array(HistoricalReward$outboundSchema), + nextPageToken: z.string().optional(), + historicalRewards: z.array(HistoricalReward$outboundSchema), }); /** @@ -49,10 +49,10 @@ export const ListHistoricalRewardsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListHistoricalRewardsResponse$ { - /** @deprecated use `ListHistoricalRewardsResponse$inboundSchema` instead. */ - export const inboundSchema = ListHistoricalRewardsResponse$inboundSchema; - /** @deprecated use `ListHistoricalRewardsResponse$outboundSchema` instead. */ - export const outboundSchema = ListHistoricalRewardsResponse$outboundSchema; - /** @deprecated use `ListHistoricalRewardsResponse$Outbound` instead. */ - export type Outbound = ListHistoricalRewardsResponse$Outbound; + /** @deprecated use `ListHistoricalRewardsResponse$inboundSchema` instead. */ + export const inboundSchema = ListHistoricalRewardsResponse$inboundSchema; + /** @deprecated use `ListHistoricalRewardsResponse$outboundSchema` instead. */ + export const outboundSchema = ListHistoricalRewardsResponse$outboundSchema; + /** @deprecated use `ListHistoricalRewardsResponse$Outbound` instead. */ + export type Outbound = ListHistoricalRewardsResponse$Outbound; } diff --git a/src/models/components/listinternaltransactionsresponse.ts b/src/models/components/listinternaltransactionsresponse.ts index 9626f37..a91d737 100644 --- a/src/models/components/listinternaltransactionsresponse.ts +++ b/src/models/components/listinternaltransactionsresponse.ts @@ -2,46 +2,46 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - InternalTransaction, - InternalTransaction$inboundSchema, - InternalTransaction$Outbound, - InternalTransaction$outboundSchema, + InternalTransaction, + InternalTransaction$inboundSchema, + InternalTransaction$Outbound, + InternalTransaction$outboundSchema, } from "./internaltransaction.js"; -import * as z from "zod"; export type ListInternalTransactionsResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - transactions: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + transactions: Array; }; /** @internal */ export const ListInternalTransactionsResponse$inboundSchema: z.ZodType< - ListInternalTransactionsResponse, - z.ZodTypeDef, - unknown + ListInternalTransactionsResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - transactions: z.array(InternalTransaction$inboundSchema), + nextPageToken: z.string().optional(), + transactions: z.array(InternalTransaction$inboundSchema), }); /** @internal */ export type ListInternalTransactionsResponse$Outbound = { - nextPageToken?: string | undefined; - transactions: Array; + nextPageToken?: string | undefined; + transactions: Array; }; /** @internal */ export const ListInternalTransactionsResponse$outboundSchema: z.ZodType< - ListInternalTransactionsResponse$Outbound, - z.ZodTypeDef, - ListInternalTransactionsResponse + ListInternalTransactionsResponse$Outbound, + z.ZodTypeDef, + ListInternalTransactionsResponse > = z.object({ - nextPageToken: z.string().optional(), - transactions: z.array(InternalTransaction$outboundSchema), + nextPageToken: z.string().optional(), + transactions: z.array(InternalTransaction$outboundSchema), }); /** @@ -49,10 +49,10 @@ export const ListInternalTransactionsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListInternalTransactionsResponse$ { - /** @deprecated use `ListInternalTransactionsResponse$inboundSchema` instead. */ - export const inboundSchema = ListInternalTransactionsResponse$inboundSchema; - /** @deprecated use `ListInternalTransactionsResponse$outboundSchema` instead. */ - export const outboundSchema = ListInternalTransactionsResponse$outboundSchema; - /** @deprecated use `ListInternalTransactionsResponse$Outbound` instead. */ - export type Outbound = ListInternalTransactionsResponse$Outbound; + /** @deprecated use `ListInternalTransactionsResponse$inboundSchema` instead. */ + export const inboundSchema = ListInternalTransactionsResponse$inboundSchema; + /** @deprecated use `ListInternalTransactionsResponse$outboundSchema` instead. */ + export const outboundSchema = ListInternalTransactionsResponse$outboundSchema; + /** @deprecated use `ListInternalTransactionsResponse$Outbound` instead. */ + export type Outbound = ListInternalTransactionsResponse$Outbound; } diff --git a/src/models/components/listnativetransactionsresponse.ts b/src/models/components/listnativetransactionsresponse.ts index cfcdccf..02191be 100644 --- a/src/models/components/listnativetransactionsresponse.ts +++ b/src/models/components/listnativetransactionsresponse.ts @@ -2,46 +2,46 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - NativeTransaction, - NativeTransaction$inboundSchema, - NativeTransaction$Outbound, - NativeTransaction$outboundSchema, + NativeTransaction, + NativeTransaction$inboundSchema, + NativeTransaction$Outbound, + NativeTransaction$outboundSchema, } from "./nativetransaction.js"; -import * as z from "zod"; export type ListNativeTransactionsResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - transactions: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + transactions: Array; }; /** @internal */ export const ListNativeTransactionsResponse$inboundSchema: z.ZodType< - ListNativeTransactionsResponse, - z.ZodTypeDef, - unknown + ListNativeTransactionsResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - transactions: z.array(NativeTransaction$inboundSchema), + nextPageToken: z.string().optional(), + transactions: z.array(NativeTransaction$inboundSchema), }); /** @internal */ export type ListNativeTransactionsResponse$Outbound = { - nextPageToken?: string | undefined; - transactions: Array; + nextPageToken?: string | undefined; + transactions: Array; }; /** @internal */ export const ListNativeTransactionsResponse$outboundSchema: z.ZodType< - ListNativeTransactionsResponse$Outbound, - z.ZodTypeDef, - ListNativeTransactionsResponse + ListNativeTransactionsResponse$Outbound, + z.ZodTypeDef, + ListNativeTransactionsResponse > = z.object({ - nextPageToken: z.string().optional(), - transactions: z.array(NativeTransaction$outboundSchema), + nextPageToken: z.string().optional(), + transactions: z.array(NativeTransaction$outboundSchema), }); /** @@ -49,10 +49,10 @@ export const ListNativeTransactionsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListNativeTransactionsResponse$ { - /** @deprecated use `ListNativeTransactionsResponse$inboundSchema` instead. */ - export const inboundSchema = ListNativeTransactionsResponse$inboundSchema; - /** @deprecated use `ListNativeTransactionsResponse$outboundSchema` instead. */ - export const outboundSchema = ListNativeTransactionsResponse$outboundSchema; - /** @deprecated use `ListNativeTransactionsResponse$Outbound` instead. */ - export type Outbound = ListNativeTransactionsResponse$Outbound; + /** @deprecated use `ListNativeTransactionsResponse$inboundSchema` instead. */ + export const inboundSchema = ListNativeTransactionsResponse$inboundSchema; + /** @deprecated use `ListNativeTransactionsResponse$outboundSchema` instead. */ + export const outboundSchema = ListNativeTransactionsResponse$outboundSchema; + /** @deprecated use `ListNativeTransactionsResponse$Outbound` instead. */ + export type Outbound = ListNativeTransactionsResponse$Outbound; } diff --git a/src/models/components/listnfttokens.ts b/src/models/components/listnfttokens.ts index 077abb6..552fb95 100644 --- a/src/models/components/listnfttokens.ts +++ b/src/models/components/listnfttokens.ts @@ -2,79 +2,85 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Erc1155Token, - Erc1155Token$inboundSchema, - Erc1155Token$Outbound, - Erc1155Token$outboundSchema, + Erc1155Token, + Erc1155Token$inboundSchema, + Erc1155Token$Outbound, + Erc1155Token$outboundSchema, } from "./erc1155token.js"; import { - Erc721Token, - Erc721Token$inboundSchema, - Erc721Token$Outbound, - Erc721Token$outboundSchema, + Erc721Token, + Erc721Token$inboundSchema, + Erc721Token$Outbound, + Erc721Token$outboundSchema, } from "./erc721token.js"; -import * as z from "zod"; export type Tokens = Erc1155Token | Erc721Token; export type ListNftTokens = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - tokens: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + tokens: Array; }; /** @internal */ -export const Tokens$inboundSchema: z.ZodType = z.union([ - Erc1155Token$inboundSchema, - Erc721Token$inboundSchema, -]); +export const Tokens$inboundSchema: z.ZodType = z + .union([Erc1155Token$inboundSchema, Erc721Token$inboundSchema]); /** @internal */ export type Tokens$Outbound = Erc1155Token$Outbound | Erc721Token$Outbound; /** @internal */ -export const Tokens$outboundSchema: z.ZodType = z.union([ - Erc1155Token$outboundSchema, - Erc721Token$outboundSchema, -]); +export const Tokens$outboundSchema: z.ZodType< + Tokens$Outbound, + z.ZodTypeDef, + Tokens +> = z.union([Erc1155Token$outboundSchema, Erc721Token$outboundSchema]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Tokens$ { - /** @deprecated use `Tokens$inboundSchema` instead. */ - export const inboundSchema = Tokens$inboundSchema; - /** @deprecated use `Tokens$outboundSchema` instead. */ - export const outboundSchema = Tokens$outboundSchema; - /** @deprecated use `Tokens$Outbound` instead. */ - export type Outbound = Tokens$Outbound; + /** @deprecated use `Tokens$inboundSchema` instead. */ + export const inboundSchema = Tokens$inboundSchema; + /** @deprecated use `Tokens$outboundSchema` instead. */ + export const outboundSchema = Tokens$outboundSchema; + /** @deprecated use `Tokens$Outbound` instead. */ + export type Outbound = Tokens$Outbound; } /** @internal */ -export const ListNftTokens$inboundSchema: z.ZodType = - z.object({ - nextPageToken: z.string().optional(), - tokens: z.array(z.union([Erc1155Token$inboundSchema, Erc721Token$inboundSchema])), - }); +export const ListNftTokens$inboundSchema: z.ZodType< + ListNftTokens, + z.ZodTypeDef, + unknown +> = z.object({ + nextPageToken: z.string().optional(), + tokens: z.array( + z.union([Erc1155Token$inboundSchema, Erc721Token$inboundSchema]), + ), +}); /** @internal */ export type ListNftTokens$Outbound = { - nextPageToken?: string | undefined; - tokens: Array; + nextPageToken?: string | undefined; + tokens: Array; }; /** @internal */ export const ListNftTokens$outboundSchema: z.ZodType< - ListNftTokens$Outbound, - z.ZodTypeDef, - ListNftTokens + ListNftTokens$Outbound, + z.ZodTypeDef, + ListNftTokens > = z.object({ - nextPageToken: z.string().optional(), - tokens: z.array(z.union([Erc1155Token$outboundSchema, Erc721Token$outboundSchema])), + nextPageToken: z.string().optional(), + tokens: z.array( + z.union([Erc1155Token$outboundSchema, Erc721Token$outboundSchema]), + ), }); /** @@ -82,10 +88,10 @@ export const ListNftTokens$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListNftTokens$ { - /** @deprecated use `ListNftTokens$inboundSchema` instead. */ - export const inboundSchema = ListNftTokens$inboundSchema; - /** @deprecated use `ListNftTokens$outboundSchema` instead. */ - export const outboundSchema = ListNftTokens$outboundSchema; - /** @deprecated use `ListNftTokens$Outbound` instead. */ - export type Outbound = ListNftTokens$Outbound; + /** @deprecated use `ListNftTokens$inboundSchema` instead. */ + export const inboundSchema = ListNftTokens$inboundSchema; + /** @deprecated use `ListNftTokens$outboundSchema` instead. */ + export const outboundSchema = ListNftTokens$outboundSchema; + /** @deprecated use `ListNftTokens$Outbound` instead. */ + export type Outbound = ListNftTokens$Outbound; } diff --git a/src/models/components/listpchainbalancesresponse.ts b/src/models/components/listpchainbalancesresponse.ts index 793f2fb..de9e72b 100644 --- a/src/models/components/listpchainbalancesresponse.ts +++ b/src/models/components/listpchainbalancesresponse.ts @@ -2,49 +2,49 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PChainBalance, - PChainBalance$inboundSchema, - PChainBalance$Outbound, - PChainBalance$outboundSchema, + PChainBalance, + PChainBalance$inboundSchema, + PChainBalance$Outbound, + PChainBalance$outboundSchema, } from "./pchainbalance.js"; import { - PrimaryNetworkChainInfo, - PrimaryNetworkChainInfo$inboundSchema, - PrimaryNetworkChainInfo$Outbound, - PrimaryNetworkChainInfo$outboundSchema, + PrimaryNetworkChainInfo, + PrimaryNetworkChainInfo$inboundSchema, + PrimaryNetworkChainInfo$Outbound, + PrimaryNetworkChainInfo$outboundSchema, } from "./primarynetworkchaininfo.js"; -import * as z from "zod"; export type ListPChainBalancesResponse = { - balances: PChainBalance; - chainInfo: PrimaryNetworkChainInfo; + balances: PChainBalance; + chainInfo: PrimaryNetworkChainInfo; }; /** @internal */ export const ListPChainBalancesResponse$inboundSchema: z.ZodType< - ListPChainBalancesResponse, - z.ZodTypeDef, - unknown + ListPChainBalancesResponse, + z.ZodTypeDef, + unknown > = z.object({ - balances: PChainBalance$inboundSchema, - chainInfo: PrimaryNetworkChainInfo$inboundSchema, + balances: PChainBalance$inboundSchema, + chainInfo: PrimaryNetworkChainInfo$inboundSchema, }); /** @internal */ export type ListPChainBalancesResponse$Outbound = { - balances: PChainBalance$Outbound; - chainInfo: PrimaryNetworkChainInfo$Outbound; + balances: PChainBalance$Outbound; + chainInfo: PrimaryNetworkChainInfo$Outbound; }; /** @internal */ export const ListPChainBalancesResponse$outboundSchema: z.ZodType< - ListPChainBalancesResponse$Outbound, - z.ZodTypeDef, - ListPChainBalancesResponse + ListPChainBalancesResponse$Outbound, + z.ZodTypeDef, + ListPChainBalancesResponse > = z.object({ - balances: PChainBalance$outboundSchema, - chainInfo: PrimaryNetworkChainInfo$outboundSchema, + balances: PChainBalance$outboundSchema, + chainInfo: PrimaryNetworkChainInfo$outboundSchema, }); /** @@ -52,10 +52,10 @@ export const ListPChainBalancesResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPChainBalancesResponse$ { - /** @deprecated use `ListPChainBalancesResponse$inboundSchema` instead. */ - export const inboundSchema = ListPChainBalancesResponse$inboundSchema; - /** @deprecated use `ListPChainBalancesResponse$outboundSchema` instead. */ - export const outboundSchema = ListPChainBalancesResponse$outboundSchema; - /** @deprecated use `ListPChainBalancesResponse$Outbound` instead. */ - export type Outbound = ListPChainBalancesResponse$Outbound; + /** @deprecated use `ListPChainBalancesResponse$inboundSchema` instead. */ + export const inboundSchema = ListPChainBalancesResponse$inboundSchema; + /** @deprecated use `ListPChainBalancesResponse$outboundSchema` instead. */ + export const outboundSchema = ListPChainBalancesResponse$outboundSchema; + /** @deprecated use `ListPChainBalancesResponse$Outbound` instead. */ + export type Outbound = ListPChainBalancesResponse$Outbound; } diff --git a/src/models/components/listpchaintransactionsresponse.ts b/src/models/components/listpchaintransactionsresponse.ts index 178a104..7c41078 100644 --- a/src/models/components/listpchaintransactionsresponse.ts +++ b/src/models/components/listpchaintransactionsresponse.ts @@ -2,56 +2,56 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PChainTransaction, - PChainTransaction$inboundSchema, - PChainTransaction$Outbound, - PChainTransaction$outboundSchema, + PChainTransaction, + PChainTransaction$inboundSchema, + PChainTransaction$Outbound, + PChainTransaction$outboundSchema, } from "./pchaintransaction.js"; import { - PrimaryNetworkChainInfo, - PrimaryNetworkChainInfo$inboundSchema, - PrimaryNetworkChainInfo$Outbound, - PrimaryNetworkChainInfo$outboundSchema, + PrimaryNetworkChainInfo, + PrimaryNetworkChainInfo$inboundSchema, + PrimaryNetworkChainInfo$Outbound, + PrimaryNetworkChainInfo$outboundSchema, } from "./primarynetworkchaininfo.js"; -import * as z from "zod"; export type ListPChainTransactionsResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - transactions: Array; - chainInfo: PrimaryNetworkChainInfo; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + transactions: Array; + chainInfo: PrimaryNetworkChainInfo; }; /** @internal */ export const ListPChainTransactionsResponse$inboundSchema: z.ZodType< - ListPChainTransactionsResponse, - z.ZodTypeDef, - unknown + ListPChainTransactionsResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - transactions: z.array(PChainTransaction$inboundSchema), - chainInfo: PrimaryNetworkChainInfo$inboundSchema, + nextPageToken: z.string().optional(), + transactions: z.array(PChainTransaction$inboundSchema), + chainInfo: PrimaryNetworkChainInfo$inboundSchema, }); /** @internal */ export type ListPChainTransactionsResponse$Outbound = { - nextPageToken?: string | undefined; - transactions: Array; - chainInfo: PrimaryNetworkChainInfo$Outbound; + nextPageToken?: string | undefined; + transactions: Array; + chainInfo: PrimaryNetworkChainInfo$Outbound; }; /** @internal */ export const ListPChainTransactionsResponse$outboundSchema: z.ZodType< - ListPChainTransactionsResponse$Outbound, - z.ZodTypeDef, - ListPChainTransactionsResponse + ListPChainTransactionsResponse$Outbound, + z.ZodTypeDef, + ListPChainTransactionsResponse > = z.object({ - nextPageToken: z.string().optional(), - transactions: z.array(PChainTransaction$outboundSchema), - chainInfo: PrimaryNetworkChainInfo$outboundSchema, + nextPageToken: z.string().optional(), + transactions: z.array(PChainTransaction$outboundSchema), + chainInfo: PrimaryNetworkChainInfo$outboundSchema, }); /** @@ -59,10 +59,10 @@ export const ListPChainTransactionsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPChainTransactionsResponse$ { - /** @deprecated use `ListPChainTransactionsResponse$inboundSchema` instead. */ - export const inboundSchema = ListPChainTransactionsResponse$inboundSchema; - /** @deprecated use `ListPChainTransactionsResponse$outboundSchema` instead. */ - export const outboundSchema = ListPChainTransactionsResponse$outboundSchema; - /** @deprecated use `ListPChainTransactionsResponse$Outbound` instead. */ - export type Outbound = ListPChainTransactionsResponse$Outbound; + /** @deprecated use `ListPChainTransactionsResponse$inboundSchema` instead. */ + export const inboundSchema = ListPChainTransactionsResponse$inboundSchema; + /** @deprecated use `ListPChainTransactionsResponse$outboundSchema` instead. */ + export const outboundSchema = ListPChainTransactionsResponse$outboundSchema; + /** @deprecated use `ListPChainTransactionsResponse$Outbound` instead. */ + export type Outbound = ListPChainTransactionsResponse$Outbound; } diff --git a/src/models/components/listpchainutxosresponse.ts b/src/models/components/listpchainutxosresponse.ts index e535234..2993664 100644 --- a/src/models/components/listpchainutxosresponse.ts +++ b/src/models/components/listpchainutxosresponse.ts @@ -2,56 +2,56 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PChainUtxo, - PChainUtxo$inboundSchema, - PChainUtxo$Outbound, - PChainUtxo$outboundSchema, + PChainUtxo, + PChainUtxo$inboundSchema, + PChainUtxo$Outbound, + PChainUtxo$outboundSchema, } from "./pchainutxo.js"; import { - PrimaryNetworkChainInfo, - PrimaryNetworkChainInfo$inboundSchema, - PrimaryNetworkChainInfo$Outbound, - PrimaryNetworkChainInfo$outboundSchema, + PrimaryNetworkChainInfo, + PrimaryNetworkChainInfo$inboundSchema, + PrimaryNetworkChainInfo$Outbound, + PrimaryNetworkChainInfo$outboundSchema, } from "./primarynetworkchaininfo.js"; -import * as z from "zod"; export type ListPChainUtxosResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - utxos: Array; - chainInfo: PrimaryNetworkChainInfo; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + utxos: Array; + chainInfo: PrimaryNetworkChainInfo; }; /** @internal */ export const ListPChainUtxosResponse$inboundSchema: z.ZodType< - ListPChainUtxosResponse, - z.ZodTypeDef, - unknown + ListPChainUtxosResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - utxos: z.array(PChainUtxo$inboundSchema), - chainInfo: PrimaryNetworkChainInfo$inboundSchema, + nextPageToken: z.string().optional(), + utxos: z.array(PChainUtxo$inboundSchema), + chainInfo: PrimaryNetworkChainInfo$inboundSchema, }); /** @internal */ export type ListPChainUtxosResponse$Outbound = { - nextPageToken?: string | undefined; - utxos: Array; - chainInfo: PrimaryNetworkChainInfo$Outbound; + nextPageToken?: string | undefined; + utxos: Array; + chainInfo: PrimaryNetworkChainInfo$Outbound; }; /** @internal */ export const ListPChainUtxosResponse$outboundSchema: z.ZodType< - ListPChainUtxosResponse$Outbound, - z.ZodTypeDef, - ListPChainUtxosResponse + ListPChainUtxosResponse$Outbound, + z.ZodTypeDef, + ListPChainUtxosResponse > = z.object({ - nextPageToken: z.string().optional(), - utxos: z.array(PChainUtxo$outboundSchema), - chainInfo: PrimaryNetworkChainInfo$outboundSchema, + nextPageToken: z.string().optional(), + utxos: z.array(PChainUtxo$outboundSchema), + chainInfo: PrimaryNetworkChainInfo$outboundSchema, }); /** @@ -59,10 +59,10 @@ export const ListPChainUtxosResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPChainUtxosResponse$ { - /** @deprecated use `ListPChainUtxosResponse$inboundSchema` instead. */ - export const inboundSchema = ListPChainUtxosResponse$inboundSchema; - /** @deprecated use `ListPChainUtxosResponse$outboundSchema` instead. */ - export const outboundSchema = ListPChainUtxosResponse$outboundSchema; - /** @deprecated use `ListPChainUtxosResponse$Outbound` instead. */ - export type Outbound = ListPChainUtxosResponse$Outbound; + /** @deprecated use `ListPChainUtxosResponse$inboundSchema` instead. */ + export const inboundSchema = ListPChainUtxosResponse$inboundSchema; + /** @deprecated use `ListPChainUtxosResponse$outboundSchema` instead. */ + export const outboundSchema = ListPChainUtxosResponse$outboundSchema; + /** @deprecated use `ListPChainUtxosResponse$Outbound` instead. */ + export type Outbound = ListPChainUtxosResponse$Outbound; } diff --git a/src/models/components/listpendingrewardsresponse.ts b/src/models/components/listpendingrewardsresponse.ts index 4a9ce81..daea696 100644 --- a/src/models/components/listpendingrewardsresponse.ts +++ b/src/models/components/listpendingrewardsresponse.ts @@ -2,46 +2,46 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PendingReward, - PendingReward$inboundSchema, - PendingReward$Outbound, - PendingReward$outboundSchema, + PendingReward, + PendingReward$inboundSchema, + PendingReward$Outbound, + PendingReward$outboundSchema, } from "./pendingreward.js"; -import * as z from "zod"; export type ListPendingRewardsResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - pendingRewards: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + pendingRewards: Array; }; /** @internal */ export const ListPendingRewardsResponse$inboundSchema: z.ZodType< - ListPendingRewardsResponse, - z.ZodTypeDef, - unknown + ListPendingRewardsResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - pendingRewards: z.array(PendingReward$inboundSchema), + nextPageToken: z.string().optional(), + pendingRewards: z.array(PendingReward$inboundSchema), }); /** @internal */ export type ListPendingRewardsResponse$Outbound = { - nextPageToken?: string | undefined; - pendingRewards: Array; + nextPageToken?: string | undefined; + pendingRewards: Array; }; /** @internal */ export const ListPendingRewardsResponse$outboundSchema: z.ZodType< - ListPendingRewardsResponse$Outbound, - z.ZodTypeDef, - ListPendingRewardsResponse + ListPendingRewardsResponse$Outbound, + z.ZodTypeDef, + ListPendingRewardsResponse > = z.object({ - nextPageToken: z.string().optional(), - pendingRewards: z.array(PendingReward$outboundSchema), + nextPageToken: z.string().optional(), + pendingRewards: z.array(PendingReward$outboundSchema), }); /** @@ -49,10 +49,10 @@ export const ListPendingRewardsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPendingRewardsResponse$ { - /** @deprecated use `ListPendingRewardsResponse$inboundSchema` instead. */ - export const inboundSchema = ListPendingRewardsResponse$inboundSchema; - /** @deprecated use `ListPendingRewardsResponse$outboundSchema` instead. */ - export const outboundSchema = ListPendingRewardsResponse$outboundSchema; - /** @deprecated use `ListPendingRewardsResponse$Outbound` instead. */ - export type Outbound = ListPendingRewardsResponse$Outbound; + /** @deprecated use `ListPendingRewardsResponse$inboundSchema` instead. */ + export const inboundSchema = ListPendingRewardsResponse$inboundSchema; + /** @deprecated use `ListPendingRewardsResponse$outboundSchema` instead. */ + export const outboundSchema = ListPendingRewardsResponse$outboundSchema; + /** @deprecated use `ListPendingRewardsResponse$Outbound` instead. */ + export type Outbound = ListPendingRewardsResponse$Outbound; } diff --git a/src/models/components/listprimarynetworkblocksresponse.ts b/src/models/components/listprimarynetworkblocksresponse.ts index c4ef4a7..ba416bf 100644 --- a/src/models/components/listprimarynetworkblocksresponse.ts +++ b/src/models/components/listprimarynetworkblocksresponse.ts @@ -2,56 +2,56 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PrimaryNetworkBlock, - PrimaryNetworkBlock$inboundSchema, - PrimaryNetworkBlock$Outbound, - PrimaryNetworkBlock$outboundSchema, + PrimaryNetworkBlock, + PrimaryNetworkBlock$inboundSchema, + PrimaryNetworkBlock$Outbound, + PrimaryNetworkBlock$outboundSchema, } from "./primarynetworkblock.js"; import { - PrimaryNetworkChainInfo, - PrimaryNetworkChainInfo$inboundSchema, - PrimaryNetworkChainInfo$Outbound, - PrimaryNetworkChainInfo$outboundSchema, + PrimaryNetworkChainInfo, + PrimaryNetworkChainInfo$inboundSchema, + PrimaryNetworkChainInfo$Outbound, + PrimaryNetworkChainInfo$outboundSchema, } from "./primarynetworkchaininfo.js"; -import * as z from "zod"; export type ListPrimaryNetworkBlocksResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - blocks: Array; - chainInfo: PrimaryNetworkChainInfo; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + blocks: Array; + chainInfo: PrimaryNetworkChainInfo; }; /** @internal */ export const ListPrimaryNetworkBlocksResponse$inboundSchema: z.ZodType< - ListPrimaryNetworkBlocksResponse, - z.ZodTypeDef, - unknown + ListPrimaryNetworkBlocksResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - blocks: z.array(PrimaryNetworkBlock$inboundSchema), - chainInfo: PrimaryNetworkChainInfo$inboundSchema, + nextPageToken: z.string().optional(), + blocks: z.array(PrimaryNetworkBlock$inboundSchema), + chainInfo: PrimaryNetworkChainInfo$inboundSchema, }); /** @internal */ export type ListPrimaryNetworkBlocksResponse$Outbound = { - nextPageToken?: string | undefined; - blocks: Array; - chainInfo: PrimaryNetworkChainInfo$Outbound; + nextPageToken?: string | undefined; + blocks: Array; + chainInfo: PrimaryNetworkChainInfo$Outbound; }; /** @internal */ export const ListPrimaryNetworkBlocksResponse$outboundSchema: z.ZodType< - ListPrimaryNetworkBlocksResponse$Outbound, - z.ZodTypeDef, - ListPrimaryNetworkBlocksResponse + ListPrimaryNetworkBlocksResponse$Outbound, + z.ZodTypeDef, + ListPrimaryNetworkBlocksResponse > = z.object({ - nextPageToken: z.string().optional(), - blocks: z.array(PrimaryNetworkBlock$outboundSchema), - chainInfo: PrimaryNetworkChainInfo$outboundSchema, + nextPageToken: z.string().optional(), + blocks: z.array(PrimaryNetworkBlock$outboundSchema), + chainInfo: PrimaryNetworkChainInfo$outboundSchema, }); /** @@ -59,10 +59,10 @@ export const ListPrimaryNetworkBlocksResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPrimaryNetworkBlocksResponse$ { - /** @deprecated use `ListPrimaryNetworkBlocksResponse$inboundSchema` instead. */ - export const inboundSchema = ListPrimaryNetworkBlocksResponse$inboundSchema; - /** @deprecated use `ListPrimaryNetworkBlocksResponse$outboundSchema` instead. */ - export const outboundSchema = ListPrimaryNetworkBlocksResponse$outboundSchema; - /** @deprecated use `ListPrimaryNetworkBlocksResponse$Outbound` instead. */ - export type Outbound = ListPrimaryNetworkBlocksResponse$Outbound; + /** @deprecated use `ListPrimaryNetworkBlocksResponse$inboundSchema` instead. */ + export const inboundSchema = ListPrimaryNetworkBlocksResponse$inboundSchema; + /** @deprecated use `ListPrimaryNetworkBlocksResponse$outboundSchema` instead. */ + export const outboundSchema = ListPrimaryNetworkBlocksResponse$outboundSchema; + /** @deprecated use `ListPrimaryNetworkBlocksResponse$Outbound` instead. */ + export type Outbound = ListPrimaryNetworkBlocksResponse$Outbound; } diff --git a/src/models/components/listsubnetsresponse.ts b/src/models/components/listsubnetsresponse.ts index a5f6c74..473c4f9 100644 --- a/src/models/components/listsubnetsresponse.ts +++ b/src/models/components/listsubnetsresponse.ts @@ -2,41 +2,46 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { Subnet, Subnet$inboundSchema, Subnet$Outbound, Subnet$outboundSchema } from "./subnet.js"; import * as z from "zod"; +import { + Subnet, + Subnet$inboundSchema, + Subnet$Outbound, + Subnet$outboundSchema, +} from "./subnet.js"; export type ListSubnetsResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - subnets: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + subnets: Array; }; /** @internal */ export const ListSubnetsResponse$inboundSchema: z.ZodType< - ListSubnetsResponse, - z.ZodTypeDef, - unknown + ListSubnetsResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - subnets: z.array(Subnet$inboundSchema), + nextPageToken: z.string().optional(), + subnets: z.array(Subnet$inboundSchema), }); /** @internal */ export type ListSubnetsResponse$Outbound = { - nextPageToken?: string | undefined; - subnets: Array; + nextPageToken?: string | undefined; + subnets: Array; }; /** @internal */ export const ListSubnetsResponse$outboundSchema: z.ZodType< - ListSubnetsResponse$Outbound, - z.ZodTypeDef, - ListSubnetsResponse + ListSubnetsResponse$Outbound, + z.ZodTypeDef, + ListSubnetsResponse > = z.object({ - nextPageToken: z.string().optional(), - subnets: z.array(Subnet$outboundSchema), + nextPageToken: z.string().optional(), + subnets: z.array(Subnet$outboundSchema), }); /** @@ -44,10 +49,10 @@ export const ListSubnetsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListSubnetsResponse$ { - /** @deprecated use `ListSubnetsResponse$inboundSchema` instead. */ - export const inboundSchema = ListSubnetsResponse$inboundSchema; - /** @deprecated use `ListSubnetsResponse$outboundSchema` instead. */ - export const outboundSchema = ListSubnetsResponse$outboundSchema; - /** @deprecated use `ListSubnetsResponse$Outbound` instead. */ - export type Outbound = ListSubnetsResponse$Outbound; + /** @deprecated use `ListSubnetsResponse$inboundSchema` instead. */ + export const inboundSchema = ListSubnetsResponse$inboundSchema; + /** @deprecated use `ListSubnetsResponse$outboundSchema` instead. */ + export const outboundSchema = ListSubnetsResponse$outboundSchema; + /** @deprecated use `ListSubnetsResponse$Outbound` instead. */ + export type Outbound = ListSubnetsResponse$Outbound; } diff --git a/src/models/components/listteleportermessagesresponse.ts b/src/models/components/listteleportermessagesresponse.ts index 67712be..df675fd 100644 --- a/src/models/components/listteleportermessagesresponse.ts +++ b/src/models/components/listteleportermessagesresponse.ts @@ -2,123 +2,142 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - DeliveredTeleporterMessage, - DeliveredTeleporterMessage$inboundSchema, - DeliveredTeleporterMessage$Outbound, - DeliveredTeleporterMessage$outboundSchema, + DeliveredTeleporterMessage, + DeliveredTeleporterMessage$inboundSchema, + DeliveredTeleporterMessage$Outbound, + DeliveredTeleporterMessage$outboundSchema, } from "./deliveredteleportermessage.js"; import { - PendingTeleporterMessage, - PendingTeleporterMessage$inboundSchema, - PendingTeleporterMessage$Outbound, - PendingTeleporterMessage$outboundSchema, + PendingTeleporterMessage, + PendingTeleporterMessage$inboundSchema, + PendingTeleporterMessage$Outbound, + PendingTeleporterMessage$outboundSchema, } from "./pendingteleportermessage.js"; -import * as z from "zod"; export type Messages = - | (PendingTeleporterMessage & { status: "pending" }) - | (DeliveredTeleporterMessage & { status: "delivered" }); + | (PendingTeleporterMessage & { status: "pending" }) + | (DeliveredTeleporterMessage & { status: "delivered" }); export type ListTeleporterMessagesResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - messages: Array< - | (PendingTeleporterMessage & { status: "pending" }) - | (DeliveredTeleporterMessage & { status: "delivered" }) - >; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + messages: Array< + | (PendingTeleporterMessage & { status: "pending" }) + | (DeliveredTeleporterMessage & { status: "delivered" }) + >; }; /** @internal */ -export const Messages$inboundSchema: z.ZodType = z.union([ - PendingTeleporterMessage$inboundSchema.and( - z.object({ status: z.literal("pending") }).transform((v) => ({ status: v.status })) - ), - DeliveredTeleporterMessage$inboundSchema.and( - z.object({ status: z.literal("delivered") }).transform((v) => ({ status: v.status })) - ), +export const Messages$inboundSchema: z.ZodType< + Messages, + z.ZodTypeDef, + unknown +> = z.union([ + PendingTeleporterMessage$inboundSchema.and( + z.object({ status: z.literal("pending") }).transform((v) => ({ + status: v.status, + })), + ), + DeliveredTeleporterMessage$inboundSchema.and( + z.object({ status: z.literal("delivered") }).transform((v) => ({ + status: v.status, + })), + ), ]); /** @internal */ export type Messages$Outbound = - | (PendingTeleporterMessage$Outbound & { status: "pending" }) - | (DeliveredTeleporterMessage$Outbound & { status: "delivered" }); + | (PendingTeleporterMessage$Outbound & { status: "pending" }) + | (DeliveredTeleporterMessage$Outbound & { status: "delivered" }); /** @internal */ -export const Messages$outboundSchema: z.ZodType = - z.union([ - PendingTeleporterMessage$outboundSchema.and( - z.object({ status: z.literal("pending") }).transform((v) => ({ status: v.status })) - ), - DeliveredTeleporterMessage$outboundSchema.and( - z.object({ status: z.literal("delivered") }).transform((v) => ({ status: v.status })) - ), - ]); +export const Messages$outboundSchema: z.ZodType< + Messages$Outbound, + z.ZodTypeDef, + Messages +> = z.union([ + PendingTeleporterMessage$outboundSchema.and( + z.object({ status: z.literal("pending") }).transform((v) => ({ + status: v.status, + })), + ), + DeliveredTeleporterMessage$outboundSchema.and( + z.object({ status: z.literal("delivered") }).transform((v) => ({ + status: v.status, + })), + ), +]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Messages$ { - /** @deprecated use `Messages$inboundSchema` instead. */ - export const inboundSchema = Messages$inboundSchema; - /** @deprecated use `Messages$outboundSchema` instead. */ - export const outboundSchema = Messages$outboundSchema; - /** @deprecated use `Messages$Outbound` instead. */ - export type Outbound = Messages$Outbound; + /** @deprecated use `Messages$inboundSchema` instead. */ + export const inboundSchema = Messages$inboundSchema; + /** @deprecated use `Messages$outboundSchema` instead. */ + export const outboundSchema = Messages$outboundSchema; + /** @deprecated use `Messages$Outbound` instead. */ + export type Outbound = Messages$Outbound; } /** @internal */ export const ListTeleporterMessagesResponse$inboundSchema: z.ZodType< - ListTeleporterMessagesResponse, - z.ZodTypeDef, - unknown + ListTeleporterMessagesResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - messages: z.array( - z.union([ - PendingTeleporterMessage$inboundSchema.and( - z.object({ status: z.literal("pending") }).transform((v) => ({ status: v.status })) - ), - DeliveredTeleporterMessage$inboundSchema.and( - z - .object({ status: z.literal("delivered") }) - .transform((v) => ({ status: v.status })) - ), - ]) - ), + nextPageToken: z.string().optional(), + messages: z.array( + z.union([ + PendingTeleporterMessage$inboundSchema.and( + z.object({ status: z.literal("pending") }).transform((v) => ({ + status: v.status, + })), + ), + DeliveredTeleporterMessage$inboundSchema.and( + z.object({ status: z.literal("delivered") }).transform((v) => ({ + status: v.status, + })), + ), + ]), + ), }); /** @internal */ export type ListTeleporterMessagesResponse$Outbound = { - nextPageToken?: string | undefined; - messages: Array< - | (PendingTeleporterMessage$Outbound & { status: "pending" }) - | (DeliveredTeleporterMessage$Outbound & { status: "delivered" }) - >; + nextPageToken?: string | undefined; + messages: Array< + | (PendingTeleporterMessage$Outbound & { status: "pending" }) + | (DeliveredTeleporterMessage$Outbound & { status: "delivered" }) + >; }; /** @internal */ export const ListTeleporterMessagesResponse$outboundSchema: z.ZodType< - ListTeleporterMessagesResponse$Outbound, - z.ZodTypeDef, - ListTeleporterMessagesResponse + ListTeleporterMessagesResponse$Outbound, + z.ZodTypeDef, + ListTeleporterMessagesResponse > = z.object({ - nextPageToken: z.string().optional(), - messages: z.array( - z.union([ - PendingTeleporterMessage$outboundSchema.and( - z.object({ status: z.literal("pending") }).transform((v) => ({ status: v.status })) - ), - DeliveredTeleporterMessage$outboundSchema.and( - z - .object({ status: z.literal("delivered") }) - .transform((v) => ({ status: v.status })) - ), - ]) - ), + nextPageToken: z.string().optional(), + messages: z.array( + z.union([ + PendingTeleporterMessage$outboundSchema.and( + z.object({ status: z.literal("pending") }).transform((v) => ({ + status: v.status, + })), + ), + DeliveredTeleporterMessage$outboundSchema.and( + z.object({ status: z.literal("delivered") }).transform((v) => ({ + status: v.status, + })), + ), + ]), + ), }); /** @@ -126,10 +145,10 @@ export const ListTeleporterMessagesResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTeleporterMessagesResponse$ { - /** @deprecated use `ListTeleporterMessagesResponse$inboundSchema` instead. */ - export const inboundSchema = ListTeleporterMessagesResponse$inboundSchema; - /** @deprecated use `ListTeleporterMessagesResponse$outboundSchema` instead. */ - export const outboundSchema = ListTeleporterMessagesResponse$outboundSchema; - /** @deprecated use `ListTeleporterMessagesResponse$Outbound` instead. */ - export type Outbound = ListTeleporterMessagesResponse$Outbound; + /** @deprecated use `ListTeleporterMessagesResponse$inboundSchema` instead. */ + export const inboundSchema = ListTeleporterMessagesResponse$inboundSchema; + /** @deprecated use `ListTeleporterMessagesResponse$outboundSchema` instead. */ + export const outboundSchema = ListTeleporterMessagesResponse$outboundSchema; + /** @deprecated use `ListTeleporterMessagesResponse$Outbound` instead. */ + export type Outbound = ListTeleporterMessagesResponse$Outbound; } diff --git a/src/models/components/listtransactiondetailsresponse.ts b/src/models/components/listtransactiondetailsresponse.ts index 4c2656a..7cde58c 100644 --- a/src/models/components/listtransactiondetailsresponse.ts +++ b/src/models/components/listtransactiondetailsresponse.ts @@ -2,46 +2,46 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - TransactionDetails, - TransactionDetails$inboundSchema, - TransactionDetails$Outbound, - TransactionDetails$outboundSchema, + TransactionDetails, + TransactionDetails$inboundSchema, + TransactionDetails$Outbound, + TransactionDetails$outboundSchema, } from "./transactiondetails.js"; -import * as z from "zod"; export type ListTransactionDetailsResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - transactions: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + transactions: Array; }; /** @internal */ export const ListTransactionDetailsResponse$inboundSchema: z.ZodType< - ListTransactionDetailsResponse, - z.ZodTypeDef, - unknown + ListTransactionDetailsResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - transactions: z.array(TransactionDetails$inboundSchema), + nextPageToken: z.string().optional(), + transactions: z.array(TransactionDetails$inboundSchema), }); /** @internal */ export type ListTransactionDetailsResponse$Outbound = { - nextPageToken?: string | undefined; - transactions: Array; + nextPageToken?: string | undefined; + transactions: Array; }; /** @internal */ export const ListTransactionDetailsResponse$outboundSchema: z.ZodType< - ListTransactionDetailsResponse$Outbound, - z.ZodTypeDef, - ListTransactionDetailsResponse + ListTransactionDetailsResponse$Outbound, + z.ZodTypeDef, + ListTransactionDetailsResponse > = z.object({ - nextPageToken: z.string().optional(), - transactions: z.array(TransactionDetails$outboundSchema), + nextPageToken: z.string().optional(), + transactions: z.array(TransactionDetails$outboundSchema), }); /** @@ -49,10 +49,10 @@ export const ListTransactionDetailsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTransactionDetailsResponse$ { - /** @deprecated use `ListTransactionDetailsResponse$inboundSchema` instead. */ - export const inboundSchema = ListTransactionDetailsResponse$inboundSchema; - /** @deprecated use `ListTransactionDetailsResponse$outboundSchema` instead. */ - export const outboundSchema = ListTransactionDetailsResponse$outboundSchema; - /** @deprecated use `ListTransactionDetailsResponse$Outbound` instead. */ - export type Outbound = ListTransactionDetailsResponse$Outbound; + /** @deprecated use `ListTransactionDetailsResponse$inboundSchema` instead. */ + export const inboundSchema = ListTransactionDetailsResponse$inboundSchema; + /** @deprecated use `ListTransactionDetailsResponse$outboundSchema` instead. */ + export const outboundSchema = ListTransactionDetailsResponse$outboundSchema; + /** @deprecated use `ListTransactionDetailsResponse$Outbound` instead. */ + export type Outbound = ListTransactionDetailsResponse$Outbound; } diff --git a/src/models/components/listtransfersresponse.ts b/src/models/components/listtransfersresponse.ts index 0c48346..e8cfe8e 100644 --- a/src/models/components/listtransfersresponse.ts +++ b/src/models/components/listtransfersresponse.ts @@ -2,106 +2,115 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Erc1155Transfer, - Erc1155Transfer$inboundSchema, - Erc1155Transfer$Outbound, - Erc1155Transfer$outboundSchema, + Erc1155Transfer, + Erc1155Transfer$inboundSchema, + Erc1155Transfer$Outbound, + Erc1155Transfer$outboundSchema, } from "./erc1155transfer.js"; import { - Erc20Transfer, - Erc20Transfer$inboundSchema, - Erc20Transfer$Outbound, - Erc20Transfer$outboundSchema, + Erc20Transfer, + Erc20Transfer$inboundSchema, + Erc20Transfer$Outbound, + Erc20Transfer$outboundSchema, } from "./erc20transfer.js"; import { - Erc721Transfer, - Erc721Transfer$inboundSchema, - Erc721Transfer$Outbound, - Erc721Transfer$outboundSchema, + Erc721Transfer, + Erc721Transfer$inboundSchema, + Erc721Transfer$Outbound, + Erc721Transfer$outboundSchema, } from "./erc721transfer.js"; -import * as z from "zod"; export type Transfers = Erc721Transfer | Erc20Transfer | Erc1155Transfer; export type ListTransfersResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - transfers: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + transfers: Array; }; /** @internal */ -export const Transfers$inboundSchema: z.ZodType = z.union([ - Erc721Transfer$inboundSchema, - Erc20Transfer$inboundSchema, - Erc1155Transfer$inboundSchema, +export const Transfers$inboundSchema: z.ZodType< + Transfers, + z.ZodTypeDef, + unknown +> = z.union([ + Erc721Transfer$inboundSchema, + Erc20Transfer$inboundSchema, + Erc1155Transfer$inboundSchema, ]); /** @internal */ export type Transfers$Outbound = - | Erc721Transfer$Outbound - | Erc20Transfer$Outbound - | Erc1155Transfer$Outbound; + | Erc721Transfer$Outbound + | Erc20Transfer$Outbound + | Erc1155Transfer$Outbound; /** @internal */ -export const Transfers$outboundSchema: z.ZodType = - z.union([ - Erc721Transfer$outboundSchema, - Erc20Transfer$outboundSchema, - Erc1155Transfer$outboundSchema, - ]); +export const Transfers$outboundSchema: z.ZodType< + Transfers$Outbound, + z.ZodTypeDef, + Transfers +> = z.union([ + Erc721Transfer$outboundSchema, + Erc20Transfer$outboundSchema, + Erc1155Transfer$outboundSchema, +]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Transfers$ { - /** @deprecated use `Transfers$inboundSchema` instead. */ - export const inboundSchema = Transfers$inboundSchema; - /** @deprecated use `Transfers$outboundSchema` instead. */ - export const outboundSchema = Transfers$outboundSchema; - /** @deprecated use `Transfers$Outbound` instead. */ - export type Outbound = Transfers$Outbound; + /** @deprecated use `Transfers$inboundSchema` instead. */ + export const inboundSchema = Transfers$inboundSchema; + /** @deprecated use `Transfers$outboundSchema` instead. */ + export const outboundSchema = Transfers$outboundSchema; + /** @deprecated use `Transfers$Outbound` instead. */ + export type Outbound = Transfers$Outbound; } /** @internal */ export const ListTransfersResponse$inboundSchema: z.ZodType< - ListTransfersResponse, - z.ZodTypeDef, - unknown + ListTransfersResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - transfers: z.array( - z.union([ - Erc721Transfer$inboundSchema, - Erc20Transfer$inboundSchema, - Erc1155Transfer$inboundSchema, - ]) - ), + nextPageToken: z.string().optional(), + transfers: z.array( + z.union([ + Erc721Transfer$inboundSchema, + Erc20Transfer$inboundSchema, + Erc1155Transfer$inboundSchema, + ]), + ), }); /** @internal */ export type ListTransfersResponse$Outbound = { - nextPageToken?: string | undefined; - transfers: Array; + nextPageToken?: string | undefined; + transfers: Array< + Erc721Transfer$Outbound | Erc20Transfer$Outbound | Erc1155Transfer$Outbound + >; }; /** @internal */ export const ListTransfersResponse$outboundSchema: z.ZodType< - ListTransfersResponse$Outbound, - z.ZodTypeDef, - ListTransfersResponse + ListTransfersResponse$Outbound, + z.ZodTypeDef, + ListTransfersResponse > = z.object({ - nextPageToken: z.string().optional(), - transfers: z.array( - z.union([ - Erc721Transfer$outboundSchema, - Erc20Transfer$outboundSchema, - Erc1155Transfer$outboundSchema, - ]) - ), + nextPageToken: z.string().optional(), + transfers: z.array( + z.union([ + Erc721Transfer$outboundSchema, + Erc20Transfer$outboundSchema, + Erc1155Transfer$outboundSchema, + ]), + ), }); /** @@ -109,10 +118,10 @@ export const ListTransfersResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTransfersResponse$ { - /** @deprecated use `ListTransfersResponse$inboundSchema` instead. */ - export const inboundSchema = ListTransfersResponse$inboundSchema; - /** @deprecated use `ListTransfersResponse$outboundSchema` instead. */ - export const outboundSchema = ListTransfersResponse$outboundSchema; - /** @deprecated use `ListTransfersResponse$Outbound` instead. */ - export type Outbound = ListTransfersResponse$Outbound; + /** @deprecated use `ListTransfersResponse$inboundSchema` instead. */ + export const inboundSchema = ListTransfersResponse$inboundSchema; + /** @deprecated use `ListTransfersResponse$outboundSchema` instead. */ + export const outboundSchema = ListTransfersResponse$outboundSchema; + /** @deprecated use `ListTransfersResponse$Outbound` instead. */ + export type Outbound = ListTransfersResponse$Outbound; } diff --git a/src/models/components/listutxosresponse.ts b/src/models/components/listutxosresponse.ts index efd985f..7edde8c 100644 --- a/src/models/components/listutxosresponse.ts +++ b/src/models/components/listutxosresponse.ts @@ -2,48 +2,56 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PrimaryNetworkChainInfo, - PrimaryNetworkChainInfo$inboundSchema, - PrimaryNetworkChainInfo$Outbound, - PrimaryNetworkChainInfo$outboundSchema, + PrimaryNetworkChainInfo, + PrimaryNetworkChainInfo$inboundSchema, + PrimaryNetworkChainInfo$Outbound, + PrimaryNetworkChainInfo$outboundSchema, } from "./primarynetworkchaininfo.js"; -import { Utxo, Utxo$inboundSchema, Utxo$Outbound, Utxo$outboundSchema } from "./utxo.js"; -import * as z from "zod"; +import { + Utxo, + Utxo$inboundSchema, + Utxo$Outbound, + Utxo$outboundSchema, +} from "./utxo.js"; export type ListUtxosResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - utxos: Array; - chainInfo: PrimaryNetworkChainInfo; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + utxos: Array; + chainInfo: PrimaryNetworkChainInfo; }; /** @internal */ -export const ListUtxosResponse$inboundSchema: z.ZodType = - z.object({ - nextPageToken: z.string().optional(), - utxos: z.array(Utxo$inboundSchema), - chainInfo: PrimaryNetworkChainInfo$inboundSchema, - }); +export const ListUtxosResponse$inboundSchema: z.ZodType< + ListUtxosResponse, + z.ZodTypeDef, + unknown +> = z.object({ + nextPageToken: z.string().optional(), + utxos: z.array(Utxo$inboundSchema), + chainInfo: PrimaryNetworkChainInfo$inboundSchema, +}); /** @internal */ export type ListUtxosResponse$Outbound = { - nextPageToken?: string | undefined; - utxos: Array; - chainInfo: PrimaryNetworkChainInfo$Outbound; + nextPageToken?: string | undefined; + utxos: Array; + chainInfo: PrimaryNetworkChainInfo$Outbound; }; /** @internal */ export const ListUtxosResponse$outboundSchema: z.ZodType< - ListUtxosResponse$Outbound, - z.ZodTypeDef, - ListUtxosResponse + ListUtxosResponse$Outbound, + z.ZodTypeDef, + ListUtxosResponse > = z.object({ - nextPageToken: z.string().optional(), - utxos: z.array(Utxo$outboundSchema), - chainInfo: PrimaryNetworkChainInfo$outboundSchema, + nextPageToken: z.string().optional(), + utxos: z.array(Utxo$outboundSchema), + chainInfo: PrimaryNetworkChainInfo$outboundSchema, }); /** @@ -51,10 +59,10 @@ export const ListUtxosResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUtxosResponse$ { - /** @deprecated use `ListUtxosResponse$inboundSchema` instead. */ - export const inboundSchema = ListUtxosResponse$inboundSchema; - /** @deprecated use `ListUtxosResponse$outboundSchema` instead. */ - export const outboundSchema = ListUtxosResponse$outboundSchema; - /** @deprecated use `ListUtxosResponse$Outbound` instead. */ - export type Outbound = ListUtxosResponse$Outbound; + /** @deprecated use `ListUtxosResponse$inboundSchema` instead. */ + export const inboundSchema = ListUtxosResponse$inboundSchema; + /** @deprecated use `ListUtxosResponse$outboundSchema` instead. */ + export const outboundSchema = ListUtxosResponse$outboundSchema; + /** @deprecated use `ListUtxosResponse$Outbound` instead. */ + export type Outbound = ListUtxosResponse$Outbound; } diff --git a/src/models/components/listvalidatordetailsresponse.ts b/src/models/components/listvalidatordetailsresponse.ts index 4222585..8254801 100644 --- a/src/models/components/listvalidatordetailsresponse.ts +++ b/src/models/components/listvalidatordetailsresponse.ts @@ -2,198 +2,205 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - ActiveValidatorDetails, - ActiveValidatorDetails$inboundSchema, - ActiveValidatorDetails$Outbound, - ActiveValidatorDetails$outboundSchema, + ActiveValidatorDetails, + ActiveValidatorDetails$inboundSchema, + ActiveValidatorDetails$Outbound, + ActiveValidatorDetails$outboundSchema, } from "./activevalidatordetails.js"; import { - CompletedValidatorDetails, - CompletedValidatorDetails$inboundSchema, - CompletedValidatorDetails$Outbound, - CompletedValidatorDetails$outboundSchema, + CompletedValidatorDetails, + CompletedValidatorDetails$inboundSchema, + CompletedValidatorDetails$Outbound, + CompletedValidatorDetails$outboundSchema, } from "./completedvalidatordetails.js"; import { - PendingValidatorDetails, - PendingValidatorDetails$inboundSchema, - PendingValidatorDetails$Outbound, - PendingValidatorDetails$outboundSchema, + PendingValidatorDetails, + PendingValidatorDetails$inboundSchema, + PendingValidatorDetails$Outbound, + PendingValidatorDetails$outboundSchema, } from "./pendingvalidatordetails.js"; import { - RemovedValidatorDetails, - RemovedValidatorDetails$inboundSchema, - RemovedValidatorDetails$Outbound, - RemovedValidatorDetails$outboundSchema, + RemovedValidatorDetails, + RemovedValidatorDetails$inboundSchema, + RemovedValidatorDetails$Outbound, + RemovedValidatorDetails$outboundSchema, } from "./removedvalidatordetails.js"; -import * as z from "zod"; export type Validators = + | (PendingValidatorDetails & { validationStatus: "pending" }) + | (CompletedValidatorDetails & { validationStatus: "completed" }) + | (RemovedValidatorDetails & { validationStatus: "removed" }) + | (ActiveValidatorDetails & { validationStatus: "active" }); + +export type ListValidatorDetailsResponse = { + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + /** + * The list of validator Details. + */ + validators: Array< | (PendingValidatorDetails & { validationStatus: "pending" }) | (CompletedValidatorDetails & { validationStatus: "completed" }) | (RemovedValidatorDetails & { validationStatus: "removed" }) - | (ActiveValidatorDetails & { validationStatus: "active" }); - -export type ListValidatorDetailsResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - /** - * The list of validator Details. - */ - validators: Array< - | (PendingValidatorDetails & { validationStatus: "pending" }) - | (CompletedValidatorDetails & { validationStatus: "completed" }) - | (RemovedValidatorDetails & { validationStatus: "removed" }) - | (ActiveValidatorDetails & { validationStatus: "active" }) - >; + | (ActiveValidatorDetails & { validationStatus: "active" }) + >; }; /** @internal */ -export const Validators$inboundSchema: z.ZodType = z.union([ - PendingValidatorDetails$inboundSchema.and( - z - .object({ validationStatus: z.literal("pending") }) - .transform((v) => ({ validationStatus: v.validationStatus })) - ), - CompletedValidatorDetails$inboundSchema.and( - z - .object({ validationStatus: z.literal("completed") }) - .transform((v) => ({ validationStatus: v.validationStatus })) - ), - RemovedValidatorDetails$inboundSchema.and( - z - .object({ validationStatus: z.literal("removed") }) - .transform((v) => ({ validationStatus: v.validationStatus })) - ), - ActiveValidatorDetails$inboundSchema.and( - z - .object({ validationStatus: z.literal("active") }) - .transform((v) => ({ validationStatus: v.validationStatus })) - ), +export const Validators$inboundSchema: z.ZodType< + Validators, + z.ZodTypeDef, + unknown +> = z.union([ + PendingValidatorDetails$inboundSchema.and( + z.object({ validationStatus: z.literal("pending") }).transform((v) => ({ + validationStatus: v.validationStatus, + })), + ), + CompletedValidatorDetails$inboundSchema.and( + z.object({ validationStatus: z.literal("completed") }).transform((v) => ({ + validationStatus: v.validationStatus, + })), + ), + RemovedValidatorDetails$inboundSchema.and( + z.object({ validationStatus: z.literal("removed") }).transform((v) => ({ + validationStatus: v.validationStatus, + })), + ), + ActiveValidatorDetails$inboundSchema.and( + z.object({ validationStatus: z.literal("active") }).transform((v) => ({ + validationStatus: v.validationStatus, + })), + ), ]); /** @internal */ export type Validators$Outbound = - | (PendingValidatorDetails$Outbound & { validationStatus: "pending" }) - | (CompletedValidatorDetails$Outbound & { validationStatus: "completed" }) - | (RemovedValidatorDetails$Outbound & { validationStatus: "removed" }) - | (ActiveValidatorDetails$Outbound & { validationStatus: "active" }); + | (PendingValidatorDetails$Outbound & { validationStatus: "pending" }) + | (CompletedValidatorDetails$Outbound & { validationStatus: "completed" }) + | (RemovedValidatorDetails$Outbound & { validationStatus: "removed" }) + | (ActiveValidatorDetails$Outbound & { validationStatus: "active" }); /** @internal */ -export const Validators$outboundSchema: z.ZodType = - z.union([ - PendingValidatorDetails$outboundSchema.and( - z - .object({ validationStatus: z.literal("pending") }) - .transform((v) => ({ validationStatus: v.validationStatus })) - ), - CompletedValidatorDetails$outboundSchema.and( - z - .object({ validationStatus: z.literal("completed") }) - .transform((v) => ({ validationStatus: v.validationStatus })) - ), - RemovedValidatorDetails$outboundSchema.and( - z - .object({ validationStatus: z.literal("removed") }) - .transform((v) => ({ validationStatus: v.validationStatus })) - ), - ActiveValidatorDetails$outboundSchema.and( - z - .object({ validationStatus: z.literal("active") }) - .transform((v) => ({ validationStatus: v.validationStatus })) - ), - ]); +export const Validators$outboundSchema: z.ZodType< + Validators$Outbound, + z.ZodTypeDef, + Validators +> = z.union([ + PendingValidatorDetails$outboundSchema.and( + z.object({ validationStatus: z.literal("pending") }).transform((v) => ({ + validationStatus: v.validationStatus, + })), + ), + CompletedValidatorDetails$outboundSchema.and( + z.object({ validationStatus: z.literal("completed") }).transform((v) => ({ + validationStatus: v.validationStatus, + })), + ), + RemovedValidatorDetails$outboundSchema.and( + z.object({ validationStatus: z.literal("removed") }).transform((v) => ({ + validationStatus: v.validationStatus, + })), + ), + ActiveValidatorDetails$outboundSchema.and( + z.object({ validationStatus: z.literal("active") }).transform((v) => ({ + validationStatus: v.validationStatus, + })), + ), +]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Validators$ { - /** @deprecated use `Validators$inboundSchema` instead. */ - export const inboundSchema = Validators$inboundSchema; - /** @deprecated use `Validators$outboundSchema` instead. */ - export const outboundSchema = Validators$outboundSchema; - /** @deprecated use `Validators$Outbound` instead. */ - export type Outbound = Validators$Outbound; + /** @deprecated use `Validators$inboundSchema` instead. */ + export const inboundSchema = Validators$inboundSchema; + /** @deprecated use `Validators$outboundSchema` instead. */ + export const outboundSchema = Validators$outboundSchema; + /** @deprecated use `Validators$Outbound` instead. */ + export type Outbound = Validators$Outbound; } /** @internal */ export const ListValidatorDetailsResponse$inboundSchema: z.ZodType< - ListValidatorDetailsResponse, - z.ZodTypeDef, - unknown + ListValidatorDetailsResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - validators: z.array( - z.union([ - PendingValidatorDetails$inboundSchema.and( - z - .object({ validationStatus: z.literal("pending") }) - .transform((v) => ({ validationStatus: v.validationStatus })) - ), - CompletedValidatorDetails$inboundSchema.and( - z - .object({ validationStatus: z.literal("completed") }) - .transform((v) => ({ validationStatus: v.validationStatus })) - ), - RemovedValidatorDetails$inboundSchema.and( - z - .object({ validationStatus: z.literal("removed") }) - .transform((v) => ({ validationStatus: v.validationStatus })) - ), - ActiveValidatorDetails$inboundSchema.and( - z - .object({ validationStatus: z.literal("active") }) - .transform((v) => ({ validationStatus: v.validationStatus })) - ), - ]) - ), + nextPageToken: z.string().optional(), + validators: z.array( + z.union([ + PendingValidatorDetails$inboundSchema.and( + z.object({ validationStatus: z.literal("pending") }).transform((v) => ({ + validationStatus: v.validationStatus, + })), + ), + CompletedValidatorDetails$inboundSchema.and( + z.object({ validationStatus: z.literal("completed") }).transform(( + v, + ) => ({ validationStatus: v.validationStatus })), + ), + RemovedValidatorDetails$inboundSchema.and( + z.object({ validationStatus: z.literal("removed") }).transform((v) => ({ + validationStatus: v.validationStatus, + })), + ), + ActiveValidatorDetails$inboundSchema.and( + z.object({ validationStatus: z.literal("active") }).transform((v) => ({ + validationStatus: v.validationStatus, + })), + ), + ]), + ), }); /** @internal */ export type ListValidatorDetailsResponse$Outbound = { - nextPageToken?: string | undefined; - validators: Array< - | (PendingValidatorDetails$Outbound & { validationStatus: "pending" }) - | (CompletedValidatorDetails$Outbound & { validationStatus: "completed" }) - | (RemovedValidatorDetails$Outbound & { validationStatus: "removed" }) - | (ActiveValidatorDetails$Outbound & { validationStatus: "active" }) - >; + nextPageToken?: string | undefined; + validators: Array< + | (PendingValidatorDetails$Outbound & { validationStatus: "pending" }) + | (CompletedValidatorDetails$Outbound & { validationStatus: "completed" }) + | (RemovedValidatorDetails$Outbound & { validationStatus: "removed" }) + | (ActiveValidatorDetails$Outbound & { validationStatus: "active" }) + >; }; /** @internal */ export const ListValidatorDetailsResponse$outboundSchema: z.ZodType< - ListValidatorDetailsResponse$Outbound, - z.ZodTypeDef, - ListValidatorDetailsResponse + ListValidatorDetailsResponse$Outbound, + z.ZodTypeDef, + ListValidatorDetailsResponse > = z.object({ - nextPageToken: z.string().optional(), - validators: z.array( - z.union([ - PendingValidatorDetails$outboundSchema.and( - z - .object({ validationStatus: z.literal("pending") }) - .transform((v) => ({ validationStatus: v.validationStatus })) - ), - CompletedValidatorDetails$outboundSchema.and( - z - .object({ validationStatus: z.literal("completed") }) - .transform((v) => ({ validationStatus: v.validationStatus })) - ), - RemovedValidatorDetails$outboundSchema.and( - z - .object({ validationStatus: z.literal("removed") }) - .transform((v) => ({ validationStatus: v.validationStatus })) - ), - ActiveValidatorDetails$outboundSchema.and( - z - .object({ validationStatus: z.literal("active") }) - .transform((v) => ({ validationStatus: v.validationStatus })) - ), - ]) - ), + nextPageToken: z.string().optional(), + validators: z.array( + z.union([ + PendingValidatorDetails$outboundSchema.and( + z.object({ validationStatus: z.literal("pending") }).transform((v) => ({ + validationStatus: v.validationStatus, + })), + ), + CompletedValidatorDetails$outboundSchema.and( + z.object({ validationStatus: z.literal("completed") }).transform(( + v, + ) => ({ validationStatus: v.validationStatus })), + ), + RemovedValidatorDetails$outboundSchema.and( + z.object({ validationStatus: z.literal("removed") }).transform((v) => ({ + validationStatus: v.validationStatus, + })), + ), + ActiveValidatorDetails$outboundSchema.and( + z.object({ validationStatus: z.literal("active") }).transform((v) => ({ + validationStatus: v.validationStatus, + })), + ), + ]), + ), }); /** @@ -201,10 +208,10 @@ export const ListValidatorDetailsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListValidatorDetailsResponse$ { - /** @deprecated use `ListValidatorDetailsResponse$inboundSchema` instead. */ - export const inboundSchema = ListValidatorDetailsResponse$inboundSchema; - /** @deprecated use `ListValidatorDetailsResponse$outboundSchema` instead. */ - export const outboundSchema = ListValidatorDetailsResponse$outboundSchema; - /** @deprecated use `ListValidatorDetailsResponse$Outbound` instead. */ - export type Outbound = ListValidatorDetailsResponse$Outbound; + /** @deprecated use `ListValidatorDetailsResponse$inboundSchema` instead. */ + export const inboundSchema = ListValidatorDetailsResponse$inboundSchema; + /** @deprecated use `ListValidatorDetailsResponse$outboundSchema` instead. */ + export const outboundSchema = ListValidatorDetailsResponse$outboundSchema; + /** @deprecated use `ListValidatorDetailsResponse$Outbound` instead. */ + export type Outbound = ListValidatorDetailsResponse$Outbound; } diff --git a/src/models/components/listwebhookaddressesresponse.ts b/src/models/components/listwebhookaddressesresponse.ts index 29fec14..57c05d6 100644 --- a/src/models/components/listwebhookaddressesresponse.ts +++ b/src/models/components/listwebhookaddressesresponse.ts @@ -5,41 +5,41 @@ import * as z from "zod"; export type ListWebhookAddressesResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - addresses: Array; - totalAddresses: number; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + addresses: Array; + totalAddresses: number; }; /** @internal */ export const ListWebhookAddressesResponse$inboundSchema: z.ZodType< - ListWebhookAddressesResponse, - z.ZodTypeDef, - unknown + ListWebhookAddressesResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - addresses: z.array(z.string()), - totalAddresses: z.number(), + nextPageToken: z.string().optional(), + addresses: z.array(z.string()), + totalAddresses: z.number(), }); /** @internal */ export type ListWebhookAddressesResponse$Outbound = { - nextPageToken?: string | undefined; - addresses: Array; - totalAddresses: number; + nextPageToken?: string | undefined; + addresses: Array; + totalAddresses: number; }; /** @internal */ export const ListWebhookAddressesResponse$outboundSchema: z.ZodType< - ListWebhookAddressesResponse$Outbound, - z.ZodTypeDef, - ListWebhookAddressesResponse + ListWebhookAddressesResponse$Outbound, + z.ZodTypeDef, + ListWebhookAddressesResponse > = z.object({ - nextPageToken: z.string().optional(), - addresses: z.array(z.string()), - totalAddresses: z.number(), + nextPageToken: z.string().optional(), + addresses: z.array(z.string()), + totalAddresses: z.number(), }); /** @@ -47,10 +47,10 @@ export const ListWebhookAddressesResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListWebhookAddressesResponse$ { - /** @deprecated use `ListWebhookAddressesResponse$inboundSchema` instead. */ - export const inboundSchema = ListWebhookAddressesResponse$inboundSchema; - /** @deprecated use `ListWebhookAddressesResponse$outboundSchema` instead. */ - export const outboundSchema = ListWebhookAddressesResponse$outboundSchema; - /** @deprecated use `ListWebhookAddressesResponse$Outbound` instead. */ - export type Outbound = ListWebhookAddressesResponse$Outbound; + /** @deprecated use `ListWebhookAddressesResponse$inboundSchema` instead. */ + export const inboundSchema = ListWebhookAddressesResponse$inboundSchema; + /** @deprecated use `ListWebhookAddressesResponse$outboundSchema` instead. */ + export const outboundSchema = ListWebhookAddressesResponse$outboundSchema; + /** @deprecated use `ListWebhookAddressesResponse$Outbound` instead. */ + export type Outbound = ListWebhookAddressesResponse$Outbound; } diff --git a/src/models/components/listwebhooksresponse.ts b/src/models/components/listwebhooksresponse.ts index e06832c..87f0f01 100644 --- a/src/models/components/listwebhooksresponse.ts +++ b/src/models/components/listwebhooksresponse.ts @@ -2,46 +2,46 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - WebhookResponse, - WebhookResponse$inboundSchema, - WebhookResponse$Outbound, - WebhookResponse$outboundSchema, + WebhookResponse, + WebhookResponse$inboundSchema, + WebhookResponse$Outbound, + WebhookResponse$outboundSchema, } from "./webhookresponse.js"; -import * as z from "zod"; export type ListWebhooksResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - webhooks: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + webhooks: Array; }; /** @internal */ export const ListWebhooksResponse$inboundSchema: z.ZodType< - ListWebhooksResponse, - z.ZodTypeDef, - unknown + ListWebhooksResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - webhooks: z.array(WebhookResponse$inboundSchema), + nextPageToken: z.string().optional(), + webhooks: z.array(WebhookResponse$inboundSchema), }); /** @internal */ export type ListWebhooksResponse$Outbound = { - nextPageToken?: string | undefined; - webhooks: Array; + nextPageToken?: string | undefined; + webhooks: Array; }; /** @internal */ export const ListWebhooksResponse$outboundSchema: z.ZodType< - ListWebhooksResponse$Outbound, - z.ZodTypeDef, - ListWebhooksResponse + ListWebhooksResponse$Outbound, + z.ZodTypeDef, + ListWebhooksResponse > = z.object({ - nextPageToken: z.string().optional(), - webhooks: z.array(WebhookResponse$outboundSchema), + nextPageToken: z.string().optional(), + webhooks: z.array(WebhookResponse$outboundSchema), }); /** @@ -49,10 +49,10 @@ export const ListWebhooksResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListWebhooksResponse$ { - /** @deprecated use `ListWebhooksResponse$inboundSchema` instead. */ - export const inboundSchema = ListWebhooksResponse$inboundSchema; - /** @deprecated use `ListWebhooksResponse$outboundSchema` instead. */ - export const outboundSchema = ListWebhooksResponse$outboundSchema; - /** @deprecated use `ListWebhooksResponse$Outbound` instead. */ - export type Outbound = ListWebhooksResponse$Outbound; + /** @deprecated use `ListWebhooksResponse$inboundSchema` instead. */ + export const inboundSchema = ListWebhooksResponse$inboundSchema; + /** @deprecated use `ListWebhooksResponse$outboundSchema` instead. */ + export const outboundSchema = ListWebhooksResponse$outboundSchema; + /** @deprecated use `ListWebhooksResponse$Outbound` instead. */ + export type Outbound = ListWebhooksResponse$Outbound; } diff --git a/src/models/components/listxchainbalancesresponse.ts b/src/models/components/listxchainbalancesresponse.ts index 8cc9402..e34cf57 100644 --- a/src/models/components/listxchainbalancesresponse.ts +++ b/src/models/components/listxchainbalancesresponse.ts @@ -2,49 +2,49 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PrimaryNetworkChainInfo, - PrimaryNetworkChainInfo$inboundSchema, - PrimaryNetworkChainInfo$Outbound, - PrimaryNetworkChainInfo$outboundSchema, + PrimaryNetworkChainInfo, + PrimaryNetworkChainInfo$inboundSchema, + PrimaryNetworkChainInfo$Outbound, + PrimaryNetworkChainInfo$outboundSchema, } from "./primarynetworkchaininfo.js"; import { - XChainBalances, - XChainBalances$inboundSchema, - XChainBalances$Outbound, - XChainBalances$outboundSchema, + XChainBalances, + XChainBalances$inboundSchema, + XChainBalances$Outbound, + XChainBalances$outboundSchema, } from "./xchainbalances.js"; -import * as z from "zod"; export type ListXChainBalancesResponse = { - balances: XChainBalances; - chainInfo: PrimaryNetworkChainInfo; + balances: XChainBalances; + chainInfo: PrimaryNetworkChainInfo; }; /** @internal */ export const ListXChainBalancesResponse$inboundSchema: z.ZodType< - ListXChainBalancesResponse, - z.ZodTypeDef, - unknown + ListXChainBalancesResponse, + z.ZodTypeDef, + unknown > = z.object({ - balances: XChainBalances$inboundSchema, - chainInfo: PrimaryNetworkChainInfo$inboundSchema, + balances: XChainBalances$inboundSchema, + chainInfo: PrimaryNetworkChainInfo$inboundSchema, }); /** @internal */ export type ListXChainBalancesResponse$Outbound = { - balances: XChainBalances$Outbound; - chainInfo: PrimaryNetworkChainInfo$Outbound; + balances: XChainBalances$Outbound; + chainInfo: PrimaryNetworkChainInfo$Outbound; }; /** @internal */ export const ListXChainBalancesResponse$outboundSchema: z.ZodType< - ListXChainBalancesResponse$Outbound, - z.ZodTypeDef, - ListXChainBalancesResponse + ListXChainBalancesResponse$Outbound, + z.ZodTypeDef, + ListXChainBalancesResponse > = z.object({ - balances: XChainBalances$outboundSchema, - chainInfo: PrimaryNetworkChainInfo$outboundSchema, + balances: XChainBalances$outboundSchema, + chainInfo: PrimaryNetworkChainInfo$outboundSchema, }); /** @@ -52,10 +52,10 @@ export const ListXChainBalancesResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListXChainBalancesResponse$ { - /** @deprecated use `ListXChainBalancesResponse$inboundSchema` instead. */ - export const inboundSchema = ListXChainBalancesResponse$inboundSchema; - /** @deprecated use `ListXChainBalancesResponse$outboundSchema` instead. */ - export const outboundSchema = ListXChainBalancesResponse$outboundSchema; - /** @deprecated use `ListXChainBalancesResponse$Outbound` instead. */ - export type Outbound = ListXChainBalancesResponse$Outbound; + /** @deprecated use `ListXChainBalancesResponse$inboundSchema` instead. */ + export const inboundSchema = ListXChainBalancesResponse$inboundSchema; + /** @deprecated use `ListXChainBalancesResponse$outboundSchema` instead. */ + export const outboundSchema = ListXChainBalancesResponse$outboundSchema; + /** @deprecated use `ListXChainBalancesResponse$Outbound` instead. */ + export type Outbound = ListXChainBalancesResponse$Outbound; } diff --git a/src/models/components/listxchaintransactionsresponse.ts b/src/models/components/listxchaintransactionsresponse.ts index ccac7da..a1d43a1 100644 --- a/src/models/components/listxchaintransactionsresponse.ts +++ b/src/models/components/listxchaintransactionsresponse.ts @@ -2,99 +2,114 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PrimaryNetworkChainInfo, - PrimaryNetworkChainInfo$inboundSchema, - PrimaryNetworkChainInfo$Outbound, - PrimaryNetworkChainInfo$outboundSchema, + PrimaryNetworkChainInfo, + PrimaryNetworkChainInfo$inboundSchema, + PrimaryNetworkChainInfo$Outbound, + PrimaryNetworkChainInfo$outboundSchema, } from "./primarynetworkchaininfo.js"; import { - XChainLinearTransaction, - XChainLinearTransaction$inboundSchema, - XChainLinearTransaction$Outbound, - XChainLinearTransaction$outboundSchema, + XChainLinearTransaction, + XChainLinearTransaction$inboundSchema, + XChainLinearTransaction$Outbound, + XChainLinearTransaction$outboundSchema, } from "./xchainlineartransaction.js"; import { - XChainNonLinearTransaction, - XChainNonLinearTransaction$inboundSchema, - XChainNonLinearTransaction$Outbound, - XChainNonLinearTransaction$outboundSchema, + XChainNonLinearTransaction, + XChainNonLinearTransaction$inboundSchema, + XChainNonLinearTransaction$Outbound, + XChainNonLinearTransaction$outboundSchema, } from "./xchainnonlineartransaction.js"; -import * as z from "zod"; export type Transactions = XChainNonLinearTransaction | XChainLinearTransaction; export type ListXChainTransactionsResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - transactions: Array; - chainInfo: PrimaryNetworkChainInfo; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + transactions: Array; + chainInfo: PrimaryNetworkChainInfo; }; /** @internal */ -export const Transactions$inboundSchema: z.ZodType = z.union([ - XChainNonLinearTransaction$inboundSchema, - XChainLinearTransaction$inboundSchema, +export const Transactions$inboundSchema: z.ZodType< + Transactions, + z.ZodTypeDef, + unknown +> = z.union([ + XChainNonLinearTransaction$inboundSchema, + XChainLinearTransaction$inboundSchema, ]); /** @internal */ export type Transactions$Outbound = - | XChainNonLinearTransaction$Outbound - | XChainLinearTransaction$Outbound; + | XChainNonLinearTransaction$Outbound + | XChainLinearTransaction$Outbound; /** @internal */ export const Transactions$outboundSchema: z.ZodType< - Transactions$Outbound, - z.ZodTypeDef, - Transactions -> = z.union([XChainNonLinearTransaction$outboundSchema, XChainLinearTransaction$outboundSchema]); + Transactions$Outbound, + z.ZodTypeDef, + Transactions +> = z.union([ + XChainNonLinearTransaction$outboundSchema, + XChainLinearTransaction$outboundSchema, +]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Transactions$ { - /** @deprecated use `Transactions$inboundSchema` instead. */ - export const inboundSchema = Transactions$inboundSchema; - /** @deprecated use `Transactions$outboundSchema` instead. */ - export const outboundSchema = Transactions$outboundSchema; - /** @deprecated use `Transactions$Outbound` instead. */ - export type Outbound = Transactions$Outbound; + /** @deprecated use `Transactions$inboundSchema` instead. */ + export const inboundSchema = Transactions$inboundSchema; + /** @deprecated use `Transactions$outboundSchema` instead. */ + export const outboundSchema = Transactions$outboundSchema; + /** @deprecated use `Transactions$Outbound` instead. */ + export type Outbound = Transactions$Outbound; } /** @internal */ export const ListXChainTransactionsResponse$inboundSchema: z.ZodType< - ListXChainTransactionsResponse, - z.ZodTypeDef, - unknown + ListXChainTransactionsResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - transactions: z.array( - z.union([XChainNonLinearTransaction$inboundSchema, XChainLinearTransaction$inboundSchema]) - ), - chainInfo: PrimaryNetworkChainInfo$inboundSchema, + nextPageToken: z.string().optional(), + transactions: z.array( + z.union([ + XChainNonLinearTransaction$inboundSchema, + XChainLinearTransaction$inboundSchema, + ]), + ), + chainInfo: PrimaryNetworkChainInfo$inboundSchema, }); /** @internal */ export type ListXChainTransactionsResponse$Outbound = { - nextPageToken?: string | undefined; - transactions: Array; - chainInfo: PrimaryNetworkChainInfo$Outbound; + nextPageToken?: string | undefined; + transactions: Array< + XChainNonLinearTransaction$Outbound | XChainLinearTransaction$Outbound + >; + chainInfo: PrimaryNetworkChainInfo$Outbound; }; /** @internal */ export const ListXChainTransactionsResponse$outboundSchema: z.ZodType< - ListXChainTransactionsResponse$Outbound, - z.ZodTypeDef, - ListXChainTransactionsResponse + ListXChainTransactionsResponse$Outbound, + z.ZodTypeDef, + ListXChainTransactionsResponse > = z.object({ - nextPageToken: z.string().optional(), - transactions: z.array( - z.union([XChainNonLinearTransaction$outboundSchema, XChainLinearTransaction$outboundSchema]) - ), - chainInfo: PrimaryNetworkChainInfo$outboundSchema, + nextPageToken: z.string().optional(), + transactions: z.array( + z.union([ + XChainNonLinearTransaction$outboundSchema, + XChainLinearTransaction$outboundSchema, + ]), + ), + chainInfo: PrimaryNetworkChainInfo$outboundSchema, }); /** @@ -102,10 +117,10 @@ export const ListXChainTransactionsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListXChainTransactionsResponse$ { - /** @deprecated use `ListXChainTransactionsResponse$inboundSchema` instead. */ - export const inboundSchema = ListXChainTransactionsResponse$inboundSchema; - /** @deprecated use `ListXChainTransactionsResponse$outboundSchema` instead. */ - export const outboundSchema = ListXChainTransactionsResponse$outboundSchema; - /** @deprecated use `ListXChainTransactionsResponse$Outbound` instead. */ - export type Outbound = ListXChainTransactionsResponse$Outbound; + /** @deprecated use `ListXChainTransactionsResponse$inboundSchema` instead. */ + export const inboundSchema = ListXChainTransactionsResponse$inboundSchema; + /** @deprecated use `ListXChainTransactionsResponse$outboundSchema` instead. */ + export const outboundSchema = ListXChainTransactionsResponse$outboundSchema; + /** @deprecated use `ListXChainTransactionsResponse$Outbound` instead. */ + export type Outbound = ListXChainTransactionsResponse$Outbound; } diff --git a/src/models/components/listxchainverticesresponse.ts b/src/models/components/listxchainverticesresponse.ts index 7418714..15233bf 100644 --- a/src/models/components/listxchainverticesresponse.ts +++ b/src/models/components/listxchainverticesresponse.ts @@ -2,56 +2,56 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PrimaryNetworkChainInfo, - PrimaryNetworkChainInfo$inboundSchema, - PrimaryNetworkChainInfo$Outbound, - PrimaryNetworkChainInfo$outboundSchema, + PrimaryNetworkChainInfo, + PrimaryNetworkChainInfo$inboundSchema, + PrimaryNetworkChainInfo$Outbound, + PrimaryNetworkChainInfo$outboundSchema, } from "./primarynetworkchaininfo.js"; import { - XChainVertex, - XChainVertex$inboundSchema, - XChainVertex$Outbound, - XChainVertex$outboundSchema, + XChainVertex, + XChainVertex$inboundSchema, + XChainVertex$Outbound, + XChainVertex$outboundSchema, } from "./xchainvertex.js"; -import * as z from "zod"; export type ListXChainVerticesResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - vertices: Array; - chainInfo: PrimaryNetworkChainInfo; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + vertices: Array; + chainInfo: PrimaryNetworkChainInfo; }; /** @internal */ export const ListXChainVerticesResponse$inboundSchema: z.ZodType< - ListXChainVerticesResponse, - z.ZodTypeDef, - unknown + ListXChainVerticesResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - vertices: z.array(XChainVertex$inboundSchema), - chainInfo: PrimaryNetworkChainInfo$inboundSchema, + nextPageToken: z.string().optional(), + vertices: z.array(XChainVertex$inboundSchema), + chainInfo: PrimaryNetworkChainInfo$inboundSchema, }); /** @internal */ export type ListXChainVerticesResponse$Outbound = { - nextPageToken?: string | undefined; - vertices: Array; - chainInfo: PrimaryNetworkChainInfo$Outbound; + nextPageToken?: string | undefined; + vertices: Array; + chainInfo: PrimaryNetworkChainInfo$Outbound; }; /** @internal */ export const ListXChainVerticesResponse$outboundSchema: z.ZodType< - ListXChainVerticesResponse$Outbound, - z.ZodTypeDef, - ListXChainVerticesResponse + ListXChainVerticesResponse$Outbound, + z.ZodTypeDef, + ListXChainVerticesResponse > = z.object({ - nextPageToken: z.string().optional(), - vertices: z.array(XChainVertex$outboundSchema), - chainInfo: PrimaryNetworkChainInfo$outboundSchema, + nextPageToken: z.string().optional(), + vertices: z.array(XChainVertex$outboundSchema), + chainInfo: PrimaryNetworkChainInfo$outboundSchema, }); /** @@ -59,10 +59,10 @@ export const ListXChainVerticesResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListXChainVerticesResponse$ { - /** @deprecated use `ListXChainVerticesResponse$inboundSchema` instead. */ - export const inboundSchema = ListXChainVerticesResponse$inboundSchema; - /** @deprecated use `ListXChainVerticesResponse$outboundSchema` instead. */ - export const outboundSchema = ListXChainVerticesResponse$outboundSchema; - /** @deprecated use `ListXChainVerticesResponse$Outbound` instead. */ - export type Outbound = ListXChainVerticesResponse$Outbound; + /** @deprecated use `ListXChainVerticesResponse$inboundSchema` instead. */ + export const inboundSchema = ListXChainVerticesResponse$inboundSchema; + /** @deprecated use `ListXChainVerticesResponse$outboundSchema` instead. */ + export const outboundSchema = ListXChainVerticesResponse$outboundSchema; + /** @deprecated use `ListXChainVerticesResponse$Outbound` instead. */ + export type Outbound = ListXChainVerticesResponse$Outbound; } diff --git a/src/models/components/logsformat.ts b/src/models/components/logsformat.ts index 90513d2..0a194db 100644 --- a/src/models/components/logsformat.ts +++ b/src/models/components/logsformat.ts @@ -2,142 +2,149 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - LogsFormatMetadata, - LogsFormatMetadata$inboundSchema, - LogsFormatMetadata$Outbound, - LogsFormatMetadata$outboundSchema, + LogsFormatMetadata, + LogsFormatMetadata$inboundSchema, + LogsFormatMetadata$Outbound, + LogsFormatMetadata$outboundSchema, } from "./logsformatmetadata.js"; import { - RequestType, - RequestType$inboundSchema, - RequestType$outboundSchema, + RequestType, + RequestType$inboundSchema, + RequestType$outboundSchema, } from "./requesttype.js"; -import * as z from "zod"; export type LogsFormat = { - /** - * The organization id of the request. - */ - orgId: string; - /** - * The unique log id of the request. - */ - logId: string; - /** - * The timestamp of the request. - */ - eventTimestamp: number; - /** - * The apiKey used to make the request. - */ - apiKeyId: string; - /** - * The alias of the apiKey used to make the request. - */ - apiKeyAlias: string; - /** - * The region of the host for the request made by the client. - */ - hostRegion: string; - /** - * The type of request made by the client. - */ - requestType: RequestType; - /** - * The path of the request made by the client. - */ - requestPath: string; - /** - * The number of API credits consumed by the request. - */ - apiCreditsConsumed: number; - /** - * The duration of the request in milliseconds. - */ - requestDurationMsecs: number; - /** - * The response code of the request. - */ - responseCode: number; - /** - * The chain id of the request. - */ - chainId?: string | undefined; - /** - * The rpc method of the request. - */ - rpcMethod?: string | undefined; - /** - * The metadata of the request. - */ - metadata: LogsFormatMetadata; + /** + * The organization id of the request. + */ + orgId: string; + /** + * The unique log id of the request. + */ + logId: string; + /** + * The timestamp of the request. + */ + eventTimestamp: number; + /** + * The apiKey used to make the request. + */ + apiKeyId: string; + /** + * The alias of the apiKey used to make the request. + */ + apiKeyAlias: string; + /** + * The region of the host for the request made by the client. + */ + hostRegion: string; + /** + * The type of request made by the client. + */ + requestType: RequestType; + /** + * The path of the request made by the client. + */ + requestPath: string; + /** + * The number of API credits consumed by the request. + */ + apiCreditsConsumed: number; + /** + * The duration of the request in milliseconds. + */ + requestDurationMsecs: number; + /** + * The response code of the request. + */ + responseCode: number; + /** + * The chain id of the request. + */ + chainId?: string | undefined; + /** + * The rpc method of the request. + */ + rpcMethod?: string | undefined; + /** + * The metadata of the request. + */ + metadata: LogsFormatMetadata; }; /** @internal */ -export const LogsFormat$inboundSchema: z.ZodType = z.object({ - orgId: z.string(), - logId: z.string(), - eventTimestamp: z.number(), - apiKeyId: z.string(), - apiKeyAlias: z.string(), - hostRegion: z.string(), - requestType: RequestType$inboundSchema, - requestPath: z.string(), - apiCreditsConsumed: z.number(), - requestDurationMsecs: z.number(), - responseCode: z.number(), - chainId: z.string().optional(), - rpcMethod: z.string().optional(), - metadata: LogsFormatMetadata$inboundSchema, +export const LogsFormat$inboundSchema: z.ZodType< + LogsFormat, + z.ZodTypeDef, + unknown +> = z.object({ + orgId: z.string(), + logId: z.string(), + eventTimestamp: z.number(), + apiKeyId: z.string(), + apiKeyAlias: z.string(), + hostRegion: z.string(), + requestType: RequestType$inboundSchema, + requestPath: z.string(), + apiCreditsConsumed: z.number(), + requestDurationMsecs: z.number(), + responseCode: z.number(), + chainId: z.string().optional(), + rpcMethod: z.string().optional(), + metadata: LogsFormatMetadata$inboundSchema, }); /** @internal */ export type LogsFormat$Outbound = { - orgId: string; - logId: string; - eventTimestamp: number; - apiKeyId: string; - apiKeyAlias: string; - hostRegion: string; - requestType: string; - requestPath: string; - apiCreditsConsumed: number; - requestDurationMsecs: number; - responseCode: number; - chainId?: string | undefined; - rpcMethod?: string | undefined; - metadata: LogsFormatMetadata$Outbound; + orgId: string; + logId: string; + eventTimestamp: number; + apiKeyId: string; + apiKeyAlias: string; + hostRegion: string; + requestType: string; + requestPath: string; + apiCreditsConsumed: number; + requestDurationMsecs: number; + responseCode: number; + chainId?: string | undefined; + rpcMethod?: string | undefined; + metadata: LogsFormatMetadata$Outbound; }; /** @internal */ -export const LogsFormat$outboundSchema: z.ZodType = - z.object({ - orgId: z.string(), - logId: z.string(), - eventTimestamp: z.number(), - apiKeyId: z.string(), - apiKeyAlias: z.string(), - hostRegion: z.string(), - requestType: RequestType$outboundSchema, - requestPath: z.string(), - apiCreditsConsumed: z.number(), - requestDurationMsecs: z.number(), - responseCode: z.number(), - chainId: z.string().optional(), - rpcMethod: z.string().optional(), - metadata: LogsFormatMetadata$outboundSchema, - }); +export const LogsFormat$outboundSchema: z.ZodType< + LogsFormat$Outbound, + z.ZodTypeDef, + LogsFormat +> = z.object({ + orgId: z.string(), + logId: z.string(), + eventTimestamp: z.number(), + apiKeyId: z.string(), + apiKeyAlias: z.string(), + hostRegion: z.string(), + requestType: RequestType$outboundSchema, + requestPath: z.string(), + apiCreditsConsumed: z.number(), + requestDurationMsecs: z.number(), + responseCode: z.number(), + chainId: z.string().optional(), + rpcMethod: z.string().optional(), + metadata: LogsFormatMetadata$outboundSchema, +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LogsFormat$ { - /** @deprecated use `LogsFormat$inboundSchema` instead. */ - export const inboundSchema = LogsFormat$inboundSchema; - /** @deprecated use `LogsFormat$outboundSchema` instead. */ - export const outboundSchema = LogsFormat$outboundSchema; - /** @deprecated use `LogsFormat$Outbound` instead. */ - export type Outbound = LogsFormat$Outbound; + /** @deprecated use `LogsFormat$inboundSchema` instead. */ + export const inboundSchema = LogsFormat$inboundSchema; + /** @deprecated use `LogsFormat$outboundSchema` instead. */ + export const outboundSchema = LogsFormat$outboundSchema; + /** @deprecated use `LogsFormat$Outbound` instead. */ + export type Outbound = LogsFormat$Outbound; } diff --git a/src/models/components/logsformatmetadata.ts b/src/models/components/logsformatmetadata.ts index b195399..4db0f81 100644 --- a/src/models/components/logsformatmetadata.ts +++ b/src/models/components/logsformatmetadata.ts @@ -5,47 +5,47 @@ import * as z from "zod"; export type LogsFormatMetadata = { - /** - * The IP address of the client that made the request. - */ - ipAddress: string; - /** - * The host for the request made by the client. - */ - host: string; - /** - * The user agent of the client that made the request. - */ - userAgent: string; + /** + * The IP address of the client that made the request. + */ + ipAddress: string; + /** + * The host for the request made by the client. + */ + host: string; + /** + * The user agent of the client that made the request. + */ + userAgent: string; }; /** @internal */ export const LogsFormatMetadata$inboundSchema: z.ZodType< - LogsFormatMetadata, - z.ZodTypeDef, - unknown + LogsFormatMetadata, + z.ZodTypeDef, + unknown > = z.object({ - ipAddress: z.string(), - host: z.string(), - userAgent: z.string(), + ipAddress: z.string(), + host: z.string(), + userAgent: z.string(), }); /** @internal */ export type LogsFormatMetadata$Outbound = { - ipAddress: string; - host: string; - userAgent: string; + ipAddress: string; + host: string; + userAgent: string; }; /** @internal */ export const LogsFormatMetadata$outboundSchema: z.ZodType< - LogsFormatMetadata$Outbound, - z.ZodTypeDef, - LogsFormatMetadata + LogsFormatMetadata$Outbound, + z.ZodTypeDef, + LogsFormatMetadata > = z.object({ - ipAddress: z.string(), - host: z.string(), - userAgent: z.string(), + ipAddress: z.string(), + host: z.string(), + userAgent: z.string(), }); /** @@ -53,10 +53,10 @@ export const LogsFormatMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LogsFormatMetadata$ { - /** @deprecated use `LogsFormatMetadata$inboundSchema` instead. */ - export const inboundSchema = LogsFormatMetadata$inboundSchema; - /** @deprecated use `LogsFormatMetadata$outboundSchema` instead. */ - export const outboundSchema = LogsFormatMetadata$outboundSchema; - /** @deprecated use `LogsFormatMetadata$Outbound` instead. */ - export type Outbound = LogsFormatMetadata$Outbound; + /** @deprecated use `LogsFormatMetadata$inboundSchema` instead. */ + export const inboundSchema = LogsFormatMetadata$inboundSchema; + /** @deprecated use `LogsFormatMetadata$outboundSchema` instead. */ + export const outboundSchema = LogsFormatMetadata$outboundSchema; + /** @deprecated use `LogsFormatMetadata$Outbound` instead. */ + export type Outbound = LogsFormatMetadata$Outbound; } diff --git a/src/models/components/logsresponsedto.ts b/src/models/components/logsresponsedto.ts index 2632858..802cd53 100644 --- a/src/models/components/logsresponsedto.ts +++ b/src/models/components/logsresponsedto.ts @@ -2,53 +2,56 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - LogsFormat, - LogsFormat$inboundSchema, - LogsFormat$Outbound, - LogsFormat$outboundSchema, + LogsFormat, + LogsFormat$inboundSchema, + LogsFormat$Outbound, + LogsFormat$outboundSchema, } from "./logsformat.js"; -import * as z from "zod"; export type LogsResponseDTO = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - /** - * The organization id of the request. - */ - orgId: string; - /** - * An array of logs representing the requests made by clients. - */ - logs: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + /** + * The organization id of the request. + */ + orgId: string; + /** + * An array of logs representing the requests made by clients. + */ + logs: Array; }; /** @internal */ -export const LogsResponseDTO$inboundSchema: z.ZodType = - z.object({ - nextPageToken: z.string().optional(), - orgId: z.string(), - logs: z.array(LogsFormat$inboundSchema), - }); +export const LogsResponseDTO$inboundSchema: z.ZodType< + LogsResponseDTO, + z.ZodTypeDef, + unknown +> = z.object({ + nextPageToken: z.string().optional(), + orgId: z.string(), + logs: z.array(LogsFormat$inboundSchema), +}); /** @internal */ export type LogsResponseDTO$Outbound = { - nextPageToken?: string | undefined; - orgId: string; - logs: Array; + nextPageToken?: string | undefined; + orgId: string; + logs: Array; }; /** @internal */ export const LogsResponseDTO$outboundSchema: z.ZodType< - LogsResponseDTO$Outbound, - z.ZodTypeDef, - LogsResponseDTO + LogsResponseDTO$Outbound, + z.ZodTypeDef, + LogsResponseDTO > = z.object({ - nextPageToken: z.string().optional(), - orgId: z.string(), - logs: z.array(LogsFormat$outboundSchema), + nextPageToken: z.string().optional(), + orgId: z.string(), + logs: z.array(LogsFormat$outboundSchema), }); /** @@ -56,10 +59,10 @@ export const LogsResponseDTO$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LogsResponseDTO$ { - /** @deprecated use `LogsResponseDTO$inboundSchema` instead. */ - export const inboundSchema = LogsResponseDTO$inboundSchema; - /** @deprecated use `LogsResponseDTO$outboundSchema` instead. */ - export const outboundSchema = LogsResponseDTO$outboundSchema; - /** @deprecated use `LogsResponseDTO$Outbound` instead. */ - export type Outbound = LogsResponseDTO$Outbound; + /** @deprecated use `LogsResponseDTO$inboundSchema` instead. */ + export const inboundSchema = LogsResponseDTO$inboundSchema; + /** @deprecated use `LogsResponseDTO$outboundSchema` instead. */ + export const outboundSchema = LogsResponseDTO$outboundSchema; + /** @deprecated use `LogsResponseDTO$Outbound` instead. */ + export type Outbound = LogsResponseDTO$Outbound; } diff --git a/src/models/components/lookingglassresponse.ts b/src/models/components/lookingglassresponse.ts index 15d86c1..446f928 100644 --- a/src/models/components/lookingglassresponse.ts +++ b/src/models/components/lookingglassresponse.ts @@ -2,49 +2,49 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - AddressDetails, - AddressDetails$inboundSchema, - AddressDetails$Outbound, - AddressDetails$outboundSchema, + AddressDetails, + AddressDetails$inboundSchema, + AddressDetails$Outbound, + AddressDetails$outboundSchema, } from "./addressdetails.js"; -import * as z from "zod"; export type LookingGlassResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - /** - * List of addresses that match provided criteria. - */ - addresses: AddressDetails; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + /** + * List of addresses that match provided criteria. + */ + addresses: AddressDetails; }; /** @internal */ export const LookingGlassResponse$inboundSchema: z.ZodType< - LookingGlassResponse, - z.ZodTypeDef, - unknown + LookingGlassResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - addresses: AddressDetails$inboundSchema, + nextPageToken: z.string().optional(), + addresses: AddressDetails$inboundSchema, }); /** @internal */ export type LookingGlassResponse$Outbound = { - nextPageToken?: string | undefined; - addresses: AddressDetails$Outbound; + nextPageToken?: string | undefined; + addresses: AddressDetails$Outbound; }; /** @internal */ export const LookingGlassResponse$outboundSchema: z.ZodType< - LookingGlassResponse$Outbound, - z.ZodTypeDef, - LookingGlassResponse + LookingGlassResponse$Outbound, + z.ZodTypeDef, + LookingGlassResponse > = z.object({ - nextPageToken: z.string().optional(), - addresses: AddressDetails$outboundSchema, + nextPageToken: z.string().optional(), + addresses: AddressDetails$outboundSchema, }); /** @@ -52,10 +52,10 @@ export const LookingGlassResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LookingGlassResponse$ { - /** @deprecated use `LookingGlassResponse$inboundSchema` instead. */ - export const inboundSchema = LookingGlassResponse$inboundSchema; - /** @deprecated use `LookingGlassResponse$outboundSchema` instead. */ - export const outboundSchema = LookingGlassResponse$outboundSchema; - /** @deprecated use `LookingGlassResponse$Outbound` instead. */ - export type Outbound = LookingGlassResponse$Outbound; + /** @deprecated use `LookingGlassResponse$inboundSchema` instead. */ + export const inboundSchema = LookingGlassResponse$inboundSchema; + /** @deprecated use `LookingGlassResponse$outboundSchema` instead. */ + export const outboundSchema = LookingGlassResponse$outboundSchema; + /** @deprecated use `LookingGlassResponse$Outbound` instead. */ + export type Outbound = LookingGlassResponse$Outbound; } diff --git a/src/models/components/method.ts b/src/models/components/method.ts index 62a147a..a709681 100644 --- a/src/models/components/method.ts +++ b/src/models/components/method.ts @@ -2,47 +2,52 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - TransactionMethodType, - TransactionMethodType$inboundSchema, - TransactionMethodType$outboundSchema, + TransactionMethodType, + TransactionMethodType$inboundSchema, + TransactionMethodType$outboundSchema, } from "./transactionmethodtype.js"; -import * as z from "zod"; export type Method = { - /** - * The contract call type. NATIVE_TRANSFER indicates a transfer of the native token without any smart-contract interaction. CONTRACT_CALL indicates a smart-contract interaction. CONTRACT_CREATION indicates a smart-contract creation. - */ - callType: TransactionMethodType; - /** - * The contract method hash identifier. The method hash is only set if the `callType` is `CONTRACT_CALL`. - */ - methodHash: string; - /** - * The contract method name including parameter types. If the `callType` is `NATIVE_TRANSFER` this is set to 'Native Transfer'. If the `callType` is `CONTRACT_CREATION` this is set to 'Contract Created'. - */ - methodName?: string | undefined; + /** + * The contract call type. NATIVE_TRANSFER indicates a transfer of the native token without any smart-contract interaction. CONTRACT_CALL indicates a smart-contract interaction. CONTRACT_CREATION indicates a smart-contract creation. + */ + callType: TransactionMethodType; + /** + * The contract method hash identifier. The method hash is only set if the `callType` is `CONTRACT_CALL`. + */ + methodHash: string; + /** + * The contract method name including parameter types. If the `callType` is `NATIVE_TRANSFER` this is set to 'Native Transfer'. If the `callType` is `CONTRACT_CREATION` this is set to 'Contract Created'. + */ + methodName?: string | undefined; }; /** @internal */ -export const Method$inboundSchema: z.ZodType = z.object({ +export const Method$inboundSchema: z.ZodType = z + .object({ callType: TransactionMethodType$inboundSchema, methodHash: z.string(), methodName: z.string().optional(), -}); + }); /** @internal */ export type Method$Outbound = { - callType: string; - methodHash: string; - methodName?: string | undefined; + callType: string; + methodHash: string; + methodName?: string | undefined; }; /** @internal */ -export const Method$outboundSchema: z.ZodType = z.object({ - callType: TransactionMethodType$outboundSchema, - methodHash: z.string(), - methodName: z.string().optional(), +export const Method$outboundSchema: z.ZodType< + Method$Outbound, + z.ZodTypeDef, + Method +> = z.object({ + callType: TransactionMethodType$outboundSchema, + methodHash: z.string(), + methodName: z.string().optional(), }); /** @@ -50,10 +55,10 @@ export const Method$outboundSchema: z.ZodType; + /** + * The timestamp of the metrics value + */ + timestamp: number; + /** + * The metrics values for the timestamp + */ + values: Array; }; /** @internal */ -export const Metric$inboundSchema: z.ZodType = z.object({ +export const Metric$inboundSchema: z.ZodType = z + .object({ timestamp: z.number(), values: z.array(UsageMetricsValueDTO$inboundSchema), -}); + }); /** @internal */ export type Metric$Outbound = { - timestamp: number; - values: Array; + timestamp: number; + values: Array; }; /** @internal */ -export const Metric$outboundSchema: z.ZodType = z.object({ - timestamp: z.number(), - values: z.array(UsageMetricsValueDTO$outboundSchema), +export const Metric$outboundSchema: z.ZodType< + Metric$Outbound, + z.ZodTypeDef, + Metric +> = z.object({ + timestamp: z.number(), + values: z.array(UsageMetricsValueDTO$outboundSchema), }); /** @@ -44,10 +49,10 @@ export const Metric$outboundSchema: z.ZodType; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + /** + * Array of current metrics values at different timestamps. + */ + results: Array; }; /** @internal */ export const MetricsApiResponse$inboundSchema: z.ZodType< - MetricsApiResponse, - z.ZodTypeDef, - unknown + MetricsApiResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - results: z.array(MetricsValue$inboundSchema), + nextPageToken: z.string().optional(), + results: z.array(MetricsValue$inboundSchema), }); /** @internal */ export type MetricsApiResponse$Outbound = { - nextPageToken?: string | undefined; - results: Array; + nextPageToken?: string | undefined; + results: Array; }; /** @internal */ export const MetricsApiResponse$outboundSchema: z.ZodType< - MetricsApiResponse$Outbound, - z.ZodTypeDef, - MetricsApiResponse + MetricsApiResponse$Outbound, + z.ZodTypeDef, + MetricsApiResponse > = z.object({ - nextPageToken: z.string().optional(), - results: z.array(MetricsValue$outboundSchema), + nextPageToken: z.string().optional(), + results: z.array(MetricsValue$outboundSchema), }); /** @@ -52,10 +52,10 @@ export const MetricsApiResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MetricsApiResponse$ { - /** @deprecated use `MetricsApiResponse$inboundSchema` instead. */ - export const inboundSchema = MetricsApiResponse$inboundSchema; - /** @deprecated use `MetricsApiResponse$outboundSchema` instead. */ - export const outboundSchema = MetricsApiResponse$outboundSchema; - /** @deprecated use `MetricsApiResponse$Outbound` instead. */ - export type Outbound = MetricsApiResponse$Outbound; + /** @deprecated use `MetricsApiResponse$inboundSchema` instead. */ + export const inboundSchema = MetricsApiResponse$inboundSchema; + /** @deprecated use `MetricsApiResponse$outboundSchema` instead. */ + export const outboundSchema = MetricsApiResponse$outboundSchema; + /** @deprecated use `MetricsApiResponse$Outbound` instead. */ + export type Outbound = MetricsApiResponse$Outbound; } diff --git a/src/models/components/metricslistchainsresponse.ts b/src/models/components/metricslistchainsresponse.ts index bffbe38..3d0e9d2 100644 --- a/src/models/components/metricslistchainsresponse.ts +++ b/src/models/components/metricslistchainsresponse.ts @@ -2,44 +2,49 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { Chain, Chain$inboundSchema, Chain$Outbound, Chain$outboundSchema } from "./chain.js"; import * as z from "zod"; +import { + Chain, + Chain$inboundSchema, + Chain$Outbound, + Chain$outboundSchema, +} from "./chain.js"; export type MetricsListChainsResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - /** - * Array of Subnet - EVM Chain ID mappings whose metrics we support. - */ - chains: Array; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + /** + * Array of Subnet - EVM Chain ID mappings whose metrics we support. + */ + chains: Array; }; /** @internal */ export const MetricsListChainsResponse$inboundSchema: z.ZodType< - MetricsListChainsResponse, - z.ZodTypeDef, - unknown + MetricsListChainsResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - chains: z.array(Chain$inboundSchema), + nextPageToken: z.string().optional(), + chains: z.array(Chain$inboundSchema), }); /** @internal */ export type MetricsListChainsResponse$Outbound = { - nextPageToken?: string | undefined; - chains: Array; + nextPageToken?: string | undefined; + chains: Array; }; /** @internal */ export const MetricsListChainsResponse$outboundSchema: z.ZodType< - MetricsListChainsResponse$Outbound, - z.ZodTypeDef, - MetricsListChainsResponse + MetricsListChainsResponse$Outbound, + z.ZodTypeDef, + MetricsListChainsResponse > = z.object({ - nextPageToken: z.string().optional(), - chains: z.array(Chain$outboundSchema), + nextPageToken: z.string().optional(), + chains: z.array(Chain$outboundSchema), }); /** @@ -47,10 +52,10 @@ export const MetricsListChainsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MetricsListChainsResponse$ { - /** @deprecated use `MetricsListChainsResponse$inboundSchema` instead. */ - export const inboundSchema = MetricsListChainsResponse$inboundSchema; - /** @deprecated use `MetricsListChainsResponse$outboundSchema` instead. */ - export const outboundSchema = MetricsListChainsResponse$outboundSchema; - /** @deprecated use `MetricsListChainsResponse$Outbound` instead. */ - export type Outbound = MetricsListChainsResponse$Outbound; + /** @deprecated use `MetricsListChainsResponse$inboundSchema` instead. */ + export const inboundSchema = MetricsListChainsResponse$inboundSchema; + /** @deprecated use `MetricsListChainsResponse$outboundSchema` instead. */ + export const outboundSchema = MetricsListChainsResponse$outboundSchema; + /** @deprecated use `MetricsListChainsResponse$Outbound` instead. */ + export type Outbound = MetricsListChainsResponse$Outbound; } diff --git a/src/models/components/metricsvalue.ts b/src/models/components/metricsvalue.ts index 3db6068..bed671e 100644 --- a/src/models/components/metricsvalue.ts +++ b/src/models/components/metricsvalue.ts @@ -5,36 +5,40 @@ import * as z from "zod"; export type MetricsValue = { - /** - * Aggregated value for the current metrics. - */ - value: number; - /** - * Timestamp at which metrics are aggregated. - */ - timestamp: number; + /** + * Aggregated value for the current metrics. + */ + value: number; + /** + * Timestamp at which metrics are aggregated. + */ + timestamp: number; }; /** @internal */ -export const MetricsValue$inboundSchema: z.ZodType = z.object({ - value: z.number(), - timestamp: z.number(), +export const MetricsValue$inboundSchema: z.ZodType< + MetricsValue, + z.ZodTypeDef, + unknown +> = z.object({ + value: z.number(), + timestamp: z.number(), }); /** @internal */ export type MetricsValue$Outbound = { - value: number; - timestamp: number; + value: number; + timestamp: number; }; /** @internal */ export const MetricsValue$outboundSchema: z.ZodType< - MetricsValue$Outbound, - z.ZodTypeDef, - MetricsValue + MetricsValue$Outbound, + z.ZodTypeDef, + MetricsValue > = z.object({ - value: z.number(), - timestamp: z.number(), + value: z.number(), + timestamp: z.number(), }); /** @@ -42,10 +46,10 @@ export const MetricsValue$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MetricsValue$ { - /** @deprecated use `MetricsValue$inboundSchema` instead. */ - export const inboundSchema = MetricsValue$inboundSchema; - /** @deprecated use `MetricsValue$outboundSchema` instead. */ - export const outboundSchema = MetricsValue$outboundSchema; - /** @deprecated use `MetricsValue$Outbound` instead. */ - export type Outbound = MetricsValue$Outbound; + /** @deprecated use `MetricsValue$inboundSchema` instead. */ + export const inboundSchema = MetricsValue$inboundSchema; + /** @deprecated use `MetricsValue$outboundSchema` instead. */ + export const outboundSchema = MetricsValue$outboundSchema; + /** @deprecated use `MetricsValue$Outbound` instead. */ + export type Outbound = MetricsValue$Outbound; } diff --git a/src/models/components/money.ts b/src/models/components/money.ts index b50b21e..003de42 100644 --- a/src/models/components/money.ts +++ b/src/models/components/money.ts @@ -2,40 +2,45 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - CurrencyCode, - CurrencyCode$inboundSchema, - CurrencyCode$outboundSchema, + CurrencyCode, + CurrencyCode$inboundSchema, + CurrencyCode$outboundSchema, } from "./currencycode.js"; -import * as z from "zod"; export type Money = { - /** - * ISO 4217 currency code. - */ - currencyCode: CurrencyCode; - /** - * Monetary value in base 10 decimals. - */ - value: number; + /** + * ISO 4217 currency code. + */ + currencyCode: CurrencyCode; + /** + * Monetary value in base 10 decimals. + */ + value: number; }; /** @internal */ -export const Money$inboundSchema: z.ZodType = z.object({ +export const Money$inboundSchema: z.ZodType = z + .object({ currencyCode: CurrencyCode$inboundSchema, value: z.number(), -}); + }); /** @internal */ export type Money$Outbound = { - currencyCode: string; - value: number; + currencyCode: string; + value: number; }; /** @internal */ -export const Money$outboundSchema: z.ZodType = z.object({ - currencyCode: CurrencyCode$outboundSchema, - value: z.number(), +export const Money$outboundSchema: z.ZodType< + Money$Outbound, + z.ZodTypeDef, + Money +> = z.object({ + currencyCode: CurrencyCode$outboundSchema, + value: z.number(), }); /** @@ -43,10 +48,10 @@ export const Money$outboundSchema: z.ZodType = z.object({ - name: z.string(), - symbol: z.string(), - decimals: z.number(), - logoUri: z.string().optional(), - chainId: z.string(), - price: Money$inboundSchema.optional(), - balance: z.string(), - balanceValue: Money$inboundSchema.optional(), + name: z.string(), + symbol: z.string(), + decimals: z.number(), + logoUri: z.string().optional(), + chainId: z.string(), + price: Money$inboundSchema.optional(), + balance: z.string(), + balanceValue: Money$inboundSchema.optional(), }); /** @internal */ export type NativeTokenBalance$Outbound = { - name: string; - symbol: string; - decimals: number; - logoUri?: string | undefined; - chainId: string; - price?: Money$Outbound | undefined; - balance: string; - balanceValue?: Money$Outbound | undefined; + name: string; + symbol: string; + decimals: number; + logoUri?: string | undefined; + chainId: string; + price?: Money$Outbound | undefined; + balance: string; + balanceValue?: Money$Outbound | undefined; }; /** @internal */ export const NativeTokenBalance$outboundSchema: z.ZodType< - NativeTokenBalance$Outbound, - z.ZodTypeDef, - NativeTokenBalance + NativeTokenBalance$Outbound, + z.ZodTypeDef, + NativeTokenBalance > = z.object({ - name: z.string(), - symbol: z.string(), - decimals: z.number(), - logoUri: z.string().optional(), - chainId: z.string(), - price: Money$outboundSchema.optional(), - balance: z.string(), - balanceValue: Money$outboundSchema.optional(), + name: z.string(), + symbol: z.string(), + decimals: z.number(), + logoUri: z.string().optional(), + chainId: z.string(), + price: Money$outboundSchema.optional(), + balance: z.string(), + balanceValue: Money$outboundSchema.optional(), }); /** @@ -89,10 +94,10 @@ export const NativeTokenBalance$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NativeTokenBalance$ { - /** @deprecated use `NativeTokenBalance$inboundSchema` instead. */ - export const inboundSchema = NativeTokenBalance$inboundSchema; - /** @deprecated use `NativeTokenBalance$outboundSchema` instead. */ - export const outboundSchema = NativeTokenBalance$outboundSchema; - /** @deprecated use `NativeTokenBalance$Outbound` instead. */ - export type Outbound = NativeTokenBalance$Outbound; + /** @deprecated use `NativeTokenBalance$inboundSchema` instead. */ + export const inboundSchema = NativeTokenBalance$inboundSchema; + /** @deprecated use `NativeTokenBalance$outboundSchema` instead. */ + export const outboundSchema = NativeTokenBalance$outboundSchema; + /** @deprecated use `NativeTokenBalance$Outbound` instead. */ + export type Outbound = NativeTokenBalance$Outbound; } diff --git a/src/models/components/nativetransaction.ts b/src/models/components/nativetransaction.ts index 87f0580..a3dea00 100644 --- a/src/models/components/nativetransaction.ts +++ b/src/models/components/nativetransaction.ts @@ -2,126 +2,134 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { Method, Method$inboundSchema, Method$Outbound, Method$outboundSchema } from "./method.js"; +import * as z from "zod"; +import { + Method, + Method$inboundSchema, + Method$Outbound, + Method$outboundSchema, +} from "./method.js"; import { - RichAddress, - RichAddress$inboundSchema, - RichAddress$Outbound, - RichAddress$outboundSchema, + RichAddress, + RichAddress$inboundSchema, + RichAddress$Outbound, + RichAddress$outboundSchema, } from "./richaddress.js"; -import * as z from "zod"; export type NativeTransaction = { - /** - * The block number on the chain. - */ - blockNumber: string; - /** - * The block finality timestamp. - */ - blockTimestamp: number; - /** - * The block hash identifier. - */ - blockHash: string; - /** - * The index at which the transaction occured in the block (0-indexed). - */ - blockIndex: number; - /** - * The transaction hash identifier. - */ - txHash: string; - /** - * The transaction status, which is either 0 (failed) or 1 (successful). - */ - txStatus: string; - /** - * The transaction type. - */ - txType: number; - /** - * The gas limit set for the transaction. - */ - gasLimit: string; - /** - * The amount of gas used. - */ - gasUsed: string; - /** - * The gas price denominated by the number of decimals of the native token. - */ - gasPrice: string; - /** - * The nonce used by the sender of the transaction. - */ - nonce: string; - from: RichAddress; - to: RichAddress; - method?: Method | undefined; - value: string; + /** + * The block number on the chain. + */ + blockNumber: string; + /** + * The block finality timestamp. + */ + blockTimestamp: number; + /** + * The block hash identifier. + */ + blockHash: string; + /** + * The index at which the transaction occured in the block (0-indexed). + */ + blockIndex: number; + /** + * The transaction hash identifier. + */ + txHash: string; + /** + * The transaction status, which is either 0 (failed) or 1 (successful). + */ + txStatus: string; + /** + * The transaction type. + */ + txType: number; + /** + * The gas limit set for the transaction. + */ + gasLimit: string; + /** + * The amount of gas used. + */ + gasUsed: string; + /** + * The gas price denominated by the number of decimals of the native token. + */ + gasPrice: string; + /** + * The nonce used by the sender of the transaction. + */ + nonce: string; + from: RichAddress; + to: RichAddress; + method?: Method | undefined; + value: string; }; /** @internal */ -export const NativeTransaction$inboundSchema: z.ZodType = - z.object({ - blockNumber: z.string(), - blockTimestamp: z.number(), - blockHash: z.string(), - blockIndex: z.number(), - txHash: z.string(), - txStatus: z.string(), - txType: z.number(), - gasLimit: z.string(), - gasUsed: z.string(), - gasPrice: z.string(), - nonce: z.string(), - from: RichAddress$inboundSchema, - to: RichAddress$inboundSchema, - method: Method$inboundSchema.optional(), - value: z.string(), - }); +export const NativeTransaction$inboundSchema: z.ZodType< + NativeTransaction, + z.ZodTypeDef, + unknown +> = z.object({ + blockNumber: z.string(), + blockTimestamp: z.number(), + blockHash: z.string(), + blockIndex: z.number(), + txHash: z.string(), + txStatus: z.string(), + txType: z.number(), + gasLimit: z.string(), + gasUsed: z.string(), + gasPrice: z.string(), + nonce: z.string(), + from: RichAddress$inboundSchema, + to: RichAddress$inboundSchema, + method: Method$inboundSchema.optional(), + value: z.string(), +}); /** @internal */ export type NativeTransaction$Outbound = { - blockNumber: string; - blockTimestamp: number; - blockHash: string; - blockIndex: number; - txHash: string; - txStatus: string; - txType: number; - gasLimit: string; - gasUsed: string; - gasPrice: string; - nonce: string; - from: RichAddress$Outbound; - to: RichAddress$Outbound; - method?: Method$Outbound | undefined; - value: string; + blockNumber: string; + blockTimestamp: number; + blockHash: string; + blockIndex: number; + txHash: string; + txStatus: string; + txType: number; + gasLimit: string; + gasUsed: string; + gasPrice: string; + nonce: string; + from: RichAddress$Outbound; + to: RichAddress$Outbound; + method?: Method$Outbound | undefined; + value: string; }; /** @internal */ export const NativeTransaction$outboundSchema: z.ZodType< - NativeTransaction$Outbound, - z.ZodTypeDef, - NativeTransaction + NativeTransaction$Outbound, + z.ZodTypeDef, + NativeTransaction > = z.object({ - blockNumber: z.string(), - blockTimestamp: z.number(), - blockHash: z.string(), - blockIndex: z.number(), - txHash: z.string(), - txStatus: z.string(), - txType: z.number(), - gasLimit: z.string(), - gasUsed: z.string(), - gasPrice: z.string(), - nonce: z.string(), - from: RichAddress$outboundSchema, - to: RichAddress$outboundSchema, - method: Method$outboundSchema.optional(), - value: z.string(), + blockNumber: z.string(), + blockTimestamp: z.number(), + blockHash: z.string(), + blockIndex: z.number(), + txHash: z.string(), + txStatus: z.string(), + txType: z.number(), + gasLimit: z.string(), + gasUsed: z.string(), + gasPrice: z.string(), + nonce: z.string(), + from: RichAddress$outboundSchema, + to: RichAddress$outboundSchema, + method: Method$outboundSchema.optional(), + value: z.string(), }); /** @@ -129,10 +137,10 @@ export const NativeTransaction$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NativeTransaction$ { - /** @deprecated use `NativeTransaction$inboundSchema` instead. */ - export const inboundSchema = NativeTransaction$inboundSchema; - /** @deprecated use `NativeTransaction$outboundSchema` instead. */ - export const outboundSchema = NativeTransaction$outboundSchema; - /** @deprecated use `NativeTransaction$Outbound` instead. */ - export type Outbound = NativeTransaction$Outbound; + /** @deprecated use `NativeTransaction$inboundSchema` instead. */ + export const inboundSchema = NativeTransaction$inboundSchema; + /** @deprecated use `NativeTransaction$outboundSchema` instead. */ + export const outboundSchema = NativeTransaction$outboundSchema; + /** @deprecated use `NativeTransaction$Outbound` instead. */ + export type Outbound = NativeTransaction$Outbound; } diff --git a/src/models/components/networkmetric.ts b/src/models/components/networkmetric.ts index f0a2cb2..035829f 100644 --- a/src/models/components/networkmetric.ts +++ b/src/models/components/networkmetric.ts @@ -2,32 +2,34 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const NetworkMetric = { - DelegatorCount: "delegatorCount", - DelegatorWeight: "delegatorWeight", - ValidatorCount: "validatorCount", - ValidatorWeight: "validatorWeight", + DelegatorCount: "delegatorCount", + DelegatorWeight: "delegatorWeight", + ValidatorCount: "validatorCount", + ValidatorWeight: "validatorWeight", } as const; export type NetworkMetric = ClosedEnum; /** @internal */ -export const NetworkMetric$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(NetworkMetric); +export const NetworkMetric$inboundSchema: z.ZodNativeEnum< + typeof NetworkMetric +> = z.nativeEnum(NetworkMetric); /** @internal */ -export const NetworkMetric$outboundSchema: z.ZodNativeEnum = - NetworkMetric$inboundSchema; +export const NetworkMetric$outboundSchema: z.ZodNativeEnum< + typeof NetworkMetric +> = NetworkMetric$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NetworkMetric$ { - /** @deprecated use `NetworkMetric$inboundSchema` instead. */ - export const inboundSchema = NetworkMetric$inboundSchema; - /** @deprecated use `NetworkMetric$outboundSchema` instead. */ - export const outboundSchema = NetworkMetric$outboundSchema; + /** @deprecated use `NetworkMetric$inboundSchema` instead. */ + export const inboundSchema = NetworkMetric$inboundSchema; + /** @deprecated use `NetworkMetric$outboundSchema` instead. */ + export const outboundSchema = NetworkMetric$outboundSchema; } diff --git a/src/models/components/networktoken.ts b/src/models/components/networktoken.ts index 7b7b048..7f1e29e 100644 --- a/src/models/components/networktoken.ts +++ b/src/models/components/networktoken.ts @@ -5,54 +5,58 @@ import * as z from "zod"; export type NetworkToken = { - /** - * The contract name. - */ - name: string; - /** - * The contract symbol. - */ - symbol: string; - /** - * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation. - */ - decimals: number; - /** - * The logo uri for the address. - */ - logoUri?: string | undefined; - description?: string | undefined; + /** + * The contract name. + */ + name: string; + /** + * The contract symbol. + */ + symbol: string; + /** + * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation. + */ + decimals: number; + /** + * The logo uri for the address. + */ + logoUri?: string | undefined; + description?: string | undefined; }; /** @internal */ -export const NetworkToken$inboundSchema: z.ZodType = z.object({ - name: z.string(), - symbol: z.string(), - decimals: z.number(), - logoUri: z.string().optional(), - description: z.string().optional(), +export const NetworkToken$inboundSchema: z.ZodType< + NetworkToken, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + symbol: z.string(), + decimals: z.number(), + logoUri: z.string().optional(), + description: z.string().optional(), }); /** @internal */ export type NetworkToken$Outbound = { - name: string; - symbol: string; - decimals: number; - logoUri?: string | undefined; - description?: string | undefined; + name: string; + symbol: string; + decimals: number; + logoUri?: string | undefined; + description?: string | undefined; }; /** @internal */ export const NetworkToken$outboundSchema: z.ZodType< - NetworkToken$Outbound, - z.ZodTypeDef, - NetworkToken + NetworkToken$Outbound, + z.ZodTypeDef, + NetworkToken > = z.object({ - name: z.string(), - symbol: z.string(), - decimals: z.number(), - logoUri: z.string().optional(), - description: z.string().optional(), + name: z.string(), + symbol: z.string(), + decimals: z.number(), + logoUri: z.string().optional(), + description: z.string().optional(), }); /** @@ -60,10 +64,10 @@ export const NetworkToken$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NetworkToken$ { - /** @deprecated use `NetworkToken$inboundSchema` instead. */ - export const inboundSchema = NetworkToken$inboundSchema; - /** @deprecated use `NetworkToken$outboundSchema` instead. */ - export const outboundSchema = NetworkToken$outboundSchema; - /** @deprecated use `NetworkToken$Outbound` instead. */ - export type Outbound = NetworkToken$Outbound; + /** @deprecated use `NetworkToken$inboundSchema` instead. */ + export const inboundSchema = NetworkToken$inboundSchema; + /** @deprecated use `NetworkToken$outboundSchema` instead. */ + export const outboundSchema = NetworkToken$outboundSchema; + /** @deprecated use `NetworkToken$Outbound` instead. */ + export type Outbound = NetworkToken$Outbound; } diff --git a/src/models/components/networktokendetails.ts b/src/models/components/networktokendetails.ts index b5a2660..cc026c0 100644 --- a/src/models/components/networktokendetails.ts +++ b/src/models/components/networktokendetails.ts @@ -2,54 +2,59 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { Money, Money$inboundSchema, Money$Outbound, Money$outboundSchema } from "./money.js"; +import * as z from "zod"; +import { + Money, + Money$inboundSchema, + Money$Outbound, + Money$outboundSchema, +} from "./money.js"; import { - NetworkToken, - NetworkToken$inboundSchema, - NetworkToken$Outbound, - NetworkToken$outboundSchema, + NetworkToken, + NetworkToken$inboundSchema, + NetworkToken$Outbound, + NetworkToken$outboundSchema, } from "./networktoken.js"; -import * as z from "zod"; export type NetworkTokenDetails = { - networkToken: NetworkToken; - /** - * The current token price, if available. - */ - currentPrice?: Money | undefined; - /** - * The historical token price at the time the transaction occured, if available. Note, this is only provided if the transaction occured more than 24 hours ago. - */ - historicalPrice?: Money | undefined; + networkToken: NetworkToken; + /** + * The current token price, if available. + */ + currentPrice?: Money | undefined; + /** + * The historical token price at the time the transaction occured, if available. Note, this is only provided if the transaction occured more than 24 hours ago. + */ + historicalPrice?: Money | undefined; }; /** @internal */ export const NetworkTokenDetails$inboundSchema: z.ZodType< - NetworkTokenDetails, - z.ZodTypeDef, - unknown + NetworkTokenDetails, + z.ZodTypeDef, + unknown > = z.object({ - networkToken: NetworkToken$inboundSchema, - currentPrice: Money$inboundSchema.optional(), - historicalPrice: Money$inboundSchema.optional(), + networkToken: NetworkToken$inboundSchema, + currentPrice: Money$inboundSchema.optional(), + historicalPrice: Money$inboundSchema.optional(), }); /** @internal */ export type NetworkTokenDetails$Outbound = { - networkToken: NetworkToken$Outbound; - currentPrice?: Money$Outbound | undefined; - historicalPrice?: Money$Outbound | undefined; + networkToken: NetworkToken$Outbound; + currentPrice?: Money$Outbound | undefined; + historicalPrice?: Money$Outbound | undefined; }; /** @internal */ export const NetworkTokenDetails$outboundSchema: z.ZodType< - NetworkTokenDetails$Outbound, - z.ZodTypeDef, - NetworkTokenDetails + NetworkTokenDetails$Outbound, + z.ZodTypeDef, + NetworkTokenDetails > = z.object({ - networkToken: NetworkToken$outboundSchema, - currentPrice: Money$outboundSchema.optional(), - historicalPrice: Money$outboundSchema.optional(), + networkToken: NetworkToken$outboundSchema, + currentPrice: Money$outboundSchema.optional(), + historicalPrice: Money$outboundSchema.optional(), }); /** @@ -57,10 +62,10 @@ export const NetworkTokenDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NetworkTokenDetails$ { - /** @deprecated use `NetworkTokenDetails$inboundSchema` instead. */ - export const inboundSchema = NetworkTokenDetails$inboundSchema; - /** @deprecated use `NetworkTokenDetails$outboundSchema` instead. */ - export const outboundSchema = NetworkTokenDetails$outboundSchema; - /** @deprecated use `NetworkTokenDetails$Outbound` instead. */ - export type Outbound = NetworkTokenDetails$Outbound; + /** @deprecated use `NetworkTokenDetails$inboundSchema` instead. */ + export const inboundSchema = NetworkTokenDetails$inboundSchema; + /** @deprecated use `NetworkTokenDetails$outboundSchema` instead. */ + export const outboundSchema = NetworkTokenDetails$outboundSchema; + /** @deprecated use `NetworkTokenDetails$Outbound` instead. */ + export type Outbound = NetworkTokenDetails$Outbound; } diff --git a/src/models/components/networktype.ts b/src/models/components/networktype.ts index 4f44942..f06d3a6 100644 --- a/src/models/components/networktype.ts +++ b/src/models/components/networktype.ts @@ -2,30 +2,30 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const NetworkType = { - Mainnet: "mainnet", - Testnet: "testnet", + Mainnet: "mainnet", + Testnet: "testnet", } as const; export type NetworkType = ClosedEnum; /** @internal */ -export const NetworkType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(NetworkType); +export const NetworkType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(NetworkType); /** @internal */ export const NetworkType$outboundSchema: z.ZodNativeEnum = - NetworkType$inboundSchema; + NetworkType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NetworkType$ { - /** @deprecated use `NetworkType$inboundSchema` instead. */ - export const inboundSchema = NetworkType$inboundSchema; - /** @deprecated use `NetworkType$outboundSchema` instead. */ - export const outboundSchema = NetworkType$outboundSchema; + /** @deprecated use `NetworkType$inboundSchema` instead. */ + export const inboundSchema = NetworkType$inboundSchema; + /** @deprecated use `NetworkType$outboundSchema` instead. */ + export const outboundSchema = NetworkType$outboundSchema; } diff --git a/src/models/components/nftholdersresponse.ts b/src/models/components/nftholdersresponse.ts index 58e0d57..36dd66a 100644 --- a/src/models/components/nftholdersresponse.ts +++ b/src/models/components/nftholdersresponse.ts @@ -2,77 +2,77 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - AddressDetails, - AddressDetails$inboundSchema, - AddressDetails$Outbound, - AddressDetails$outboundSchema, + AddressDetails, + AddressDetails$inboundSchema, + AddressDetails$Outbound, + AddressDetails$outboundSchema, } from "./addressdetails.js"; -import * as z from "zod"; export type NftHoldersResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - /** - * List of addresses that match provided criteria. - */ - addresses: AddressDetails; - /** - * NFT project name. - */ - nftCollectionName: string; - /** - * NFT symbol. - */ - nftSymbol: string; - /** - * Total number of holders of a given NFT project. - */ - totalHolders: number; - /** - * Total number of tokens of a given NFT project. - */ - totalTokens: number; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + /** + * List of addresses that match provided criteria. + */ + addresses: AddressDetails; + /** + * NFT project name. + */ + nftCollectionName: string; + /** + * NFT symbol. + */ + nftSymbol: string; + /** + * Total number of holders of a given NFT project. + */ + totalHolders: number; + /** + * Total number of tokens of a given NFT project. + */ + totalTokens: number; }; /** @internal */ export const NftHoldersResponse$inboundSchema: z.ZodType< - NftHoldersResponse, - z.ZodTypeDef, - unknown + NftHoldersResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - addresses: AddressDetails$inboundSchema, - nftCollectionName: z.string(), - nftSymbol: z.string(), - totalHolders: z.number(), - totalTokens: z.number(), + nextPageToken: z.string().optional(), + addresses: AddressDetails$inboundSchema, + nftCollectionName: z.string(), + nftSymbol: z.string(), + totalHolders: z.number(), + totalTokens: z.number(), }); /** @internal */ export type NftHoldersResponse$Outbound = { - nextPageToken?: string | undefined; - addresses: AddressDetails$Outbound; - nftCollectionName: string; - nftSymbol: string; - totalHolders: number; - totalTokens: number; + nextPageToken?: string | undefined; + addresses: AddressDetails$Outbound; + nftCollectionName: string; + nftSymbol: string; + totalHolders: number; + totalTokens: number; }; /** @internal */ export const NftHoldersResponse$outboundSchema: z.ZodType< - NftHoldersResponse$Outbound, - z.ZodTypeDef, - NftHoldersResponse + NftHoldersResponse$Outbound, + z.ZodTypeDef, + NftHoldersResponse > = z.object({ - nextPageToken: z.string().optional(), - addresses: AddressDetails$outboundSchema, - nftCollectionName: z.string(), - nftSymbol: z.string(), - totalHolders: z.number(), - totalTokens: z.number(), + nextPageToken: z.string().optional(), + addresses: AddressDetails$outboundSchema, + nftCollectionName: z.string(), + nftSymbol: z.string(), + totalHolders: z.number(), + totalTokens: z.number(), }); /** @@ -80,10 +80,10 @@ export const NftHoldersResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NftHoldersResponse$ { - /** @deprecated use `NftHoldersResponse$inboundSchema` instead. */ - export const inboundSchema = NftHoldersResponse$inboundSchema; - /** @deprecated use `NftHoldersResponse$outboundSchema` instead. */ - export const outboundSchema = NftHoldersResponse$outboundSchema; - /** @deprecated use `NftHoldersResponse$Outbound` instead. */ - export type Outbound = NftHoldersResponse$Outbound; + /** @deprecated use `NftHoldersResponse$inboundSchema` instead. */ + export const inboundSchema = NftHoldersResponse$inboundSchema; + /** @deprecated use `NftHoldersResponse$outboundSchema` instead. */ + export const outboundSchema = NftHoldersResponse$outboundSchema; + /** @deprecated use `NftHoldersResponse$Outbound` instead. */ + export type Outbound = NftHoldersResponse$Outbound; } diff --git a/src/models/components/nfttokenmetadatastatus.ts b/src/models/components/nfttokenmetadatastatus.ts index 5d24ba9..4d9972b 100644 --- a/src/models/components/nfttokenmetadatastatus.ts +++ b/src/models/components/nfttokenmetadatastatus.ts @@ -2,24 +2,24 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * The metadata indexing status of the nft. */ export const NftTokenMetadataStatus = { - Unknown: "UNKNOWN", - MissingToken: "MISSING_TOKEN", - InvalidTokenUri: "INVALID_TOKEN_URI", - InvalidTokenUriScheme: "INVALID_TOKEN_URI_SCHEME", - UnreachableTokenUri: "UNREACHABLE_TOKEN_URI", - ThrottledTokenUri: "THROTTLED_TOKEN_URI", - MetadataContentTooLarge: "METADATA_CONTENT_TOO_LARGE", - InvalidMetadata: "INVALID_METADATA", - InvalidMetadataJson: "INVALID_METADATA_JSON", - Indexed: "INDEXED", - Unindexed: "UNINDEXED", + Unknown: "UNKNOWN", + MissingToken: "MISSING_TOKEN", + InvalidTokenUri: "INVALID_TOKEN_URI", + InvalidTokenUriScheme: "INVALID_TOKEN_URI_SCHEME", + UnreachableTokenUri: "UNREACHABLE_TOKEN_URI", + ThrottledTokenUri: "THROTTLED_TOKEN_URI", + MetadataContentTooLarge: "METADATA_CONTENT_TOO_LARGE", + InvalidMetadata: "INVALID_METADATA", + InvalidMetadataJson: "INVALID_METADATA_JSON", + Indexed: "INDEXED", + Unindexed: "UNINDEXED", } as const; /** * The metadata indexing status of the nft. @@ -27,20 +27,22 @@ export const NftTokenMetadataStatus = { export type NftTokenMetadataStatus = ClosedEnum; /** @internal */ -export const NftTokenMetadataStatus$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(NftTokenMetadataStatus); +export const NftTokenMetadataStatus$inboundSchema: z.ZodNativeEnum< + typeof NftTokenMetadataStatus +> = z.nativeEnum(NftTokenMetadataStatus); /** @internal */ -export const NftTokenMetadataStatus$outboundSchema: z.ZodNativeEnum = - NftTokenMetadataStatus$inboundSchema; +export const NftTokenMetadataStatus$outboundSchema: z.ZodNativeEnum< + typeof NftTokenMetadataStatus +> = NftTokenMetadataStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NftTokenMetadataStatus$ { - /** @deprecated use `NftTokenMetadataStatus$inboundSchema` instead. */ - export const inboundSchema = NftTokenMetadataStatus$inboundSchema; - /** @deprecated use `NftTokenMetadataStatus$outboundSchema` instead. */ - export const outboundSchema = NftTokenMetadataStatus$outboundSchema; + /** @deprecated use `NftTokenMetadataStatus$inboundSchema` instead. */ + export const inboundSchema = NftTokenMetadataStatus$inboundSchema; + /** @deprecated use `NftTokenMetadataStatus$outboundSchema` instead. */ + export const outboundSchema = NftTokenMetadataStatus$outboundSchema; } diff --git a/src/models/components/operationstatus.ts b/src/models/components/operationstatus.ts index 5689724..9ac26f3 100644 --- a/src/models/components/operationstatus.ts +++ b/src/models/components/operationstatus.ts @@ -2,32 +2,34 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const OperationStatus = { - Running: "RUNNING", - Completed: "COMPLETED", - CompletedWithWarning: "COMPLETED_WITH_WARNING", - Failed: "FAILED", + Running: "RUNNING", + Completed: "COMPLETED", + CompletedWithWarning: "COMPLETED_WITH_WARNING", + Failed: "FAILED", } as const; export type OperationStatus = ClosedEnum; /** @internal */ -export const OperationStatus$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(OperationStatus); +export const OperationStatus$inboundSchema: z.ZodNativeEnum< + typeof OperationStatus +> = z.nativeEnum(OperationStatus); /** @internal */ -export const OperationStatus$outboundSchema: z.ZodNativeEnum = - OperationStatus$inboundSchema; +export const OperationStatus$outboundSchema: z.ZodNativeEnum< + typeof OperationStatus +> = OperationStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace OperationStatus$ { - /** @deprecated use `OperationStatus$inboundSchema` instead. */ - export const inboundSchema = OperationStatus$inboundSchema; - /** @deprecated use `OperationStatus$outboundSchema` instead. */ - export const outboundSchema = OperationStatus$outboundSchema; + /** @deprecated use `OperationStatus$inboundSchema` instead. */ + export const inboundSchema = OperationStatus$inboundSchema; + /** @deprecated use `OperationStatus$outboundSchema` instead. */ + export const outboundSchema = OperationStatus$outboundSchema; } diff --git a/src/models/components/operationstatuscode.ts b/src/models/components/operationstatuscode.ts index 74abb3f..4278e13 100644 --- a/src/models/components/operationstatuscode.ts +++ b/src/models/components/operationstatuscode.ts @@ -2,31 +2,33 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const OperationStatusCode = { - ErrInvalidRequest: "ErrInvalidRequest", - ErrInternal: "ErrInternal", - WarnTruncatedExport: "WarnTruncatedExport", + ErrInvalidRequest: "ErrInvalidRequest", + ErrInternal: "ErrInternal", + WarnTruncatedExport: "WarnTruncatedExport", } as const; export type OperationStatusCode = ClosedEnum; /** @internal */ -export const OperationStatusCode$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(OperationStatusCode); +export const OperationStatusCode$inboundSchema: z.ZodNativeEnum< + typeof OperationStatusCode +> = z.nativeEnum(OperationStatusCode); /** @internal */ -export const OperationStatusCode$outboundSchema: z.ZodNativeEnum = - OperationStatusCode$inboundSchema; +export const OperationStatusCode$outboundSchema: z.ZodNativeEnum< + typeof OperationStatusCode +> = OperationStatusCode$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace OperationStatusCode$ { - /** @deprecated use `OperationStatusCode$inboundSchema` instead. */ - export const inboundSchema = OperationStatusCode$inboundSchema; - /** @deprecated use `OperationStatusCode$outboundSchema` instead. */ - export const outboundSchema = OperationStatusCode$outboundSchema; + /** @deprecated use `OperationStatusCode$inboundSchema` instead. */ + export const inboundSchema = OperationStatusCode$inboundSchema; + /** @deprecated use `OperationStatusCode$outboundSchema` instead. */ + export const outboundSchema = OperationStatusCode$outboundSchema; } diff --git a/src/models/components/operationstatusresponse.ts b/src/models/components/operationstatusresponse.ts index 2995707..8e4907e 100644 --- a/src/models/components/operationstatusresponse.ts +++ b/src/models/components/operationstatusresponse.ts @@ -2,99 +2,105 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - OperationStatus, - OperationStatus$inboundSchema, - OperationStatus$outboundSchema, + OperationStatus, + OperationStatus$inboundSchema, + OperationStatus$outboundSchema, } from "./operationstatus.js"; import { - OperationType, - OperationType$inboundSchema, - OperationType$outboundSchema, + OperationType, + OperationType$inboundSchema, + OperationType$outboundSchema, } from "./operationtype.js"; import { - TransactionExportMetadata, - TransactionExportMetadata$inboundSchema, - TransactionExportMetadata$Outbound, - TransactionExportMetadata$outboundSchema, + TransactionExportMetadata, + TransactionExportMetadata$inboundSchema, + TransactionExportMetadata$Outbound, + TransactionExportMetadata$outboundSchema, } from "./transactionexportmetadata.js"; -import * as z from "zod"; export type Metadata = TransactionExportMetadata; export type OperationStatusResponse = { - operationId: string; - operationType: OperationType; - operationStatus: OperationStatus; - message?: string | undefined; - metadata: TransactionExportMetadata; - createdAtTimestamp: number; - updatedAtTimestamp: number; + operationId: string; + operationType: OperationType; + operationStatus: OperationStatus; + message?: string | undefined; + metadata: TransactionExportMetadata; + createdAtTimestamp: number; + updatedAtTimestamp: number; }; /** @internal */ -export const Metadata$inboundSchema: z.ZodType = - TransactionExportMetadata$inboundSchema; +export const Metadata$inboundSchema: z.ZodType< + Metadata, + z.ZodTypeDef, + unknown +> = TransactionExportMetadata$inboundSchema; /** @internal */ export type Metadata$Outbound = TransactionExportMetadata$Outbound; /** @internal */ -export const Metadata$outboundSchema: z.ZodType = - TransactionExportMetadata$outboundSchema; +export const Metadata$outboundSchema: z.ZodType< + Metadata$Outbound, + z.ZodTypeDef, + Metadata +> = TransactionExportMetadata$outboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Metadata$ { - /** @deprecated use `Metadata$inboundSchema` instead. */ - export const inboundSchema = Metadata$inboundSchema; - /** @deprecated use `Metadata$outboundSchema` instead. */ - export const outboundSchema = Metadata$outboundSchema; - /** @deprecated use `Metadata$Outbound` instead. */ - export type Outbound = Metadata$Outbound; + /** @deprecated use `Metadata$inboundSchema` instead. */ + export const inboundSchema = Metadata$inboundSchema; + /** @deprecated use `Metadata$outboundSchema` instead. */ + export const outboundSchema = Metadata$outboundSchema; + /** @deprecated use `Metadata$Outbound` instead. */ + export type Outbound = Metadata$Outbound; } /** @internal */ export const OperationStatusResponse$inboundSchema: z.ZodType< - OperationStatusResponse, - z.ZodTypeDef, - unknown + OperationStatusResponse, + z.ZodTypeDef, + unknown > = z.object({ - operationId: z.string(), - operationType: OperationType$inboundSchema, - operationStatus: OperationStatus$inboundSchema, - message: z.string().optional(), - metadata: TransactionExportMetadata$inboundSchema, - createdAtTimestamp: z.number(), - updatedAtTimestamp: z.number(), + operationId: z.string(), + operationType: OperationType$inboundSchema, + operationStatus: OperationStatus$inboundSchema, + message: z.string().optional(), + metadata: TransactionExportMetadata$inboundSchema, + createdAtTimestamp: z.number(), + updatedAtTimestamp: z.number(), }); /** @internal */ export type OperationStatusResponse$Outbound = { - operationId: string; - operationType: string; - operationStatus: string; - message?: string | undefined; - metadata: TransactionExportMetadata$Outbound; - createdAtTimestamp: number; - updatedAtTimestamp: number; + operationId: string; + operationType: string; + operationStatus: string; + message?: string | undefined; + metadata: TransactionExportMetadata$Outbound; + createdAtTimestamp: number; + updatedAtTimestamp: number; }; /** @internal */ export const OperationStatusResponse$outboundSchema: z.ZodType< - OperationStatusResponse$Outbound, - z.ZodTypeDef, - OperationStatusResponse + OperationStatusResponse$Outbound, + z.ZodTypeDef, + OperationStatusResponse > = z.object({ - operationId: z.string(), - operationType: OperationType$outboundSchema, - operationStatus: OperationStatus$outboundSchema, - message: z.string().optional(), - metadata: TransactionExportMetadata$outboundSchema, - createdAtTimestamp: z.number(), - updatedAtTimestamp: z.number(), + operationId: z.string(), + operationType: OperationType$outboundSchema, + operationStatus: OperationStatus$outboundSchema, + message: z.string().optional(), + metadata: TransactionExportMetadata$outboundSchema, + createdAtTimestamp: z.number(), + updatedAtTimestamp: z.number(), }); /** @@ -102,10 +108,10 @@ export const OperationStatusResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace OperationStatusResponse$ { - /** @deprecated use `OperationStatusResponse$inboundSchema` instead. */ - export const inboundSchema = OperationStatusResponse$inboundSchema; - /** @deprecated use `OperationStatusResponse$outboundSchema` instead. */ - export const outboundSchema = OperationStatusResponse$outboundSchema; - /** @deprecated use `OperationStatusResponse$Outbound` instead. */ - export type Outbound = OperationStatusResponse$Outbound; + /** @deprecated use `OperationStatusResponse$inboundSchema` instead. */ + export const inboundSchema = OperationStatusResponse$inboundSchema; + /** @deprecated use `OperationStatusResponse$outboundSchema` instead. */ + export const outboundSchema = OperationStatusResponse$outboundSchema; + /** @deprecated use `OperationStatusResponse$Outbound` instead. */ + export type Outbound = OperationStatusResponse$Outbound; } diff --git a/src/models/components/operationtype.ts b/src/models/components/operationtype.ts index 7b77967..82a945d 100644 --- a/src/models/components/operationtype.ts +++ b/src/models/components/operationtype.ts @@ -2,32 +2,36 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const OperationType = { - TransactionExportPrimaryNetwork: "TRANSACTION_EXPORT_PRIMARY_NETWORK", - TransactionExportPrimaryNetworkStaking: "TRANSACTION_EXPORT_PRIMARY_NETWORK_STAKING", - TransactionExportPrimaryNetworkSimple: "TRANSACTION_EXPORT_PRIMARY_NETWORK_SIMPLE", - TransactionExportEvm: "TRANSACTION_EXPORT_EVM", + TransactionExportPrimaryNetwork: "TRANSACTION_EXPORT_PRIMARY_NETWORK", + TransactionExportPrimaryNetworkStaking: + "TRANSACTION_EXPORT_PRIMARY_NETWORK_STAKING", + TransactionExportPrimaryNetworkSimple: + "TRANSACTION_EXPORT_PRIMARY_NETWORK_SIMPLE", + TransactionExportEvm: "TRANSACTION_EXPORT_EVM", } as const; export type OperationType = ClosedEnum; /** @internal */ -export const OperationType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(OperationType); +export const OperationType$inboundSchema: z.ZodNativeEnum< + typeof OperationType +> = z.nativeEnum(OperationType); /** @internal */ -export const OperationType$outboundSchema: z.ZodNativeEnum = - OperationType$inboundSchema; +export const OperationType$outboundSchema: z.ZodNativeEnum< + typeof OperationType +> = OperationType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace OperationType$ { - /** @deprecated use `OperationType$inboundSchema` instead. */ - export const inboundSchema = OperationType$inboundSchema; - /** @deprecated use `OperationType$outboundSchema` instead. */ - export const outboundSchema = OperationType$outboundSchema; + /** @deprecated use `OperationType$inboundSchema` instead. */ + export const inboundSchema = OperationType$inboundSchema; + /** @deprecated use `OperationType$outboundSchema` instead. */ + export const outboundSchema = OperationType$outboundSchema; } diff --git a/src/models/components/operator.ts b/src/models/components/operator.ts index 7c15f03..f81818e 100644 --- a/src/models/components/operator.ts +++ b/src/models/components/operator.ts @@ -2,28 +2,30 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const Operator = { - And: "AND", - Or: "OR", + And: "AND", + Or: "OR", } as const; export type Operator = ClosedEnum; /** @internal */ -export const Operator$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Operator); +export const Operator$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Operator); /** @internal */ -export const Operator$outboundSchema: z.ZodNativeEnum = Operator$inboundSchema; +export const Operator$outboundSchema: z.ZodNativeEnum = + Operator$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Operator$ { - /** @deprecated use `Operator$inboundSchema` instead. */ - export const inboundSchema = Operator$inboundSchema; - /** @deprecated use `Operator$outboundSchema` instead. */ - export const outboundSchema = Operator$outboundSchema; + /** @deprecated use `Operator$inboundSchema` instead. */ + export const inboundSchema = Operator$inboundSchema; + /** @deprecated use `Operator$outboundSchema` instead. */ + export const outboundSchema = Operator$outboundSchema; } diff --git a/src/models/components/pchainaddressdetails.ts b/src/models/components/pchainaddressdetails.ts index b8e672b..a6af115 100644 --- a/src/models/components/pchainaddressdetails.ts +++ b/src/models/components/pchainaddressdetails.ts @@ -5,40 +5,40 @@ import * as z from "zod"; export type PChainAddressDetails = { - /** - * A list of P-Chain addresses. - */ - addresses: Array; - /** - * Route dependent value associated with an address at a given point in time. - */ - sortKey: string; + /** + * A list of P-Chain addresses. + */ + addresses: Array; + /** + * Route dependent value associated with an address at a given point in time. + */ + sortKey: string; }; /** @internal */ export const PChainAddressDetails$inboundSchema: z.ZodType< - PChainAddressDetails, - z.ZodTypeDef, - unknown + PChainAddressDetails, + z.ZodTypeDef, + unknown > = z.object({ - addresses: z.array(z.string()), - sortKey: z.string(), + addresses: z.array(z.string()), + sortKey: z.string(), }); /** @internal */ export type PChainAddressDetails$Outbound = { - addresses: Array; - sortKey: string; + addresses: Array; + sortKey: string; }; /** @internal */ export const PChainAddressDetails$outboundSchema: z.ZodType< - PChainAddressDetails$Outbound, - z.ZodTypeDef, - PChainAddressDetails + PChainAddressDetails$Outbound, + z.ZodTypeDef, + PChainAddressDetails > = z.object({ - addresses: z.array(z.string()), - sortKey: z.string(), + addresses: z.array(z.string()), + sortKey: z.string(), }); /** @@ -46,10 +46,10 @@ export const PChainAddressDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PChainAddressDetails$ { - /** @deprecated use `PChainAddressDetails$inboundSchema` instead. */ - export const inboundSchema = PChainAddressDetails$inboundSchema; - /** @deprecated use `PChainAddressDetails$outboundSchema` instead. */ - export const outboundSchema = PChainAddressDetails$outboundSchema; - /** @deprecated use `PChainAddressDetails$Outbound` instead. */ - export type Outbound = PChainAddressDetails$Outbound; + /** @deprecated use `PChainAddressDetails$inboundSchema` instead. */ + export const inboundSchema = PChainAddressDetails$inboundSchema; + /** @deprecated use `PChainAddressDetails$outboundSchema` instead. */ + export const outboundSchema = PChainAddressDetails$outboundSchema; + /** @deprecated use `PChainAddressDetails$Outbound` instead. */ + export type Outbound = PChainAddressDetails$Outbound; } diff --git a/src/models/components/pchainbalance.ts b/src/models/components/pchainbalance.ts index c7eb425..30c80c0 100644 --- a/src/models/components/pchainbalance.ts +++ b/src/models/components/pchainbalance.ts @@ -2,94 +2,97 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - AggregatedAssetAmount, - AggregatedAssetAmount$inboundSchema, - AggregatedAssetAmount$Outbound, - AggregatedAssetAmount$outboundSchema, + AggregatedAssetAmount, + AggregatedAssetAmount$inboundSchema, + AggregatedAssetAmount$Outbound, + AggregatedAssetAmount$outboundSchema, } from "./aggregatedassetamount.js"; import { - PChainSharedAsset, - PChainSharedAsset$inboundSchema, - PChainSharedAsset$Outbound, - PChainSharedAsset$outboundSchema, + PChainSharedAsset, + PChainSharedAsset$inboundSchema, + PChainSharedAsset$Outbound, + PChainSharedAsset$outboundSchema, } from "./pchainsharedasset.js"; -import * as z from "zod"; export type PChainBalance = { - /** - * A list of objects containing P-chain Asset basic info, amount, and utxo count of that Asset ID. Denotes the amount of unstaked Avax that is consumable by any transaction. - */ - unlockedUnstaked: Array; - /** - * A list of objects containing P-chain Asset basic info, amount, and utxo count of that Asset ID. Denotes the amount of staked Avax that is consumable by any transaction when the staking period ends. - */ - unlockedStaked: Array; - /** - * A list of objects containing P-chain Asset basic info, amount, and utxo count of that Asset ID. Denotes the amount of unstaked Avax that is locked at the platform level and not consumable by any transaction at the current time. - */ - lockedPlatform: Array; - /** - * A list of objects containing P-chain Asset basic info, amount, and utxo count of that Asset ID. Denotes the amount of unstaked Avax that is locked at the platform level and only consumeable for staking transactions. - */ - lockedStakeable: Array; - /** - * A list of objects containing P-chain Asset basic info, amount, and utxo count of that Asset ID. Denotes the amount of staked Avax that will be locked when the staking period ends. - */ - lockedStaked: Array; - /** - * A list of objects containing P-chain Asset basic info, amount, and utxo count of that Asset ID. Denotes the amount of staked Avax whose staking period has not yet started. - */ - pendingStaked: Array; - /** - * A list of objects containing P-chain Asset basic info, amount and utxo count of that Asset ID. Denotes the amount of unlocked Avax in the atomic memory between P-Chain and other chain. - */ - atomicMemoryUnlocked: Array; - /** - * A list of objects containing P-chain Asset basic info, amount and utxo count of that Asset ID. Denotes the amount of locked Avax in the atomic memory between P-Chain and other chain. - */ - atomicMemoryLocked: Array; + /** + * A list of objects containing P-chain Asset basic info, amount, and utxo count of that Asset ID. Denotes the amount of unstaked Avax that is consumable by any transaction. + */ + unlockedUnstaked: Array; + /** + * A list of objects containing P-chain Asset basic info, amount, and utxo count of that Asset ID. Denotes the amount of staked Avax that is consumable by any transaction when the staking period ends. + */ + unlockedStaked: Array; + /** + * A list of objects containing P-chain Asset basic info, amount, and utxo count of that Asset ID. Denotes the amount of unstaked Avax that is locked at the platform level and not consumable by any transaction at the current time. + */ + lockedPlatform: Array; + /** + * A list of objects containing P-chain Asset basic info, amount, and utxo count of that Asset ID. Denotes the amount of unstaked Avax that is locked at the platform level and only consumeable for staking transactions. + */ + lockedStakeable: Array; + /** + * A list of objects containing P-chain Asset basic info, amount, and utxo count of that Asset ID. Denotes the amount of staked Avax that will be locked when the staking period ends. + */ + lockedStaked: Array; + /** + * A list of objects containing P-chain Asset basic info, amount, and utxo count of that Asset ID. Denotes the amount of staked Avax whose staking period has not yet started. + */ + pendingStaked: Array; + /** + * A list of objects containing P-chain Asset basic info, amount and utxo count of that Asset ID. Denotes the amount of unlocked Avax in the atomic memory between P-Chain and other chain. + */ + atomicMemoryUnlocked: Array; + /** + * A list of objects containing P-chain Asset basic info, amount and utxo count of that Asset ID. Denotes the amount of locked Avax in the atomic memory between P-Chain and other chain. + */ + atomicMemoryLocked: Array; }; /** @internal */ -export const PChainBalance$inboundSchema: z.ZodType = - z.object({ - unlockedUnstaked: z.array(AggregatedAssetAmount$inboundSchema), - unlockedStaked: z.array(AggregatedAssetAmount$inboundSchema), - lockedPlatform: z.array(AggregatedAssetAmount$inboundSchema), - lockedStakeable: z.array(AggregatedAssetAmount$inboundSchema), - lockedStaked: z.array(AggregatedAssetAmount$inboundSchema), - pendingStaked: z.array(AggregatedAssetAmount$inboundSchema), - atomicMemoryUnlocked: z.array(PChainSharedAsset$inboundSchema), - atomicMemoryLocked: z.array(PChainSharedAsset$inboundSchema), - }); +export const PChainBalance$inboundSchema: z.ZodType< + PChainBalance, + z.ZodTypeDef, + unknown +> = z.object({ + unlockedUnstaked: z.array(AggregatedAssetAmount$inboundSchema), + unlockedStaked: z.array(AggregatedAssetAmount$inboundSchema), + lockedPlatform: z.array(AggregatedAssetAmount$inboundSchema), + lockedStakeable: z.array(AggregatedAssetAmount$inboundSchema), + lockedStaked: z.array(AggregatedAssetAmount$inboundSchema), + pendingStaked: z.array(AggregatedAssetAmount$inboundSchema), + atomicMemoryUnlocked: z.array(PChainSharedAsset$inboundSchema), + atomicMemoryLocked: z.array(PChainSharedAsset$inboundSchema), +}); /** @internal */ export type PChainBalance$Outbound = { - unlockedUnstaked: Array; - unlockedStaked: Array; - lockedPlatform: Array; - lockedStakeable: Array; - lockedStaked: Array; - pendingStaked: Array; - atomicMemoryUnlocked: Array; - atomicMemoryLocked: Array; + unlockedUnstaked: Array; + unlockedStaked: Array; + lockedPlatform: Array; + lockedStakeable: Array; + lockedStaked: Array; + pendingStaked: Array; + atomicMemoryUnlocked: Array; + atomicMemoryLocked: Array; }; /** @internal */ export const PChainBalance$outboundSchema: z.ZodType< - PChainBalance$Outbound, - z.ZodTypeDef, - PChainBalance + PChainBalance$Outbound, + z.ZodTypeDef, + PChainBalance > = z.object({ - unlockedUnstaked: z.array(AggregatedAssetAmount$outboundSchema), - unlockedStaked: z.array(AggregatedAssetAmount$outboundSchema), - lockedPlatform: z.array(AggregatedAssetAmount$outboundSchema), - lockedStakeable: z.array(AggregatedAssetAmount$outboundSchema), - lockedStaked: z.array(AggregatedAssetAmount$outboundSchema), - pendingStaked: z.array(AggregatedAssetAmount$outboundSchema), - atomicMemoryUnlocked: z.array(PChainSharedAsset$outboundSchema), - atomicMemoryLocked: z.array(PChainSharedAsset$outboundSchema), + unlockedUnstaked: z.array(AggregatedAssetAmount$outboundSchema), + unlockedStaked: z.array(AggregatedAssetAmount$outboundSchema), + lockedPlatform: z.array(AggregatedAssetAmount$outboundSchema), + lockedStakeable: z.array(AggregatedAssetAmount$outboundSchema), + lockedStaked: z.array(AggregatedAssetAmount$outboundSchema), + pendingStaked: z.array(AggregatedAssetAmount$outboundSchema), + atomicMemoryUnlocked: z.array(PChainSharedAsset$outboundSchema), + atomicMemoryLocked: z.array(PChainSharedAsset$outboundSchema), }); /** @@ -97,10 +100,10 @@ export const PChainBalance$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PChainBalance$ { - /** @deprecated use `PChainBalance$inboundSchema` instead. */ - export const inboundSchema = PChainBalance$inboundSchema; - /** @deprecated use `PChainBalance$outboundSchema` instead. */ - export const outboundSchema = PChainBalance$outboundSchema; - /** @deprecated use `PChainBalance$Outbound` instead. */ - export type Outbound = PChainBalance$Outbound; + /** @deprecated use `PChainBalance$inboundSchema` instead. */ + export const inboundSchema = PChainBalance$inboundSchema; + /** @deprecated use `PChainBalance$outboundSchema` instead. */ + export const outboundSchema = PChainBalance$outboundSchema; + /** @deprecated use `PChainBalance$Outbound` instead. */ + export type Outbound = PChainBalance$Outbound; } diff --git a/src/models/components/pchainid.ts b/src/models/components/pchainid.ts index dd9d33b..7d519a6 100644 --- a/src/models/components/pchainid.ts +++ b/src/models/components/pchainid.ts @@ -2,29 +2,31 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const PChainId = { - ElevenNonillionOneHundredAndElevenOctillionOneHundredAndElevenSeptillionOneHundredAndElevenSextillionOneHundredAndElevenQuintillionOneHundredAndElevenQuadrillionOneHundredAndElevenTrillionOneHundredAndElevenBillionOneHundredAndElevenMillionOneHundredAndElevenThousandOneHundredAndElevenLpoYY: - "11111111111111111111111111111111LpoYY", - PChain: "p-chain", + ElevenNonillionOneHundredAndElevenOctillionOneHundredAndElevenSeptillionOneHundredAndElevenSextillionOneHundredAndElevenQuintillionOneHundredAndElevenQuadrillionOneHundredAndElevenTrillionOneHundredAndElevenBillionOneHundredAndElevenMillionOneHundredAndElevenThousandOneHundredAndElevenLpoYY: + "11111111111111111111111111111111LpoYY", + PChain: "p-chain", } as const; export type PChainId = ClosedEnum; /** @internal */ -export const PChainId$inboundSchema: z.ZodNativeEnum = z.nativeEnum(PChainId); +export const PChainId$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(PChainId); /** @internal */ -export const PChainId$outboundSchema: z.ZodNativeEnum = PChainId$inboundSchema; +export const PChainId$outboundSchema: z.ZodNativeEnum = + PChainId$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PChainId$ { - /** @deprecated use `PChainId$inboundSchema` instead. */ - export const inboundSchema = PChainId$inboundSchema; - /** @deprecated use `PChainId$outboundSchema` instead. */ - export const outboundSchema = PChainId$outboundSchema; + /** @deprecated use `PChainId$inboundSchema` instead. */ + export const inboundSchema = PChainId$inboundSchema; + /** @deprecated use `PChainId$outboundSchema` instead. */ + export const outboundSchema = PChainId$outboundSchema; } diff --git a/src/models/components/pchainlookingglassresponse.ts b/src/models/components/pchainlookingglassresponse.ts index ba91fe0..89580fb 100644 --- a/src/models/components/pchainlookingglassresponse.ts +++ b/src/models/components/pchainlookingglassresponse.ts @@ -2,49 +2,49 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PChainAddressDetails, - PChainAddressDetails$inboundSchema, - PChainAddressDetails$Outbound, - PChainAddressDetails$outboundSchema, + PChainAddressDetails, + PChainAddressDetails$inboundSchema, + PChainAddressDetails$Outbound, + PChainAddressDetails$outboundSchema, } from "./pchainaddressdetails.js"; -import * as z from "zod"; export type PChainLookingGlassResponse = { - /** - * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. - */ - nextPageToken?: string | undefined; - /** - * List of addresses that match provided criteria. - */ - addresses: PChainAddressDetails; + /** + * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. + */ + nextPageToken?: string | undefined; + /** + * List of addresses that match provided criteria. + */ + addresses: PChainAddressDetails; }; /** @internal */ export const PChainLookingGlassResponse$inboundSchema: z.ZodType< - PChainLookingGlassResponse, - z.ZodTypeDef, - unknown + PChainLookingGlassResponse, + z.ZodTypeDef, + unknown > = z.object({ - nextPageToken: z.string().optional(), - addresses: PChainAddressDetails$inboundSchema, + nextPageToken: z.string().optional(), + addresses: PChainAddressDetails$inboundSchema, }); /** @internal */ export type PChainLookingGlassResponse$Outbound = { - nextPageToken?: string | undefined; - addresses: PChainAddressDetails$Outbound; + nextPageToken?: string | undefined; + addresses: PChainAddressDetails$Outbound; }; /** @internal */ export const PChainLookingGlassResponse$outboundSchema: z.ZodType< - PChainLookingGlassResponse$Outbound, - z.ZodTypeDef, - PChainLookingGlassResponse + PChainLookingGlassResponse$Outbound, + z.ZodTypeDef, + PChainLookingGlassResponse > = z.object({ - nextPageToken: z.string().optional(), - addresses: PChainAddressDetails$outboundSchema, + nextPageToken: z.string().optional(), + addresses: PChainAddressDetails$outboundSchema, }); /** @@ -52,10 +52,10 @@ export const PChainLookingGlassResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PChainLookingGlassResponse$ { - /** @deprecated use `PChainLookingGlassResponse$inboundSchema` instead. */ - export const inboundSchema = PChainLookingGlassResponse$inboundSchema; - /** @deprecated use `PChainLookingGlassResponse$outboundSchema` instead. */ - export const outboundSchema = PChainLookingGlassResponse$outboundSchema; - /** @deprecated use `PChainLookingGlassResponse$Outbound` instead. */ - export type Outbound = PChainLookingGlassResponse$Outbound; + /** @deprecated use `PChainLookingGlassResponse$inboundSchema` instead. */ + export const inboundSchema = PChainLookingGlassResponse$inboundSchema; + /** @deprecated use `PChainLookingGlassResponse$outboundSchema` instead. */ + export const outboundSchema = PChainLookingGlassResponse$outboundSchema; + /** @deprecated use `PChainLookingGlassResponse$Outbound` instead. */ + export type Outbound = PChainLookingGlassResponse$Outbound; } diff --git a/src/models/components/pchainsharedasset.ts b/src/models/components/pchainsharedasset.ts index 2496790..bc0083d 100644 --- a/src/models/components/pchainsharedasset.ts +++ b/src/models/components/pchainsharedasset.ts @@ -2,85 +2,88 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PrimaryNetworkAssetType, - PrimaryNetworkAssetType$inboundSchema, - PrimaryNetworkAssetType$outboundSchema, + PrimaryNetworkAssetType, + PrimaryNetworkAssetType$inboundSchema, + PrimaryNetworkAssetType$outboundSchema, } from "./primarynetworkassettype.js"; -import * as z from "zod"; export type PChainSharedAsset = { - /** - * Unique ID for an asset. - */ - assetId: string; - /** - * Name of this asset. - */ - name: string; - /** - * Symbol for this asset (max 4 characters). - */ - symbol: string; - /** - * Denomination of this asset to represent fungibility. - */ - denomination: number; - /** - * Type of asset like SECP256K1 or NFT. - */ - type: PrimaryNetworkAssetType; - /** - * Amount of the asset. - */ - amount: string; - utxoCount: number; - sharedWithChainId: string; - status: string; + /** + * Unique ID for an asset. + */ + assetId: string; + /** + * Name of this asset. + */ + name: string; + /** + * Symbol for this asset (max 4 characters). + */ + symbol: string; + /** + * Denomination of this asset to represent fungibility. + */ + denomination: number; + /** + * Type of asset like SECP256K1 or NFT. + */ + type: PrimaryNetworkAssetType; + /** + * Amount of the asset. + */ + amount: string; + utxoCount: number; + sharedWithChainId: string; + status: string; }; /** @internal */ -export const PChainSharedAsset$inboundSchema: z.ZodType = - z.object({ - assetId: z.string(), - name: z.string(), - symbol: z.string(), - denomination: z.number(), - type: PrimaryNetworkAssetType$inboundSchema, - amount: z.string(), - utxoCount: z.number(), - sharedWithChainId: z.string(), - status: z.string(), - }); +export const PChainSharedAsset$inboundSchema: z.ZodType< + PChainSharedAsset, + z.ZodTypeDef, + unknown +> = z.object({ + assetId: z.string(), + name: z.string(), + symbol: z.string(), + denomination: z.number(), + type: PrimaryNetworkAssetType$inboundSchema, + amount: z.string(), + utxoCount: z.number(), + sharedWithChainId: z.string(), + status: z.string(), +}); /** @internal */ export type PChainSharedAsset$Outbound = { - assetId: string; - name: string; - symbol: string; - denomination: number; - type: string; - amount: string; - utxoCount: number; - sharedWithChainId: string; - status: string; + assetId: string; + name: string; + symbol: string; + denomination: number; + type: string; + amount: string; + utxoCount: number; + sharedWithChainId: string; + status: string; }; /** @internal */ export const PChainSharedAsset$outboundSchema: z.ZodType< - PChainSharedAsset$Outbound, - z.ZodTypeDef, - PChainSharedAsset + PChainSharedAsset$Outbound, + z.ZodTypeDef, + PChainSharedAsset > = z.object({ - assetId: z.string(), - name: z.string(), - symbol: z.string(), - denomination: z.number(), - type: PrimaryNetworkAssetType$outboundSchema, - amount: z.string(), - utxoCount: z.number(), - sharedWithChainId: z.string(), - status: z.string(), + assetId: z.string(), + name: z.string(), + symbol: z.string(), + denomination: z.number(), + type: PrimaryNetworkAssetType$outboundSchema, + amount: z.string(), + utxoCount: z.number(), + sharedWithChainId: z.string(), + status: z.string(), }); /** @@ -88,10 +91,10 @@ export const PChainSharedAsset$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PChainSharedAsset$ { - /** @deprecated use `PChainSharedAsset$inboundSchema` instead. */ - export const inboundSchema = PChainSharedAsset$inboundSchema; - /** @deprecated use `PChainSharedAsset$outboundSchema` instead. */ - export const outboundSchema = PChainSharedAsset$outboundSchema; - /** @deprecated use `PChainSharedAsset$Outbound` instead. */ - export type Outbound = PChainSharedAsset$Outbound; + /** @deprecated use `PChainSharedAsset$inboundSchema` instead. */ + export const inboundSchema = PChainSharedAsset$inboundSchema; + /** @deprecated use `PChainSharedAsset$outboundSchema` instead. */ + export const outboundSchema = PChainSharedAsset$outboundSchema; + /** @deprecated use `PChainSharedAsset$Outbound` instead. */ + export type Outbound = PChainSharedAsset$Outbound; } diff --git a/src/models/components/pchaintransaction.ts b/src/models/components/pchaintransaction.ts index 67fbb62..79dd377 100644 --- a/src/models/components/pchaintransaction.ts +++ b/src/models/components/pchaintransaction.ts @@ -2,199 +2,202 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - AssetAmount, - AssetAmount$inboundSchema, - AssetAmount$Outbound, - AssetAmount$outboundSchema, + AssetAmount, + AssetAmount$inboundSchema, + AssetAmount$Outbound, + AssetAmount$outboundSchema, } from "./assetamount.js"; import { - BlsCredentials, - BlsCredentials$inboundSchema, - BlsCredentials$Outbound, - BlsCredentials$outboundSchema, + BlsCredentials, + BlsCredentials$inboundSchema, + BlsCredentials$Outbound, + BlsCredentials$outboundSchema, } from "./blscredentials.js"; import { - PChainTransactionType, - PChainTransactionType$inboundSchema, - PChainTransactionType$outboundSchema, + PChainTransactionType, + PChainTransactionType$inboundSchema, + PChainTransactionType$outboundSchema, } from "./pchaintransactiontype.js"; import { - PChainUtxo, - PChainUtxo$inboundSchema, - PChainUtxo$Outbound, - PChainUtxo$outboundSchema, + PChainUtxo, + PChainUtxo$inboundSchema, + PChainUtxo$Outbound, + PChainUtxo$outboundSchema, } from "./pchainutxo.js"; import { - SubnetOwnershipInfo, - SubnetOwnershipInfo$inboundSchema, - SubnetOwnershipInfo$Outbound, - SubnetOwnershipInfo$outboundSchema, + SubnetOwnershipInfo, + SubnetOwnershipInfo$inboundSchema, + SubnetOwnershipInfo$Outbound, + SubnetOwnershipInfo$outboundSchema, } from "./subnetownershipinfo.js"; -import * as z from "zod"; export type PChainTransaction = { - /** - * A P-Chain transaction hash. - */ - txHash: string; - txType: PChainTransactionType; - /** - * The block finality timestamp. - */ - blockTimestamp: number; - blockNumber: string; - blockHash: string; - consumedUtxos: Array; - emittedUtxos: Array; - /** - * Source chain for an atomic transaction. - */ - sourceChain?: string | undefined; - /** - * Destination chain for an atomic transaction. - */ - destinationChain?: string | undefined; - /** - * A list of objects containing P-chain Asset basic info and the amount of that Asset ID. - */ - value: Array; - /** - * A list of objects containing P-chain Asset basic info and the amount of that Asset ID. - */ - amountBurned: Array; - /** - * A list of objects containing P-chain Asset basic info and the amount of that Asset ID. Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx - */ - amountStaked: Array; - /** - * Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx - */ - startTimestamp?: number | undefined; - /** - * Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx - */ - endTimestamp?: number | undefined; - /** - * Present for AddValidatorTx, AddPermissionlessValidatorTx - */ - delegationFeePercent?: string | undefined; - /** - * Present for AddValidatorTx, AddSubnetValidatorTx, RemoveSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx - */ - nodeId?: string | undefined; - /** - * Present for AddValidatorTx, AddSubnetValidatorTx, RemoveSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx, CreateChainTx, CreateSubnetTx - */ - subnetId?: string | undefined; - /** - * Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx - */ - estimatedReward?: string | undefined; - rewardTxHash?: string | undefined; - rewardAddresses?: Array | undefined; - memo?: string | undefined; - /** - * Present for RewardValidatorTx - */ - stakingTxHash?: string | undefined; - /** - * Subnet owner details for the CreateSubnetTx or TransferSubnetOwnershipTx - */ - subnetOwnershipInfo?: SubnetOwnershipInfo | undefined; - /** - * Present for AddPermissionlessValidatorTx - */ - blsCredentials?: BlsCredentials | undefined; + /** + * A P-Chain transaction hash. + */ + txHash: string; + txType: PChainTransactionType; + /** + * The block finality timestamp. + */ + blockTimestamp: number; + blockNumber: string; + blockHash: string; + consumedUtxos: Array; + emittedUtxos: Array; + /** + * Source chain for an atomic transaction. + */ + sourceChain?: string | undefined; + /** + * Destination chain for an atomic transaction. + */ + destinationChain?: string | undefined; + /** + * A list of objects containing P-chain Asset basic info and the amount of that Asset ID. + */ + value: Array; + /** + * A list of objects containing P-chain Asset basic info and the amount of that Asset ID. + */ + amountBurned: Array; + /** + * A list of objects containing P-chain Asset basic info and the amount of that Asset ID. Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx + */ + amountStaked: Array; + /** + * Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx + */ + startTimestamp?: number | undefined; + /** + * Present for AddValidatorTx, AddSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx + */ + endTimestamp?: number | undefined; + /** + * Present for AddValidatorTx, AddPermissionlessValidatorTx + */ + delegationFeePercent?: string | undefined; + /** + * Present for AddValidatorTx, AddSubnetValidatorTx, RemoveSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx + */ + nodeId?: string | undefined; + /** + * Present for AddValidatorTx, AddSubnetValidatorTx, RemoveSubnetValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx, CreateChainTx, CreateSubnetTx + */ + subnetId?: string | undefined; + /** + * Present for AddValidatorTx, AddPermissionlessValidatorTx, AddDelegatorTx + */ + estimatedReward?: string | undefined; + rewardTxHash?: string | undefined; + rewardAddresses?: Array | undefined; + memo?: string | undefined; + /** + * Present for RewardValidatorTx + */ + stakingTxHash?: string | undefined; + /** + * Subnet owner details for the CreateSubnetTx or TransferSubnetOwnershipTx + */ + subnetOwnershipInfo?: SubnetOwnershipInfo | undefined; + /** + * Present for AddPermissionlessValidatorTx + */ + blsCredentials?: BlsCredentials | undefined; }; /** @internal */ -export const PChainTransaction$inboundSchema: z.ZodType = - z.object({ - txHash: z.string(), - txType: PChainTransactionType$inboundSchema, - blockTimestamp: z.number(), - blockNumber: z.string(), - blockHash: z.string(), - consumedUtxos: z.array(PChainUtxo$inboundSchema), - emittedUtxos: z.array(PChainUtxo$inboundSchema), - sourceChain: z.string().optional(), - destinationChain: z.string().optional(), - value: z.array(AssetAmount$inboundSchema), - amountBurned: z.array(AssetAmount$inboundSchema), - amountStaked: z.array(AssetAmount$inboundSchema), - startTimestamp: z.number().optional(), - endTimestamp: z.number().optional(), - delegationFeePercent: z.string().optional(), - nodeId: z.string().optional(), - subnetId: z.string().optional(), - estimatedReward: z.string().optional(), - rewardTxHash: z.string().optional(), - rewardAddresses: z.array(z.string()).optional(), - memo: z.string().optional(), - stakingTxHash: z.string().optional(), - subnetOwnershipInfo: SubnetOwnershipInfo$inboundSchema.optional(), - blsCredentials: BlsCredentials$inboundSchema.optional(), - }); +export const PChainTransaction$inboundSchema: z.ZodType< + PChainTransaction, + z.ZodTypeDef, + unknown +> = z.object({ + txHash: z.string(), + txType: PChainTransactionType$inboundSchema, + blockTimestamp: z.number(), + blockNumber: z.string(), + blockHash: z.string(), + consumedUtxos: z.array(PChainUtxo$inboundSchema), + emittedUtxos: z.array(PChainUtxo$inboundSchema), + sourceChain: z.string().optional(), + destinationChain: z.string().optional(), + value: z.array(AssetAmount$inboundSchema), + amountBurned: z.array(AssetAmount$inboundSchema), + amountStaked: z.array(AssetAmount$inboundSchema), + startTimestamp: z.number().optional(), + endTimestamp: z.number().optional(), + delegationFeePercent: z.string().optional(), + nodeId: z.string().optional(), + subnetId: z.string().optional(), + estimatedReward: z.string().optional(), + rewardTxHash: z.string().optional(), + rewardAddresses: z.array(z.string()).optional(), + memo: z.string().optional(), + stakingTxHash: z.string().optional(), + subnetOwnershipInfo: SubnetOwnershipInfo$inboundSchema.optional(), + blsCredentials: BlsCredentials$inboundSchema.optional(), +}); /** @internal */ export type PChainTransaction$Outbound = { - txHash: string; - txType: string; - blockTimestamp: number; - blockNumber: string; - blockHash: string; - consumedUtxos: Array; - emittedUtxos: Array; - sourceChain?: string | undefined; - destinationChain?: string | undefined; - value: Array; - amountBurned: Array; - amountStaked: Array; - startTimestamp?: number | undefined; - endTimestamp?: number | undefined; - delegationFeePercent?: string | undefined; - nodeId?: string | undefined; - subnetId?: string | undefined; - estimatedReward?: string | undefined; - rewardTxHash?: string | undefined; - rewardAddresses?: Array | undefined; - memo?: string | undefined; - stakingTxHash?: string | undefined; - subnetOwnershipInfo?: SubnetOwnershipInfo$Outbound | undefined; - blsCredentials?: BlsCredentials$Outbound | undefined; + txHash: string; + txType: string; + blockTimestamp: number; + blockNumber: string; + blockHash: string; + consumedUtxos: Array; + emittedUtxos: Array; + sourceChain?: string | undefined; + destinationChain?: string | undefined; + value: Array; + amountBurned: Array; + amountStaked: Array; + startTimestamp?: number | undefined; + endTimestamp?: number | undefined; + delegationFeePercent?: string | undefined; + nodeId?: string | undefined; + subnetId?: string | undefined; + estimatedReward?: string | undefined; + rewardTxHash?: string | undefined; + rewardAddresses?: Array | undefined; + memo?: string | undefined; + stakingTxHash?: string | undefined; + subnetOwnershipInfo?: SubnetOwnershipInfo$Outbound | undefined; + blsCredentials?: BlsCredentials$Outbound | undefined; }; /** @internal */ export const PChainTransaction$outboundSchema: z.ZodType< - PChainTransaction$Outbound, - z.ZodTypeDef, - PChainTransaction + PChainTransaction$Outbound, + z.ZodTypeDef, + PChainTransaction > = z.object({ - txHash: z.string(), - txType: PChainTransactionType$outboundSchema, - blockTimestamp: z.number(), - blockNumber: z.string(), - blockHash: z.string(), - consumedUtxos: z.array(PChainUtxo$outboundSchema), - emittedUtxos: z.array(PChainUtxo$outboundSchema), - sourceChain: z.string().optional(), - destinationChain: z.string().optional(), - value: z.array(AssetAmount$outboundSchema), - amountBurned: z.array(AssetAmount$outboundSchema), - amountStaked: z.array(AssetAmount$outboundSchema), - startTimestamp: z.number().optional(), - endTimestamp: z.number().optional(), - delegationFeePercent: z.string().optional(), - nodeId: z.string().optional(), - subnetId: z.string().optional(), - estimatedReward: z.string().optional(), - rewardTxHash: z.string().optional(), - rewardAddresses: z.array(z.string()).optional(), - memo: z.string().optional(), - stakingTxHash: z.string().optional(), - subnetOwnershipInfo: SubnetOwnershipInfo$outboundSchema.optional(), - blsCredentials: BlsCredentials$outboundSchema.optional(), + txHash: z.string(), + txType: PChainTransactionType$outboundSchema, + blockTimestamp: z.number(), + blockNumber: z.string(), + blockHash: z.string(), + consumedUtxos: z.array(PChainUtxo$outboundSchema), + emittedUtxos: z.array(PChainUtxo$outboundSchema), + sourceChain: z.string().optional(), + destinationChain: z.string().optional(), + value: z.array(AssetAmount$outboundSchema), + amountBurned: z.array(AssetAmount$outboundSchema), + amountStaked: z.array(AssetAmount$outboundSchema), + startTimestamp: z.number().optional(), + endTimestamp: z.number().optional(), + delegationFeePercent: z.string().optional(), + nodeId: z.string().optional(), + subnetId: z.string().optional(), + estimatedReward: z.string().optional(), + rewardTxHash: z.string().optional(), + rewardAddresses: z.array(z.string()).optional(), + memo: z.string().optional(), + stakingTxHash: z.string().optional(), + subnetOwnershipInfo: SubnetOwnershipInfo$outboundSchema.optional(), + blsCredentials: BlsCredentials$outboundSchema.optional(), }); /** @@ -202,10 +205,10 @@ export const PChainTransaction$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PChainTransaction$ { - /** @deprecated use `PChainTransaction$inboundSchema` instead. */ - export const inboundSchema = PChainTransaction$inboundSchema; - /** @deprecated use `PChainTransaction$outboundSchema` instead. */ - export const outboundSchema = PChainTransaction$outboundSchema; - /** @deprecated use `PChainTransaction$Outbound` instead. */ - export type Outbound = PChainTransaction$Outbound; + /** @deprecated use `PChainTransaction$inboundSchema` instead. */ + export const inboundSchema = PChainTransaction$inboundSchema; + /** @deprecated use `PChainTransaction$outboundSchema` instead. */ + export const outboundSchema = PChainTransaction$outboundSchema; + /** @deprecated use `PChainTransaction$Outbound` instead. */ + export type Outbound = PChainTransaction$Outbound; } diff --git a/src/models/components/pchaintransactiontype.ts b/src/models/components/pchaintransactiontype.ts index bfe5012..5d5dc9a 100644 --- a/src/models/components/pchaintransactiontype.ts +++ b/src/models/components/pchaintransactiontype.ts @@ -2,44 +2,46 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const PChainTransactionType = { - AddValidatorTx: "AddValidatorTx", - AddSubnetValidatorTx: "AddSubnetValidatorTx", - AddDelegatorTx: "AddDelegatorTx", - CreateChainTx: "CreateChainTx", - CreateSubnetTx: "CreateSubnetTx", - ImportTx: "ImportTx", - ExportTx: "ExportTx", - AdvanceTimeTx: "AdvanceTimeTx", - RewardValidatorTx: "RewardValidatorTx", - RemoveSubnetValidatorTx: "RemoveSubnetValidatorTx", - TransformSubnetTx: "TransformSubnetTx", - AddPermissionlessValidatorTx: "AddPermissionlessValidatorTx", - AddPermissionlessDelegatorTx: "AddPermissionlessDelegatorTx", - BaseTx: "BaseTx", - TransferSubnetOwnershipTx: "TransferSubnetOwnershipTx", - Unknown: "UNKNOWN", + AddValidatorTx: "AddValidatorTx", + AddSubnetValidatorTx: "AddSubnetValidatorTx", + AddDelegatorTx: "AddDelegatorTx", + CreateChainTx: "CreateChainTx", + CreateSubnetTx: "CreateSubnetTx", + ImportTx: "ImportTx", + ExportTx: "ExportTx", + AdvanceTimeTx: "AdvanceTimeTx", + RewardValidatorTx: "RewardValidatorTx", + RemoveSubnetValidatorTx: "RemoveSubnetValidatorTx", + TransformSubnetTx: "TransformSubnetTx", + AddPermissionlessValidatorTx: "AddPermissionlessValidatorTx", + AddPermissionlessDelegatorTx: "AddPermissionlessDelegatorTx", + BaseTx: "BaseTx", + TransferSubnetOwnershipTx: "TransferSubnetOwnershipTx", + Unknown: "UNKNOWN", } as const; export type PChainTransactionType = ClosedEnum; /** @internal */ -export const PChainTransactionType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(PChainTransactionType); +export const PChainTransactionType$inboundSchema: z.ZodNativeEnum< + typeof PChainTransactionType +> = z.nativeEnum(PChainTransactionType); /** @internal */ -export const PChainTransactionType$outboundSchema: z.ZodNativeEnum = - PChainTransactionType$inboundSchema; +export const PChainTransactionType$outboundSchema: z.ZodNativeEnum< + typeof PChainTransactionType +> = PChainTransactionType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PChainTransactionType$ { - /** @deprecated use `PChainTransactionType$inboundSchema` instead. */ - export const inboundSchema = PChainTransactionType$inboundSchema; - /** @deprecated use `PChainTransactionType$outboundSchema` instead. */ - export const outboundSchema = PChainTransactionType$outboundSchema; + /** @deprecated use `PChainTransactionType$inboundSchema` instead. */ + export const inboundSchema = PChainTransactionType$inboundSchema; + /** @deprecated use `PChainTransactionType$outboundSchema` instead. */ + export const outboundSchema = PChainTransactionType$outboundSchema; } diff --git a/src/models/components/pchainutxo.ts b/src/models/components/pchainutxo.ts index 6301490..fa1e0ec 100644 --- a/src/models/components/pchainutxo.ts +++ b/src/models/components/pchainutxo.ts @@ -2,150 +2,165 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - AssetAmount, - AssetAmount$inboundSchema, - AssetAmount$Outbound, - AssetAmount$outboundSchema, + AssetAmount, + AssetAmount$inboundSchema, + AssetAmount$Outbound, + AssetAmount$outboundSchema, } from "./assetamount.js"; -import { RewardType, RewardType$inboundSchema, RewardType$outboundSchema } from "./rewardtype.js"; -import { UtxoType, UtxoType$inboundSchema, UtxoType$outboundSchema } from "./utxotype.js"; -import * as z from "zod"; +import { + RewardType, + RewardType$inboundSchema, + RewardType$outboundSchema, +} from "./rewardtype.js"; +import { + UtxoType, + UtxoType$inboundSchema, + UtxoType$outboundSchema, +} from "./utxotype.js"; export type PChainUtxo = { - /** - * Addresses that are eligible to sign the consumption of this output. - */ - addresses: Array; - asset: AssetAmount; - /** - * Blockchain ID on which this output is consumed on. - */ - consumedOnChainId: string; - /** - * Transaction ID that consumed this output. - */ - consumingTxHash?: string | undefined; - /** - * Blockchain ID on which this output is created on. - */ - createdOnChainId: string; - /** - * UTXO ID for this output. - */ - utxoId: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - amount: string; - /** - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - assetId: string; - blockNumber: string; - blockTimestamp: number; - consumingBlockNumber?: string | undefined; - consumingBlockTimestamp?: number | undefined; - platformLocktime?: number | undefined; - outputIndex: number; - rewardType?: RewardType | undefined; - stakeableLocktime?: number | undefined; - staked?: boolean | undefined; - threshold?: number | undefined; - txHash: string; - utxoEndTimestamp?: number | undefined; - utxoStartTimestamp?: number | undefined; - utxoType: UtxoType; + /** + * Addresses that are eligible to sign the consumption of this output. + */ + addresses: Array; + asset: AssetAmount; + /** + * Blockchain ID on which this output is consumed on. + */ + consumedOnChainId: string; + /** + * Transaction ID that consumed this output. + */ + consumingTxHash?: string | undefined; + /** + * Blockchain ID on which this output is created on. + */ + createdOnChainId: string; + /** + * UTXO ID for this output. + */ + utxoId: string; + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + amount: string; + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + assetId: string; + blockNumber: string; + blockTimestamp: number; + consumingBlockNumber?: string | undefined; + consumingBlockTimestamp?: number | undefined; + platformLocktime?: number | undefined; + outputIndex: number; + rewardType?: RewardType | undefined; + stakeableLocktime?: number | undefined; + staked?: boolean | undefined; + threshold?: number | undefined; + txHash: string; + utxoEndTimestamp?: number | undefined; + utxoStartTimestamp?: number | undefined; + utxoType: UtxoType; }; /** @internal */ -export const PChainUtxo$inboundSchema: z.ZodType = z.object({ - addresses: z.array(z.string()), - asset: AssetAmount$inboundSchema, - consumedOnChainId: z.string(), - consumingTxHash: z.string().optional(), - createdOnChainId: z.string(), - utxoId: z.string(), - amount: z.string(), - assetId: z.string(), - blockNumber: z.string(), - blockTimestamp: z.number(), - consumingBlockNumber: z.string().optional(), - consumingBlockTimestamp: z.number().optional(), - platformLocktime: z.number().optional(), - outputIndex: z.number(), - rewardType: RewardType$inboundSchema.optional(), - stakeableLocktime: z.number().optional(), - staked: z.boolean().optional(), - threshold: z.number().optional(), - txHash: z.string(), - utxoEndTimestamp: z.number().optional(), - utxoStartTimestamp: z.number().optional(), - utxoType: UtxoType$inboundSchema, +export const PChainUtxo$inboundSchema: z.ZodType< + PChainUtxo, + z.ZodTypeDef, + unknown +> = z.object({ + addresses: z.array(z.string()), + asset: AssetAmount$inboundSchema, + consumedOnChainId: z.string(), + consumingTxHash: z.string().optional(), + createdOnChainId: z.string(), + utxoId: z.string(), + amount: z.string(), + assetId: z.string(), + blockNumber: z.string(), + blockTimestamp: z.number(), + consumingBlockNumber: z.string().optional(), + consumingBlockTimestamp: z.number().optional(), + platformLocktime: z.number().optional(), + outputIndex: z.number(), + rewardType: RewardType$inboundSchema.optional(), + stakeableLocktime: z.number().optional(), + staked: z.boolean().optional(), + threshold: z.number().optional(), + txHash: z.string(), + utxoEndTimestamp: z.number().optional(), + utxoStartTimestamp: z.number().optional(), + utxoType: UtxoType$inboundSchema, }); /** @internal */ export type PChainUtxo$Outbound = { - addresses: Array; - asset: AssetAmount$Outbound; - consumedOnChainId: string; - consumingTxHash?: string | undefined; - createdOnChainId: string; - utxoId: string; - amount: string; - assetId: string; - blockNumber: string; - blockTimestamp: number; - consumingBlockNumber?: string | undefined; - consumingBlockTimestamp?: number | undefined; - platformLocktime?: number | undefined; - outputIndex: number; - rewardType?: string | undefined; - stakeableLocktime?: number | undefined; - staked?: boolean | undefined; - threshold?: number | undefined; - txHash: string; - utxoEndTimestamp?: number | undefined; - utxoStartTimestamp?: number | undefined; - utxoType: string; + addresses: Array; + asset: AssetAmount$Outbound; + consumedOnChainId: string; + consumingTxHash?: string | undefined; + createdOnChainId: string; + utxoId: string; + amount: string; + assetId: string; + blockNumber: string; + blockTimestamp: number; + consumingBlockNumber?: string | undefined; + consumingBlockTimestamp?: number | undefined; + platformLocktime?: number | undefined; + outputIndex: number; + rewardType?: string | undefined; + stakeableLocktime?: number | undefined; + staked?: boolean | undefined; + threshold?: number | undefined; + txHash: string; + utxoEndTimestamp?: number | undefined; + utxoStartTimestamp?: number | undefined; + utxoType: string; }; /** @internal */ -export const PChainUtxo$outboundSchema: z.ZodType = - z.object({ - addresses: z.array(z.string()), - asset: AssetAmount$outboundSchema, - consumedOnChainId: z.string(), - consumingTxHash: z.string().optional(), - createdOnChainId: z.string(), - utxoId: z.string(), - amount: z.string(), - assetId: z.string(), - blockNumber: z.string(), - blockTimestamp: z.number(), - consumingBlockNumber: z.string().optional(), - consumingBlockTimestamp: z.number().optional(), - platformLocktime: z.number().optional(), - outputIndex: z.number(), - rewardType: RewardType$outboundSchema.optional(), - stakeableLocktime: z.number().optional(), - staked: z.boolean().optional(), - threshold: z.number().optional(), - txHash: z.string(), - utxoEndTimestamp: z.number().optional(), - utxoStartTimestamp: z.number().optional(), - utxoType: UtxoType$outboundSchema, - }); +export const PChainUtxo$outboundSchema: z.ZodType< + PChainUtxo$Outbound, + z.ZodTypeDef, + PChainUtxo +> = z.object({ + addresses: z.array(z.string()), + asset: AssetAmount$outboundSchema, + consumedOnChainId: z.string(), + consumingTxHash: z.string().optional(), + createdOnChainId: z.string(), + utxoId: z.string(), + amount: z.string(), + assetId: z.string(), + blockNumber: z.string(), + blockTimestamp: z.number(), + consumingBlockNumber: z.string().optional(), + consumingBlockTimestamp: z.number().optional(), + platformLocktime: z.number().optional(), + outputIndex: z.number(), + rewardType: RewardType$outboundSchema.optional(), + stakeableLocktime: z.number().optional(), + staked: z.boolean().optional(), + threshold: z.number().optional(), + txHash: z.string(), + utxoEndTimestamp: z.number().optional(), + utxoStartTimestamp: z.number().optional(), + utxoType: UtxoType$outboundSchema, +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PChainUtxo$ { - /** @deprecated use `PChainUtxo$inboundSchema` instead. */ - export const inboundSchema = PChainUtxo$inboundSchema; - /** @deprecated use `PChainUtxo$outboundSchema` instead. */ - export const outboundSchema = PChainUtxo$outboundSchema; - /** @deprecated use `PChainUtxo$Outbound` instead. */ - export type Outbound = PChainUtxo$Outbound; + /** @deprecated use `PChainUtxo$inboundSchema` instead. */ + export const inboundSchema = PChainUtxo$inboundSchema; + /** @deprecated use `PChainUtxo$outboundSchema` instead. */ + export const outboundSchema = PChainUtxo$outboundSchema; + /** @deprecated use `PChainUtxo$Outbound` instead. */ + export type Outbound = PChainUtxo$Outbound; } diff --git a/src/models/components/pendingdelegatordetails.ts b/src/models/components/pendingdelegatordetails.ts index f24089a..b35d144 100644 --- a/src/models/components/pendingdelegatordetails.ts +++ b/src/models/components/pendingdelegatordetails.ts @@ -2,98 +2,100 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const PendingDelegatorDetailsDelegationStatus = { - Pending: "pending", + Pending: "pending", } as const; export type PendingDelegatorDetailsDelegationStatus = ClosedEnum< - typeof PendingDelegatorDetailsDelegationStatus + typeof PendingDelegatorDetailsDelegationStatus >; export type PendingDelegatorDetails = { - txHash: string; - nodeId: string; - rewardAddresses: Array; - amountDelegated: string; - delegationFee: string; - startTimestamp: number; - endTimestamp: number; - estimatedGrossReward: string; - estimatedNetReward: string; - delegationStatus: PendingDelegatorDetailsDelegationStatus; + txHash: string; + nodeId: string; + rewardAddresses: Array; + amountDelegated: string; + delegationFee: string; + startTimestamp: number; + endTimestamp: number; + estimatedGrossReward: string; + estimatedNetReward: string; + delegationStatus: PendingDelegatorDetailsDelegationStatus; }; /** @internal */ -export const PendingDelegatorDetailsDelegationStatus$inboundSchema: z.ZodNativeEnum< - typeof PendingDelegatorDetailsDelegationStatus -> = z.nativeEnum(PendingDelegatorDetailsDelegationStatus); +export const PendingDelegatorDetailsDelegationStatus$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(PendingDelegatorDetailsDelegationStatus); /** @internal */ -export const PendingDelegatorDetailsDelegationStatus$outboundSchema: z.ZodNativeEnum< - typeof PendingDelegatorDetailsDelegationStatus -> = PendingDelegatorDetailsDelegationStatus$inboundSchema; +export const PendingDelegatorDetailsDelegationStatus$outboundSchema: + z.ZodNativeEnum = + PendingDelegatorDetailsDelegationStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PendingDelegatorDetailsDelegationStatus$ { - /** @deprecated use `PendingDelegatorDetailsDelegationStatus$inboundSchema` instead. */ - export const inboundSchema = PendingDelegatorDetailsDelegationStatus$inboundSchema; - /** @deprecated use `PendingDelegatorDetailsDelegationStatus$outboundSchema` instead. */ - export const outboundSchema = PendingDelegatorDetailsDelegationStatus$outboundSchema; + /** @deprecated use `PendingDelegatorDetailsDelegationStatus$inboundSchema` instead. */ + export const inboundSchema = + PendingDelegatorDetailsDelegationStatus$inboundSchema; + /** @deprecated use `PendingDelegatorDetailsDelegationStatus$outboundSchema` instead. */ + export const outboundSchema = + PendingDelegatorDetailsDelegationStatus$outboundSchema; } /** @internal */ export const PendingDelegatorDetails$inboundSchema: z.ZodType< - PendingDelegatorDetails, - z.ZodTypeDef, - unknown + PendingDelegatorDetails, + z.ZodTypeDef, + unknown > = z.object({ - txHash: z.string(), - nodeId: z.string(), - rewardAddresses: z.array(z.string()), - amountDelegated: z.string(), - delegationFee: z.string(), - startTimestamp: z.number(), - endTimestamp: z.number(), - estimatedGrossReward: z.string(), - estimatedNetReward: z.string(), - delegationStatus: PendingDelegatorDetailsDelegationStatus$inboundSchema, + txHash: z.string(), + nodeId: z.string(), + rewardAddresses: z.array(z.string()), + amountDelegated: z.string(), + delegationFee: z.string(), + startTimestamp: z.number(), + endTimestamp: z.number(), + estimatedGrossReward: z.string(), + estimatedNetReward: z.string(), + delegationStatus: PendingDelegatorDetailsDelegationStatus$inboundSchema, }); /** @internal */ export type PendingDelegatorDetails$Outbound = { - txHash: string; - nodeId: string; - rewardAddresses: Array; - amountDelegated: string; - delegationFee: string; - startTimestamp: number; - endTimestamp: number; - estimatedGrossReward: string; - estimatedNetReward: string; - delegationStatus: string; + txHash: string; + nodeId: string; + rewardAddresses: Array; + amountDelegated: string; + delegationFee: string; + startTimestamp: number; + endTimestamp: number; + estimatedGrossReward: string; + estimatedNetReward: string; + delegationStatus: string; }; /** @internal */ export const PendingDelegatorDetails$outboundSchema: z.ZodType< - PendingDelegatorDetails$Outbound, - z.ZodTypeDef, - PendingDelegatorDetails + PendingDelegatorDetails$Outbound, + z.ZodTypeDef, + PendingDelegatorDetails > = z.object({ - txHash: z.string(), - nodeId: z.string(), - rewardAddresses: z.array(z.string()), - amountDelegated: z.string(), - delegationFee: z.string(), - startTimestamp: z.number(), - endTimestamp: z.number(), - estimatedGrossReward: z.string(), - estimatedNetReward: z.string(), - delegationStatus: PendingDelegatorDetailsDelegationStatus$outboundSchema, + txHash: z.string(), + nodeId: z.string(), + rewardAddresses: z.array(z.string()), + amountDelegated: z.string(), + delegationFee: z.string(), + startTimestamp: z.number(), + endTimestamp: z.number(), + estimatedGrossReward: z.string(), + estimatedNetReward: z.string(), + delegationStatus: PendingDelegatorDetailsDelegationStatus$outboundSchema, }); /** @@ -101,10 +103,10 @@ export const PendingDelegatorDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PendingDelegatorDetails$ { - /** @deprecated use `PendingDelegatorDetails$inboundSchema` instead. */ - export const inboundSchema = PendingDelegatorDetails$inboundSchema; - /** @deprecated use `PendingDelegatorDetails$outboundSchema` instead. */ - export const outboundSchema = PendingDelegatorDetails$outboundSchema; - /** @deprecated use `PendingDelegatorDetails$Outbound` instead. */ - export type Outbound = PendingDelegatorDetails$Outbound; + /** @deprecated use `PendingDelegatorDetails$inboundSchema` instead. */ + export const inboundSchema = PendingDelegatorDetails$inboundSchema; + /** @deprecated use `PendingDelegatorDetails$outboundSchema` instead. */ + export const outboundSchema = PendingDelegatorDetails$outboundSchema; + /** @deprecated use `PendingDelegatorDetails$Outbound` instead. */ + export type Outbound = PendingDelegatorDetails$Outbound; } diff --git a/src/models/components/pendingreward.ts b/src/models/components/pendingreward.ts index 0cc603f..62171a8 100644 --- a/src/models/components/pendingreward.ts +++ b/src/models/components/pendingreward.ts @@ -2,75 +2,82 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - AssetAmount, - AssetAmount$inboundSchema, - AssetAmount$Outbound, - AssetAmount$outboundSchema, + AssetAmount, + AssetAmount$inboundSchema, + AssetAmount$Outbound, + AssetAmount$outboundSchema, } from "./assetamount.js"; -import { RewardType, RewardType$inboundSchema, RewardType$outboundSchema } from "./rewardtype.js"; -import * as z from "zod"; +import { + RewardType, + RewardType$inboundSchema, + RewardType$outboundSchema, +} from "./rewardtype.js"; export type PendingReward = { - /** - * An array of P-Chain wallet addresses. - */ - addresses: Array; - txHash: string; - amountStaked: string; - nodeId: string; - startTimestamp: number; - endTimestamp: number; - rewardType: RewardType; - progress: number; - /** - * An object containing P-chain Asset basic info and the amount of that Asset ID. - */ - estimatedReward: AssetAmount; + /** + * An array of P-Chain wallet addresses. + */ + addresses: Array; + txHash: string; + amountStaked: string; + nodeId: string; + startTimestamp: number; + endTimestamp: number; + rewardType: RewardType; + progress: number; + /** + * An object containing P-chain Asset basic info and the amount of that Asset ID. + */ + estimatedReward: AssetAmount; }; /** @internal */ -export const PendingReward$inboundSchema: z.ZodType = - z.object({ - addresses: z.array(z.string()), - txHash: z.string(), - amountStaked: z.string(), - nodeId: z.string(), - startTimestamp: z.number(), - endTimestamp: z.number(), - rewardType: RewardType$inboundSchema, - progress: z.number(), - estimatedReward: AssetAmount$inboundSchema, - }); +export const PendingReward$inboundSchema: z.ZodType< + PendingReward, + z.ZodTypeDef, + unknown +> = z.object({ + addresses: z.array(z.string()), + txHash: z.string(), + amountStaked: z.string(), + nodeId: z.string(), + startTimestamp: z.number(), + endTimestamp: z.number(), + rewardType: RewardType$inboundSchema, + progress: z.number(), + estimatedReward: AssetAmount$inboundSchema, +}); /** @internal */ export type PendingReward$Outbound = { - addresses: Array; - txHash: string; - amountStaked: string; - nodeId: string; - startTimestamp: number; - endTimestamp: number; - rewardType: string; - progress: number; - estimatedReward: AssetAmount$Outbound; + addresses: Array; + txHash: string; + amountStaked: string; + nodeId: string; + startTimestamp: number; + endTimestamp: number; + rewardType: string; + progress: number; + estimatedReward: AssetAmount$Outbound; }; /** @internal */ export const PendingReward$outboundSchema: z.ZodType< - PendingReward$Outbound, - z.ZodTypeDef, - PendingReward + PendingReward$Outbound, + z.ZodTypeDef, + PendingReward > = z.object({ - addresses: z.array(z.string()), - txHash: z.string(), - amountStaked: z.string(), - nodeId: z.string(), - startTimestamp: z.number(), - endTimestamp: z.number(), - rewardType: RewardType$outboundSchema, - progress: z.number(), - estimatedReward: AssetAmount$outboundSchema, + addresses: z.array(z.string()), + txHash: z.string(), + amountStaked: z.string(), + nodeId: z.string(), + startTimestamp: z.number(), + endTimestamp: z.number(), + rewardType: RewardType$outboundSchema, + progress: z.number(), + estimatedReward: AssetAmount$outboundSchema, }); /** @@ -78,10 +85,10 @@ export const PendingReward$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PendingReward$ { - /** @deprecated use `PendingReward$inboundSchema` instead. */ - export const inboundSchema = PendingReward$inboundSchema; - /** @deprecated use `PendingReward$outboundSchema` instead. */ - export const outboundSchema = PendingReward$outboundSchema; - /** @deprecated use `PendingReward$Outbound` instead. */ - export type Outbound = PendingReward$Outbound; + /** @deprecated use `PendingReward$inboundSchema` instead. */ + export const inboundSchema = PendingReward$inboundSchema; + /** @deprecated use `PendingReward$outboundSchema` instead. */ + export const outboundSchema = PendingReward$outboundSchema; + /** @deprecated use `PendingReward$Outbound` instead. */ + export type Outbound = PendingReward$Outbound; } diff --git a/src/models/components/pendingteleportermessage.ts b/src/models/components/pendingteleportermessage.ts index b01cbc6..28cccde 100644 --- a/src/models/components/pendingteleportermessage.ts +++ b/src/models/components/pendingteleportermessage.ts @@ -2,134 +2,136 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - TeleporterReceipt, - TeleporterReceipt$inboundSchema, - TeleporterReceipt$Outbound, - TeleporterReceipt$outboundSchema, + TeleporterReceipt, + TeleporterReceipt$inboundSchema, + TeleporterReceipt$Outbound, + TeleporterReceipt$outboundSchema, } from "./teleporterreceipt.js"; import { - TeleporterRewardDetails, - TeleporterRewardDetails$inboundSchema, - TeleporterRewardDetails$Outbound, - TeleporterRewardDetails$outboundSchema, + TeleporterRewardDetails, + TeleporterRewardDetails$inboundSchema, + TeleporterRewardDetails$Outbound, + TeleporterRewardDetails$outboundSchema, } from "./teleporterrewarddetails.js"; import { - TeleporterSourceTransaction, - TeleporterSourceTransaction$inboundSchema, - TeleporterSourceTransaction$Outbound, - TeleporterSourceTransaction$outboundSchema, + TeleporterSourceTransaction, + TeleporterSourceTransaction$inboundSchema, + TeleporterSourceTransaction$Outbound, + TeleporterSourceTransaction$outboundSchema, } from "./teleportersourcetransaction.js"; -import * as z from "zod"; export const Status = { - Pending: "pending", + Pending: "pending", } as const; export type Status = ClosedEnum; export type PendingTeleporterMessage = { - messageId: string; - teleporterContractAddress: string; - sourceBlockchainId: string; - destinationBlockchainId: string; - sourceEvmChainId: string; - destinationEvmChainId: string; - messageNonce: string; - from: string; - to: string; - data?: string | undefined; - messageExecuted: boolean; - receipts: Array; - receiptDelivered: boolean; - rewardDetails: TeleporterRewardDetails; - sourceTransaction: TeleporterSourceTransaction; - status: Status; + messageId: string; + teleporterContractAddress: string; + sourceBlockchainId: string; + destinationBlockchainId: string; + sourceEvmChainId: string; + destinationEvmChainId: string; + messageNonce: string; + from: string; + to: string; + data?: string | undefined; + messageExecuted: boolean; + receipts: Array; + receiptDelivered: boolean; + rewardDetails: TeleporterRewardDetails; + sourceTransaction: TeleporterSourceTransaction; + status: Status; }; /** @internal */ -export const Status$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Status); +export const Status$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Status); /** @internal */ -export const Status$outboundSchema: z.ZodNativeEnum = Status$inboundSchema; +export const Status$outboundSchema: z.ZodNativeEnum = + Status$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Status$ { - /** @deprecated use `Status$inboundSchema` instead. */ - export const inboundSchema = Status$inboundSchema; - /** @deprecated use `Status$outboundSchema` instead. */ - export const outboundSchema = Status$outboundSchema; + /** @deprecated use `Status$inboundSchema` instead. */ + export const inboundSchema = Status$inboundSchema; + /** @deprecated use `Status$outboundSchema` instead. */ + export const outboundSchema = Status$outboundSchema; } /** @internal */ export const PendingTeleporterMessage$inboundSchema: z.ZodType< - PendingTeleporterMessage, - z.ZodTypeDef, - unknown + PendingTeleporterMessage, + z.ZodTypeDef, + unknown > = z.object({ - messageId: z.string(), - teleporterContractAddress: z.string(), - sourceBlockchainId: z.string(), - destinationBlockchainId: z.string(), - sourceEvmChainId: z.string(), - destinationEvmChainId: z.string(), - messageNonce: z.string(), - from: z.string(), - to: z.string(), - data: z.string().optional(), - messageExecuted: z.boolean(), - receipts: z.array(TeleporterReceipt$inboundSchema), - receiptDelivered: z.boolean(), - rewardDetails: TeleporterRewardDetails$inboundSchema, - sourceTransaction: TeleporterSourceTransaction$inboundSchema, - status: Status$inboundSchema, + messageId: z.string(), + teleporterContractAddress: z.string(), + sourceBlockchainId: z.string(), + destinationBlockchainId: z.string(), + sourceEvmChainId: z.string(), + destinationEvmChainId: z.string(), + messageNonce: z.string(), + from: z.string(), + to: z.string(), + data: z.string().optional(), + messageExecuted: z.boolean(), + receipts: z.array(TeleporterReceipt$inboundSchema), + receiptDelivered: z.boolean(), + rewardDetails: TeleporterRewardDetails$inboundSchema, + sourceTransaction: TeleporterSourceTransaction$inboundSchema, + status: Status$inboundSchema, }); /** @internal */ export type PendingTeleporterMessage$Outbound = { - messageId: string; - teleporterContractAddress: string; - sourceBlockchainId: string; - destinationBlockchainId: string; - sourceEvmChainId: string; - destinationEvmChainId: string; - messageNonce: string; - from: string; - to: string; - data?: string | undefined; - messageExecuted: boolean; - receipts: Array; - receiptDelivered: boolean; - rewardDetails: TeleporterRewardDetails$Outbound; - sourceTransaction: TeleporterSourceTransaction$Outbound; - status: string; + messageId: string; + teleporterContractAddress: string; + sourceBlockchainId: string; + destinationBlockchainId: string; + sourceEvmChainId: string; + destinationEvmChainId: string; + messageNonce: string; + from: string; + to: string; + data?: string | undefined; + messageExecuted: boolean; + receipts: Array; + receiptDelivered: boolean; + rewardDetails: TeleporterRewardDetails$Outbound; + sourceTransaction: TeleporterSourceTransaction$Outbound; + status: string; }; /** @internal */ export const PendingTeleporterMessage$outboundSchema: z.ZodType< - PendingTeleporterMessage$Outbound, - z.ZodTypeDef, - PendingTeleporterMessage + PendingTeleporterMessage$Outbound, + z.ZodTypeDef, + PendingTeleporterMessage > = z.object({ - messageId: z.string(), - teleporterContractAddress: z.string(), - sourceBlockchainId: z.string(), - destinationBlockchainId: z.string(), - sourceEvmChainId: z.string(), - destinationEvmChainId: z.string(), - messageNonce: z.string(), - from: z.string(), - to: z.string(), - data: z.string().optional(), - messageExecuted: z.boolean(), - receipts: z.array(TeleporterReceipt$outboundSchema), - receiptDelivered: z.boolean(), - rewardDetails: TeleporterRewardDetails$outboundSchema, - sourceTransaction: TeleporterSourceTransaction$outboundSchema, - status: Status$outboundSchema, + messageId: z.string(), + teleporterContractAddress: z.string(), + sourceBlockchainId: z.string(), + destinationBlockchainId: z.string(), + sourceEvmChainId: z.string(), + destinationEvmChainId: z.string(), + messageNonce: z.string(), + from: z.string(), + to: z.string(), + data: z.string().optional(), + messageExecuted: z.boolean(), + receipts: z.array(TeleporterReceipt$outboundSchema), + receiptDelivered: z.boolean(), + rewardDetails: TeleporterRewardDetails$outboundSchema, + sourceTransaction: TeleporterSourceTransaction$outboundSchema, + status: Status$outboundSchema, }); /** @@ -137,10 +139,10 @@ export const PendingTeleporterMessage$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PendingTeleporterMessage$ { - /** @deprecated use `PendingTeleporterMessage$inboundSchema` instead. */ - export const inboundSchema = PendingTeleporterMessage$inboundSchema; - /** @deprecated use `PendingTeleporterMessage$outboundSchema` instead. */ - export const outboundSchema = PendingTeleporterMessage$outboundSchema; - /** @deprecated use `PendingTeleporterMessage$Outbound` instead. */ - export type Outbound = PendingTeleporterMessage$Outbound; + /** @deprecated use `PendingTeleporterMessage$inboundSchema` instead. */ + export const inboundSchema = PendingTeleporterMessage$inboundSchema; + /** @deprecated use `PendingTeleporterMessage$outboundSchema` instead. */ + export const outboundSchema = PendingTeleporterMessage$outboundSchema; + /** @deprecated use `PendingTeleporterMessage$Outbound` instead. */ + export type Outbound = PendingTeleporterMessage$Outbound; } diff --git a/src/models/components/pendingvalidatordetails.ts b/src/models/components/pendingvalidatordetails.ts index 22a11b9..44ea0e6 100644 --- a/src/models/components/pendingvalidatordetails.ts +++ b/src/models/components/pendingvalidatordetails.ts @@ -2,103 +2,105 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - BlsCredentials, - BlsCredentials$inboundSchema, - BlsCredentials$Outbound, - BlsCredentials$outboundSchema, + BlsCredentials, + BlsCredentials$inboundSchema, + BlsCredentials$Outbound, + BlsCredentials$outboundSchema, } from "./blscredentials.js"; -import * as z from "zod"; export const PendingValidatorDetailsValidationStatus = { - Pending: "pending", + Pending: "pending", } as const; export type PendingValidatorDetailsValidationStatus = ClosedEnum< - typeof PendingValidatorDetailsValidationStatus + typeof PendingValidatorDetailsValidationStatus >; export type PendingValidatorDetails = { - txHash: string; - nodeId: string; - subnetId: string; - amountStaked: string; - delegationFee?: string | undefined; - startTimestamp: number; - endTimestamp: number; - /** - * Present for AddPermissionlessValidatorTx - */ - blsCredentials?: BlsCredentials | undefined; - validationStatus: PendingValidatorDetailsValidationStatus; + txHash: string; + nodeId: string; + subnetId: string; + amountStaked: string; + delegationFee?: string | undefined; + startTimestamp: number; + endTimestamp: number; + /** + * Present for AddPermissionlessValidatorTx + */ + blsCredentials?: BlsCredentials | undefined; + validationStatus: PendingValidatorDetailsValidationStatus; }; /** @internal */ -export const PendingValidatorDetailsValidationStatus$inboundSchema: z.ZodNativeEnum< - typeof PendingValidatorDetailsValidationStatus -> = z.nativeEnum(PendingValidatorDetailsValidationStatus); +export const PendingValidatorDetailsValidationStatus$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(PendingValidatorDetailsValidationStatus); /** @internal */ -export const PendingValidatorDetailsValidationStatus$outboundSchema: z.ZodNativeEnum< - typeof PendingValidatorDetailsValidationStatus -> = PendingValidatorDetailsValidationStatus$inboundSchema; +export const PendingValidatorDetailsValidationStatus$outboundSchema: + z.ZodNativeEnum = + PendingValidatorDetailsValidationStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PendingValidatorDetailsValidationStatus$ { - /** @deprecated use `PendingValidatorDetailsValidationStatus$inboundSchema` instead. */ - export const inboundSchema = PendingValidatorDetailsValidationStatus$inboundSchema; - /** @deprecated use `PendingValidatorDetailsValidationStatus$outboundSchema` instead. */ - export const outboundSchema = PendingValidatorDetailsValidationStatus$outboundSchema; + /** @deprecated use `PendingValidatorDetailsValidationStatus$inboundSchema` instead. */ + export const inboundSchema = + PendingValidatorDetailsValidationStatus$inboundSchema; + /** @deprecated use `PendingValidatorDetailsValidationStatus$outboundSchema` instead. */ + export const outboundSchema = + PendingValidatorDetailsValidationStatus$outboundSchema; } /** @internal */ export const PendingValidatorDetails$inboundSchema: z.ZodType< - PendingValidatorDetails, - z.ZodTypeDef, - unknown + PendingValidatorDetails, + z.ZodTypeDef, + unknown > = z.object({ - txHash: z.string(), - nodeId: z.string(), - subnetId: z.string(), - amountStaked: z.string(), - delegationFee: z.string().optional(), - startTimestamp: z.number(), - endTimestamp: z.number(), - blsCredentials: BlsCredentials$inboundSchema.optional(), - validationStatus: PendingValidatorDetailsValidationStatus$inboundSchema, + txHash: z.string(), + nodeId: z.string(), + subnetId: z.string(), + amountStaked: z.string(), + delegationFee: z.string().optional(), + startTimestamp: z.number(), + endTimestamp: z.number(), + blsCredentials: BlsCredentials$inboundSchema.optional(), + validationStatus: PendingValidatorDetailsValidationStatus$inboundSchema, }); /** @internal */ export type PendingValidatorDetails$Outbound = { - txHash: string; - nodeId: string; - subnetId: string; - amountStaked: string; - delegationFee?: string | undefined; - startTimestamp: number; - endTimestamp: number; - blsCredentials?: BlsCredentials$Outbound | undefined; - validationStatus: string; + txHash: string; + nodeId: string; + subnetId: string; + amountStaked: string; + delegationFee?: string | undefined; + startTimestamp: number; + endTimestamp: number; + blsCredentials?: BlsCredentials$Outbound | undefined; + validationStatus: string; }; /** @internal */ export const PendingValidatorDetails$outboundSchema: z.ZodType< - PendingValidatorDetails$Outbound, - z.ZodTypeDef, - PendingValidatorDetails + PendingValidatorDetails$Outbound, + z.ZodTypeDef, + PendingValidatorDetails > = z.object({ - txHash: z.string(), - nodeId: z.string(), - subnetId: z.string(), - amountStaked: z.string(), - delegationFee: z.string().optional(), - startTimestamp: z.number(), - endTimestamp: z.number(), - blsCredentials: BlsCredentials$outboundSchema.optional(), - validationStatus: PendingValidatorDetailsValidationStatus$outboundSchema, + txHash: z.string(), + nodeId: z.string(), + subnetId: z.string(), + amountStaked: z.string(), + delegationFee: z.string().optional(), + startTimestamp: z.number(), + endTimestamp: z.number(), + blsCredentials: BlsCredentials$outboundSchema.optional(), + validationStatus: PendingValidatorDetailsValidationStatus$outboundSchema, }); /** @@ -106,10 +108,10 @@ export const PendingValidatorDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PendingValidatorDetails$ { - /** @deprecated use `PendingValidatorDetails$inboundSchema` instead. */ - export const inboundSchema = PendingValidatorDetails$inboundSchema; - /** @deprecated use `PendingValidatorDetails$outboundSchema` instead. */ - export const outboundSchema = PendingValidatorDetails$outboundSchema; - /** @deprecated use `PendingValidatorDetails$Outbound` instead. */ - export type Outbound = PendingValidatorDetails$Outbound; + /** @deprecated use `PendingValidatorDetails$inboundSchema` instead. */ + export const inboundSchema = PendingValidatorDetails$inboundSchema; + /** @deprecated use `PendingValidatorDetails$outboundSchema` instead. */ + export const outboundSchema = PendingValidatorDetails$outboundSchema; + /** @deprecated use `PendingValidatorDetails$Outbound` instead. */ + export type Outbound = PendingValidatorDetails$Outbound; } diff --git a/src/models/components/pricingproviders.ts b/src/models/components/pricingproviders.ts index 6fd8770..974c87b 100644 --- a/src/models/components/pricingproviders.ts +++ b/src/models/components/pricingproviders.ts @@ -5,27 +5,30 @@ import * as z from "zod"; export type PricingProviders = { - coingeckoCoinId?: string | undefined; + coingeckoCoinId?: string | undefined; }; /** @internal */ -export const PricingProviders$inboundSchema: z.ZodType = - z.object({ - coingeckoCoinId: z.string().optional(), - }); +export const PricingProviders$inboundSchema: z.ZodType< + PricingProviders, + z.ZodTypeDef, + unknown +> = z.object({ + coingeckoCoinId: z.string().optional(), +}); /** @internal */ export type PricingProviders$Outbound = { - coingeckoCoinId?: string | undefined; + coingeckoCoinId?: string | undefined; }; /** @internal */ export const PricingProviders$outboundSchema: z.ZodType< - PricingProviders$Outbound, - z.ZodTypeDef, - PricingProviders + PricingProviders$Outbound, + z.ZodTypeDef, + PricingProviders > = z.object({ - coingeckoCoinId: z.string().optional(), + coingeckoCoinId: z.string().optional(), }); /** @@ -33,10 +36,10 @@ export const PricingProviders$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PricingProviders$ { - /** @deprecated use `PricingProviders$inboundSchema` instead. */ - export const inboundSchema = PricingProviders$inboundSchema; - /** @deprecated use `PricingProviders$outboundSchema` instead. */ - export const outboundSchema = PricingProviders$outboundSchema; - /** @deprecated use `PricingProviders$Outbound` instead. */ - export type Outbound = PricingProviders$Outbound; + /** @deprecated use `PricingProviders$inboundSchema` instead. */ + export const inboundSchema = PricingProviders$inboundSchema; + /** @deprecated use `PricingProviders$outboundSchema` instead. */ + export const outboundSchema = PricingProviders$outboundSchema; + /** @deprecated use `PricingProviders$Outbound` instead. */ + export type Outbound = PricingProviders$Outbound; } diff --git a/src/models/components/primarynetwork.ts b/src/models/components/primarynetwork.ts index e4c70ff..557ad96 100644 --- a/src/models/components/primarynetwork.ts +++ b/src/models/components/primarynetwork.ts @@ -2,30 +2,32 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const PrimaryNetwork = { - Mainnet: "mainnet", - Fuji: "fuji", + Mainnet: "mainnet", + Fuji: "fuji", } as const; export type PrimaryNetwork = ClosedEnum; /** @internal */ -export const PrimaryNetwork$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(PrimaryNetwork); +export const PrimaryNetwork$inboundSchema: z.ZodNativeEnum< + typeof PrimaryNetwork +> = z.nativeEnum(PrimaryNetwork); /** @internal */ -export const PrimaryNetwork$outboundSchema: z.ZodNativeEnum = - PrimaryNetwork$inboundSchema; +export const PrimaryNetwork$outboundSchema: z.ZodNativeEnum< + typeof PrimaryNetwork +> = PrimaryNetwork$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PrimaryNetwork$ { - /** @deprecated use `PrimaryNetwork$inboundSchema` instead. */ - export const inboundSchema = PrimaryNetwork$inboundSchema; - /** @deprecated use `PrimaryNetwork$outboundSchema` instead. */ - export const outboundSchema = PrimaryNetwork$outboundSchema; + /** @deprecated use `PrimaryNetwork$inboundSchema` instead. */ + export const inboundSchema = PrimaryNetwork$inboundSchema; + /** @deprecated use `PrimaryNetwork$outboundSchema` instead. */ + export const outboundSchema = PrimaryNetwork$outboundSchema; } diff --git a/src/models/components/primarynetworkassetcap.ts b/src/models/components/primarynetworkassetcap.ts index 1b66409..f73cfdb 100644 --- a/src/models/components/primarynetworkassetcap.ts +++ b/src/models/components/primarynetworkassetcap.ts @@ -2,15 +2,15 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * Cap represents if an asset is a variable or fixed cap asset. */ export const PrimaryNetworkAssetCap = { - Fixed: "fixed", - Variable: "variable", + Fixed: "fixed", + Variable: "variable", } as const; /** * Cap represents if an asset is a variable or fixed cap asset. @@ -18,20 +18,22 @@ export const PrimaryNetworkAssetCap = { export type PrimaryNetworkAssetCap = ClosedEnum; /** @internal */ -export const PrimaryNetworkAssetCap$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(PrimaryNetworkAssetCap); +export const PrimaryNetworkAssetCap$inboundSchema: z.ZodNativeEnum< + typeof PrimaryNetworkAssetCap +> = z.nativeEnum(PrimaryNetworkAssetCap); /** @internal */ -export const PrimaryNetworkAssetCap$outboundSchema: z.ZodNativeEnum = - PrimaryNetworkAssetCap$inboundSchema; +export const PrimaryNetworkAssetCap$outboundSchema: z.ZodNativeEnum< + typeof PrimaryNetworkAssetCap +> = PrimaryNetworkAssetCap$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PrimaryNetworkAssetCap$ { - /** @deprecated use `PrimaryNetworkAssetCap$inboundSchema` instead. */ - export const inboundSchema = PrimaryNetworkAssetCap$inboundSchema; - /** @deprecated use `PrimaryNetworkAssetCap$outboundSchema` instead. */ - export const outboundSchema = PrimaryNetworkAssetCap$outboundSchema; + /** @deprecated use `PrimaryNetworkAssetCap$inboundSchema` instead. */ + export const inboundSchema = PrimaryNetworkAssetCap$inboundSchema; + /** @deprecated use `PrimaryNetworkAssetCap$outboundSchema` instead. */ + export const outboundSchema = PrimaryNetworkAssetCap$outboundSchema; } diff --git a/src/models/components/primarynetworkassettype.ts b/src/models/components/primarynetworkassettype.ts index 0a2f35f..b5f7e5d 100644 --- a/src/models/components/primarynetworkassettype.ts +++ b/src/models/components/primarynetworkassettype.ts @@ -2,29 +2,31 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * Type of asset like SECP256K1 or NFT. */ export const PrimaryNetworkAssetType = { - Secp256k1: "secp256k1", - Nft: "nft", + Secp256k1: "secp256k1", + Nft: "nft", } as const; /** * Type of asset like SECP256K1 or NFT. */ -export type PrimaryNetworkAssetType = ClosedEnum; +export type PrimaryNetworkAssetType = ClosedEnum< + typeof PrimaryNetworkAssetType +>; /** @internal */ export const PrimaryNetworkAssetType$inboundSchema: z.ZodNativeEnum< - typeof PrimaryNetworkAssetType + typeof PrimaryNetworkAssetType > = z.nativeEnum(PrimaryNetworkAssetType); /** @internal */ export const PrimaryNetworkAssetType$outboundSchema: z.ZodNativeEnum< - typeof PrimaryNetworkAssetType + typeof PrimaryNetworkAssetType > = PrimaryNetworkAssetType$inboundSchema; /** @@ -32,8 +34,8 @@ export const PrimaryNetworkAssetType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PrimaryNetworkAssetType$ { - /** @deprecated use `PrimaryNetworkAssetType$inboundSchema` instead. */ - export const inboundSchema = PrimaryNetworkAssetType$inboundSchema; - /** @deprecated use `PrimaryNetworkAssetType$outboundSchema` instead. */ - export const outboundSchema = PrimaryNetworkAssetType$outboundSchema; + /** @deprecated use `PrimaryNetworkAssetType$inboundSchema` instead. */ + export const inboundSchema = PrimaryNetworkAssetType$inboundSchema; + /** @deprecated use `PrimaryNetworkAssetType$outboundSchema` instead. */ + export const outboundSchema = PrimaryNetworkAssetType$outboundSchema; } diff --git a/src/models/components/primarynetworkblock.ts b/src/models/components/primarynetworkblock.ts index ed15a71..8cf72e1 100644 --- a/src/models/components/primarynetworkblock.ts +++ b/src/models/components/primarynetworkblock.ts @@ -2,75 +2,75 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - ProposerDetails, - ProposerDetails$inboundSchema, - ProposerDetails$Outbound, - ProposerDetails$outboundSchema, + ProposerDetails, + ProposerDetails$inboundSchema, + ProposerDetails$Outbound, + ProposerDetails$outboundSchema, } from "./proposerdetails.js"; -import * as z from "zod"; export type PrimaryNetworkBlock = { - blockNumber: string; - blockHash: string; - parentHash: string; - blockTimestamp: number; - blockType: string; - txCount: number; - transactions: Array; - blockSizeBytes: number; - currentSupply?: string | undefined; - proposerDetails?: ProposerDetails | undefined; + blockNumber: string; + blockHash: string; + parentHash: string; + blockTimestamp: number; + blockType: string; + txCount: number; + transactions: Array; + blockSizeBytes: number; + currentSupply?: string | undefined; + proposerDetails?: ProposerDetails | undefined; }; /** @internal */ export const PrimaryNetworkBlock$inboundSchema: z.ZodType< - PrimaryNetworkBlock, - z.ZodTypeDef, - unknown + PrimaryNetworkBlock, + z.ZodTypeDef, + unknown > = z.object({ - blockNumber: z.string(), - blockHash: z.string(), - parentHash: z.string(), - blockTimestamp: z.number(), - blockType: z.string(), - txCount: z.number(), - transactions: z.array(z.string()), - blockSizeBytes: z.number(), - currentSupply: z.string().optional(), - proposerDetails: ProposerDetails$inboundSchema.optional(), + blockNumber: z.string(), + blockHash: z.string(), + parentHash: z.string(), + blockTimestamp: z.number(), + blockType: z.string(), + txCount: z.number(), + transactions: z.array(z.string()), + blockSizeBytes: z.number(), + currentSupply: z.string().optional(), + proposerDetails: ProposerDetails$inboundSchema.optional(), }); /** @internal */ export type PrimaryNetworkBlock$Outbound = { - blockNumber: string; - blockHash: string; - parentHash: string; - blockTimestamp: number; - blockType: string; - txCount: number; - transactions: Array; - blockSizeBytes: number; - currentSupply?: string | undefined; - proposerDetails?: ProposerDetails$Outbound | undefined; + blockNumber: string; + blockHash: string; + parentHash: string; + blockTimestamp: number; + blockType: string; + txCount: number; + transactions: Array; + blockSizeBytes: number; + currentSupply?: string | undefined; + proposerDetails?: ProposerDetails$Outbound | undefined; }; /** @internal */ export const PrimaryNetworkBlock$outboundSchema: z.ZodType< - PrimaryNetworkBlock$Outbound, - z.ZodTypeDef, - PrimaryNetworkBlock + PrimaryNetworkBlock$Outbound, + z.ZodTypeDef, + PrimaryNetworkBlock > = z.object({ - blockNumber: z.string(), - blockHash: z.string(), - parentHash: z.string(), - blockTimestamp: z.number(), - blockType: z.string(), - txCount: z.number(), - transactions: z.array(z.string()), - blockSizeBytes: z.number(), - currentSupply: z.string().optional(), - proposerDetails: ProposerDetails$outboundSchema.optional(), + blockNumber: z.string(), + blockHash: z.string(), + parentHash: z.string(), + blockTimestamp: z.number(), + blockType: z.string(), + txCount: z.number(), + transactions: z.array(z.string()), + blockSizeBytes: z.number(), + currentSupply: z.string().optional(), + proposerDetails: ProposerDetails$outboundSchema.optional(), }); /** @@ -78,10 +78,10 @@ export const PrimaryNetworkBlock$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PrimaryNetworkBlock$ { - /** @deprecated use `PrimaryNetworkBlock$inboundSchema` instead. */ - export const inboundSchema = PrimaryNetworkBlock$inboundSchema; - /** @deprecated use `PrimaryNetworkBlock$outboundSchema` instead. */ - export const outboundSchema = PrimaryNetworkBlock$outboundSchema; - /** @deprecated use `PrimaryNetworkBlock$Outbound` instead. */ - export type Outbound = PrimaryNetworkBlock$Outbound; + /** @deprecated use `PrimaryNetworkBlock$inboundSchema` instead. */ + export const inboundSchema = PrimaryNetworkBlock$inboundSchema; + /** @deprecated use `PrimaryNetworkBlock$outboundSchema` instead. */ + export const outboundSchema = PrimaryNetworkBlock$outboundSchema; + /** @deprecated use `PrimaryNetworkBlock$Outbound` instead. */ + export type Outbound = PrimaryNetworkBlock$Outbound; } diff --git a/src/models/components/primarynetworkchaininfo.ts b/src/models/components/primarynetworkchaininfo.ts index 959751a..f976af3 100644 --- a/src/models/components/primarynetworkchaininfo.ts +++ b/src/models/components/primarynetworkchaininfo.ts @@ -2,47 +2,47 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PrimaryNetwork, - PrimaryNetwork$inboundSchema, - PrimaryNetwork$outboundSchema, + PrimaryNetwork, + PrimaryNetwork$inboundSchema, + PrimaryNetwork$outboundSchema, } from "./primarynetwork.js"; import { - PrimaryNetworkChainName, - PrimaryNetworkChainName$inboundSchema, - PrimaryNetworkChainName$outboundSchema, + PrimaryNetworkChainName, + PrimaryNetworkChainName$inboundSchema, + PrimaryNetworkChainName$outboundSchema, } from "./primarynetworkchainname.js"; -import * as z from "zod"; export type PrimaryNetworkChainInfo = { - chainName: PrimaryNetworkChainName; - network: PrimaryNetwork; + chainName: PrimaryNetworkChainName; + network: PrimaryNetwork; }; /** @internal */ export const PrimaryNetworkChainInfo$inboundSchema: z.ZodType< - PrimaryNetworkChainInfo, - z.ZodTypeDef, - unknown + PrimaryNetworkChainInfo, + z.ZodTypeDef, + unknown > = z.object({ - chainName: PrimaryNetworkChainName$inboundSchema, - network: PrimaryNetwork$inboundSchema, + chainName: PrimaryNetworkChainName$inboundSchema, + network: PrimaryNetwork$inboundSchema, }); /** @internal */ export type PrimaryNetworkChainInfo$Outbound = { - chainName: string; - network: string; + chainName: string; + network: string; }; /** @internal */ export const PrimaryNetworkChainInfo$outboundSchema: z.ZodType< - PrimaryNetworkChainInfo$Outbound, - z.ZodTypeDef, - PrimaryNetworkChainInfo + PrimaryNetworkChainInfo$Outbound, + z.ZodTypeDef, + PrimaryNetworkChainInfo > = z.object({ - chainName: PrimaryNetworkChainName$outboundSchema, - network: PrimaryNetwork$outboundSchema, + chainName: PrimaryNetworkChainName$outboundSchema, + network: PrimaryNetwork$outboundSchema, }); /** @@ -50,10 +50,10 @@ export const PrimaryNetworkChainInfo$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PrimaryNetworkChainInfo$ { - /** @deprecated use `PrimaryNetworkChainInfo$inboundSchema` instead. */ - export const inboundSchema = PrimaryNetworkChainInfo$inboundSchema; - /** @deprecated use `PrimaryNetworkChainInfo$outboundSchema` instead. */ - export const outboundSchema = PrimaryNetworkChainInfo$outboundSchema; - /** @deprecated use `PrimaryNetworkChainInfo$Outbound` instead. */ - export type Outbound = PrimaryNetworkChainInfo$Outbound; + /** @deprecated use `PrimaryNetworkChainInfo$inboundSchema` instead. */ + export const inboundSchema = PrimaryNetworkChainInfo$inboundSchema; + /** @deprecated use `PrimaryNetworkChainInfo$outboundSchema` instead. */ + export const outboundSchema = PrimaryNetworkChainInfo$outboundSchema; + /** @deprecated use `PrimaryNetworkChainInfo$Outbound` instead. */ + export type Outbound = PrimaryNetworkChainInfo$Outbound; } diff --git a/src/models/components/primarynetworkchainname.ts b/src/models/components/primarynetworkchainname.ts index f79c39a..954c686 100644 --- a/src/models/components/primarynetworkchainname.ts +++ b/src/models/components/primarynetworkchainname.ts @@ -2,24 +2,26 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const PrimaryNetworkChainName = { - PChain: "p-chain", - XChain: "x-chain", - CChain: "c-chain", + PChain: "p-chain", + XChain: "x-chain", + CChain: "c-chain", } as const; -export type PrimaryNetworkChainName = ClosedEnum; +export type PrimaryNetworkChainName = ClosedEnum< + typeof PrimaryNetworkChainName +>; /** @internal */ export const PrimaryNetworkChainName$inboundSchema: z.ZodNativeEnum< - typeof PrimaryNetworkChainName + typeof PrimaryNetworkChainName > = z.nativeEnum(PrimaryNetworkChainName); /** @internal */ export const PrimaryNetworkChainName$outboundSchema: z.ZodNativeEnum< - typeof PrimaryNetworkChainName + typeof PrimaryNetworkChainName > = PrimaryNetworkChainName$inboundSchema; /** @@ -27,8 +29,8 @@ export const PrimaryNetworkChainName$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PrimaryNetworkChainName$ { - /** @deprecated use `PrimaryNetworkChainName$inboundSchema` instead. */ - export const inboundSchema = PrimaryNetworkChainName$inboundSchema; - /** @deprecated use `PrimaryNetworkChainName$outboundSchema` instead. */ - export const outboundSchema = PrimaryNetworkChainName$outboundSchema; + /** @deprecated use `PrimaryNetworkChainName$inboundSchema` instead. */ + export const inboundSchema = PrimaryNetworkChainName$inboundSchema; + /** @deprecated use `PrimaryNetworkChainName$outboundSchema` instead. */ + export const outboundSchema = PrimaryNetworkChainName$outboundSchema; } diff --git a/src/models/components/primarynetworkoperationtype.ts b/src/models/components/primarynetworkoperationtype.ts index cb49030..6f5e0f5 100644 --- a/src/models/components/primarynetworkoperationtype.ts +++ b/src/models/components/primarynetworkoperationtype.ts @@ -2,24 +2,28 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const PrimaryNetworkOperationType = { - TransactionExportPrimaryNetwork: "TRANSACTION_EXPORT_PRIMARY_NETWORK", - TransactionExportPrimaryNetworkStaking: "TRANSACTION_EXPORT_PRIMARY_NETWORK_STAKING", - TransactionExportPrimaryNetworkSimple: "TRANSACTION_EXPORT_PRIMARY_NETWORK_SIMPLE", + TransactionExportPrimaryNetwork: "TRANSACTION_EXPORT_PRIMARY_NETWORK", + TransactionExportPrimaryNetworkStaking: + "TRANSACTION_EXPORT_PRIMARY_NETWORK_STAKING", + TransactionExportPrimaryNetworkSimple: + "TRANSACTION_EXPORT_PRIMARY_NETWORK_SIMPLE", } as const; -export type PrimaryNetworkOperationType = ClosedEnum; +export type PrimaryNetworkOperationType = ClosedEnum< + typeof PrimaryNetworkOperationType +>; /** @internal */ export const PrimaryNetworkOperationType$inboundSchema: z.ZodNativeEnum< - typeof PrimaryNetworkOperationType + typeof PrimaryNetworkOperationType > = z.nativeEnum(PrimaryNetworkOperationType); /** @internal */ export const PrimaryNetworkOperationType$outboundSchema: z.ZodNativeEnum< - typeof PrimaryNetworkOperationType + typeof PrimaryNetworkOperationType > = PrimaryNetworkOperationType$inboundSchema; /** @@ -27,8 +31,8 @@ export const PrimaryNetworkOperationType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PrimaryNetworkOperationType$ { - /** @deprecated use `PrimaryNetworkOperationType$inboundSchema` instead. */ - export const inboundSchema = PrimaryNetworkOperationType$inboundSchema; - /** @deprecated use `PrimaryNetworkOperationType$outboundSchema` instead. */ - export const outboundSchema = PrimaryNetworkOperationType$outboundSchema; + /** @deprecated use `PrimaryNetworkOperationType$inboundSchema` instead. */ + export const inboundSchema = PrimaryNetworkOperationType$inboundSchema; + /** @deprecated use `PrimaryNetworkOperationType$outboundSchema` instead. */ + export const outboundSchema = PrimaryNetworkOperationType$outboundSchema; } diff --git a/src/models/components/primarynetworkoptions.ts b/src/models/components/primarynetworkoptions.ts index 7c31c9d..2389ef1 100644 --- a/src/models/components/primarynetworkoptions.ts +++ b/src/models/components/primarynetworkoptions.ts @@ -2,78 +2,80 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const IncludeChains = { - ElevenNonillionOneHundredAndElevenOctillionOneHundredAndElevenSeptillionOneHundredAndElevenSextillionOneHundredAndElevenQuintillionOneHundredAndElevenQuadrillionOneHundredAndElevenTrillionOneHundredAndElevenBillionOneHundredAndElevenMillionOneHundredAndElevenThousandOneHundredAndElevenLpoYY: - "11111111111111111111111111111111LpoYY", - TwooYmbnv4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM: - "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - TwoJVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm: - "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm", - Twoq9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAx5UQxse55x1Q5: - "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5", - YH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp: - "yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp", - PChain: "p-chain", - XChain: "x-chain", - CChain: "c-chain", + ElevenNonillionOneHundredAndElevenOctillionOneHundredAndElevenSeptillionOneHundredAndElevenSextillionOneHundredAndElevenQuintillionOneHundredAndElevenQuadrillionOneHundredAndElevenTrillionOneHundredAndElevenBillionOneHundredAndElevenMillionOneHundredAndElevenThousandOneHundredAndElevenLpoYY: + "11111111111111111111111111111111LpoYY", + TwooYmbnv4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM: + "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + TwoJVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm: + "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm", + Twoq9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAx5UQxse55x1Q5: + "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5", + YH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp: + "yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp", + PChain: "p-chain", + XChain: "x-chain", + CChain: "c-chain", } as const; export type IncludeChains = ClosedEnum; export type PrimaryNetworkOptions = { - addresses?: Array | undefined; - cChainEvmAddresses?: Array | undefined; - includeChains: Array; + addresses?: Array | undefined; + cChainEvmAddresses?: Array | undefined; + includeChains: Array; }; /** @internal */ -export const IncludeChains$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(IncludeChains); +export const IncludeChains$inboundSchema: z.ZodNativeEnum< + typeof IncludeChains +> = z.nativeEnum(IncludeChains); /** @internal */ -export const IncludeChains$outboundSchema: z.ZodNativeEnum = - IncludeChains$inboundSchema; +export const IncludeChains$outboundSchema: z.ZodNativeEnum< + typeof IncludeChains +> = IncludeChains$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IncludeChains$ { - /** @deprecated use `IncludeChains$inboundSchema` instead. */ - export const inboundSchema = IncludeChains$inboundSchema; - /** @deprecated use `IncludeChains$outboundSchema` instead. */ - export const outboundSchema = IncludeChains$outboundSchema; + /** @deprecated use `IncludeChains$inboundSchema` instead. */ + export const inboundSchema = IncludeChains$inboundSchema; + /** @deprecated use `IncludeChains$outboundSchema` instead. */ + export const outboundSchema = IncludeChains$outboundSchema; } /** @internal */ export const PrimaryNetworkOptions$inboundSchema: z.ZodType< - PrimaryNetworkOptions, - z.ZodTypeDef, - unknown + PrimaryNetworkOptions, + z.ZodTypeDef, + unknown > = z.object({ - addresses: z.array(z.string()).optional(), - cChainEvmAddresses: z.array(z.string()).optional(), - includeChains: z.array(IncludeChains$inboundSchema), + addresses: z.array(z.string()).optional(), + cChainEvmAddresses: z.array(z.string()).optional(), + includeChains: z.array(IncludeChains$inboundSchema), }); /** @internal */ export type PrimaryNetworkOptions$Outbound = { - addresses?: Array | undefined; - cChainEvmAddresses?: Array | undefined; - includeChains: Array; + addresses?: Array | undefined; + cChainEvmAddresses?: Array | undefined; + includeChains: Array; }; /** @internal */ export const PrimaryNetworkOptions$outboundSchema: z.ZodType< - PrimaryNetworkOptions$Outbound, - z.ZodTypeDef, - PrimaryNetworkOptions + PrimaryNetworkOptions$Outbound, + z.ZodTypeDef, + PrimaryNetworkOptions > = z.object({ - addresses: z.array(z.string()).optional(), - cChainEvmAddresses: z.array(z.string()).optional(), - includeChains: z.array(IncludeChains$outboundSchema), + addresses: z.array(z.string()).optional(), + cChainEvmAddresses: z.array(z.string()).optional(), + includeChains: z.array(IncludeChains$outboundSchema), }); /** @@ -81,10 +83,10 @@ export const PrimaryNetworkOptions$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PrimaryNetworkOptions$ { - /** @deprecated use `PrimaryNetworkOptions$inboundSchema` instead. */ - export const inboundSchema = PrimaryNetworkOptions$inboundSchema; - /** @deprecated use `PrimaryNetworkOptions$outboundSchema` instead. */ - export const outboundSchema = PrimaryNetworkOptions$outboundSchema; - /** @deprecated use `PrimaryNetworkOptions$Outbound` instead. */ - export type Outbound = PrimaryNetworkOptions$Outbound; + /** @deprecated use `PrimaryNetworkOptions$inboundSchema` instead. */ + export const inboundSchema = PrimaryNetworkOptions$inboundSchema; + /** @deprecated use `PrimaryNetworkOptions$outboundSchema` instead. */ + export const outboundSchema = PrimaryNetworkOptions$outboundSchema; + /** @deprecated use `PrimaryNetworkOptions$Outbound` instead. */ + export type Outbound = PrimaryNetworkOptions$Outbound; } diff --git a/src/models/components/primarynetworktxtype.ts b/src/models/components/primarynetworktxtype.ts index b49dfd5..85494c9 100644 --- a/src/models/components/primarynetworktxtype.ts +++ b/src/models/components/primarynetworktxtype.ts @@ -2,46 +2,48 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const PrimaryNetworkTxType = { - AddValidatorTx: "AddValidatorTx", - AddSubnetValidatorTx: "AddSubnetValidatorTx", - AddDelegatorTx: "AddDelegatorTx", - CreateChainTx: "CreateChainTx", - CreateSubnetTx: "CreateSubnetTx", - ImportTx: "ImportTx", - ExportTx: "ExportTx", - AdvanceTimeTx: "AdvanceTimeTx", - RewardValidatorTx: "RewardValidatorTx", - RemoveSubnetValidatorTx: "RemoveSubnetValidatorTx", - TransformSubnetTx: "TransformSubnetTx", - AddPermissionlessValidatorTx: "AddPermissionlessValidatorTx", - AddPermissionlessDelegatorTx: "AddPermissionlessDelegatorTx", - BaseTx: "BaseTx", - TransferSubnetOwnershipTx: "TransferSubnetOwnershipTx", - Unknown: "UNKNOWN", - CreateAssetTx: "CreateAssetTx", - OperationTx: "OperationTx", + AddValidatorTx: "AddValidatorTx", + AddSubnetValidatorTx: "AddSubnetValidatorTx", + AddDelegatorTx: "AddDelegatorTx", + CreateChainTx: "CreateChainTx", + CreateSubnetTx: "CreateSubnetTx", + ImportTx: "ImportTx", + ExportTx: "ExportTx", + AdvanceTimeTx: "AdvanceTimeTx", + RewardValidatorTx: "RewardValidatorTx", + RemoveSubnetValidatorTx: "RemoveSubnetValidatorTx", + TransformSubnetTx: "TransformSubnetTx", + AddPermissionlessValidatorTx: "AddPermissionlessValidatorTx", + AddPermissionlessDelegatorTx: "AddPermissionlessDelegatorTx", + BaseTx: "BaseTx", + TransferSubnetOwnershipTx: "TransferSubnetOwnershipTx", + Unknown: "UNKNOWN", + CreateAssetTx: "CreateAssetTx", + OperationTx: "OperationTx", } as const; export type PrimaryNetworkTxType = ClosedEnum; /** @internal */ -export const PrimaryNetworkTxType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(PrimaryNetworkTxType); +export const PrimaryNetworkTxType$inboundSchema: z.ZodNativeEnum< + typeof PrimaryNetworkTxType +> = z.nativeEnum(PrimaryNetworkTxType); /** @internal */ -export const PrimaryNetworkTxType$outboundSchema: z.ZodNativeEnum = - PrimaryNetworkTxType$inboundSchema; +export const PrimaryNetworkTxType$outboundSchema: z.ZodNativeEnum< + typeof PrimaryNetworkTxType +> = PrimaryNetworkTxType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PrimaryNetworkTxType$ { - /** @deprecated use `PrimaryNetworkTxType$inboundSchema` instead. */ - export const inboundSchema = PrimaryNetworkTxType$inboundSchema; - /** @deprecated use `PrimaryNetworkTxType$outboundSchema` instead. */ - export const outboundSchema = PrimaryNetworkTxType$outboundSchema; + /** @deprecated use `PrimaryNetworkTxType$inboundSchema` instead. */ + export const inboundSchema = PrimaryNetworkTxType$inboundSchema; + /** @deprecated use `PrimaryNetworkTxType$outboundSchema` instead. */ + export const outboundSchema = PrimaryNetworkTxType$outboundSchema; } diff --git a/src/models/components/proposerdetails.ts b/src/models/components/proposerdetails.ts index b07b1f3..e60f986 100644 --- a/src/models/components/proposerdetails.ts +++ b/src/models/components/proposerdetails.ts @@ -5,43 +5,46 @@ import * as z from "zod"; export type ProposerDetails = { - proposerId?: string | undefined; - proposerParentId?: string | undefined; - proposerNodeId?: string | undefined; - proposerPChainHeight?: number | undefined; - proposerTimestamp?: number | undefined; + proposerId?: string | undefined; + proposerParentId?: string | undefined; + proposerNodeId?: string | undefined; + proposerPChainHeight?: number | undefined; + proposerTimestamp?: number | undefined; }; /** @internal */ -export const ProposerDetails$inboundSchema: z.ZodType = - z.object({ - proposerId: z.string().optional(), - proposerParentId: z.string().optional(), - proposerNodeId: z.string().optional(), - proposerPChainHeight: z.number().optional(), - proposerTimestamp: z.number().optional(), - }); +export const ProposerDetails$inboundSchema: z.ZodType< + ProposerDetails, + z.ZodTypeDef, + unknown +> = z.object({ + proposerId: z.string().optional(), + proposerParentId: z.string().optional(), + proposerNodeId: z.string().optional(), + proposerPChainHeight: z.number().optional(), + proposerTimestamp: z.number().optional(), +}); /** @internal */ export type ProposerDetails$Outbound = { - proposerId?: string | undefined; - proposerParentId?: string | undefined; - proposerNodeId?: string | undefined; - proposerPChainHeight?: number | undefined; - proposerTimestamp?: number | undefined; + proposerId?: string | undefined; + proposerParentId?: string | undefined; + proposerNodeId?: string | undefined; + proposerPChainHeight?: number | undefined; + proposerTimestamp?: number | undefined; }; /** @internal */ export const ProposerDetails$outboundSchema: z.ZodType< - ProposerDetails$Outbound, - z.ZodTypeDef, - ProposerDetails + ProposerDetails$Outbound, + z.ZodTypeDef, + ProposerDetails > = z.object({ - proposerId: z.string().optional(), - proposerParentId: z.string().optional(), - proposerNodeId: z.string().optional(), - proposerPChainHeight: z.number().optional(), - proposerTimestamp: z.number().optional(), + proposerId: z.string().optional(), + proposerParentId: z.string().optional(), + proposerNodeId: z.string().optional(), + proposerPChainHeight: z.number().optional(), + proposerTimestamp: z.number().optional(), }); /** @@ -49,10 +52,10 @@ export const ProposerDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ProposerDetails$ { - /** @deprecated use `ProposerDetails$inboundSchema` instead. */ - export const inboundSchema = ProposerDetails$inboundSchema; - /** @deprecated use `ProposerDetails$outboundSchema` instead. */ - export const outboundSchema = ProposerDetails$outboundSchema; - /** @deprecated use `ProposerDetails$Outbound` instead. */ - export type Outbound = ProposerDetails$Outbound; + /** @deprecated use `ProposerDetails$inboundSchema` instead. */ + export const inboundSchema = ProposerDetails$inboundSchema; + /** @deprecated use `ProposerDetails$outboundSchema` instead. */ + export const outboundSchema = ProposerDetails$outboundSchema; + /** @deprecated use `ProposerDetails$Outbound` instead. */ + export type Outbound = ProposerDetails$Outbound; } diff --git a/src/models/components/removedvalidatordetails.ts b/src/models/components/removedvalidatordetails.ts index a039c2b..35dd797 100644 --- a/src/models/components/removedvalidatordetails.ts +++ b/src/models/components/removedvalidatordetails.ts @@ -2,111 +2,113 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - BlsCredentials, - BlsCredentials$inboundSchema, - BlsCredentials$Outbound, - BlsCredentials$outboundSchema, + BlsCredentials, + BlsCredentials$inboundSchema, + BlsCredentials$Outbound, + BlsCredentials$outboundSchema, } from "./blscredentials.js"; -import * as z from "zod"; export const RemovedValidatorDetailsValidationStatus = { - Removed: "removed", + Removed: "removed", } as const; export type RemovedValidatorDetailsValidationStatus = ClosedEnum< - typeof RemovedValidatorDetailsValidationStatus + typeof RemovedValidatorDetailsValidationStatus >; export type RemovedValidatorDetails = { - txHash: string; - nodeId: string; - subnetId: string; - amountStaked: string; - delegationFee?: string | undefined; - startTimestamp: number; - endTimestamp: number; - /** - * Present for AddPermissionlessValidatorTx - */ - blsCredentials?: BlsCredentials | undefined; - removeTxHash: string; - removeTimestamp: number; - validationStatus: RemovedValidatorDetailsValidationStatus; + txHash: string; + nodeId: string; + subnetId: string; + amountStaked: string; + delegationFee?: string | undefined; + startTimestamp: number; + endTimestamp: number; + /** + * Present for AddPermissionlessValidatorTx + */ + blsCredentials?: BlsCredentials | undefined; + removeTxHash: string; + removeTimestamp: number; + validationStatus: RemovedValidatorDetailsValidationStatus; }; /** @internal */ -export const RemovedValidatorDetailsValidationStatus$inboundSchema: z.ZodNativeEnum< - typeof RemovedValidatorDetailsValidationStatus -> = z.nativeEnum(RemovedValidatorDetailsValidationStatus); +export const RemovedValidatorDetailsValidationStatus$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(RemovedValidatorDetailsValidationStatus); /** @internal */ -export const RemovedValidatorDetailsValidationStatus$outboundSchema: z.ZodNativeEnum< - typeof RemovedValidatorDetailsValidationStatus -> = RemovedValidatorDetailsValidationStatus$inboundSchema; +export const RemovedValidatorDetailsValidationStatus$outboundSchema: + z.ZodNativeEnum = + RemovedValidatorDetailsValidationStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RemovedValidatorDetailsValidationStatus$ { - /** @deprecated use `RemovedValidatorDetailsValidationStatus$inboundSchema` instead. */ - export const inboundSchema = RemovedValidatorDetailsValidationStatus$inboundSchema; - /** @deprecated use `RemovedValidatorDetailsValidationStatus$outboundSchema` instead. */ - export const outboundSchema = RemovedValidatorDetailsValidationStatus$outboundSchema; + /** @deprecated use `RemovedValidatorDetailsValidationStatus$inboundSchema` instead. */ + export const inboundSchema = + RemovedValidatorDetailsValidationStatus$inboundSchema; + /** @deprecated use `RemovedValidatorDetailsValidationStatus$outboundSchema` instead. */ + export const outboundSchema = + RemovedValidatorDetailsValidationStatus$outboundSchema; } /** @internal */ export const RemovedValidatorDetails$inboundSchema: z.ZodType< - RemovedValidatorDetails, - z.ZodTypeDef, - unknown + RemovedValidatorDetails, + z.ZodTypeDef, + unknown > = z.object({ - txHash: z.string(), - nodeId: z.string(), - subnetId: z.string(), - amountStaked: z.string(), - delegationFee: z.string().optional(), - startTimestamp: z.number(), - endTimestamp: z.number(), - blsCredentials: BlsCredentials$inboundSchema.optional(), - removeTxHash: z.string(), - removeTimestamp: z.number(), - validationStatus: RemovedValidatorDetailsValidationStatus$inboundSchema, + txHash: z.string(), + nodeId: z.string(), + subnetId: z.string(), + amountStaked: z.string(), + delegationFee: z.string().optional(), + startTimestamp: z.number(), + endTimestamp: z.number(), + blsCredentials: BlsCredentials$inboundSchema.optional(), + removeTxHash: z.string(), + removeTimestamp: z.number(), + validationStatus: RemovedValidatorDetailsValidationStatus$inboundSchema, }); /** @internal */ export type RemovedValidatorDetails$Outbound = { - txHash: string; - nodeId: string; - subnetId: string; - amountStaked: string; - delegationFee?: string | undefined; - startTimestamp: number; - endTimestamp: number; - blsCredentials?: BlsCredentials$Outbound | undefined; - removeTxHash: string; - removeTimestamp: number; - validationStatus: string; + txHash: string; + nodeId: string; + subnetId: string; + amountStaked: string; + delegationFee?: string | undefined; + startTimestamp: number; + endTimestamp: number; + blsCredentials?: BlsCredentials$Outbound | undefined; + removeTxHash: string; + removeTimestamp: number; + validationStatus: string; }; /** @internal */ export const RemovedValidatorDetails$outboundSchema: z.ZodType< - RemovedValidatorDetails$Outbound, - z.ZodTypeDef, - RemovedValidatorDetails + RemovedValidatorDetails$Outbound, + z.ZodTypeDef, + RemovedValidatorDetails > = z.object({ - txHash: z.string(), - nodeId: z.string(), - subnetId: z.string(), - amountStaked: z.string(), - delegationFee: z.string().optional(), - startTimestamp: z.number(), - endTimestamp: z.number(), - blsCredentials: BlsCredentials$outboundSchema.optional(), - removeTxHash: z.string(), - removeTimestamp: z.number(), - validationStatus: RemovedValidatorDetailsValidationStatus$outboundSchema, + txHash: z.string(), + nodeId: z.string(), + subnetId: z.string(), + amountStaked: z.string(), + delegationFee: z.string().optional(), + startTimestamp: z.number(), + endTimestamp: z.number(), + blsCredentials: BlsCredentials$outboundSchema.optional(), + removeTxHash: z.string(), + removeTimestamp: z.number(), + validationStatus: RemovedValidatorDetailsValidationStatus$outboundSchema, }); /** @@ -114,10 +116,10 @@ export const RemovedValidatorDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RemovedValidatorDetails$ { - /** @deprecated use `RemovedValidatorDetails$inboundSchema` instead. */ - export const inboundSchema = RemovedValidatorDetails$inboundSchema; - /** @deprecated use `RemovedValidatorDetails$outboundSchema` instead. */ - export const outboundSchema = RemovedValidatorDetails$outboundSchema; - /** @deprecated use `RemovedValidatorDetails$Outbound` instead. */ - export type Outbound = RemovedValidatorDetails$Outbound; + /** @deprecated use `RemovedValidatorDetails$inboundSchema` instead. */ + export const inboundSchema = RemovedValidatorDetails$inboundSchema; + /** @deprecated use `RemovedValidatorDetails$outboundSchema` instead. */ + export const outboundSchema = RemovedValidatorDetails$outboundSchema; + /** @deprecated use `RemovedValidatorDetails$Outbound` instead. */ + export type Outbound = RemovedValidatorDetails$Outbound; } diff --git a/src/models/components/requesttype.ts b/src/models/components/requesttype.ts index 74f7642..f09cafe 100644 --- a/src/models/components/requesttype.ts +++ b/src/models/components/requesttype.ts @@ -2,15 +2,15 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * The type of request made by the client. */ export const RequestType = { - Data: "data", - Rpc: "rpc", + Data: "data", + Rpc: "rpc", } as const; /** * The type of request made by the client. @@ -18,20 +18,20 @@ export const RequestType = { export type RequestType = ClosedEnum; /** @internal */ -export const RequestType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(RequestType); +export const RequestType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(RequestType); /** @internal */ export const RequestType$outboundSchema: z.ZodNativeEnum = - RequestType$inboundSchema; + RequestType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RequestType$ { - /** @deprecated use `RequestType$inboundSchema` instead. */ - export const inboundSchema = RequestType$inboundSchema; - /** @deprecated use `RequestType$outboundSchema` instead. */ - export const outboundSchema = RequestType$outboundSchema; + /** @deprecated use `RequestType$inboundSchema` instead. */ + export const inboundSchema = RequestType$inboundSchema; + /** @deprecated use `RequestType$outboundSchema` instead. */ + export const outboundSchema = RequestType$outboundSchema; } diff --git a/src/models/components/resourcelink.ts b/src/models/components/resourcelink.ts index 33e87f2..1148d49 100644 --- a/src/models/components/resourcelink.ts +++ b/src/models/components/resourcelink.ts @@ -2,38 +2,42 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - ResourceLinkType, - ResourceLinkType$inboundSchema, - ResourceLinkType$outboundSchema, + ResourceLinkType, + ResourceLinkType$inboundSchema, + ResourceLinkType$outboundSchema, } from "./resourcelinktype.js"; -import * as z from "zod"; export type ResourceLink = { - type: ResourceLinkType; - url: string; + type: ResourceLinkType; + url: string; }; /** @internal */ -export const ResourceLink$inboundSchema: z.ZodType = z.object({ - type: ResourceLinkType$inboundSchema, - url: z.string(), +export const ResourceLink$inboundSchema: z.ZodType< + ResourceLink, + z.ZodTypeDef, + unknown +> = z.object({ + type: ResourceLinkType$inboundSchema, + url: z.string(), }); /** @internal */ export type ResourceLink$Outbound = { - type: string; - url: string; + type: string; + url: string; }; /** @internal */ export const ResourceLink$outboundSchema: z.ZodType< - ResourceLink$Outbound, - z.ZodTypeDef, - ResourceLink + ResourceLink$Outbound, + z.ZodTypeDef, + ResourceLink > = z.object({ - type: ResourceLinkType$outboundSchema, - url: z.string(), + type: ResourceLinkType$outboundSchema, + url: z.string(), }); /** @@ -41,10 +45,10 @@ export const ResourceLink$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ResourceLink$ { - /** @deprecated use `ResourceLink$inboundSchema` instead. */ - export const inboundSchema = ResourceLink$inboundSchema; - /** @deprecated use `ResourceLink$outboundSchema` instead. */ - export const outboundSchema = ResourceLink$outboundSchema; - /** @deprecated use `ResourceLink$Outbound` instead. */ - export type Outbound = ResourceLink$Outbound; + /** @deprecated use `ResourceLink$inboundSchema` instead. */ + export const inboundSchema = ResourceLink$inboundSchema; + /** @deprecated use `ResourceLink$outboundSchema` instead. */ + export const outboundSchema = ResourceLink$outboundSchema; + /** @deprecated use `ResourceLink$Outbound` instead. */ + export type Outbound = ResourceLink$Outbound; } diff --git a/src/models/components/resourcelinktype.ts b/src/models/components/resourcelinktype.ts index ca285c1..b41ad83 100644 --- a/src/models/components/resourcelinktype.ts +++ b/src/models/components/resourcelinktype.ts @@ -2,46 +2,48 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const ResourceLinkType = { - Blog: "Blog", - CoinGecko: "CoinGecko", - CoinMarketCap: "CoinMarketCap", - Discord: "Discord", - Documentation: "Documentation", - Facebook: "Facebook", - Github: "Github", - Instagram: "Instagram", - LinkedIn: "LinkedIn", - Medium: "Medium", - Reddit: "Reddit", - Support: "Support", - Telegram: "Telegram", - TikTok: "TikTok", - Twitter: "Twitter", - Website: "Website", - Whitepaper: "Whitepaper", - Youtube: "Youtube", + Blog: "Blog", + CoinGecko: "CoinGecko", + CoinMarketCap: "CoinMarketCap", + Discord: "Discord", + Documentation: "Documentation", + Facebook: "Facebook", + Github: "Github", + Instagram: "Instagram", + LinkedIn: "LinkedIn", + Medium: "Medium", + Reddit: "Reddit", + Support: "Support", + Telegram: "Telegram", + TikTok: "TikTok", + Twitter: "Twitter", + Website: "Website", + Whitepaper: "Whitepaper", + Youtube: "Youtube", } as const; export type ResourceLinkType = ClosedEnum; /** @internal */ -export const ResourceLinkType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(ResourceLinkType); +export const ResourceLinkType$inboundSchema: z.ZodNativeEnum< + typeof ResourceLinkType +> = z.nativeEnum(ResourceLinkType); /** @internal */ -export const ResourceLinkType$outboundSchema: z.ZodNativeEnum = - ResourceLinkType$inboundSchema; +export const ResourceLinkType$outboundSchema: z.ZodNativeEnum< + typeof ResourceLinkType +> = ResourceLinkType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ResourceLinkType$ { - /** @deprecated use `ResourceLinkType$inboundSchema` instead. */ - export const inboundSchema = ResourceLinkType$inboundSchema; - /** @deprecated use `ResourceLinkType$outboundSchema` instead. */ - export const outboundSchema = ResourceLinkType$outboundSchema; + /** @deprecated use `ResourceLinkType$inboundSchema` instead. */ + export const inboundSchema = ResourceLinkType$inboundSchema; + /** @deprecated use `ResourceLinkType$outboundSchema` instead. */ + export const outboundSchema = ResourceLinkType$outboundSchema; } diff --git a/src/models/components/rewards.ts b/src/models/components/rewards.ts index fea10d1..d930914 100644 --- a/src/models/components/rewards.ts +++ b/src/models/components/rewards.ts @@ -5,34 +5,39 @@ import * as z from "zod"; export type Rewards = { - validationRewardAmount: string; - delegationRewardAmount: string; - rewardAddresses?: Array | undefined; - rewardTxHash?: string | undefined; + validationRewardAmount: string; + delegationRewardAmount: string; + rewardAddresses?: Array | undefined; + rewardTxHash?: string | undefined; }; /** @internal */ -export const Rewards$inboundSchema: z.ZodType = z.object({ +export const Rewards$inboundSchema: z.ZodType = + z.object({ validationRewardAmount: z.string(), delegationRewardAmount: z.string(), rewardAddresses: z.array(z.string()).optional(), rewardTxHash: z.string().optional(), -}); + }); /** @internal */ export type Rewards$Outbound = { - validationRewardAmount: string; - delegationRewardAmount: string; - rewardAddresses?: Array | undefined; - rewardTxHash?: string | undefined; + validationRewardAmount: string; + delegationRewardAmount: string; + rewardAddresses?: Array | undefined; + rewardTxHash?: string | undefined; }; /** @internal */ -export const Rewards$outboundSchema: z.ZodType = z.object({ - validationRewardAmount: z.string(), - delegationRewardAmount: z.string(), - rewardAddresses: z.array(z.string()).optional(), - rewardTxHash: z.string().optional(), +export const Rewards$outboundSchema: z.ZodType< + Rewards$Outbound, + z.ZodTypeDef, + Rewards +> = z.object({ + validationRewardAmount: z.string(), + delegationRewardAmount: z.string(), + rewardAddresses: z.array(z.string()).optional(), + rewardTxHash: z.string().optional(), }); /** @@ -40,10 +45,10 @@ export const Rewards$outboundSchema: z.ZodType; /** @internal */ -export const RewardType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(RewardType); +export const RewardType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(RewardType); /** @internal */ export const RewardType$outboundSchema: z.ZodNativeEnum = - RewardType$inboundSchema; + RewardType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RewardType$ { - /** @deprecated use `RewardType$inboundSchema` instead. */ - export const inboundSchema = RewardType$inboundSchema; - /** @deprecated use `RewardType$outboundSchema` instead. */ - export const outboundSchema = RewardType$outboundSchema; + /** @deprecated use `RewardType$inboundSchema` instead. */ + export const inboundSchema = RewardType$inboundSchema; + /** @deprecated use `RewardType$outboundSchema` instead. */ + export const outboundSchema = RewardType$outboundSchema; } diff --git a/src/models/components/richaddress.ts b/src/models/components/richaddress.ts index 9d8cd33..689069a 100644 --- a/src/models/components/richaddress.ts +++ b/src/models/components/richaddress.ts @@ -5,57 +5,61 @@ import * as z from "zod"; export type RichAddress = { - /** - * The contract name. - */ - name?: string | undefined; - /** - * The contract symbol. - */ - symbol?: string | undefined; - /** - * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation. - */ - decimals?: number | undefined; - /** - * The logo uri for the address. - */ - logoUri?: string | undefined; - /** - * A wallet or contract address in mixed-case checksum encoding. - */ - address: string; + /** + * The contract name. + */ + name?: string | undefined; + /** + * The contract symbol. + */ + symbol?: string | undefined; + /** + * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation. + */ + decimals?: number | undefined; + /** + * The logo uri for the address. + */ + logoUri?: string | undefined; + /** + * A wallet or contract address in mixed-case checksum encoding. + */ + address: string; }; /** @internal */ -export const RichAddress$inboundSchema: z.ZodType = z.object({ - name: z.string().optional(), - symbol: z.string().optional(), - decimals: z.number().optional(), - logoUri: z.string().optional(), - address: z.string(), +export const RichAddress$inboundSchema: z.ZodType< + RichAddress, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + symbol: z.string().optional(), + decimals: z.number().optional(), + logoUri: z.string().optional(), + address: z.string(), }); /** @internal */ export type RichAddress$Outbound = { - name?: string | undefined; - symbol?: string | undefined; - decimals?: number | undefined; - logoUri?: string | undefined; - address: string; + name?: string | undefined; + symbol?: string | undefined; + decimals?: number | undefined; + logoUri?: string | undefined; + address: string; }; /** @internal */ export const RichAddress$outboundSchema: z.ZodType< - RichAddress$Outbound, - z.ZodTypeDef, - RichAddress + RichAddress$Outbound, + z.ZodTypeDef, + RichAddress > = z.object({ - name: z.string().optional(), - symbol: z.string().optional(), - decimals: z.number().optional(), - logoUri: z.string().optional(), - address: z.string(), + name: z.string().optional(), + symbol: z.string().optional(), + decimals: z.number().optional(), + logoUri: z.string().optional(), + address: z.string(), }); /** @@ -63,10 +67,10 @@ export const RichAddress$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RichAddress$ { - /** @deprecated use `RichAddress$inboundSchema` instead. */ - export const inboundSchema = RichAddress$inboundSchema; - /** @deprecated use `RichAddress$outboundSchema` instead. */ - export const outboundSchema = RichAddress$outboundSchema; - /** @deprecated use `RichAddress$Outbound` instead. */ - export type Outbound = RichAddress$Outbound; + /** @deprecated use `RichAddress$inboundSchema` instead. */ + export const inboundSchema = RichAddress$inboundSchema; + /** @deprecated use `RichAddress$outboundSchema` instead. */ + export const outboundSchema = RichAddress$outboundSchema; + /** @deprecated use `RichAddress$Outbound` instead. */ + export type Outbound = RichAddress$Outbound; } diff --git a/src/models/components/rollingwindowmetricsapiresponse.ts b/src/models/components/rollingwindowmetricsapiresponse.ts index 64ab152..2b6bb5d 100644 --- a/src/models/components/rollingwindowmetricsapiresponse.ts +++ b/src/models/components/rollingwindowmetricsapiresponse.ts @@ -2,42 +2,42 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - ChainRollingWindowMetricsValue, - ChainRollingWindowMetricsValue$inboundSchema, - ChainRollingWindowMetricsValue$Outbound, - ChainRollingWindowMetricsValue$outboundSchema, + ChainRollingWindowMetricsValue, + ChainRollingWindowMetricsValue$inboundSchema, + ChainRollingWindowMetricsValue$Outbound, + ChainRollingWindowMetricsValue$outboundSchema, } from "./chainrollingwindowmetricsvalue.js"; -import * as z from "zod"; export type RollingWindowMetricsApiResponse = { - /** - * Array of current metrics values for different windows. - */ - result: ChainRollingWindowMetricsValue; + /** + * Array of current metrics values for different windows. + */ + result: ChainRollingWindowMetricsValue; }; /** @internal */ export const RollingWindowMetricsApiResponse$inboundSchema: z.ZodType< - RollingWindowMetricsApiResponse, - z.ZodTypeDef, - unknown + RollingWindowMetricsApiResponse, + z.ZodTypeDef, + unknown > = z.object({ - result: ChainRollingWindowMetricsValue$inboundSchema, + result: ChainRollingWindowMetricsValue$inboundSchema, }); /** @internal */ export type RollingWindowMetricsApiResponse$Outbound = { - result: ChainRollingWindowMetricsValue$Outbound; + result: ChainRollingWindowMetricsValue$Outbound; }; /** @internal */ export const RollingWindowMetricsApiResponse$outboundSchema: z.ZodType< - RollingWindowMetricsApiResponse$Outbound, - z.ZodTypeDef, - RollingWindowMetricsApiResponse + RollingWindowMetricsApiResponse$Outbound, + z.ZodTypeDef, + RollingWindowMetricsApiResponse > = z.object({ - result: ChainRollingWindowMetricsValue$outboundSchema, + result: ChainRollingWindowMetricsValue$outboundSchema, }); /** @@ -45,10 +45,10 @@ export const RollingWindowMetricsApiResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RollingWindowMetricsApiResponse$ { - /** @deprecated use `RollingWindowMetricsApiResponse$inboundSchema` instead. */ - export const inboundSchema = RollingWindowMetricsApiResponse$inboundSchema; - /** @deprecated use `RollingWindowMetricsApiResponse$outboundSchema` instead. */ - export const outboundSchema = RollingWindowMetricsApiResponse$outboundSchema; - /** @deprecated use `RollingWindowMetricsApiResponse$Outbound` instead. */ - export type Outbound = RollingWindowMetricsApiResponse$Outbound; + /** @deprecated use `RollingWindowMetricsApiResponse$inboundSchema` instead. */ + export const inboundSchema = RollingWindowMetricsApiResponse$inboundSchema; + /** @deprecated use `RollingWindowMetricsApiResponse$outboundSchema` instead. */ + export const outboundSchema = RollingWindowMetricsApiResponse$outboundSchema; + /** @deprecated use `RollingWindowMetricsApiResponse$Outbound` instead. */ + export type Outbound = RollingWindowMetricsApiResponse$Outbound; } diff --git a/src/models/components/security.ts b/src/models/components/security.ts index 8ce535c..e0696d5 100644 --- a/src/models/components/security.ts +++ b/src/models/components/security.ts @@ -5,34 +5,41 @@ import * as z from "zod"; export type Security = { - apiKey: string; + apiKey: string; }; /** @internal */ -export const Security$inboundSchema: z.ZodType = z.object({ - apiKey: z.string(), +export const Security$inboundSchema: z.ZodType< + Security, + z.ZodTypeDef, + unknown +> = z.object({ + apiKey: z.string(), }); /** @internal */ export type Security$Outbound = { - apiKey: string; + apiKey: string; }; /** @internal */ -export const Security$outboundSchema: z.ZodType = - z.object({ - apiKey: z.string(), - }); +export const Security$outboundSchema: z.ZodType< + Security$Outbound, + z.ZodTypeDef, + Security +> = z.object({ + apiKey: z.string(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Security$ { - /** @deprecated use `Security$inboundSchema` instead. */ - export const inboundSchema = Security$inboundSchema; - /** @deprecated use `Security$outboundSchema` instead. */ - export const outboundSchema = Security$outboundSchema; - /** @deprecated use `Security$Outbound` instead. */ - export type Outbound = Security$Outbound; + /** @deprecated use `Security$inboundSchema` instead. */ + export const inboundSchema = Security$inboundSchema; + /** @deprecated use `Security$outboundSchema` instead. */ + export const outboundSchema = Security$outboundSchema; + /** @deprecated use `Security$Outbound` instead. */ + export type Outbound = Security$Outbound; } diff --git a/src/models/components/sharedsecretsresponse.ts b/src/models/components/sharedsecretsresponse.ts index 10f5935..4cb754c 100644 --- a/src/models/components/sharedsecretsresponse.ts +++ b/src/models/components/sharedsecretsresponse.ts @@ -5,30 +5,30 @@ import * as z from "zod"; export type SharedSecretsResponse = { - secret: string; + secret: string; }; /** @internal */ export const SharedSecretsResponse$inboundSchema: z.ZodType< - SharedSecretsResponse, - z.ZodTypeDef, - unknown + SharedSecretsResponse, + z.ZodTypeDef, + unknown > = z.object({ - secret: z.string(), + secret: z.string(), }); /** @internal */ export type SharedSecretsResponse$Outbound = { - secret: string; + secret: string; }; /** @internal */ export const SharedSecretsResponse$outboundSchema: z.ZodType< - SharedSecretsResponse$Outbound, - z.ZodTypeDef, - SharedSecretsResponse + SharedSecretsResponse$Outbound, + z.ZodTypeDef, + SharedSecretsResponse > = z.object({ - secret: z.string(), + secret: z.string(), }); /** @@ -36,10 +36,10 @@ export const SharedSecretsResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SharedSecretsResponse$ { - /** @deprecated use `SharedSecretsResponse$inboundSchema` instead. */ - export const inboundSchema = SharedSecretsResponse$inboundSchema; - /** @deprecated use `SharedSecretsResponse$outboundSchema` instead. */ - export const outboundSchema = SharedSecretsResponse$outboundSchema; - /** @deprecated use `SharedSecretsResponse$Outbound` instead. */ - export type Outbound = SharedSecretsResponse$Outbound; + /** @deprecated use `SharedSecretsResponse$inboundSchema` instead. */ + export const inboundSchema = SharedSecretsResponse$inboundSchema; + /** @deprecated use `SharedSecretsResponse$outboundSchema` instead. */ + export const outboundSchema = SharedSecretsResponse$outboundSchema; + /** @deprecated use `SharedSecretsResponse$Outbound` instead. */ + export type Outbound = SharedSecretsResponse$Outbound; } diff --git a/src/models/components/sortbyoption.ts b/src/models/components/sortbyoption.ts index 49c3518..bf6326d 100644 --- a/src/models/components/sortbyoption.ts +++ b/src/models/components/sortbyoption.ts @@ -2,33 +2,33 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const SortByOption = { - BlockIndex: "blockIndex", - DelegationCapacity: "delegationCapacity", - TimeRemaining: "timeRemaining", - DelegationFee: "delegationFee", - UptimePerformance: "uptimePerformance", + BlockIndex: "blockIndex", + DelegationCapacity: "delegationCapacity", + TimeRemaining: "timeRemaining", + DelegationFee: "delegationFee", + UptimePerformance: "uptimePerformance", } as const; export type SortByOption = ClosedEnum; /** @internal */ export const SortByOption$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(SortByOption); + z.nativeEnum(SortByOption); /** @internal */ export const SortByOption$outboundSchema: z.ZodNativeEnum = - SortByOption$inboundSchema; + SortByOption$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SortByOption$ { - /** @deprecated use `SortByOption$inboundSchema` instead. */ - export const inboundSchema = SortByOption$inboundSchema; - /** @deprecated use `SortByOption$outboundSchema` instead. */ - export const outboundSchema = SortByOption$outboundSchema; + /** @deprecated use `SortByOption$inboundSchema` instead. */ + export const inboundSchema = SortByOption$inboundSchema; + /** @deprecated use `SortByOption$outboundSchema` instead. */ + export const outboundSchema = SortByOption$outboundSchema; } diff --git a/src/models/components/sortorder.ts b/src/models/components/sortorder.ts index 1f45f01..d2ceb42 100644 --- a/src/models/components/sortorder.ts +++ b/src/models/components/sortorder.ts @@ -2,28 +2,30 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const SortOrder = { - Asc: "asc", - Desc: "desc", + Asc: "asc", + Desc: "desc", } as const; export type SortOrder = ClosedEnum; /** @internal */ -export const SortOrder$inboundSchema: z.ZodNativeEnum = z.nativeEnum(SortOrder); +export const SortOrder$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(SortOrder); /** @internal */ -export const SortOrder$outboundSchema: z.ZodNativeEnum = SortOrder$inboundSchema; +export const SortOrder$outboundSchema: z.ZodNativeEnum = + SortOrder$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SortOrder$ { - /** @deprecated use `SortOrder$inboundSchema` instead. */ - export const inboundSchema = SortOrder$inboundSchema; - /** @deprecated use `SortOrder$outboundSchema` instead. */ - export const outboundSchema = SortOrder$outboundSchema; + /** @deprecated use `SortOrder$inboundSchema` instead. */ + export const inboundSchema = SortOrder$inboundSchema; + /** @deprecated use `SortOrder$outboundSchema` instead. */ + export const outboundSchema = SortOrder$outboundSchema; } diff --git a/src/models/components/stakingdistribution.ts b/src/models/components/stakingdistribution.ts index cdafb86..8704bbb 100644 --- a/src/models/components/stakingdistribution.ts +++ b/src/models/components/stakingdistribution.ts @@ -5,38 +5,38 @@ import * as z from "zod"; export type StakingDistribution = { - version: string; - amountStaked: string; - validatorCount: number; + version: string; + amountStaked: string; + validatorCount: number; }; /** @internal */ export const StakingDistribution$inboundSchema: z.ZodType< - StakingDistribution, - z.ZodTypeDef, - unknown + StakingDistribution, + z.ZodTypeDef, + unknown > = z.object({ - version: z.string(), - amountStaked: z.string(), - validatorCount: z.number(), + version: z.string(), + amountStaked: z.string(), + validatorCount: z.number(), }); /** @internal */ export type StakingDistribution$Outbound = { - version: string; - amountStaked: string; - validatorCount: number; + version: string; + amountStaked: string; + validatorCount: number; }; /** @internal */ export const StakingDistribution$outboundSchema: z.ZodType< - StakingDistribution$Outbound, - z.ZodTypeDef, - StakingDistribution + StakingDistribution$Outbound, + z.ZodTypeDef, + StakingDistribution > = z.object({ - version: z.string(), - amountStaked: z.string(), - validatorCount: z.number(), + version: z.string(), + amountStaked: z.string(), + validatorCount: z.number(), }); /** @@ -44,10 +44,10 @@ export const StakingDistribution$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StakingDistribution$ { - /** @deprecated use `StakingDistribution$inboundSchema` instead. */ - export const inboundSchema = StakingDistribution$inboundSchema; - /** @deprecated use `StakingDistribution$outboundSchema` instead. */ - export const outboundSchema = StakingDistribution$outboundSchema; - /** @deprecated use `StakingDistribution$Outbound` instead. */ - export type Outbound = StakingDistribution$Outbound; + /** @deprecated use `StakingDistribution$inboundSchema` instead. */ + export const inboundSchema = StakingDistribution$inboundSchema; + /** @deprecated use `StakingDistribution$outboundSchema` instead. */ + export const outboundSchema = StakingDistribution$outboundSchema; + /** @deprecated use `StakingDistribution$Outbound` instead. */ + export type Outbound = StakingDistribution$Outbound; } diff --git a/src/models/components/subnet.ts b/src/models/components/subnet.ts index 0d62ca9..ac39798 100644 --- a/src/models/components/subnet.ts +++ b/src/models/components/subnet.ts @@ -2,51 +2,52 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - BlockchainInfo, - BlockchainInfo$inboundSchema, - BlockchainInfo$Outbound, - BlockchainInfo$outboundSchema, + BlockchainInfo, + BlockchainInfo$inboundSchema, + BlockchainInfo$Outbound, + BlockchainInfo$outboundSchema, } from "./blockchaininfo.js"; import { - SubnetOwnershipInfo, - SubnetOwnershipInfo$inboundSchema, - SubnetOwnershipInfo$Outbound, - SubnetOwnershipInfo$outboundSchema, + SubnetOwnershipInfo, + SubnetOwnershipInfo$inboundSchema, + SubnetOwnershipInfo$Outbound, + SubnetOwnershipInfo$outboundSchema, } from "./subnetownershipinfo.js"; -import * as z from "zod"; export type Subnet = { - createBlockTimestamp: number; - createBlockIndex: string; - subnetId: string; - /** - * This field is deprecated. Use subnetOwnershipInfo instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - ownerAddresses: Array; - /** - * This field is deprecated. Use subnetOwnershipInfo instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - threshold: number; - /** - * This field is deprecated. Use subnetOwnershipInfo instead. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - locktime: number; - /** - * Latest subnet owner details for this Subnet. - */ - subnetOwnershipInfo: SubnetOwnershipInfo; - blockchains: Array; + createBlockTimestamp: number; + createBlockIndex: string; + subnetId: string; + /** + * This field is deprecated. Use subnetOwnershipInfo instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + ownerAddresses: Array; + /** + * This field is deprecated. Use subnetOwnershipInfo instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + threshold: number; + /** + * This field is deprecated. Use subnetOwnershipInfo instead. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + locktime: number; + /** + * Latest subnet owner details for this Subnet. + */ + subnetOwnershipInfo: SubnetOwnershipInfo; + blockchains: Array; }; /** @internal */ -export const Subnet$inboundSchema: z.ZodType = z.object({ +export const Subnet$inboundSchema: z.ZodType = z + .object({ createBlockTimestamp: z.number(), createBlockIndex: z.string(), subnetId: z.string(), @@ -55,30 +56,34 @@ export const Subnet$inboundSchema: z.ZodType = z. locktime: z.number(), subnetOwnershipInfo: SubnetOwnershipInfo$inboundSchema, blockchains: z.array(BlockchainInfo$inboundSchema), -}); + }); /** @internal */ export type Subnet$Outbound = { - createBlockTimestamp: number; - createBlockIndex: string; - subnetId: string; - ownerAddresses: Array; - threshold: number; - locktime: number; - subnetOwnershipInfo: SubnetOwnershipInfo$Outbound; - blockchains: Array; + createBlockTimestamp: number; + createBlockIndex: string; + subnetId: string; + ownerAddresses: Array; + threshold: number; + locktime: number; + subnetOwnershipInfo: SubnetOwnershipInfo$Outbound; + blockchains: Array; }; /** @internal */ -export const Subnet$outboundSchema: z.ZodType = z.object({ - createBlockTimestamp: z.number(), - createBlockIndex: z.string(), - subnetId: z.string(), - ownerAddresses: z.array(z.string()), - threshold: z.number(), - locktime: z.number(), - subnetOwnershipInfo: SubnetOwnershipInfo$outboundSchema, - blockchains: z.array(BlockchainInfo$outboundSchema), +export const Subnet$outboundSchema: z.ZodType< + Subnet$Outbound, + z.ZodTypeDef, + Subnet +> = z.object({ + createBlockTimestamp: z.number(), + createBlockIndex: z.string(), + subnetId: z.string(), + ownerAddresses: z.array(z.string()), + threshold: z.number(), + locktime: z.number(), + subnetOwnershipInfo: SubnetOwnershipInfo$outboundSchema, + blockchains: z.array(BlockchainInfo$outboundSchema), }); /** @@ -86,10 +91,10 @@ export const Subnet$outboundSchema: z.ZodType; + /** + * Locktime in seconds after which Subnet owners can control this Subnet. + */ + locktime: number; + /** + * Minimum number of signatures required to sign the Subnet update transactions. + */ + threshold: number; + /** + * Addresses that are eligible to sign the Subnet update transactions. + */ + addresses: Array; }; /** @internal */ export const SubnetOwnershipInfo$inboundSchema: z.ZodType< - SubnetOwnershipInfo, - z.ZodTypeDef, - unknown + SubnetOwnershipInfo, + z.ZodTypeDef, + unknown > = z.object({ - locktime: z.number(), - threshold: z.number(), - addresses: z.array(z.string()), + locktime: z.number(), + threshold: z.number(), + addresses: z.array(z.string()), }); /** @internal */ export type SubnetOwnershipInfo$Outbound = { - locktime: number; - threshold: number; - addresses: Array; + locktime: number; + threshold: number; + addresses: Array; }; /** @internal */ export const SubnetOwnershipInfo$outboundSchema: z.ZodType< - SubnetOwnershipInfo$Outbound, - z.ZodTypeDef, - SubnetOwnershipInfo + SubnetOwnershipInfo$Outbound, + z.ZodTypeDef, + SubnetOwnershipInfo > = z.object({ - locktime: z.number(), - threshold: z.number(), - addresses: z.array(z.string()), + locktime: z.number(), + threshold: z.number(), + addresses: z.array(z.string()), }); /** @@ -53,10 +53,10 @@ export const SubnetOwnershipInfo$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SubnetOwnershipInfo$ { - /** @deprecated use `SubnetOwnershipInfo$inboundSchema` instead. */ - export const inboundSchema = SubnetOwnershipInfo$inboundSchema; - /** @deprecated use `SubnetOwnershipInfo$outboundSchema` instead. */ - export const outboundSchema = SubnetOwnershipInfo$outboundSchema; - /** @deprecated use `SubnetOwnershipInfo$Outbound` instead. */ - export type Outbound = SubnetOwnershipInfo$Outbound; + /** @deprecated use `SubnetOwnershipInfo$inboundSchema` instead. */ + export const inboundSchema = SubnetOwnershipInfo$inboundSchema; + /** @deprecated use `SubnetOwnershipInfo$outboundSchema` instead. */ + export const outboundSchema = SubnetOwnershipInfo$outboundSchema; + /** @deprecated use `SubnetOwnershipInfo$Outbound` instead. */ + export type Outbound = SubnetOwnershipInfo$Outbound; } diff --git a/src/models/components/teleporterchainmetricsapiresponse.ts b/src/models/components/teleporterchainmetricsapiresponse.ts new file mode 100644 index 0000000..ee4e539 --- /dev/null +++ b/src/models/components/teleporterchainmetricsapiresponse.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + TeleporterMetricsValue, + TeleporterMetricsValue$inboundSchema, + TeleporterMetricsValue$Outbound, + TeleporterMetricsValue$outboundSchema, +} from "./teleportermetricsvalue.js"; + +export type TeleporterChainMetricsApiResponse = { + /** + * current metrics value for a given teleporter metric. + */ + result: TeleporterMetricsValue; +}; + +/** @internal */ +export const TeleporterChainMetricsApiResponse$inboundSchema: z.ZodType< + TeleporterChainMetricsApiResponse, + z.ZodTypeDef, + unknown +> = z.object({ + result: TeleporterMetricsValue$inboundSchema, +}); + +/** @internal */ +export type TeleporterChainMetricsApiResponse$Outbound = { + result: TeleporterMetricsValue$Outbound; +}; + +/** @internal */ +export const TeleporterChainMetricsApiResponse$outboundSchema: z.ZodType< + TeleporterChainMetricsApiResponse$Outbound, + z.ZodTypeDef, + TeleporterChainMetricsApiResponse +> = z.object({ + result: TeleporterMetricsValue$outboundSchema, +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TeleporterChainMetricsApiResponse$ { + /** @deprecated use `TeleporterChainMetricsApiResponse$inboundSchema` instead. */ + export const inboundSchema = TeleporterChainMetricsApiResponse$inboundSchema; + /** @deprecated use `TeleporterChainMetricsApiResponse$outboundSchema` instead. */ + export const outboundSchema = + TeleporterChainMetricsApiResponse$outboundSchema; + /** @deprecated use `TeleporterChainMetricsApiResponse$Outbound` instead. */ + export type Outbound = TeleporterChainMetricsApiResponse$Outbound; +} diff --git a/src/models/components/teleporterdestinationtransaction.ts b/src/models/components/teleporterdestinationtransaction.ts index 00338ee..8bb71e6 100644 --- a/src/models/components/teleporterdestinationtransaction.ts +++ b/src/models/components/teleporterdestinationtransaction.ts @@ -5,46 +5,46 @@ import * as z from "zod"; export type TeleporterDestinationTransaction = { - txHash: string; - timestamp: number; - gasSpent: string; - rewardRedeemer: string; - delivererAddress: string; + txHash: string; + timestamp: number; + gasSpent: string; + rewardRedeemer: string; + delivererAddress: string; }; /** @internal */ export const TeleporterDestinationTransaction$inboundSchema: z.ZodType< - TeleporterDestinationTransaction, - z.ZodTypeDef, - unknown + TeleporterDestinationTransaction, + z.ZodTypeDef, + unknown > = z.object({ - txHash: z.string(), - timestamp: z.number(), - gasSpent: z.string(), - rewardRedeemer: z.string(), - delivererAddress: z.string(), + txHash: z.string(), + timestamp: z.number(), + gasSpent: z.string(), + rewardRedeemer: z.string(), + delivererAddress: z.string(), }); /** @internal */ export type TeleporterDestinationTransaction$Outbound = { - txHash: string; - timestamp: number; - gasSpent: string; - rewardRedeemer: string; - delivererAddress: string; + txHash: string; + timestamp: number; + gasSpent: string; + rewardRedeemer: string; + delivererAddress: string; }; /** @internal */ export const TeleporterDestinationTransaction$outboundSchema: z.ZodType< - TeleporterDestinationTransaction$Outbound, - z.ZodTypeDef, - TeleporterDestinationTransaction + TeleporterDestinationTransaction$Outbound, + z.ZodTypeDef, + TeleporterDestinationTransaction > = z.object({ - txHash: z.string(), - timestamp: z.number(), - gasSpent: z.string(), - rewardRedeemer: z.string(), - delivererAddress: z.string(), + txHash: z.string(), + timestamp: z.number(), + gasSpent: z.string(), + rewardRedeemer: z.string(), + delivererAddress: z.string(), }); /** @@ -52,10 +52,10 @@ export const TeleporterDestinationTransaction$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TeleporterDestinationTransaction$ { - /** @deprecated use `TeleporterDestinationTransaction$inboundSchema` instead. */ - export const inboundSchema = TeleporterDestinationTransaction$inboundSchema; - /** @deprecated use `TeleporterDestinationTransaction$outboundSchema` instead. */ - export const outboundSchema = TeleporterDestinationTransaction$outboundSchema; - /** @deprecated use `TeleporterDestinationTransaction$Outbound` instead. */ - export type Outbound = TeleporterDestinationTransaction$Outbound; + /** @deprecated use `TeleporterDestinationTransaction$inboundSchema` instead. */ + export const inboundSchema = TeleporterDestinationTransaction$inboundSchema; + /** @deprecated use `TeleporterDestinationTransaction$outboundSchema` instead. */ + export const outboundSchema = TeleporterDestinationTransaction$outboundSchema; + /** @deprecated use `TeleporterDestinationTransaction$Outbound` instead. */ + export type Outbound = TeleporterDestinationTransaction$Outbound; } diff --git a/src/models/components/teleportermessageinfo.ts b/src/models/components/teleportermessageinfo.ts new file mode 100644 index 0000000..8496a15 --- /dev/null +++ b/src/models/components/teleportermessageinfo.ts @@ -0,0 +1,139 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + TransactionDirectionType, + TransactionDirectionType$inboundSchema, + TransactionDirectionType$outboundSchema, +} from "./transactiondirectiontype.js"; + +/** + * chain id of the source chain. valid only for destination transactions + */ +export type SourceChainId = {}; + +/** + * chain id of the destination chain. valid only for source transactions + */ +export type DestinationChainId = {}; + +export type TeleporterMessageInfo = { + teleporterMessageId: string; + direction: TransactionDirectionType; + /** + * chain id of the source chain. valid only for destination transactions + */ + sourceChainId?: SourceChainId | undefined; + /** + * chain id of the destination chain. valid only for source transactions + */ + destinationChainId?: DestinationChainId | undefined; +}; + +/** @internal */ +export const SourceChainId$inboundSchema: z.ZodType< + SourceChainId, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type SourceChainId$Outbound = {}; + +/** @internal */ +export const SourceChainId$outboundSchema: z.ZodType< + SourceChainId$Outbound, + z.ZodTypeDef, + SourceChainId +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SourceChainId$ { + /** @deprecated use `SourceChainId$inboundSchema` instead. */ + export const inboundSchema = SourceChainId$inboundSchema; + /** @deprecated use `SourceChainId$outboundSchema` instead. */ + export const outboundSchema = SourceChainId$outboundSchema; + /** @deprecated use `SourceChainId$Outbound` instead. */ + export type Outbound = SourceChainId$Outbound; +} + +/** @internal */ +export const DestinationChainId$inboundSchema: z.ZodType< + DestinationChainId, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type DestinationChainId$Outbound = {}; + +/** @internal */ +export const DestinationChainId$outboundSchema: z.ZodType< + DestinationChainId$Outbound, + z.ZodTypeDef, + DestinationChainId +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DestinationChainId$ { + /** @deprecated use `DestinationChainId$inboundSchema` instead. */ + export const inboundSchema = DestinationChainId$inboundSchema; + /** @deprecated use `DestinationChainId$outboundSchema` instead. */ + export const outboundSchema = DestinationChainId$outboundSchema; + /** @deprecated use `DestinationChainId$Outbound` instead. */ + export type Outbound = DestinationChainId$Outbound; +} + +/** @internal */ +export const TeleporterMessageInfo$inboundSchema: z.ZodType< + TeleporterMessageInfo, + z.ZodTypeDef, + unknown +> = z.object({ + teleporterMessageId: z.string(), + direction: TransactionDirectionType$inboundSchema, + sourceChainId: z.lazy(() => SourceChainId$inboundSchema).optional(), + destinationChainId: z.lazy(() => DestinationChainId$inboundSchema).optional(), +}); + +/** @internal */ +export type TeleporterMessageInfo$Outbound = { + teleporterMessageId: string; + direction: string; + sourceChainId?: SourceChainId$Outbound | undefined; + destinationChainId?: DestinationChainId$Outbound | undefined; +}; + +/** @internal */ +export const TeleporterMessageInfo$outboundSchema: z.ZodType< + TeleporterMessageInfo$Outbound, + z.ZodTypeDef, + TeleporterMessageInfo +> = z.object({ + teleporterMessageId: z.string(), + direction: TransactionDirectionType$outboundSchema, + sourceChainId: z.lazy(() => SourceChainId$outboundSchema).optional(), + destinationChainId: z.lazy(() => DestinationChainId$outboundSchema) + .optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TeleporterMessageInfo$ { + /** @deprecated use `TeleporterMessageInfo$inboundSchema` instead. */ + export const inboundSchema = TeleporterMessageInfo$inboundSchema; + /** @deprecated use `TeleporterMessageInfo$outboundSchema` instead. */ + export const outboundSchema = TeleporterMessageInfo$outboundSchema; + /** @deprecated use `TeleporterMessageInfo$Outbound` instead. */ + export type Outbound = TeleporterMessageInfo$Outbound; +} diff --git a/src/models/components/teleportermetric.ts b/src/models/components/teleportermetric.ts new file mode 100644 index 0000000..034fe0d --- /dev/null +++ b/src/models/components/teleportermetric.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +export const TeleporterMetric = { + TeleporterSourceTxnCount: "teleporterSourceTxnCount", + TeleporterDestinationTxnCount: "teleporterDestinationTxnCount", + TeleporterTotalTxnCount: "teleporterTotalTxnCount", +} as const; +export type TeleporterMetric = ClosedEnum; + +/** @internal */ +export const TeleporterMetric$inboundSchema: z.ZodNativeEnum< + typeof TeleporterMetric +> = z.nativeEnum(TeleporterMetric); + +/** @internal */ +export const TeleporterMetric$outboundSchema: z.ZodNativeEnum< + typeof TeleporterMetric +> = TeleporterMetric$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TeleporterMetric$ { + /** @deprecated use `TeleporterMetric$inboundSchema` instead. */ + export const inboundSchema = TeleporterMetric$inboundSchema; + /** @deprecated use `TeleporterMetric$outboundSchema` instead. */ + export const outboundSchema = TeleporterMetric$outboundSchema; +} diff --git a/src/models/components/teleportermetricsvalue.ts b/src/models/components/teleportermetricsvalue.ts new file mode 100644 index 0000000..fc0a056 --- /dev/null +++ b/src/models/components/teleportermetricsvalue.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type TeleporterMetricsValue = { + /** + * Aggregated value for the current metrics. + */ + value: number; +}; + +/** @internal */ +export const TeleporterMetricsValue$inboundSchema: z.ZodType< + TeleporterMetricsValue, + z.ZodTypeDef, + unknown +> = z.object({ + value: z.number(), +}); + +/** @internal */ +export type TeleporterMetricsValue$Outbound = { + value: number; +}; + +/** @internal */ +export const TeleporterMetricsValue$outboundSchema: z.ZodType< + TeleporterMetricsValue$Outbound, + z.ZodTypeDef, + TeleporterMetricsValue +> = z.object({ + value: z.number(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TeleporterMetricsValue$ { + /** @deprecated use `TeleporterMetricsValue$inboundSchema` instead. */ + export const inboundSchema = TeleporterMetricsValue$inboundSchema; + /** @deprecated use `TeleporterMetricsValue$outboundSchema` instead. */ + export const outboundSchema = TeleporterMetricsValue$outboundSchema; + /** @deprecated use `TeleporterMetricsValue$Outbound` instead. */ + export type Outbound = TeleporterMetricsValue$Outbound; +} diff --git a/src/models/components/teleporterreceipt.ts b/src/models/components/teleporterreceipt.ts index 8884108..ffac4f3 100644 --- a/src/models/components/teleporterreceipt.ts +++ b/src/models/components/teleporterreceipt.ts @@ -5,31 +5,34 @@ import * as z from "zod"; export type TeleporterReceipt = { - receivedMessageNonce: string; - relayerRewardAddress: string; + receivedMessageNonce: string; + relayerRewardAddress: string; }; /** @internal */ -export const TeleporterReceipt$inboundSchema: z.ZodType = - z.object({ - receivedMessageNonce: z.string(), - relayerRewardAddress: z.string(), - }); +export const TeleporterReceipt$inboundSchema: z.ZodType< + TeleporterReceipt, + z.ZodTypeDef, + unknown +> = z.object({ + receivedMessageNonce: z.string(), + relayerRewardAddress: z.string(), +}); /** @internal */ export type TeleporterReceipt$Outbound = { - receivedMessageNonce: string; - relayerRewardAddress: string; + receivedMessageNonce: string; + relayerRewardAddress: string; }; /** @internal */ export const TeleporterReceipt$outboundSchema: z.ZodType< - TeleporterReceipt$Outbound, - z.ZodTypeDef, - TeleporterReceipt + TeleporterReceipt$Outbound, + z.ZodTypeDef, + TeleporterReceipt > = z.object({ - receivedMessageNonce: z.string(), - relayerRewardAddress: z.string(), + receivedMessageNonce: z.string(), + relayerRewardAddress: z.string(), }); /** @@ -37,10 +40,10 @@ export const TeleporterReceipt$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TeleporterReceipt$ { - /** @deprecated use `TeleporterReceipt$inboundSchema` instead. */ - export const inboundSchema = TeleporterReceipt$inboundSchema; - /** @deprecated use `TeleporterReceipt$outboundSchema` instead. */ - export const outboundSchema = TeleporterReceipt$outboundSchema; - /** @deprecated use `TeleporterReceipt$Outbound` instead. */ - export type Outbound = TeleporterReceipt$Outbound; + /** @deprecated use `TeleporterReceipt$inboundSchema` instead. */ + export const inboundSchema = TeleporterReceipt$inboundSchema; + /** @deprecated use `TeleporterReceipt$outboundSchema` instead. */ + export const outboundSchema = TeleporterReceipt$outboundSchema; + /** @deprecated use `TeleporterReceipt$Outbound` instead. */ + export type Outbound = TeleporterReceipt$Outbound; } diff --git a/src/models/components/teleporterrewarddetails.ts b/src/models/components/teleporterrewarddetails.ts index 8499bfa..5a59469 100644 --- a/src/models/components/teleporterrewarddetails.ts +++ b/src/models/components/teleporterrewarddetails.ts @@ -2,52 +2,59 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; -import { Money, Money$inboundSchema, Money$Outbound, Money$outboundSchema } from "./money.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; +import { + Money, + Money$inboundSchema, + Money$Outbound, + Money$outboundSchema, +} from "./money.js"; export const TeleporterRewardDetailsErcType = { - Erc20: "ERC-20", + Erc20: "ERC-20", } as const; -export type TeleporterRewardDetailsErcType = ClosedEnum; +export type TeleporterRewardDetailsErcType = ClosedEnum< + typeof TeleporterRewardDetailsErcType +>; export type TeleporterRewardDetails = { - /** - * A wallet or contract address in mixed-case checksum encoding. - */ - address: string; - /** - * The contract name. - */ - name: string; - /** - * The contract symbol. - */ - symbol: string; - /** - * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation. - */ - decimals: number; - /** - * The logo uri for the address. - */ - logoUri?: string | undefined; - ercType: TeleporterRewardDetailsErcType; - /** - * The token price, if available. - */ - price?: Money | undefined; - value: string; + /** + * A wallet or contract address in mixed-case checksum encoding. + */ + address: string; + /** + * The contract name. + */ + name: string; + /** + * The contract symbol. + */ + symbol: string; + /** + * The number of decimals the token uses. For example `6`, means to divide the token amount by `1000000` to get its user representation. + */ + decimals: number; + /** + * The logo uri for the address. + */ + logoUri?: string | undefined; + ercType: TeleporterRewardDetailsErcType; + /** + * The token price, if available. + */ + price?: Money | undefined; + value: string; }; /** @internal */ export const TeleporterRewardDetailsErcType$inboundSchema: z.ZodNativeEnum< - typeof TeleporterRewardDetailsErcType + typeof TeleporterRewardDetailsErcType > = z.nativeEnum(TeleporterRewardDetailsErcType); /** @internal */ export const TeleporterRewardDetailsErcType$outboundSchema: z.ZodNativeEnum< - typeof TeleporterRewardDetailsErcType + typeof TeleporterRewardDetailsErcType > = TeleporterRewardDetailsErcType$inboundSchema; /** @@ -55,54 +62,54 @@ export const TeleporterRewardDetailsErcType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TeleporterRewardDetailsErcType$ { - /** @deprecated use `TeleporterRewardDetailsErcType$inboundSchema` instead. */ - export const inboundSchema = TeleporterRewardDetailsErcType$inboundSchema; - /** @deprecated use `TeleporterRewardDetailsErcType$outboundSchema` instead. */ - export const outboundSchema = TeleporterRewardDetailsErcType$outboundSchema; + /** @deprecated use `TeleporterRewardDetailsErcType$inboundSchema` instead. */ + export const inboundSchema = TeleporterRewardDetailsErcType$inboundSchema; + /** @deprecated use `TeleporterRewardDetailsErcType$outboundSchema` instead. */ + export const outboundSchema = TeleporterRewardDetailsErcType$outboundSchema; } /** @internal */ export const TeleporterRewardDetails$inboundSchema: z.ZodType< - TeleporterRewardDetails, - z.ZodTypeDef, - unknown + TeleporterRewardDetails, + z.ZodTypeDef, + unknown > = z.object({ - address: z.string(), - name: z.string(), - symbol: z.string(), - decimals: z.number(), - logoUri: z.string().optional(), - ercType: TeleporterRewardDetailsErcType$inboundSchema, - price: Money$inboundSchema.optional(), - value: z.string(), + address: z.string(), + name: z.string(), + symbol: z.string(), + decimals: z.number(), + logoUri: z.string().optional(), + ercType: TeleporterRewardDetailsErcType$inboundSchema, + price: Money$inboundSchema.optional(), + value: z.string(), }); /** @internal */ export type TeleporterRewardDetails$Outbound = { - address: string; - name: string; - symbol: string; - decimals: number; - logoUri?: string | undefined; - ercType: string; - price?: Money$Outbound | undefined; - value: string; + address: string; + name: string; + symbol: string; + decimals: number; + logoUri?: string | undefined; + ercType: string; + price?: Money$Outbound | undefined; + value: string; }; /** @internal */ export const TeleporterRewardDetails$outboundSchema: z.ZodType< - TeleporterRewardDetails$Outbound, - z.ZodTypeDef, - TeleporterRewardDetails + TeleporterRewardDetails$Outbound, + z.ZodTypeDef, + TeleporterRewardDetails > = z.object({ - address: z.string(), - name: z.string(), - symbol: z.string(), - decimals: z.number(), - logoUri: z.string().optional(), - ercType: TeleporterRewardDetailsErcType$outboundSchema, - price: Money$outboundSchema.optional(), - value: z.string(), + address: z.string(), + name: z.string(), + symbol: z.string(), + decimals: z.number(), + logoUri: z.string().optional(), + ercType: TeleporterRewardDetailsErcType$outboundSchema, + price: Money$outboundSchema.optional(), + value: z.string(), }); /** @@ -110,10 +117,10 @@ export const TeleporterRewardDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TeleporterRewardDetails$ { - /** @deprecated use `TeleporterRewardDetails$inboundSchema` instead. */ - export const inboundSchema = TeleporterRewardDetails$inboundSchema; - /** @deprecated use `TeleporterRewardDetails$outboundSchema` instead. */ - export const outboundSchema = TeleporterRewardDetails$outboundSchema; - /** @deprecated use `TeleporterRewardDetails$Outbound` instead. */ - export type Outbound = TeleporterRewardDetails$Outbound; + /** @deprecated use `TeleporterRewardDetails$inboundSchema` instead. */ + export const inboundSchema = TeleporterRewardDetails$inboundSchema; + /** @deprecated use `TeleporterRewardDetails$outboundSchema` instead. */ + export const outboundSchema = TeleporterRewardDetails$outboundSchema; + /** @deprecated use `TeleporterRewardDetails$Outbound` instead. */ + export type Outbound = TeleporterRewardDetails$Outbound; } diff --git a/src/models/components/teleportersourcetransaction.ts b/src/models/components/teleportersourcetransaction.ts index 5b7f360..f5c7cbb 100644 --- a/src/models/components/teleportersourcetransaction.ts +++ b/src/models/components/teleportersourcetransaction.ts @@ -5,38 +5,38 @@ import * as z from "zod"; export type TeleporterSourceTransaction = { - txHash: string; - timestamp: number; - gasSpent: string; + txHash: string; + timestamp: number; + gasSpent: string; }; /** @internal */ export const TeleporterSourceTransaction$inboundSchema: z.ZodType< - TeleporterSourceTransaction, - z.ZodTypeDef, - unknown + TeleporterSourceTransaction, + z.ZodTypeDef, + unknown > = z.object({ - txHash: z.string(), - timestamp: z.number(), - gasSpent: z.string(), + txHash: z.string(), + timestamp: z.number(), + gasSpent: z.string(), }); /** @internal */ export type TeleporterSourceTransaction$Outbound = { - txHash: string; - timestamp: number; - gasSpent: string; + txHash: string; + timestamp: number; + gasSpent: string; }; /** @internal */ export const TeleporterSourceTransaction$outboundSchema: z.ZodType< - TeleporterSourceTransaction$Outbound, - z.ZodTypeDef, - TeleporterSourceTransaction + TeleporterSourceTransaction$Outbound, + z.ZodTypeDef, + TeleporterSourceTransaction > = z.object({ - txHash: z.string(), - timestamp: z.number(), - gasSpent: z.string(), + txHash: z.string(), + timestamp: z.number(), + gasSpent: z.string(), }); /** @@ -44,10 +44,10 @@ export const TeleporterSourceTransaction$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TeleporterSourceTransaction$ { - /** @deprecated use `TeleporterSourceTransaction$inboundSchema` instead. */ - export const inboundSchema = TeleporterSourceTransaction$inboundSchema; - /** @deprecated use `TeleporterSourceTransaction$outboundSchema` instead. */ - export const outboundSchema = TeleporterSourceTransaction$outboundSchema; - /** @deprecated use `TeleporterSourceTransaction$Outbound` instead. */ - export type Outbound = TeleporterSourceTransaction$Outbound; + /** @deprecated use `TeleporterSourceTransaction$inboundSchema` instead. */ + export const inboundSchema = TeleporterSourceTransaction$inboundSchema; + /** @deprecated use `TeleporterSourceTransaction$outboundSchema` instead. */ + export const outboundSchema = TeleporterSourceTransaction$outboundSchema; + /** @deprecated use `TeleporterSourceTransaction$Outbound` instead. */ + export type Outbound = TeleporterSourceTransaction$Outbound; } diff --git a/src/models/components/timeintervalgranularity.ts b/src/models/components/timeintervalgranularity.ts index 3fb65bf..3b872f0 100644 --- a/src/models/components/timeintervalgranularity.ts +++ b/src/models/components/timeintervalgranularity.ts @@ -2,25 +2,27 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const TimeIntervalGranularity = { - Hour: "hour", - Day: "day", - Week: "week", - Month: "month", + Hour: "hour", + Day: "day", + Week: "week", + Month: "month", } as const; -export type TimeIntervalGranularity = ClosedEnum; +export type TimeIntervalGranularity = ClosedEnum< + typeof TimeIntervalGranularity +>; /** @internal */ export const TimeIntervalGranularity$inboundSchema: z.ZodNativeEnum< - typeof TimeIntervalGranularity + typeof TimeIntervalGranularity > = z.nativeEnum(TimeIntervalGranularity); /** @internal */ export const TimeIntervalGranularity$outboundSchema: z.ZodNativeEnum< - typeof TimeIntervalGranularity + typeof TimeIntervalGranularity > = TimeIntervalGranularity$inboundSchema; /** @@ -28,8 +30,8 @@ export const TimeIntervalGranularity$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TimeIntervalGranularity$ { - /** @deprecated use `TimeIntervalGranularity$inboundSchema` instead. */ - export const inboundSchema = TimeIntervalGranularity$inboundSchema; - /** @deprecated use `TimeIntervalGranularity$outboundSchema` instead. */ - export const outboundSchema = TimeIntervalGranularity$outboundSchema; + /** @deprecated use `TimeIntervalGranularity$inboundSchema` instead. */ + export const inboundSchema = TimeIntervalGranularity$inboundSchema; + /** @deprecated use `TimeIntervalGranularity$outboundSchema` instead. */ + export const outboundSchema = TimeIntervalGranularity$outboundSchema; } diff --git a/src/models/components/timeintervalgranularityextended.ts b/src/models/components/timeintervalgranularityextended.ts index 5e38e89..3fcf8a5 100644 --- a/src/models/components/timeintervalgranularityextended.ts +++ b/src/models/components/timeintervalgranularityextended.ts @@ -2,26 +2,28 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const TimeIntervalGranularityExtended = { - Minute: "minute", - Hourly: "hourly", - Daily: "daily", - Weekly: "weekly", - Monthly: "monthly", + Minute: "minute", + Hourly: "hourly", + Daily: "daily", + Weekly: "weekly", + Monthly: "monthly", } as const; -export type TimeIntervalGranularityExtended = ClosedEnum; +export type TimeIntervalGranularityExtended = ClosedEnum< + typeof TimeIntervalGranularityExtended +>; /** @internal */ export const TimeIntervalGranularityExtended$inboundSchema: z.ZodNativeEnum< - typeof TimeIntervalGranularityExtended + typeof TimeIntervalGranularityExtended > = z.nativeEnum(TimeIntervalGranularityExtended); /** @internal */ export const TimeIntervalGranularityExtended$outboundSchema: z.ZodNativeEnum< - typeof TimeIntervalGranularityExtended + typeof TimeIntervalGranularityExtended > = TimeIntervalGranularityExtended$inboundSchema; /** @@ -29,8 +31,8 @@ export const TimeIntervalGranularityExtended$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TimeIntervalGranularityExtended$ { - /** @deprecated use `TimeIntervalGranularityExtended$inboundSchema` instead. */ - export const inboundSchema = TimeIntervalGranularityExtended$inboundSchema; - /** @deprecated use `TimeIntervalGranularityExtended$outboundSchema` instead. */ - export const outboundSchema = TimeIntervalGranularityExtended$outboundSchema; + /** @deprecated use `TimeIntervalGranularityExtended$inboundSchema` instead. */ + export const inboundSchema = TimeIntervalGranularityExtended$inboundSchema; + /** @deprecated use `TimeIntervalGranularityExtended$outboundSchema` instead. */ + export const outboundSchema = TimeIntervalGranularityExtended$outboundSchema; } diff --git a/src/models/components/timestamprangenftholdersparam.ts b/src/models/components/timestamprangenftholdersparam.ts index 9cb28f8..6cb878c 100644 --- a/src/models/components/timestamprangenftholdersparam.ts +++ b/src/models/components/timestamprangenftholdersparam.ts @@ -5,42 +5,42 @@ import * as z from "zod"; export type TimestampRangeNftHoldersParam = { - evmChainId: string; - contractAddress: string; - startTs: number; - endTs: number; + evmChainId: string; + contractAddress: string; + startTs: number; + endTs: number; }; /** @internal */ export const TimestampRangeNftHoldersParam$inboundSchema: z.ZodType< - TimestampRangeNftHoldersParam, - z.ZodTypeDef, - unknown + TimestampRangeNftHoldersParam, + z.ZodTypeDef, + unknown > = z.object({ - evmChainId: z.string(), - contractAddress: z.string(), - startTs: z.number(), - endTs: z.number(), + evmChainId: z.string(), + contractAddress: z.string(), + startTs: z.number(), + endTs: z.number(), }); /** @internal */ export type TimestampRangeNftHoldersParam$Outbound = { - evmChainId: string; - contractAddress: string; - startTs: number; - endTs: number; + evmChainId: string; + contractAddress: string; + startTs: number; + endTs: number; }; /** @internal */ export const TimestampRangeNftHoldersParam$outboundSchema: z.ZodType< - TimestampRangeNftHoldersParam$Outbound, - z.ZodTypeDef, - TimestampRangeNftHoldersParam + TimestampRangeNftHoldersParam$Outbound, + z.ZodTypeDef, + TimestampRangeNftHoldersParam > = z.object({ - evmChainId: z.string(), - contractAddress: z.string(), - startTs: z.number(), - endTs: z.number(), + evmChainId: z.string(), + contractAddress: z.string(), + startTs: z.number(), + endTs: z.number(), }); /** @@ -48,10 +48,10 @@ export const TimestampRangeNftHoldersParam$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TimestampRangeNftHoldersParam$ { - /** @deprecated use `TimestampRangeNftHoldersParam$inboundSchema` instead. */ - export const inboundSchema = TimestampRangeNftHoldersParam$inboundSchema; - /** @deprecated use `TimestampRangeNftHoldersParam$outboundSchema` instead. */ - export const outboundSchema = TimestampRangeNftHoldersParam$outboundSchema; - /** @deprecated use `TimestampRangeNftHoldersParam$Outbound` instead. */ - export type Outbound = TimestampRangeNftHoldersParam$Outbound; + /** @deprecated use `TimestampRangeNftHoldersParam$inboundSchema` instead. */ + export const inboundSchema = TimestampRangeNftHoldersParam$inboundSchema; + /** @deprecated use `TimestampRangeNftHoldersParam$outboundSchema` instead. */ + export const outboundSchema = TimestampRangeNftHoldersParam$outboundSchema; + /** @deprecated use `TimestampRangeNftHoldersParam$Outbound` instead. */ + export type Outbound = TimestampRangeNftHoldersParam$Outbound; } diff --git a/src/models/components/tokentype.ts b/src/models/components/tokentype.ts index 62d280b..75deffc 100644 --- a/src/models/components/tokentype.ts +++ b/src/models/components/tokentype.ts @@ -2,28 +2,30 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const TokenType = { - Erc20: "ERC20", - Native: "NATIVE", + Erc20: "ERC20", + Native: "NATIVE", } as const; export type TokenType = ClosedEnum; /** @internal */ -export const TokenType$inboundSchema: z.ZodNativeEnum = z.nativeEnum(TokenType); +export const TokenType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(TokenType); /** @internal */ -export const TokenType$outboundSchema: z.ZodNativeEnum = TokenType$inboundSchema; +export const TokenType$outboundSchema: z.ZodNativeEnum = + TokenType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TokenType$ { - /** @deprecated use `TokenType$inboundSchema` instead. */ - export const inboundSchema = TokenType$inboundSchema; - /** @deprecated use `TokenType$outboundSchema` instead. */ - export const outboundSchema = TokenType$outboundSchema; + /** @deprecated use `TokenType$inboundSchema` instead. */ + export const inboundSchema = TokenType$inboundSchema; + /** @deprecated use `TokenType$outboundSchema` instead. */ + export const outboundSchema = TokenType$outboundSchema; } diff --git a/src/models/components/transactiondetails.ts b/src/models/components/transactiondetails.ts index d93f77d..5fbdf0c 100644 --- a/src/models/components/transactiondetails.ts +++ b/src/models/components/transactiondetails.ts @@ -2,94 +2,96 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - Erc1155TransferDetails, - Erc1155TransferDetails$inboundSchema, - Erc1155TransferDetails$Outbound, - Erc1155TransferDetails$outboundSchema, + Erc1155TransferDetails, + Erc1155TransferDetails$inboundSchema, + Erc1155TransferDetails$Outbound, + Erc1155TransferDetails$outboundSchema, } from "./erc1155transferdetails.js"; import { - Erc20TransferDetails, - Erc20TransferDetails$inboundSchema, - Erc20TransferDetails$Outbound, - Erc20TransferDetails$outboundSchema, + Erc20TransferDetails, + Erc20TransferDetails$inboundSchema, + Erc20TransferDetails$Outbound, + Erc20TransferDetails$outboundSchema, } from "./erc20transferdetails.js"; import { - Erc721TransferDetails, - Erc721TransferDetails$inboundSchema, - Erc721TransferDetails$Outbound, - Erc721TransferDetails$outboundSchema, + Erc721TransferDetails, + Erc721TransferDetails$inboundSchema, + Erc721TransferDetails$Outbound, + Erc721TransferDetails$outboundSchema, } from "./erc721transferdetails.js"; import { - InternalTransactionDetails, - InternalTransactionDetails$inboundSchema, - InternalTransactionDetails$Outbound, - InternalTransactionDetails$outboundSchema, + InternalTransactionDetails, + InternalTransactionDetails$inboundSchema, + InternalTransactionDetails$Outbound, + InternalTransactionDetails$outboundSchema, } from "./internaltransactiondetails.js"; import { - NativeTransaction, - NativeTransaction$inboundSchema, - NativeTransaction$Outbound, - NativeTransaction$outboundSchema, + NativeTransaction, + NativeTransaction$inboundSchema, + NativeTransaction$Outbound, + NativeTransaction$outboundSchema, } from "./nativetransaction.js"; -import * as z from "zod"; export type TransactionDetails = { - /** - * The native (top-level) transaction details. - */ - nativeTransaction: NativeTransaction; - /** - * The list of ERC-20 transfers. - */ - erc20Transfers?: Array | undefined; - /** - * The list of ERC-721 transfers. - */ - erc721Transfers?: Array | undefined; - /** - * The list of ERC-1155 transfers. - */ - erc1155Transfers?: Array | undefined; - /** - * The list of internal transactions. Note that this list only includes CALL and CALLCODE internal transactions that had a non-zero value and CREATE/CREATE2 calls. Use a client provider to recieve a full debug trace of the transaction. - */ - internalTransactions?: Array | undefined; + /** + * The native (top-level) transaction details. + */ + nativeTransaction: NativeTransaction; + /** + * The list of ERC-20 transfers. + */ + erc20Transfers?: Array | undefined; + /** + * The list of ERC-721 transfers. + */ + erc721Transfers?: Array | undefined; + /** + * The list of ERC-1155 transfers. + */ + erc1155Transfers?: Array | undefined; + /** + * The list of internal transactions. Note that this list only includes CALL and CALLCODE internal transactions that had a non-zero value and CREATE/CREATE2 calls. Use a client provider to recieve a full debug trace of the transaction. + */ + internalTransactions?: Array | undefined; }; /** @internal */ export const TransactionDetails$inboundSchema: z.ZodType< - TransactionDetails, - z.ZodTypeDef, - unknown + TransactionDetails, + z.ZodTypeDef, + unknown > = z.object({ - nativeTransaction: NativeTransaction$inboundSchema, - erc20Transfers: z.array(Erc20TransferDetails$inboundSchema).optional(), - erc721Transfers: z.array(Erc721TransferDetails$inboundSchema).optional(), - erc1155Transfers: z.array(Erc1155TransferDetails$inboundSchema).optional(), - internalTransactions: z.array(InternalTransactionDetails$inboundSchema).optional(), + nativeTransaction: NativeTransaction$inboundSchema, + erc20Transfers: z.array(Erc20TransferDetails$inboundSchema).optional(), + erc721Transfers: z.array(Erc721TransferDetails$inboundSchema).optional(), + erc1155Transfers: z.array(Erc1155TransferDetails$inboundSchema).optional(), + internalTransactions: z.array(InternalTransactionDetails$inboundSchema) + .optional(), }); /** @internal */ export type TransactionDetails$Outbound = { - nativeTransaction: NativeTransaction$Outbound; - erc20Transfers?: Array | undefined; - erc721Transfers?: Array | undefined; - erc1155Transfers?: Array | undefined; - internalTransactions?: Array | undefined; + nativeTransaction: NativeTransaction$Outbound; + erc20Transfers?: Array | undefined; + erc721Transfers?: Array | undefined; + erc1155Transfers?: Array | undefined; + internalTransactions?: Array | undefined; }; /** @internal */ export const TransactionDetails$outboundSchema: z.ZodType< - TransactionDetails$Outbound, - z.ZodTypeDef, - TransactionDetails + TransactionDetails$Outbound, + z.ZodTypeDef, + TransactionDetails > = z.object({ - nativeTransaction: NativeTransaction$outboundSchema, - erc20Transfers: z.array(Erc20TransferDetails$outboundSchema).optional(), - erc721Transfers: z.array(Erc721TransferDetails$outboundSchema).optional(), - erc1155Transfers: z.array(Erc1155TransferDetails$outboundSchema).optional(), - internalTransactions: z.array(InternalTransactionDetails$outboundSchema).optional(), + nativeTransaction: NativeTransaction$outboundSchema, + erc20Transfers: z.array(Erc20TransferDetails$outboundSchema).optional(), + erc721Transfers: z.array(Erc721TransferDetails$outboundSchema).optional(), + erc1155Transfers: z.array(Erc1155TransferDetails$outboundSchema).optional(), + internalTransactions: z.array(InternalTransactionDetails$outboundSchema) + .optional(), }); /** @@ -97,10 +99,10 @@ export const TransactionDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TransactionDetails$ { - /** @deprecated use `TransactionDetails$inboundSchema` instead. */ - export const inboundSchema = TransactionDetails$inboundSchema; - /** @deprecated use `TransactionDetails$outboundSchema` instead. */ - export const outboundSchema = TransactionDetails$outboundSchema; - /** @deprecated use `TransactionDetails$Outbound` instead. */ - export type Outbound = TransactionDetails$Outbound; + /** @deprecated use `TransactionDetails$inboundSchema` instead. */ + export const inboundSchema = TransactionDetails$inboundSchema; + /** @deprecated use `TransactionDetails$outboundSchema` instead. */ + export const outboundSchema = TransactionDetails$outboundSchema; + /** @deprecated use `TransactionDetails$Outbound` instead. */ + export type Outbound = TransactionDetails$Outbound; } diff --git a/src/models/components/transactiondirectiontype.ts b/src/models/components/transactiondirectiontype.ts new file mode 100644 index 0000000..1054411 --- /dev/null +++ b/src/models/components/transactiondirectiontype.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +export const TransactionDirectionType = { + SourceTransaction: "SOURCE_TRANSACTION", + DestinationTransaction: "DESTINATION_TRANSACTION", +} as const; +export type TransactionDirectionType = ClosedEnum< + typeof TransactionDirectionType +>; + +/** @internal */ +export const TransactionDirectionType$inboundSchema: z.ZodNativeEnum< + typeof TransactionDirectionType +> = z.nativeEnum(TransactionDirectionType); + +/** @internal */ +export const TransactionDirectionType$outboundSchema: z.ZodNativeEnum< + typeof TransactionDirectionType +> = TransactionDirectionType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TransactionDirectionType$ { + /** @deprecated use `TransactionDirectionType$inboundSchema` instead. */ + export const inboundSchema = TransactionDirectionType$inboundSchema; + /** @deprecated use `TransactionDirectionType$outboundSchema` instead. */ + export const outboundSchema = TransactionDirectionType$outboundSchema; +} diff --git a/src/models/components/transactionexportmetadata.ts b/src/models/components/transactionexportmetadata.ts index 3970d7d..748ba9d 100644 --- a/src/models/components/transactionexportmetadata.ts +++ b/src/models/components/transactionexportmetadata.ts @@ -2,52 +2,52 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - OperationStatusCode, - OperationStatusCode$inboundSchema, - OperationStatusCode$outboundSchema, + OperationStatusCode, + OperationStatusCode$inboundSchema, + OperationStatusCode$outboundSchema, } from "./operationstatuscode.js"; -import * as z from "zod"; export type TransactionExportMetadata = { - code?: OperationStatusCode | undefined; - /** - * File download URL. Provided only for COMPLETED and COMPLETED_WITH_WARNING operations. - */ - downloadUrl?: string | undefined; - /** - * The next date (YYYY-MM-DD) to use as the firstDate in follow up requests if a request results in a transaction history exceeding the max size and has been reported as `COMPLETED_WITH_WARNING` with the warning 'WarnTruncatedExport'. - */ - nextDate?: string | undefined; + code?: OperationStatusCode | undefined; + /** + * File download URL. Provided only for COMPLETED and COMPLETED_WITH_WARNING operations. + */ + downloadUrl?: string | undefined; + /** + * The next date (YYYY-MM-DD) to use as the firstDate in follow up requests if a request results in a transaction history exceeding the max size and has been reported as `COMPLETED_WITH_WARNING` with the warning 'WarnTruncatedExport'. + */ + nextDate?: string | undefined; }; /** @internal */ export const TransactionExportMetadata$inboundSchema: z.ZodType< - TransactionExportMetadata, - z.ZodTypeDef, - unknown + TransactionExportMetadata, + z.ZodTypeDef, + unknown > = z.object({ - code: OperationStatusCode$inboundSchema.optional(), - downloadUrl: z.string().optional(), - nextDate: z.string().optional(), + code: OperationStatusCode$inboundSchema.optional(), + downloadUrl: z.string().optional(), + nextDate: z.string().optional(), }); /** @internal */ export type TransactionExportMetadata$Outbound = { - code?: string | undefined; - downloadUrl?: string | undefined; - nextDate?: string | undefined; + code?: string | undefined; + downloadUrl?: string | undefined; + nextDate?: string | undefined; }; /** @internal */ export const TransactionExportMetadata$outboundSchema: z.ZodType< - TransactionExportMetadata$Outbound, - z.ZodTypeDef, - TransactionExportMetadata + TransactionExportMetadata$Outbound, + z.ZodTypeDef, + TransactionExportMetadata > = z.object({ - code: OperationStatusCode$outboundSchema.optional(), - downloadUrl: z.string().optional(), - nextDate: z.string().optional(), + code: OperationStatusCode$outboundSchema.optional(), + downloadUrl: z.string().optional(), + nextDate: z.string().optional(), }); /** @@ -55,10 +55,10 @@ export const TransactionExportMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TransactionExportMetadata$ { - /** @deprecated use `TransactionExportMetadata$inboundSchema` instead. */ - export const inboundSchema = TransactionExportMetadata$inboundSchema; - /** @deprecated use `TransactionExportMetadata$outboundSchema` instead. */ - export const outboundSchema = TransactionExportMetadata$outboundSchema; - /** @deprecated use `TransactionExportMetadata$Outbound` instead. */ - export type Outbound = TransactionExportMetadata$Outbound; + /** @deprecated use `TransactionExportMetadata$inboundSchema` instead. */ + export const inboundSchema = TransactionExportMetadata$inboundSchema; + /** @deprecated use `TransactionExportMetadata$outboundSchema` instead. */ + export const outboundSchema = TransactionExportMetadata$outboundSchema; + /** @deprecated use `TransactionExportMetadata$Outbound` instead. */ + export type Outbound = TransactionExportMetadata$Outbound; } diff --git a/src/models/components/transactionmethodtype.ts b/src/models/components/transactionmethodtype.ts index 2080e50..3f08efb 100644 --- a/src/models/components/transactionmethodtype.ts +++ b/src/models/components/transactionmethodtype.ts @@ -2,16 +2,16 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * The contract call type. NATIVE_TRANSFER indicates a transfer of the native token without any smart-contract interaction. CONTRACT_CALL indicates a smart-contract interaction. CONTRACT_CREATION indicates a smart-contract creation. */ export const TransactionMethodType = { - NativeTransfer: "NATIVE_TRANSFER", - ContractCall: "CONTRACT_CALL", - ContractCreation: "CONTRACT_CREATION", + NativeTransfer: "NATIVE_TRANSFER", + ContractCall: "CONTRACT_CALL", + ContractCreation: "CONTRACT_CREATION", } as const; /** * The contract call type. NATIVE_TRANSFER indicates a transfer of the native token without any smart-contract interaction. CONTRACT_CALL indicates a smart-contract interaction. CONTRACT_CREATION indicates a smart-contract creation. @@ -19,20 +19,22 @@ export const TransactionMethodType = { export type TransactionMethodType = ClosedEnum; /** @internal */ -export const TransactionMethodType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(TransactionMethodType); +export const TransactionMethodType$inboundSchema: z.ZodNativeEnum< + typeof TransactionMethodType +> = z.nativeEnum(TransactionMethodType); /** @internal */ -export const TransactionMethodType$outboundSchema: z.ZodNativeEnum = - TransactionMethodType$inboundSchema; +export const TransactionMethodType$outboundSchema: z.ZodNativeEnum< + typeof TransactionMethodType +> = TransactionMethodType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TransactionMethodType$ { - /** @deprecated use `TransactionMethodType$inboundSchema` instead. */ - export const inboundSchema = TransactionMethodType$inboundSchema; - /** @deprecated use `TransactionMethodType$outboundSchema` instead. */ - export const outboundSchema = TransactionMethodType$outboundSchema; + /** @deprecated use `TransactionMethodType$inboundSchema` instead. */ + export const inboundSchema = TransactionMethodType$inboundSchema; + /** @deprecated use `TransactionMethodType$outboundSchema` instead. */ + export const outboundSchema = TransactionMethodType$outboundSchema; } diff --git a/src/models/components/transactionstatus.ts b/src/models/components/transactionstatus.ts index 0600e2d..9d8112c 100644 --- a/src/models/components/transactionstatus.ts +++ b/src/models/components/transactionstatus.ts @@ -2,30 +2,32 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const TransactionStatus = { - Failed: "failed", - Success: "success", + Failed: "failed", + Success: "success", } as const; export type TransactionStatus = ClosedEnum; /** @internal */ -export const TransactionStatus$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(TransactionStatus); +export const TransactionStatus$inboundSchema: z.ZodNativeEnum< + typeof TransactionStatus +> = z.nativeEnum(TransactionStatus); /** @internal */ -export const TransactionStatus$outboundSchema: z.ZodNativeEnum = - TransactionStatus$inboundSchema; +export const TransactionStatus$outboundSchema: z.ZodNativeEnum< + typeof TransactionStatus +> = TransactionStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TransactionStatus$ { - /** @deprecated use `TransactionStatus$inboundSchema` instead. */ - export const inboundSchema = TransactionStatus$inboundSchema; - /** @deprecated use `TransactionStatus$outboundSchema` instead. */ - export const outboundSchema = TransactionStatus$outboundSchema; + /** @deprecated use `TransactionStatus$inboundSchema` instead. */ + export const inboundSchema = TransactionStatus$inboundSchema; + /** @deprecated use `TransactionStatus$outboundSchema` instead. */ + export const outboundSchema = TransactionStatus$outboundSchema; } diff --git a/src/models/components/transactionvertexdetail.ts b/src/models/components/transactionvertexdetail.ts index 33097d7..44740a1 100644 --- a/src/models/components/transactionvertexdetail.ts +++ b/src/models/components/transactionvertexdetail.ts @@ -5,47 +5,47 @@ import * as z from "zod"; export type TransactionVertexDetail = { - /** - * Vertex ID of the vertex this transaction belongs to. - */ - hash: string; - /** - * Vertex height of the vertex this transaction belongs to. - */ - height: number; - /** - * Timestamp in seconds this vertex was accepted. - */ - timestamp: number; + /** + * Vertex ID of the vertex this transaction belongs to. + */ + hash: string; + /** + * Vertex height of the vertex this transaction belongs to. + */ + height: number; + /** + * Timestamp in seconds this vertex was accepted. + */ + timestamp: number; }; /** @internal */ export const TransactionVertexDetail$inboundSchema: z.ZodType< - TransactionVertexDetail, - z.ZodTypeDef, - unknown + TransactionVertexDetail, + z.ZodTypeDef, + unknown > = z.object({ - hash: z.string(), - height: z.number(), - timestamp: z.number(), + hash: z.string(), + height: z.number(), + timestamp: z.number(), }); /** @internal */ export type TransactionVertexDetail$Outbound = { - hash: string; - height: number; - timestamp: number; + hash: string; + height: number; + timestamp: number; }; /** @internal */ export const TransactionVertexDetail$outboundSchema: z.ZodType< - TransactionVertexDetail$Outbound, - z.ZodTypeDef, - TransactionVertexDetail + TransactionVertexDetail$Outbound, + z.ZodTypeDef, + TransactionVertexDetail > = z.object({ - hash: z.string(), - height: z.number(), - timestamp: z.number(), + hash: z.string(), + height: z.number(), + timestamp: z.number(), }); /** @@ -53,10 +53,10 @@ export const TransactionVertexDetail$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TransactionVertexDetail$ { - /** @deprecated use `TransactionVertexDetail$inboundSchema` instead. */ - export const inboundSchema = TransactionVertexDetail$inboundSchema; - /** @deprecated use `TransactionVertexDetail$outboundSchema` instead. */ - export const outboundSchema = TransactionVertexDetail$outboundSchema; - /** @deprecated use `TransactionVertexDetail$Outbound` instead. */ - export type Outbound = TransactionVertexDetail$Outbound; + /** @deprecated use `TransactionVertexDetail$inboundSchema` instead. */ + export const inboundSchema = TransactionVertexDetail$inboundSchema; + /** @deprecated use `TransactionVertexDetail$outboundSchema` instead. */ + export const outboundSchema = TransactionVertexDetail$outboundSchema; + /** @deprecated use `TransactionVertexDetail$Outbound` instead. */ + export type Outbound = TransactionVertexDetail$Outbound; } diff --git a/src/models/components/unknowncontract.ts b/src/models/components/unknowncontract.ts index cf5ecbd..9794927 100644 --- a/src/models/components/unknowncontract.ts +++ b/src/models/components/unknowncontract.ts @@ -2,123 +2,128 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - ContractDeploymentDetails, - ContractDeploymentDetails$inboundSchema, - ContractDeploymentDetails$Outbound, - ContractDeploymentDetails$outboundSchema, + ContractDeploymentDetails, + ContractDeploymentDetails$inboundSchema, + ContractDeploymentDetails$Outbound, + ContractDeploymentDetails$outboundSchema, } from "./contractdeploymentdetails.js"; import { - ImageAsset, - ImageAsset$inboundSchema, - ImageAsset$Outbound, - ImageAsset$outboundSchema, + ImageAsset, + ImageAsset$inboundSchema, + ImageAsset$Outbound, + ImageAsset$outboundSchema, } from "./imageasset.js"; import { - ResourceLink, - ResourceLink$inboundSchema, - ResourceLink$Outbound, - ResourceLink$outboundSchema, + ResourceLink, + ResourceLink$inboundSchema, + ResourceLink$Outbound, + ResourceLink$outboundSchema, } from "./resourcelink.js"; -import * as z from "zod"; export const UnknownContractErcType = { - Unknown: "UNKNOWN", + Unknown: "UNKNOWN", } as const; export type UnknownContractErcType = ClosedEnum; export type UnknownContract = { - /** - * The contract name. - */ - name?: string | undefined; - description?: string | undefined; - officialSite?: string | undefined; - email?: string | undefined; - logoAsset?: ImageAsset | undefined; - bannerAsset?: ImageAsset | undefined; - color?: string | undefined; - resourceLinks?: Array | undefined; - tags?: Array | undefined; - /** - * A wallet or contract address in mixed-case checksum encoding. - */ - address: string; - deploymentDetails: ContractDeploymentDetails; - ercType: UnknownContractErcType; + /** + * The contract name. + */ + name?: string | undefined; + description?: string | undefined; + officialSite?: string | undefined; + email?: string | undefined; + logoAsset?: ImageAsset | undefined; + bannerAsset?: ImageAsset | undefined; + color?: string | undefined; + resourceLinks?: Array | undefined; + tags?: Array | undefined; + /** + * A wallet or contract address in mixed-case checksum encoding. + */ + address: string; + deploymentDetails: ContractDeploymentDetails; + ercType: UnknownContractErcType; }; /** @internal */ -export const UnknownContractErcType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(UnknownContractErcType); +export const UnknownContractErcType$inboundSchema: z.ZodNativeEnum< + typeof UnknownContractErcType +> = z.nativeEnum(UnknownContractErcType); /** @internal */ -export const UnknownContractErcType$outboundSchema: z.ZodNativeEnum = - UnknownContractErcType$inboundSchema; +export const UnknownContractErcType$outboundSchema: z.ZodNativeEnum< + typeof UnknownContractErcType +> = UnknownContractErcType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UnknownContractErcType$ { - /** @deprecated use `UnknownContractErcType$inboundSchema` instead. */ - export const inboundSchema = UnknownContractErcType$inboundSchema; - /** @deprecated use `UnknownContractErcType$outboundSchema` instead. */ - export const outboundSchema = UnknownContractErcType$outboundSchema; + /** @deprecated use `UnknownContractErcType$inboundSchema` instead. */ + export const inboundSchema = UnknownContractErcType$inboundSchema; + /** @deprecated use `UnknownContractErcType$outboundSchema` instead. */ + export const outboundSchema = UnknownContractErcType$outboundSchema; } /** @internal */ -export const UnknownContract$inboundSchema: z.ZodType = - z.object({ - name: z.string().optional(), - description: z.string().optional(), - officialSite: z.string().optional(), - email: z.string().optional(), - logoAsset: ImageAsset$inboundSchema.optional(), - bannerAsset: ImageAsset$inboundSchema.optional(), - color: z.string().optional(), - resourceLinks: z.array(ResourceLink$inboundSchema).optional(), - tags: z.array(z.string()).optional(), - address: z.string(), - deploymentDetails: ContractDeploymentDetails$inboundSchema, - ercType: UnknownContractErcType$inboundSchema, - }); +export const UnknownContract$inboundSchema: z.ZodType< + UnknownContract, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + description: z.string().optional(), + officialSite: z.string().optional(), + email: z.string().optional(), + logoAsset: ImageAsset$inboundSchema.optional(), + bannerAsset: ImageAsset$inboundSchema.optional(), + color: z.string().optional(), + resourceLinks: z.array(ResourceLink$inboundSchema).optional(), + tags: z.array(z.string()).optional(), + address: z.string(), + deploymentDetails: ContractDeploymentDetails$inboundSchema, + ercType: UnknownContractErcType$inboundSchema, +}); /** @internal */ export type UnknownContract$Outbound = { - name?: string | undefined; - description?: string | undefined; - officialSite?: string | undefined; - email?: string | undefined; - logoAsset?: ImageAsset$Outbound | undefined; - bannerAsset?: ImageAsset$Outbound | undefined; - color?: string | undefined; - resourceLinks?: Array | undefined; - tags?: Array | undefined; - address: string; - deploymentDetails: ContractDeploymentDetails$Outbound; - ercType: string; + name?: string | undefined; + description?: string | undefined; + officialSite?: string | undefined; + email?: string | undefined; + logoAsset?: ImageAsset$Outbound | undefined; + bannerAsset?: ImageAsset$Outbound | undefined; + color?: string | undefined; + resourceLinks?: Array | undefined; + tags?: Array | undefined; + address: string; + deploymentDetails: ContractDeploymentDetails$Outbound; + ercType: string; }; /** @internal */ export const UnknownContract$outboundSchema: z.ZodType< - UnknownContract$Outbound, - z.ZodTypeDef, - UnknownContract + UnknownContract$Outbound, + z.ZodTypeDef, + UnknownContract > = z.object({ - name: z.string().optional(), - description: z.string().optional(), - officialSite: z.string().optional(), - email: z.string().optional(), - logoAsset: ImageAsset$outboundSchema.optional(), - bannerAsset: ImageAsset$outboundSchema.optional(), - color: z.string().optional(), - resourceLinks: z.array(ResourceLink$outboundSchema).optional(), - tags: z.array(z.string()).optional(), - address: z.string(), - deploymentDetails: ContractDeploymentDetails$outboundSchema, - ercType: UnknownContractErcType$outboundSchema, + name: z.string().optional(), + description: z.string().optional(), + officialSite: z.string().optional(), + email: z.string().optional(), + logoAsset: ImageAsset$outboundSchema.optional(), + bannerAsset: ImageAsset$outboundSchema.optional(), + color: z.string().optional(), + resourceLinks: z.array(ResourceLink$outboundSchema).optional(), + tags: z.array(z.string()).optional(), + address: z.string(), + deploymentDetails: ContractDeploymentDetails$outboundSchema, + ercType: UnknownContractErcType$outboundSchema, }); /** @@ -126,10 +131,10 @@ export const UnknownContract$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UnknownContract$ { - /** @deprecated use `UnknownContract$inboundSchema` instead. */ - export const inboundSchema = UnknownContract$inboundSchema; - /** @deprecated use `UnknownContract$outboundSchema` instead. */ - export const outboundSchema = UnknownContract$outboundSchema; - /** @deprecated use `UnknownContract$Outbound` instead. */ - export type Outbound = UnknownContract$Outbound; + /** @deprecated use `UnknownContract$inboundSchema` instead. */ + export const inboundSchema = UnknownContract$inboundSchema; + /** @deprecated use `UnknownContract$outboundSchema` instead. */ + export const outboundSchema = UnknownContract$outboundSchema; + /** @deprecated use `UnknownContract$Outbound` instead. */ + export type Outbound = UnknownContract$Outbound; } diff --git a/src/models/components/updatewebhookrequest.ts b/src/models/components/updatewebhookrequest.ts index 6062e5c..6eb4f2f 100644 --- a/src/models/components/updatewebhookrequest.ts +++ b/src/models/components/updatewebhookrequest.ts @@ -2,58 +2,58 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - WebhookStatusType, - WebhookStatusType$inboundSchema, - WebhookStatusType$outboundSchema, + WebhookStatusType, + WebhookStatusType$inboundSchema, + WebhookStatusType$outboundSchema, } from "./webhookstatustype.js"; -import * as z from "zod"; export type UpdateWebhookRequest = { - name?: string | undefined; - description?: string | undefined; - url?: string | undefined; - status?: WebhookStatusType | undefined; - includeInternalTxs?: boolean | undefined; - includeLogs?: boolean | undefined; + name?: string | undefined; + description?: string | undefined; + url?: string | undefined; + status?: WebhookStatusType | undefined; + includeInternalTxs?: boolean | undefined; + includeLogs?: boolean | undefined; }; /** @internal */ export const UpdateWebhookRequest$inboundSchema: z.ZodType< - UpdateWebhookRequest, - z.ZodTypeDef, - unknown + UpdateWebhookRequest, + z.ZodTypeDef, + unknown > = z.object({ - name: z.string().optional(), - description: z.string().optional(), - url: z.string().optional(), - status: WebhookStatusType$inboundSchema.optional(), - includeInternalTxs: z.boolean().optional(), - includeLogs: z.boolean().optional(), + name: z.string().optional(), + description: z.string().optional(), + url: z.string().optional(), + status: WebhookStatusType$inboundSchema.optional(), + includeInternalTxs: z.boolean().optional(), + includeLogs: z.boolean().optional(), }); /** @internal */ export type UpdateWebhookRequest$Outbound = { - name?: string | undefined; - description?: string | undefined; - url?: string | undefined; - status?: string | undefined; - includeInternalTxs?: boolean | undefined; - includeLogs?: boolean | undefined; + name?: string | undefined; + description?: string | undefined; + url?: string | undefined; + status?: string | undefined; + includeInternalTxs?: boolean | undefined; + includeLogs?: boolean | undefined; }; /** @internal */ export const UpdateWebhookRequest$outboundSchema: z.ZodType< - UpdateWebhookRequest$Outbound, - z.ZodTypeDef, - UpdateWebhookRequest + UpdateWebhookRequest$Outbound, + z.ZodTypeDef, + UpdateWebhookRequest > = z.object({ - name: z.string().optional(), - description: z.string().optional(), - url: z.string().optional(), - status: WebhookStatusType$outboundSchema.optional(), - includeInternalTxs: z.boolean().optional(), - includeLogs: z.boolean().optional(), + name: z.string().optional(), + description: z.string().optional(), + url: z.string().optional(), + status: WebhookStatusType$outboundSchema.optional(), + includeInternalTxs: z.boolean().optional(), + includeLogs: z.boolean().optional(), }); /** @@ -61,10 +61,10 @@ export const UpdateWebhookRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateWebhookRequest$ { - /** @deprecated use `UpdateWebhookRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateWebhookRequest$inboundSchema; - /** @deprecated use `UpdateWebhookRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateWebhookRequest$outboundSchema; - /** @deprecated use `UpdateWebhookRequest$Outbound` instead. */ - export type Outbound = UpdateWebhookRequest$Outbound; + /** @deprecated use `UpdateWebhookRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateWebhookRequest$inboundSchema; + /** @deprecated use `UpdateWebhookRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateWebhookRequest$outboundSchema; + /** @deprecated use `UpdateWebhookRequest$Outbound` instead. */ + export type Outbound = UpdateWebhookRequest$Outbound; } diff --git a/src/models/components/usagemetricsgroupbyenum.ts b/src/models/components/usagemetricsgroupbyenum.ts index 5d7195c..dbe0e44 100644 --- a/src/models/components/usagemetricsgroupbyenum.ts +++ b/src/models/components/usagemetricsgroupbyenum.ts @@ -2,26 +2,28 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const UsageMetricsGroupByEnum = { - RequestPath: "requestPath", - ResponseCode: "responseCode", - ChainId: "chainId", - ApiKeyId: "apiKeyId", - RequestType: "requestType", + RequestPath: "requestPath", + ResponseCode: "responseCode", + ChainId: "chainId", + ApiKeyId: "apiKeyId", + RequestType: "requestType", } as const; -export type UsageMetricsGroupByEnum = ClosedEnum; +export type UsageMetricsGroupByEnum = ClosedEnum< + typeof UsageMetricsGroupByEnum +>; /** @internal */ export const UsageMetricsGroupByEnum$inboundSchema: z.ZodNativeEnum< - typeof UsageMetricsGroupByEnum + typeof UsageMetricsGroupByEnum > = z.nativeEnum(UsageMetricsGroupByEnum); /** @internal */ export const UsageMetricsGroupByEnum$outboundSchema: z.ZodNativeEnum< - typeof UsageMetricsGroupByEnum + typeof UsageMetricsGroupByEnum > = UsageMetricsGroupByEnum$inboundSchema; /** @@ -29,8 +31,8 @@ export const UsageMetricsGroupByEnum$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UsageMetricsGroupByEnum$ { - /** @deprecated use `UsageMetricsGroupByEnum$inboundSchema` instead. */ - export const inboundSchema = UsageMetricsGroupByEnum$inboundSchema; - /** @deprecated use `UsageMetricsGroupByEnum$outboundSchema` instead. */ - export const outboundSchema = UsageMetricsGroupByEnum$outboundSchema; + /** @deprecated use `UsageMetricsGroupByEnum$inboundSchema` instead. */ + export const inboundSchema = UsageMetricsGroupByEnum$inboundSchema; + /** @deprecated use `UsageMetricsGroupByEnum$outboundSchema` instead. */ + export const outboundSchema = UsageMetricsGroupByEnum$outboundSchema; } diff --git a/src/models/components/usagemetricsresponsedto.ts b/src/models/components/usagemetricsresponsedto.ts index e3df306..67b4282 100644 --- a/src/models/components/usagemetricsresponsedto.ts +++ b/src/models/components/usagemetricsresponsedto.ts @@ -2,51 +2,56 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { Metric, Metric$inboundSchema, Metric$Outbound, Metric$outboundSchema } from "./metric.js"; import * as z from "zod"; +import { + Metric, + Metric$inboundSchema, + Metric$Outbound, + Metric$outboundSchema, +} from "./metric.js"; export type UsageMetricsResponseDTO = { - /** - * Duration in which the metrics value is aggregated - */ - aggregateDuration: string; - /** - * Org ID for which the metrics are aggregated - */ - orgId: string; - /** - * Metrics values - */ - metrics: Array; + /** + * Duration in which the metrics value is aggregated + */ + aggregateDuration: string; + /** + * Org ID for which the metrics are aggregated + */ + orgId: string; + /** + * Metrics values + */ + metrics: Array; }; /** @internal */ export const UsageMetricsResponseDTO$inboundSchema: z.ZodType< - UsageMetricsResponseDTO, - z.ZodTypeDef, - unknown + UsageMetricsResponseDTO, + z.ZodTypeDef, + unknown > = z.object({ - aggregateDuration: z.string(), - orgId: z.string(), - metrics: z.array(Metric$inboundSchema), + aggregateDuration: z.string(), + orgId: z.string(), + metrics: z.array(Metric$inboundSchema), }); /** @internal */ export type UsageMetricsResponseDTO$Outbound = { - aggregateDuration: string; - orgId: string; - metrics: Array; + aggregateDuration: string; + orgId: string; + metrics: Array; }; /** @internal */ export const UsageMetricsResponseDTO$outboundSchema: z.ZodType< - UsageMetricsResponseDTO$Outbound, - z.ZodTypeDef, - UsageMetricsResponseDTO + UsageMetricsResponseDTO$Outbound, + z.ZodTypeDef, + UsageMetricsResponseDTO > = z.object({ - aggregateDuration: z.string(), - orgId: z.string(), - metrics: z.array(Metric$outboundSchema), + aggregateDuration: z.string(), + orgId: z.string(), + metrics: z.array(Metric$outboundSchema), }); /** @@ -54,10 +59,10 @@ export const UsageMetricsResponseDTO$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UsageMetricsResponseDTO$ { - /** @deprecated use `UsageMetricsResponseDTO$inboundSchema` instead. */ - export const inboundSchema = UsageMetricsResponseDTO$inboundSchema; - /** @deprecated use `UsageMetricsResponseDTO$outboundSchema` instead. */ - export const outboundSchema = UsageMetricsResponseDTO$outboundSchema; - /** @deprecated use `UsageMetricsResponseDTO$Outbound` instead. */ - export type Outbound = UsageMetricsResponseDTO$Outbound; + /** @deprecated use `UsageMetricsResponseDTO$inboundSchema` instead. */ + export const inboundSchema = UsageMetricsResponseDTO$inboundSchema; + /** @deprecated use `UsageMetricsResponseDTO$outboundSchema` instead. */ + export const outboundSchema = UsageMetricsResponseDTO$outboundSchema; + /** @deprecated use `UsageMetricsResponseDTO$Outbound` instead. */ + export type Outbound = UsageMetricsResponseDTO$Outbound; } diff --git a/src/models/components/usagemetricsvaluedto.ts b/src/models/components/usagemetricsvaluedto.ts index a39c500..a670450 100644 --- a/src/models/components/usagemetricsvaluedto.ts +++ b/src/models/components/usagemetricsvaluedto.ts @@ -2,19 +2,19 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * Column name used for data aggregation */ export const GroupedBy = { - RequestPath: "requestPath", - ResponseCode: "responseCode", - ChainId: "chainId", - ApiKeyId: "apiKeyId", - RequestType: "requestType", - None: "None", + RequestPath: "requestPath", + ResponseCode: "responseCode", + ChainId: "chainId", + ApiKeyId: "apiKeyId", + RequestType: "requestType", + None: "None", } as const; /** * Column name used for data aggregation @@ -27,132 +27,138 @@ export type GroupedBy = ClosedEnum; export type GroupValue = string | number; export type UsageMetricsValueDTO = { - /** - * Column name used for data aggregation - */ - groupedBy: GroupedBy; - /** - * The value of the column used for data aggregation - */ - groupValue?: string | number | undefined; - /** - * The total number of requests - */ - totalRequests: number; - /** - * The number of requests per second - */ - requestsPerSecond: number; - /** - * The success rate percentage - */ - successRatePercent: number; - /** - * The median response time in milliseconds - */ - medianResponseTimeMsecs: number; - /** - * The number of invalid requests - */ - invalidRequests: number; - /** - * The number of API credits used - */ - apiCreditsUsed: number; - /** - * The number of API credits wasted on invalid requests - */ - apiCreditsWasted: number; + /** + * Column name used for data aggregation + */ + groupedBy: GroupedBy; + /** + * The value of the column used for data aggregation + */ + groupValue?: string | number | undefined; + /** + * The total number of requests + */ + totalRequests: number; + /** + * The number of requests per second + */ + requestsPerSecond: number; + /** + * The success rate percentage + */ + successRatePercent: number; + /** + * The median response time in milliseconds + */ + medianResponseTimeMsecs: number; + /** + * The number of invalid requests + */ + invalidRequests: number; + /** + * The number of API credits used + */ + apiCreditsUsed: number; + /** + * The number of API credits wasted on invalid requests + */ + apiCreditsWasted: number; }; /** @internal */ -export const GroupedBy$inboundSchema: z.ZodNativeEnum = z.nativeEnum(GroupedBy); +export const GroupedBy$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(GroupedBy); /** @internal */ -export const GroupedBy$outboundSchema: z.ZodNativeEnum = GroupedBy$inboundSchema; +export const GroupedBy$outboundSchema: z.ZodNativeEnum = + GroupedBy$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GroupedBy$ { - /** @deprecated use `GroupedBy$inboundSchema` instead. */ - export const inboundSchema = GroupedBy$inboundSchema; - /** @deprecated use `GroupedBy$outboundSchema` instead. */ - export const outboundSchema = GroupedBy$outboundSchema; + /** @deprecated use `GroupedBy$inboundSchema` instead. */ + export const inboundSchema = GroupedBy$inboundSchema; + /** @deprecated use `GroupedBy$outboundSchema` instead. */ + export const outboundSchema = GroupedBy$outboundSchema; } /** @internal */ -export const GroupValue$inboundSchema: z.ZodType = z.union([ - z.string(), - z.number(), -]); +export const GroupValue$inboundSchema: z.ZodType< + GroupValue, + z.ZodTypeDef, + unknown +> = z.union([z.string(), z.number()]); /** @internal */ export type GroupValue$Outbound = string | number; /** @internal */ -export const GroupValue$outboundSchema: z.ZodType = - z.union([z.string(), z.number()]); +export const GroupValue$outboundSchema: z.ZodType< + GroupValue$Outbound, + z.ZodTypeDef, + GroupValue +> = z.union([z.string(), z.number()]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GroupValue$ { - /** @deprecated use `GroupValue$inboundSchema` instead. */ - export const inboundSchema = GroupValue$inboundSchema; - /** @deprecated use `GroupValue$outboundSchema` instead. */ - export const outboundSchema = GroupValue$outboundSchema; - /** @deprecated use `GroupValue$Outbound` instead. */ - export type Outbound = GroupValue$Outbound; + /** @deprecated use `GroupValue$inboundSchema` instead. */ + export const inboundSchema = GroupValue$inboundSchema; + /** @deprecated use `GroupValue$outboundSchema` instead. */ + export const outboundSchema = GroupValue$outboundSchema; + /** @deprecated use `GroupValue$Outbound` instead. */ + export type Outbound = GroupValue$Outbound; } /** @internal */ export const UsageMetricsValueDTO$inboundSchema: z.ZodType< - UsageMetricsValueDTO, - z.ZodTypeDef, - unknown + UsageMetricsValueDTO, + z.ZodTypeDef, + unknown > = z.object({ - groupedBy: GroupedBy$inboundSchema, - groupValue: z.union([z.string(), z.number()]).optional(), - totalRequests: z.number(), - requestsPerSecond: z.number(), - successRatePercent: z.number(), - medianResponseTimeMsecs: z.number(), - invalidRequests: z.number(), - apiCreditsUsed: z.number(), - apiCreditsWasted: z.number(), + groupedBy: GroupedBy$inboundSchema, + groupValue: z.union([z.string(), z.number()]).optional(), + totalRequests: z.number(), + requestsPerSecond: z.number(), + successRatePercent: z.number(), + medianResponseTimeMsecs: z.number(), + invalidRequests: z.number(), + apiCreditsUsed: z.number(), + apiCreditsWasted: z.number(), }); /** @internal */ export type UsageMetricsValueDTO$Outbound = { - groupedBy: string; - groupValue?: string | number | undefined; - totalRequests: number; - requestsPerSecond: number; - successRatePercent: number; - medianResponseTimeMsecs: number; - invalidRequests: number; - apiCreditsUsed: number; - apiCreditsWasted: number; + groupedBy: string; + groupValue?: string | number | undefined; + totalRequests: number; + requestsPerSecond: number; + successRatePercent: number; + medianResponseTimeMsecs: number; + invalidRequests: number; + apiCreditsUsed: number; + apiCreditsWasted: number; }; /** @internal */ export const UsageMetricsValueDTO$outboundSchema: z.ZodType< - UsageMetricsValueDTO$Outbound, - z.ZodTypeDef, - UsageMetricsValueDTO + UsageMetricsValueDTO$Outbound, + z.ZodTypeDef, + UsageMetricsValueDTO > = z.object({ - groupedBy: GroupedBy$outboundSchema, - groupValue: z.union([z.string(), z.number()]).optional(), - totalRequests: z.number(), - requestsPerSecond: z.number(), - successRatePercent: z.number(), - medianResponseTimeMsecs: z.number(), - invalidRequests: z.number(), - apiCreditsUsed: z.number(), - apiCreditsWasted: z.number(), + groupedBy: GroupedBy$outboundSchema, + groupValue: z.union([z.string(), z.number()]).optional(), + totalRequests: z.number(), + requestsPerSecond: z.number(), + successRatePercent: z.number(), + medianResponseTimeMsecs: z.number(), + invalidRequests: z.number(), + apiCreditsUsed: z.number(), + apiCreditsWasted: z.number(), }); /** @@ -160,10 +166,10 @@ export const UsageMetricsValueDTO$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UsageMetricsValueDTO$ { - /** @deprecated use `UsageMetricsValueDTO$inboundSchema` instead. */ - export const inboundSchema = UsageMetricsValueDTO$inboundSchema; - /** @deprecated use `UsageMetricsValueDTO$outboundSchema` instead. */ - export const outboundSchema = UsageMetricsValueDTO$outboundSchema; - /** @deprecated use `UsageMetricsValueDTO$Outbound` instead. */ - export type Outbound = UsageMetricsValueDTO$Outbound; + /** @deprecated use `UsageMetricsValueDTO$inboundSchema` instead. */ + export const inboundSchema = UsageMetricsValueDTO$inboundSchema; + /** @deprecated use `UsageMetricsValueDTO$outboundSchema` instead. */ + export const outboundSchema = UsageMetricsValueDTO$outboundSchema; + /** @deprecated use `UsageMetricsValueDTO$Outbound` instead. */ + export type Outbound = UsageMetricsValueDTO$Outbound; } diff --git a/src/models/components/utilityaddresses.ts b/src/models/components/utilityaddresses.ts index 572f872..841f767 100644 --- a/src/models/components/utilityaddresses.ts +++ b/src/models/components/utilityaddresses.ts @@ -5,27 +5,30 @@ import * as z from "zod"; export type UtilityAddresses = { - multicall?: string | undefined; + multicall?: string | undefined; }; /** @internal */ -export const UtilityAddresses$inboundSchema: z.ZodType = - z.object({ - multicall: z.string().optional(), - }); +export const UtilityAddresses$inboundSchema: z.ZodType< + UtilityAddresses, + z.ZodTypeDef, + unknown +> = z.object({ + multicall: z.string().optional(), +}); /** @internal */ export type UtilityAddresses$Outbound = { - multicall?: string | undefined; + multicall?: string | undefined; }; /** @internal */ export const UtilityAddresses$outboundSchema: z.ZodType< - UtilityAddresses$Outbound, - z.ZodTypeDef, - UtilityAddresses + UtilityAddresses$Outbound, + z.ZodTypeDef, + UtilityAddresses > = z.object({ - multicall: z.string().optional(), + multicall: z.string().optional(), }); /** @@ -33,10 +36,10 @@ export const UtilityAddresses$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UtilityAddresses$ { - /** @deprecated use `UtilityAddresses$inboundSchema` instead. */ - export const inboundSchema = UtilityAddresses$inboundSchema; - /** @deprecated use `UtilityAddresses$outboundSchema` instead. */ - export const outboundSchema = UtilityAddresses$outboundSchema; - /** @deprecated use `UtilityAddresses$Outbound` instead. */ - export type Outbound = UtilityAddresses$Outbound; + /** @deprecated use `UtilityAddresses$inboundSchema` instead. */ + export const inboundSchema = UtilityAddresses$inboundSchema; + /** @deprecated use `UtilityAddresses$outboundSchema` instead. */ + export const outboundSchema = UtilityAddresses$outboundSchema; + /** @deprecated use `UtilityAddresses$Outbound` instead. */ + export type Outbound = UtilityAddresses$Outbound; } diff --git a/src/models/components/utxo.ts b/src/models/components/utxo.ts index 9b854fc..ec81ac2 100644 --- a/src/models/components/utxo.ts +++ b/src/models/components/utxo.ts @@ -2,86 +2,87 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - AssetAmount, - AssetAmount$inboundSchema, - AssetAmount$Outbound, - AssetAmount$outboundSchema, + AssetAmount, + AssetAmount$inboundSchema, + AssetAmount$Outbound, + AssetAmount$outboundSchema, } from "./assetamount.js"; import { - UtxoCredential, - UtxoCredential$inboundSchema, - UtxoCredential$Outbound, - UtxoCredential$outboundSchema, + UtxoCredential, + UtxoCredential$inboundSchema, + UtxoCredential$Outbound, + UtxoCredential$outboundSchema, } from "./utxocredential.js"; -import * as z from "zod"; export type Utxo = { - /** - * Addresses that are eligible to sign the consumption of this output. - */ - addresses: Array; - asset: AssetAmount; - /** - * Blockchain ID on which this output is consumed on. - */ - consumedOnChainId: string; - /** - * Transaction ID that consumed this output. - */ - consumingTxHash?: string | undefined; - /** - * Blockchain ID on which this output is created on. - */ - createdOnChainId: string; - /** - * UTXO ID for this output. - */ - utxoId: string; - /** - * Unix timestamp in seconds at which this output was consumed. - */ - consumingTxTimestamp?: number | undefined; - /** - * Transaction ID that created this output. - */ - creationTxHash: string; - /** - * Credentials that signed the transaction to consume this utxo - */ - credentials?: Array | undefined; - /** - * Index representing the minting set for the NFT mint output. - */ - groupId?: number | undefined; - /** - * Locktime in seconds after which this output can be consumed. - */ - locktime: number; - /** - * Postion of this output in a list of lexiographically sorted outputs of a transaction. - */ - outputIndex: string; - /** - * Hex encoded data for NFT assets. - */ - payload?: string | undefined; - /** - * Minimum number of signatures required to consume this output. - */ - threshold: number; - /** - * Unix timestamp in seconds at which this outptut was created. - */ - timestamp: number; - /** - * Type of output. - */ - utxoType: string; + /** + * Addresses that are eligible to sign the consumption of this output. + */ + addresses: Array; + asset: AssetAmount; + /** + * Blockchain ID on which this output is consumed on. + */ + consumedOnChainId: string; + /** + * Transaction ID that consumed this output. + */ + consumingTxHash?: string | undefined; + /** + * Blockchain ID on which this output is created on. + */ + createdOnChainId: string; + /** + * UTXO ID for this output. + */ + utxoId: string; + /** + * Unix timestamp in seconds at which this output was consumed. + */ + consumingTxTimestamp?: number | undefined; + /** + * Transaction ID that created this output. + */ + creationTxHash: string; + /** + * Credentials that signed the transaction to consume this utxo + */ + credentials?: Array | undefined; + /** + * Index representing the minting set for the NFT mint output. + */ + groupId?: number | undefined; + /** + * Locktime in seconds after which this output can be consumed. + */ + locktime: number; + /** + * Postion of this output in a list of lexiographically sorted outputs of a transaction. + */ + outputIndex: string; + /** + * Hex encoded data for NFT assets. + */ + payload?: string | undefined; + /** + * Minimum number of signatures required to consume this output. + */ + threshold: number; + /** + * Unix timestamp in seconds at which this outptut was created. + */ + timestamp: number; + /** + * Type of output. + */ + utxoType: string; }; /** @internal */ -export const Utxo$inboundSchema: z.ZodType = z.object({ +export const Utxo$inboundSchema: z.ZodType = z + .object({ addresses: z.array(z.string()), asset: AssetAmount$inboundSchema, consumedOnChainId: z.string(), @@ -98,30 +99,31 @@ export const Utxo$inboundSchema: z.ZodType = z.obje threshold: z.number(), timestamp: z.number(), utxoType: z.string(), -}); + }); /** @internal */ export type Utxo$Outbound = { - addresses: Array; - asset: AssetAmount$Outbound; - consumedOnChainId: string; - consumingTxHash?: string | undefined; - createdOnChainId: string; - utxoId: string; - consumingTxTimestamp?: number | undefined; - creationTxHash: string; - credentials?: Array | undefined; - groupId?: number | undefined; - locktime: number; - outputIndex: string; - payload?: string | undefined; - threshold: number; - timestamp: number; - utxoType: string; + addresses: Array; + asset: AssetAmount$Outbound; + consumedOnChainId: string; + consumingTxHash?: string | undefined; + createdOnChainId: string; + utxoId: string; + consumingTxTimestamp?: number | undefined; + creationTxHash: string; + credentials?: Array | undefined; + groupId?: number | undefined; + locktime: number; + outputIndex: string; + payload?: string | undefined; + threshold: number; + timestamp: number; + utxoType: string; }; /** @internal */ -export const Utxo$outboundSchema: z.ZodType = z.object({ +export const Utxo$outboundSchema: z.ZodType = + z.object({ addresses: z.array(z.string()), asset: AssetAmount$outboundSchema, consumedOnChainId: z.string(), @@ -138,17 +140,17 @@ export const Utxo$outboundSchema: z.ZodType = threshold: z.number(), timestamp: z.number(), utxoType: z.string(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Utxo$ { - /** @deprecated use `Utxo$inboundSchema` instead. */ - export const inboundSchema = Utxo$inboundSchema; - /** @deprecated use `Utxo$outboundSchema` instead. */ - export const outboundSchema = Utxo$outboundSchema; - /** @deprecated use `Utxo$Outbound` instead. */ - export type Outbound = Utxo$Outbound; + /** @deprecated use `Utxo$inboundSchema` instead. */ + export const inboundSchema = Utxo$inboundSchema; + /** @deprecated use `Utxo$outboundSchema` instead. */ + export const outboundSchema = Utxo$outboundSchema; + /** @deprecated use `Utxo$Outbound` instead. */ + export type Outbound = Utxo$Outbound; } diff --git a/src/models/components/utxocredential.ts b/src/models/components/utxocredential.ts index 551f13f..37f9178 100644 --- a/src/models/components/utxocredential.ts +++ b/src/models/components/utxocredential.ts @@ -5,37 +5,40 @@ import * as z from "zod"; export type UtxoCredential = { - /** - * Signature provided to consume the output. - */ - signature?: string | undefined; - /** - * Public key associated with the signature. - */ - publicKey?: string | undefined; + /** + * Signature provided to consume the output. + */ + signature?: string | undefined; + /** + * Public key associated with the signature. + */ + publicKey?: string | undefined; }; /** @internal */ -export const UtxoCredential$inboundSchema: z.ZodType = - z.object({ - signature: z.string().optional(), - publicKey: z.string().optional(), - }); +export const UtxoCredential$inboundSchema: z.ZodType< + UtxoCredential, + z.ZodTypeDef, + unknown +> = z.object({ + signature: z.string().optional(), + publicKey: z.string().optional(), +}); /** @internal */ export type UtxoCredential$Outbound = { - signature?: string | undefined; - publicKey?: string | undefined; + signature?: string | undefined; + publicKey?: string | undefined; }; /** @internal */ export const UtxoCredential$outboundSchema: z.ZodType< - UtxoCredential$Outbound, - z.ZodTypeDef, - UtxoCredential + UtxoCredential$Outbound, + z.ZodTypeDef, + UtxoCredential > = z.object({ - signature: z.string().optional(), - publicKey: z.string().optional(), + signature: z.string().optional(), + publicKey: z.string().optional(), }); /** @@ -43,10 +46,10 @@ export const UtxoCredential$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UtxoCredential$ { - /** @deprecated use `UtxoCredential$inboundSchema` instead. */ - export const inboundSchema = UtxoCredential$inboundSchema; - /** @deprecated use `UtxoCredential$outboundSchema` instead. */ - export const outboundSchema = UtxoCredential$outboundSchema; - /** @deprecated use `UtxoCredential$Outbound` instead. */ - export type Outbound = UtxoCredential$Outbound; + /** @deprecated use `UtxoCredential$inboundSchema` instead. */ + export const inboundSchema = UtxoCredential$inboundSchema; + /** @deprecated use `UtxoCredential$outboundSchema` instead. */ + export const outboundSchema = UtxoCredential$outboundSchema; + /** @deprecated use `UtxoCredential$Outbound` instead. */ + export type Outbound = UtxoCredential$Outbound; } diff --git a/src/models/components/utxotype.ts b/src/models/components/utxotype.ts index fc4766d..2ad315c 100644 --- a/src/models/components/utxotype.ts +++ b/src/models/components/utxotype.ts @@ -2,28 +2,30 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const UtxoType = { - Stake: "STAKE", - Transfer: "TRANSFER", + Stake: "STAKE", + Transfer: "TRANSFER", } as const; export type UtxoType = ClosedEnum; /** @internal */ -export const UtxoType$inboundSchema: z.ZodNativeEnum = z.nativeEnum(UtxoType); +export const UtxoType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(UtxoType); /** @internal */ -export const UtxoType$outboundSchema: z.ZodNativeEnum = UtxoType$inboundSchema; +export const UtxoType$outboundSchema: z.ZodNativeEnum = + UtxoType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UtxoType$ { - /** @deprecated use `UtxoType$inboundSchema` instead. */ - export const inboundSchema = UtxoType$inboundSchema; - /** @deprecated use `UtxoType$outboundSchema` instead. */ - export const outboundSchema = UtxoType$outboundSchema; + /** @deprecated use `UtxoType$inboundSchema` instead. */ + export const inboundSchema = UtxoType$inboundSchema; + /** @deprecated use `UtxoType$outboundSchema` instead. */ + export const outboundSchema = UtxoType$outboundSchema; } diff --git a/src/models/components/validationstatustype.ts b/src/models/components/validationstatustype.ts index ca14205..39ffb4f 100644 --- a/src/models/components/validationstatustype.ts +++ b/src/models/components/validationstatustype.ts @@ -2,32 +2,34 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const ValidationStatusType = { - Completed: "completed", - Active: "active", - Pending: "pending", - Removed: "removed", + Completed: "completed", + Active: "active", + Pending: "pending", + Removed: "removed", } as const; export type ValidationStatusType = ClosedEnum; /** @internal */ -export const ValidationStatusType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(ValidationStatusType); +export const ValidationStatusType$inboundSchema: z.ZodNativeEnum< + typeof ValidationStatusType +> = z.nativeEnum(ValidationStatusType); /** @internal */ -export const ValidationStatusType$outboundSchema: z.ZodNativeEnum = - ValidationStatusType$inboundSchema; +export const ValidationStatusType$outboundSchema: z.ZodNativeEnum< + typeof ValidationStatusType +> = ValidationStatusType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ValidationStatusType$ { - /** @deprecated use `ValidationStatusType$inboundSchema` instead. */ - export const inboundSchema = ValidationStatusType$inboundSchema; - /** @deprecated use `ValidationStatusType$outboundSchema` instead. */ - export const outboundSchema = ValidationStatusType$outboundSchema; + /** @deprecated use `ValidationStatusType$inboundSchema` instead. */ + export const inboundSchema = ValidationStatusType$inboundSchema; + /** @deprecated use `ValidationStatusType$outboundSchema` instead. */ + export const outboundSchema = ValidationStatusType$outboundSchema; } diff --git a/src/models/components/validatorhealthdetails.ts b/src/models/components/validatorhealthdetails.ts index ad4cb64..a0b292f 100644 --- a/src/models/components/validatorhealthdetails.ts +++ b/src/models/components/validatorhealthdetails.ts @@ -5,54 +5,54 @@ import * as z from "zod"; export type ValidatorHealthDetails = { - /** - * Percent of requests responded to in last polling. - */ - reachabilityPercent: number; - /** - * Percent of requests benched on the P-Chain in last polling. - */ - benchedPChainRequestsPercent: number; - /** - * Percentage of requests benched on the X-Chain in last polling. - */ - benchedXChainRequestsPercent: number; - /** - * Percentage of requests benched on the C-Chain in last polling. - */ - benchedCChainRequestsPercent: number; + /** + * Percent of requests responded to in last polling. + */ + reachabilityPercent: number; + /** + * Percent of requests benched on the P-Chain in last polling. + */ + benchedPChainRequestsPercent: number; + /** + * Percentage of requests benched on the X-Chain in last polling. + */ + benchedXChainRequestsPercent: number; + /** + * Percentage of requests benched on the C-Chain in last polling. + */ + benchedCChainRequestsPercent: number; }; /** @internal */ export const ValidatorHealthDetails$inboundSchema: z.ZodType< - ValidatorHealthDetails, - z.ZodTypeDef, - unknown + ValidatorHealthDetails, + z.ZodTypeDef, + unknown > = z.object({ - reachabilityPercent: z.number(), - benchedPChainRequestsPercent: z.number(), - benchedXChainRequestsPercent: z.number(), - benchedCChainRequestsPercent: z.number(), + reachabilityPercent: z.number(), + benchedPChainRequestsPercent: z.number(), + benchedXChainRequestsPercent: z.number(), + benchedCChainRequestsPercent: z.number(), }); /** @internal */ export type ValidatorHealthDetails$Outbound = { - reachabilityPercent: number; - benchedPChainRequestsPercent: number; - benchedXChainRequestsPercent: number; - benchedCChainRequestsPercent: number; + reachabilityPercent: number; + benchedPChainRequestsPercent: number; + benchedXChainRequestsPercent: number; + benchedCChainRequestsPercent: number; }; /** @internal */ export const ValidatorHealthDetails$outboundSchema: z.ZodType< - ValidatorHealthDetails$Outbound, - z.ZodTypeDef, - ValidatorHealthDetails + ValidatorHealthDetails$Outbound, + z.ZodTypeDef, + ValidatorHealthDetails > = z.object({ - reachabilityPercent: z.number(), - benchedPChainRequestsPercent: z.number(), - benchedXChainRequestsPercent: z.number(), - benchedCChainRequestsPercent: z.number(), + reachabilityPercent: z.number(), + benchedPChainRequestsPercent: z.number(), + benchedXChainRequestsPercent: z.number(), + benchedCChainRequestsPercent: z.number(), }); /** @@ -60,10 +60,10 @@ export const ValidatorHealthDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ValidatorHealthDetails$ { - /** @deprecated use `ValidatorHealthDetails$inboundSchema` instead. */ - export const inboundSchema = ValidatorHealthDetails$inboundSchema; - /** @deprecated use `ValidatorHealthDetails$outboundSchema` instead. */ - export const outboundSchema = ValidatorHealthDetails$outboundSchema; - /** @deprecated use `ValidatorHealthDetails$Outbound` instead. */ - export type Outbound = ValidatorHealthDetails$Outbound; + /** @deprecated use `ValidatorHealthDetails$inboundSchema` instead. */ + export const inboundSchema = ValidatorHealthDetails$inboundSchema; + /** @deprecated use `ValidatorHealthDetails$outboundSchema` instead. */ + export const outboundSchema = ValidatorHealthDetails$outboundSchema; + /** @deprecated use `ValidatorHealthDetails$Outbound` instead. */ + export type Outbound = ValidatorHealthDetails$Outbound; } diff --git a/src/models/components/validatorsdetails.ts b/src/models/components/validatorsdetails.ts index cc2a21f..d2f6484 100644 --- a/src/models/components/validatorsdetails.ts +++ b/src/models/components/validatorsdetails.ts @@ -2,52 +2,55 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - StakingDistribution, - StakingDistribution$inboundSchema, - StakingDistribution$Outbound, - StakingDistribution$outboundSchema, + StakingDistribution, + StakingDistribution$inboundSchema, + StakingDistribution$Outbound, + StakingDistribution$outboundSchema, } from "./stakingdistribution.js"; -import * as z from "zod"; export type ValidatorsDetails = { - validatorCount: number; - totalAmountStaked: string; - estimatedAnnualStakingReward: string; - stakingDistributionByVersion: Array; - stakingRatio: string; + validatorCount: number; + totalAmountStaked: string; + estimatedAnnualStakingReward: string; + stakingDistributionByVersion: Array; + stakingRatio: string; }; /** @internal */ -export const ValidatorsDetails$inboundSchema: z.ZodType = - z.object({ - validatorCount: z.number(), - totalAmountStaked: z.string(), - estimatedAnnualStakingReward: z.string(), - stakingDistributionByVersion: z.array(StakingDistribution$inboundSchema), - stakingRatio: z.string(), - }); +export const ValidatorsDetails$inboundSchema: z.ZodType< + ValidatorsDetails, + z.ZodTypeDef, + unknown +> = z.object({ + validatorCount: z.number(), + totalAmountStaked: z.string(), + estimatedAnnualStakingReward: z.string(), + stakingDistributionByVersion: z.array(StakingDistribution$inboundSchema), + stakingRatio: z.string(), +}); /** @internal */ export type ValidatorsDetails$Outbound = { - validatorCount: number; - totalAmountStaked: string; - estimatedAnnualStakingReward: string; - stakingDistributionByVersion: Array; - stakingRatio: string; + validatorCount: number; + totalAmountStaked: string; + estimatedAnnualStakingReward: string; + stakingDistributionByVersion: Array; + stakingRatio: string; }; /** @internal */ export const ValidatorsDetails$outboundSchema: z.ZodType< - ValidatorsDetails$Outbound, - z.ZodTypeDef, - ValidatorsDetails + ValidatorsDetails$Outbound, + z.ZodTypeDef, + ValidatorsDetails > = z.object({ - validatorCount: z.number(), - totalAmountStaked: z.string(), - estimatedAnnualStakingReward: z.string(), - stakingDistributionByVersion: z.array(StakingDistribution$outboundSchema), - stakingRatio: z.string(), + validatorCount: z.number(), + totalAmountStaked: z.string(), + estimatedAnnualStakingReward: z.string(), + stakingDistributionByVersion: z.array(StakingDistribution$outboundSchema), + stakingRatio: z.string(), }); /** @@ -55,10 +58,10 @@ export const ValidatorsDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ValidatorsDetails$ { - /** @deprecated use `ValidatorsDetails$inboundSchema` instead. */ - export const inboundSchema = ValidatorsDetails$inboundSchema; - /** @deprecated use `ValidatorsDetails$outboundSchema` instead. */ - export const outboundSchema = ValidatorsDetails$outboundSchema; - /** @deprecated use `ValidatorsDetails$Outbound` instead. */ - export type Outbound = ValidatorsDetails$Outbound; + /** @deprecated use `ValidatorsDetails$inboundSchema` instead. */ + export const inboundSchema = ValidatorsDetails$inboundSchema; + /** @deprecated use `ValidatorsDetails$outboundSchema` instead. */ + export const outboundSchema = ValidatorsDetails$outboundSchema; + /** @deprecated use `ValidatorsDetails$Outbound` instead. */ + export type Outbound = ValidatorsDetails$Outbound; } diff --git a/src/models/components/vmname.ts b/src/models/components/vmname.ts index 5e0019e..0cfce6c 100644 --- a/src/models/components/vmname.ts +++ b/src/models/components/vmname.ts @@ -2,29 +2,31 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const VmName = { - Evm: "EVM", - Bitcoin: "BITCOIN", - Ethereum: "ETHEREUM", + Evm: "EVM", + Bitcoin: "BITCOIN", + Ethereum: "ETHEREUM", } as const; export type VmName = ClosedEnum; /** @internal */ -export const VmName$inboundSchema: z.ZodNativeEnum = z.nativeEnum(VmName); +export const VmName$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(VmName); /** @internal */ -export const VmName$outboundSchema: z.ZodNativeEnum = VmName$inboundSchema; +export const VmName$outboundSchema: z.ZodNativeEnum = + VmName$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace VmName$ { - /** @deprecated use `VmName$inboundSchema` instead. */ - export const inboundSchema = VmName$inboundSchema; - /** @deprecated use `VmName$outboundSchema` instead. */ - export const outboundSchema = VmName$outboundSchema; + /** @deprecated use `VmName$inboundSchema` instead. */ + export const inboundSchema = VmName$inboundSchema; + /** @deprecated use `VmName$outboundSchema` instead. */ + export const outboundSchema = VmName$outboundSchema; } diff --git a/src/models/components/webhookresponse.ts b/src/models/components/webhookresponse.ts index 099381e..ee13f6a 100644 --- a/src/models/components/webhookresponse.ts +++ b/src/models/components/webhookresponse.ts @@ -2,47 +2,51 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - AddressActivityMetadata, - AddressActivityMetadata$inboundSchema, - AddressActivityMetadata$Outbound, - AddressActivityMetadata$outboundSchema, + AddressActivityMetadata, + AddressActivityMetadata$inboundSchema, + AddressActivityMetadata$Outbound, + AddressActivityMetadata$outboundSchema, } from "./addressactivitymetadata.js"; -import { EventType, EventType$inboundSchema, EventType$outboundSchema } from "./eventtype.js"; import { - WebhookStatusType, - WebhookStatusType$inboundSchema, - WebhookStatusType$outboundSchema, + EventType, + EventType$inboundSchema, + EventType$outboundSchema, +} from "./eventtype.js"; +import { + WebhookStatusType, + WebhookStatusType$inboundSchema, + WebhookStatusType$outboundSchema, } from "./webhookstatustype.js"; -import * as z from "zod"; export type WebhookResponseMetadata = AddressActivityMetadata; export type WebhookResponse = { - id: string; - eventType: EventType; - metadata: AddressActivityMetadata; - /** - * Whether to include traces in the webhook payload. - */ - includeInternalTxs?: boolean | undefined; - /** - * Whether to include logs in the webhook payload. - */ - includeLogs?: boolean | undefined; - url: string; - chainId: string; - status: WebhookStatusType; - createdAt: number; - name: string; - description: string; + id: string; + eventType: EventType; + metadata: AddressActivityMetadata; + /** + * Whether to include traces in the webhook payload. + */ + includeInternalTxs?: boolean | undefined; + /** + * Whether to include logs in the webhook payload. + */ + includeLogs?: boolean | undefined; + url: string; + chainId: string; + status: WebhookStatusType; + createdAt: number; + name: string; + description: string; }; /** @internal */ export const WebhookResponseMetadata$inboundSchema: z.ZodType< - WebhookResponseMetadata, - z.ZodTypeDef, - unknown + WebhookResponseMetadata, + z.ZodTypeDef, + unknown > = AddressActivityMetadata$inboundSchema; /** @internal */ @@ -50,9 +54,9 @@ export type WebhookResponseMetadata$Outbound = AddressActivityMetadata$Outbound; /** @internal */ export const WebhookResponseMetadata$outboundSchema: z.ZodType< - WebhookResponseMetadata$Outbound, - z.ZodTypeDef, - WebhookResponseMetadata + WebhookResponseMetadata$Outbound, + z.ZodTypeDef, + WebhookResponseMetadata > = AddressActivityMetadata$outboundSchema; /** @@ -60,62 +64,65 @@ export const WebhookResponseMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace WebhookResponseMetadata$ { - /** @deprecated use `WebhookResponseMetadata$inboundSchema` instead. */ - export const inboundSchema = WebhookResponseMetadata$inboundSchema; - /** @deprecated use `WebhookResponseMetadata$outboundSchema` instead. */ - export const outboundSchema = WebhookResponseMetadata$outboundSchema; - /** @deprecated use `WebhookResponseMetadata$Outbound` instead. */ - export type Outbound = WebhookResponseMetadata$Outbound; + /** @deprecated use `WebhookResponseMetadata$inboundSchema` instead. */ + export const inboundSchema = WebhookResponseMetadata$inboundSchema; + /** @deprecated use `WebhookResponseMetadata$outboundSchema` instead. */ + export const outboundSchema = WebhookResponseMetadata$outboundSchema; + /** @deprecated use `WebhookResponseMetadata$Outbound` instead. */ + export type Outbound = WebhookResponseMetadata$Outbound; } /** @internal */ -export const WebhookResponse$inboundSchema: z.ZodType = - z.object({ - id: z.string(), - eventType: EventType$inboundSchema, - metadata: AddressActivityMetadata$inboundSchema, - includeInternalTxs: z.boolean().optional(), - includeLogs: z.boolean().optional(), - url: z.string(), - chainId: z.string(), - status: WebhookStatusType$inboundSchema, - createdAt: z.number(), - name: z.string(), - description: z.string(), - }); +export const WebhookResponse$inboundSchema: z.ZodType< + WebhookResponse, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + eventType: EventType$inboundSchema, + metadata: AddressActivityMetadata$inboundSchema, + includeInternalTxs: z.boolean().optional(), + includeLogs: z.boolean().optional(), + url: z.string(), + chainId: z.string(), + status: WebhookStatusType$inboundSchema, + createdAt: z.number(), + name: z.string(), + description: z.string(), +}); /** @internal */ export type WebhookResponse$Outbound = { - id: string; - eventType: string; - metadata: AddressActivityMetadata$Outbound; - includeInternalTxs?: boolean | undefined; - includeLogs?: boolean | undefined; - url: string; - chainId: string; - status: string; - createdAt: number; - name: string; - description: string; + id: string; + eventType: string; + metadata: AddressActivityMetadata$Outbound; + includeInternalTxs?: boolean | undefined; + includeLogs?: boolean | undefined; + url: string; + chainId: string; + status: string; + createdAt: number; + name: string; + description: string; }; /** @internal */ export const WebhookResponse$outboundSchema: z.ZodType< - WebhookResponse$Outbound, - z.ZodTypeDef, - WebhookResponse + WebhookResponse$Outbound, + z.ZodTypeDef, + WebhookResponse > = z.object({ - id: z.string(), - eventType: EventType$outboundSchema, - metadata: AddressActivityMetadata$outboundSchema, - includeInternalTxs: z.boolean().optional(), - includeLogs: z.boolean().optional(), - url: z.string(), - chainId: z.string(), - status: WebhookStatusType$outboundSchema, - createdAt: z.number(), - name: z.string(), - description: z.string(), + id: z.string(), + eventType: EventType$outboundSchema, + metadata: AddressActivityMetadata$outboundSchema, + includeInternalTxs: z.boolean().optional(), + includeLogs: z.boolean().optional(), + url: z.string(), + chainId: z.string(), + status: WebhookStatusType$outboundSchema, + createdAt: z.number(), + name: z.string(), + description: z.string(), }); /** @@ -123,10 +130,10 @@ export const WebhookResponse$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace WebhookResponse$ { - /** @deprecated use `WebhookResponse$inboundSchema` instead. */ - export const inboundSchema = WebhookResponse$inboundSchema; - /** @deprecated use `WebhookResponse$outboundSchema` instead. */ - export const outboundSchema = WebhookResponse$outboundSchema; - /** @deprecated use `WebhookResponse$Outbound` instead. */ - export type Outbound = WebhookResponse$Outbound; + /** @deprecated use `WebhookResponse$inboundSchema` instead. */ + export const inboundSchema = WebhookResponse$inboundSchema; + /** @deprecated use `WebhookResponse$outboundSchema` instead. */ + export const outboundSchema = WebhookResponse$outboundSchema; + /** @deprecated use `WebhookResponse$Outbound` instead. */ + export type Outbound = WebhookResponse$Outbound; } diff --git a/src/models/components/webhookstatus.ts b/src/models/components/webhookstatus.ts index c3b1871..d37f999 100644 --- a/src/models/components/webhookstatus.ts +++ b/src/models/components/webhookstatus.ts @@ -2,30 +2,32 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const WebhookStatus = { - Active: "active", - Inactive: "inactive", + Active: "active", + Inactive: "inactive", } as const; export type WebhookStatus = ClosedEnum; /** @internal */ -export const WebhookStatus$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(WebhookStatus); +export const WebhookStatus$inboundSchema: z.ZodNativeEnum< + typeof WebhookStatus +> = z.nativeEnum(WebhookStatus); /** @internal */ -export const WebhookStatus$outboundSchema: z.ZodNativeEnum = - WebhookStatus$inboundSchema; +export const WebhookStatus$outboundSchema: z.ZodNativeEnum< + typeof WebhookStatus +> = WebhookStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace WebhookStatus$ { - /** @deprecated use `WebhookStatus$inboundSchema` instead. */ - export const inboundSchema = WebhookStatus$inboundSchema; - /** @deprecated use `WebhookStatus$outboundSchema` instead. */ - export const outboundSchema = WebhookStatus$outboundSchema; + /** @deprecated use `WebhookStatus$inboundSchema` instead. */ + export const inboundSchema = WebhookStatus$inboundSchema; + /** @deprecated use `WebhookStatus$outboundSchema` instead. */ + export const outboundSchema = WebhookStatus$outboundSchema; } diff --git a/src/models/components/webhookstatustype.ts b/src/models/components/webhookstatustype.ts index 882d641..bcfe2c1 100644 --- a/src/models/components/webhookstatustype.ts +++ b/src/models/components/webhookstatustype.ts @@ -2,30 +2,32 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const WebhookStatusType = { - Active: "active", - Inactive: "inactive", + Active: "active", + Inactive: "inactive", } as const; export type WebhookStatusType = ClosedEnum; /** @internal */ -export const WebhookStatusType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(WebhookStatusType); +export const WebhookStatusType$inboundSchema: z.ZodNativeEnum< + typeof WebhookStatusType +> = z.nativeEnum(WebhookStatusType); /** @internal */ -export const WebhookStatusType$outboundSchema: z.ZodNativeEnum = - WebhookStatusType$inboundSchema; +export const WebhookStatusType$outboundSchema: z.ZodNativeEnum< + typeof WebhookStatusType +> = WebhookStatusType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace WebhookStatusType$ { - /** @deprecated use `WebhookStatusType$inboundSchema` instead. */ - export const inboundSchema = WebhookStatusType$inboundSchema; - /** @deprecated use `WebhookStatusType$outboundSchema` instead. */ - export const outboundSchema = WebhookStatusType$outboundSchema; + /** @deprecated use `WebhookStatusType$inboundSchema` instead. */ + export const inboundSchema = WebhookStatusType$inboundSchema; + /** @deprecated use `WebhookStatusType$outboundSchema` instead. */ + export const outboundSchema = WebhookStatusType$outboundSchema; } diff --git a/src/models/components/xchainassetdetails.ts b/src/models/components/xchainassetdetails.ts index c349900..ab16def 100644 --- a/src/models/components/xchainassetdetails.ts +++ b/src/models/components/xchainassetdetails.ts @@ -2,88 +2,88 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PrimaryNetworkAssetCap, - PrimaryNetworkAssetCap$inboundSchema, - PrimaryNetworkAssetCap$outboundSchema, + PrimaryNetworkAssetCap, + PrimaryNetworkAssetCap$inboundSchema, + PrimaryNetworkAssetCap$outboundSchema, } from "./primarynetworkassetcap.js"; import { - PrimaryNetworkAssetType, - PrimaryNetworkAssetType$inboundSchema, - PrimaryNetworkAssetType$outboundSchema, + PrimaryNetworkAssetType, + PrimaryNetworkAssetType$inboundSchema, + PrimaryNetworkAssetType$outboundSchema, } from "./primarynetworkassettype.js"; -import * as z from "zod"; export type XChainAssetDetails = { - /** - * Unique ID for an asset. - */ - assetId: string; - /** - * Name of this asset. - */ - name: string; - /** - * Symbol for this asset (max 4 characters). - */ - symbol: string; - /** - * Denomination of this asset to represent fungibility. - */ - denomination: number; - /** - * Type of asset like SECP256K1 or NFT. - */ - type: PrimaryNetworkAssetType; - /** - * Timestamp in seconds this asset was created on. - */ - createdAtTimestamp: number; - /** - * Cap represents if an asset is a variable or fixed cap asset. - */ - cap: PrimaryNetworkAssetCap; + /** + * Unique ID for an asset. + */ + assetId: string; + /** + * Name of this asset. + */ + name: string; + /** + * Symbol for this asset (max 4 characters). + */ + symbol: string; + /** + * Denomination of this asset to represent fungibility. + */ + denomination: number; + /** + * Type of asset like SECP256K1 or NFT. + */ + type: PrimaryNetworkAssetType; + /** + * Timestamp in seconds this asset was created on. + */ + createdAtTimestamp: number; + /** + * Cap represents if an asset is a variable or fixed cap asset. + */ + cap: PrimaryNetworkAssetCap; }; /** @internal */ export const XChainAssetDetails$inboundSchema: z.ZodType< - XChainAssetDetails, - z.ZodTypeDef, - unknown + XChainAssetDetails, + z.ZodTypeDef, + unknown > = z.object({ - assetId: z.string(), - name: z.string(), - symbol: z.string(), - denomination: z.number(), - type: PrimaryNetworkAssetType$inboundSchema, - createdAtTimestamp: z.number(), - cap: PrimaryNetworkAssetCap$inboundSchema, + assetId: z.string(), + name: z.string(), + symbol: z.string(), + denomination: z.number(), + type: PrimaryNetworkAssetType$inboundSchema, + createdAtTimestamp: z.number(), + cap: PrimaryNetworkAssetCap$inboundSchema, }); /** @internal */ export type XChainAssetDetails$Outbound = { - assetId: string; - name: string; - symbol: string; - denomination: number; - type: string; - createdAtTimestamp: number; - cap: string; + assetId: string; + name: string; + symbol: string; + denomination: number; + type: string; + createdAtTimestamp: number; + cap: string; }; /** @internal */ export const XChainAssetDetails$outboundSchema: z.ZodType< - XChainAssetDetails$Outbound, - z.ZodTypeDef, - XChainAssetDetails + XChainAssetDetails$Outbound, + z.ZodTypeDef, + XChainAssetDetails > = z.object({ - assetId: z.string(), - name: z.string(), - symbol: z.string(), - denomination: z.number(), - type: PrimaryNetworkAssetType$outboundSchema, - createdAtTimestamp: z.number(), - cap: PrimaryNetworkAssetCap$outboundSchema, + assetId: z.string(), + name: z.string(), + symbol: z.string(), + denomination: z.number(), + type: PrimaryNetworkAssetType$outboundSchema, + createdAtTimestamp: z.number(), + cap: PrimaryNetworkAssetCap$outboundSchema, }); /** @@ -91,10 +91,10 @@ export const XChainAssetDetails$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace XChainAssetDetails$ { - /** @deprecated use `XChainAssetDetails$inboundSchema` instead. */ - export const inboundSchema = XChainAssetDetails$inboundSchema; - /** @deprecated use `XChainAssetDetails$outboundSchema` instead. */ - export const outboundSchema = XChainAssetDetails$outboundSchema; - /** @deprecated use `XChainAssetDetails$Outbound` instead. */ - export type Outbound = XChainAssetDetails$Outbound; + /** @deprecated use `XChainAssetDetails$inboundSchema` instead. */ + export const inboundSchema = XChainAssetDetails$inboundSchema; + /** @deprecated use `XChainAssetDetails$outboundSchema` instead. */ + export const outboundSchema = XChainAssetDetails$outboundSchema; + /** @deprecated use `XChainAssetDetails$Outbound` instead. */ + export type Outbound = XChainAssetDetails$Outbound; } diff --git a/src/models/components/xchainbalances.ts b/src/models/components/xchainbalances.ts index ba4b9df..b128ce4 100644 --- a/src/models/components/xchainbalances.ts +++ b/src/models/components/xchainbalances.ts @@ -2,60 +2,63 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - AggregatedAssetAmount, - AggregatedAssetAmount$inboundSchema, - AggregatedAssetAmount$Outbound, - AggregatedAssetAmount$outboundSchema, + AggregatedAssetAmount, + AggregatedAssetAmount$inboundSchema, + AggregatedAssetAmount$Outbound, + AggregatedAssetAmount$outboundSchema, } from "./aggregatedassetamount.js"; import { - XChainSharedAssetBalance, - XChainSharedAssetBalance$inboundSchema, - XChainSharedAssetBalance$Outbound, - XChainSharedAssetBalance$outboundSchema, + XChainSharedAssetBalance, + XChainSharedAssetBalance$inboundSchema, + XChainSharedAssetBalance$Outbound, + XChainSharedAssetBalance$outboundSchema, } from "./xchainsharedassetbalance.js"; -import * as z from "zod"; export type XChainBalances = { - /** - * A list of objects containing X-chain Asset balance information. - */ - locked: Array; - /** - * A list of objects containing X-chain Asset balance information. - */ - unlocked: Array; - atomicMemoryUnlocked: Array; - atomicMemoryLocked: Array; + /** + * A list of objects containing X-chain Asset balance information. + */ + locked: Array; + /** + * A list of objects containing X-chain Asset balance information. + */ + unlocked: Array; + atomicMemoryUnlocked: Array; + atomicMemoryLocked: Array; }; /** @internal */ -export const XChainBalances$inboundSchema: z.ZodType = - z.object({ - locked: z.array(AggregatedAssetAmount$inboundSchema), - unlocked: z.array(AggregatedAssetAmount$inboundSchema), - atomicMemoryUnlocked: z.array(XChainSharedAssetBalance$inboundSchema), - atomicMemoryLocked: z.array(XChainSharedAssetBalance$inboundSchema), - }); +export const XChainBalances$inboundSchema: z.ZodType< + XChainBalances, + z.ZodTypeDef, + unknown +> = z.object({ + locked: z.array(AggregatedAssetAmount$inboundSchema), + unlocked: z.array(AggregatedAssetAmount$inboundSchema), + atomicMemoryUnlocked: z.array(XChainSharedAssetBalance$inboundSchema), + atomicMemoryLocked: z.array(XChainSharedAssetBalance$inboundSchema), +}); /** @internal */ export type XChainBalances$Outbound = { - locked: Array; - unlocked: Array; - atomicMemoryUnlocked: Array; - atomicMemoryLocked: Array; + locked: Array; + unlocked: Array; + atomicMemoryUnlocked: Array; + atomicMemoryLocked: Array; }; /** @internal */ export const XChainBalances$outboundSchema: z.ZodType< - XChainBalances$Outbound, - z.ZodTypeDef, - XChainBalances + XChainBalances$Outbound, + z.ZodTypeDef, + XChainBalances > = z.object({ - locked: z.array(AggregatedAssetAmount$outboundSchema), - unlocked: z.array(AggregatedAssetAmount$outboundSchema), - atomicMemoryUnlocked: z.array(XChainSharedAssetBalance$outboundSchema), - atomicMemoryLocked: z.array(XChainSharedAssetBalance$outboundSchema), + locked: z.array(AggregatedAssetAmount$outboundSchema), + unlocked: z.array(AggregatedAssetAmount$outboundSchema), + atomicMemoryUnlocked: z.array(XChainSharedAssetBalance$outboundSchema), + atomicMemoryLocked: z.array(XChainSharedAssetBalance$outboundSchema), }); /** @@ -63,10 +66,10 @@ export const XChainBalances$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace XChainBalances$ { - /** @deprecated use `XChainBalances$inboundSchema` instead. */ - export const inboundSchema = XChainBalances$inboundSchema; - /** @deprecated use `XChainBalances$outboundSchema` instead. */ - export const outboundSchema = XChainBalances$outboundSchema; - /** @deprecated use `XChainBalances$Outbound` instead. */ - export type Outbound = XChainBalances$Outbound; + /** @deprecated use `XChainBalances$inboundSchema` instead. */ + export const inboundSchema = XChainBalances$inboundSchema; + /** @deprecated use `XChainBalances$outboundSchema` instead. */ + export const outboundSchema = XChainBalances$outboundSchema; + /** @deprecated use `XChainBalances$Outbound` instead. */ + export type Outbound = XChainBalances$Outbound; } diff --git a/src/models/components/xchainid.ts b/src/models/components/xchainid.ts index 8670268..cd902e0 100644 --- a/src/models/components/xchainid.ts +++ b/src/models/components/xchainid.ts @@ -2,31 +2,33 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; export const XChainId = { - TwooYmbnv4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM: - "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", - TwoJVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm: - "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm", - XChain: "x-chain", + TwooYmbnv4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM: + "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM", + TwoJVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm: + "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm", + XChain: "x-chain", } as const; export type XChainId = ClosedEnum; /** @internal */ -export const XChainId$inboundSchema: z.ZodNativeEnum = z.nativeEnum(XChainId); +export const XChainId$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(XChainId); /** @internal */ -export const XChainId$outboundSchema: z.ZodNativeEnum = XChainId$inboundSchema; +export const XChainId$outboundSchema: z.ZodNativeEnum = + XChainId$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace XChainId$ { - /** @deprecated use `XChainId$inboundSchema` instead. */ - export const inboundSchema = XChainId$inboundSchema; - /** @deprecated use `XChainId$outboundSchema` instead. */ - export const outboundSchema = XChainId$outboundSchema; + /** @deprecated use `XChainId$inboundSchema` instead. */ + export const inboundSchema = XChainId$inboundSchema; + /** @deprecated use `XChainId$outboundSchema` instead. */ + export const outboundSchema = XChainId$outboundSchema; } diff --git a/src/models/components/xchainlineartransaction.ts b/src/models/components/xchainlineartransaction.ts index f967335..839d38a 100644 --- a/src/models/components/xchainlineartransaction.ts +++ b/src/models/components/xchainlineartransaction.ts @@ -2,102 +2,107 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - AssetAmount, - AssetAmount$inboundSchema, - AssetAmount$Outbound, - AssetAmount$outboundSchema, + AssetAmount, + AssetAmount$inboundSchema, + AssetAmount$Outbound, + AssetAmount$outboundSchema, } from "./assetamount.js"; -import { Utxo, Utxo$inboundSchema, Utxo$Outbound, Utxo$outboundSchema } from "./utxo.js"; import { - XChainAssetDetails, - XChainAssetDetails$inboundSchema, - XChainAssetDetails$Outbound, - XChainAssetDetails$outboundSchema, + Utxo, + Utxo$inboundSchema, + Utxo$Outbound, + Utxo$outboundSchema, +} from "./utxo.js"; +import { + XChainAssetDetails, + XChainAssetDetails$inboundSchema, + XChainAssetDetails$Outbound, + XChainAssetDetails$outboundSchema, } from "./xchainassetdetails.js"; import { - XChainTransactionType, - XChainTransactionType$inboundSchema, - XChainTransactionType$outboundSchema, + XChainTransactionType, + XChainTransactionType$inboundSchema, + XChainTransactionType$outboundSchema, } from "./xchaintransactiontype.js"; -import * as z from "zod"; /** * Represents chain format this transaction is included in. */ export const XChainLinearTransactionChainFormat = { - NonLinear: "non-linear", - Linear: "linear", + NonLinear: "non-linear", + Linear: "linear", } as const; /** * Represents chain format this transaction is included in. */ export type XChainLinearTransactionChainFormat = ClosedEnum< - typeof XChainLinearTransactionChainFormat + typeof XChainLinearTransactionChainFormat >; export type XChainLinearTransaction = { - /** - * Unique ID for this transaction. - */ - txHash: string; - /** - * Represents chain format this transaction is included in. - */ - chainFormat: XChainLinearTransactionChainFormat; - /** - * Latest timestamp in seconds this transaction was accepted out of the same transaction accepted in other vertices. - */ - timestamp: number; - /** - * Type of transaction. - */ - txType: XChainTransactionType; - /** - * Hex encoded memo bytes for this transaction. - */ - memo: string; - consumedUtxos: Array; - emittedUtxos: Array; - /** - * Assets unlocked by inputs of this transaction. - */ - amountUnlocked: Array; - /** - * Assets created by outputs of this transaction. - */ - amountCreated: Array; - /** - * Source chain for an atomic transaction. - */ - sourceChain?: string | undefined; - /** - * Destination chain for an atomic transaction. - */ - destinationChain?: string | undefined; - /** - * AssetAmount details of the asset created in CreateAssetTx - */ - assetCreated?: XChainAssetDetails | undefined; - /** - * Height of the block this transaction belongs to. - */ - blockHeight: number; - /** - * Hash of the block this transaction belongs to. - */ - blockHash: string; + /** + * Unique ID for this transaction. + */ + txHash: string; + /** + * Represents chain format this transaction is included in. + */ + chainFormat: XChainLinearTransactionChainFormat; + /** + * Latest timestamp in seconds this transaction was accepted out of the same transaction accepted in other vertices. + */ + timestamp: number; + /** + * Type of transaction. + */ + txType: XChainTransactionType; + /** + * Hex encoded memo bytes for this transaction. + */ + memo: string; + consumedUtxos: Array; + emittedUtxos: Array; + /** + * Assets unlocked by inputs of this transaction. + */ + amountUnlocked: Array; + /** + * Assets created by outputs of this transaction. + */ + amountCreated: Array; + /** + * Source chain for an atomic transaction. + */ + sourceChain?: string | undefined; + /** + * Destination chain for an atomic transaction. + */ + destinationChain?: string | undefined; + /** + * AssetAmount details of the asset created in CreateAssetTx + */ + assetCreated?: XChainAssetDetails | undefined; + /** + * Height of the block this transaction belongs to. + */ + blockHeight: number; + /** + * Hash of the block this transaction belongs to. + */ + blockHash: string; }; /** @internal */ export const XChainLinearTransactionChainFormat$inboundSchema: z.ZodNativeEnum< - typeof XChainLinearTransactionChainFormat + typeof XChainLinearTransactionChainFormat > = z.nativeEnum(XChainLinearTransactionChainFormat); /** @internal */ export const XChainLinearTransactionChainFormat$outboundSchema: z.ZodNativeEnum< - typeof XChainLinearTransactionChainFormat + typeof XChainLinearTransactionChainFormat > = XChainLinearTransactionChainFormat$inboundSchema; /** @@ -105,72 +110,73 @@ export const XChainLinearTransactionChainFormat$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace XChainLinearTransactionChainFormat$ { - /** @deprecated use `XChainLinearTransactionChainFormat$inboundSchema` instead. */ - export const inboundSchema = XChainLinearTransactionChainFormat$inboundSchema; - /** @deprecated use `XChainLinearTransactionChainFormat$outboundSchema` instead. */ - export const outboundSchema = XChainLinearTransactionChainFormat$outboundSchema; + /** @deprecated use `XChainLinearTransactionChainFormat$inboundSchema` instead. */ + export const inboundSchema = XChainLinearTransactionChainFormat$inboundSchema; + /** @deprecated use `XChainLinearTransactionChainFormat$outboundSchema` instead. */ + export const outboundSchema = + XChainLinearTransactionChainFormat$outboundSchema; } /** @internal */ export const XChainLinearTransaction$inboundSchema: z.ZodType< - XChainLinearTransaction, - z.ZodTypeDef, - unknown + XChainLinearTransaction, + z.ZodTypeDef, + unknown > = z.object({ - txHash: z.string(), - chainFormat: XChainLinearTransactionChainFormat$inboundSchema, - timestamp: z.number(), - txType: XChainTransactionType$inboundSchema, - memo: z.string(), - consumedUtxos: z.array(Utxo$inboundSchema), - emittedUtxos: z.array(Utxo$inboundSchema), - amountUnlocked: z.array(AssetAmount$inboundSchema), - amountCreated: z.array(AssetAmount$inboundSchema), - sourceChain: z.string().optional(), - destinationChain: z.string().optional(), - assetCreated: XChainAssetDetails$inboundSchema.optional(), - blockHeight: z.number(), - blockHash: z.string(), + txHash: z.string(), + chainFormat: XChainLinearTransactionChainFormat$inboundSchema, + timestamp: z.number(), + txType: XChainTransactionType$inboundSchema, + memo: z.string(), + consumedUtxos: z.array(Utxo$inboundSchema), + emittedUtxos: z.array(Utxo$inboundSchema), + amountUnlocked: z.array(AssetAmount$inboundSchema), + amountCreated: z.array(AssetAmount$inboundSchema), + sourceChain: z.string().optional(), + destinationChain: z.string().optional(), + assetCreated: XChainAssetDetails$inboundSchema.optional(), + blockHeight: z.number(), + blockHash: z.string(), }); /** @internal */ export type XChainLinearTransaction$Outbound = { - txHash: string; - chainFormat: string; - timestamp: number; - txType: string; - memo: string; - consumedUtxos: Array; - emittedUtxos: Array; - amountUnlocked: Array; - amountCreated: Array; - sourceChain?: string | undefined; - destinationChain?: string | undefined; - assetCreated?: XChainAssetDetails$Outbound | undefined; - blockHeight: number; - blockHash: string; + txHash: string; + chainFormat: string; + timestamp: number; + txType: string; + memo: string; + consumedUtxos: Array; + emittedUtxos: Array; + amountUnlocked: Array; + amountCreated: Array; + sourceChain?: string | undefined; + destinationChain?: string | undefined; + assetCreated?: XChainAssetDetails$Outbound | undefined; + blockHeight: number; + blockHash: string; }; /** @internal */ export const XChainLinearTransaction$outboundSchema: z.ZodType< - XChainLinearTransaction$Outbound, - z.ZodTypeDef, - XChainLinearTransaction + XChainLinearTransaction$Outbound, + z.ZodTypeDef, + XChainLinearTransaction > = z.object({ - txHash: z.string(), - chainFormat: XChainLinearTransactionChainFormat$outboundSchema, - timestamp: z.number(), - txType: XChainTransactionType$outboundSchema, - memo: z.string(), - consumedUtxos: z.array(Utxo$outboundSchema), - emittedUtxos: z.array(Utxo$outboundSchema), - amountUnlocked: z.array(AssetAmount$outboundSchema), - amountCreated: z.array(AssetAmount$outboundSchema), - sourceChain: z.string().optional(), - destinationChain: z.string().optional(), - assetCreated: XChainAssetDetails$outboundSchema.optional(), - blockHeight: z.number(), - blockHash: z.string(), + txHash: z.string(), + chainFormat: XChainLinearTransactionChainFormat$outboundSchema, + timestamp: z.number(), + txType: XChainTransactionType$outboundSchema, + memo: z.string(), + consumedUtxos: z.array(Utxo$outboundSchema), + emittedUtxos: z.array(Utxo$outboundSchema), + amountUnlocked: z.array(AssetAmount$outboundSchema), + amountCreated: z.array(AssetAmount$outboundSchema), + sourceChain: z.string().optional(), + destinationChain: z.string().optional(), + assetCreated: XChainAssetDetails$outboundSchema.optional(), + blockHeight: z.number(), + blockHash: z.string(), }); /** @@ -178,10 +184,10 @@ export const XChainLinearTransaction$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace XChainLinearTransaction$ { - /** @deprecated use `XChainLinearTransaction$inboundSchema` instead. */ - export const inboundSchema = XChainLinearTransaction$inboundSchema; - /** @deprecated use `XChainLinearTransaction$outboundSchema` instead. */ - export const outboundSchema = XChainLinearTransaction$outboundSchema; - /** @deprecated use `XChainLinearTransaction$Outbound` instead. */ - export type Outbound = XChainLinearTransaction$Outbound; + /** @deprecated use `XChainLinearTransaction$inboundSchema` instead. */ + export const inboundSchema = XChainLinearTransaction$inboundSchema; + /** @deprecated use `XChainLinearTransaction$outboundSchema` instead. */ + export const outboundSchema = XChainLinearTransaction$outboundSchema; + /** @deprecated use `XChainLinearTransaction$Outbound` instead. */ + export type Outbound = XChainLinearTransaction$Outbound; } diff --git a/src/models/components/xchainnonlineartransaction.ts b/src/models/components/xchainnonlineartransaction.ts index 53c56e9..1c67858 100644 --- a/src/models/components/xchainnonlineartransaction.ts +++ b/src/models/components/xchainnonlineartransaction.ts @@ -2,39 +2,44 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { - AssetAmount, - AssetAmount$inboundSchema, - AssetAmount$Outbound, - AssetAmount$outboundSchema, + AssetAmount, + AssetAmount$inboundSchema, + AssetAmount$Outbound, + AssetAmount$outboundSchema, } from "./assetamount.js"; import { - TransactionVertexDetail, - TransactionVertexDetail$inboundSchema, - TransactionVertexDetail$Outbound, - TransactionVertexDetail$outboundSchema, + TransactionVertexDetail, + TransactionVertexDetail$inboundSchema, + TransactionVertexDetail$Outbound, + TransactionVertexDetail$outboundSchema, } from "./transactionvertexdetail.js"; -import { Utxo, Utxo$inboundSchema, Utxo$Outbound, Utxo$outboundSchema } from "./utxo.js"; import { - XChainAssetDetails, - XChainAssetDetails$inboundSchema, - XChainAssetDetails$Outbound, - XChainAssetDetails$outboundSchema, + Utxo, + Utxo$inboundSchema, + Utxo$Outbound, + Utxo$outboundSchema, +} from "./utxo.js"; +import { + XChainAssetDetails, + XChainAssetDetails$inboundSchema, + XChainAssetDetails$Outbound, + XChainAssetDetails$outboundSchema, } from "./xchainassetdetails.js"; import { - XChainTransactionType, - XChainTransactionType$inboundSchema, - XChainTransactionType$outboundSchema, + XChainTransactionType, + XChainTransactionType$inboundSchema, + XChainTransactionType$outboundSchema, } from "./xchaintransactiontype.js"; -import * as z from "zod"; /** * Represents chain format this transaction is included in. */ export const ChainFormat = { - NonLinear: "non-linear", - Linear: "linear", + NonLinear: "non-linear", + Linear: "linear", } as const; /** * Represents chain format this transaction is included in. @@ -42,130 +47,130 @@ export const ChainFormat = { export type ChainFormat = ClosedEnum; export type XChainNonLinearTransaction = { - /** - * Unique ID for this transaction. - */ - txHash: string; - /** - * Represents chain format this transaction is included in. - */ - chainFormat: ChainFormat; - /** - * Latest timestamp in seconds this transaction was accepted out of the same transaction accepted in other vertices. - */ - timestamp: number; - /** - * Type of transaction. - */ - txType: XChainTransactionType; - /** - * Hex encoded memo bytes for this transaction. - */ - memo: string; - consumedUtxos: Array; - emittedUtxos: Array; - /** - * Assets unlocked by inputs of this transaction. - */ - amountUnlocked: Array; - /** - * Assets created by outputs of this transaction. - */ - amountCreated: Array; - /** - * Source chain for an atomic transaction. - */ - sourceChain?: string | undefined; - /** - * Destination chain for an atomic transaction. - */ - destinationChain?: string | undefined; - /** - * AssetAmount details of the asset created in CreateAssetTx - */ - assetCreated?: XChainAssetDetails | undefined; - /** - * A transaction on X-Chain can be accepted over multiple vertices. - */ - vertices: Array; + /** + * Unique ID for this transaction. + */ + txHash: string; + /** + * Represents chain format this transaction is included in. + */ + chainFormat: ChainFormat; + /** + * Latest timestamp in seconds this transaction was accepted out of the same transaction accepted in other vertices. + */ + timestamp: number; + /** + * Type of transaction. + */ + txType: XChainTransactionType; + /** + * Hex encoded memo bytes for this transaction. + */ + memo: string; + consumedUtxos: Array; + emittedUtxos: Array; + /** + * Assets unlocked by inputs of this transaction. + */ + amountUnlocked: Array; + /** + * Assets created by outputs of this transaction. + */ + amountCreated: Array; + /** + * Source chain for an atomic transaction. + */ + sourceChain?: string | undefined; + /** + * Destination chain for an atomic transaction. + */ + destinationChain?: string | undefined; + /** + * AssetAmount details of the asset created in CreateAssetTx + */ + assetCreated?: XChainAssetDetails | undefined; + /** + * A transaction on X-Chain can be accepted over multiple vertices. + */ + vertices: Array; }; /** @internal */ -export const ChainFormat$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(ChainFormat); +export const ChainFormat$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(ChainFormat); /** @internal */ export const ChainFormat$outboundSchema: z.ZodNativeEnum = - ChainFormat$inboundSchema; + ChainFormat$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ChainFormat$ { - /** @deprecated use `ChainFormat$inboundSchema` instead. */ - export const inboundSchema = ChainFormat$inboundSchema; - /** @deprecated use `ChainFormat$outboundSchema` instead. */ - export const outboundSchema = ChainFormat$outboundSchema; + /** @deprecated use `ChainFormat$inboundSchema` instead. */ + export const inboundSchema = ChainFormat$inboundSchema; + /** @deprecated use `ChainFormat$outboundSchema` instead. */ + export const outboundSchema = ChainFormat$outboundSchema; } /** @internal */ export const XChainNonLinearTransaction$inboundSchema: z.ZodType< - XChainNonLinearTransaction, - z.ZodTypeDef, - unknown + XChainNonLinearTransaction, + z.ZodTypeDef, + unknown > = z.object({ - txHash: z.string(), - chainFormat: ChainFormat$inboundSchema, - timestamp: z.number(), - txType: XChainTransactionType$inboundSchema, - memo: z.string(), - consumedUtxos: z.array(Utxo$inboundSchema), - emittedUtxos: z.array(Utxo$inboundSchema), - amountUnlocked: z.array(AssetAmount$inboundSchema), - amountCreated: z.array(AssetAmount$inboundSchema), - sourceChain: z.string().optional(), - destinationChain: z.string().optional(), - assetCreated: XChainAssetDetails$inboundSchema.optional(), - vertices: z.array(TransactionVertexDetail$inboundSchema), + txHash: z.string(), + chainFormat: ChainFormat$inboundSchema, + timestamp: z.number(), + txType: XChainTransactionType$inboundSchema, + memo: z.string(), + consumedUtxos: z.array(Utxo$inboundSchema), + emittedUtxos: z.array(Utxo$inboundSchema), + amountUnlocked: z.array(AssetAmount$inboundSchema), + amountCreated: z.array(AssetAmount$inboundSchema), + sourceChain: z.string().optional(), + destinationChain: z.string().optional(), + assetCreated: XChainAssetDetails$inboundSchema.optional(), + vertices: z.array(TransactionVertexDetail$inboundSchema), }); /** @internal */ export type XChainNonLinearTransaction$Outbound = { - txHash: string; - chainFormat: string; - timestamp: number; - txType: string; - memo: string; - consumedUtxos: Array; - emittedUtxos: Array; - amountUnlocked: Array; - amountCreated: Array; - sourceChain?: string | undefined; - destinationChain?: string | undefined; - assetCreated?: XChainAssetDetails$Outbound | undefined; - vertices: Array; + txHash: string; + chainFormat: string; + timestamp: number; + txType: string; + memo: string; + consumedUtxos: Array; + emittedUtxos: Array; + amountUnlocked: Array; + amountCreated: Array; + sourceChain?: string | undefined; + destinationChain?: string | undefined; + assetCreated?: XChainAssetDetails$Outbound | undefined; + vertices: Array; }; /** @internal */ export const XChainNonLinearTransaction$outboundSchema: z.ZodType< - XChainNonLinearTransaction$Outbound, - z.ZodTypeDef, - XChainNonLinearTransaction + XChainNonLinearTransaction$Outbound, + z.ZodTypeDef, + XChainNonLinearTransaction > = z.object({ - txHash: z.string(), - chainFormat: ChainFormat$outboundSchema, - timestamp: z.number(), - txType: XChainTransactionType$outboundSchema, - memo: z.string(), - consumedUtxos: z.array(Utxo$outboundSchema), - emittedUtxos: z.array(Utxo$outboundSchema), - amountUnlocked: z.array(AssetAmount$outboundSchema), - amountCreated: z.array(AssetAmount$outboundSchema), - sourceChain: z.string().optional(), - destinationChain: z.string().optional(), - assetCreated: XChainAssetDetails$outboundSchema.optional(), - vertices: z.array(TransactionVertexDetail$outboundSchema), + txHash: z.string(), + chainFormat: ChainFormat$outboundSchema, + timestamp: z.number(), + txType: XChainTransactionType$outboundSchema, + memo: z.string(), + consumedUtxos: z.array(Utxo$outboundSchema), + emittedUtxos: z.array(Utxo$outboundSchema), + amountUnlocked: z.array(AssetAmount$outboundSchema), + amountCreated: z.array(AssetAmount$outboundSchema), + sourceChain: z.string().optional(), + destinationChain: z.string().optional(), + assetCreated: XChainAssetDetails$outboundSchema.optional(), + vertices: z.array(TransactionVertexDetail$outboundSchema), }); /** @@ -173,10 +178,10 @@ export const XChainNonLinearTransaction$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace XChainNonLinearTransaction$ { - /** @deprecated use `XChainNonLinearTransaction$inboundSchema` instead. */ - export const inboundSchema = XChainNonLinearTransaction$inboundSchema; - /** @deprecated use `XChainNonLinearTransaction$outboundSchema` instead. */ - export const outboundSchema = XChainNonLinearTransaction$outboundSchema; - /** @deprecated use `XChainNonLinearTransaction$Outbound` instead. */ - export type Outbound = XChainNonLinearTransaction$Outbound; + /** @deprecated use `XChainNonLinearTransaction$inboundSchema` instead. */ + export const inboundSchema = XChainNonLinearTransaction$inboundSchema; + /** @deprecated use `XChainNonLinearTransaction$outboundSchema` instead. */ + export const outboundSchema = XChainNonLinearTransaction$outboundSchema; + /** @deprecated use `XChainNonLinearTransaction$Outbound` instead. */ + export type Outbound = XChainNonLinearTransaction$Outbound; } diff --git a/src/models/components/xchainsharedassetbalance.ts b/src/models/components/xchainsharedassetbalance.ts index 6ff3978..7356f5d 100644 --- a/src/models/components/xchainsharedassetbalance.ts +++ b/src/models/components/xchainsharedassetbalance.ts @@ -2,84 +2,84 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { - PrimaryNetworkAssetType, - PrimaryNetworkAssetType$inboundSchema, - PrimaryNetworkAssetType$outboundSchema, + PrimaryNetworkAssetType, + PrimaryNetworkAssetType$inboundSchema, + PrimaryNetworkAssetType$outboundSchema, } from "./primarynetworkassettype.js"; -import * as z from "zod"; export type XChainSharedAssetBalance = { - /** - * Unique ID for an asset. - */ - assetId: string; - /** - * Name of this asset. - */ - name: string; - /** - * Symbol for this asset (max 4 characters). - */ - symbol: string; - /** - * Denomination of this asset to represent fungibility. - */ - denomination: number; - /** - * Type of asset like SECP256K1 or NFT. - */ - type: PrimaryNetworkAssetType; - /** - * Amount of the asset. - */ - amount: string; - utxoCount: number; - sharedWithChainId: string; + /** + * Unique ID for an asset. + */ + assetId: string; + /** + * Name of this asset. + */ + name: string; + /** + * Symbol for this asset (max 4 characters). + */ + symbol: string; + /** + * Denomination of this asset to represent fungibility. + */ + denomination: number; + /** + * Type of asset like SECP256K1 or NFT. + */ + type: PrimaryNetworkAssetType; + /** + * Amount of the asset. + */ + amount: string; + utxoCount: number; + sharedWithChainId: string; }; /** @internal */ export const XChainSharedAssetBalance$inboundSchema: z.ZodType< - XChainSharedAssetBalance, - z.ZodTypeDef, - unknown + XChainSharedAssetBalance, + z.ZodTypeDef, + unknown > = z.object({ - assetId: z.string(), - name: z.string(), - symbol: z.string(), - denomination: z.number(), - type: PrimaryNetworkAssetType$inboundSchema, - amount: z.string(), - utxoCount: z.number(), - sharedWithChainId: z.string(), + assetId: z.string(), + name: z.string(), + symbol: z.string(), + denomination: z.number(), + type: PrimaryNetworkAssetType$inboundSchema, + amount: z.string(), + utxoCount: z.number(), + sharedWithChainId: z.string(), }); /** @internal */ export type XChainSharedAssetBalance$Outbound = { - assetId: string; - name: string; - symbol: string; - denomination: number; - type: string; - amount: string; - utxoCount: number; - sharedWithChainId: string; + assetId: string; + name: string; + symbol: string; + denomination: number; + type: string; + amount: string; + utxoCount: number; + sharedWithChainId: string; }; /** @internal */ export const XChainSharedAssetBalance$outboundSchema: z.ZodType< - XChainSharedAssetBalance$Outbound, - z.ZodTypeDef, - XChainSharedAssetBalance + XChainSharedAssetBalance$Outbound, + z.ZodTypeDef, + XChainSharedAssetBalance > = z.object({ - assetId: z.string(), - name: z.string(), - symbol: z.string(), - denomination: z.number(), - type: PrimaryNetworkAssetType$outboundSchema, - amount: z.string(), - utxoCount: z.number(), - sharedWithChainId: z.string(), + assetId: z.string(), + name: z.string(), + symbol: z.string(), + denomination: z.number(), + type: PrimaryNetworkAssetType$outboundSchema, + amount: z.string(), + utxoCount: z.number(), + sharedWithChainId: z.string(), }); /** @@ -87,10 +87,10 @@ export const XChainSharedAssetBalance$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace XChainSharedAssetBalance$ { - /** @deprecated use `XChainSharedAssetBalance$inboundSchema` instead. */ - export const inboundSchema = XChainSharedAssetBalance$inboundSchema; - /** @deprecated use `XChainSharedAssetBalance$outboundSchema` instead. */ - export const outboundSchema = XChainSharedAssetBalance$outboundSchema; - /** @deprecated use `XChainSharedAssetBalance$Outbound` instead. */ - export type Outbound = XChainSharedAssetBalance$Outbound; + /** @deprecated use `XChainSharedAssetBalance$inboundSchema` instead. */ + export const inboundSchema = XChainSharedAssetBalance$inboundSchema; + /** @deprecated use `XChainSharedAssetBalance$outboundSchema` instead. */ + export const outboundSchema = XChainSharedAssetBalance$outboundSchema; + /** @deprecated use `XChainSharedAssetBalance$Outbound` instead. */ + export type Outbound = XChainSharedAssetBalance$Outbound; } diff --git a/src/models/components/xchaintransactiontype.ts b/src/models/components/xchaintransactiontype.ts index ea6afb1..0a205f5 100644 --- a/src/models/components/xchaintransactiontype.ts +++ b/src/models/components/xchaintransactiontype.ts @@ -2,19 +2,19 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ClosedEnum } from "../../types/enums.js"; import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; /** * Type of transaction. */ export const XChainTransactionType = { - BaseTx: "BaseTx", - CreateAssetTx: "CreateAssetTx", - OperationTx: "OperationTx", - ImportTx: "ImportTx", - ExportTx: "ExportTx", - Unknown: "UNKNOWN", + BaseTx: "BaseTx", + CreateAssetTx: "CreateAssetTx", + OperationTx: "OperationTx", + ImportTx: "ImportTx", + ExportTx: "ExportTx", + Unknown: "UNKNOWN", } as const; /** * Type of transaction. @@ -22,20 +22,22 @@ export const XChainTransactionType = { export type XChainTransactionType = ClosedEnum; /** @internal */ -export const XChainTransactionType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(XChainTransactionType); +export const XChainTransactionType$inboundSchema: z.ZodNativeEnum< + typeof XChainTransactionType +> = z.nativeEnum(XChainTransactionType); /** @internal */ -export const XChainTransactionType$outboundSchema: z.ZodNativeEnum = - XChainTransactionType$inboundSchema; +export const XChainTransactionType$outboundSchema: z.ZodNativeEnum< + typeof XChainTransactionType +> = XChainTransactionType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace XChainTransactionType$ { - /** @deprecated use `XChainTransactionType$inboundSchema` instead. */ - export const inboundSchema = XChainTransactionType$inboundSchema; - /** @deprecated use `XChainTransactionType$outboundSchema` instead. */ - export const outboundSchema = XChainTransactionType$outboundSchema; + /** @deprecated use `XChainTransactionType$inboundSchema` instead. */ + export const inboundSchema = XChainTransactionType$inboundSchema; + /** @deprecated use `XChainTransactionType$outboundSchema` instead. */ + export const outboundSchema = XChainTransactionType$outboundSchema; } diff --git a/src/models/components/xchainvertex.ts b/src/models/components/xchainvertex.ts index 9e328f5..a4931ba 100644 --- a/src/models/components/xchainvertex.ts +++ b/src/models/components/xchainvertex.ts @@ -5,54 +5,58 @@ import * as z from "zod"; export type XChainVertex = { - vertexHash: string; - parentHashes: Array; - vertexHeight: number; - vertexIndex: number; - vertexTimestamp: number; - txCount: number; - transactions: Array; - vertexSizeBytes: number; + vertexHash: string; + parentHashes: Array; + vertexHeight: number; + vertexIndex: number; + vertexTimestamp: number; + txCount: number; + transactions: Array; + vertexSizeBytes: number; }; /** @internal */ -export const XChainVertex$inboundSchema: z.ZodType = z.object({ - vertexHash: z.string(), - parentHashes: z.array(z.string()), - vertexHeight: z.number(), - vertexIndex: z.number(), - vertexTimestamp: z.number(), - txCount: z.number(), - transactions: z.array(z.string()), - vertexSizeBytes: z.number(), +export const XChainVertex$inboundSchema: z.ZodType< + XChainVertex, + z.ZodTypeDef, + unknown +> = z.object({ + vertexHash: z.string(), + parentHashes: z.array(z.string()), + vertexHeight: z.number(), + vertexIndex: z.number(), + vertexTimestamp: z.number(), + txCount: z.number(), + transactions: z.array(z.string()), + vertexSizeBytes: z.number(), }); /** @internal */ export type XChainVertex$Outbound = { - vertexHash: string; - parentHashes: Array; - vertexHeight: number; - vertexIndex: number; - vertexTimestamp: number; - txCount: number; - transactions: Array; - vertexSizeBytes: number; + vertexHash: string; + parentHashes: Array; + vertexHeight: number; + vertexIndex: number; + vertexTimestamp: number; + txCount: number; + transactions: Array; + vertexSizeBytes: number; }; /** @internal */ export const XChainVertex$outboundSchema: z.ZodType< - XChainVertex$Outbound, - z.ZodTypeDef, - XChainVertex + XChainVertex$Outbound, + z.ZodTypeDef, + XChainVertex > = z.object({ - vertexHash: z.string(), - parentHashes: z.array(z.string()), - vertexHeight: z.number(), - vertexIndex: z.number(), - vertexTimestamp: z.number(), - txCount: z.number(), - transactions: z.array(z.string()), - vertexSizeBytes: z.number(), + vertexHash: z.string(), + parentHashes: z.array(z.string()), + vertexHeight: z.number(), + vertexIndex: z.number(), + vertexTimestamp: z.number(), + txCount: z.number(), + transactions: z.array(z.string()), + vertexSizeBytes: z.number(), }); /** @@ -60,10 +64,10 @@ export const XChainVertex$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace XChainVertex$ { - /** @deprecated use `XChainVertex$inboundSchema` instead. */ - export const inboundSchema = XChainVertex$inboundSchema; - /** @deprecated use `XChainVertex$outboundSchema` instead. */ - export const outboundSchema = XChainVertex$outboundSchema; - /** @deprecated use `XChainVertex$Outbound` instead. */ - export type Outbound = XChainVertex$Outbound; + /** @deprecated use `XChainVertex$inboundSchema` instead. */ + export const inboundSchema = XChainVertex$inboundSchema; + /** @deprecated use `XChainVertex$outboundSchema` instead. */ + export const outboundSchema = XChainVertex$outboundSchema; + /** @deprecated use `XChainVertex$Outbound` instead. */ + export type Outbound = XChainVertex$Outbound; } diff --git a/src/models/errors/badgateway.ts b/src/models/errors/badgateway.ts index f4d6952..b06743d 100644 --- a/src/models/errors/badgateway.ts +++ b/src/models/errors/badgateway.ts @@ -16,18 +16,18 @@ export type BadGatewayMessage = string | Array; * received by the client-facing proxy or gateway from the upstream server. */ export type BadGatewayData = { - /** - * The error message describing the reason for the exception - */ - message: string | Array; - /** - * The HTTP status code of the response - */ - statusCode: number; - /** - * The type of error - */ - error: string; + /** + * The error message describing the reason for the exception + */ + message: string | Array; + /** + * The HTTP status code of the response + */ + statusCode: number; + /** + * The type of error + */ + error: string; }; /** @@ -37,45 +37,47 @@ export type BadGatewayData = { * received by the client-facing proxy or gateway from the upstream server. */ export class BadGateway extends Error { - /** - * The HTTP status code of the response - */ - statusCode: number; - /** - * The type of error - */ - error: string; - - /** The original data that was passed to this error instance. */ - data$: BadGatewayData; - - constructor(err: BadGatewayData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; - - this.statusCode = err.statusCode; - this.error = err.error; - - this.name = "BadGateway"; - } + /** + * The HTTP status code of the response + */ + statusCode: number; + /** + * The type of error + */ + error: string; + + /** The original data that was passed to this error instance. */ + data$: BadGatewayData; + + constructor(err: BadGatewayData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + this.statusCode = err.statusCode; + this.error = err.error; + + this.name = "BadGateway"; + } } /** @internal */ -export const BadGatewayMessage$inboundSchema: z.ZodType = - z.union([z.string(), z.array(z.string())]); +export const BadGatewayMessage$inboundSchema: z.ZodType< + BadGatewayMessage, + z.ZodTypeDef, + unknown +> = z.union([z.string(), z.array(z.string())]); /** @internal */ export type BadGatewayMessage$Outbound = string | Array; /** @internal */ export const BadGatewayMessage$outboundSchema: z.ZodType< - BadGatewayMessage$Outbound, - z.ZodTypeDef, - BadGatewayMessage + BadGatewayMessage$Outbound, + z.ZodTypeDef, + BadGatewayMessage > = z.union([z.string(), z.array(z.string())]); /** @@ -83,53 +85,57 @@ export const BadGatewayMessage$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BadGatewayMessage$ { - /** @deprecated use `BadGatewayMessage$inboundSchema` instead. */ - export const inboundSchema = BadGatewayMessage$inboundSchema; - /** @deprecated use `BadGatewayMessage$outboundSchema` instead. */ - export const outboundSchema = BadGatewayMessage$outboundSchema; - /** @deprecated use `BadGatewayMessage$Outbound` instead. */ - export type Outbound = BadGatewayMessage$Outbound; + /** @deprecated use `BadGatewayMessage$inboundSchema` instead. */ + export const inboundSchema = BadGatewayMessage$inboundSchema; + /** @deprecated use `BadGatewayMessage$outboundSchema` instead. */ + export const outboundSchema = BadGatewayMessage$outboundSchema; + /** @deprecated use `BadGatewayMessage$Outbound` instead. */ + export type Outbound = BadGatewayMessage$Outbound; } /** @internal */ -export const BadGateway$inboundSchema: z.ZodType = z - .object({ - message: z.union([z.string(), z.array(z.string())]), - statusCode: z.number(), - error: z.string(), - }) - .transform((v) => { - return new BadGateway(v); - }); +export const BadGateway$inboundSchema: z.ZodType< + BadGateway, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.union([z.string(), z.array(z.string())]), + statusCode: z.number(), + error: z.string(), +}) + .transform((v) => { + return new BadGateway(v); + }); /** @internal */ export type BadGateway$Outbound = { - message: string | Array; - statusCode: number; - error: string; + message: string | Array; + statusCode: number; + error: string; }; /** @internal */ -export const BadGateway$outboundSchema: z.ZodType = z - .instanceof(BadGateway) - .transform((v) => v.data$) - .pipe( - z.object({ - message: z.union([z.string(), z.array(z.string())]), - statusCode: z.number(), - error: z.string(), - }) - ); +export const BadGateway$outboundSchema: z.ZodType< + BadGateway$Outbound, + z.ZodTypeDef, + BadGateway +> = z.instanceof(BadGateway) + .transform(v => v.data$) + .pipe(z.object({ + message: z.union([z.string(), z.array(z.string())]), + statusCode: z.number(), + error: z.string(), + })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BadGateway$ { - /** @deprecated use `BadGateway$inboundSchema` instead. */ - export const inboundSchema = BadGateway$inboundSchema; - /** @deprecated use `BadGateway$outboundSchema` instead. */ - export const outboundSchema = BadGateway$outboundSchema; - /** @deprecated use `BadGateway$Outbound` instead. */ - export type Outbound = BadGateway$Outbound; + /** @deprecated use `BadGateway$inboundSchema` instead. */ + export const inboundSchema = BadGateway$inboundSchema; + /** @deprecated use `BadGateway$outboundSchema` instead. */ + export const outboundSchema = BadGateway$outboundSchema; + /** @deprecated use `BadGateway$Outbound` instead. */ + export type Outbound = BadGateway$Outbound; } diff --git a/src/models/errors/badrequest.ts b/src/models/errors/badrequest.ts index 2cd6a93..7278b80 100644 --- a/src/models/errors/badrequest.ts +++ b/src/models/errors/badrequest.ts @@ -17,18 +17,18 @@ export type Message = string | Array; * evaluating the error. */ export type BadRequestData = { - /** - * The error message describing the reason for the exception - */ - message: string | Array; - /** - * The HTTP status code of the response - */ - statusCode: number; - /** - * The type of error - */ - error: string; + /** + * The error message describing the reason for the exception + */ + message: string | Array; + /** + * The HTTP status code of the response + */ + statusCode: number; + /** + * The type of error + */ + error: string; }; /** @@ -39,100 +39,102 @@ export type BadRequestData = { * evaluating the error. */ export class BadRequest extends Error { - /** - * The HTTP status code of the response - */ - statusCode: number; - /** - * The type of error - */ - error: string; - - /** The original data that was passed to this error instance. */ - data$: BadRequestData; - - constructor(err: BadRequestData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; - - this.statusCode = err.statusCode; - this.error = err.error; - - this.name = "BadRequest"; - } + /** + * The HTTP status code of the response + */ + statusCode: number; + /** + * The type of error + */ + error: string; + + /** The original data that was passed to this error instance. */ + data$: BadRequestData; + + constructor(err: BadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + this.statusCode = err.statusCode; + this.error = err.error; + + this.name = "BadRequest"; + } } /** @internal */ -export const Message$inboundSchema: z.ZodType = z.union([ - z.string(), - z.array(z.string()), -]); +export const Message$inboundSchema: z.ZodType = + z.union([z.string(), z.array(z.string())]); /** @internal */ export type Message$Outbound = string | Array; /** @internal */ -export const Message$outboundSchema: z.ZodType = z.union([ - z.string(), - z.array(z.string()), -]); +export const Message$outboundSchema: z.ZodType< + Message$Outbound, + z.ZodTypeDef, + Message +> = z.union([z.string(), z.array(z.string())]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Message$ { - /** @deprecated use `Message$inboundSchema` instead. */ - export const inboundSchema = Message$inboundSchema; - /** @deprecated use `Message$outboundSchema` instead. */ - export const outboundSchema = Message$outboundSchema; - /** @deprecated use `Message$Outbound` instead. */ - export type Outbound = Message$Outbound; + /** @deprecated use `Message$inboundSchema` instead. */ + export const inboundSchema = Message$inboundSchema; + /** @deprecated use `Message$outboundSchema` instead. */ + export const outboundSchema = Message$outboundSchema; + /** @deprecated use `Message$Outbound` instead. */ + export type Outbound = Message$Outbound; } /** @internal */ -export const BadRequest$inboundSchema: z.ZodType = z - .object({ - message: z.union([z.string(), z.array(z.string())]), - statusCode: z.number(), - error: z.string(), - }) - .transform((v) => { - return new BadRequest(v); - }); +export const BadRequest$inboundSchema: z.ZodType< + BadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.union([z.string(), z.array(z.string())]), + statusCode: z.number(), + error: z.string(), +}) + .transform((v) => { + return new BadRequest(v); + }); /** @internal */ export type BadRequest$Outbound = { - message: string | Array; - statusCode: number; - error: string; + message: string | Array; + statusCode: number; + error: string; }; /** @internal */ -export const BadRequest$outboundSchema: z.ZodType = z - .instanceof(BadRequest) - .transform((v) => v.data$) - .pipe( - z.object({ - message: z.union([z.string(), z.array(z.string())]), - statusCode: z.number(), - error: z.string(), - }) - ); +export const BadRequest$outboundSchema: z.ZodType< + BadRequest$Outbound, + z.ZodTypeDef, + BadRequest +> = z.instanceof(BadRequest) + .transform(v => v.data$) + .pipe(z.object({ + message: z.union([z.string(), z.array(z.string())]), + statusCode: z.number(), + error: z.string(), + })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace BadRequest$ { - /** @deprecated use `BadRequest$inboundSchema` instead. */ - export const inboundSchema = BadRequest$inboundSchema; - /** @deprecated use `BadRequest$outboundSchema` instead. */ - export const outboundSchema = BadRequest$outboundSchema; - /** @deprecated use `BadRequest$Outbound` instead. */ - export type Outbound = BadRequest$Outbound; + /** @deprecated use `BadRequest$inboundSchema` instead. */ + export const inboundSchema = BadRequest$inboundSchema; + /** @deprecated use `BadRequest$outboundSchema` instead. */ + export const outboundSchema = BadRequest$outboundSchema; + /** @deprecated use `BadRequest$Outbound` instead. */ + export type Outbound = BadRequest$Outbound; } diff --git a/src/models/errors/datahealthcheck.ts b/src/models/errors/datahealthcheck.ts index 097fa89..7f53043 100644 --- a/src/models/errors/datahealthcheck.ts +++ b/src/models/errors/datahealthcheck.ts @@ -2,280 +2,260 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { collectExtraKeys as collectExtraKeys$ } from "../../lib/schemas.js"; -import * as z from "zod"; export type DataHealthCheckInfo = { - status?: string | undefined; - additionalProperties: { [k: string]: string }; + status?: string | undefined; + additionalProperties: { [k: string]: string }; }; export type DataHealthCheckError = { - status?: string | undefined; - additionalProperties: { [k: string]: string }; + status?: string | undefined; + additionalProperties: { [k: string]: string }; }; export type DataHealthCheckDetails = { - status?: string | undefined; - additionalProperties: { [k: string]: string }; + status?: string | undefined; + additionalProperties: { [k: string]: string }; }; /** * The Health Check is not successful */ export type DataHealthCheckResponseBodyData = { - status?: string | undefined; - info?: { [k: string]: DataHealthCheckInfo } | null | undefined; - error?: { [k: string]: DataHealthCheckError } | null | undefined; - details?: { [k: string]: DataHealthCheckDetails } | undefined; + status?: string | undefined; + info?: { [k: string]: DataHealthCheckInfo } | null | undefined; + error?: { [k: string]: DataHealthCheckError } | null | undefined; + details?: { [k: string]: DataHealthCheckDetails } | undefined; }; /** * The Health Check is not successful */ export class DataHealthCheckResponseBody extends Error { - status?: string | undefined; - info?: { [k: string]: DataHealthCheckInfo } | null | undefined; - error?: { [k: string]: DataHealthCheckError } | null | undefined; - details?: { [k: string]: DataHealthCheckDetails } | undefined; + status?: string | undefined; + info?: { [k: string]: DataHealthCheckInfo } | null | undefined; + error?: { [k: string]: DataHealthCheckError } | null | undefined; + details?: { [k: string]: DataHealthCheckDetails } | undefined; - /** The original data that was passed to this error instance. */ - data$: DataHealthCheckResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: DataHealthCheckResponseBodyData; - constructor(err: DataHealthCheckResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: DataHealthCheckResponseBodyData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.status != null) { - this.status = err.status; - } - if (err.info != null) { - this.info = err.info; - } - if (err.error != null) { - this.error = err.error; - } - if (err.details != null) { - this.details = err.details; - } + if (err.status != null) this.status = err.status; + if (err.info != null) this.info = err.info; + if (err.error != null) this.error = err.error; + if (err.details != null) this.details = err.details; - this.name = "DataHealthCheckResponseBody"; - } + this.name = "DataHealthCheckResponseBody"; + } } /** @internal */ export const DataHealthCheckInfo$inboundSchema: z.ZodType< - DataHealthCheckInfo, - z.ZodTypeDef, - unknown + DataHealthCheckInfo, + z.ZodTypeDef, + unknown > = collectExtraKeys$( - z - .object({ - status: z.string().optional(), - }) - .catchall(z.string()), - "additionalProperties" + z.object({ + status: z.string().optional(), + }).catchall(z.string()), + "additionalProperties", ); /** @internal */ export type DataHealthCheckInfo$Outbound = { - status?: string | undefined; - [additionalProperties: string]: unknown; + status?: string | undefined; + [additionalProperties: string]: unknown; }; /** @internal */ export const DataHealthCheckInfo$outboundSchema: z.ZodType< - DataHealthCheckInfo$Outbound, - z.ZodTypeDef, - DataHealthCheckInfo -> = z - .object({ - status: z.string().optional(), - additionalProperties: z.record(z.string()), - }) - .transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }); + DataHealthCheckInfo$Outbound, + z.ZodTypeDef, + DataHealthCheckInfo +> = z.object({ + status: z.string().optional(), + additionalProperties: z.record(z.string()), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DataHealthCheckInfo$ { - /** @deprecated use `DataHealthCheckInfo$inboundSchema` instead. */ - export const inboundSchema = DataHealthCheckInfo$inboundSchema; - /** @deprecated use `DataHealthCheckInfo$outboundSchema` instead. */ - export const outboundSchema = DataHealthCheckInfo$outboundSchema; - /** @deprecated use `DataHealthCheckInfo$Outbound` instead. */ - export type Outbound = DataHealthCheckInfo$Outbound; + /** @deprecated use `DataHealthCheckInfo$inboundSchema` instead. */ + export const inboundSchema = DataHealthCheckInfo$inboundSchema; + /** @deprecated use `DataHealthCheckInfo$outboundSchema` instead. */ + export const outboundSchema = DataHealthCheckInfo$outboundSchema; + /** @deprecated use `DataHealthCheckInfo$Outbound` instead. */ + export type Outbound = DataHealthCheckInfo$Outbound; } /** @internal */ export const DataHealthCheckError$inboundSchema: z.ZodType< - DataHealthCheckError, - z.ZodTypeDef, - unknown + DataHealthCheckError, + z.ZodTypeDef, + unknown > = collectExtraKeys$( - z - .object({ - status: z.string().optional(), - }) - .catchall(z.string()), - "additionalProperties" + z.object({ + status: z.string().optional(), + }).catchall(z.string()), + "additionalProperties", ); /** @internal */ export type DataHealthCheckError$Outbound = { - status?: string | undefined; - [additionalProperties: string]: unknown; + status?: string | undefined; + [additionalProperties: string]: unknown; }; /** @internal */ export const DataHealthCheckError$outboundSchema: z.ZodType< - DataHealthCheckError$Outbound, - z.ZodTypeDef, - DataHealthCheckError -> = z - .object({ - status: z.string().optional(), - additionalProperties: z.record(z.string()), - }) - .transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }); + DataHealthCheckError$Outbound, + z.ZodTypeDef, + DataHealthCheckError +> = z.object({ + status: z.string().optional(), + additionalProperties: z.record(z.string()), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DataHealthCheckError$ { - /** @deprecated use `DataHealthCheckError$inboundSchema` instead. */ - export const inboundSchema = DataHealthCheckError$inboundSchema; - /** @deprecated use `DataHealthCheckError$outboundSchema` instead. */ - export const outboundSchema = DataHealthCheckError$outboundSchema; - /** @deprecated use `DataHealthCheckError$Outbound` instead. */ - export type Outbound = DataHealthCheckError$Outbound; + /** @deprecated use `DataHealthCheckError$inboundSchema` instead. */ + export const inboundSchema = DataHealthCheckError$inboundSchema; + /** @deprecated use `DataHealthCheckError$outboundSchema` instead. */ + export const outboundSchema = DataHealthCheckError$outboundSchema; + /** @deprecated use `DataHealthCheckError$Outbound` instead. */ + export type Outbound = DataHealthCheckError$Outbound; } /** @internal */ export const DataHealthCheckDetails$inboundSchema: z.ZodType< - DataHealthCheckDetails, - z.ZodTypeDef, - unknown + DataHealthCheckDetails, + z.ZodTypeDef, + unknown > = collectExtraKeys$( - z - .object({ - status: z.string().optional(), - }) - .catchall(z.string()), - "additionalProperties" + z.object({ + status: z.string().optional(), + }).catchall(z.string()), + "additionalProperties", ); /** @internal */ export type DataHealthCheckDetails$Outbound = { - status?: string | undefined; - [additionalProperties: string]: unknown; + status?: string | undefined; + [additionalProperties: string]: unknown; }; /** @internal */ export const DataHealthCheckDetails$outboundSchema: z.ZodType< - DataHealthCheckDetails$Outbound, - z.ZodTypeDef, - DataHealthCheckDetails -> = z - .object({ - status: z.string().optional(), - additionalProperties: z.record(z.string()), - }) - .transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }); + DataHealthCheckDetails$Outbound, + z.ZodTypeDef, + DataHealthCheckDetails +> = z.object({ + status: z.string().optional(), + additionalProperties: z.record(z.string()), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DataHealthCheckDetails$ { - /** @deprecated use `DataHealthCheckDetails$inboundSchema` instead. */ - export const inboundSchema = DataHealthCheckDetails$inboundSchema; - /** @deprecated use `DataHealthCheckDetails$outboundSchema` instead. */ - export const outboundSchema = DataHealthCheckDetails$outboundSchema; - /** @deprecated use `DataHealthCheckDetails$Outbound` instead. */ - export type Outbound = DataHealthCheckDetails$Outbound; + /** @deprecated use `DataHealthCheckDetails$inboundSchema` instead. */ + export const inboundSchema = DataHealthCheckDetails$inboundSchema; + /** @deprecated use `DataHealthCheckDetails$outboundSchema` instead. */ + export const outboundSchema = DataHealthCheckDetails$outboundSchema; + /** @deprecated use `DataHealthCheckDetails$Outbound` instead. */ + export type Outbound = DataHealthCheckDetails$Outbound; } /** @internal */ export const DataHealthCheckResponseBody$inboundSchema: z.ZodType< - DataHealthCheckResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - status: z.string().optional(), - info: z.nullable(z.record(z.lazy(() => DataHealthCheckInfo$inboundSchema))).optional(), - error: z.nullable(z.record(z.lazy(() => DataHealthCheckError$inboundSchema))).optional(), - details: z.record(z.lazy(() => DataHealthCheckDetails$inboundSchema)).optional(), - }) - .transform((v) => { - return new DataHealthCheckResponseBody(v); - }); + DataHealthCheckResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + status: z.string().optional(), + info: z.nullable(z.record(z.lazy(() => DataHealthCheckInfo$inboundSchema))) + .optional(), + error: z.nullable(z.record(z.lazy(() => DataHealthCheckError$inboundSchema))) + .optional(), + details: z.record(z.lazy(() => DataHealthCheckDetails$inboundSchema)) + .optional(), +}) + .transform((v) => { + return new DataHealthCheckResponseBody(v); + }); /** @internal */ export type DataHealthCheckResponseBody$Outbound = { - status?: string | undefined; - info?: { [k: string]: DataHealthCheckInfo$Outbound } | null | undefined; - error?: { [k: string]: DataHealthCheckError$Outbound } | null | undefined; - details?: { [k: string]: DataHealthCheckDetails$Outbound } | undefined; + status?: string | undefined; + info?: { [k: string]: DataHealthCheckInfo$Outbound } | null | undefined; + error?: { [k: string]: DataHealthCheckError$Outbound } | null | undefined; + details?: { [k: string]: DataHealthCheckDetails$Outbound } | undefined; }; /** @internal */ export const DataHealthCheckResponseBody$outboundSchema: z.ZodType< - DataHealthCheckResponseBody$Outbound, - z.ZodTypeDef, - DataHealthCheckResponseBody -> = z - .instanceof(DataHealthCheckResponseBody) - .transform((v) => v.data$) - .pipe( - z.object({ - status: z.string().optional(), - info: z.nullable(z.record(z.lazy(() => DataHealthCheckInfo$outboundSchema))).optional(), - error: z - .nullable(z.record(z.lazy(() => DataHealthCheckError$outboundSchema))) - .optional(), - details: z.record(z.lazy(() => DataHealthCheckDetails$outboundSchema)).optional(), - }) - ); + DataHealthCheckResponseBody$Outbound, + z.ZodTypeDef, + DataHealthCheckResponseBody +> = z.instanceof(DataHealthCheckResponseBody) + .transform(v => v.data$) + .pipe(z.object({ + status: z.string().optional(), + info: z.nullable(z.record(z.lazy(() => DataHealthCheckInfo$outboundSchema))) + .optional(), + error: z.nullable( + z.record(z.lazy(() => DataHealthCheckError$outboundSchema)), + ).optional(), + details: z.record(z.lazy(() => DataHealthCheckDetails$outboundSchema)) + .optional(), + })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DataHealthCheckResponseBody$ { - /** @deprecated use `DataHealthCheckResponseBody$inboundSchema` instead. */ - export const inboundSchema = DataHealthCheckResponseBody$inboundSchema; - /** @deprecated use `DataHealthCheckResponseBody$outboundSchema` instead. */ - export const outboundSchema = DataHealthCheckResponseBody$outboundSchema; - /** @deprecated use `DataHealthCheckResponseBody$Outbound` instead. */ - export type Outbound = DataHealthCheckResponseBody$Outbound; + /** @deprecated use `DataHealthCheckResponseBody$inboundSchema` instead. */ + export const inboundSchema = DataHealthCheckResponseBody$inboundSchema; + /** @deprecated use `DataHealthCheckResponseBody$outboundSchema` instead. */ + export const outboundSchema = DataHealthCheckResponseBody$outboundSchema; + /** @deprecated use `DataHealthCheckResponseBody$Outbound` instead. */ + export type Outbound = DataHealthCheckResponseBody$Outbound; } diff --git a/src/models/errors/forbidden.ts b/src/models/errors/forbidden.ts index ed64926..6d3b584 100644 --- a/src/models/errors/forbidden.ts +++ b/src/models/errors/forbidden.ts @@ -17,18 +17,18 @@ export type ForbiddenMessage = string | Array; * the server responds with 403. */ export type ForbiddenData = { - /** - * The error message describing the reason for the exception - */ - message: string | Array; - /** - * The HTTP status code of the response - */ - statusCode: number; - /** - * The type of error - */ - error: string; + /** + * The error message describing the reason for the exception + */ + message: string | Array; + /** + * The HTTP status code of the response + */ + statusCode: number; + /** + * The type of error + */ + error: string; }; /** @@ -39,45 +39,47 @@ export type ForbiddenData = { * the server responds with 403. */ export class Forbidden extends Error { - /** - * The HTTP status code of the response - */ - statusCode: number; - /** - * The type of error - */ - error: string; - - /** The original data that was passed to this error instance. */ - data$: ForbiddenData; - - constructor(err: ForbiddenData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; - - this.statusCode = err.statusCode; - this.error = err.error; - - this.name = "Forbidden"; - } + /** + * The HTTP status code of the response + */ + statusCode: number; + /** + * The type of error + */ + error: string; + + /** The original data that was passed to this error instance. */ + data$: ForbiddenData; + + constructor(err: ForbiddenData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + this.statusCode = err.statusCode; + this.error = err.error; + + this.name = "Forbidden"; + } } /** @internal */ -export const ForbiddenMessage$inboundSchema: z.ZodType = - z.union([z.string(), z.array(z.string())]); +export const ForbiddenMessage$inboundSchema: z.ZodType< + ForbiddenMessage, + z.ZodTypeDef, + unknown +> = z.union([z.string(), z.array(z.string())]); /** @internal */ export type ForbiddenMessage$Outbound = string | Array; /** @internal */ export const ForbiddenMessage$outboundSchema: z.ZodType< - ForbiddenMessage$Outbound, - z.ZodTypeDef, - ForbiddenMessage + ForbiddenMessage$Outbound, + z.ZodTypeDef, + ForbiddenMessage > = z.union([z.string(), z.array(z.string())]); /** @@ -85,53 +87,57 @@ export const ForbiddenMessage$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ForbiddenMessage$ { - /** @deprecated use `ForbiddenMessage$inboundSchema` instead. */ - export const inboundSchema = ForbiddenMessage$inboundSchema; - /** @deprecated use `ForbiddenMessage$outboundSchema` instead. */ - export const outboundSchema = ForbiddenMessage$outboundSchema; - /** @deprecated use `ForbiddenMessage$Outbound` instead. */ - export type Outbound = ForbiddenMessage$Outbound; + /** @deprecated use `ForbiddenMessage$inboundSchema` instead. */ + export const inboundSchema = ForbiddenMessage$inboundSchema; + /** @deprecated use `ForbiddenMessage$outboundSchema` instead. */ + export const outboundSchema = ForbiddenMessage$outboundSchema; + /** @deprecated use `ForbiddenMessage$Outbound` instead. */ + export type Outbound = ForbiddenMessage$Outbound; } /** @internal */ -export const Forbidden$inboundSchema: z.ZodType = z - .object({ - message: z.union([z.string(), z.array(z.string())]), - statusCode: z.number(), - error: z.string(), - }) - .transform((v) => { - return new Forbidden(v); - }); +export const Forbidden$inboundSchema: z.ZodType< + Forbidden, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.union([z.string(), z.array(z.string())]), + statusCode: z.number(), + error: z.string(), +}) + .transform((v) => { + return new Forbidden(v); + }); /** @internal */ export type Forbidden$Outbound = { - message: string | Array; - statusCode: number; - error: string; + message: string | Array; + statusCode: number; + error: string; }; /** @internal */ -export const Forbidden$outboundSchema: z.ZodType = z - .instanceof(Forbidden) - .transform((v) => v.data$) - .pipe( - z.object({ - message: z.union([z.string(), z.array(z.string())]), - statusCode: z.number(), - error: z.string(), - }) - ); +export const Forbidden$outboundSchema: z.ZodType< + Forbidden$Outbound, + z.ZodTypeDef, + Forbidden +> = z.instanceof(Forbidden) + .transform(v => v.data$) + .pipe(z.object({ + message: z.union([z.string(), z.array(z.string())]), + statusCode: z.number(), + error: z.string(), + })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Forbidden$ { - /** @deprecated use `Forbidden$inboundSchema` instead. */ - export const inboundSchema = Forbidden$inboundSchema; - /** @deprecated use `Forbidden$outboundSchema` instead. */ - export const outboundSchema = Forbidden$outboundSchema; - /** @deprecated use `Forbidden$Outbound` instead. */ - export type Outbound = Forbidden$Outbound; + /** @deprecated use `Forbidden$inboundSchema` instead. */ + export const inboundSchema = Forbidden$inboundSchema; + /** @deprecated use `Forbidden$outboundSchema` instead. */ + export const outboundSchema = Forbidden$outboundSchema; + /** @deprecated use `Forbidden$Outbound` instead. */ + export type Outbound = Forbidden$Outbound; } diff --git a/src/models/errors/httpclienterrors.ts b/src/models/errors/httpclienterrors.ts index cdb2995..b34f612 100644 --- a/src/models/errors/httpclienterrors.ts +++ b/src/models/errors/httpclienterrors.ts @@ -6,43 +6,43 @@ * Base class for all HTTP errors. */ export class HTTPClientError extends Error { - /** The underlying cause of the error. */ - override readonly cause: unknown; - override name = "HTTPClientError"; - constructor(message: string, opts?: { cause?: unknown }) { - let msg = message; - if (opts?.cause) { - msg += `: ${opts.cause}`; - } + /** The underlying cause of the error. */ + override readonly cause: unknown; + override name = "HTTPClientError"; + constructor(message: string, opts?: { cause?: unknown }) { + let msg = message; + if (opts?.cause) { + msg += `: ${opts.cause}`; + } - super(msg, opts); - // In older runtimes, the cause field would not have been assigned through - // the super() call. - if (typeof this.cause === "undefined") { - this.cause = opts?.cause; - } + super(msg, opts); + // In older runtimes, the cause field would not have been assigned through + // the super() call. + if (typeof this.cause === "undefined") { + this.cause = opts?.cause; } + } } /** * An error to capture unrecognised or unexpected errors when making HTTP calls. */ export class UnexpectedClientError extends HTTPClientError { - override name = "UnexpectedClientError"; + override name = "UnexpectedClientError"; } /** * An error that is raised when any inputs used to create a request are invalid. */ export class InvalidRequestError extends HTTPClientError { - override name = "InvalidRequestError"; + override name = "InvalidRequestError"; } /** * An error that is raised when a HTTP request was aborted by the client error. */ export class RequestAbortedError extends HTTPClientError { - override readonly name = "RequestAbortedError"; + override readonly name = "RequestAbortedError"; } /** @@ -50,7 +50,7 @@ export class RequestAbortedError extends HTTPClientError { * signal timeout. */ export class RequestTimeoutError extends HTTPClientError { - override readonly name = "RequestTimeoutError"; + override readonly name = "RequestTimeoutError"; } /** @@ -58,5 +58,5 @@ export class RequestTimeoutError extends HTTPClientError { * a server. */ export class ConnectionError extends HTTPClientError { - override readonly name = "ConnectionError"; + override readonly name = "ConnectionError"; } diff --git a/src/models/errors/internalservererror.ts b/src/models/errors/internalservererror.ts index 2f2beab..d9bf549 100644 --- a/src/models/errors/internalservererror.ts +++ b/src/models/errors/internalservererror.ts @@ -18,18 +18,18 @@ export type InternalServerErrorMessage = string | Array; * persists for a longer duration. */ export type InternalServerErrorData = { - /** - * The error message describing the reason for the exception - */ - message: string | Array; - /** - * The HTTP status code of the response - */ - statusCode: number; - /** - * The type of error - */ - error: string; + /** + * The error message describing the reason for the exception + */ + message: string | Array; + /** + * The HTTP status code of the response + */ + statusCode: number; + /** + * The type of error + */ + error: string; }; /** @@ -41,38 +41,37 @@ export type InternalServerErrorData = { * persists for a longer duration. */ export class InternalServerError extends Error { - /** - * The HTTP status code of the response - */ - statusCode: number; - /** - * The type of error - */ - error: string; - - /** The original data that was passed to this error instance. */ - data$: InternalServerErrorData; - - constructor(err: InternalServerErrorData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; - - this.statusCode = err.statusCode; - this.error = err.error; - - this.name = "InternalServerError"; - } + /** + * The HTTP status code of the response + */ + statusCode: number; + /** + * The type of error + */ + error: string; + + /** The original data that was passed to this error instance. */ + data$: InternalServerErrorData; + + constructor(err: InternalServerErrorData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + this.statusCode = err.statusCode; + this.error = err.error; + + this.name = "InternalServerError"; + } } /** @internal */ export const InternalServerErrorMessage$inboundSchema: z.ZodType< - InternalServerErrorMessage, - z.ZodTypeDef, - unknown + InternalServerErrorMessage, + z.ZodTypeDef, + unknown > = z.union([z.string(), z.array(z.string())]); /** @internal */ @@ -80,9 +79,9 @@ export type InternalServerErrorMessage$Outbound = string | Array; /** @internal */ export const InternalServerErrorMessage$outboundSchema: z.ZodType< - InternalServerErrorMessage$Outbound, - z.ZodTypeDef, - InternalServerErrorMessage + InternalServerErrorMessage$Outbound, + z.ZodTypeDef, + InternalServerErrorMessage > = z.union([z.string(), z.array(z.string())]); /** @@ -90,61 +89,57 @@ export const InternalServerErrorMessage$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace InternalServerErrorMessage$ { - /** @deprecated use `InternalServerErrorMessage$inboundSchema` instead. */ - export const inboundSchema = InternalServerErrorMessage$inboundSchema; - /** @deprecated use `InternalServerErrorMessage$outboundSchema` instead. */ - export const outboundSchema = InternalServerErrorMessage$outboundSchema; - /** @deprecated use `InternalServerErrorMessage$Outbound` instead. */ - export type Outbound = InternalServerErrorMessage$Outbound; + /** @deprecated use `InternalServerErrorMessage$inboundSchema` instead. */ + export const inboundSchema = InternalServerErrorMessage$inboundSchema; + /** @deprecated use `InternalServerErrorMessage$outboundSchema` instead. */ + export const outboundSchema = InternalServerErrorMessage$outboundSchema; + /** @deprecated use `InternalServerErrorMessage$Outbound` instead. */ + export type Outbound = InternalServerErrorMessage$Outbound; } /** @internal */ export const InternalServerError$inboundSchema: z.ZodType< - InternalServerError, - z.ZodTypeDef, - unknown -> = z - .object({ - message: z.union([z.string(), z.array(z.string())]), - statusCode: z.number(), - error: z.string(), - }) - .transform((v) => { - return new InternalServerError(v); - }); + InternalServerError, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.union([z.string(), z.array(z.string())]), + statusCode: z.number(), + error: z.string(), +}) + .transform((v) => { + return new InternalServerError(v); + }); /** @internal */ export type InternalServerError$Outbound = { - message: string | Array; - statusCode: number; - error: string; + message: string | Array; + statusCode: number; + error: string; }; /** @internal */ export const InternalServerError$outboundSchema: z.ZodType< - InternalServerError$Outbound, - z.ZodTypeDef, - InternalServerError -> = z - .instanceof(InternalServerError) - .transform((v) => v.data$) - .pipe( - z.object({ - message: z.union([z.string(), z.array(z.string())]), - statusCode: z.number(), - error: z.string(), - }) - ); + InternalServerError$Outbound, + z.ZodTypeDef, + InternalServerError +> = z.instanceof(InternalServerError) + .transform(v => v.data$) + .pipe(z.object({ + message: z.union([z.string(), z.array(z.string())]), + statusCode: z.number(), + error: z.string(), + })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace InternalServerError$ { - /** @deprecated use `InternalServerError$inboundSchema` instead. */ - export const inboundSchema = InternalServerError$inboundSchema; - /** @deprecated use `InternalServerError$outboundSchema` instead. */ - export const outboundSchema = InternalServerError$outboundSchema; - /** @deprecated use `InternalServerError$Outbound` instead. */ - export type Outbound = InternalServerError$Outbound; + /** @deprecated use `InternalServerError$inboundSchema` instead. */ + export const inboundSchema = InternalServerError$inboundSchema; + /** @deprecated use `InternalServerError$outboundSchema` instead. */ + export const outboundSchema = InternalServerError$outboundSchema; + /** @deprecated use `InternalServerError$Outbound` instead. */ + export type Outbound = InternalServerError$Outbound; } diff --git a/src/models/errors/metricshealthcheck.ts b/src/models/errors/metricshealthcheck.ts index 9361914..56c02b3 100644 --- a/src/models/errors/metricshealthcheck.ts +++ b/src/models/errors/metricshealthcheck.ts @@ -2,254 +2,241 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { collectExtraKeys as collectExtraKeys$ } from "../../lib/schemas.js"; -import * as z from "zod"; export type Info = { - status?: string | undefined; - additionalProperties: { [k: string]: string }; + status?: string | undefined; + additionalProperties: { [k: string]: string }; }; export type ErrorT = { - status?: string | undefined; - additionalProperties: { [k: string]: string }; + status?: string | undefined; + additionalProperties: { [k: string]: string }; }; export type Details = { - status?: string | undefined; - additionalProperties: { [k: string]: string }; + status?: string | undefined; + additionalProperties: { [k: string]: string }; }; /** * The Health Check is not successful */ export type MetricsHealthCheckResponseBodyData = { - status?: string | undefined; - info?: { [k: string]: Info } | null | undefined; - error?: { [k: string]: ErrorT } | null | undefined; - details?: { [k: string]: Details } | undefined; + status?: string | undefined; + info?: { [k: string]: Info } | null | undefined; + error?: { [k: string]: ErrorT } | null | undefined; + details?: { [k: string]: Details } | undefined; }; /** * The Health Check is not successful */ export class MetricsHealthCheckResponseBody extends Error { - status?: string | undefined; - info?: { [k: string]: Info } | null | undefined; - error?: { [k: string]: ErrorT } | null | undefined; - details?: { [k: string]: Details } | undefined; - - /** The original data that was passed to this error instance. */ - data$: MetricsHealthCheckResponseBodyData; - - constructor(err: MetricsHealthCheckResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; - - if (err.status != null) { - this.status = err.status; - } - if (err.info != null) { - this.info = err.info; - } - if (err.error != null) { - this.error = err.error; - } - if (err.details != null) { - this.details = err.details; - } - - this.name = "MetricsHealthCheckResponseBody"; - } + status?: string | undefined; + info?: { [k: string]: Info } | null | undefined; + error?: { [k: string]: ErrorT } | null | undefined; + details?: { [k: string]: Details } | undefined; + + /** The original data that was passed to this error instance. */ + data$: MetricsHealthCheckResponseBodyData; + + constructor(err: MetricsHealthCheckResponseBodyData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + if (err.status != null) this.status = err.status; + if (err.info != null) this.info = err.info; + if (err.error != null) this.error = err.error; + if (err.details != null) this.details = err.details; + + this.name = "MetricsHealthCheckResponseBody"; + } } /** @internal */ -export const Info$inboundSchema: z.ZodType = collectExtraKeys$( - z - .object({ - status: z.string().optional(), - }) - .catchall(z.string()), - "additionalProperties" -); +export const Info$inboundSchema: z.ZodType = + collectExtraKeys$( + z.object({ + status: z.string().optional(), + }).catchall(z.string()), + "additionalProperties", + ); /** @internal */ export type Info$Outbound = { - status?: string | undefined; - [additionalProperties: string]: unknown; + status?: string | undefined; + [additionalProperties: string]: unknown; }; /** @internal */ -export const Info$outboundSchema: z.ZodType = z - .object({ - status: z.string().optional(), - additionalProperties: z.record(z.string()), - }) - .transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }); +export const Info$outboundSchema: z.ZodType = + z.object({ + status: z.string().optional(), + additionalProperties: z.record(z.string()), + }).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Info$ { - /** @deprecated use `Info$inboundSchema` instead. */ - export const inboundSchema = Info$inboundSchema; - /** @deprecated use `Info$outboundSchema` instead. */ - export const outboundSchema = Info$outboundSchema; - /** @deprecated use `Info$Outbound` instead. */ - export type Outbound = Info$Outbound; + /** @deprecated use `Info$inboundSchema` instead. */ + export const inboundSchema = Info$inboundSchema; + /** @deprecated use `Info$outboundSchema` instead. */ + export const outboundSchema = Info$outboundSchema; + /** @deprecated use `Info$Outbound` instead. */ + export type Outbound = Info$Outbound; } /** @internal */ -export const ErrorT$inboundSchema: z.ZodType = collectExtraKeys$( - z - .object({ - status: z.string().optional(), - }) - .catchall(z.string()), - "additionalProperties" -); +export const ErrorT$inboundSchema: z.ZodType = + collectExtraKeys$( + z.object({ + status: z.string().optional(), + }).catchall(z.string()), + "additionalProperties", + ); /** @internal */ export type ErrorT$Outbound = { - status?: string | undefined; - [additionalProperties: string]: unknown; + status?: string | undefined; + [additionalProperties: string]: unknown; }; /** @internal */ -export const ErrorT$outboundSchema: z.ZodType = z - .object({ - status: z.string().optional(), - additionalProperties: z.record(z.string()), - }) - .transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }); +export const ErrorT$outboundSchema: z.ZodType< + ErrorT$Outbound, + z.ZodTypeDef, + ErrorT +> = z.object({ + status: z.string().optional(), + additionalProperties: z.record(z.string()), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ErrorT$ { - /** @deprecated use `ErrorT$inboundSchema` instead. */ - export const inboundSchema = ErrorT$inboundSchema; - /** @deprecated use `ErrorT$outboundSchema` instead. */ - export const outboundSchema = ErrorT$outboundSchema; - /** @deprecated use `ErrorT$Outbound` instead. */ - export type Outbound = ErrorT$Outbound; + /** @deprecated use `ErrorT$inboundSchema` instead. */ + export const inboundSchema = ErrorT$inboundSchema; + /** @deprecated use `ErrorT$outboundSchema` instead. */ + export const outboundSchema = ErrorT$outboundSchema; + /** @deprecated use `ErrorT$Outbound` instead. */ + export type Outbound = ErrorT$Outbound; } /** @internal */ -export const Details$inboundSchema: z.ZodType = collectExtraKeys$( - z - .object({ - status: z.string().optional(), - }) - .catchall(z.string()), - "additionalProperties" -); +export const Details$inboundSchema: z.ZodType = + collectExtraKeys$( + z.object({ + status: z.string().optional(), + }).catchall(z.string()), + "additionalProperties", + ); /** @internal */ export type Details$Outbound = { - status?: string | undefined; - [additionalProperties: string]: unknown; + status?: string | undefined; + [additionalProperties: string]: unknown; }; /** @internal */ -export const Details$outboundSchema: z.ZodType = z - .object({ - status: z.string().optional(), - additionalProperties: z.record(z.string()), - }) - .transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }); +export const Details$outboundSchema: z.ZodType< + Details$Outbound, + z.ZodTypeDef, + Details +> = z.object({ + status: z.string().optional(), + additionalProperties: z.record(z.string()), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Details$ { - /** @deprecated use `Details$inboundSchema` instead. */ - export const inboundSchema = Details$inboundSchema; - /** @deprecated use `Details$outboundSchema` instead. */ - export const outboundSchema = Details$outboundSchema; - /** @deprecated use `Details$Outbound` instead. */ - export type Outbound = Details$Outbound; + /** @deprecated use `Details$inboundSchema` instead. */ + export const inboundSchema = Details$inboundSchema; + /** @deprecated use `Details$outboundSchema` instead. */ + export const outboundSchema = Details$outboundSchema; + /** @deprecated use `Details$Outbound` instead. */ + export type Outbound = Details$Outbound; } /** @internal */ export const MetricsHealthCheckResponseBody$inboundSchema: z.ZodType< - MetricsHealthCheckResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - status: z.string().optional(), - info: z.nullable(z.record(z.lazy(() => Info$inboundSchema))).optional(), - error: z.nullable(z.record(z.lazy(() => ErrorT$inboundSchema))).optional(), - details: z.record(z.lazy(() => Details$inboundSchema)).optional(), - }) - .transform((v) => { - return new MetricsHealthCheckResponseBody(v); - }); + MetricsHealthCheckResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + status: z.string().optional(), + info: z.nullable(z.record(z.lazy(() => Info$inboundSchema))).optional(), + error: z.nullable(z.record(z.lazy(() => ErrorT$inboundSchema))).optional(), + details: z.record(z.lazy(() => Details$inboundSchema)).optional(), +}) + .transform((v) => { + return new MetricsHealthCheckResponseBody(v); + }); /** @internal */ export type MetricsHealthCheckResponseBody$Outbound = { - status?: string | undefined; - info?: { [k: string]: Info$Outbound } | null | undefined; - error?: { [k: string]: ErrorT$Outbound } | null | undefined; - details?: { [k: string]: Details$Outbound } | undefined; + status?: string | undefined; + info?: { [k: string]: Info$Outbound } | null | undefined; + error?: { [k: string]: ErrorT$Outbound } | null | undefined; + details?: { [k: string]: Details$Outbound } | undefined; }; /** @internal */ export const MetricsHealthCheckResponseBody$outboundSchema: z.ZodType< - MetricsHealthCheckResponseBody$Outbound, - z.ZodTypeDef, - MetricsHealthCheckResponseBody -> = z - .instanceof(MetricsHealthCheckResponseBody) - .transform((v) => v.data$) - .pipe( - z.object({ - status: z.string().optional(), - info: z.nullable(z.record(z.lazy(() => Info$outboundSchema))).optional(), - error: z.nullable(z.record(z.lazy(() => ErrorT$outboundSchema))).optional(), - details: z.record(z.lazy(() => Details$outboundSchema)).optional(), - }) - ); + MetricsHealthCheckResponseBody$Outbound, + z.ZodTypeDef, + MetricsHealthCheckResponseBody +> = z.instanceof(MetricsHealthCheckResponseBody) + .transform(v => v.data$) + .pipe(z.object({ + status: z.string().optional(), + info: z.nullable(z.record(z.lazy(() => Info$outboundSchema))).optional(), + error: z.nullable(z.record(z.lazy(() => ErrorT$outboundSchema))).optional(), + details: z.record(z.lazy(() => Details$outboundSchema)).optional(), + })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MetricsHealthCheckResponseBody$ { - /** @deprecated use `MetricsHealthCheckResponseBody$inboundSchema` instead. */ - export const inboundSchema = MetricsHealthCheckResponseBody$inboundSchema; - /** @deprecated use `MetricsHealthCheckResponseBody$outboundSchema` instead. */ - export const outboundSchema = MetricsHealthCheckResponseBody$outboundSchema; - /** @deprecated use `MetricsHealthCheckResponseBody$Outbound` instead. */ - export type Outbound = MetricsHealthCheckResponseBody$Outbound; + /** @deprecated use `MetricsHealthCheckResponseBody$inboundSchema` instead. */ + export const inboundSchema = MetricsHealthCheckResponseBody$inboundSchema; + /** @deprecated use `MetricsHealthCheckResponseBody$outboundSchema` instead. */ + export const outboundSchema = MetricsHealthCheckResponseBody$outboundSchema; + /** @deprecated use `MetricsHealthCheckResponseBody$Outbound` instead. */ + export type Outbound = MetricsHealthCheckResponseBody$Outbound; } diff --git a/src/models/errors/notfound.ts b/src/models/errors/notfound.ts index 2e1a892..e1f84f8 100644 --- a/src/models/errors/notfound.ts +++ b/src/models/errors/notfound.ts @@ -17,18 +17,18 @@ export type NotFoundMessage = string | Array; * or the resource doesn't exist. */ export type NotFoundData = { - /** - * The error message describing the reason for the exception - */ - message: string | Array; - /** - * The HTTP status code of the response - */ - statusCode: number; - /** - * The type of error - */ - error: string; + /** + * The error message describing the reason for the exception + */ + message: string | Array; + /** + * The HTTP status code of the response + */ + statusCode: number; + /** + * The type of error + */ + error: string; }; /** @@ -39,45 +39,47 @@ export type NotFoundData = { * or the resource doesn't exist. */ export class NotFound extends Error { - /** - * The HTTP status code of the response - */ - statusCode: number; - /** - * The type of error - */ - error: string; - - /** The original data that was passed to this error instance. */ - data$: NotFoundData; - - constructor(err: NotFoundData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; - - this.statusCode = err.statusCode; - this.error = err.error; - - this.name = "NotFound"; - } + /** + * The HTTP status code of the response + */ + statusCode: number; + /** + * The type of error + */ + error: string; + + /** The original data that was passed to this error instance. */ + data$: NotFoundData; + + constructor(err: NotFoundData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + this.statusCode = err.statusCode; + this.error = err.error; + + this.name = "NotFound"; + } } /** @internal */ -export const NotFoundMessage$inboundSchema: z.ZodType = - z.union([z.string(), z.array(z.string())]); +export const NotFoundMessage$inboundSchema: z.ZodType< + NotFoundMessage, + z.ZodTypeDef, + unknown +> = z.union([z.string(), z.array(z.string())]); /** @internal */ export type NotFoundMessage$Outbound = string | Array; /** @internal */ export const NotFoundMessage$outboundSchema: z.ZodType< - NotFoundMessage$Outbound, - z.ZodTypeDef, - NotFoundMessage + NotFoundMessage$Outbound, + z.ZodTypeDef, + NotFoundMessage > = z.union([z.string(), z.array(z.string())]); /** @@ -85,53 +87,57 @@ export const NotFoundMessage$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NotFoundMessage$ { - /** @deprecated use `NotFoundMessage$inboundSchema` instead. */ - export const inboundSchema = NotFoundMessage$inboundSchema; - /** @deprecated use `NotFoundMessage$outboundSchema` instead. */ - export const outboundSchema = NotFoundMessage$outboundSchema; - /** @deprecated use `NotFoundMessage$Outbound` instead. */ - export type Outbound = NotFoundMessage$Outbound; + /** @deprecated use `NotFoundMessage$inboundSchema` instead. */ + export const inboundSchema = NotFoundMessage$inboundSchema; + /** @deprecated use `NotFoundMessage$outboundSchema` instead. */ + export const outboundSchema = NotFoundMessage$outboundSchema; + /** @deprecated use `NotFoundMessage$Outbound` instead. */ + export type Outbound = NotFoundMessage$Outbound; } /** @internal */ -export const NotFound$inboundSchema: z.ZodType = z - .object({ - message: z.union([z.string(), z.array(z.string())]), - statusCode: z.number(), - error: z.string(), - }) - .transform((v) => { - return new NotFound(v); - }); +export const NotFound$inboundSchema: z.ZodType< + NotFound, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.union([z.string(), z.array(z.string())]), + statusCode: z.number(), + error: z.string(), +}) + .transform((v) => { + return new NotFound(v); + }); /** @internal */ export type NotFound$Outbound = { - message: string | Array; - statusCode: number; - error: string; + message: string | Array; + statusCode: number; + error: string; }; /** @internal */ -export const NotFound$outboundSchema: z.ZodType = z - .instanceof(NotFound) - .transform((v) => v.data$) - .pipe( - z.object({ - message: z.union([z.string(), z.array(z.string())]), - statusCode: z.number(), - error: z.string(), - }) - ); +export const NotFound$outboundSchema: z.ZodType< + NotFound$Outbound, + z.ZodTypeDef, + NotFound +> = z.instanceof(NotFound) + .transform(v => v.data$) + .pipe(z.object({ + message: z.union([z.string(), z.array(z.string())]), + statusCode: z.number(), + error: z.string(), + })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace NotFound$ { - /** @deprecated use `NotFound$inboundSchema` instead. */ - export const inboundSchema = NotFound$inboundSchema; - /** @deprecated use `NotFound$outboundSchema` instead. */ - export const outboundSchema = NotFound$outboundSchema; - /** @deprecated use `NotFound$Outbound` instead. */ - export type Outbound = NotFound$Outbound; + /** @deprecated use `NotFound$inboundSchema` instead. */ + export const inboundSchema = NotFound$inboundSchema; + /** @deprecated use `NotFound$outboundSchema` instead. */ + export const outboundSchema = NotFound$outboundSchema; + /** @deprecated use `NotFound$Outbound` instead. */ + export type Outbound = NotFound$Outbound; } diff --git a/src/models/errors/sdkerror.ts b/src/models/errors/sdkerror.ts index 80e3aa4..001f465 100644 --- a/src/models/errors/sdkerror.ts +++ b/src/models/errors/sdkerror.ts @@ -3,23 +3,25 @@ */ export class SDKError extends Error { - public readonly statusCode: number; - public readonly contentType: string; + public readonly statusCode: number; + public readonly contentType: string; - constructor( - message: string, - public readonly rawResponse: Response, - public readonly body: string = "" - ) { - const statusCode = rawResponse.status; - const contentType = rawResponse.headers.get("content-type") || ""; - const bodyString = body.length > 0 ? `\n${body}` : ""; + constructor( + message: string, + public readonly rawResponse: Response, + public readonly body: string = "", + ) { + const statusCode = rawResponse.status; + const contentType = rawResponse.headers.get("content-type") || ""; + const bodyString = body.length > 0 ? `\n${body}` : ""; - super(`${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`); + super( + `${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`, + ); - this.statusCode = statusCode; - this.contentType = contentType; + this.statusCode = statusCode; + this.contentType = contentType; - this.name = "SDKError"; - } + this.name = "SDKError"; + } } diff --git a/src/models/errors/serviceunavailable.ts b/src/models/errors/serviceunavailable.ts index 757f395..00afa86 100644 --- a/src/models/errors/serviceunavailable.ts +++ b/src/models/errors/serviceunavailable.ts @@ -17,18 +17,18 @@ export type ServiceUnavailableMessage = string | Array; * not necessarily mean the Subnet is down or affected. */ export type ServiceUnavailableData = { - /** - * The error message describing the reason for the exception - */ - message: string | Array; - /** - * The HTTP status code of the response - */ - statusCode: number; - /** - * The type of error - */ - error: string; + /** + * The error message describing the reason for the exception + */ + message: string | Array; + /** + * The HTTP status code of the response + */ + statusCode: number; + /** + * The type of error + */ + error: string; }; /** @@ -39,38 +39,37 @@ export type ServiceUnavailableData = { * not necessarily mean the Subnet is down or affected. */ export class ServiceUnavailable extends Error { - /** - * The HTTP status code of the response - */ - statusCode: number; - /** - * The type of error - */ - error: string; - - /** The original data that was passed to this error instance. */ - data$: ServiceUnavailableData; - - constructor(err: ServiceUnavailableData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; - - this.statusCode = err.statusCode; - this.error = err.error; - - this.name = "ServiceUnavailable"; - } + /** + * The HTTP status code of the response + */ + statusCode: number; + /** + * The type of error + */ + error: string; + + /** The original data that was passed to this error instance. */ + data$: ServiceUnavailableData; + + constructor(err: ServiceUnavailableData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + this.statusCode = err.statusCode; + this.error = err.error; + + this.name = "ServiceUnavailable"; + } } /** @internal */ export const ServiceUnavailableMessage$inboundSchema: z.ZodType< - ServiceUnavailableMessage, - z.ZodTypeDef, - unknown + ServiceUnavailableMessage, + z.ZodTypeDef, + unknown > = z.union([z.string(), z.array(z.string())]); /** @internal */ @@ -78,9 +77,9 @@ export type ServiceUnavailableMessage$Outbound = string | Array; /** @internal */ export const ServiceUnavailableMessage$outboundSchema: z.ZodType< - ServiceUnavailableMessage$Outbound, - z.ZodTypeDef, - ServiceUnavailableMessage + ServiceUnavailableMessage$Outbound, + z.ZodTypeDef, + ServiceUnavailableMessage > = z.union([z.string(), z.array(z.string())]); /** @@ -88,61 +87,57 @@ export const ServiceUnavailableMessage$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ServiceUnavailableMessage$ { - /** @deprecated use `ServiceUnavailableMessage$inboundSchema` instead. */ - export const inboundSchema = ServiceUnavailableMessage$inboundSchema; - /** @deprecated use `ServiceUnavailableMessage$outboundSchema` instead. */ - export const outboundSchema = ServiceUnavailableMessage$outboundSchema; - /** @deprecated use `ServiceUnavailableMessage$Outbound` instead. */ - export type Outbound = ServiceUnavailableMessage$Outbound; + /** @deprecated use `ServiceUnavailableMessage$inboundSchema` instead. */ + export const inboundSchema = ServiceUnavailableMessage$inboundSchema; + /** @deprecated use `ServiceUnavailableMessage$outboundSchema` instead. */ + export const outboundSchema = ServiceUnavailableMessage$outboundSchema; + /** @deprecated use `ServiceUnavailableMessage$Outbound` instead. */ + export type Outbound = ServiceUnavailableMessage$Outbound; } /** @internal */ export const ServiceUnavailable$inboundSchema: z.ZodType< - ServiceUnavailable, - z.ZodTypeDef, - unknown -> = z - .object({ - message: z.union([z.string(), z.array(z.string())]), - statusCode: z.number(), - error: z.string(), - }) - .transform((v) => { - return new ServiceUnavailable(v); - }); + ServiceUnavailable, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.union([z.string(), z.array(z.string())]), + statusCode: z.number(), + error: z.string(), +}) + .transform((v) => { + return new ServiceUnavailable(v); + }); /** @internal */ export type ServiceUnavailable$Outbound = { - message: string | Array; - statusCode: number; - error: string; + message: string | Array; + statusCode: number; + error: string; }; /** @internal */ export const ServiceUnavailable$outboundSchema: z.ZodType< - ServiceUnavailable$Outbound, - z.ZodTypeDef, - ServiceUnavailable -> = z - .instanceof(ServiceUnavailable) - .transform((v) => v.data$) - .pipe( - z.object({ - message: z.union([z.string(), z.array(z.string())]), - statusCode: z.number(), - error: z.string(), - }) - ); + ServiceUnavailable$Outbound, + z.ZodTypeDef, + ServiceUnavailable +> = z.instanceof(ServiceUnavailable) + .transform(v => v.data$) + .pipe(z.object({ + message: z.union([z.string(), z.array(z.string())]), + statusCode: z.number(), + error: z.string(), + })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ServiceUnavailable$ { - /** @deprecated use `ServiceUnavailable$inboundSchema` instead. */ - export const inboundSchema = ServiceUnavailable$inboundSchema; - /** @deprecated use `ServiceUnavailable$outboundSchema` instead. */ - export const outboundSchema = ServiceUnavailable$outboundSchema; - /** @deprecated use `ServiceUnavailable$Outbound` instead. */ - export type Outbound = ServiceUnavailable$Outbound; + /** @deprecated use `ServiceUnavailable$inboundSchema` instead. */ + export const inboundSchema = ServiceUnavailable$inboundSchema; + /** @deprecated use `ServiceUnavailable$outboundSchema` instead. */ + export const outboundSchema = ServiceUnavailable$outboundSchema; + /** @deprecated use `ServiceUnavailable$Outbound` instead. */ + export type Outbound = ServiceUnavailable$Outbound; } diff --git a/src/models/errors/toomanyrequests.ts b/src/models/errors/toomanyrequests.ts index 411617b..3e3b1f6 100644 --- a/src/models/errors/toomanyrequests.ts +++ b/src/models/errors/toomanyrequests.ts @@ -16,18 +16,18 @@ export type TooManyRequestsMessage = string | Array; * and has hit the rate limit. */ export type TooManyRequestsData = { - /** - * The error message describing the reason for the exception - */ - message: string | Array; - /** - * The HTTP status code of the response - */ - statusCode: number; - /** - * The type of error - */ - error: string; + /** + * The error message describing the reason for the exception + */ + message: string | Array; + /** + * The HTTP status code of the response + */ + statusCode: number; + /** + * The type of error + */ + error: string; }; /** @@ -37,38 +37,37 @@ export type TooManyRequestsData = { * and has hit the rate limit. */ export class TooManyRequests extends Error { - /** - * The HTTP status code of the response - */ - statusCode: number; - /** - * The type of error - */ - error: string; - - /** The original data that was passed to this error instance. */ - data$: TooManyRequestsData; - - constructor(err: TooManyRequestsData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; - - this.statusCode = err.statusCode; - this.error = err.error; - - this.name = "TooManyRequests"; - } + /** + * The HTTP status code of the response + */ + statusCode: number; + /** + * The type of error + */ + error: string; + + /** The original data that was passed to this error instance. */ + data$: TooManyRequestsData; + + constructor(err: TooManyRequestsData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + this.statusCode = err.statusCode; + this.error = err.error; + + this.name = "TooManyRequests"; + } } /** @internal */ export const TooManyRequestsMessage$inboundSchema: z.ZodType< - TooManyRequestsMessage, - z.ZodTypeDef, - unknown + TooManyRequestsMessage, + z.ZodTypeDef, + unknown > = z.union([z.string(), z.array(z.string())]); /** @internal */ @@ -76,9 +75,9 @@ export type TooManyRequestsMessage$Outbound = string | Array; /** @internal */ export const TooManyRequestsMessage$outboundSchema: z.ZodType< - TooManyRequestsMessage$Outbound, - z.ZodTypeDef, - TooManyRequestsMessage + TooManyRequestsMessage$Outbound, + z.ZodTypeDef, + TooManyRequestsMessage > = z.union([z.string(), z.array(z.string())]); /** @@ -86,57 +85,57 @@ export const TooManyRequestsMessage$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TooManyRequestsMessage$ { - /** @deprecated use `TooManyRequestsMessage$inboundSchema` instead. */ - export const inboundSchema = TooManyRequestsMessage$inboundSchema; - /** @deprecated use `TooManyRequestsMessage$outboundSchema` instead. */ - export const outboundSchema = TooManyRequestsMessage$outboundSchema; - /** @deprecated use `TooManyRequestsMessage$Outbound` instead. */ - export type Outbound = TooManyRequestsMessage$Outbound; + /** @deprecated use `TooManyRequestsMessage$inboundSchema` instead. */ + export const inboundSchema = TooManyRequestsMessage$inboundSchema; + /** @deprecated use `TooManyRequestsMessage$outboundSchema` instead. */ + export const outboundSchema = TooManyRequestsMessage$outboundSchema; + /** @deprecated use `TooManyRequestsMessage$Outbound` instead. */ + export type Outbound = TooManyRequestsMessage$Outbound; } /** @internal */ -export const TooManyRequests$inboundSchema: z.ZodType = z - .object({ - message: z.union([z.string(), z.array(z.string())]), - statusCode: z.number(), - error: z.string(), - }) - .transform((v) => { - return new TooManyRequests(v); - }); +export const TooManyRequests$inboundSchema: z.ZodType< + TooManyRequests, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.union([z.string(), z.array(z.string())]), + statusCode: z.number(), + error: z.string(), +}) + .transform((v) => { + return new TooManyRequests(v); + }); /** @internal */ export type TooManyRequests$Outbound = { - message: string | Array; - statusCode: number; - error: string; + message: string | Array; + statusCode: number; + error: string; }; /** @internal */ export const TooManyRequests$outboundSchema: z.ZodType< - TooManyRequests$Outbound, - z.ZodTypeDef, - TooManyRequests -> = z - .instanceof(TooManyRequests) - .transform((v) => v.data$) - .pipe( - z.object({ - message: z.union([z.string(), z.array(z.string())]), - statusCode: z.number(), - error: z.string(), - }) - ); + TooManyRequests$Outbound, + z.ZodTypeDef, + TooManyRequests +> = z.instanceof(TooManyRequests) + .transform(v => v.data$) + .pipe(z.object({ + message: z.union([z.string(), z.array(z.string())]), + statusCode: z.number(), + error: z.string(), + })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TooManyRequests$ { - /** @deprecated use `TooManyRequests$inboundSchema` instead. */ - export const inboundSchema = TooManyRequests$inboundSchema; - /** @deprecated use `TooManyRequests$outboundSchema` instead. */ - export const outboundSchema = TooManyRequests$outboundSchema; - /** @deprecated use `TooManyRequests$Outbound` instead. */ - export type Outbound = TooManyRequests$Outbound; + /** @deprecated use `TooManyRequests$inboundSchema` instead. */ + export const inboundSchema = TooManyRequests$inboundSchema; + /** @deprecated use `TooManyRequests$outboundSchema` instead. */ + export const outboundSchema = TooManyRequests$outboundSchema; + /** @deprecated use `TooManyRequests$Outbound` instead. */ + export type Outbound = TooManyRequests$Outbound; } diff --git a/src/models/errors/unauthorized.ts b/src/models/errors/unauthorized.ts index a23a373..26406b0 100644 --- a/src/models/errors/unauthorized.ts +++ b/src/models/errors/unauthorized.ts @@ -17,18 +17,18 @@ export type UnauthorizedMessage = string | Array; * in the request, the server responds with 401. */ export type UnauthorizedData = { - /** - * The error message describing the reason for the exception - */ - message: string | Array; - /** - * The HTTP status code of the response - */ - statusCode: number; - /** - * The type of error - */ - error: string; + /** + * The error message describing the reason for the exception + */ + message: string | Array; + /** + * The HTTP status code of the response + */ + statusCode: number; + /** + * The type of error + */ + error: string; }; /** @@ -39,38 +39,37 @@ export type UnauthorizedData = { * in the request, the server responds with 401. */ export class Unauthorized extends Error { - /** - * The HTTP status code of the response - */ - statusCode: number; - /** - * The type of error - */ - error: string; - - /** The original data that was passed to this error instance. */ - data$: UnauthorizedData; - - constructor(err: UnauthorizedData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; - - this.statusCode = err.statusCode; - this.error = err.error; - - this.name = "Unauthorized"; - } + /** + * The HTTP status code of the response + */ + statusCode: number; + /** + * The type of error + */ + error: string; + + /** The original data that was passed to this error instance. */ + data$: UnauthorizedData; + + constructor(err: UnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + this.statusCode = err.statusCode; + this.error = err.error; + + this.name = "Unauthorized"; + } } /** @internal */ export const UnauthorizedMessage$inboundSchema: z.ZodType< - UnauthorizedMessage, - z.ZodTypeDef, - unknown + UnauthorizedMessage, + z.ZodTypeDef, + unknown > = z.union([z.string(), z.array(z.string())]); /** @internal */ @@ -78,9 +77,9 @@ export type UnauthorizedMessage$Outbound = string | Array; /** @internal */ export const UnauthorizedMessage$outboundSchema: z.ZodType< - UnauthorizedMessage$Outbound, - z.ZodTypeDef, - UnauthorizedMessage + UnauthorizedMessage$Outbound, + z.ZodTypeDef, + UnauthorizedMessage > = z.union([z.string(), z.array(z.string())]); /** @@ -88,57 +87,57 @@ export const UnauthorizedMessage$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UnauthorizedMessage$ { - /** @deprecated use `UnauthorizedMessage$inboundSchema` instead. */ - export const inboundSchema = UnauthorizedMessage$inboundSchema; - /** @deprecated use `UnauthorizedMessage$outboundSchema` instead. */ - export const outboundSchema = UnauthorizedMessage$outboundSchema; - /** @deprecated use `UnauthorizedMessage$Outbound` instead. */ - export type Outbound = UnauthorizedMessage$Outbound; + /** @deprecated use `UnauthorizedMessage$inboundSchema` instead. */ + export const inboundSchema = UnauthorizedMessage$inboundSchema; + /** @deprecated use `UnauthorizedMessage$outboundSchema` instead. */ + export const outboundSchema = UnauthorizedMessage$outboundSchema; + /** @deprecated use `UnauthorizedMessage$Outbound` instead. */ + export type Outbound = UnauthorizedMessage$Outbound; } /** @internal */ -export const Unauthorized$inboundSchema: z.ZodType = z - .object({ - message: z.union([z.string(), z.array(z.string())]), - statusCode: z.number(), - error: z.string(), - }) - .transform((v) => { - return new Unauthorized(v); - }); +export const Unauthorized$inboundSchema: z.ZodType< + Unauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + message: z.union([z.string(), z.array(z.string())]), + statusCode: z.number(), + error: z.string(), +}) + .transform((v) => { + return new Unauthorized(v); + }); /** @internal */ export type Unauthorized$Outbound = { - message: string | Array; - statusCode: number; - error: string; + message: string | Array; + statusCode: number; + error: string; }; /** @internal */ export const Unauthorized$outboundSchema: z.ZodType< - Unauthorized$Outbound, - z.ZodTypeDef, - Unauthorized -> = z - .instanceof(Unauthorized) - .transform((v) => v.data$) - .pipe( - z.object({ - message: z.union([z.string(), z.array(z.string())]), - statusCode: z.number(), - error: z.string(), - }) - ); + Unauthorized$Outbound, + z.ZodTypeDef, + Unauthorized +> = z.instanceof(Unauthorized) + .transform(v => v.data$) + .pipe(z.object({ + message: z.union([z.string(), z.array(z.string())]), + statusCode: z.number(), + error: z.string(), + })); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Unauthorized$ { - /** @deprecated use `Unauthorized$inboundSchema` instead. */ - export const inboundSchema = Unauthorized$inboundSchema; - /** @deprecated use `Unauthorized$outboundSchema` instead. */ - export const outboundSchema = Unauthorized$outboundSchema; - /** @deprecated use `Unauthorized$Outbound` instead. */ - export type Outbound = Unauthorized$Outbound; + /** @deprecated use `Unauthorized$inboundSchema` instead. */ + export const inboundSchema = Unauthorized$inboundSchema; + /** @deprecated use `Unauthorized$outboundSchema` instead. */ + export const outboundSchema = Unauthorized$outboundSchema; + /** @deprecated use `Unauthorized$Outbound` instead. */ + export type Outbound = Unauthorized$Outbound; } diff --git a/src/models/operations/addaddressestowebhook.ts b/src/models/operations/addaddressestowebhook.ts index adf7257..5f8dbe5 100644 --- a/src/models/operations/addaddressestowebhook.ts +++ b/src/models/operations/addaddressestowebhook.ts @@ -2,67 +2,65 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const AddAddressesToWebhookServerList = ["https://glacier-api.avax.network"] as const; +export const AddAddressesToWebhookServerList = [ + "https://glacier-api.avax.network", +] as const; export type AddAddressesToWebhookRequest = { - /** - * The webhook identifier. - */ - id: string; - addressesChangeRequest: components.AddressesChangeRequest; + /** + * The webhook identifier. + */ + id: string; + addressesChangeRequest: components.AddressesChangeRequest; }; /** @internal */ export const AddAddressesToWebhookRequest$inboundSchema: z.ZodType< - AddAddressesToWebhookRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - id: z.string(), - AddressesChangeRequest: components.AddressesChangeRequest$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - AddressesChangeRequest: "addressesChangeRequest", - }); - }); + AddAddressesToWebhookRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + AddressesChangeRequest: components.AddressesChangeRequest$inboundSchema, +}).transform((v) => { + return remap$(v, { + "AddressesChangeRequest": "addressesChangeRequest", + }); +}); /** @internal */ export type AddAddressesToWebhookRequest$Outbound = { - id: string; - AddressesChangeRequest: components.AddressesChangeRequest$Outbound; + id: string; + AddressesChangeRequest: components.AddressesChangeRequest$Outbound; }; /** @internal */ export const AddAddressesToWebhookRequest$outboundSchema: z.ZodType< - AddAddressesToWebhookRequest$Outbound, - z.ZodTypeDef, - AddAddressesToWebhookRequest -> = z - .object({ - id: z.string(), - addressesChangeRequest: components.AddressesChangeRequest$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - addressesChangeRequest: "AddressesChangeRequest", - }); - }); + AddAddressesToWebhookRequest$Outbound, + z.ZodTypeDef, + AddAddressesToWebhookRequest +> = z.object({ + id: z.string(), + addressesChangeRequest: components.AddressesChangeRequest$outboundSchema, +}).transform((v) => { + return remap$(v, { + addressesChangeRequest: "AddressesChangeRequest", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AddAddressesToWebhookRequest$ { - /** @deprecated use `AddAddressesToWebhookRequest$inboundSchema` instead. */ - export const inboundSchema = AddAddressesToWebhookRequest$inboundSchema; - /** @deprecated use `AddAddressesToWebhookRequest$outboundSchema` instead. */ - export const outboundSchema = AddAddressesToWebhookRequest$outboundSchema; - /** @deprecated use `AddAddressesToWebhookRequest$Outbound` instead. */ - export type Outbound = AddAddressesToWebhookRequest$Outbound; + /** @deprecated use `AddAddressesToWebhookRequest$inboundSchema` instead. */ + export const inboundSchema = AddAddressesToWebhookRequest$inboundSchema; + /** @deprecated use `AddAddressesToWebhookRequest$outboundSchema` instead. */ + export const outboundSchema = AddAddressesToWebhookRequest$outboundSchema; + /** @deprecated use `AddAddressesToWebhookRequest$Outbound` instead. */ + export type Outbound = AddAddressesToWebhookRequest$Outbound; } diff --git a/src/models/operations/compositequeryv2.ts b/src/models/operations/compositequeryv2.ts index 21fd430..4016f7a 100644 --- a/src/models/operations/compositequeryv2.ts +++ b/src/models/operations/compositequeryv2.ts @@ -2,4 +2,6 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export const CompositeQueryV2ServerList = ["https://popsicle-api.avax.network"] as const; +export const CompositeQueryV2ServerList = [ + "https://metrics.avax.network", +] as const; diff --git a/src/models/operations/createwebhook.ts b/src/models/operations/createwebhook.ts index 42b0699..2afab43 100644 --- a/src/models/operations/createwebhook.ts +++ b/src/models/operations/createwebhook.ts @@ -2,4 +2,6 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export const CreateWebhookServerList = ["https://glacier-api.avax.network"] as const; +export const CreateWebhookServerList = [ + "https://glacier-api.avax.network", +] as const; diff --git a/src/models/operations/datahealthcheck.ts b/src/models/operations/datahealthcheck.ts index cb8e887..c8c4421 100644 --- a/src/models/operations/datahealthcheck.ts +++ b/src/models/operations/datahealthcheck.ts @@ -2,223 +2,219 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { collectExtraKeys as collectExtraKeys$ } from "../../lib/schemas.js"; -import * as z from "zod"; -export const DataHealthCheckServerList = ["https://glacier-api.avax.network"] as const; +export const DataHealthCheckServerList = [ + "https://glacier-api.avax.network", +] as const; export type DataHealthCheckInfo = { - status?: string | undefined; - additionalProperties: { [k: string]: string }; + status?: string | undefined; + additionalProperties: { [k: string]: string }; }; export type DataHealthCheckError = { - status?: string | undefined; - additionalProperties: { [k: string]: string }; + status?: string | undefined; + additionalProperties: { [k: string]: string }; }; export type DataHealthCheckDetails = { - status?: string | undefined; - additionalProperties: { [k: string]: string }; + status?: string | undefined; + additionalProperties: { [k: string]: string }; }; /** * The Health Check is successful */ export type DataHealthCheckResponseBody = { - status?: string | undefined; - info?: { [k: string]: DataHealthCheckInfo } | null | undefined; - error?: { [k: string]: DataHealthCheckError } | null | undefined; - details?: { [k: string]: DataHealthCheckDetails } | undefined; + status?: string | undefined; + info?: { [k: string]: DataHealthCheckInfo } | null | undefined; + error?: { [k: string]: DataHealthCheckError } | null | undefined; + details?: { [k: string]: DataHealthCheckDetails } | undefined; }; /** @internal */ export const DataHealthCheckInfo$inboundSchema: z.ZodType< - DataHealthCheckInfo, - z.ZodTypeDef, - unknown + DataHealthCheckInfo, + z.ZodTypeDef, + unknown > = collectExtraKeys$( - z - .object({ - status: z.string().optional(), - }) - .catchall(z.string()), - "additionalProperties" + z.object({ + status: z.string().optional(), + }).catchall(z.string()), + "additionalProperties", ); /** @internal */ export type DataHealthCheckInfo$Outbound = { - status?: string | undefined; - [additionalProperties: string]: unknown; + status?: string | undefined; + [additionalProperties: string]: unknown; }; /** @internal */ export const DataHealthCheckInfo$outboundSchema: z.ZodType< - DataHealthCheckInfo$Outbound, - z.ZodTypeDef, - DataHealthCheckInfo -> = z - .object({ - status: z.string().optional(), - additionalProperties: z.record(z.string()), - }) - .transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }); + DataHealthCheckInfo$Outbound, + z.ZodTypeDef, + DataHealthCheckInfo +> = z.object({ + status: z.string().optional(), + additionalProperties: z.record(z.string()), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DataHealthCheckInfo$ { - /** @deprecated use `DataHealthCheckInfo$inboundSchema` instead. */ - export const inboundSchema = DataHealthCheckInfo$inboundSchema; - /** @deprecated use `DataHealthCheckInfo$outboundSchema` instead. */ - export const outboundSchema = DataHealthCheckInfo$outboundSchema; - /** @deprecated use `DataHealthCheckInfo$Outbound` instead. */ - export type Outbound = DataHealthCheckInfo$Outbound; + /** @deprecated use `DataHealthCheckInfo$inboundSchema` instead. */ + export const inboundSchema = DataHealthCheckInfo$inboundSchema; + /** @deprecated use `DataHealthCheckInfo$outboundSchema` instead. */ + export const outboundSchema = DataHealthCheckInfo$outboundSchema; + /** @deprecated use `DataHealthCheckInfo$Outbound` instead. */ + export type Outbound = DataHealthCheckInfo$Outbound; } /** @internal */ export const DataHealthCheckError$inboundSchema: z.ZodType< - DataHealthCheckError, - z.ZodTypeDef, - unknown + DataHealthCheckError, + z.ZodTypeDef, + unknown > = collectExtraKeys$( - z - .object({ - status: z.string().optional(), - }) - .catchall(z.string()), - "additionalProperties" + z.object({ + status: z.string().optional(), + }).catchall(z.string()), + "additionalProperties", ); /** @internal */ export type DataHealthCheckError$Outbound = { - status?: string | undefined; - [additionalProperties: string]: unknown; + status?: string | undefined; + [additionalProperties: string]: unknown; }; /** @internal */ export const DataHealthCheckError$outboundSchema: z.ZodType< - DataHealthCheckError$Outbound, - z.ZodTypeDef, - DataHealthCheckError -> = z - .object({ - status: z.string().optional(), - additionalProperties: z.record(z.string()), - }) - .transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }); + DataHealthCheckError$Outbound, + z.ZodTypeDef, + DataHealthCheckError +> = z.object({ + status: z.string().optional(), + additionalProperties: z.record(z.string()), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DataHealthCheckError$ { - /** @deprecated use `DataHealthCheckError$inboundSchema` instead. */ - export const inboundSchema = DataHealthCheckError$inboundSchema; - /** @deprecated use `DataHealthCheckError$outboundSchema` instead. */ - export const outboundSchema = DataHealthCheckError$outboundSchema; - /** @deprecated use `DataHealthCheckError$Outbound` instead. */ - export type Outbound = DataHealthCheckError$Outbound; + /** @deprecated use `DataHealthCheckError$inboundSchema` instead. */ + export const inboundSchema = DataHealthCheckError$inboundSchema; + /** @deprecated use `DataHealthCheckError$outboundSchema` instead. */ + export const outboundSchema = DataHealthCheckError$outboundSchema; + /** @deprecated use `DataHealthCheckError$Outbound` instead. */ + export type Outbound = DataHealthCheckError$Outbound; } /** @internal */ export const DataHealthCheckDetails$inboundSchema: z.ZodType< - DataHealthCheckDetails, - z.ZodTypeDef, - unknown + DataHealthCheckDetails, + z.ZodTypeDef, + unknown > = collectExtraKeys$( - z - .object({ - status: z.string().optional(), - }) - .catchall(z.string()), - "additionalProperties" + z.object({ + status: z.string().optional(), + }).catchall(z.string()), + "additionalProperties", ); /** @internal */ export type DataHealthCheckDetails$Outbound = { - status?: string | undefined; - [additionalProperties: string]: unknown; + status?: string | undefined; + [additionalProperties: string]: unknown; }; /** @internal */ export const DataHealthCheckDetails$outboundSchema: z.ZodType< - DataHealthCheckDetails$Outbound, - z.ZodTypeDef, - DataHealthCheckDetails -> = z - .object({ - status: z.string().optional(), - additionalProperties: z.record(z.string()), - }) - .transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }); + DataHealthCheckDetails$Outbound, + z.ZodTypeDef, + DataHealthCheckDetails +> = z.object({ + status: z.string().optional(), + additionalProperties: z.record(z.string()), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DataHealthCheckDetails$ { - /** @deprecated use `DataHealthCheckDetails$inboundSchema` instead. */ - export const inboundSchema = DataHealthCheckDetails$inboundSchema; - /** @deprecated use `DataHealthCheckDetails$outboundSchema` instead. */ - export const outboundSchema = DataHealthCheckDetails$outboundSchema; - /** @deprecated use `DataHealthCheckDetails$Outbound` instead. */ - export type Outbound = DataHealthCheckDetails$Outbound; + /** @deprecated use `DataHealthCheckDetails$inboundSchema` instead. */ + export const inboundSchema = DataHealthCheckDetails$inboundSchema; + /** @deprecated use `DataHealthCheckDetails$outboundSchema` instead. */ + export const outboundSchema = DataHealthCheckDetails$outboundSchema; + /** @deprecated use `DataHealthCheckDetails$Outbound` instead. */ + export type Outbound = DataHealthCheckDetails$Outbound; } /** @internal */ export const DataHealthCheckResponseBody$inboundSchema: z.ZodType< - DataHealthCheckResponseBody, - z.ZodTypeDef, - unknown + DataHealthCheckResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - status: z.string().optional(), - info: z.nullable(z.record(z.lazy(() => DataHealthCheckInfo$inboundSchema))).optional(), - error: z.nullable(z.record(z.lazy(() => DataHealthCheckError$inboundSchema))).optional(), - details: z.record(z.lazy(() => DataHealthCheckDetails$inboundSchema)).optional(), + status: z.string().optional(), + info: z.nullable(z.record(z.lazy(() => DataHealthCheckInfo$inboundSchema))) + .optional(), + error: z.nullable(z.record(z.lazy(() => DataHealthCheckError$inboundSchema))) + .optional(), + details: z.record(z.lazy(() => DataHealthCheckDetails$inboundSchema)) + .optional(), }); /** @internal */ export type DataHealthCheckResponseBody$Outbound = { - status?: string | undefined; - info?: { [k: string]: DataHealthCheckInfo$Outbound } | null | undefined; - error?: { [k: string]: DataHealthCheckError$Outbound } | null | undefined; - details?: { [k: string]: DataHealthCheckDetails$Outbound } | undefined; + status?: string | undefined; + info?: { [k: string]: DataHealthCheckInfo$Outbound } | null | undefined; + error?: { [k: string]: DataHealthCheckError$Outbound } | null | undefined; + details?: { [k: string]: DataHealthCheckDetails$Outbound } | undefined; }; /** @internal */ export const DataHealthCheckResponseBody$outboundSchema: z.ZodType< - DataHealthCheckResponseBody$Outbound, - z.ZodTypeDef, - DataHealthCheckResponseBody + DataHealthCheckResponseBody$Outbound, + z.ZodTypeDef, + DataHealthCheckResponseBody > = z.object({ - status: z.string().optional(), - info: z.nullable(z.record(z.lazy(() => DataHealthCheckInfo$outboundSchema))).optional(), - error: z.nullable(z.record(z.lazy(() => DataHealthCheckError$outboundSchema))).optional(), - details: z.record(z.lazy(() => DataHealthCheckDetails$outboundSchema)).optional(), + status: z.string().optional(), + info: z.nullable(z.record(z.lazy(() => DataHealthCheckInfo$outboundSchema))) + .optional(), + error: z.nullable(z.record(z.lazy(() => DataHealthCheckError$outboundSchema))) + .optional(), + details: z.record(z.lazy(() => DataHealthCheckDetails$outboundSchema)) + .optional(), }); /** @@ -226,10 +222,10 @@ export const DataHealthCheckResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DataHealthCheckResponseBody$ { - /** @deprecated use `DataHealthCheckResponseBody$inboundSchema` instead. */ - export const inboundSchema = DataHealthCheckResponseBody$inboundSchema; - /** @deprecated use `DataHealthCheckResponseBody$outboundSchema` instead. */ - export const outboundSchema = DataHealthCheckResponseBody$outboundSchema; - /** @deprecated use `DataHealthCheckResponseBody$Outbound` instead. */ - export type Outbound = DataHealthCheckResponseBody$Outbound; + /** @deprecated use `DataHealthCheckResponseBody$inboundSchema` instead. */ + export const inboundSchema = DataHealthCheckResponseBody$inboundSchema; + /** @deprecated use `DataHealthCheckResponseBody$outboundSchema` instead. */ + export const outboundSchema = DataHealthCheckResponseBody$outboundSchema; + /** @deprecated use `DataHealthCheckResponseBody$Outbound` instead. */ + export type Outbound = DataHealthCheckResponseBody$Outbound; } diff --git a/src/models/operations/deactivatewebhook.ts b/src/models/operations/deactivatewebhook.ts index bb99c60..ba5efbf 100644 --- a/src/models/operations/deactivatewebhook.ts +++ b/src/models/operations/deactivatewebhook.ts @@ -4,36 +4,38 @@ import * as z from "zod"; -export const DeactivateWebhookServerList = ["https://glacier-api.avax.network"] as const; +export const DeactivateWebhookServerList = [ + "https://glacier-api.avax.network", +] as const; export type DeactivateWebhookRequest = { - /** - * The webhook identifier. - */ - id: string; + /** + * The webhook identifier. + */ + id: string; }; /** @internal */ export const DeactivateWebhookRequest$inboundSchema: z.ZodType< - DeactivateWebhookRequest, - z.ZodTypeDef, - unknown + DeactivateWebhookRequest, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string(), + id: z.string(), }); /** @internal */ export type DeactivateWebhookRequest$Outbound = { - id: string; + id: string; }; /** @internal */ export const DeactivateWebhookRequest$outboundSchema: z.ZodType< - DeactivateWebhookRequest$Outbound, - z.ZodTypeDef, - DeactivateWebhookRequest + DeactivateWebhookRequest$Outbound, + z.ZodTypeDef, + DeactivateWebhookRequest > = z.object({ - id: z.string(), + id: z.string(), }); /** @@ -41,10 +43,10 @@ export const DeactivateWebhookRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeactivateWebhookRequest$ { - /** @deprecated use `DeactivateWebhookRequest$inboundSchema` instead. */ - export const inboundSchema = DeactivateWebhookRequest$inboundSchema; - /** @deprecated use `DeactivateWebhookRequest$outboundSchema` instead. */ - export const outboundSchema = DeactivateWebhookRequest$outboundSchema; - /** @deprecated use `DeactivateWebhookRequest$Outbound` instead. */ - export type Outbound = DeactivateWebhookRequest$Outbound; + /** @deprecated use `DeactivateWebhookRequest$inboundSchema` instead. */ + export const inboundSchema = DeactivateWebhookRequest$inboundSchema; + /** @deprecated use `DeactivateWebhookRequest$outboundSchema` instead. */ + export const outboundSchema = DeactivateWebhookRequest$outboundSchema; + /** @deprecated use `DeactivateWebhookRequest$Outbound` instead. */ + export type Outbound = DeactivateWebhookRequest$Outbound; } diff --git a/src/models/operations/generatesharedsecret.ts b/src/models/operations/generatesharedsecret.ts index 3834359..434eabc 100644 --- a/src/models/operations/generatesharedsecret.ts +++ b/src/models/operations/generatesharedsecret.ts @@ -2,4 +2,6 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export const GenerateSharedSecretServerList = ["https://glacier-api.avax.network"] as const; +export const GenerateSharedSecretServerList = [ + "https://glacier-api.avax.network", +] as const; diff --git a/src/models/operations/getaddressesbybalanceovertime.ts b/src/models/operations/getaddressesbybalanceovertime.ts index b1ed087..a2c3455 100644 --- a/src/models/operations/getaddressesbybalanceovertime.ts +++ b/src/models/operations/getaddressesbybalanceovertime.ts @@ -2,77 +2,77 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; export const GetAddressesByBalanceOverTimeServerList = [ - "https://popsicle-api.avax.network", + "https://metrics.avax.network", ] as const; export type GetAddressesByBalanceOverTimeGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type GetAddressesByBalanceOverTimeRequest = { - /** - * The minimum balance for which addresses should be considered. - */ - threshold: string; - /** - * Query param for retrieving items after a specific timestamp. - */ - startTimestamp?: number | undefined; - /** - * Query param for retrieving items before a specific timestamp. - */ - endTimestamp?: number | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 5000. - */ - pageSize?: number | undefined; - /** - * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * Contract address on the relevant chain. - */ - address: string; + /** + * The minimum balance for which addresses should be considered. + */ + threshold: string; + /** + * Query param for retrieving items after a specific timestamp. + */ + startTimestamp?: number | undefined; + /** + * Query param for retrieving items before a specific timestamp. + */ + endTimestamp?: number | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 5000. + */ + pageSize?: number | undefined; + /** + * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * Contract address on the relevant chain. + */ + address: string; }; export type GetAddressesByBalanceOverTimeResponse = { - result: components.LookingGlassResponse; + result: components.LookingGlassResponse; }; /** @internal */ export const GetAddressesByBalanceOverTimeGlobals$inboundSchema: z.ZodType< - GetAddressesByBalanceOverTimeGlobals, - z.ZodTypeDef, - unknown + GetAddressesByBalanceOverTimeGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type GetAddressesByBalanceOverTimeGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const GetAddressesByBalanceOverTimeGlobals$outboundSchema: z.ZodType< - GetAddressesByBalanceOverTimeGlobals$Outbound, - z.ZodTypeDef, - GetAddressesByBalanceOverTimeGlobals + GetAddressesByBalanceOverTimeGlobals$Outbound, + z.ZodTypeDef, + GetAddressesByBalanceOverTimeGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -80,53 +80,55 @@ export const GetAddressesByBalanceOverTimeGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAddressesByBalanceOverTimeGlobals$ { - /** @deprecated use `GetAddressesByBalanceOverTimeGlobals$inboundSchema` instead. */ - export const inboundSchema = GetAddressesByBalanceOverTimeGlobals$inboundSchema; - /** @deprecated use `GetAddressesByBalanceOverTimeGlobals$outboundSchema` instead. */ - export const outboundSchema = GetAddressesByBalanceOverTimeGlobals$outboundSchema; - /** @deprecated use `GetAddressesByBalanceOverTimeGlobals$Outbound` instead. */ - export type Outbound = GetAddressesByBalanceOverTimeGlobals$Outbound; + /** @deprecated use `GetAddressesByBalanceOverTimeGlobals$inboundSchema` instead. */ + export const inboundSchema = + GetAddressesByBalanceOverTimeGlobals$inboundSchema; + /** @deprecated use `GetAddressesByBalanceOverTimeGlobals$outboundSchema` instead. */ + export const outboundSchema = + GetAddressesByBalanceOverTimeGlobals$outboundSchema; + /** @deprecated use `GetAddressesByBalanceOverTimeGlobals$Outbound` instead. */ + export type Outbound = GetAddressesByBalanceOverTimeGlobals$Outbound; } /** @internal */ export const GetAddressesByBalanceOverTimeRequest$inboundSchema: z.ZodType< - GetAddressesByBalanceOverTimeRequest, - z.ZodTypeDef, - unknown + GetAddressesByBalanceOverTimeRequest, + z.ZodTypeDef, + unknown > = z.object({ - threshold: z.string(), - startTimestamp: z.number().int().optional(), - endTimestamp: z.number().int().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(1000), - chainId: z.string().optional(), - address: z.string(), + threshold: z.string(), + startTimestamp: z.number().int().optional(), + endTimestamp: z.number().int().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(1000), + chainId: z.string().optional(), + address: z.string(), }); /** @internal */ export type GetAddressesByBalanceOverTimeRequest$Outbound = { - threshold: string; - startTimestamp?: number | undefined; - endTimestamp?: number | undefined; - pageToken?: string | undefined; - pageSize: number; - chainId?: string | undefined; - address: string; + threshold: string; + startTimestamp?: number | undefined; + endTimestamp?: number | undefined; + pageToken?: string | undefined; + pageSize: number; + chainId?: string | undefined; + address: string; }; /** @internal */ export const GetAddressesByBalanceOverTimeRequest$outboundSchema: z.ZodType< - GetAddressesByBalanceOverTimeRequest$Outbound, - z.ZodTypeDef, - GetAddressesByBalanceOverTimeRequest + GetAddressesByBalanceOverTimeRequest$Outbound, + z.ZodTypeDef, + GetAddressesByBalanceOverTimeRequest > = z.object({ - threshold: z.string(), - startTimestamp: z.number().int().optional(), - endTimestamp: z.number().int().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(1000), - chainId: z.string().optional(), - address: z.string(), + threshold: z.string(), + startTimestamp: z.number().int().optional(), + endTimestamp: z.number().int().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(1000), + chainId: z.string().optional(), + address: z.string(), }); /** @@ -134,58 +136,58 @@ export const GetAddressesByBalanceOverTimeRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAddressesByBalanceOverTimeRequest$ { - /** @deprecated use `GetAddressesByBalanceOverTimeRequest$inboundSchema` instead. */ - export const inboundSchema = GetAddressesByBalanceOverTimeRequest$inboundSchema; - /** @deprecated use `GetAddressesByBalanceOverTimeRequest$outboundSchema` instead. */ - export const outboundSchema = GetAddressesByBalanceOverTimeRequest$outboundSchema; - /** @deprecated use `GetAddressesByBalanceOverTimeRequest$Outbound` instead. */ - export type Outbound = GetAddressesByBalanceOverTimeRequest$Outbound; + /** @deprecated use `GetAddressesByBalanceOverTimeRequest$inboundSchema` instead. */ + export const inboundSchema = + GetAddressesByBalanceOverTimeRequest$inboundSchema; + /** @deprecated use `GetAddressesByBalanceOverTimeRequest$outboundSchema` instead. */ + export const outboundSchema = + GetAddressesByBalanceOverTimeRequest$outboundSchema; + /** @deprecated use `GetAddressesByBalanceOverTimeRequest$Outbound` instead. */ + export type Outbound = GetAddressesByBalanceOverTimeRequest$Outbound; } /** @internal */ export const GetAddressesByBalanceOverTimeResponse$inboundSchema: z.ZodType< - GetAddressesByBalanceOverTimeResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.LookingGlassResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + GetAddressesByBalanceOverTimeResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.LookingGlassResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type GetAddressesByBalanceOverTimeResponse$Outbound = { - Result: components.LookingGlassResponse$Outbound; + Result: components.LookingGlassResponse$Outbound; }; /** @internal */ export const GetAddressesByBalanceOverTimeResponse$outboundSchema: z.ZodType< - GetAddressesByBalanceOverTimeResponse$Outbound, - z.ZodTypeDef, - GetAddressesByBalanceOverTimeResponse -> = z - .object({ - result: components.LookingGlassResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + GetAddressesByBalanceOverTimeResponse$Outbound, + z.ZodTypeDef, + GetAddressesByBalanceOverTimeResponse +> = z.object({ + result: components.LookingGlassResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAddressesByBalanceOverTimeResponse$ { - /** @deprecated use `GetAddressesByBalanceOverTimeResponse$inboundSchema` instead. */ - export const inboundSchema = GetAddressesByBalanceOverTimeResponse$inboundSchema; - /** @deprecated use `GetAddressesByBalanceOverTimeResponse$outboundSchema` instead. */ - export const outboundSchema = GetAddressesByBalanceOverTimeResponse$outboundSchema; - /** @deprecated use `GetAddressesByBalanceOverTimeResponse$Outbound` instead. */ - export type Outbound = GetAddressesByBalanceOverTimeResponse$Outbound; + /** @deprecated use `GetAddressesByBalanceOverTimeResponse$inboundSchema` instead. */ + export const inboundSchema = + GetAddressesByBalanceOverTimeResponse$inboundSchema; + /** @deprecated use `GetAddressesByBalanceOverTimeResponse$outboundSchema` instead. */ + export const outboundSchema = + GetAddressesByBalanceOverTimeResponse$outboundSchema; + /** @deprecated use `GetAddressesByBalanceOverTimeResponse$Outbound` instead. */ + export type Outbound = GetAddressesByBalanceOverTimeResponse$Outbound; } diff --git a/src/models/operations/getaddressesbybtcbbridged.ts b/src/models/operations/getaddressesbybtcbbridged.ts index 1f316cc..bb8873f 100644 --- a/src/models/operations/getaddressesbybtcbbridged.ts +++ b/src/models/operations/getaddressesbybtcbbridged.ts @@ -2,58 +2,60 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const GetAddressesByBtcbBridgedServerList = ["https://popsicle-api.avax.network"] as const; +export const GetAddressesByBtcbBridgedServerList = [ + "https://metrics.avax.network", +] as const; export type GetAddressesByBtcbBridgedRequest = { - /** - * The minimum balance for which addresses should be considered. - */ - threshold: string; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 5000. - */ - pageSize?: number | undefined; + /** + * The minimum balance for which addresses should be considered. + */ + threshold: string; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 5000. + */ + pageSize?: number | undefined; }; export type GetAddressesByBtcbBridgedResponse = { - result: components.LookingGlassResponse; + result: components.LookingGlassResponse; }; /** @internal */ export const GetAddressesByBtcbBridgedRequest$inboundSchema: z.ZodType< - GetAddressesByBtcbBridgedRequest, - z.ZodTypeDef, - unknown + GetAddressesByBtcbBridgedRequest, + z.ZodTypeDef, + unknown > = z.object({ - threshold: z.string(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(1000), + threshold: z.string(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(1000), }); /** @internal */ export type GetAddressesByBtcbBridgedRequest$Outbound = { - threshold: string; - pageToken?: string | undefined; - pageSize: number; + threshold: string; + pageToken?: string | undefined; + pageSize: number; }; /** @internal */ export const GetAddressesByBtcbBridgedRequest$outboundSchema: z.ZodType< - GetAddressesByBtcbBridgedRequest$Outbound, - z.ZodTypeDef, - GetAddressesByBtcbBridgedRequest + GetAddressesByBtcbBridgedRequest$Outbound, + z.ZodTypeDef, + GetAddressesByBtcbBridgedRequest > = z.object({ - threshold: z.string(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(1000), + threshold: z.string(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(1000), }); /** @@ -61,58 +63,55 @@ export const GetAddressesByBtcbBridgedRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAddressesByBtcbBridgedRequest$ { - /** @deprecated use `GetAddressesByBtcbBridgedRequest$inboundSchema` instead. */ - export const inboundSchema = GetAddressesByBtcbBridgedRequest$inboundSchema; - /** @deprecated use `GetAddressesByBtcbBridgedRequest$outboundSchema` instead. */ - export const outboundSchema = GetAddressesByBtcbBridgedRequest$outboundSchema; - /** @deprecated use `GetAddressesByBtcbBridgedRequest$Outbound` instead. */ - export type Outbound = GetAddressesByBtcbBridgedRequest$Outbound; + /** @deprecated use `GetAddressesByBtcbBridgedRequest$inboundSchema` instead. */ + export const inboundSchema = GetAddressesByBtcbBridgedRequest$inboundSchema; + /** @deprecated use `GetAddressesByBtcbBridgedRequest$outboundSchema` instead. */ + export const outboundSchema = GetAddressesByBtcbBridgedRequest$outboundSchema; + /** @deprecated use `GetAddressesByBtcbBridgedRequest$Outbound` instead. */ + export type Outbound = GetAddressesByBtcbBridgedRequest$Outbound; } /** @internal */ export const GetAddressesByBtcbBridgedResponse$inboundSchema: z.ZodType< - GetAddressesByBtcbBridgedResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.LookingGlassResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + GetAddressesByBtcbBridgedResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.LookingGlassResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type GetAddressesByBtcbBridgedResponse$Outbound = { - Result: components.LookingGlassResponse$Outbound; + Result: components.LookingGlassResponse$Outbound; }; /** @internal */ export const GetAddressesByBtcbBridgedResponse$outboundSchema: z.ZodType< - GetAddressesByBtcbBridgedResponse$Outbound, - z.ZodTypeDef, - GetAddressesByBtcbBridgedResponse -> = z - .object({ - result: components.LookingGlassResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + GetAddressesByBtcbBridgedResponse$Outbound, + z.ZodTypeDef, + GetAddressesByBtcbBridgedResponse +> = z.object({ + result: components.LookingGlassResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAddressesByBtcbBridgedResponse$ { - /** @deprecated use `GetAddressesByBtcbBridgedResponse$inboundSchema` instead. */ - export const inboundSchema = GetAddressesByBtcbBridgedResponse$inboundSchema; - /** @deprecated use `GetAddressesByBtcbBridgedResponse$outboundSchema` instead. */ - export const outboundSchema = GetAddressesByBtcbBridgedResponse$outboundSchema; - /** @deprecated use `GetAddressesByBtcbBridgedResponse$Outbound` instead. */ - export type Outbound = GetAddressesByBtcbBridgedResponse$Outbound; + /** @deprecated use `GetAddressesByBtcbBridgedResponse$inboundSchema` instead. */ + export const inboundSchema = GetAddressesByBtcbBridgedResponse$inboundSchema; + /** @deprecated use `GetAddressesByBtcbBridgedResponse$outboundSchema` instead. */ + export const outboundSchema = + GetAddressesByBtcbBridgedResponse$outboundSchema; + /** @deprecated use `GetAddressesByBtcbBridgedResponse$Outbound` instead. */ + export type Outbound = GetAddressesByBtcbBridgedResponse$Outbound; } diff --git a/src/models/operations/getaddressesfromwebhook.ts b/src/models/operations/getaddressesfromwebhook.ts index a61b9ef..f2af3e8 100644 --- a/src/models/operations/getaddressesfromwebhook.ts +++ b/src/models/operations/getaddressesfromwebhook.ts @@ -2,58 +2,60 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const GetAddressesFromWebhookServerList = ["https://glacier-api.avax.network"] as const; +export const GetAddressesFromWebhookServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetAddressesFromWebhookRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * The webhook identifier. - */ - id: string; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * The webhook identifier. + */ + id: string; }; export type GetAddressesFromWebhookResponse = { - result: components.ListWebhookAddressesResponse; + result: components.ListWebhookAddressesResponse; }; /** @internal */ export const GetAddressesFromWebhookRequest$inboundSchema: z.ZodType< - GetAddressesFromWebhookRequest, - z.ZodTypeDef, - unknown + GetAddressesFromWebhookRequest, + z.ZodTypeDef, + unknown > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - id: z.string(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + id: z.string(), }); /** @internal */ export type GetAddressesFromWebhookRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - id: string; + pageToken?: string | undefined; + pageSize: number; + id: string; }; /** @internal */ export const GetAddressesFromWebhookRequest$outboundSchema: z.ZodType< - GetAddressesFromWebhookRequest$Outbound, - z.ZodTypeDef, - GetAddressesFromWebhookRequest + GetAddressesFromWebhookRequest$Outbound, + z.ZodTypeDef, + GetAddressesFromWebhookRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - id: z.string(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + id: z.string(), }); /** @@ -61,58 +63,54 @@ export const GetAddressesFromWebhookRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAddressesFromWebhookRequest$ { - /** @deprecated use `GetAddressesFromWebhookRequest$inboundSchema` instead. */ - export const inboundSchema = GetAddressesFromWebhookRequest$inboundSchema; - /** @deprecated use `GetAddressesFromWebhookRequest$outboundSchema` instead. */ - export const outboundSchema = GetAddressesFromWebhookRequest$outboundSchema; - /** @deprecated use `GetAddressesFromWebhookRequest$Outbound` instead. */ - export type Outbound = GetAddressesFromWebhookRequest$Outbound; + /** @deprecated use `GetAddressesFromWebhookRequest$inboundSchema` instead. */ + export const inboundSchema = GetAddressesFromWebhookRequest$inboundSchema; + /** @deprecated use `GetAddressesFromWebhookRequest$outboundSchema` instead. */ + export const outboundSchema = GetAddressesFromWebhookRequest$outboundSchema; + /** @deprecated use `GetAddressesFromWebhookRequest$Outbound` instead. */ + export type Outbound = GetAddressesFromWebhookRequest$Outbound; } /** @internal */ export const GetAddressesFromWebhookResponse$inboundSchema: z.ZodType< - GetAddressesFromWebhookResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListWebhookAddressesResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + GetAddressesFromWebhookResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListWebhookAddressesResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type GetAddressesFromWebhookResponse$Outbound = { - Result: components.ListWebhookAddressesResponse$Outbound; + Result: components.ListWebhookAddressesResponse$Outbound; }; /** @internal */ export const GetAddressesFromWebhookResponse$outboundSchema: z.ZodType< - GetAddressesFromWebhookResponse$Outbound, - z.ZodTypeDef, - GetAddressesFromWebhookResponse -> = z - .object({ - result: components.ListWebhookAddressesResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + GetAddressesFromWebhookResponse$Outbound, + z.ZodTypeDef, + GetAddressesFromWebhookResponse +> = z.object({ + result: components.ListWebhookAddressesResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAddressesFromWebhookResponse$ { - /** @deprecated use `GetAddressesFromWebhookResponse$inboundSchema` instead. */ - export const inboundSchema = GetAddressesFromWebhookResponse$inboundSchema; - /** @deprecated use `GetAddressesFromWebhookResponse$outboundSchema` instead. */ - export const outboundSchema = GetAddressesFromWebhookResponse$outboundSchema; - /** @deprecated use `GetAddressesFromWebhookResponse$Outbound` instead. */ - export type Outbound = GetAddressesFromWebhookResponse$Outbound; + /** @deprecated use `GetAddressesFromWebhookResponse$inboundSchema` instead. */ + export const inboundSchema = GetAddressesFromWebhookResponse$inboundSchema; + /** @deprecated use `GetAddressesFromWebhookResponse$outboundSchema` instead. */ + export const outboundSchema = GetAddressesFromWebhookResponse$outboundSchema; + /** @deprecated use `GetAddressesFromWebhookResponse$Outbound` instead. */ + export type Outbound = GetAddressesFromWebhookResponse$Outbound; } diff --git a/src/models/operations/getapilogs.ts b/src/models/operations/getapilogs.ts index b080a8c..6f0c786 100644 --- a/src/models/operations/getapilogs.ts +++ b/src/models/operations/getapilogs.ts @@ -2,19 +2,21 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const GetApiLogsServerList = ["https://glacier-api.avax.network"] as const; +export const GetApiLogsServerList = [ + "https://glacier-api.avax.network", +] as const; /** * Filter data by request type. */ export const QueryParamRequestType = { - Data: "data", - Rpc: "rpc", + Data: "data", + Rpc: "rpc", } as const; /** * Filter data by request type. @@ -22,116 +24,121 @@ export const QueryParamRequestType = { export type QueryParamRequestType = ClosedEnum; export type GetApiLogsRequest = { - /** - * Organization ID to fetch usage metrics for - */ - orgId?: string | undefined; - /** - * Query param for retrieving items after a specific timestamp. - */ - startTimestamp?: number | undefined; - /** - * Query param for retrieving items before a specific timestamp. - */ - endTimestamp?: number | undefined; - /** - * Filter data by request path. - */ - requestPath?: string | undefined; - /** - * Filter data by request type. - */ - requestType?: QueryParamRequestType | undefined; - /** - * Filter data by response status code. - */ - responseCode?: string | undefined; - /** - * Filter data by chain ID. - */ - chainId?: string | undefined; - /** - * Filter data by API key ID. - */ - apiKeyId?: string | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. - */ - pageSize?: number | undefined; + /** + * Organization ID to fetch usage metrics for + */ + orgId?: string | undefined; + /** + * Query param for retrieving items after a specific timestamp. + */ + startTimestamp?: number | undefined; + /** + * Query param for retrieving items before a specific timestamp. + */ + endTimestamp?: number | undefined; + /** + * Filter data by request path. + */ + requestPath?: string | undefined; + /** + * Filter data by request type. + */ + requestType?: QueryParamRequestType | undefined; + /** + * Filter data by response status code. + */ + responseCode?: string | undefined; + /** + * Filter data by chain ID. + */ + chainId?: string | undefined; + /** + * Filter data by API key ID. + */ + apiKeyId?: string | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. + */ + pageSize?: number | undefined; }; export type GetApiLogsResponse = { - result: components.LogsResponseDTO; + result: components.LogsResponseDTO; }; /** @internal */ -export const QueryParamRequestType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(QueryParamRequestType); +export const QueryParamRequestType$inboundSchema: z.ZodNativeEnum< + typeof QueryParamRequestType +> = z.nativeEnum(QueryParamRequestType); /** @internal */ -export const QueryParamRequestType$outboundSchema: z.ZodNativeEnum = - QueryParamRequestType$inboundSchema; +export const QueryParamRequestType$outboundSchema: z.ZodNativeEnum< + typeof QueryParamRequestType +> = QueryParamRequestType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace QueryParamRequestType$ { - /** @deprecated use `QueryParamRequestType$inboundSchema` instead. */ - export const inboundSchema = QueryParamRequestType$inboundSchema; - /** @deprecated use `QueryParamRequestType$outboundSchema` instead. */ - export const outboundSchema = QueryParamRequestType$outboundSchema; + /** @deprecated use `QueryParamRequestType$inboundSchema` instead. */ + export const inboundSchema = QueryParamRequestType$inboundSchema; + /** @deprecated use `QueryParamRequestType$outboundSchema` instead. */ + export const outboundSchema = QueryParamRequestType$outboundSchema; } /** @internal */ -export const GetApiLogsRequest$inboundSchema: z.ZodType = - z.object({ - orgId: z.string().optional(), - startTimestamp: z.number().int().optional(), - endTimestamp: z.number().int().optional(), - requestPath: z.string().optional(), - requestType: QueryParamRequestType$inboundSchema.optional(), - responseCode: z.string().optional(), - chainId: z.string().optional(), - apiKeyId: z.string().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - }); +export const GetApiLogsRequest$inboundSchema: z.ZodType< + GetApiLogsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + orgId: z.string().optional(), + startTimestamp: z.number().int().optional(), + endTimestamp: z.number().int().optional(), + requestPath: z.string().optional(), + requestType: QueryParamRequestType$inboundSchema.optional(), + responseCode: z.string().optional(), + chainId: z.string().optional(), + apiKeyId: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), +}); /** @internal */ export type GetApiLogsRequest$Outbound = { - orgId?: string | undefined; - startTimestamp?: number | undefined; - endTimestamp?: number | undefined; - requestPath?: string | undefined; - requestType?: string | undefined; - responseCode?: string | undefined; - chainId?: string | undefined; - apiKeyId?: string | undefined; - pageToken?: string | undefined; - pageSize: number; + orgId?: string | undefined; + startTimestamp?: number | undefined; + endTimestamp?: number | undefined; + requestPath?: string | undefined; + requestType?: string | undefined; + responseCode?: string | undefined; + chainId?: string | undefined; + apiKeyId?: string | undefined; + pageToken?: string | undefined; + pageSize: number; }; /** @internal */ export const GetApiLogsRequest$outboundSchema: z.ZodType< - GetApiLogsRequest$Outbound, - z.ZodTypeDef, - GetApiLogsRequest + GetApiLogsRequest$Outbound, + z.ZodTypeDef, + GetApiLogsRequest > = z.object({ - orgId: z.string().optional(), - startTimestamp: z.number().int().optional(), - endTimestamp: z.number().int().optional(), - requestPath: z.string().optional(), - requestType: QueryParamRequestType$outboundSchema.optional(), - responseCode: z.string().optional(), - chainId: z.string().optional(), - apiKeyId: z.string().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), + orgId: z.string().optional(), + startTimestamp: z.number().int().optional(), + endTimestamp: z.number().int().optional(), + requestPath: z.string().optional(), + requestType: QueryParamRequestType$outboundSchema.optional(), + responseCode: z.string().optional(), + chainId: z.string().optional(), + apiKeyId: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), }); /** @@ -139,58 +146,54 @@ export const GetApiLogsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiLogsRequest$ { - /** @deprecated use `GetApiLogsRequest$inboundSchema` instead. */ - export const inboundSchema = GetApiLogsRequest$inboundSchema; - /** @deprecated use `GetApiLogsRequest$outboundSchema` instead. */ - export const outboundSchema = GetApiLogsRequest$outboundSchema; - /** @deprecated use `GetApiLogsRequest$Outbound` instead. */ - export type Outbound = GetApiLogsRequest$Outbound; + /** @deprecated use `GetApiLogsRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiLogsRequest$inboundSchema; + /** @deprecated use `GetApiLogsRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiLogsRequest$outboundSchema; + /** @deprecated use `GetApiLogsRequest$Outbound` instead. */ + export type Outbound = GetApiLogsRequest$Outbound; } /** @internal */ export const GetApiLogsResponse$inboundSchema: z.ZodType< - GetApiLogsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.LogsResponseDTO$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + GetApiLogsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.LogsResponseDTO$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type GetApiLogsResponse$Outbound = { - Result: components.LogsResponseDTO$Outbound; + Result: components.LogsResponseDTO$Outbound; }; /** @internal */ export const GetApiLogsResponse$outboundSchema: z.ZodType< - GetApiLogsResponse$Outbound, - z.ZodTypeDef, - GetApiLogsResponse -> = z - .object({ - result: components.LogsResponseDTO$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + GetApiLogsResponse$Outbound, + z.ZodTypeDef, + GetApiLogsResponse +> = z.object({ + result: components.LogsResponseDTO$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiLogsResponse$ { - /** @deprecated use `GetApiLogsResponse$inboundSchema` instead. */ - export const inboundSchema = GetApiLogsResponse$inboundSchema; - /** @deprecated use `GetApiLogsResponse$outboundSchema` instead. */ - export const outboundSchema = GetApiLogsResponse$outboundSchema; - /** @deprecated use `GetApiLogsResponse$Outbound` instead. */ - export type Outbound = GetApiLogsResponse$Outbound; + /** @deprecated use `GetApiLogsResponse$inboundSchema` instead. */ + export const inboundSchema = GetApiLogsResponse$inboundSchema; + /** @deprecated use `GetApiLogsResponse$outboundSchema` instead. */ + export const outboundSchema = GetApiLogsResponse$outboundSchema; + /** @deprecated use `GetApiLogsResponse$Outbound` instead. */ + export type Outbound = GetApiLogsResponse$Outbound; } diff --git a/src/models/operations/getapiusagemetrics.ts b/src/models/operations/getapiusagemetrics.ts index 32dd55f..89d1979 100644 --- a/src/models/operations/getapiusagemetrics.ts +++ b/src/models/operations/getapiusagemetrics.ts @@ -2,18 +2,20 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const GetApiUsageMetricsServerList = ["https://glacier-api.avax.network"] as const; +export const GetApiUsageMetricsServerList = [ + "https://glacier-api.avax.network", +] as const; /** * Filter data by request type. */ export const RequestType = { - Data: "data", - Rpc: "rpc", + Data: "data", + Rpc: "rpc", } as const; /** * Filter data by request type. @@ -21,115 +23,117 @@ export const RequestType = { export type RequestType = ClosedEnum; export type GetApiUsageMetricsRequest = { - /** - * Organization ID to fetch usage metrics for - */ - orgId?: string | undefined; - /** - * Query param for retrieving items after a specific timestamp. - */ - startTimestamp?: number | undefined; - /** - * Query param for retrieving items before a specific timestamp. - */ - endTimestamp?: number | undefined; - /** - * Time interval granularity for data aggregation - */ - timeInterval?: components.TimeIntervalGranularityExtended | undefined; - /** - * Query param for the criterion used for grouping metrics - */ - groupBy?: components.UsageMetricsGroupByEnum | undefined; - /** - * Filter data by request path. - */ - requestPath?: string | undefined; - /** - * Filter data by request type. - */ - requestType?: RequestType | undefined; - /** - * Filter data by response status code. - */ - responseCode?: string | undefined; - /** - * Filter data by chain ID. - */ - chainId?: string | undefined; - /** - * Filter data by API key ID. - */ - apiKeyId?: string | undefined; + /** + * Organization ID to fetch usage metrics for + */ + orgId?: string | undefined; + /** + * Query param for retrieving items after a specific timestamp. + */ + startTimestamp?: number | undefined; + /** + * Query param for retrieving items before a specific timestamp. + */ + endTimestamp?: number | undefined; + /** + * Time interval granularity for data aggregation + */ + timeInterval?: components.TimeIntervalGranularityExtended | undefined; + /** + * Query param for the criterion used for grouping metrics + */ + groupBy?: components.UsageMetricsGroupByEnum | undefined; + /** + * Filter data by request path. + */ + requestPath?: string | undefined; + /** + * Filter data by request type. + */ + requestType?: RequestType | undefined; + /** + * Filter data by response status code. + */ + responseCode?: string | undefined; + /** + * Filter data by chain ID. + */ + chainId?: string | undefined; + /** + * Filter data by API key ID. + */ + apiKeyId?: string | undefined; }; /** @internal */ -export const RequestType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(RequestType); +export const RequestType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(RequestType); /** @internal */ export const RequestType$outboundSchema: z.ZodNativeEnum = - RequestType$inboundSchema; + RequestType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RequestType$ { - /** @deprecated use `RequestType$inboundSchema` instead. */ - export const inboundSchema = RequestType$inboundSchema; - /** @deprecated use `RequestType$outboundSchema` instead. */ - export const outboundSchema = RequestType$outboundSchema; + /** @deprecated use `RequestType$inboundSchema` instead. */ + export const inboundSchema = RequestType$inboundSchema; + /** @deprecated use `RequestType$outboundSchema` instead. */ + export const outboundSchema = RequestType$outboundSchema; } /** @internal */ export const GetApiUsageMetricsRequest$inboundSchema: z.ZodType< - GetApiUsageMetricsRequest, - z.ZodTypeDef, - unknown + GetApiUsageMetricsRequest, + z.ZodTypeDef, + unknown > = z.object({ - orgId: z.string().optional(), - startTimestamp: z.number().int().optional(), - endTimestamp: z.number().int().optional(), - timeInterval: components.TimeIntervalGranularityExtended$inboundSchema.optional(), - groupBy: components.UsageMetricsGroupByEnum$inboundSchema.optional(), - requestPath: z.string().optional(), - requestType: RequestType$inboundSchema.optional(), - responseCode: z.string().optional(), - chainId: z.string().optional(), - apiKeyId: z.string().optional(), + orgId: z.string().optional(), + startTimestamp: z.number().int().optional(), + endTimestamp: z.number().int().optional(), + timeInterval: components.TimeIntervalGranularityExtended$inboundSchema + .optional(), + groupBy: components.UsageMetricsGroupByEnum$inboundSchema.optional(), + requestPath: z.string().optional(), + requestType: RequestType$inboundSchema.optional(), + responseCode: z.string().optional(), + chainId: z.string().optional(), + apiKeyId: z.string().optional(), }); /** @internal */ export type GetApiUsageMetricsRequest$Outbound = { - orgId?: string | undefined; - startTimestamp?: number | undefined; - endTimestamp?: number | undefined; - timeInterval?: string | undefined; - groupBy?: string | undefined; - requestPath?: string | undefined; - requestType?: string | undefined; - responseCode?: string | undefined; - chainId?: string | undefined; - apiKeyId?: string | undefined; + orgId?: string | undefined; + startTimestamp?: number | undefined; + endTimestamp?: number | undefined; + timeInterval?: string | undefined; + groupBy?: string | undefined; + requestPath?: string | undefined; + requestType?: string | undefined; + responseCode?: string | undefined; + chainId?: string | undefined; + apiKeyId?: string | undefined; }; /** @internal */ export const GetApiUsageMetricsRequest$outboundSchema: z.ZodType< - GetApiUsageMetricsRequest$Outbound, - z.ZodTypeDef, - GetApiUsageMetricsRequest + GetApiUsageMetricsRequest$Outbound, + z.ZodTypeDef, + GetApiUsageMetricsRequest > = z.object({ - orgId: z.string().optional(), - startTimestamp: z.number().int().optional(), - endTimestamp: z.number().int().optional(), - timeInterval: components.TimeIntervalGranularityExtended$outboundSchema.optional(), - groupBy: components.UsageMetricsGroupByEnum$outboundSchema.optional(), - requestPath: z.string().optional(), - requestType: RequestType$outboundSchema.optional(), - responseCode: z.string().optional(), - chainId: z.string().optional(), - apiKeyId: z.string().optional(), + orgId: z.string().optional(), + startTimestamp: z.number().int().optional(), + endTimestamp: z.number().int().optional(), + timeInterval: components.TimeIntervalGranularityExtended$outboundSchema + .optional(), + groupBy: components.UsageMetricsGroupByEnum$outboundSchema.optional(), + requestPath: z.string().optional(), + requestType: RequestType$outboundSchema.optional(), + responseCode: z.string().optional(), + chainId: z.string().optional(), + apiKeyId: z.string().optional(), }); /** @@ -137,10 +141,10 @@ export const GetApiUsageMetricsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiUsageMetricsRequest$ { - /** @deprecated use `GetApiUsageMetricsRequest$inboundSchema` instead. */ - export const inboundSchema = GetApiUsageMetricsRequest$inboundSchema; - /** @deprecated use `GetApiUsageMetricsRequest$outboundSchema` instead. */ - export const outboundSchema = GetApiUsageMetricsRequest$outboundSchema; - /** @deprecated use `GetApiUsageMetricsRequest$Outbound` instead. */ - export type Outbound = GetApiUsageMetricsRequest$Outbound; + /** @deprecated use `GetApiUsageMetricsRequest$inboundSchema` instead. */ + export const inboundSchema = GetApiUsageMetricsRequest$inboundSchema; + /** @deprecated use `GetApiUsageMetricsRequest$outboundSchema` instead. */ + export const outboundSchema = GetApiUsageMetricsRequest$outboundSchema; + /** @deprecated use `GetApiUsageMetricsRequest$Outbound` instead. */ + export type Outbound = GetApiUsageMetricsRequest$Outbound; } diff --git a/src/models/operations/getassetdetails.ts b/src/models/operations/getassetdetails.ts index 533d590..dea3846 100644 --- a/src/models/operations/getassetdetails.ts +++ b/src/models/operations/getassetdetails.ts @@ -2,54 +2,56 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as components from "../components/index.js"; import * as z from "zod"; +import * as components from "../components/index.js"; -export const GetAssetDetailsServerList = ["https://glacier-api.avax.network"] as const; +export const GetAssetDetailsServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetAssetDetailsGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type GetAssetDetailsRequest = { - /** - * A primary network blockchain id or alias. - */ - blockchainId: components.XChainId; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; - /** - * Asset ID for any asset on X-Chain - */ - assetId: string; + /** + * A primary network blockchain id or alias. + */ + blockchainId: components.XChainId; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; + /** + * Asset ID for any asset on X-Chain + */ + assetId: string; }; /** @internal */ export const GetAssetDetailsGlobals$inboundSchema: z.ZodType< - GetAssetDetailsGlobals, - z.ZodTypeDef, - unknown + GetAssetDetailsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type GetAssetDetailsGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const GetAssetDetailsGlobals$outboundSchema: z.ZodType< - GetAssetDetailsGlobals$Outbound, - z.ZodTypeDef, - GetAssetDetailsGlobals + GetAssetDetailsGlobals$Outbound, + z.ZodTypeDef, + GetAssetDetailsGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -57,41 +59,41 @@ export const GetAssetDetailsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAssetDetailsGlobals$ { - /** @deprecated use `GetAssetDetailsGlobals$inboundSchema` instead. */ - export const inboundSchema = GetAssetDetailsGlobals$inboundSchema; - /** @deprecated use `GetAssetDetailsGlobals$outboundSchema` instead. */ - export const outboundSchema = GetAssetDetailsGlobals$outboundSchema; - /** @deprecated use `GetAssetDetailsGlobals$Outbound` instead. */ - export type Outbound = GetAssetDetailsGlobals$Outbound; + /** @deprecated use `GetAssetDetailsGlobals$inboundSchema` instead. */ + export const inboundSchema = GetAssetDetailsGlobals$inboundSchema; + /** @deprecated use `GetAssetDetailsGlobals$outboundSchema` instead. */ + export const outboundSchema = GetAssetDetailsGlobals$outboundSchema; + /** @deprecated use `GetAssetDetailsGlobals$Outbound` instead. */ + export type Outbound = GetAssetDetailsGlobals$Outbound; } /** @internal */ export const GetAssetDetailsRequest$inboundSchema: z.ZodType< - GetAssetDetailsRequest, - z.ZodTypeDef, - unknown + GetAssetDetailsRequest, + z.ZodTypeDef, + unknown > = z.object({ - blockchainId: components.XChainId$inboundSchema, - network: components.GlobalParamNetwork$inboundSchema.optional(), - assetId: z.string(), + blockchainId: components.XChainId$inboundSchema, + network: components.GlobalParamNetwork$inboundSchema.optional(), + assetId: z.string(), }); /** @internal */ export type GetAssetDetailsRequest$Outbound = { - blockchainId: string; - network?: string | undefined; - assetId: string; + blockchainId: string; + network?: string | undefined; + assetId: string; }; /** @internal */ export const GetAssetDetailsRequest$outboundSchema: z.ZodType< - GetAssetDetailsRequest$Outbound, - z.ZodTypeDef, - GetAssetDetailsRequest + GetAssetDetailsRequest$Outbound, + z.ZodTypeDef, + GetAssetDetailsRequest > = z.object({ - blockchainId: components.XChainId$outboundSchema, - network: components.GlobalParamNetwork$outboundSchema.optional(), - assetId: z.string(), + blockchainId: components.XChainId$outboundSchema, + network: components.GlobalParamNetwork$outboundSchema.optional(), + assetId: z.string(), }); /** @@ -99,10 +101,10 @@ export const GetAssetDetailsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAssetDetailsRequest$ { - /** @deprecated use `GetAssetDetailsRequest$inboundSchema` instead. */ - export const inboundSchema = GetAssetDetailsRequest$inboundSchema; - /** @deprecated use `GetAssetDetailsRequest$outboundSchema` instead. */ - export const outboundSchema = GetAssetDetailsRequest$outboundSchema; - /** @deprecated use `GetAssetDetailsRequest$Outbound` instead. */ - export type Outbound = GetAssetDetailsRequest$Outbound; + /** @deprecated use `GetAssetDetailsRequest$inboundSchema` instead. */ + export const inboundSchema = GetAssetDetailsRequest$inboundSchema; + /** @deprecated use `GetAssetDetailsRequest$outboundSchema` instead. */ + export const outboundSchema = GetAssetDetailsRequest$outboundSchema; + /** @deprecated use `GetAssetDetailsRequest$Outbound` instead. */ + export type Outbound = GetAssetDetailsRequest$Outbound; } diff --git a/src/models/operations/getbalancesbyaddresses.ts b/src/models/operations/getbalancesbyaddresses.ts index ae27b69..40df7c0 100644 --- a/src/models/operations/getbalancesbyaddresses.ts +++ b/src/models/operations/getbalancesbyaddresses.ts @@ -2,66 +2,68 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as components from "../components/index.js"; import * as z from "zod"; +import * as components from "../components/index.js"; -export const GetBalancesByAddressesServerList = ["https://glacier-api.avax.network"] as const; +export const GetBalancesByAddressesServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetBalancesByAddressesGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type GetBalancesByAddressesRequest = { - /** - * An epoch timestamp in seconds. Balance will be calculated at this timestamp. - */ - blockTimestamp?: number | undefined; - /** - * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji". - */ - addresses?: string | undefined; - /** - * A primary network blockchain id or alias. - */ - blockchainId: components.BlockchainId; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * An epoch timestamp in seconds. Balance will be calculated at this timestamp. + */ + blockTimestamp?: number | undefined; + /** + * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji". + */ + addresses?: string | undefined; + /** + * A primary network blockchain id or alias. + */ + blockchainId: components.BlockchainId; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; /** * Successful response */ export type GetBalancesByAddressesResponseBody = - | components.ListPChainBalancesResponse - | components.ListXChainBalancesResponse - | components.ListCChainAtomicBalancesResponse; + | components.ListPChainBalancesResponse + | components.ListXChainBalancesResponse + | components.ListCChainAtomicBalancesResponse; /** @internal */ export const GetBalancesByAddressesGlobals$inboundSchema: z.ZodType< - GetBalancesByAddressesGlobals, - z.ZodTypeDef, - unknown + GetBalancesByAddressesGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type GetBalancesByAddressesGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const GetBalancesByAddressesGlobals$outboundSchema: z.ZodType< - GetBalancesByAddressesGlobals$Outbound, - z.ZodTypeDef, - GetBalancesByAddressesGlobals + GetBalancesByAddressesGlobals$Outbound, + z.ZodTypeDef, + GetBalancesByAddressesGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -69,44 +71,44 @@ export const GetBalancesByAddressesGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBalancesByAddressesGlobals$ { - /** @deprecated use `GetBalancesByAddressesGlobals$inboundSchema` instead. */ - export const inboundSchema = GetBalancesByAddressesGlobals$inboundSchema; - /** @deprecated use `GetBalancesByAddressesGlobals$outboundSchema` instead. */ - export const outboundSchema = GetBalancesByAddressesGlobals$outboundSchema; - /** @deprecated use `GetBalancesByAddressesGlobals$Outbound` instead. */ - export type Outbound = GetBalancesByAddressesGlobals$Outbound; + /** @deprecated use `GetBalancesByAddressesGlobals$inboundSchema` instead. */ + export const inboundSchema = GetBalancesByAddressesGlobals$inboundSchema; + /** @deprecated use `GetBalancesByAddressesGlobals$outboundSchema` instead. */ + export const outboundSchema = GetBalancesByAddressesGlobals$outboundSchema; + /** @deprecated use `GetBalancesByAddressesGlobals$Outbound` instead. */ + export type Outbound = GetBalancesByAddressesGlobals$Outbound; } /** @internal */ export const GetBalancesByAddressesRequest$inboundSchema: z.ZodType< - GetBalancesByAddressesRequest, - z.ZodTypeDef, - unknown + GetBalancesByAddressesRequest, + z.ZodTypeDef, + unknown > = z.object({ - blockTimestamp: z.number().int().optional(), - addresses: z.string().optional(), - blockchainId: components.BlockchainId$inboundSchema, - network: components.GlobalParamNetwork$inboundSchema.optional(), + blockTimestamp: z.number().int().optional(), + addresses: z.string().optional(), + blockchainId: components.BlockchainId$inboundSchema, + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type GetBalancesByAddressesRequest$Outbound = { - blockTimestamp?: number | undefined; - addresses?: string | undefined; - blockchainId: string; - network?: string | undefined; + blockTimestamp?: number | undefined; + addresses?: string | undefined; + blockchainId: string; + network?: string | undefined; }; /** @internal */ export const GetBalancesByAddressesRequest$outboundSchema: z.ZodType< - GetBalancesByAddressesRequest$Outbound, - z.ZodTypeDef, - GetBalancesByAddressesRequest + GetBalancesByAddressesRequest$Outbound, + z.ZodTypeDef, + GetBalancesByAddressesRequest > = z.object({ - blockTimestamp: z.number().int().optional(), - addresses: z.string().optional(), - blockchainId: components.BlockchainId$outboundSchema, - network: components.GlobalParamNetwork$outboundSchema.optional(), + blockTimestamp: z.number().int().optional(), + addresses: z.string().optional(), + blockchainId: components.BlockchainId$outboundSchema, + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -114,40 +116,40 @@ export const GetBalancesByAddressesRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBalancesByAddressesRequest$ { - /** @deprecated use `GetBalancesByAddressesRequest$inboundSchema` instead. */ - export const inboundSchema = GetBalancesByAddressesRequest$inboundSchema; - /** @deprecated use `GetBalancesByAddressesRequest$outboundSchema` instead. */ - export const outboundSchema = GetBalancesByAddressesRequest$outboundSchema; - /** @deprecated use `GetBalancesByAddressesRequest$Outbound` instead. */ - export type Outbound = GetBalancesByAddressesRequest$Outbound; + /** @deprecated use `GetBalancesByAddressesRequest$inboundSchema` instead. */ + export const inboundSchema = GetBalancesByAddressesRequest$inboundSchema; + /** @deprecated use `GetBalancesByAddressesRequest$outboundSchema` instead. */ + export const outboundSchema = GetBalancesByAddressesRequest$outboundSchema; + /** @deprecated use `GetBalancesByAddressesRequest$Outbound` instead. */ + export type Outbound = GetBalancesByAddressesRequest$Outbound; } /** @internal */ export const GetBalancesByAddressesResponseBody$inboundSchema: z.ZodType< - GetBalancesByAddressesResponseBody, - z.ZodTypeDef, - unknown + GetBalancesByAddressesResponseBody, + z.ZodTypeDef, + unknown > = z.union([ - components.ListPChainBalancesResponse$inboundSchema, - components.ListXChainBalancesResponse$inboundSchema, - components.ListCChainAtomicBalancesResponse$inboundSchema, + components.ListPChainBalancesResponse$inboundSchema, + components.ListXChainBalancesResponse$inboundSchema, + components.ListCChainAtomicBalancesResponse$inboundSchema, ]); /** @internal */ export type GetBalancesByAddressesResponseBody$Outbound = - | components.ListPChainBalancesResponse$Outbound - | components.ListXChainBalancesResponse$Outbound - | components.ListCChainAtomicBalancesResponse$Outbound; + | components.ListPChainBalancesResponse$Outbound + | components.ListXChainBalancesResponse$Outbound + | components.ListCChainAtomicBalancesResponse$Outbound; /** @internal */ export const GetBalancesByAddressesResponseBody$outboundSchema: z.ZodType< - GetBalancesByAddressesResponseBody$Outbound, - z.ZodTypeDef, - GetBalancesByAddressesResponseBody + GetBalancesByAddressesResponseBody$Outbound, + z.ZodTypeDef, + GetBalancesByAddressesResponseBody > = z.union([ - components.ListPChainBalancesResponse$outboundSchema, - components.ListXChainBalancesResponse$outboundSchema, - components.ListCChainAtomicBalancesResponse$outboundSchema, + components.ListPChainBalancesResponse$outboundSchema, + components.ListXChainBalancesResponse$outboundSchema, + components.ListCChainAtomicBalancesResponse$outboundSchema, ]); /** @@ -155,10 +157,11 @@ export const GetBalancesByAddressesResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBalancesByAddressesResponseBody$ { - /** @deprecated use `GetBalancesByAddressesResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetBalancesByAddressesResponseBody$inboundSchema; - /** @deprecated use `GetBalancesByAddressesResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetBalancesByAddressesResponseBody$outboundSchema; - /** @deprecated use `GetBalancesByAddressesResponseBody$Outbound` instead. */ - export type Outbound = GetBalancesByAddressesResponseBody$Outbound; + /** @deprecated use `GetBalancesByAddressesResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetBalancesByAddressesResponseBody$inboundSchema; + /** @deprecated use `GetBalancesByAddressesResponseBody$outboundSchema` instead. */ + export const outboundSchema = + GetBalancesByAddressesResponseBody$outboundSchema; + /** @deprecated use `GetBalancesByAddressesResponseBody$Outbound` instead. */ + export type Outbound = GetBalancesByAddressesResponseBody$Outbound; } diff --git a/src/models/operations/getblock.ts b/src/models/operations/getblock.ts index de1f67d..e8cd89f 100644 --- a/src/models/operations/getblock.ts +++ b/src/models/operations/getblock.ts @@ -4,44 +4,49 @@ import * as z from "zod"; -export const GetBlockServerList = ["https://glacier-api.avax.network"] as const; +export const GetBlockServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetBlockGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type GetBlockRequest = { - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * A block identifier which is either a block number or the block hash. - */ - blockId: string; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * A block identifier which is either a block number or the block hash. + */ + blockId: string; }; /** @internal */ -export const GetBlockGlobals$inboundSchema: z.ZodType = - z.object({ - chainId: z.string().optional(), - }); +export const GetBlockGlobals$inboundSchema: z.ZodType< + GetBlockGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + chainId: z.string().optional(), +}); /** @internal */ export type GetBlockGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const GetBlockGlobals$outboundSchema: z.ZodType< - GetBlockGlobals$Outbound, - z.ZodTypeDef, - GetBlockGlobals + GetBlockGlobals$Outbound, + z.ZodTypeDef, + GetBlockGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -49,35 +54,38 @@ export const GetBlockGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBlockGlobals$ { - /** @deprecated use `GetBlockGlobals$inboundSchema` instead. */ - export const inboundSchema = GetBlockGlobals$inboundSchema; - /** @deprecated use `GetBlockGlobals$outboundSchema` instead. */ - export const outboundSchema = GetBlockGlobals$outboundSchema; - /** @deprecated use `GetBlockGlobals$Outbound` instead. */ - export type Outbound = GetBlockGlobals$Outbound; + /** @deprecated use `GetBlockGlobals$inboundSchema` instead. */ + export const inboundSchema = GetBlockGlobals$inboundSchema; + /** @deprecated use `GetBlockGlobals$outboundSchema` instead. */ + export const outboundSchema = GetBlockGlobals$outboundSchema; + /** @deprecated use `GetBlockGlobals$Outbound` instead. */ + export type Outbound = GetBlockGlobals$Outbound; } /** @internal */ -export const GetBlockRequest$inboundSchema: z.ZodType = - z.object({ - chainId: z.string().optional(), - blockId: z.string(), - }); +export const GetBlockRequest$inboundSchema: z.ZodType< + GetBlockRequest, + z.ZodTypeDef, + unknown +> = z.object({ + chainId: z.string().optional(), + blockId: z.string(), +}); /** @internal */ export type GetBlockRequest$Outbound = { - chainId?: string | undefined; - blockId: string; + chainId?: string | undefined; + blockId: string; }; /** @internal */ export const GetBlockRequest$outboundSchema: z.ZodType< - GetBlockRequest$Outbound, - z.ZodTypeDef, - GetBlockRequest + GetBlockRequest$Outbound, + z.ZodTypeDef, + GetBlockRequest > = z.object({ - chainId: z.string().optional(), - blockId: z.string(), + chainId: z.string().optional(), + blockId: z.string(), }); /** @@ -85,10 +93,10 @@ export const GetBlockRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBlockRequest$ { - /** @deprecated use `GetBlockRequest$inboundSchema` instead. */ - export const inboundSchema = GetBlockRequest$inboundSchema; - /** @deprecated use `GetBlockRequest$outboundSchema` instead. */ - export const outboundSchema = GetBlockRequest$outboundSchema; - /** @deprecated use `GetBlockRequest$Outbound` instead. */ - export type Outbound = GetBlockRequest$Outbound; + /** @deprecated use `GetBlockRequest$inboundSchema` instead. */ + export const inboundSchema = GetBlockRequest$inboundSchema; + /** @deprecated use `GetBlockRequest$outboundSchema` instead. */ + export const outboundSchema = GetBlockRequest$outboundSchema; + /** @deprecated use `GetBlockRequest$Outbound` instead. */ + export type Outbound = GetBlockRequest$Outbound; } diff --git a/src/models/operations/getblockbyid.ts b/src/models/operations/getblockbyid.ts index 960d506..d6cb2eb 100644 --- a/src/models/operations/getblockbyid.ts +++ b/src/models/operations/getblockbyid.ts @@ -2,54 +2,56 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as components from "../components/index.js"; import * as z from "zod"; +import * as components from "../components/index.js"; -export const GetBlockByIdServerList = ["https://glacier-api.avax.network"] as const; +export const GetBlockByIdServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetBlockByIdGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type GetBlockByIdRequest = { - /** - * A primary network blockchain id or alias. - */ - blockchainId: components.BlockchainId; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; - /** - * A block identifier which is either a block number or the block hash. - */ - blockId: string; + /** + * A primary network blockchain id or alias. + */ + blockchainId: components.BlockchainId; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; + /** + * A block identifier which is either a block number or the block hash. + */ + blockId: string; }; /** @internal */ export const GetBlockByIdGlobals$inboundSchema: z.ZodType< - GetBlockByIdGlobals, - z.ZodTypeDef, - unknown + GetBlockByIdGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type GetBlockByIdGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const GetBlockByIdGlobals$outboundSchema: z.ZodType< - GetBlockByIdGlobals$Outbound, - z.ZodTypeDef, - GetBlockByIdGlobals + GetBlockByIdGlobals$Outbound, + z.ZodTypeDef, + GetBlockByIdGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -57,41 +59,41 @@ export const GetBlockByIdGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBlockByIdGlobals$ { - /** @deprecated use `GetBlockByIdGlobals$inboundSchema` instead. */ - export const inboundSchema = GetBlockByIdGlobals$inboundSchema; - /** @deprecated use `GetBlockByIdGlobals$outboundSchema` instead. */ - export const outboundSchema = GetBlockByIdGlobals$outboundSchema; - /** @deprecated use `GetBlockByIdGlobals$Outbound` instead. */ - export type Outbound = GetBlockByIdGlobals$Outbound; + /** @deprecated use `GetBlockByIdGlobals$inboundSchema` instead. */ + export const inboundSchema = GetBlockByIdGlobals$inboundSchema; + /** @deprecated use `GetBlockByIdGlobals$outboundSchema` instead. */ + export const outboundSchema = GetBlockByIdGlobals$outboundSchema; + /** @deprecated use `GetBlockByIdGlobals$Outbound` instead. */ + export type Outbound = GetBlockByIdGlobals$Outbound; } /** @internal */ export const GetBlockByIdRequest$inboundSchema: z.ZodType< - GetBlockByIdRequest, - z.ZodTypeDef, - unknown + GetBlockByIdRequest, + z.ZodTypeDef, + unknown > = z.object({ - blockchainId: components.BlockchainId$inboundSchema, - network: components.GlobalParamNetwork$inboundSchema.optional(), - blockId: z.string(), + blockchainId: components.BlockchainId$inboundSchema, + network: components.GlobalParamNetwork$inboundSchema.optional(), + blockId: z.string(), }); /** @internal */ export type GetBlockByIdRequest$Outbound = { - blockchainId: string; - network?: string | undefined; - blockId: string; + blockchainId: string; + network?: string | undefined; + blockId: string; }; /** @internal */ export const GetBlockByIdRequest$outboundSchema: z.ZodType< - GetBlockByIdRequest$Outbound, - z.ZodTypeDef, - GetBlockByIdRequest + GetBlockByIdRequest$Outbound, + z.ZodTypeDef, + GetBlockByIdRequest > = z.object({ - blockchainId: components.BlockchainId$outboundSchema, - network: components.GlobalParamNetwork$outboundSchema.optional(), - blockId: z.string(), + blockchainId: components.BlockchainId$outboundSchema, + network: components.GlobalParamNetwork$outboundSchema.optional(), + blockId: z.string(), }); /** @@ -99,10 +101,10 @@ export const GetBlockByIdRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBlockByIdRequest$ { - /** @deprecated use `GetBlockByIdRequest$inboundSchema` instead. */ - export const inboundSchema = GetBlockByIdRequest$inboundSchema; - /** @deprecated use `GetBlockByIdRequest$outboundSchema` instead. */ - export const outboundSchema = GetBlockByIdRequest$outboundSchema; - /** @deprecated use `GetBlockByIdRequest$Outbound` instead. */ - export type Outbound = GetBlockByIdRequest$Outbound; + /** @deprecated use `GetBlockByIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetBlockByIdRequest$inboundSchema; + /** @deprecated use `GetBlockByIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetBlockByIdRequest$outboundSchema; + /** @deprecated use `GetBlockByIdRequest$Outbound` instead. */ + export type Outbound = GetBlockByIdRequest$Outbound; } diff --git a/src/models/operations/getchain.ts b/src/models/operations/getchain.ts index 29f95aa..327bd74 100644 --- a/src/models/operations/getchain.ts +++ b/src/models/operations/getchain.ts @@ -4,40 +4,45 @@ import * as z from "zod"; -export const GetChainServerList = ["https://popsicle-api.avax.network"] as const; +export const GetChainServerList = [ + "https://metrics.avax.network", +] as const; export type GetChainGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type GetChainRequest = { - /** - * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; + /** + * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; }; /** @internal */ -export const GetChainGlobals$inboundSchema: z.ZodType = - z.object({ - chainId: z.string().optional(), - }); +export const GetChainGlobals$inboundSchema: z.ZodType< + GetChainGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + chainId: z.string().optional(), +}); /** @internal */ export type GetChainGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const GetChainGlobals$outboundSchema: z.ZodType< - GetChainGlobals$Outbound, - z.ZodTypeDef, - GetChainGlobals + GetChainGlobals$Outbound, + z.ZodTypeDef, + GetChainGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -45,32 +50,35 @@ export const GetChainGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetChainGlobals$ { - /** @deprecated use `GetChainGlobals$inboundSchema` instead. */ - export const inboundSchema = GetChainGlobals$inboundSchema; - /** @deprecated use `GetChainGlobals$outboundSchema` instead. */ - export const outboundSchema = GetChainGlobals$outboundSchema; - /** @deprecated use `GetChainGlobals$Outbound` instead. */ - export type Outbound = GetChainGlobals$Outbound; + /** @deprecated use `GetChainGlobals$inboundSchema` instead. */ + export const inboundSchema = GetChainGlobals$inboundSchema; + /** @deprecated use `GetChainGlobals$outboundSchema` instead. */ + export const outboundSchema = GetChainGlobals$outboundSchema; + /** @deprecated use `GetChainGlobals$Outbound` instead. */ + export type Outbound = GetChainGlobals$Outbound; } /** @internal */ -export const GetChainRequest$inboundSchema: z.ZodType = - z.object({ - chainId: z.string().optional(), - }); +export const GetChainRequest$inboundSchema: z.ZodType< + GetChainRequest, + z.ZodTypeDef, + unknown +> = z.object({ + chainId: z.string().optional(), +}); /** @internal */ export type GetChainRequest$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const GetChainRequest$outboundSchema: z.ZodType< - GetChainRequest$Outbound, - z.ZodTypeDef, - GetChainRequest + GetChainRequest$Outbound, + z.ZodTypeDef, + GetChainRequest > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -78,10 +86,10 @@ export const GetChainRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetChainRequest$ { - /** @deprecated use `GetChainRequest$inboundSchema` instead. */ - export const inboundSchema = GetChainRequest$inboundSchema; - /** @deprecated use `GetChainRequest$outboundSchema` instead. */ - export const outboundSchema = GetChainRequest$outboundSchema; - /** @deprecated use `GetChainRequest$Outbound` instead. */ - export type Outbound = GetChainRequest$Outbound; + /** @deprecated use `GetChainRequest$inboundSchema` instead. */ + export const inboundSchema = GetChainRequest$inboundSchema; + /** @deprecated use `GetChainRequest$outboundSchema` instead. */ + export const outboundSchema = GetChainRequest$outboundSchema; + /** @deprecated use `GetChainRequest$Outbound` instead. */ + export type Outbound = GetChainRequest$Outbound; } diff --git a/src/models/operations/getchainidsforaddresses.ts b/src/models/operations/getchainidsforaddresses.ts index b9e1192..ee8a09f 100644 --- a/src/models/operations/getchainidsforaddresses.ts +++ b/src/models/operations/getchainidsforaddresses.ts @@ -2,50 +2,52 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as components from "../components/index.js"; import * as z from "zod"; +import * as components from "../components/index.js"; -export const GetChainIdsForAddressesServerList = ["https://glacier-api.avax.network"] as const; +export const GetChainIdsForAddressesServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetChainIdsForAddressesGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type GetChainIdsForAddressesRequest = { - /** - * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji". - */ - addresses: string; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji". + */ + addresses: string; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; /** @internal */ export const GetChainIdsForAddressesGlobals$inboundSchema: z.ZodType< - GetChainIdsForAddressesGlobals, - z.ZodTypeDef, - unknown + GetChainIdsForAddressesGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type GetChainIdsForAddressesGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const GetChainIdsForAddressesGlobals$outboundSchema: z.ZodType< - GetChainIdsForAddressesGlobals$Outbound, - z.ZodTypeDef, - GetChainIdsForAddressesGlobals + GetChainIdsForAddressesGlobals$Outbound, + z.ZodTypeDef, + GetChainIdsForAddressesGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -53,38 +55,38 @@ export const GetChainIdsForAddressesGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetChainIdsForAddressesGlobals$ { - /** @deprecated use `GetChainIdsForAddressesGlobals$inboundSchema` instead. */ - export const inboundSchema = GetChainIdsForAddressesGlobals$inboundSchema; - /** @deprecated use `GetChainIdsForAddressesGlobals$outboundSchema` instead. */ - export const outboundSchema = GetChainIdsForAddressesGlobals$outboundSchema; - /** @deprecated use `GetChainIdsForAddressesGlobals$Outbound` instead. */ - export type Outbound = GetChainIdsForAddressesGlobals$Outbound; + /** @deprecated use `GetChainIdsForAddressesGlobals$inboundSchema` instead. */ + export const inboundSchema = GetChainIdsForAddressesGlobals$inboundSchema; + /** @deprecated use `GetChainIdsForAddressesGlobals$outboundSchema` instead. */ + export const outboundSchema = GetChainIdsForAddressesGlobals$outboundSchema; + /** @deprecated use `GetChainIdsForAddressesGlobals$Outbound` instead. */ + export type Outbound = GetChainIdsForAddressesGlobals$Outbound; } /** @internal */ export const GetChainIdsForAddressesRequest$inboundSchema: z.ZodType< - GetChainIdsForAddressesRequest, - z.ZodTypeDef, - unknown + GetChainIdsForAddressesRequest, + z.ZodTypeDef, + unknown > = z.object({ - addresses: z.string(), - network: components.GlobalParamNetwork$inboundSchema.optional(), + addresses: z.string(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type GetChainIdsForAddressesRequest$Outbound = { - addresses: string; - network?: string | undefined; + addresses: string; + network?: string | undefined; }; /** @internal */ export const GetChainIdsForAddressesRequest$outboundSchema: z.ZodType< - GetChainIdsForAddressesRequest$Outbound, - z.ZodTypeDef, - GetChainIdsForAddressesRequest + GetChainIdsForAddressesRequest$Outbound, + z.ZodTypeDef, + GetChainIdsForAddressesRequest > = z.object({ - addresses: z.string(), - network: components.GlobalParamNetwork$outboundSchema.optional(), + addresses: z.string(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -92,10 +94,10 @@ export const GetChainIdsForAddressesRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetChainIdsForAddressesRequest$ { - /** @deprecated use `GetChainIdsForAddressesRequest$inboundSchema` instead. */ - export const inboundSchema = GetChainIdsForAddressesRequest$inboundSchema; - /** @deprecated use `GetChainIdsForAddressesRequest$outboundSchema` instead. */ - export const outboundSchema = GetChainIdsForAddressesRequest$outboundSchema; - /** @deprecated use `GetChainIdsForAddressesRequest$Outbound` instead. */ - export type Outbound = GetChainIdsForAddressesRequest$Outbound; + /** @deprecated use `GetChainIdsForAddressesRequest$inboundSchema` instead. */ + export const inboundSchema = GetChainIdsForAddressesRequest$inboundSchema; + /** @deprecated use `GetChainIdsForAddressesRequest$outboundSchema` instead. */ + export const outboundSchema = GetChainIdsForAddressesRequest$outboundSchema; + /** @deprecated use `GetChainIdsForAddressesRequest$Outbound` instead. */ + export type Outbound = GetChainIdsForAddressesRequest$Outbound; } diff --git a/src/models/operations/getchaininfo.ts b/src/models/operations/getchaininfo.ts index 37d344f..b4b0600 100644 --- a/src/models/operations/getchaininfo.ts +++ b/src/models/operations/getchaininfo.ts @@ -4,43 +4,45 @@ import * as z from "zod"; -export const GetChainInfoServerList = ["https://glacier-api.avax.network"] as const; +export const GetChainInfoServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetChainInfoGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type GetChainInfoRequest = { - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; }; /** @internal */ export const GetChainInfoGlobals$inboundSchema: z.ZodType< - GetChainInfoGlobals, - z.ZodTypeDef, - unknown + GetChainInfoGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type GetChainInfoGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const GetChainInfoGlobals$outboundSchema: z.ZodType< - GetChainInfoGlobals$Outbound, - z.ZodTypeDef, - GetChainInfoGlobals + GetChainInfoGlobals$Outbound, + z.ZodTypeDef, + GetChainInfoGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -48,35 +50,35 @@ export const GetChainInfoGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetChainInfoGlobals$ { - /** @deprecated use `GetChainInfoGlobals$inboundSchema` instead. */ - export const inboundSchema = GetChainInfoGlobals$inboundSchema; - /** @deprecated use `GetChainInfoGlobals$outboundSchema` instead. */ - export const outboundSchema = GetChainInfoGlobals$outboundSchema; - /** @deprecated use `GetChainInfoGlobals$Outbound` instead. */ - export type Outbound = GetChainInfoGlobals$Outbound; + /** @deprecated use `GetChainInfoGlobals$inboundSchema` instead. */ + export const inboundSchema = GetChainInfoGlobals$inboundSchema; + /** @deprecated use `GetChainInfoGlobals$outboundSchema` instead. */ + export const outboundSchema = GetChainInfoGlobals$outboundSchema; + /** @deprecated use `GetChainInfoGlobals$Outbound` instead. */ + export type Outbound = GetChainInfoGlobals$Outbound; } /** @internal */ export const GetChainInfoRequest$inboundSchema: z.ZodType< - GetChainInfoRequest, - z.ZodTypeDef, - unknown + GetChainInfoRequest, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type GetChainInfoRequest$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const GetChainInfoRequest$outboundSchema: z.ZodType< - GetChainInfoRequest$Outbound, - z.ZodTypeDef, - GetChainInfoRequest + GetChainInfoRequest$Outbound, + z.ZodTypeDef, + GetChainInfoRequest > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -84,10 +86,10 @@ export const GetChainInfoRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetChainInfoRequest$ { - /** @deprecated use `GetChainInfoRequest$inboundSchema` instead. */ - export const inboundSchema = GetChainInfoRequest$inboundSchema; - /** @deprecated use `GetChainInfoRequest$outboundSchema` instead. */ - export const outboundSchema = GetChainInfoRequest$outboundSchema; - /** @deprecated use `GetChainInfoRequest$Outbound` instead. */ - export type Outbound = GetChainInfoRequest$Outbound; + /** @deprecated use `GetChainInfoRequest$inboundSchema` instead. */ + export const inboundSchema = GetChainInfoRequest$inboundSchema; + /** @deprecated use `GetChainInfoRequest$outboundSchema` instead. */ + export const outboundSchema = GetChainInfoRequest$outboundSchema; + /** @deprecated use `GetChainInfoRequest$Outbound` instead. */ + export type Outbound = GetChainInfoRequest$Outbound; } diff --git a/src/models/operations/getcontractmetadata.ts b/src/models/operations/getcontractmetadata.ts index 98f67c9..5cf573f 100644 --- a/src/models/operations/getcontractmetadata.ts +++ b/src/models/operations/getcontractmetadata.ts @@ -2,59 +2,61 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as components from "../components/index.js"; import * as z from "zod"; +import * as components from "../components/index.js"; -export const GetContractMetadataServerList = ["https://glacier-api.avax.network"] as const; +export const GetContractMetadataServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetContractMetadataGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type GetContractMetadataRequest = { - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * Contract address on the relevant chain. - */ - address: string; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * Contract address on the relevant chain. + */ + address: string; }; /** * Successful response */ export type GetContractMetadataResponseBody = - | (components.UnknownContract & { ercType: "UNKNOWN" }) - | (components.Erc721Contract & { ercType: "ERC-721" }) - | (components.Erc1155Contract & { ercType: "ERC-1155" }) - | (components.Erc20Contract & { ercType: "ERC-20" }); + | (components.UnknownContract & { ercType: "UNKNOWN" }) + | (components.Erc721Contract & { ercType: "ERC-721" }) + | (components.Erc1155Contract & { ercType: "ERC-1155" }) + | (components.Erc20Contract & { ercType: "ERC-20" }); /** @internal */ export const GetContractMetadataGlobals$inboundSchema: z.ZodType< - GetContractMetadataGlobals, - z.ZodTypeDef, - unknown + GetContractMetadataGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type GetContractMetadataGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const GetContractMetadataGlobals$outboundSchema: z.ZodType< - GetContractMetadataGlobals$Outbound, - z.ZodTypeDef, - GetContractMetadataGlobals + GetContractMetadataGlobals$Outbound, + z.ZodTypeDef, + GetContractMetadataGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -62,38 +64,38 @@ export const GetContractMetadataGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetContractMetadataGlobals$ { - /** @deprecated use `GetContractMetadataGlobals$inboundSchema` instead. */ - export const inboundSchema = GetContractMetadataGlobals$inboundSchema; - /** @deprecated use `GetContractMetadataGlobals$outboundSchema` instead. */ - export const outboundSchema = GetContractMetadataGlobals$outboundSchema; - /** @deprecated use `GetContractMetadataGlobals$Outbound` instead. */ - export type Outbound = GetContractMetadataGlobals$Outbound; + /** @deprecated use `GetContractMetadataGlobals$inboundSchema` instead. */ + export const inboundSchema = GetContractMetadataGlobals$inboundSchema; + /** @deprecated use `GetContractMetadataGlobals$outboundSchema` instead. */ + export const outboundSchema = GetContractMetadataGlobals$outboundSchema; + /** @deprecated use `GetContractMetadataGlobals$Outbound` instead. */ + export type Outbound = GetContractMetadataGlobals$Outbound; } /** @internal */ export const GetContractMetadataRequest$inboundSchema: z.ZodType< - GetContractMetadataRequest, - z.ZodTypeDef, - unknown + GetContractMetadataRequest, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), - address: z.string(), + chainId: z.string().optional(), + address: z.string(), }); /** @internal */ export type GetContractMetadataRequest$Outbound = { - chainId?: string | undefined; - address: string; + chainId?: string | undefined; + address: string; }; /** @internal */ export const GetContractMetadataRequest$outboundSchema: z.ZodType< - GetContractMetadataRequest$Outbound, - z.ZodTypeDef, - GetContractMetadataRequest + GetContractMetadataRequest$Outbound, + z.ZodTypeDef, + GetContractMetadataRequest > = z.object({ - chainId: z.string().optional(), - address: z.string(), + chainId: z.string().optional(), + address: z.string(), }); /** @@ -101,59 +103,75 @@ export const GetContractMetadataRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetContractMetadataRequest$ { - /** @deprecated use `GetContractMetadataRequest$inboundSchema` instead. */ - export const inboundSchema = GetContractMetadataRequest$inboundSchema; - /** @deprecated use `GetContractMetadataRequest$outboundSchema` instead. */ - export const outboundSchema = GetContractMetadataRequest$outboundSchema; - /** @deprecated use `GetContractMetadataRequest$Outbound` instead. */ - export type Outbound = GetContractMetadataRequest$Outbound; + /** @deprecated use `GetContractMetadataRequest$inboundSchema` instead. */ + export const inboundSchema = GetContractMetadataRequest$inboundSchema; + /** @deprecated use `GetContractMetadataRequest$outboundSchema` instead. */ + export const outboundSchema = GetContractMetadataRequest$outboundSchema; + /** @deprecated use `GetContractMetadataRequest$Outbound` instead. */ + export type Outbound = GetContractMetadataRequest$Outbound; } /** @internal */ export const GetContractMetadataResponseBody$inboundSchema: z.ZodType< - GetContractMetadataResponseBody, - z.ZodTypeDef, - unknown + GetContractMetadataResponseBody, + z.ZodTypeDef, + unknown > = z.union([ - components.UnknownContract$inboundSchema.and( - z.object({ ercType: z.literal("UNKNOWN") }).transform((v) => ({ ercType: v.ercType })) - ), - components.Erc721Contract$inboundSchema.and( - z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ ercType: v.ercType })) - ), - components.Erc1155Contract$inboundSchema.and( - z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ ercType: v.ercType })) - ), - components.Erc20Contract$inboundSchema.and( - z.object({ ercType: z.literal("ERC-20") }).transform((v) => ({ ercType: v.ercType })) - ), + components.UnknownContract$inboundSchema.and( + z.object({ ercType: z.literal("UNKNOWN") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + components.Erc721Contract$inboundSchema.and( + z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + components.Erc1155Contract$inboundSchema.and( + z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + components.Erc20Contract$inboundSchema.and( + z.object({ ercType: z.literal("ERC-20") }).transform((v) => ({ + ercType: v.ercType, + })), + ), ]); /** @internal */ export type GetContractMetadataResponseBody$Outbound = - | (components.UnknownContract$Outbound & { ercType: "UNKNOWN" }) - | (components.Erc721Contract$Outbound & { ercType: "ERC-721" }) - | (components.Erc1155Contract$Outbound & { ercType: "ERC-1155" }) - | (components.Erc20Contract$Outbound & { ercType: "ERC-20" }); + | (components.UnknownContract$Outbound & { ercType: "UNKNOWN" }) + | (components.Erc721Contract$Outbound & { ercType: "ERC-721" }) + | (components.Erc1155Contract$Outbound & { ercType: "ERC-1155" }) + | (components.Erc20Contract$Outbound & { ercType: "ERC-20" }); /** @internal */ export const GetContractMetadataResponseBody$outboundSchema: z.ZodType< - GetContractMetadataResponseBody$Outbound, - z.ZodTypeDef, - GetContractMetadataResponseBody + GetContractMetadataResponseBody$Outbound, + z.ZodTypeDef, + GetContractMetadataResponseBody > = z.union([ - components.UnknownContract$outboundSchema.and( - z.object({ ercType: z.literal("UNKNOWN") }).transform((v) => ({ ercType: v.ercType })) - ), - components.Erc721Contract$outboundSchema.and( - z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ ercType: v.ercType })) - ), - components.Erc1155Contract$outboundSchema.and( - z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ ercType: v.ercType })) - ), - components.Erc20Contract$outboundSchema.and( - z.object({ ercType: z.literal("ERC-20") }).transform((v) => ({ ercType: v.ercType })) - ), + components.UnknownContract$outboundSchema.and( + z.object({ ercType: z.literal("UNKNOWN") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + components.Erc721Contract$outboundSchema.and( + z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + components.Erc1155Contract$outboundSchema.and( + z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + components.Erc20Contract$outboundSchema.and( + z.object({ ercType: z.literal("ERC-20") }).transform((v) => ({ + ercType: v.ercType, + })), + ), ]); /** @@ -161,10 +179,10 @@ export const GetContractMetadataResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetContractMetadataResponseBody$ { - /** @deprecated use `GetContractMetadataResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetContractMetadataResponseBody$inboundSchema; - /** @deprecated use `GetContractMetadataResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetContractMetadataResponseBody$outboundSchema; - /** @deprecated use `GetContractMetadataResponseBody$Outbound` instead. */ - export type Outbound = GetContractMetadataResponseBody$Outbound; + /** @deprecated use `GetContractMetadataResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetContractMetadataResponseBody$inboundSchema; + /** @deprecated use `GetContractMetadataResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetContractMetadataResponseBody$outboundSchema; + /** @deprecated use `GetContractMetadataResponseBody$Outbound` instead. */ + export type Outbound = GetContractMetadataResponseBody$Outbound; } diff --git a/src/models/operations/getdeploymenttransaction.ts b/src/models/operations/getdeploymenttransaction.ts index cb28965..77ce2bb 100644 --- a/src/models/operations/getdeploymenttransaction.ts +++ b/src/models/operations/getdeploymenttransaction.ts @@ -2,54 +2,56 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as components from "../components/index.js"; import * as z from "zod"; +import * as components from "../components/index.js"; -export const GetDeploymentTransactionServerList = ["https://glacier-api.avax.network"] as const; +export const GetDeploymentTransactionServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetDeploymentTransactionGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type GetDeploymentTransactionRequest = { - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * Contract address on the relevant chain. - */ - address: string; - /** - * The currency that return values should use. Defaults to USD. - */ - currency?: components.CurrencyCode | undefined; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * Contract address on the relevant chain. + */ + address: string; + /** + * The currency that return values should use. Defaults to USD. + */ + currency?: components.CurrencyCode | undefined; }; /** @internal */ export const GetDeploymentTransactionGlobals$inboundSchema: z.ZodType< - GetDeploymentTransactionGlobals, - z.ZodTypeDef, - unknown + GetDeploymentTransactionGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type GetDeploymentTransactionGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const GetDeploymentTransactionGlobals$outboundSchema: z.ZodType< - GetDeploymentTransactionGlobals$Outbound, - z.ZodTypeDef, - GetDeploymentTransactionGlobals + GetDeploymentTransactionGlobals$Outbound, + z.ZodTypeDef, + GetDeploymentTransactionGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -57,41 +59,41 @@ export const GetDeploymentTransactionGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetDeploymentTransactionGlobals$ { - /** @deprecated use `GetDeploymentTransactionGlobals$inboundSchema` instead. */ - export const inboundSchema = GetDeploymentTransactionGlobals$inboundSchema; - /** @deprecated use `GetDeploymentTransactionGlobals$outboundSchema` instead. */ - export const outboundSchema = GetDeploymentTransactionGlobals$outboundSchema; - /** @deprecated use `GetDeploymentTransactionGlobals$Outbound` instead. */ - export type Outbound = GetDeploymentTransactionGlobals$Outbound; + /** @deprecated use `GetDeploymentTransactionGlobals$inboundSchema` instead. */ + export const inboundSchema = GetDeploymentTransactionGlobals$inboundSchema; + /** @deprecated use `GetDeploymentTransactionGlobals$outboundSchema` instead. */ + export const outboundSchema = GetDeploymentTransactionGlobals$outboundSchema; + /** @deprecated use `GetDeploymentTransactionGlobals$Outbound` instead. */ + export type Outbound = GetDeploymentTransactionGlobals$Outbound; } /** @internal */ export const GetDeploymentTransactionRequest$inboundSchema: z.ZodType< - GetDeploymentTransactionRequest, - z.ZodTypeDef, - unknown + GetDeploymentTransactionRequest, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), - address: z.string(), - currency: components.CurrencyCode$inboundSchema.optional(), + chainId: z.string().optional(), + address: z.string(), + currency: components.CurrencyCode$inboundSchema.optional(), }); /** @internal */ export type GetDeploymentTransactionRequest$Outbound = { - chainId?: string | undefined; - address: string; - currency?: string | undefined; + chainId?: string | undefined; + address: string; + currency?: string | undefined; }; /** @internal */ export const GetDeploymentTransactionRequest$outboundSchema: z.ZodType< - GetDeploymentTransactionRequest$Outbound, - z.ZodTypeDef, - GetDeploymentTransactionRequest + GetDeploymentTransactionRequest$Outbound, + z.ZodTypeDef, + GetDeploymentTransactionRequest > = z.object({ - chainId: z.string().optional(), - address: z.string(), - currency: components.CurrencyCode$outboundSchema.optional(), + chainId: z.string().optional(), + address: z.string(), + currency: components.CurrencyCode$outboundSchema.optional(), }); /** @@ -99,10 +101,10 @@ export const GetDeploymentTransactionRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetDeploymentTransactionRequest$ { - /** @deprecated use `GetDeploymentTransactionRequest$inboundSchema` instead. */ - export const inboundSchema = GetDeploymentTransactionRequest$inboundSchema; - /** @deprecated use `GetDeploymentTransactionRequest$outboundSchema` instead. */ - export const outboundSchema = GetDeploymentTransactionRequest$outboundSchema; - /** @deprecated use `GetDeploymentTransactionRequest$Outbound` instead. */ - export type Outbound = GetDeploymentTransactionRequest$Outbound; + /** @deprecated use `GetDeploymentTransactionRequest$inboundSchema` instead. */ + export const inboundSchema = GetDeploymentTransactionRequest$inboundSchema; + /** @deprecated use `GetDeploymentTransactionRequest$outboundSchema` instead. */ + export const outboundSchema = GetDeploymentTransactionRequest$outboundSchema; + /** @deprecated use `GetDeploymentTransactionRequest$Outbound` instead. */ + export type Outbound = GetDeploymentTransactionRequest$Outbound; } diff --git a/src/models/operations/getevmchainmetrics.ts b/src/models/operations/getevmchainmetrics.ts index 34db8a1..40759e1 100644 --- a/src/models/operations/getevmchainmetrics.ts +++ b/src/models/operations/getevmchainmetrics.ts @@ -2,79 +2,81 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const GetEvmChainMetricsServerList = ["https://popsicle-api.avax.network"] as const; +export const GetEvmChainMetricsServerList = [ + "https://metrics.avax.network", +] as const; export type GetEvmChainMetricsGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type GetEvmChainMetricsRequest = { - /** - * Which chain level metric to fetch. - */ - metric: components.ChainMetric; - /** - * Query param for retrieving items after a specific timestamp. - */ - startTimestamp?: number | undefined; - /** - * Query param for retrieving items before a specific timestamp. - */ - endTimestamp?: number | undefined; - /** - * Time interval granularity for data aggregation. Metrics - * - * @remarks - * prefixed with "cumulative", "max", or "avg" only support timeInterval equal - * to "day". - */ - timeInterval?: components.TimeIntervalGranularity | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 2160. - */ - pageSize?: number | undefined; - /** - * A supported EVM chain ID or one of "total", "mainnet", or "testnet". Use the `/chains` endpoint to get a list of supported chain IDs. - */ - chainId?: string | undefined; + /** + * Which chain level metric to fetch. + */ + metric: components.ChainMetric; + /** + * Query param for retrieving items after a specific timestamp. + */ + startTimestamp?: number | undefined; + /** + * Query param for retrieving items before a specific timestamp. + */ + endTimestamp?: number | undefined; + /** + * Time interval granularity for data aggregation. Metrics + * + * @remarks + * prefixed with "cumulative", "max", or "avg" only support timeInterval equal + * to "day". + */ + timeInterval?: components.TimeIntervalGranularity | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 2160. + */ + pageSize?: number | undefined; + /** + * A supported EVM chain ID or one of "total", "mainnet", or "testnet". Use the `/chains` endpoint to get a list of supported chain IDs. + */ + chainId?: string | undefined; }; export type GetEvmChainMetricsResponse = { - result: components.MetricsApiResponse; + result: components.MetricsApiResponse; }; /** @internal */ export const GetEvmChainMetricsGlobals$inboundSchema: z.ZodType< - GetEvmChainMetricsGlobals, - z.ZodTypeDef, - unknown + GetEvmChainMetricsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type GetEvmChainMetricsGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const GetEvmChainMetricsGlobals$outboundSchema: z.ZodType< - GetEvmChainMetricsGlobals$Outbound, - z.ZodTypeDef, - GetEvmChainMetricsGlobals + GetEvmChainMetricsGlobals$Outbound, + z.ZodTypeDef, + GetEvmChainMetricsGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -82,53 +84,53 @@ export const GetEvmChainMetricsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetEvmChainMetricsGlobals$ { - /** @deprecated use `GetEvmChainMetricsGlobals$inboundSchema` instead. */ - export const inboundSchema = GetEvmChainMetricsGlobals$inboundSchema; - /** @deprecated use `GetEvmChainMetricsGlobals$outboundSchema` instead. */ - export const outboundSchema = GetEvmChainMetricsGlobals$outboundSchema; - /** @deprecated use `GetEvmChainMetricsGlobals$Outbound` instead. */ - export type Outbound = GetEvmChainMetricsGlobals$Outbound; + /** @deprecated use `GetEvmChainMetricsGlobals$inboundSchema` instead. */ + export const inboundSchema = GetEvmChainMetricsGlobals$inboundSchema; + /** @deprecated use `GetEvmChainMetricsGlobals$outboundSchema` instead. */ + export const outboundSchema = GetEvmChainMetricsGlobals$outboundSchema; + /** @deprecated use `GetEvmChainMetricsGlobals$Outbound` instead. */ + export type Outbound = GetEvmChainMetricsGlobals$Outbound; } /** @internal */ export const GetEvmChainMetricsRequest$inboundSchema: z.ZodType< - GetEvmChainMetricsRequest, - z.ZodTypeDef, - unknown + GetEvmChainMetricsRequest, + z.ZodTypeDef, + unknown > = z.object({ - metric: components.ChainMetric$inboundSchema, - startTimestamp: z.number().int().optional(), - endTimestamp: z.number().int().optional(), - timeInterval: components.TimeIntervalGranularity$inboundSchema.optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(100), - chainId: z.string().optional(), + metric: components.ChainMetric$inboundSchema, + startTimestamp: z.number().int().optional(), + endTimestamp: z.number().int().optional(), + timeInterval: components.TimeIntervalGranularity$inboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(100), + chainId: z.string().optional(), }); /** @internal */ export type GetEvmChainMetricsRequest$Outbound = { - metric: string; - startTimestamp?: number | undefined; - endTimestamp?: number | undefined; - timeInterval?: string | undefined; - pageToken?: string | undefined; - pageSize: number; - chainId?: string | undefined; + metric: string; + startTimestamp?: number | undefined; + endTimestamp?: number | undefined; + timeInterval?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + chainId?: string | undefined; }; /** @internal */ export const GetEvmChainMetricsRequest$outboundSchema: z.ZodType< - GetEvmChainMetricsRequest$Outbound, - z.ZodTypeDef, - GetEvmChainMetricsRequest + GetEvmChainMetricsRequest$Outbound, + z.ZodTypeDef, + GetEvmChainMetricsRequest > = z.object({ - metric: components.ChainMetric$outboundSchema, - startTimestamp: z.number().int().optional(), - endTimestamp: z.number().int().optional(), - timeInterval: components.TimeIntervalGranularity$outboundSchema.optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(100), - chainId: z.string().optional(), + metric: components.ChainMetric$outboundSchema, + startTimestamp: z.number().int().optional(), + endTimestamp: z.number().int().optional(), + timeInterval: components.TimeIntervalGranularity$outboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(100), + chainId: z.string().optional(), }); /** @@ -136,58 +138,54 @@ export const GetEvmChainMetricsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetEvmChainMetricsRequest$ { - /** @deprecated use `GetEvmChainMetricsRequest$inboundSchema` instead. */ - export const inboundSchema = GetEvmChainMetricsRequest$inboundSchema; - /** @deprecated use `GetEvmChainMetricsRequest$outboundSchema` instead. */ - export const outboundSchema = GetEvmChainMetricsRequest$outboundSchema; - /** @deprecated use `GetEvmChainMetricsRequest$Outbound` instead. */ - export type Outbound = GetEvmChainMetricsRequest$Outbound; + /** @deprecated use `GetEvmChainMetricsRequest$inboundSchema` instead. */ + export const inboundSchema = GetEvmChainMetricsRequest$inboundSchema; + /** @deprecated use `GetEvmChainMetricsRequest$outboundSchema` instead. */ + export const outboundSchema = GetEvmChainMetricsRequest$outboundSchema; + /** @deprecated use `GetEvmChainMetricsRequest$Outbound` instead. */ + export type Outbound = GetEvmChainMetricsRequest$Outbound; } /** @internal */ export const GetEvmChainMetricsResponse$inboundSchema: z.ZodType< - GetEvmChainMetricsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.MetricsApiResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + GetEvmChainMetricsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.MetricsApiResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type GetEvmChainMetricsResponse$Outbound = { - Result: components.MetricsApiResponse$Outbound; + Result: components.MetricsApiResponse$Outbound; }; /** @internal */ export const GetEvmChainMetricsResponse$outboundSchema: z.ZodType< - GetEvmChainMetricsResponse$Outbound, - z.ZodTypeDef, - GetEvmChainMetricsResponse -> = z - .object({ - result: components.MetricsApiResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + GetEvmChainMetricsResponse$Outbound, + z.ZodTypeDef, + GetEvmChainMetricsResponse +> = z.object({ + result: components.MetricsApiResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetEvmChainMetricsResponse$ { - /** @deprecated use `GetEvmChainMetricsResponse$inboundSchema` instead. */ - export const inboundSchema = GetEvmChainMetricsResponse$inboundSchema; - /** @deprecated use `GetEvmChainMetricsResponse$outboundSchema` instead. */ - export const outboundSchema = GetEvmChainMetricsResponse$outboundSchema; - /** @deprecated use `GetEvmChainMetricsResponse$Outbound` instead. */ - export type Outbound = GetEvmChainMetricsResponse$Outbound; + /** @deprecated use `GetEvmChainMetricsResponse$inboundSchema` instead. */ + export const inboundSchema = GetEvmChainMetricsResponse$inboundSchema; + /** @deprecated use `GetEvmChainMetricsResponse$outboundSchema` instead. */ + export const outboundSchema = GetEvmChainMetricsResponse$outboundSchema; + /** @deprecated use `GetEvmChainMetricsResponse$Outbound` instead. */ + export type Outbound = GetEvmChainMetricsResponse$Outbound; } diff --git a/src/models/operations/getevmchainrollingwindowmetrics.ts b/src/models/operations/getevmchainrollingwindowmetrics.ts index e589e5c..d40f121 100644 --- a/src/models/operations/getevmchainrollingwindowmetrics.ts +++ b/src/models/operations/getevmchainrollingwindowmetrics.ts @@ -2,52 +2,52 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as components from "../components/index.js"; import * as z from "zod"; +import * as components from "../components/index.js"; export const GetEvmChainRollingWindowMetricsServerList = [ - "https://popsicle-api.avax.network", + "https://metrics.avax.network", ] as const; export type GetEvmChainRollingWindowMetricsGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type GetEvmChainRollingWindowMetricsRequest = { - /** - * Which chain level metric to fetch for the rolling window. - */ - metric: components.ChainRollingWindowMetric; - /** - * A supported EVM chain ID or one of "total", "mainnet", or "testnet". Use the `/chains` endpoint to get a list of supported chain IDs. - */ - chainId?: string | undefined; + /** + * Which chain level metric to fetch for the rolling window. + */ + metric: components.ChainRollingWindowMetric; + /** + * A supported EVM chain ID or one of "total", "mainnet", or "testnet". Use the `/chains` endpoint to get a list of supported chain IDs. + */ + chainId?: string | undefined; }; /** @internal */ export const GetEvmChainRollingWindowMetricsGlobals$inboundSchema: z.ZodType< - GetEvmChainRollingWindowMetricsGlobals, - z.ZodTypeDef, - unknown + GetEvmChainRollingWindowMetricsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type GetEvmChainRollingWindowMetricsGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const GetEvmChainRollingWindowMetricsGlobals$outboundSchema: z.ZodType< - GetEvmChainRollingWindowMetricsGlobals$Outbound, - z.ZodTypeDef, - GetEvmChainRollingWindowMetricsGlobals + GetEvmChainRollingWindowMetricsGlobals$Outbound, + z.ZodTypeDef, + GetEvmChainRollingWindowMetricsGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -55,38 +55,40 @@ export const GetEvmChainRollingWindowMetricsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetEvmChainRollingWindowMetricsGlobals$ { - /** @deprecated use `GetEvmChainRollingWindowMetricsGlobals$inboundSchema` instead. */ - export const inboundSchema = GetEvmChainRollingWindowMetricsGlobals$inboundSchema; - /** @deprecated use `GetEvmChainRollingWindowMetricsGlobals$outboundSchema` instead. */ - export const outboundSchema = GetEvmChainRollingWindowMetricsGlobals$outboundSchema; - /** @deprecated use `GetEvmChainRollingWindowMetricsGlobals$Outbound` instead. */ - export type Outbound = GetEvmChainRollingWindowMetricsGlobals$Outbound; + /** @deprecated use `GetEvmChainRollingWindowMetricsGlobals$inboundSchema` instead. */ + export const inboundSchema = + GetEvmChainRollingWindowMetricsGlobals$inboundSchema; + /** @deprecated use `GetEvmChainRollingWindowMetricsGlobals$outboundSchema` instead. */ + export const outboundSchema = + GetEvmChainRollingWindowMetricsGlobals$outboundSchema; + /** @deprecated use `GetEvmChainRollingWindowMetricsGlobals$Outbound` instead. */ + export type Outbound = GetEvmChainRollingWindowMetricsGlobals$Outbound; } /** @internal */ export const GetEvmChainRollingWindowMetricsRequest$inboundSchema: z.ZodType< - GetEvmChainRollingWindowMetricsRequest, - z.ZodTypeDef, - unknown + GetEvmChainRollingWindowMetricsRequest, + z.ZodTypeDef, + unknown > = z.object({ - metric: components.ChainRollingWindowMetric$inboundSchema, - chainId: z.string().optional(), + metric: components.ChainRollingWindowMetric$inboundSchema, + chainId: z.string().optional(), }); /** @internal */ export type GetEvmChainRollingWindowMetricsRequest$Outbound = { - metric: string; - chainId?: string | undefined; + metric: string; + chainId?: string | undefined; }; /** @internal */ export const GetEvmChainRollingWindowMetricsRequest$outboundSchema: z.ZodType< - GetEvmChainRollingWindowMetricsRequest$Outbound, - z.ZodTypeDef, - GetEvmChainRollingWindowMetricsRequest + GetEvmChainRollingWindowMetricsRequest$Outbound, + z.ZodTypeDef, + GetEvmChainRollingWindowMetricsRequest > = z.object({ - metric: components.ChainRollingWindowMetric$outboundSchema, - chainId: z.string().optional(), + metric: components.ChainRollingWindowMetric$outboundSchema, + chainId: z.string().optional(), }); /** @@ -94,10 +96,12 @@ export const GetEvmChainRollingWindowMetricsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetEvmChainRollingWindowMetricsRequest$ { - /** @deprecated use `GetEvmChainRollingWindowMetricsRequest$inboundSchema` instead. */ - export const inboundSchema = GetEvmChainRollingWindowMetricsRequest$inboundSchema; - /** @deprecated use `GetEvmChainRollingWindowMetricsRequest$outboundSchema` instead. */ - export const outboundSchema = GetEvmChainRollingWindowMetricsRequest$outboundSchema; - /** @deprecated use `GetEvmChainRollingWindowMetricsRequest$Outbound` instead. */ - export type Outbound = GetEvmChainRollingWindowMetricsRequest$Outbound; + /** @deprecated use `GetEvmChainRollingWindowMetricsRequest$inboundSchema` instead. */ + export const inboundSchema = + GetEvmChainRollingWindowMetricsRequest$inboundSchema; + /** @deprecated use `GetEvmChainRollingWindowMetricsRequest$outboundSchema` instead. */ + export const outboundSchema = + GetEvmChainRollingWindowMetricsRequest$outboundSchema; + /** @deprecated use `GetEvmChainRollingWindowMetricsRequest$Outbound` instead. */ + export type Outbound = GetEvmChainRollingWindowMetricsRequest$Outbound; } diff --git a/src/models/operations/getlatestblocks.ts b/src/models/operations/getlatestblocks.ts index 59e23f1..84962d9 100644 --- a/src/models/operations/getlatestblocks.ts +++ b/src/models/operations/getlatestblocks.ts @@ -2,59 +2,61 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const GetLatestBlocksServerList = ["https://glacier-api.avax.network"] as const; +export const GetLatestBlocksServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetLatestBlocksGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type GetLatestBlocksRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; }; export type GetLatestBlocksResponse = { - result: components.ListEvmBlocksResponse; + result: components.ListEvmBlocksResponse; }; /** @internal */ export const GetLatestBlocksGlobals$inboundSchema: z.ZodType< - GetLatestBlocksGlobals, - z.ZodTypeDef, - unknown + GetLatestBlocksGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type GetLatestBlocksGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const GetLatestBlocksGlobals$outboundSchema: z.ZodType< - GetLatestBlocksGlobals$Outbound, - z.ZodTypeDef, - GetLatestBlocksGlobals + GetLatestBlocksGlobals$Outbound, + z.ZodTypeDef, + GetLatestBlocksGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -62,41 +64,41 @@ export const GetLatestBlocksGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLatestBlocksGlobals$ { - /** @deprecated use `GetLatestBlocksGlobals$inboundSchema` instead. */ - export const inboundSchema = GetLatestBlocksGlobals$inboundSchema; - /** @deprecated use `GetLatestBlocksGlobals$outboundSchema` instead. */ - export const outboundSchema = GetLatestBlocksGlobals$outboundSchema; - /** @deprecated use `GetLatestBlocksGlobals$Outbound` instead. */ - export type Outbound = GetLatestBlocksGlobals$Outbound; + /** @deprecated use `GetLatestBlocksGlobals$inboundSchema` instead. */ + export const inboundSchema = GetLatestBlocksGlobals$inboundSchema; + /** @deprecated use `GetLatestBlocksGlobals$outboundSchema` instead. */ + export const outboundSchema = GetLatestBlocksGlobals$outboundSchema; + /** @deprecated use `GetLatestBlocksGlobals$Outbound` instead. */ + export type Outbound = GetLatestBlocksGlobals$Outbound; } /** @internal */ export const GetLatestBlocksRequest$inboundSchema: z.ZodType< - GetLatestBlocksRequest, - z.ZodTypeDef, - unknown + GetLatestBlocksRequest, + z.ZodTypeDef, + unknown > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), }); /** @internal */ export type GetLatestBlocksRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - chainId?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + chainId?: string | undefined; }; /** @internal */ export const GetLatestBlocksRequest$outboundSchema: z.ZodType< - GetLatestBlocksRequest$Outbound, - z.ZodTypeDef, - GetLatestBlocksRequest + GetLatestBlocksRequest$Outbound, + z.ZodTypeDef, + GetLatestBlocksRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), }); /** @@ -104,58 +106,54 @@ export const GetLatestBlocksRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLatestBlocksRequest$ { - /** @deprecated use `GetLatestBlocksRequest$inboundSchema` instead. */ - export const inboundSchema = GetLatestBlocksRequest$inboundSchema; - /** @deprecated use `GetLatestBlocksRequest$outboundSchema` instead. */ - export const outboundSchema = GetLatestBlocksRequest$outboundSchema; - /** @deprecated use `GetLatestBlocksRequest$Outbound` instead. */ - export type Outbound = GetLatestBlocksRequest$Outbound; + /** @deprecated use `GetLatestBlocksRequest$inboundSchema` instead. */ + export const inboundSchema = GetLatestBlocksRequest$inboundSchema; + /** @deprecated use `GetLatestBlocksRequest$outboundSchema` instead. */ + export const outboundSchema = GetLatestBlocksRequest$outboundSchema; + /** @deprecated use `GetLatestBlocksRequest$Outbound` instead. */ + export type Outbound = GetLatestBlocksRequest$Outbound; } /** @internal */ export const GetLatestBlocksResponse$inboundSchema: z.ZodType< - GetLatestBlocksResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListEvmBlocksResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + GetLatestBlocksResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListEvmBlocksResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type GetLatestBlocksResponse$Outbound = { - Result: components.ListEvmBlocksResponse$Outbound; + Result: components.ListEvmBlocksResponse$Outbound; }; /** @internal */ export const GetLatestBlocksResponse$outboundSchema: z.ZodType< - GetLatestBlocksResponse$Outbound, - z.ZodTypeDef, - GetLatestBlocksResponse -> = z - .object({ - result: components.ListEvmBlocksResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + GetLatestBlocksResponse$Outbound, + z.ZodTypeDef, + GetLatestBlocksResponse +> = z.object({ + result: components.ListEvmBlocksResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLatestBlocksResponse$ { - /** @deprecated use `GetLatestBlocksResponse$inboundSchema` instead. */ - export const inboundSchema = GetLatestBlocksResponse$inboundSchema; - /** @deprecated use `GetLatestBlocksResponse$outboundSchema` instead. */ - export const outboundSchema = GetLatestBlocksResponse$outboundSchema; - /** @deprecated use `GetLatestBlocksResponse$Outbound` instead. */ - export type Outbound = GetLatestBlocksResponse$Outbound; + /** @deprecated use `GetLatestBlocksResponse$inboundSchema` instead. */ + export const inboundSchema = GetLatestBlocksResponse$inboundSchema; + /** @deprecated use `GetLatestBlocksResponse$outboundSchema` instead. */ + export const outboundSchema = GetLatestBlocksResponse$outboundSchema; + /** @deprecated use `GetLatestBlocksResponse$Outbound` instead. */ + export type Outbound = GetLatestBlocksResponse$Outbound; } diff --git a/src/models/operations/getnativebalance.ts b/src/models/operations/getnativebalance.ts index 5cbfa04..e3d09cc 100644 --- a/src/models/operations/getnativebalance.ts +++ b/src/models/operations/getnativebalance.ts @@ -2,58 +2,60 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as components from "../components/index.js"; import * as z from "zod"; +import * as components from "../components/index.js"; -export const GetNativeBalanceServerList = ["https://glacier-api.avax.network"] as const; +export const GetNativeBalanceServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetNativeBalanceGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type GetNativeBalanceRequest = { - /** - * The block number, if not defined the block number will be the latest block. - */ - blockNumber?: string | undefined; - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * A wallet address. - */ - address: string; - /** - * The currency that return values should use. Defaults to USD. - */ - currency?: components.CurrencyCode | undefined; + /** + * The block number, if not defined the block number will be the latest block. + */ + blockNumber?: string | undefined; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * A wallet address. + */ + address: string; + /** + * The currency that return values should use. Defaults to USD. + */ + currency?: components.CurrencyCode | undefined; }; /** @internal */ export const GetNativeBalanceGlobals$inboundSchema: z.ZodType< - GetNativeBalanceGlobals, - z.ZodTypeDef, - unknown + GetNativeBalanceGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type GetNativeBalanceGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const GetNativeBalanceGlobals$outboundSchema: z.ZodType< - GetNativeBalanceGlobals$Outbound, - z.ZodTypeDef, - GetNativeBalanceGlobals + GetNativeBalanceGlobals$Outbound, + z.ZodTypeDef, + GetNativeBalanceGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -61,44 +63,44 @@ export const GetNativeBalanceGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetNativeBalanceGlobals$ { - /** @deprecated use `GetNativeBalanceGlobals$inboundSchema` instead. */ - export const inboundSchema = GetNativeBalanceGlobals$inboundSchema; - /** @deprecated use `GetNativeBalanceGlobals$outboundSchema` instead. */ - export const outboundSchema = GetNativeBalanceGlobals$outboundSchema; - /** @deprecated use `GetNativeBalanceGlobals$Outbound` instead. */ - export type Outbound = GetNativeBalanceGlobals$Outbound; + /** @deprecated use `GetNativeBalanceGlobals$inboundSchema` instead. */ + export const inboundSchema = GetNativeBalanceGlobals$inboundSchema; + /** @deprecated use `GetNativeBalanceGlobals$outboundSchema` instead. */ + export const outboundSchema = GetNativeBalanceGlobals$outboundSchema; + /** @deprecated use `GetNativeBalanceGlobals$Outbound` instead. */ + export type Outbound = GetNativeBalanceGlobals$Outbound; } /** @internal */ export const GetNativeBalanceRequest$inboundSchema: z.ZodType< - GetNativeBalanceRequest, - z.ZodTypeDef, - unknown + GetNativeBalanceRequest, + z.ZodTypeDef, + unknown > = z.object({ - blockNumber: z.string().optional(), - chainId: z.string().optional(), - address: z.string(), - currency: components.CurrencyCode$inboundSchema.optional(), + blockNumber: z.string().optional(), + chainId: z.string().optional(), + address: z.string(), + currency: components.CurrencyCode$inboundSchema.optional(), }); /** @internal */ export type GetNativeBalanceRequest$Outbound = { - blockNumber?: string | undefined; - chainId?: string | undefined; - address: string; - currency?: string | undefined; + blockNumber?: string | undefined; + chainId?: string | undefined; + address: string; + currency?: string | undefined; }; /** @internal */ export const GetNativeBalanceRequest$outboundSchema: z.ZodType< - GetNativeBalanceRequest$Outbound, - z.ZodTypeDef, - GetNativeBalanceRequest + GetNativeBalanceRequest$Outbound, + z.ZodTypeDef, + GetNativeBalanceRequest > = z.object({ - blockNumber: z.string().optional(), - chainId: z.string().optional(), - address: z.string(), - currency: components.CurrencyCode$outboundSchema.optional(), + blockNumber: z.string().optional(), + chainId: z.string().optional(), + address: z.string(), + currency: components.CurrencyCode$outboundSchema.optional(), }); /** @@ -106,10 +108,10 @@ export const GetNativeBalanceRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetNativeBalanceRequest$ { - /** @deprecated use `GetNativeBalanceRequest$inboundSchema` instead. */ - export const inboundSchema = GetNativeBalanceRequest$inboundSchema; - /** @deprecated use `GetNativeBalanceRequest$outboundSchema` instead. */ - export const outboundSchema = GetNativeBalanceRequest$outboundSchema; - /** @deprecated use `GetNativeBalanceRequest$Outbound` instead. */ - export type Outbound = GetNativeBalanceRequest$Outbound; + /** @deprecated use `GetNativeBalanceRequest$inboundSchema` instead. */ + export const inboundSchema = GetNativeBalanceRequest$inboundSchema; + /** @deprecated use `GetNativeBalanceRequest$outboundSchema` instead. */ + export const outboundSchema = GetNativeBalanceRequest$outboundSchema; + /** @deprecated use `GetNativeBalanceRequest$Outbound` instead. */ + export type Outbound = GetNativeBalanceRequest$Outbound; } diff --git a/src/models/operations/getnetworkdetails.ts b/src/models/operations/getnetworkdetails.ts index 03c07fa..a61d53f 100644 --- a/src/models/operations/getnetworkdetails.ts +++ b/src/models/operations/getnetworkdetails.ts @@ -2,46 +2,48 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as components from "../components/index.js"; import * as z from "zod"; +import * as components from "../components/index.js"; -export const GetNetworkDetailsServerList = ["https://glacier-api.avax.network"] as const; +export const GetNetworkDetailsServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetNetworkDetailsGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type GetNetworkDetailsRequest = { - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; /** @internal */ export const GetNetworkDetailsGlobals$inboundSchema: z.ZodType< - GetNetworkDetailsGlobals, - z.ZodTypeDef, - unknown + GetNetworkDetailsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type GetNetworkDetailsGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const GetNetworkDetailsGlobals$outboundSchema: z.ZodType< - GetNetworkDetailsGlobals$Outbound, - z.ZodTypeDef, - GetNetworkDetailsGlobals + GetNetworkDetailsGlobals$Outbound, + z.ZodTypeDef, + GetNetworkDetailsGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -49,35 +51,35 @@ export const GetNetworkDetailsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetNetworkDetailsGlobals$ { - /** @deprecated use `GetNetworkDetailsGlobals$inboundSchema` instead. */ - export const inboundSchema = GetNetworkDetailsGlobals$inboundSchema; - /** @deprecated use `GetNetworkDetailsGlobals$outboundSchema` instead. */ - export const outboundSchema = GetNetworkDetailsGlobals$outboundSchema; - /** @deprecated use `GetNetworkDetailsGlobals$Outbound` instead. */ - export type Outbound = GetNetworkDetailsGlobals$Outbound; + /** @deprecated use `GetNetworkDetailsGlobals$inboundSchema` instead. */ + export const inboundSchema = GetNetworkDetailsGlobals$inboundSchema; + /** @deprecated use `GetNetworkDetailsGlobals$outboundSchema` instead. */ + export const outboundSchema = GetNetworkDetailsGlobals$outboundSchema; + /** @deprecated use `GetNetworkDetailsGlobals$Outbound` instead. */ + export type Outbound = GetNetworkDetailsGlobals$Outbound; } /** @internal */ export const GetNetworkDetailsRequest$inboundSchema: z.ZodType< - GetNetworkDetailsRequest, - z.ZodTypeDef, - unknown + GetNetworkDetailsRequest, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type GetNetworkDetailsRequest$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const GetNetworkDetailsRequest$outboundSchema: z.ZodType< - GetNetworkDetailsRequest$Outbound, - z.ZodTypeDef, - GetNetworkDetailsRequest + GetNetworkDetailsRequest$Outbound, + z.ZodTypeDef, + GetNetworkDetailsRequest > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -85,10 +87,10 @@ export const GetNetworkDetailsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetNetworkDetailsRequest$ { - /** @deprecated use `GetNetworkDetailsRequest$inboundSchema` instead. */ - export const inboundSchema = GetNetworkDetailsRequest$inboundSchema; - /** @deprecated use `GetNetworkDetailsRequest$outboundSchema` instead. */ - export const outboundSchema = GetNetworkDetailsRequest$outboundSchema; - /** @deprecated use `GetNetworkDetailsRequest$Outbound` instead. */ - export type Outbound = GetNetworkDetailsRequest$Outbound; + /** @deprecated use `GetNetworkDetailsRequest$inboundSchema` instead. */ + export const inboundSchema = GetNetworkDetailsRequest$inboundSchema; + /** @deprecated use `GetNetworkDetailsRequest$outboundSchema` instead. */ + export const outboundSchema = GetNetworkDetailsRequest$outboundSchema; + /** @deprecated use `GetNetworkDetailsRequest$Outbound` instead. */ + export type Outbound = GetNetworkDetailsRequest$Outbound; } diff --git a/src/models/operations/getnftholdersbycontractaddress.ts b/src/models/operations/getnftholdersbycontractaddress.ts index 63170d2..68fb501 100644 --- a/src/models/operations/getnftholdersbycontractaddress.ts +++ b/src/models/operations/getnftholdersbycontractaddress.ts @@ -2,65 +2,65 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; export const GetNftHoldersByContractAddressServerList = [ - "https://popsicle-api.avax.network", + "https://metrics.avax.network", ] as const; export type GetNftHoldersByContractAddressGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type GetNftHoldersByContractAddressRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 5000. - */ - pageSize?: number | undefined; - /** - * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * Contract address on the relevant chain. - */ - address: string; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 5000. + */ + pageSize?: number | undefined; + /** + * A supported evm chain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * Contract address on the relevant chain. + */ + address: string; }; export type GetNftHoldersByContractAddressResponse = { - result: components.NftHoldersResponse; + result: components.NftHoldersResponse; }; /** @internal */ export const GetNftHoldersByContractAddressGlobals$inboundSchema: z.ZodType< - GetNftHoldersByContractAddressGlobals, - z.ZodTypeDef, - unknown + GetNftHoldersByContractAddressGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type GetNftHoldersByContractAddressGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const GetNftHoldersByContractAddressGlobals$outboundSchema: z.ZodType< - GetNftHoldersByContractAddressGlobals$Outbound, - z.ZodTypeDef, - GetNftHoldersByContractAddressGlobals + GetNftHoldersByContractAddressGlobals$Outbound, + z.ZodTypeDef, + GetNftHoldersByContractAddressGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -68,44 +68,46 @@ export const GetNftHoldersByContractAddressGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetNftHoldersByContractAddressGlobals$ { - /** @deprecated use `GetNftHoldersByContractAddressGlobals$inboundSchema` instead. */ - export const inboundSchema = GetNftHoldersByContractAddressGlobals$inboundSchema; - /** @deprecated use `GetNftHoldersByContractAddressGlobals$outboundSchema` instead. */ - export const outboundSchema = GetNftHoldersByContractAddressGlobals$outboundSchema; - /** @deprecated use `GetNftHoldersByContractAddressGlobals$Outbound` instead. */ - export type Outbound = GetNftHoldersByContractAddressGlobals$Outbound; + /** @deprecated use `GetNftHoldersByContractAddressGlobals$inboundSchema` instead. */ + export const inboundSchema = + GetNftHoldersByContractAddressGlobals$inboundSchema; + /** @deprecated use `GetNftHoldersByContractAddressGlobals$outboundSchema` instead. */ + export const outboundSchema = + GetNftHoldersByContractAddressGlobals$outboundSchema; + /** @deprecated use `GetNftHoldersByContractAddressGlobals$Outbound` instead. */ + export type Outbound = GetNftHoldersByContractAddressGlobals$Outbound; } /** @internal */ export const GetNftHoldersByContractAddressRequest$inboundSchema: z.ZodType< - GetNftHoldersByContractAddressRequest, - z.ZodTypeDef, - unknown + GetNftHoldersByContractAddressRequest, + z.ZodTypeDef, + unknown > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(1000), - chainId: z.string().optional(), - address: z.string(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(1000), + chainId: z.string().optional(), + address: z.string(), }); /** @internal */ export type GetNftHoldersByContractAddressRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - chainId?: string | undefined; - address: string; + pageToken?: string | undefined; + pageSize: number; + chainId?: string | undefined; + address: string; }; /** @internal */ export const GetNftHoldersByContractAddressRequest$outboundSchema: z.ZodType< - GetNftHoldersByContractAddressRequest$Outbound, - z.ZodTypeDef, - GetNftHoldersByContractAddressRequest + GetNftHoldersByContractAddressRequest$Outbound, + z.ZodTypeDef, + GetNftHoldersByContractAddressRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(1000), - chainId: z.string().optional(), - address: z.string(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(1000), + chainId: z.string().optional(), + address: z.string(), }); /** @@ -113,58 +115,58 @@ export const GetNftHoldersByContractAddressRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetNftHoldersByContractAddressRequest$ { - /** @deprecated use `GetNftHoldersByContractAddressRequest$inboundSchema` instead. */ - export const inboundSchema = GetNftHoldersByContractAddressRequest$inboundSchema; - /** @deprecated use `GetNftHoldersByContractAddressRequest$outboundSchema` instead. */ - export const outboundSchema = GetNftHoldersByContractAddressRequest$outboundSchema; - /** @deprecated use `GetNftHoldersByContractAddressRequest$Outbound` instead. */ - export type Outbound = GetNftHoldersByContractAddressRequest$Outbound; + /** @deprecated use `GetNftHoldersByContractAddressRequest$inboundSchema` instead. */ + export const inboundSchema = + GetNftHoldersByContractAddressRequest$inboundSchema; + /** @deprecated use `GetNftHoldersByContractAddressRequest$outboundSchema` instead. */ + export const outboundSchema = + GetNftHoldersByContractAddressRequest$outboundSchema; + /** @deprecated use `GetNftHoldersByContractAddressRequest$Outbound` instead. */ + export type Outbound = GetNftHoldersByContractAddressRequest$Outbound; } /** @internal */ export const GetNftHoldersByContractAddressResponse$inboundSchema: z.ZodType< - GetNftHoldersByContractAddressResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.NftHoldersResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + GetNftHoldersByContractAddressResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.NftHoldersResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type GetNftHoldersByContractAddressResponse$Outbound = { - Result: components.NftHoldersResponse$Outbound; + Result: components.NftHoldersResponse$Outbound; }; /** @internal */ export const GetNftHoldersByContractAddressResponse$outboundSchema: z.ZodType< - GetNftHoldersByContractAddressResponse$Outbound, - z.ZodTypeDef, - GetNftHoldersByContractAddressResponse -> = z - .object({ - result: components.NftHoldersResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + GetNftHoldersByContractAddressResponse$Outbound, + z.ZodTypeDef, + GetNftHoldersByContractAddressResponse +> = z.object({ + result: components.NftHoldersResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetNftHoldersByContractAddressResponse$ { - /** @deprecated use `GetNftHoldersByContractAddressResponse$inboundSchema` instead. */ - export const inboundSchema = GetNftHoldersByContractAddressResponse$inboundSchema; - /** @deprecated use `GetNftHoldersByContractAddressResponse$outboundSchema` instead. */ - export const outboundSchema = GetNftHoldersByContractAddressResponse$outboundSchema; - /** @deprecated use `GetNftHoldersByContractAddressResponse$Outbound` instead. */ - export type Outbound = GetNftHoldersByContractAddressResponse$Outbound; + /** @deprecated use `GetNftHoldersByContractAddressResponse$inboundSchema` instead. */ + export const inboundSchema = + GetNftHoldersByContractAddressResponse$inboundSchema; + /** @deprecated use `GetNftHoldersByContractAddressResponse$outboundSchema` instead. */ + export const outboundSchema = + GetNftHoldersByContractAddressResponse$outboundSchema; + /** @deprecated use `GetNftHoldersByContractAddressResponse$Outbound` instead. */ + export type Outbound = GetNftHoldersByContractAddressResponse$Outbound; } diff --git a/src/models/operations/getoperationresult.ts b/src/models/operations/getoperationresult.ts index 5781ff2..da991fd 100644 --- a/src/models/operations/getoperationresult.ts +++ b/src/models/operations/getoperationresult.ts @@ -4,36 +4,38 @@ import * as z from "zod"; -export const GetOperationResultServerList = ["https://glacier-api.avax.network"] as const; +export const GetOperationResultServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetOperationResultRequest = { - /** - * UUID of given operation - */ - operationId: string; + /** + * UUID of given operation + */ + operationId: string; }; /** @internal */ export const GetOperationResultRequest$inboundSchema: z.ZodType< - GetOperationResultRequest, - z.ZodTypeDef, - unknown + GetOperationResultRequest, + z.ZodTypeDef, + unknown > = z.object({ - operationId: z.string(), + operationId: z.string(), }); /** @internal */ export type GetOperationResultRequest$Outbound = { - operationId: string; + operationId: string; }; /** @internal */ export const GetOperationResultRequest$outboundSchema: z.ZodType< - GetOperationResultRequest$Outbound, - z.ZodTypeDef, - GetOperationResultRequest + GetOperationResultRequest$Outbound, + z.ZodTypeDef, + GetOperationResultRequest > = z.object({ - operationId: z.string(), + operationId: z.string(), }); /** @@ -41,10 +43,10 @@ export const GetOperationResultRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetOperationResultRequest$ { - /** @deprecated use `GetOperationResultRequest$inboundSchema` instead. */ - export const inboundSchema = GetOperationResultRequest$inboundSchema; - /** @deprecated use `GetOperationResultRequest$outboundSchema` instead. */ - export const outboundSchema = GetOperationResultRequest$outboundSchema; - /** @deprecated use `GetOperationResultRequest$Outbound` instead. */ - export type Outbound = GetOperationResultRequest$Outbound; + /** @deprecated use `GetOperationResultRequest$inboundSchema` instead. */ + export const inboundSchema = GetOperationResultRequest$inboundSchema; + /** @deprecated use `GetOperationResultRequest$outboundSchema` instead. */ + export const outboundSchema = GetOperationResultRequest$outboundSchema; + /** @deprecated use `GetOperationResultRequest$Outbound` instead. */ + export type Outbound = GetOperationResultRequest$Outbound; } diff --git a/src/models/operations/getsharedsecret.ts b/src/models/operations/getsharedsecret.ts index 7d42853..020c237 100644 --- a/src/models/operations/getsharedsecret.ts +++ b/src/models/operations/getsharedsecret.ts @@ -2,4 +2,6 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export const GetSharedSecretServerList = ["https://glacier-api.avax.network"] as const; +export const GetSharedSecretServerList = [ + "https://glacier-api.avax.network", +] as const; diff --git a/src/models/operations/getsinglevalidatordetails.ts b/src/models/operations/getsinglevalidatordetails.ts index dcd98e5..9234db8 100644 --- a/src/models/operations/getsinglevalidatordetails.ts +++ b/src/models/operations/getsinglevalidatordetails.ts @@ -2,71 +2,73 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const GetSingleValidatorDetailsServerList = ["https://glacier-api.avax.network"] as const; +export const GetSingleValidatorDetailsServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetSingleValidatorDetailsGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type GetSingleValidatorDetailsRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; - /** - * A primary network (P or X chain) nodeId. - */ - nodeId: string; - /** - * Validation status of the node. - */ - validationStatus?: components.ValidationStatusType | undefined; - /** - * 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. - */ - sortOrder?: components.SortOrder | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; + /** + * A primary network (P or X chain) nodeId. + */ + nodeId: string; + /** + * Validation status of the node. + */ + validationStatus?: components.ValidationStatusType | undefined; + /** + * 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. + */ + sortOrder?: components.SortOrder | undefined; }; export type GetSingleValidatorDetailsResponse = { - result: components.ListValidatorDetailsResponse; + result: components.ListValidatorDetailsResponse; }; /** @internal */ export const GetSingleValidatorDetailsGlobals$inboundSchema: z.ZodType< - GetSingleValidatorDetailsGlobals, - z.ZodTypeDef, - unknown + GetSingleValidatorDetailsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type GetSingleValidatorDetailsGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const GetSingleValidatorDetailsGlobals$outboundSchema: z.ZodType< - GetSingleValidatorDetailsGlobals$Outbound, - z.ZodTypeDef, - GetSingleValidatorDetailsGlobals + GetSingleValidatorDetailsGlobals$Outbound, + z.ZodTypeDef, + GetSingleValidatorDetailsGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -74,50 +76,50 @@ export const GetSingleValidatorDetailsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSingleValidatorDetailsGlobals$ { - /** @deprecated use `GetSingleValidatorDetailsGlobals$inboundSchema` instead. */ - export const inboundSchema = GetSingleValidatorDetailsGlobals$inboundSchema; - /** @deprecated use `GetSingleValidatorDetailsGlobals$outboundSchema` instead. */ - export const outboundSchema = GetSingleValidatorDetailsGlobals$outboundSchema; - /** @deprecated use `GetSingleValidatorDetailsGlobals$Outbound` instead. */ - export type Outbound = GetSingleValidatorDetailsGlobals$Outbound; + /** @deprecated use `GetSingleValidatorDetailsGlobals$inboundSchema` instead. */ + export const inboundSchema = GetSingleValidatorDetailsGlobals$inboundSchema; + /** @deprecated use `GetSingleValidatorDetailsGlobals$outboundSchema` instead. */ + export const outboundSchema = GetSingleValidatorDetailsGlobals$outboundSchema; + /** @deprecated use `GetSingleValidatorDetailsGlobals$Outbound` instead. */ + export type Outbound = GetSingleValidatorDetailsGlobals$Outbound; } /** @internal */ export const GetSingleValidatorDetailsRequest$inboundSchema: z.ZodType< - GetSingleValidatorDetailsRequest, - z.ZodTypeDef, - unknown + GetSingleValidatorDetailsRequest, + z.ZodTypeDef, + unknown > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - network: components.GlobalParamNetwork$inboundSchema.optional(), - nodeId: z.string(), - validationStatus: components.ValidationStatusType$inboundSchema.optional(), - sortOrder: components.SortOrder$inboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + network: components.GlobalParamNetwork$inboundSchema.optional(), + nodeId: z.string(), + validationStatus: components.ValidationStatusType$inboundSchema.optional(), + sortOrder: components.SortOrder$inboundSchema.optional(), }); /** @internal */ export type GetSingleValidatorDetailsRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - network?: string | undefined; - nodeId: string; - validationStatus?: string | undefined; - sortOrder?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + network?: string | undefined; + nodeId: string; + validationStatus?: string | undefined; + sortOrder?: string | undefined; }; /** @internal */ export const GetSingleValidatorDetailsRequest$outboundSchema: z.ZodType< - GetSingleValidatorDetailsRequest$Outbound, - z.ZodTypeDef, - GetSingleValidatorDetailsRequest + GetSingleValidatorDetailsRequest$Outbound, + z.ZodTypeDef, + GetSingleValidatorDetailsRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - network: components.GlobalParamNetwork$outboundSchema.optional(), - nodeId: z.string(), - validationStatus: components.ValidationStatusType$outboundSchema.optional(), - sortOrder: components.SortOrder$outboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + network: components.GlobalParamNetwork$outboundSchema.optional(), + nodeId: z.string(), + validationStatus: components.ValidationStatusType$outboundSchema.optional(), + sortOrder: components.SortOrder$outboundSchema.optional(), }); /** @@ -125,58 +127,55 @@ export const GetSingleValidatorDetailsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSingleValidatorDetailsRequest$ { - /** @deprecated use `GetSingleValidatorDetailsRequest$inboundSchema` instead. */ - export const inboundSchema = GetSingleValidatorDetailsRequest$inboundSchema; - /** @deprecated use `GetSingleValidatorDetailsRequest$outboundSchema` instead. */ - export const outboundSchema = GetSingleValidatorDetailsRequest$outboundSchema; - /** @deprecated use `GetSingleValidatorDetailsRequest$Outbound` instead. */ - export type Outbound = GetSingleValidatorDetailsRequest$Outbound; + /** @deprecated use `GetSingleValidatorDetailsRequest$inboundSchema` instead. */ + export const inboundSchema = GetSingleValidatorDetailsRequest$inboundSchema; + /** @deprecated use `GetSingleValidatorDetailsRequest$outboundSchema` instead. */ + export const outboundSchema = GetSingleValidatorDetailsRequest$outboundSchema; + /** @deprecated use `GetSingleValidatorDetailsRequest$Outbound` instead. */ + export type Outbound = GetSingleValidatorDetailsRequest$Outbound; } /** @internal */ export const GetSingleValidatorDetailsResponse$inboundSchema: z.ZodType< - GetSingleValidatorDetailsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListValidatorDetailsResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + GetSingleValidatorDetailsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListValidatorDetailsResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type GetSingleValidatorDetailsResponse$Outbound = { - Result: components.ListValidatorDetailsResponse$Outbound; + Result: components.ListValidatorDetailsResponse$Outbound; }; /** @internal */ export const GetSingleValidatorDetailsResponse$outboundSchema: z.ZodType< - GetSingleValidatorDetailsResponse$Outbound, - z.ZodTypeDef, - GetSingleValidatorDetailsResponse -> = z - .object({ - result: components.ListValidatorDetailsResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + GetSingleValidatorDetailsResponse$Outbound, + z.ZodTypeDef, + GetSingleValidatorDetailsResponse +> = z.object({ + result: components.ListValidatorDetailsResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSingleValidatorDetailsResponse$ { - /** @deprecated use `GetSingleValidatorDetailsResponse$inboundSchema` instead. */ - export const inboundSchema = GetSingleValidatorDetailsResponse$inboundSchema; - /** @deprecated use `GetSingleValidatorDetailsResponse$outboundSchema` instead. */ - export const outboundSchema = GetSingleValidatorDetailsResponse$outboundSchema; - /** @deprecated use `GetSingleValidatorDetailsResponse$Outbound` instead. */ - export type Outbound = GetSingleValidatorDetailsResponse$Outbound; + /** @deprecated use `GetSingleValidatorDetailsResponse$inboundSchema` instead. */ + export const inboundSchema = GetSingleValidatorDetailsResponse$inboundSchema; + /** @deprecated use `GetSingleValidatorDetailsResponse$outboundSchema` instead. */ + export const outboundSchema = + GetSingleValidatorDetailsResponse$outboundSchema; + /** @deprecated use `GetSingleValidatorDetailsResponse$Outbound` instead. */ + export type Outbound = GetSingleValidatorDetailsResponse$Outbound; } diff --git a/src/models/operations/getstakingmetrics.ts b/src/models/operations/getstakingmetrics.ts index e70ec30..590d2d6 100644 --- a/src/models/operations/getstakingmetrics.ts +++ b/src/models/operations/getstakingmetrics.ts @@ -2,75 +2,77 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const GetStakingMetricsServerList = ["https://popsicle-api.avax.network"] as const; +export const GetStakingMetricsServerList = [ + "https://metrics.avax.network", +] as const; export type GetStakingMetricsGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type GetStakingMetricsRequest = { - /** - * Which network level metric to fetch. - */ - metric: components.NetworkMetric; - /** - * Query param for retrieving items after a specific timestamp. - */ - startTimestamp?: number | undefined; - /** - * Query param for retrieving items before a specific timestamp. - */ - endTimestamp?: number | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 2160. - */ - pageSize?: number | undefined; - /** - * mainnet or testnet. - */ - network?: components.GlobalParamNetwork | undefined; - /** - * The subnet ID to filter by. If not provided, then all subnets will be returned. - */ - subnetId?: any | undefined; + /** + * Which network level metric to fetch. + */ + metric: components.NetworkMetric; + /** + * Query param for retrieving items after a specific timestamp. + */ + startTimestamp?: number | undefined; + /** + * Query param for retrieving items before a specific timestamp. + */ + endTimestamp?: number | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 2160. + */ + pageSize?: number | undefined; + /** + * mainnet or testnet. + */ + network?: components.GlobalParamNetwork | undefined; + /** + * The subnet ID to filter by. If not provided, then all subnets will be returned. + */ + subnetId?: any | undefined; }; export type GetStakingMetricsResponse = { - result: components.MetricsApiResponse; + result: components.MetricsApiResponse; }; /** @internal */ export const GetStakingMetricsGlobals$inboundSchema: z.ZodType< - GetStakingMetricsGlobals, - z.ZodTypeDef, - unknown + GetStakingMetricsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type GetStakingMetricsGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const GetStakingMetricsGlobals$outboundSchema: z.ZodType< - GetStakingMetricsGlobals$Outbound, - z.ZodTypeDef, - GetStakingMetricsGlobals + GetStakingMetricsGlobals$Outbound, + z.ZodTypeDef, + GetStakingMetricsGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -78,53 +80,53 @@ export const GetStakingMetricsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetStakingMetricsGlobals$ { - /** @deprecated use `GetStakingMetricsGlobals$inboundSchema` instead. */ - export const inboundSchema = GetStakingMetricsGlobals$inboundSchema; - /** @deprecated use `GetStakingMetricsGlobals$outboundSchema` instead. */ - export const outboundSchema = GetStakingMetricsGlobals$outboundSchema; - /** @deprecated use `GetStakingMetricsGlobals$Outbound` instead. */ - export type Outbound = GetStakingMetricsGlobals$Outbound; + /** @deprecated use `GetStakingMetricsGlobals$inboundSchema` instead. */ + export const inboundSchema = GetStakingMetricsGlobals$inboundSchema; + /** @deprecated use `GetStakingMetricsGlobals$outboundSchema` instead. */ + export const outboundSchema = GetStakingMetricsGlobals$outboundSchema; + /** @deprecated use `GetStakingMetricsGlobals$Outbound` instead. */ + export type Outbound = GetStakingMetricsGlobals$Outbound; } /** @internal */ export const GetStakingMetricsRequest$inboundSchema: z.ZodType< - GetStakingMetricsRequest, - z.ZodTypeDef, - unknown + GetStakingMetricsRequest, + z.ZodTypeDef, + unknown > = z.object({ - metric: components.NetworkMetric$inboundSchema, - startTimestamp: z.number().int().optional(), - endTimestamp: z.number().int().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(100), - network: components.GlobalParamNetwork$inboundSchema.optional(), - subnetId: z.any().optional(), + metric: components.NetworkMetric$inboundSchema, + startTimestamp: z.number().int().optional(), + endTimestamp: z.number().int().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(100), + network: components.GlobalParamNetwork$inboundSchema.optional(), + subnetId: z.any().optional(), }); /** @internal */ export type GetStakingMetricsRequest$Outbound = { - metric: string; - startTimestamp?: number | undefined; - endTimestamp?: number | undefined; - pageToken?: string | undefined; - pageSize: number; - network?: string | undefined; - subnetId?: any | undefined; + metric: string; + startTimestamp?: number | undefined; + endTimestamp?: number | undefined; + pageToken?: string | undefined; + pageSize: number; + network?: string | undefined; + subnetId?: any | undefined; }; /** @internal */ export const GetStakingMetricsRequest$outboundSchema: z.ZodType< - GetStakingMetricsRequest$Outbound, - z.ZodTypeDef, - GetStakingMetricsRequest + GetStakingMetricsRequest$Outbound, + z.ZodTypeDef, + GetStakingMetricsRequest > = z.object({ - metric: components.NetworkMetric$outboundSchema, - startTimestamp: z.number().int().optional(), - endTimestamp: z.number().int().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(100), - network: components.GlobalParamNetwork$outboundSchema.optional(), - subnetId: z.any().optional(), + metric: components.NetworkMetric$outboundSchema, + startTimestamp: z.number().int().optional(), + endTimestamp: z.number().int().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(100), + network: components.GlobalParamNetwork$outboundSchema.optional(), + subnetId: z.any().optional(), }); /** @@ -132,58 +134,54 @@ export const GetStakingMetricsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetStakingMetricsRequest$ { - /** @deprecated use `GetStakingMetricsRequest$inboundSchema` instead. */ - export const inboundSchema = GetStakingMetricsRequest$inboundSchema; - /** @deprecated use `GetStakingMetricsRequest$outboundSchema` instead. */ - export const outboundSchema = GetStakingMetricsRequest$outboundSchema; - /** @deprecated use `GetStakingMetricsRequest$Outbound` instead. */ - export type Outbound = GetStakingMetricsRequest$Outbound; + /** @deprecated use `GetStakingMetricsRequest$inboundSchema` instead. */ + export const inboundSchema = GetStakingMetricsRequest$inboundSchema; + /** @deprecated use `GetStakingMetricsRequest$outboundSchema` instead. */ + export const outboundSchema = GetStakingMetricsRequest$outboundSchema; + /** @deprecated use `GetStakingMetricsRequest$Outbound` instead. */ + export type Outbound = GetStakingMetricsRequest$Outbound; } /** @internal */ export const GetStakingMetricsResponse$inboundSchema: z.ZodType< - GetStakingMetricsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.MetricsApiResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + GetStakingMetricsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.MetricsApiResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type GetStakingMetricsResponse$Outbound = { - Result: components.MetricsApiResponse$Outbound; + Result: components.MetricsApiResponse$Outbound; }; /** @internal */ export const GetStakingMetricsResponse$outboundSchema: z.ZodType< - GetStakingMetricsResponse$Outbound, - z.ZodTypeDef, - GetStakingMetricsResponse -> = z - .object({ - result: components.MetricsApiResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + GetStakingMetricsResponse$Outbound, + z.ZodTypeDef, + GetStakingMetricsResponse +> = z.object({ + result: components.MetricsApiResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetStakingMetricsResponse$ { - /** @deprecated use `GetStakingMetricsResponse$inboundSchema` instead. */ - export const inboundSchema = GetStakingMetricsResponse$inboundSchema; - /** @deprecated use `GetStakingMetricsResponse$outboundSchema` instead. */ - export const outboundSchema = GetStakingMetricsResponse$outboundSchema; - /** @deprecated use `GetStakingMetricsResponse$Outbound` instead. */ - export type Outbound = GetStakingMetricsResponse$Outbound; + /** @deprecated use `GetStakingMetricsResponse$inboundSchema` instead. */ + export const inboundSchema = GetStakingMetricsResponse$inboundSchema; + /** @deprecated use `GetStakingMetricsResponse$outboundSchema` instead. */ + export const outboundSchema = GetStakingMetricsResponse$outboundSchema; + /** @deprecated use `GetStakingMetricsResponse$Outbound` instead. */ + export type Outbound = GetStakingMetricsResponse$Outbound; } diff --git a/src/models/operations/getsubnetbyid.ts b/src/models/operations/getsubnetbyid.ts index 5129653..8f08bf4 100644 --- a/src/models/operations/getsubnetbyid.ts +++ b/src/models/operations/getsubnetbyid.ts @@ -2,50 +2,52 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as components from "../components/index.js"; import * as z from "zod"; +import * as components from "../components/index.js"; -export const GetSubnetByIdServerList = ["https://glacier-api.avax.network"] as const; +export const GetSubnetByIdServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetSubnetByIdGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type GetSubnetByIdRequest = { - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; - /** - * Subnet ID to fetch details for - */ - subnetId: string; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; + /** + * Subnet ID to fetch details for + */ + subnetId: string; }; /** @internal */ export const GetSubnetByIdGlobals$inboundSchema: z.ZodType< - GetSubnetByIdGlobals, - z.ZodTypeDef, - unknown + GetSubnetByIdGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type GetSubnetByIdGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const GetSubnetByIdGlobals$outboundSchema: z.ZodType< - GetSubnetByIdGlobals$Outbound, - z.ZodTypeDef, - GetSubnetByIdGlobals + GetSubnetByIdGlobals$Outbound, + z.ZodTypeDef, + GetSubnetByIdGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -53,38 +55,38 @@ export const GetSubnetByIdGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSubnetByIdGlobals$ { - /** @deprecated use `GetSubnetByIdGlobals$inboundSchema` instead. */ - export const inboundSchema = GetSubnetByIdGlobals$inboundSchema; - /** @deprecated use `GetSubnetByIdGlobals$outboundSchema` instead. */ - export const outboundSchema = GetSubnetByIdGlobals$outboundSchema; - /** @deprecated use `GetSubnetByIdGlobals$Outbound` instead. */ - export type Outbound = GetSubnetByIdGlobals$Outbound; + /** @deprecated use `GetSubnetByIdGlobals$inboundSchema` instead. */ + export const inboundSchema = GetSubnetByIdGlobals$inboundSchema; + /** @deprecated use `GetSubnetByIdGlobals$outboundSchema` instead. */ + export const outboundSchema = GetSubnetByIdGlobals$outboundSchema; + /** @deprecated use `GetSubnetByIdGlobals$Outbound` instead. */ + export type Outbound = GetSubnetByIdGlobals$Outbound; } /** @internal */ export const GetSubnetByIdRequest$inboundSchema: z.ZodType< - GetSubnetByIdRequest, - z.ZodTypeDef, - unknown + GetSubnetByIdRequest, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), - subnetId: z.string(), + network: components.GlobalParamNetwork$inboundSchema.optional(), + subnetId: z.string(), }); /** @internal */ export type GetSubnetByIdRequest$Outbound = { - network?: string | undefined; - subnetId: string; + network?: string | undefined; + subnetId: string; }; /** @internal */ export const GetSubnetByIdRequest$outboundSchema: z.ZodType< - GetSubnetByIdRequest$Outbound, - z.ZodTypeDef, - GetSubnetByIdRequest + GetSubnetByIdRequest$Outbound, + z.ZodTypeDef, + GetSubnetByIdRequest > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), - subnetId: z.string(), + network: components.GlobalParamNetwork$outboundSchema.optional(), + subnetId: z.string(), }); /** @@ -92,10 +94,10 @@ export const GetSubnetByIdRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSubnetByIdRequest$ { - /** @deprecated use `GetSubnetByIdRequest$inboundSchema` instead. */ - export const inboundSchema = GetSubnetByIdRequest$inboundSchema; - /** @deprecated use `GetSubnetByIdRequest$outboundSchema` instead. */ - export const outboundSchema = GetSubnetByIdRequest$outboundSchema; - /** @deprecated use `GetSubnetByIdRequest$Outbound` instead. */ - export type Outbound = GetSubnetByIdRequest$Outbound; + /** @deprecated use `GetSubnetByIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetSubnetByIdRequest$inboundSchema; + /** @deprecated use `GetSubnetByIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetSubnetByIdRequest$outboundSchema; + /** @deprecated use `GetSubnetByIdRequest$Outbound` instead. */ + export type Outbound = GetSubnetByIdRequest$Outbound; } diff --git a/src/models/operations/getteleportermessage.ts b/src/models/operations/getteleportermessage.ts index 201e048..40d063f 100644 --- a/src/models/operations/getteleportermessage.ts +++ b/src/models/operations/getteleportermessage.ts @@ -2,49 +2,51 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as components from "../components/index.js"; import * as z from "zod"; +import * as components from "../components/index.js"; -export const GetTeleporterMessageServerList = ["https://glacier-api.avax.network"] as const; +export const GetTeleporterMessageServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetTeleporterMessageRequest = { - /** - * The message ID of the teleporter message. - */ - messageId: string; + /** + * The message ID of the teleporter message. + */ + messageId: string; }; /** * Successful response */ export type GetTeleporterMessageResponseBody = - | (components.PendingTeleporterMessage & { status: "pending" }) - | (components.DeliveredSourceNotIndexedTeleporterMessage & { - status: "delivered_source_not_indexed"; - }) - | (components.DeliveredTeleporterMessage & { status: "delivered" }); + | (components.PendingTeleporterMessage & { status: "pending" }) + | (components.DeliveredSourceNotIndexedTeleporterMessage & { + status: "delivered_source_not_indexed"; + }) + | (components.DeliveredTeleporterMessage & { status: "delivered" }); /** @internal */ export const GetTeleporterMessageRequest$inboundSchema: z.ZodType< - GetTeleporterMessageRequest, - z.ZodTypeDef, - unknown + GetTeleporterMessageRequest, + z.ZodTypeDef, + unknown > = z.object({ - messageId: z.string(), + messageId: z.string(), }); /** @internal */ export type GetTeleporterMessageRequest$Outbound = { - messageId: string; + messageId: string; }; /** @internal */ export const GetTeleporterMessageRequest$outboundSchema: z.ZodType< - GetTeleporterMessageRequest$Outbound, - z.ZodTypeDef, - GetTeleporterMessageRequest + GetTeleporterMessageRequest$Outbound, + z.ZodTypeDef, + GetTeleporterMessageRequest > = z.object({ - messageId: z.string(), + messageId: z.string(), }); /** @@ -52,58 +54,66 @@ export const GetTeleporterMessageRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTeleporterMessageRequest$ { - /** @deprecated use `GetTeleporterMessageRequest$inboundSchema` instead. */ - export const inboundSchema = GetTeleporterMessageRequest$inboundSchema; - /** @deprecated use `GetTeleporterMessageRequest$outboundSchema` instead. */ - export const outboundSchema = GetTeleporterMessageRequest$outboundSchema; - /** @deprecated use `GetTeleporterMessageRequest$Outbound` instead. */ - export type Outbound = GetTeleporterMessageRequest$Outbound; + /** @deprecated use `GetTeleporterMessageRequest$inboundSchema` instead. */ + export const inboundSchema = GetTeleporterMessageRequest$inboundSchema; + /** @deprecated use `GetTeleporterMessageRequest$outboundSchema` instead. */ + export const outboundSchema = GetTeleporterMessageRequest$outboundSchema; + /** @deprecated use `GetTeleporterMessageRequest$Outbound` instead. */ + export type Outbound = GetTeleporterMessageRequest$Outbound; } /** @internal */ export const GetTeleporterMessageResponseBody$inboundSchema: z.ZodType< - GetTeleporterMessageResponseBody, - z.ZodTypeDef, - unknown + GetTeleporterMessageResponseBody, + z.ZodTypeDef, + unknown > = z.union([ - components.PendingTeleporterMessage$inboundSchema.and( - z.object({ status: z.literal("pending") }).transform((v) => ({ status: v.status })) - ), - components.DeliveredSourceNotIndexedTeleporterMessage$inboundSchema.and( - z - .object({ status: z.literal("delivered_source_not_indexed") }) - .transform((v) => ({ status: v.status })) - ), - components.DeliveredTeleporterMessage$inboundSchema.and( - z.object({ status: z.literal("delivered") }).transform((v) => ({ status: v.status })) - ), + components.PendingTeleporterMessage$inboundSchema.and( + z.object({ status: z.literal("pending") }).transform((v) => ({ + status: v.status, + })), + ), + components.DeliveredSourceNotIndexedTeleporterMessage$inboundSchema.and( + z.object({ status: z.literal("delivered_source_not_indexed") }).transform(( + v, + ) => ({ status: v.status })), + ), + components.DeliveredTeleporterMessage$inboundSchema.and( + z.object({ status: z.literal("delivered") }).transform((v) => ({ + status: v.status, + })), + ), ]); /** @internal */ export type GetTeleporterMessageResponseBody$Outbound = - | (components.PendingTeleporterMessage$Outbound & { status: "pending" }) - | (components.DeliveredSourceNotIndexedTeleporterMessage$Outbound & { - status: "delivered_source_not_indexed"; - }) - | (components.DeliveredTeleporterMessage$Outbound & { status: "delivered" }); + | (components.PendingTeleporterMessage$Outbound & { status: "pending" }) + | (components.DeliveredSourceNotIndexedTeleporterMessage$Outbound & { + status: "delivered_source_not_indexed"; + }) + | (components.DeliveredTeleporterMessage$Outbound & { status: "delivered" }); /** @internal */ export const GetTeleporterMessageResponseBody$outboundSchema: z.ZodType< - GetTeleporterMessageResponseBody$Outbound, - z.ZodTypeDef, - GetTeleporterMessageResponseBody + GetTeleporterMessageResponseBody$Outbound, + z.ZodTypeDef, + GetTeleporterMessageResponseBody > = z.union([ - components.PendingTeleporterMessage$outboundSchema.and( - z.object({ status: z.literal("pending") }).transform((v) => ({ status: v.status })) - ), - components.DeliveredSourceNotIndexedTeleporterMessage$outboundSchema.and( - z - .object({ status: z.literal("delivered_source_not_indexed") }) - .transform((v) => ({ status: v.status })) - ), - components.DeliveredTeleporterMessage$outboundSchema.and( - z.object({ status: z.literal("delivered") }).transform((v) => ({ status: v.status })) - ), + components.PendingTeleporterMessage$outboundSchema.and( + z.object({ status: z.literal("pending") }).transform((v) => ({ + status: v.status, + })), + ), + components.DeliveredSourceNotIndexedTeleporterMessage$outboundSchema.and( + z.object({ status: z.literal("delivered_source_not_indexed") }).transform(( + v, + ) => ({ status: v.status })), + ), + components.DeliveredTeleporterMessage$outboundSchema.and( + z.object({ status: z.literal("delivered") }).transform((v) => ({ + status: v.status, + })), + ), ]); /** @@ -111,10 +121,10 @@ export const GetTeleporterMessageResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTeleporterMessageResponseBody$ { - /** @deprecated use `GetTeleporterMessageResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetTeleporterMessageResponseBody$inboundSchema; - /** @deprecated use `GetTeleporterMessageResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetTeleporterMessageResponseBody$outboundSchema; - /** @deprecated use `GetTeleporterMessageResponseBody$Outbound` instead. */ - export type Outbound = GetTeleporterMessageResponseBody$Outbound; + /** @deprecated use `GetTeleporterMessageResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetTeleporterMessageResponseBody$inboundSchema; + /** @deprecated use `GetTeleporterMessageResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetTeleporterMessageResponseBody$outboundSchema; + /** @deprecated use `GetTeleporterMessageResponseBody$Outbound` instead. */ + export type Outbound = GetTeleporterMessageResponseBody$Outbound; } diff --git a/src/models/operations/getteleportermetricsbychain.ts b/src/models/operations/getteleportermetricsbychain.ts new file mode 100644 index 0000000..83dae2c --- /dev/null +++ b/src/models/operations/getteleportermetricsbychain.ts @@ -0,0 +1,105 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import * as components from "../components/index.js"; + +export const GetTeleporterMetricsByChainServerList = [ + "https://metrics.avax.network", +] as const; + +export type GetTeleporterMetricsByChainGlobals = { + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; +}; + +export type GetTeleporterMetricsByChainRequest = { + /** + * Which chain level teleporter metric to fetch. + */ + metric: components.TeleporterMetric; + /** + * A supported EVM chain ID or one of "total", "mainnet", or "testnet". Use the `/chains` endpoint to get a list of supported chain IDs. + */ + chainId?: string | undefined; +}; + +/** @internal */ +export const GetTeleporterMetricsByChainGlobals$inboundSchema: z.ZodType< + GetTeleporterMetricsByChainGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + chainId: z.string().optional(), +}); + +/** @internal */ +export type GetTeleporterMetricsByChainGlobals$Outbound = { + chainId?: string | undefined; +}; + +/** @internal */ +export const GetTeleporterMetricsByChainGlobals$outboundSchema: z.ZodType< + GetTeleporterMetricsByChainGlobals$Outbound, + z.ZodTypeDef, + GetTeleporterMetricsByChainGlobals +> = z.object({ + chainId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetTeleporterMetricsByChainGlobals$ { + /** @deprecated use `GetTeleporterMetricsByChainGlobals$inboundSchema` instead. */ + export const inboundSchema = GetTeleporterMetricsByChainGlobals$inboundSchema; + /** @deprecated use `GetTeleporterMetricsByChainGlobals$outboundSchema` instead. */ + export const outboundSchema = + GetTeleporterMetricsByChainGlobals$outboundSchema; + /** @deprecated use `GetTeleporterMetricsByChainGlobals$Outbound` instead. */ + export type Outbound = GetTeleporterMetricsByChainGlobals$Outbound; +} + +/** @internal */ +export const GetTeleporterMetricsByChainRequest$inboundSchema: z.ZodType< + GetTeleporterMetricsByChainRequest, + z.ZodTypeDef, + unknown +> = z.object({ + metric: components.TeleporterMetric$inboundSchema, + chainId: z.string().optional(), +}); + +/** @internal */ +export type GetTeleporterMetricsByChainRequest$Outbound = { + metric: string; + chainId?: string | undefined; +}; + +/** @internal */ +export const GetTeleporterMetricsByChainRequest$outboundSchema: z.ZodType< + GetTeleporterMetricsByChainRequest$Outbound, + z.ZodTypeDef, + GetTeleporterMetricsByChainRequest +> = z.object({ + metric: components.TeleporterMetric$outboundSchema, + chainId: z.string().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetTeleporterMetricsByChainRequest$ { + /** @deprecated use `GetTeleporterMetricsByChainRequest$inboundSchema` instead. */ + export const inboundSchema = GetTeleporterMetricsByChainRequest$inboundSchema; + /** @deprecated use `GetTeleporterMetricsByChainRequest$outboundSchema` instead. */ + export const outboundSchema = + GetTeleporterMetricsByChainRequest$outboundSchema; + /** @deprecated use `GetTeleporterMetricsByChainRequest$Outbound` instead. */ + export type Outbound = GetTeleporterMetricsByChainRequest$Outbound; +} diff --git a/src/models/operations/gettokendetails.ts b/src/models/operations/gettokendetails.ts index ffb0418..7ad7ea5 100644 --- a/src/models/operations/gettokendetails.ts +++ b/src/models/operations/gettokendetails.ts @@ -2,61 +2,63 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as components from "../components/index.js"; import * as z from "zod"; +import * as components from "../components/index.js"; -export const GetTokenDetailsServerList = ["https://glacier-api.avax.network"] as const; +export const GetTokenDetailsServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetTokenDetailsGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type GetTokenDetailsRequest = { - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * Contract address on the relevant chain. - */ - address: string; - /** - * TokenId on the contract - */ - tokenId: string; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * Contract address on the relevant chain. + */ + address: string; + /** + * TokenId on the contract + */ + tokenId: string; }; /** * Successful response */ export type GetTokenDetailsResponseBody = - | (components.Erc1155Token & { ercType: "ERC-1155" }) - | (components.Erc721Token & { ercType: "ERC-721" }); + | (components.Erc1155Token & { ercType: "ERC-1155" }) + | (components.Erc721Token & { ercType: "ERC-721" }); /** @internal */ export const GetTokenDetailsGlobals$inboundSchema: z.ZodType< - GetTokenDetailsGlobals, - z.ZodTypeDef, - unknown + GetTokenDetailsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type GetTokenDetailsGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const GetTokenDetailsGlobals$outboundSchema: z.ZodType< - GetTokenDetailsGlobals$Outbound, - z.ZodTypeDef, - GetTokenDetailsGlobals + GetTokenDetailsGlobals$Outbound, + z.ZodTypeDef, + GetTokenDetailsGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -64,41 +66,41 @@ export const GetTokenDetailsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTokenDetailsGlobals$ { - /** @deprecated use `GetTokenDetailsGlobals$inboundSchema` instead. */ - export const inboundSchema = GetTokenDetailsGlobals$inboundSchema; - /** @deprecated use `GetTokenDetailsGlobals$outboundSchema` instead. */ - export const outboundSchema = GetTokenDetailsGlobals$outboundSchema; - /** @deprecated use `GetTokenDetailsGlobals$Outbound` instead. */ - export type Outbound = GetTokenDetailsGlobals$Outbound; + /** @deprecated use `GetTokenDetailsGlobals$inboundSchema` instead. */ + export const inboundSchema = GetTokenDetailsGlobals$inboundSchema; + /** @deprecated use `GetTokenDetailsGlobals$outboundSchema` instead. */ + export const outboundSchema = GetTokenDetailsGlobals$outboundSchema; + /** @deprecated use `GetTokenDetailsGlobals$Outbound` instead. */ + export type Outbound = GetTokenDetailsGlobals$Outbound; } /** @internal */ export const GetTokenDetailsRequest$inboundSchema: z.ZodType< - GetTokenDetailsRequest, - z.ZodTypeDef, - unknown + GetTokenDetailsRequest, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), - address: z.string(), - tokenId: z.string(), + chainId: z.string().optional(), + address: z.string(), + tokenId: z.string(), }); /** @internal */ export type GetTokenDetailsRequest$Outbound = { - chainId?: string | undefined; - address: string; - tokenId: string; + chainId?: string | undefined; + address: string; + tokenId: string; }; /** @internal */ export const GetTokenDetailsRequest$outboundSchema: z.ZodType< - GetTokenDetailsRequest$Outbound, - z.ZodTypeDef, - GetTokenDetailsRequest + GetTokenDetailsRequest$Outbound, + z.ZodTypeDef, + GetTokenDetailsRequest > = z.object({ - chainId: z.string().optional(), - address: z.string(), - tokenId: z.string(), + chainId: z.string().optional(), + address: z.string(), + tokenId: z.string(), }); /** @@ -106,45 +108,53 @@ export const GetTokenDetailsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTokenDetailsRequest$ { - /** @deprecated use `GetTokenDetailsRequest$inboundSchema` instead. */ - export const inboundSchema = GetTokenDetailsRequest$inboundSchema; - /** @deprecated use `GetTokenDetailsRequest$outboundSchema` instead. */ - export const outboundSchema = GetTokenDetailsRequest$outboundSchema; - /** @deprecated use `GetTokenDetailsRequest$Outbound` instead. */ - export type Outbound = GetTokenDetailsRequest$Outbound; + /** @deprecated use `GetTokenDetailsRequest$inboundSchema` instead. */ + export const inboundSchema = GetTokenDetailsRequest$inboundSchema; + /** @deprecated use `GetTokenDetailsRequest$outboundSchema` instead. */ + export const outboundSchema = GetTokenDetailsRequest$outboundSchema; + /** @deprecated use `GetTokenDetailsRequest$Outbound` instead. */ + export type Outbound = GetTokenDetailsRequest$Outbound; } /** @internal */ export const GetTokenDetailsResponseBody$inboundSchema: z.ZodType< - GetTokenDetailsResponseBody, - z.ZodTypeDef, - unknown + GetTokenDetailsResponseBody, + z.ZodTypeDef, + unknown > = z.union([ - components.Erc1155Token$inboundSchema.and( - z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ ercType: v.ercType })) - ), - components.Erc721Token$inboundSchema.and( - z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ ercType: v.ercType })) - ), + components.Erc1155Token$inboundSchema.and( + z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + components.Erc721Token$inboundSchema.and( + z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ + ercType: v.ercType, + })), + ), ]); /** @internal */ export type GetTokenDetailsResponseBody$Outbound = - | (components.Erc1155Token$Outbound & { ercType: "ERC-1155" }) - | (components.Erc721Token$Outbound & { ercType: "ERC-721" }); + | (components.Erc1155Token$Outbound & { ercType: "ERC-1155" }) + | (components.Erc721Token$Outbound & { ercType: "ERC-721" }); /** @internal */ export const GetTokenDetailsResponseBody$outboundSchema: z.ZodType< - GetTokenDetailsResponseBody$Outbound, - z.ZodTypeDef, - GetTokenDetailsResponseBody + GetTokenDetailsResponseBody$Outbound, + z.ZodTypeDef, + GetTokenDetailsResponseBody > = z.union([ - components.Erc1155Token$outboundSchema.and( - z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ ercType: v.ercType })) - ), - components.Erc721Token$outboundSchema.and( - z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ ercType: v.ercType })) - ), + components.Erc1155Token$outboundSchema.and( + z.object({ ercType: z.literal("ERC-1155") }).transform((v) => ({ + ercType: v.ercType, + })), + ), + components.Erc721Token$outboundSchema.and( + z.object({ ercType: z.literal("ERC-721") }).transform((v) => ({ + ercType: v.ercType, + })), + ), ]); /** @@ -152,10 +162,10 @@ export const GetTokenDetailsResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTokenDetailsResponseBody$ { - /** @deprecated use `GetTokenDetailsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetTokenDetailsResponseBody$inboundSchema; - /** @deprecated use `GetTokenDetailsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetTokenDetailsResponseBody$outboundSchema; - /** @deprecated use `GetTokenDetailsResponseBody$Outbound` instead. */ - export type Outbound = GetTokenDetailsResponseBody$Outbound; + /** @deprecated use `GetTokenDetailsResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetTokenDetailsResponseBody$inboundSchema; + /** @deprecated use `GetTokenDetailsResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetTokenDetailsResponseBody$outboundSchema; + /** @deprecated use `GetTokenDetailsResponseBody$Outbound` instead. */ + export type Outbound = GetTokenDetailsResponseBody$Outbound; } diff --git a/src/models/operations/gettransaction.ts b/src/models/operations/gettransaction.ts index b3fc19f..4e16517 100644 --- a/src/models/operations/gettransaction.ts +++ b/src/models/operations/gettransaction.ts @@ -4,47 +4,49 @@ import * as z from "zod"; -export const GetTransactionServerList = ["https://glacier-api.avax.network"] as const; +export const GetTransactionServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetTransactionGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type GetTransactionRequest = { - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * A transaction hash. - */ - txHash: string; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * A transaction hash. + */ + txHash: string; }; /** @internal */ export const GetTransactionGlobals$inboundSchema: z.ZodType< - GetTransactionGlobals, - z.ZodTypeDef, - unknown + GetTransactionGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type GetTransactionGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const GetTransactionGlobals$outboundSchema: z.ZodType< - GetTransactionGlobals$Outbound, - z.ZodTypeDef, - GetTransactionGlobals + GetTransactionGlobals$Outbound, + z.ZodTypeDef, + GetTransactionGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -52,38 +54,38 @@ export const GetTransactionGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTransactionGlobals$ { - /** @deprecated use `GetTransactionGlobals$inboundSchema` instead. */ - export const inboundSchema = GetTransactionGlobals$inboundSchema; - /** @deprecated use `GetTransactionGlobals$outboundSchema` instead. */ - export const outboundSchema = GetTransactionGlobals$outboundSchema; - /** @deprecated use `GetTransactionGlobals$Outbound` instead. */ - export type Outbound = GetTransactionGlobals$Outbound; + /** @deprecated use `GetTransactionGlobals$inboundSchema` instead. */ + export const inboundSchema = GetTransactionGlobals$inboundSchema; + /** @deprecated use `GetTransactionGlobals$outboundSchema` instead. */ + export const outboundSchema = GetTransactionGlobals$outboundSchema; + /** @deprecated use `GetTransactionGlobals$Outbound` instead. */ + export type Outbound = GetTransactionGlobals$Outbound; } /** @internal */ export const GetTransactionRequest$inboundSchema: z.ZodType< - GetTransactionRequest, - z.ZodTypeDef, - unknown + GetTransactionRequest, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), - txHash: z.string(), + chainId: z.string().optional(), + txHash: z.string(), }); /** @internal */ export type GetTransactionRequest$Outbound = { - chainId?: string | undefined; - txHash: string; + chainId?: string | undefined; + txHash: string; }; /** @internal */ export const GetTransactionRequest$outboundSchema: z.ZodType< - GetTransactionRequest$Outbound, - z.ZodTypeDef, - GetTransactionRequest + GetTransactionRequest$Outbound, + z.ZodTypeDef, + GetTransactionRequest > = z.object({ - chainId: z.string().optional(), - txHash: z.string(), + chainId: z.string().optional(), + txHash: z.string(), }); /** @@ -91,10 +93,10 @@ export const GetTransactionRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTransactionRequest$ { - /** @deprecated use `GetTransactionRequest$inboundSchema` instead. */ - export const inboundSchema = GetTransactionRequest$inboundSchema; - /** @deprecated use `GetTransactionRequest$outboundSchema` instead. */ - export const outboundSchema = GetTransactionRequest$outboundSchema; - /** @deprecated use `GetTransactionRequest$Outbound` instead. */ - export type Outbound = GetTransactionRequest$Outbound; + /** @deprecated use `GetTransactionRequest$inboundSchema` instead. */ + export const inboundSchema = GetTransactionRequest$inboundSchema; + /** @deprecated use `GetTransactionRequest$outboundSchema` instead. */ + export const outboundSchema = GetTransactionRequest$outboundSchema; + /** @deprecated use `GetTransactionRequest$Outbound` instead. */ + export type Outbound = GetTransactionRequest$Outbound; } diff --git a/src/models/operations/gettransactionsforblock.ts b/src/models/operations/gettransactionsforblock.ts index 6194636..ee2cf8d 100644 --- a/src/models/operations/gettransactionsforblock.ts +++ b/src/models/operations/gettransactionsforblock.ts @@ -4,47 +4,49 @@ import * as z from "zod"; -export const GetTransactionsForBlockServerList = ["https://glacier-api.avax.network"] as const; +export const GetTransactionsForBlockServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetTransactionsForBlockGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type GetTransactionsForBlockRequest = { - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * A block identifier which is either a block number or the block hash. - */ - blockId: string; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * A block identifier which is either a block number or the block hash. + */ + blockId: string; }; /** @internal */ export const GetTransactionsForBlockGlobals$inboundSchema: z.ZodType< - GetTransactionsForBlockGlobals, - z.ZodTypeDef, - unknown + GetTransactionsForBlockGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type GetTransactionsForBlockGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const GetTransactionsForBlockGlobals$outboundSchema: z.ZodType< - GetTransactionsForBlockGlobals$Outbound, - z.ZodTypeDef, - GetTransactionsForBlockGlobals + GetTransactionsForBlockGlobals$Outbound, + z.ZodTypeDef, + GetTransactionsForBlockGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -52,38 +54,38 @@ export const GetTransactionsForBlockGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTransactionsForBlockGlobals$ { - /** @deprecated use `GetTransactionsForBlockGlobals$inboundSchema` instead. */ - export const inboundSchema = GetTransactionsForBlockGlobals$inboundSchema; - /** @deprecated use `GetTransactionsForBlockGlobals$outboundSchema` instead. */ - export const outboundSchema = GetTransactionsForBlockGlobals$outboundSchema; - /** @deprecated use `GetTransactionsForBlockGlobals$Outbound` instead. */ - export type Outbound = GetTransactionsForBlockGlobals$Outbound; + /** @deprecated use `GetTransactionsForBlockGlobals$inboundSchema` instead. */ + export const inboundSchema = GetTransactionsForBlockGlobals$inboundSchema; + /** @deprecated use `GetTransactionsForBlockGlobals$outboundSchema` instead. */ + export const outboundSchema = GetTransactionsForBlockGlobals$outboundSchema; + /** @deprecated use `GetTransactionsForBlockGlobals$Outbound` instead. */ + export type Outbound = GetTransactionsForBlockGlobals$Outbound; } /** @internal */ export const GetTransactionsForBlockRequest$inboundSchema: z.ZodType< - GetTransactionsForBlockRequest, - z.ZodTypeDef, - unknown + GetTransactionsForBlockRequest, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), - blockId: z.string(), + chainId: z.string().optional(), + blockId: z.string(), }); /** @internal */ export type GetTransactionsForBlockRequest$Outbound = { - chainId?: string | undefined; - blockId: string; + chainId?: string | undefined; + blockId: string; }; /** @internal */ export const GetTransactionsForBlockRequest$outboundSchema: z.ZodType< - GetTransactionsForBlockRequest$Outbound, - z.ZodTypeDef, - GetTransactionsForBlockRequest + GetTransactionsForBlockRequest$Outbound, + z.ZodTypeDef, + GetTransactionsForBlockRequest > = z.object({ - chainId: z.string().optional(), - blockId: z.string(), + chainId: z.string().optional(), + blockId: z.string(), }); /** @@ -91,10 +93,10 @@ export const GetTransactionsForBlockRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTransactionsForBlockRequest$ { - /** @deprecated use `GetTransactionsForBlockRequest$inboundSchema` instead. */ - export const inboundSchema = GetTransactionsForBlockRequest$inboundSchema; - /** @deprecated use `GetTransactionsForBlockRequest$outboundSchema` instead. */ - export const outboundSchema = GetTransactionsForBlockRequest$outboundSchema; - /** @deprecated use `GetTransactionsForBlockRequest$Outbound` instead. */ - export type Outbound = GetTransactionsForBlockRequest$Outbound; + /** @deprecated use `GetTransactionsForBlockRequest$inboundSchema` instead. */ + export const inboundSchema = GetTransactionsForBlockRequest$inboundSchema; + /** @deprecated use `GetTransactionsForBlockRequest$outboundSchema` instead. */ + export const outboundSchema = GetTransactionsForBlockRequest$outboundSchema; + /** @deprecated use `GetTransactionsForBlockRequest$Outbound` instead. */ + export type Outbound = GetTransactionsForBlockRequest$Outbound; } diff --git a/src/models/operations/gettxbyhash.ts b/src/models/operations/gettxbyhash.ts index 038d7e0..6d9e1b3 100644 --- a/src/models/operations/gettxbyhash.ts +++ b/src/models/operations/gettxbyhash.ts @@ -2,64 +2,66 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as components from "../components/index.js"; import * as z from "zod"; +import * as components from "../components/index.js"; -export const GetTxByHashServerList = ["https://glacier-api.avax.network"] as const; +export const GetTxByHashServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetTxByHashGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type GetTxByHashRequest = { - /** - * A primary network blockchain id or alias. - */ - blockchainId: components.BlockchainId; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; - /** - * A primary network (P or X chain) transaction hash. - */ - txHash: string; + /** + * A primary network blockchain id or alias. + */ + blockchainId: components.BlockchainId; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; + /** + * A primary network (P or X chain) transaction hash. + */ + txHash: string; }; /** * Successful response */ export type GetTxByHashResponseBody = - | components.CChainExportTransaction - | components.CChainImportTransaction - | components.XChainNonLinearTransaction - | components.XChainLinearTransaction - | components.PChainTransaction; + | components.CChainExportTransaction + | components.CChainImportTransaction + | components.XChainNonLinearTransaction + | components.XChainLinearTransaction + | components.PChainTransaction; /** @internal */ export const GetTxByHashGlobals$inboundSchema: z.ZodType< - GetTxByHashGlobals, - z.ZodTypeDef, - unknown + GetTxByHashGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type GetTxByHashGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const GetTxByHashGlobals$outboundSchema: z.ZodType< - GetTxByHashGlobals$Outbound, - z.ZodTypeDef, - GetTxByHashGlobals + GetTxByHashGlobals$Outbound, + z.ZodTypeDef, + GetTxByHashGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -67,41 +69,41 @@ export const GetTxByHashGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTxByHashGlobals$ { - /** @deprecated use `GetTxByHashGlobals$inboundSchema` instead. */ - export const inboundSchema = GetTxByHashGlobals$inboundSchema; - /** @deprecated use `GetTxByHashGlobals$outboundSchema` instead. */ - export const outboundSchema = GetTxByHashGlobals$outboundSchema; - /** @deprecated use `GetTxByHashGlobals$Outbound` instead. */ - export type Outbound = GetTxByHashGlobals$Outbound; + /** @deprecated use `GetTxByHashGlobals$inboundSchema` instead. */ + export const inboundSchema = GetTxByHashGlobals$inboundSchema; + /** @deprecated use `GetTxByHashGlobals$outboundSchema` instead. */ + export const outboundSchema = GetTxByHashGlobals$outboundSchema; + /** @deprecated use `GetTxByHashGlobals$Outbound` instead. */ + export type Outbound = GetTxByHashGlobals$Outbound; } /** @internal */ export const GetTxByHashRequest$inboundSchema: z.ZodType< - GetTxByHashRequest, - z.ZodTypeDef, - unknown + GetTxByHashRequest, + z.ZodTypeDef, + unknown > = z.object({ - blockchainId: components.BlockchainId$inboundSchema, - network: components.GlobalParamNetwork$inboundSchema.optional(), - txHash: z.string(), + blockchainId: components.BlockchainId$inboundSchema, + network: components.GlobalParamNetwork$inboundSchema.optional(), + txHash: z.string(), }); /** @internal */ export type GetTxByHashRequest$Outbound = { - blockchainId: string; - network?: string | undefined; - txHash: string; + blockchainId: string; + network?: string | undefined; + txHash: string; }; /** @internal */ export const GetTxByHashRequest$outboundSchema: z.ZodType< - GetTxByHashRequest$Outbound, - z.ZodTypeDef, - GetTxByHashRequest + GetTxByHashRequest$Outbound, + z.ZodTypeDef, + GetTxByHashRequest > = z.object({ - blockchainId: components.BlockchainId$outboundSchema, - network: components.GlobalParamNetwork$outboundSchema.optional(), - txHash: z.string(), + blockchainId: components.BlockchainId$outboundSchema, + network: components.GlobalParamNetwork$outboundSchema.optional(), + txHash: z.string(), }); /** @@ -109,46 +111,46 @@ export const GetTxByHashRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTxByHashRequest$ { - /** @deprecated use `GetTxByHashRequest$inboundSchema` instead. */ - export const inboundSchema = GetTxByHashRequest$inboundSchema; - /** @deprecated use `GetTxByHashRequest$outboundSchema` instead. */ - export const outboundSchema = GetTxByHashRequest$outboundSchema; - /** @deprecated use `GetTxByHashRequest$Outbound` instead. */ - export type Outbound = GetTxByHashRequest$Outbound; + /** @deprecated use `GetTxByHashRequest$inboundSchema` instead. */ + export const inboundSchema = GetTxByHashRequest$inboundSchema; + /** @deprecated use `GetTxByHashRequest$outboundSchema` instead. */ + export const outboundSchema = GetTxByHashRequest$outboundSchema; + /** @deprecated use `GetTxByHashRequest$Outbound` instead. */ + export type Outbound = GetTxByHashRequest$Outbound; } /** @internal */ export const GetTxByHashResponseBody$inboundSchema: z.ZodType< - GetTxByHashResponseBody, - z.ZodTypeDef, - unknown + GetTxByHashResponseBody, + z.ZodTypeDef, + unknown > = z.union([ - components.CChainExportTransaction$inboundSchema, - components.CChainImportTransaction$inboundSchema, - components.XChainNonLinearTransaction$inboundSchema, - components.XChainLinearTransaction$inboundSchema, - components.PChainTransaction$inboundSchema, + components.CChainExportTransaction$inboundSchema, + components.CChainImportTransaction$inboundSchema, + components.XChainNonLinearTransaction$inboundSchema, + components.XChainLinearTransaction$inboundSchema, + components.PChainTransaction$inboundSchema, ]); /** @internal */ export type GetTxByHashResponseBody$Outbound = - | components.CChainExportTransaction$Outbound - | components.CChainImportTransaction$Outbound - | components.XChainNonLinearTransaction$Outbound - | components.XChainLinearTransaction$Outbound - | components.PChainTransaction$Outbound; + | components.CChainExportTransaction$Outbound + | components.CChainImportTransaction$Outbound + | components.XChainNonLinearTransaction$Outbound + | components.XChainLinearTransaction$Outbound + | components.PChainTransaction$Outbound; /** @internal */ export const GetTxByHashResponseBody$outboundSchema: z.ZodType< - GetTxByHashResponseBody$Outbound, - z.ZodTypeDef, - GetTxByHashResponseBody + GetTxByHashResponseBody$Outbound, + z.ZodTypeDef, + GetTxByHashResponseBody > = z.union([ - components.CChainExportTransaction$outboundSchema, - components.CChainImportTransaction$outboundSchema, - components.XChainNonLinearTransaction$outboundSchema, - components.XChainLinearTransaction$outboundSchema, - components.PChainTransaction$outboundSchema, + components.CChainExportTransaction$outboundSchema, + components.CChainImportTransaction$outboundSchema, + components.XChainNonLinearTransaction$outboundSchema, + components.XChainLinearTransaction$outboundSchema, + components.PChainTransaction$outboundSchema, ]); /** @@ -156,10 +158,10 @@ export const GetTxByHashResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTxByHashResponseBody$ { - /** @deprecated use `GetTxByHashResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetTxByHashResponseBody$inboundSchema; - /** @deprecated use `GetTxByHashResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetTxByHashResponseBody$outboundSchema; - /** @deprecated use `GetTxByHashResponseBody$Outbound` instead. */ - export type Outbound = GetTxByHashResponseBody$Outbound; + /** @deprecated use `GetTxByHashResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetTxByHashResponseBody$inboundSchema; + /** @deprecated use `GetTxByHashResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetTxByHashResponseBody$outboundSchema; + /** @deprecated use `GetTxByHashResponseBody$Outbound` instead. */ + export type Outbound = GetTxByHashResponseBody$Outbound; } diff --git a/src/models/operations/getutxosbyaddresses.ts b/src/models/operations/getutxosbyaddresses.ts index 0582a46..2e33b2b 100644 --- a/src/models/operations/getutxosbyaddresses.ts +++ b/src/models/operations/getutxosbyaddresses.ts @@ -2,86 +2,88 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const GetUtxosByAddressesServerList = ["https://glacier-api.avax.network"] as const; +export const GetUtxosByAddressesServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetUtxosByAddressesGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type GetUtxosByAddressesRequest = { - /** - * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji". - */ - addresses?: string | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A primary network blockchain id or alias. - */ - blockchainId: components.BlockchainId; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; - /** - * Asset ID for any asset (only applicable X-Chain) - */ - assetId?: string | undefined; - /** - * Boolean filter to include spent UTXOs. - */ - includeSpent?: boolean | undefined; - /** - * 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. - */ - sortOrder?: components.SortOrder | undefined; + /** + * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji". + */ + addresses?: string | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A primary network blockchain id or alias. + */ + blockchainId: components.BlockchainId; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; + /** + * Asset ID for any asset (only applicable X-Chain) + */ + assetId?: string | undefined; + /** + * Boolean filter to include spent UTXOs. + */ + includeSpent?: boolean | undefined; + /** + * 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. + */ + sortOrder?: components.SortOrder | undefined; }; /** * Successful response */ export type GetUtxosByAddressesResponseBody = - | components.ListPChainUtxosResponse - | components.ListUtxosResponse; + | components.ListPChainUtxosResponse + | components.ListUtxosResponse; export type GetUtxosByAddressesResponse = { - result: components.ListPChainUtxosResponse | components.ListUtxosResponse; + result: components.ListPChainUtxosResponse | components.ListUtxosResponse; }; /** @internal */ export const GetUtxosByAddressesGlobals$inboundSchema: z.ZodType< - GetUtxosByAddressesGlobals, - z.ZodTypeDef, - unknown + GetUtxosByAddressesGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type GetUtxosByAddressesGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const GetUtxosByAddressesGlobals$outboundSchema: z.ZodType< - GetUtxosByAddressesGlobals$Outbound, - z.ZodTypeDef, - GetUtxosByAddressesGlobals + GetUtxosByAddressesGlobals$Outbound, + z.ZodTypeDef, + GetUtxosByAddressesGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -89,56 +91,56 @@ export const GetUtxosByAddressesGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUtxosByAddressesGlobals$ { - /** @deprecated use `GetUtxosByAddressesGlobals$inboundSchema` instead. */ - export const inboundSchema = GetUtxosByAddressesGlobals$inboundSchema; - /** @deprecated use `GetUtxosByAddressesGlobals$outboundSchema` instead. */ - export const outboundSchema = GetUtxosByAddressesGlobals$outboundSchema; - /** @deprecated use `GetUtxosByAddressesGlobals$Outbound` instead. */ - export type Outbound = GetUtxosByAddressesGlobals$Outbound; + /** @deprecated use `GetUtxosByAddressesGlobals$inboundSchema` instead. */ + export const inboundSchema = GetUtxosByAddressesGlobals$inboundSchema; + /** @deprecated use `GetUtxosByAddressesGlobals$outboundSchema` instead. */ + export const outboundSchema = GetUtxosByAddressesGlobals$outboundSchema; + /** @deprecated use `GetUtxosByAddressesGlobals$Outbound` instead. */ + export type Outbound = GetUtxosByAddressesGlobals$Outbound; } /** @internal */ export const GetUtxosByAddressesRequest$inboundSchema: z.ZodType< - GetUtxosByAddressesRequest, - z.ZodTypeDef, - unknown + GetUtxosByAddressesRequest, + z.ZodTypeDef, + unknown > = z.object({ - addresses: z.string().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - blockchainId: components.BlockchainId$inboundSchema, - network: components.GlobalParamNetwork$inboundSchema.optional(), - assetId: z.string().optional(), - includeSpent: z.boolean().optional(), - sortOrder: components.SortOrder$inboundSchema.optional(), + addresses: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + blockchainId: components.BlockchainId$inboundSchema, + network: components.GlobalParamNetwork$inboundSchema.optional(), + assetId: z.string().optional(), + includeSpent: z.boolean().optional(), + sortOrder: components.SortOrder$inboundSchema.optional(), }); /** @internal */ export type GetUtxosByAddressesRequest$Outbound = { - addresses?: string | undefined; - pageToken?: string | undefined; - pageSize: number; - blockchainId: string; - network?: string | undefined; - assetId?: string | undefined; - includeSpent?: boolean | undefined; - sortOrder?: string | undefined; + addresses?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + blockchainId: string; + network?: string | undefined; + assetId?: string | undefined; + includeSpent?: boolean | undefined; + sortOrder?: string | undefined; }; /** @internal */ export const GetUtxosByAddressesRequest$outboundSchema: z.ZodType< - GetUtxosByAddressesRequest$Outbound, - z.ZodTypeDef, - GetUtxosByAddressesRequest + GetUtxosByAddressesRequest$Outbound, + z.ZodTypeDef, + GetUtxosByAddressesRequest > = z.object({ - addresses: z.string().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - blockchainId: components.BlockchainId$outboundSchema, - network: components.GlobalParamNetwork$outboundSchema.optional(), - assetId: z.string().optional(), - includeSpent: z.boolean().optional(), - sortOrder: components.SortOrder$outboundSchema.optional(), + addresses: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + blockchainId: components.BlockchainId$outboundSchema, + network: components.GlobalParamNetwork$outboundSchema.optional(), + assetId: z.string().optional(), + includeSpent: z.boolean().optional(), + sortOrder: components.SortOrder$outboundSchema.optional(), }); /** @@ -146,37 +148,37 @@ export const GetUtxosByAddressesRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUtxosByAddressesRequest$ { - /** @deprecated use `GetUtxosByAddressesRequest$inboundSchema` instead. */ - export const inboundSchema = GetUtxosByAddressesRequest$inboundSchema; - /** @deprecated use `GetUtxosByAddressesRequest$outboundSchema` instead. */ - export const outboundSchema = GetUtxosByAddressesRequest$outboundSchema; - /** @deprecated use `GetUtxosByAddressesRequest$Outbound` instead. */ - export type Outbound = GetUtxosByAddressesRequest$Outbound; + /** @deprecated use `GetUtxosByAddressesRequest$inboundSchema` instead. */ + export const inboundSchema = GetUtxosByAddressesRequest$inboundSchema; + /** @deprecated use `GetUtxosByAddressesRequest$outboundSchema` instead. */ + export const outboundSchema = GetUtxosByAddressesRequest$outboundSchema; + /** @deprecated use `GetUtxosByAddressesRequest$Outbound` instead. */ + export type Outbound = GetUtxosByAddressesRequest$Outbound; } /** @internal */ export const GetUtxosByAddressesResponseBody$inboundSchema: z.ZodType< - GetUtxosByAddressesResponseBody, - z.ZodTypeDef, - unknown + GetUtxosByAddressesResponseBody, + z.ZodTypeDef, + unknown > = z.union([ - components.ListPChainUtxosResponse$inboundSchema, - components.ListUtxosResponse$inboundSchema, + components.ListPChainUtxosResponse$inboundSchema, + components.ListUtxosResponse$inboundSchema, ]); /** @internal */ export type GetUtxosByAddressesResponseBody$Outbound = - | components.ListPChainUtxosResponse$Outbound - | components.ListUtxosResponse$Outbound; + | components.ListPChainUtxosResponse$Outbound + | components.ListUtxosResponse$Outbound; /** @internal */ export const GetUtxosByAddressesResponseBody$outboundSchema: z.ZodType< - GetUtxosByAddressesResponseBody$Outbound, - z.ZodTypeDef, - GetUtxosByAddressesResponseBody + GetUtxosByAddressesResponseBody$Outbound, + z.ZodTypeDef, + GetUtxosByAddressesResponseBody > = z.union([ - components.ListPChainUtxosResponse$outboundSchema, - components.ListUtxosResponse$outboundSchema, + components.ListPChainUtxosResponse$outboundSchema, + components.ListUtxosResponse$outboundSchema, ]); /** @@ -184,64 +186,62 @@ export const GetUtxosByAddressesResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUtxosByAddressesResponseBody$ { - /** @deprecated use `GetUtxosByAddressesResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetUtxosByAddressesResponseBody$inboundSchema; - /** @deprecated use `GetUtxosByAddressesResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetUtxosByAddressesResponseBody$outboundSchema; - /** @deprecated use `GetUtxosByAddressesResponseBody$Outbound` instead. */ - export type Outbound = GetUtxosByAddressesResponseBody$Outbound; + /** @deprecated use `GetUtxosByAddressesResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetUtxosByAddressesResponseBody$inboundSchema; + /** @deprecated use `GetUtxosByAddressesResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetUtxosByAddressesResponseBody$outboundSchema; + /** @deprecated use `GetUtxosByAddressesResponseBody$Outbound` instead. */ + export type Outbound = GetUtxosByAddressesResponseBody$Outbound; } /** @internal */ export const GetUtxosByAddressesResponse$inboundSchema: z.ZodType< - GetUtxosByAddressesResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: z.union([ - components.ListPChainUtxosResponse$inboundSchema, - components.ListUtxosResponse$inboundSchema, - ]), - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + GetUtxosByAddressesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: z.union([ + components.ListPChainUtxosResponse$inboundSchema, + components.ListUtxosResponse$inboundSchema, + ]), +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type GetUtxosByAddressesResponse$Outbound = { - Result: components.ListPChainUtxosResponse$Outbound | components.ListUtxosResponse$Outbound; + Result: + | components.ListPChainUtxosResponse$Outbound + | components.ListUtxosResponse$Outbound; }; /** @internal */ export const GetUtxosByAddressesResponse$outboundSchema: z.ZodType< - GetUtxosByAddressesResponse$Outbound, - z.ZodTypeDef, - GetUtxosByAddressesResponse -> = z - .object({ - result: z.union([ - components.ListPChainUtxosResponse$outboundSchema, - components.ListUtxosResponse$outboundSchema, - ]), - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + GetUtxosByAddressesResponse$Outbound, + z.ZodTypeDef, + GetUtxosByAddressesResponse +> = z.object({ + result: z.union([ + components.ListPChainUtxosResponse$outboundSchema, + components.ListUtxosResponse$outboundSchema, + ]), +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUtxosByAddressesResponse$ { - /** @deprecated use `GetUtxosByAddressesResponse$inboundSchema` instead. */ - export const inboundSchema = GetUtxosByAddressesResponse$inboundSchema; - /** @deprecated use `GetUtxosByAddressesResponse$outboundSchema` instead. */ - export const outboundSchema = GetUtxosByAddressesResponse$outboundSchema; - /** @deprecated use `GetUtxosByAddressesResponse$Outbound` instead. */ - export type Outbound = GetUtxosByAddressesResponse$Outbound; + /** @deprecated use `GetUtxosByAddressesResponse$inboundSchema` instead. */ + export const inboundSchema = GetUtxosByAddressesResponse$inboundSchema; + /** @deprecated use `GetUtxosByAddressesResponse$outboundSchema` instead. */ + export const outboundSchema = GetUtxosByAddressesResponse$outboundSchema; + /** @deprecated use `GetUtxosByAddressesResponse$Outbound` instead. */ + export type Outbound = GetUtxosByAddressesResponse$Outbound; } diff --git a/src/models/operations/getvalidatorsbydaterange.ts b/src/models/operations/getvalidatorsbydaterange.ts index d873225..649b5dd 100644 --- a/src/models/operations/getvalidatorsbydaterange.ts +++ b/src/models/operations/getvalidatorsbydaterange.ts @@ -2,79 +2,81 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const GetValidatorsByDateRangeServerList = ["https://popsicle-api.avax.network"] as const; +export const GetValidatorsByDateRangeServerList = [ + "https://metrics.avax.network", +] as const; export type GetValidatorsByDateRangeRequest = { - /** - * Query param for retrieving items after a specific timestamp. - */ - startTimestamp?: number | undefined; - /** - * Query param for retrieving items before a specific timestamp. - */ - endTimestamp?: number | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 5000. - */ - pageSize?: number | undefined; - /** - * The subnet ID to filter by. If not provided, then all subnets will be returned. - */ - subnetId: string; - /** - * mainnet or testnet. - */ - network?: components.NetworkType | undefined; + /** + * Query param for retrieving items after a specific timestamp. + */ + startTimestamp?: number | undefined; + /** + * Query param for retrieving items before a specific timestamp. + */ + endTimestamp?: number | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 5000. + */ + pageSize?: number | undefined; + /** + * The subnet ID to filter by. If not provided, then all subnets will be returned. + */ + subnetId: string; + /** + * mainnet or testnet. + */ + network?: components.NetworkType | undefined; }; export type GetValidatorsByDateRangeResponse = { - result: components.PChainLookingGlassResponse; + result: components.PChainLookingGlassResponse; }; /** @internal */ export const GetValidatorsByDateRangeRequest$inboundSchema: z.ZodType< - GetValidatorsByDateRangeRequest, - z.ZodTypeDef, - unknown + GetValidatorsByDateRangeRequest, + z.ZodTypeDef, + unknown > = z.object({ - startTimestamp: z.number().int().optional(), - endTimestamp: z.number().int().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(1000), - subnetId: z.string(), - network: components.NetworkType$inboundSchema.optional(), + startTimestamp: z.number().int().optional(), + endTimestamp: z.number().int().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(1000), + subnetId: z.string(), + network: components.NetworkType$inboundSchema.optional(), }); /** @internal */ export type GetValidatorsByDateRangeRequest$Outbound = { - startTimestamp?: number | undefined; - endTimestamp?: number | undefined; - pageToken?: string | undefined; - pageSize: number; - subnetId: string; - network?: string | undefined; + startTimestamp?: number | undefined; + endTimestamp?: number | undefined; + pageToken?: string | undefined; + pageSize: number; + subnetId: string; + network?: string | undefined; }; /** @internal */ export const GetValidatorsByDateRangeRequest$outboundSchema: z.ZodType< - GetValidatorsByDateRangeRequest$Outbound, - z.ZodTypeDef, - GetValidatorsByDateRangeRequest + GetValidatorsByDateRangeRequest$Outbound, + z.ZodTypeDef, + GetValidatorsByDateRangeRequest > = z.object({ - startTimestamp: z.number().int().optional(), - endTimestamp: z.number().int().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(1000), - subnetId: z.string(), - network: components.NetworkType$outboundSchema.optional(), + startTimestamp: z.number().int().optional(), + endTimestamp: z.number().int().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(1000), + subnetId: z.string(), + network: components.NetworkType$outboundSchema.optional(), }); /** @@ -82,58 +84,54 @@ export const GetValidatorsByDateRangeRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetValidatorsByDateRangeRequest$ { - /** @deprecated use `GetValidatorsByDateRangeRequest$inboundSchema` instead. */ - export const inboundSchema = GetValidatorsByDateRangeRequest$inboundSchema; - /** @deprecated use `GetValidatorsByDateRangeRequest$outboundSchema` instead. */ - export const outboundSchema = GetValidatorsByDateRangeRequest$outboundSchema; - /** @deprecated use `GetValidatorsByDateRangeRequest$Outbound` instead. */ - export type Outbound = GetValidatorsByDateRangeRequest$Outbound; + /** @deprecated use `GetValidatorsByDateRangeRequest$inboundSchema` instead. */ + export const inboundSchema = GetValidatorsByDateRangeRequest$inboundSchema; + /** @deprecated use `GetValidatorsByDateRangeRequest$outboundSchema` instead. */ + export const outboundSchema = GetValidatorsByDateRangeRequest$outboundSchema; + /** @deprecated use `GetValidatorsByDateRangeRequest$Outbound` instead. */ + export type Outbound = GetValidatorsByDateRangeRequest$Outbound; } /** @internal */ export const GetValidatorsByDateRangeResponse$inboundSchema: z.ZodType< - GetValidatorsByDateRangeResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.PChainLookingGlassResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + GetValidatorsByDateRangeResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.PChainLookingGlassResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type GetValidatorsByDateRangeResponse$Outbound = { - Result: components.PChainLookingGlassResponse$Outbound; + Result: components.PChainLookingGlassResponse$Outbound; }; /** @internal */ export const GetValidatorsByDateRangeResponse$outboundSchema: z.ZodType< - GetValidatorsByDateRangeResponse$Outbound, - z.ZodTypeDef, - GetValidatorsByDateRangeResponse -> = z - .object({ - result: components.PChainLookingGlassResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + GetValidatorsByDateRangeResponse$Outbound, + z.ZodTypeDef, + GetValidatorsByDateRangeResponse +> = z.object({ + result: components.PChainLookingGlassResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetValidatorsByDateRangeResponse$ { - /** @deprecated use `GetValidatorsByDateRangeResponse$inboundSchema` instead. */ - export const inboundSchema = GetValidatorsByDateRangeResponse$inboundSchema; - /** @deprecated use `GetValidatorsByDateRangeResponse$outboundSchema` instead. */ - export const outboundSchema = GetValidatorsByDateRangeResponse$outboundSchema; - /** @deprecated use `GetValidatorsByDateRangeResponse$Outbound` instead. */ - export type Outbound = GetValidatorsByDateRangeResponse$Outbound; + /** @deprecated use `GetValidatorsByDateRangeResponse$inboundSchema` instead. */ + export const inboundSchema = GetValidatorsByDateRangeResponse$inboundSchema; + /** @deprecated use `GetValidatorsByDateRangeResponse$outboundSchema` instead. */ + export const outboundSchema = GetValidatorsByDateRangeResponse$outboundSchema; + /** @deprecated use `GetValidatorsByDateRangeResponse$Outbound` instead. */ + export type Outbound = GetValidatorsByDateRangeResponse$Outbound; } diff --git a/src/models/operations/getvertexbyhash.ts b/src/models/operations/getvertexbyhash.ts index f02c9b6..6c1ec90 100644 --- a/src/models/operations/getvertexbyhash.ts +++ b/src/models/operations/getvertexbyhash.ts @@ -2,54 +2,56 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as components from "../components/index.js"; import * as z from "zod"; +import * as components from "../components/index.js"; -export const GetVertexByHashServerList = ["https://glacier-api.avax.network"] as const; +export const GetVertexByHashServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetVertexByHashGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type GetVertexByHashRequest = { - /** - * A vertex hash string. - */ - vertexHash: string; - /** - * A primary network blockchain id or alias. - */ - blockchainId: components.XChainId; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A vertex hash string. + */ + vertexHash: string; + /** + * A primary network blockchain id or alias. + */ + blockchainId: components.XChainId; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; /** @internal */ export const GetVertexByHashGlobals$inboundSchema: z.ZodType< - GetVertexByHashGlobals, - z.ZodTypeDef, - unknown + GetVertexByHashGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type GetVertexByHashGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const GetVertexByHashGlobals$outboundSchema: z.ZodType< - GetVertexByHashGlobals$Outbound, - z.ZodTypeDef, - GetVertexByHashGlobals + GetVertexByHashGlobals$Outbound, + z.ZodTypeDef, + GetVertexByHashGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -57,41 +59,41 @@ export const GetVertexByHashGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetVertexByHashGlobals$ { - /** @deprecated use `GetVertexByHashGlobals$inboundSchema` instead. */ - export const inboundSchema = GetVertexByHashGlobals$inboundSchema; - /** @deprecated use `GetVertexByHashGlobals$outboundSchema` instead. */ - export const outboundSchema = GetVertexByHashGlobals$outboundSchema; - /** @deprecated use `GetVertexByHashGlobals$Outbound` instead. */ - export type Outbound = GetVertexByHashGlobals$Outbound; + /** @deprecated use `GetVertexByHashGlobals$inboundSchema` instead. */ + export const inboundSchema = GetVertexByHashGlobals$inboundSchema; + /** @deprecated use `GetVertexByHashGlobals$outboundSchema` instead. */ + export const outboundSchema = GetVertexByHashGlobals$outboundSchema; + /** @deprecated use `GetVertexByHashGlobals$Outbound` instead. */ + export type Outbound = GetVertexByHashGlobals$Outbound; } /** @internal */ export const GetVertexByHashRequest$inboundSchema: z.ZodType< - GetVertexByHashRequest, - z.ZodTypeDef, - unknown + GetVertexByHashRequest, + z.ZodTypeDef, + unknown > = z.object({ - vertexHash: z.string(), - blockchainId: components.XChainId$inboundSchema, - network: components.GlobalParamNetwork$inboundSchema.optional(), + vertexHash: z.string(), + blockchainId: components.XChainId$inboundSchema, + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type GetVertexByHashRequest$Outbound = { - vertexHash: string; - blockchainId: string; - network?: string | undefined; + vertexHash: string; + blockchainId: string; + network?: string | undefined; }; /** @internal */ export const GetVertexByHashRequest$outboundSchema: z.ZodType< - GetVertexByHashRequest$Outbound, - z.ZodTypeDef, - GetVertexByHashRequest + GetVertexByHashRequest$Outbound, + z.ZodTypeDef, + GetVertexByHashRequest > = z.object({ - vertexHash: z.string(), - blockchainId: components.XChainId$outboundSchema, - network: components.GlobalParamNetwork$outboundSchema.optional(), + vertexHash: z.string(), + blockchainId: components.XChainId$outboundSchema, + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -99,10 +101,10 @@ export const GetVertexByHashRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetVertexByHashRequest$ { - /** @deprecated use `GetVertexByHashRequest$inboundSchema` instead. */ - export const inboundSchema = GetVertexByHashRequest$inboundSchema; - /** @deprecated use `GetVertexByHashRequest$outboundSchema` instead. */ - export const outboundSchema = GetVertexByHashRequest$outboundSchema; - /** @deprecated use `GetVertexByHashRequest$Outbound` instead. */ - export type Outbound = GetVertexByHashRequest$Outbound; + /** @deprecated use `GetVertexByHashRequest$inboundSchema` instead. */ + export const inboundSchema = GetVertexByHashRequest$inboundSchema; + /** @deprecated use `GetVertexByHashRequest$outboundSchema` instead. */ + export const outboundSchema = GetVertexByHashRequest$outboundSchema; + /** @deprecated use `GetVertexByHashRequest$Outbound` instead. */ + export type Outbound = GetVertexByHashRequest$Outbound; } diff --git a/src/models/operations/getvertexbyheight.ts b/src/models/operations/getvertexbyheight.ts index 9e71af4..d5924f0 100644 --- a/src/models/operations/getvertexbyheight.ts +++ b/src/models/operations/getvertexbyheight.ts @@ -2,71 +2,73 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const GetVertexByHeightServerList = ["https://glacier-api.avax.network"] as const; +export const GetVertexByHeightServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetVertexByHeightGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type GetVertexByHeightRequest = { - /** - * The height of a vertex. - */ - vertexHeight: number; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A primary network blockchain id or alias. - */ - blockchainId: components.XChainId; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; - /** - * 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. - */ - sortOrder?: components.SortOrder | undefined; + /** + * The height of a vertex. + */ + vertexHeight: number; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A primary network blockchain id or alias. + */ + blockchainId: components.XChainId; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; + /** + * 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. + */ + sortOrder?: components.SortOrder | undefined; }; export type GetVertexByHeightResponse = { - result: components.ListXChainVerticesResponse; + result: components.ListXChainVerticesResponse; }; /** @internal */ export const GetVertexByHeightGlobals$inboundSchema: z.ZodType< - GetVertexByHeightGlobals, - z.ZodTypeDef, - unknown + GetVertexByHeightGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type GetVertexByHeightGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const GetVertexByHeightGlobals$outboundSchema: z.ZodType< - GetVertexByHeightGlobals$Outbound, - z.ZodTypeDef, - GetVertexByHeightGlobals + GetVertexByHeightGlobals$Outbound, + z.ZodTypeDef, + GetVertexByHeightGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -74,50 +76,50 @@ export const GetVertexByHeightGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetVertexByHeightGlobals$ { - /** @deprecated use `GetVertexByHeightGlobals$inboundSchema` instead. */ - export const inboundSchema = GetVertexByHeightGlobals$inboundSchema; - /** @deprecated use `GetVertexByHeightGlobals$outboundSchema` instead. */ - export const outboundSchema = GetVertexByHeightGlobals$outboundSchema; - /** @deprecated use `GetVertexByHeightGlobals$Outbound` instead. */ - export type Outbound = GetVertexByHeightGlobals$Outbound; + /** @deprecated use `GetVertexByHeightGlobals$inboundSchema` instead. */ + export const inboundSchema = GetVertexByHeightGlobals$inboundSchema; + /** @deprecated use `GetVertexByHeightGlobals$outboundSchema` instead. */ + export const outboundSchema = GetVertexByHeightGlobals$outboundSchema; + /** @deprecated use `GetVertexByHeightGlobals$Outbound` instead. */ + export type Outbound = GetVertexByHeightGlobals$Outbound; } /** @internal */ export const GetVertexByHeightRequest$inboundSchema: z.ZodType< - GetVertexByHeightRequest, - z.ZodTypeDef, - unknown + GetVertexByHeightRequest, + z.ZodTypeDef, + unknown > = z.object({ - vertexHeight: z.number().int(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - blockchainId: components.XChainId$inboundSchema, - network: components.GlobalParamNetwork$inboundSchema.optional(), - sortOrder: components.SortOrder$inboundSchema.optional(), + vertexHeight: z.number().int(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + blockchainId: components.XChainId$inboundSchema, + network: components.GlobalParamNetwork$inboundSchema.optional(), + sortOrder: components.SortOrder$inboundSchema.optional(), }); /** @internal */ export type GetVertexByHeightRequest$Outbound = { - vertexHeight: number; - pageToken?: string | undefined; - pageSize: number; - blockchainId: string; - network?: string | undefined; - sortOrder?: string | undefined; + vertexHeight: number; + pageToken?: string | undefined; + pageSize: number; + blockchainId: string; + network?: string | undefined; + sortOrder?: string | undefined; }; /** @internal */ export const GetVertexByHeightRequest$outboundSchema: z.ZodType< - GetVertexByHeightRequest$Outbound, - z.ZodTypeDef, - GetVertexByHeightRequest + GetVertexByHeightRequest$Outbound, + z.ZodTypeDef, + GetVertexByHeightRequest > = z.object({ - vertexHeight: z.number().int(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - blockchainId: components.XChainId$outboundSchema, - network: components.GlobalParamNetwork$outboundSchema.optional(), - sortOrder: components.SortOrder$outboundSchema.optional(), + vertexHeight: z.number().int(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + blockchainId: components.XChainId$outboundSchema, + network: components.GlobalParamNetwork$outboundSchema.optional(), + sortOrder: components.SortOrder$outboundSchema.optional(), }); /** @@ -125,58 +127,54 @@ export const GetVertexByHeightRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetVertexByHeightRequest$ { - /** @deprecated use `GetVertexByHeightRequest$inboundSchema` instead. */ - export const inboundSchema = GetVertexByHeightRequest$inboundSchema; - /** @deprecated use `GetVertexByHeightRequest$outboundSchema` instead. */ - export const outboundSchema = GetVertexByHeightRequest$outboundSchema; - /** @deprecated use `GetVertexByHeightRequest$Outbound` instead. */ - export type Outbound = GetVertexByHeightRequest$Outbound; + /** @deprecated use `GetVertexByHeightRequest$inboundSchema` instead. */ + export const inboundSchema = GetVertexByHeightRequest$inboundSchema; + /** @deprecated use `GetVertexByHeightRequest$outboundSchema` instead. */ + export const outboundSchema = GetVertexByHeightRequest$outboundSchema; + /** @deprecated use `GetVertexByHeightRequest$Outbound` instead. */ + export type Outbound = GetVertexByHeightRequest$Outbound; } /** @internal */ export const GetVertexByHeightResponse$inboundSchema: z.ZodType< - GetVertexByHeightResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListXChainVerticesResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + GetVertexByHeightResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListXChainVerticesResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type GetVertexByHeightResponse$Outbound = { - Result: components.ListXChainVerticesResponse$Outbound; + Result: components.ListXChainVerticesResponse$Outbound; }; /** @internal */ export const GetVertexByHeightResponse$outboundSchema: z.ZodType< - GetVertexByHeightResponse$Outbound, - z.ZodTypeDef, - GetVertexByHeightResponse -> = z - .object({ - result: components.ListXChainVerticesResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + GetVertexByHeightResponse$Outbound, + z.ZodTypeDef, + GetVertexByHeightResponse +> = z.object({ + result: components.ListXChainVerticesResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetVertexByHeightResponse$ { - /** @deprecated use `GetVertexByHeightResponse$inboundSchema` instead. */ - export const inboundSchema = GetVertexByHeightResponse$inboundSchema; - /** @deprecated use `GetVertexByHeightResponse$outboundSchema` instead. */ - export const outboundSchema = GetVertexByHeightResponse$outboundSchema; - /** @deprecated use `GetVertexByHeightResponse$Outbound` instead. */ - export type Outbound = GetVertexByHeightResponse$Outbound; + /** @deprecated use `GetVertexByHeightResponse$inboundSchema` instead. */ + export const inboundSchema = GetVertexByHeightResponse$inboundSchema; + /** @deprecated use `GetVertexByHeightResponse$outboundSchema` instead. */ + export const outboundSchema = GetVertexByHeightResponse$outboundSchema; + /** @deprecated use `GetVertexByHeightResponse$Outbound` instead. */ + export type Outbound = GetVertexByHeightResponse$Outbound; } diff --git a/src/models/operations/getwebhook.ts b/src/models/operations/getwebhook.ts index fbfae49..9b5ad63 100644 --- a/src/models/operations/getwebhook.ts +++ b/src/models/operations/getwebhook.ts @@ -4,33 +4,38 @@ import * as z from "zod"; -export const GetWebhookServerList = ["https://glacier-api.avax.network"] as const; +export const GetWebhookServerList = [ + "https://glacier-api.avax.network", +] as const; export type GetWebhookRequest = { - /** - * The webhook identifier. - */ - id: string; + /** + * The webhook identifier. + */ + id: string; }; /** @internal */ -export const GetWebhookRequest$inboundSchema: z.ZodType = - z.object({ - id: z.string(), - }); +export const GetWebhookRequest$inboundSchema: z.ZodType< + GetWebhookRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); /** @internal */ export type GetWebhookRequest$Outbound = { - id: string; + id: string; }; /** @internal */ export const GetWebhookRequest$outboundSchema: z.ZodType< - GetWebhookRequest$Outbound, - z.ZodTypeDef, - GetWebhookRequest + GetWebhookRequest$Outbound, + z.ZodTypeDef, + GetWebhookRequest > = z.object({ - id: z.string(), + id: z.string(), }); /** @@ -38,10 +43,10 @@ export const GetWebhookRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetWebhookRequest$ { - /** @deprecated use `GetWebhookRequest$inboundSchema` instead. */ - export const inboundSchema = GetWebhookRequest$inboundSchema; - /** @deprecated use `GetWebhookRequest$outboundSchema` instead. */ - export const outboundSchema = GetWebhookRequest$outboundSchema; - /** @deprecated use `GetWebhookRequest$Outbound` instead. */ - export type Outbound = GetWebhookRequest$Outbound; + /** @deprecated use `GetWebhookRequest$inboundSchema` instead. */ + export const inboundSchema = GetWebhookRequest$inboundSchema; + /** @deprecated use `GetWebhookRequest$outboundSchema` instead. */ + export const outboundSchema = GetWebhookRequest$outboundSchema; + /** @deprecated use `GetWebhookRequest$Outbound` instead. */ + export type Outbound = GetWebhookRequest$Outbound; } diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index 237fb03..d052d2c 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -34,6 +34,7 @@ export * from "./getsinglevalidatordetails.js"; export * from "./getstakingmetrics.js"; export * from "./getsubnetbyid.js"; export * from "./getteleportermessage.js"; +export * from "./getteleportermetricsbychain.js"; export * from "./gettokendetails.js"; export * from "./gettransaction.js"; export * from "./gettransactionsforblock.js"; @@ -67,6 +68,7 @@ export * from "./listpendingprimarynetworkrewards.js"; export * from "./listprimarynetworkblocksbynodeid.js"; export * from "./listsubnets.js"; export * from "./listteleportermessages.js"; +export * from "./listteleportermessagesbyaddress.js"; export * from "./listtokens.js"; export * from "./listtransactions.js"; export * from "./listtransfers.js"; diff --git a/src/models/operations/listactiveprimarynetworkstakingtransactions.ts b/src/models/operations/listactiveprimarynetworkstakingtransactions.ts index 935ddfb..71434c9 100644 --- a/src/models/operations/listactiveprimarynetworkstakingtransactions.ts +++ b/src/models/operations/listactiveprimarynetworkstakingtransactions.ts @@ -2,106 +2,112 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; export const ListActivePrimaryNetworkStakingTransactionsServerList = [ - "https://glacier-api.avax.network", + "https://glacier-api.avax.network", ] as const; export type ListActivePrimaryNetworkStakingTransactionsGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type ListActivePrimaryNetworkStakingTransactionsRequest = { - /** - * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji". - */ - addresses?: string | undefined; - /** - * Query param for filtering items based on transaction types. - */ - txTypes?: Array | undefined; - /** - * Query param for retrieving items after a specific timestamp. - */ - startTimestamp?: number | undefined; - /** - * Query param for retrieving items before a specific timestamp. - */ - endTimestamp?: number | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A primary network blockchain id or alias. - */ - blockchainId: components.PChainId; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; - /** - * 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. - */ - sortOrder?: components.SortOrder | undefined; + /** + * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji". + */ + addresses?: string | undefined; + /** + * Query param for filtering items based on transaction types. + */ + txTypes?: Array | undefined; + /** + * Query param for retrieving items after a specific timestamp. + */ + startTimestamp?: number | undefined; + /** + * Query param for retrieving items before a specific timestamp. + */ + endTimestamp?: number | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A primary network blockchain id or alias. + */ + blockchainId: components.PChainId; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; + /** + * 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. + */ + sortOrder?: components.SortOrder | undefined; }; export type ListActivePrimaryNetworkStakingTransactionsResponse = { - result: components.ListPChainTransactionsResponse; + result: components.ListPChainTransactionsResponse; }; /** @internal */ -export const ListActivePrimaryNetworkStakingTransactionsGlobals$inboundSchema: z.ZodType< +export const ListActivePrimaryNetworkStakingTransactionsGlobals$inboundSchema: + z.ZodType< ListActivePrimaryNetworkStakingTransactionsGlobals, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ network: components.GlobalParamNetwork$inboundSchema.optional(), -}); + }); /** @internal */ export type ListActivePrimaryNetworkStakingTransactionsGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ -export const ListActivePrimaryNetworkStakingTransactionsGlobals$outboundSchema: z.ZodType< +export const ListActivePrimaryNetworkStakingTransactionsGlobals$outboundSchema: + z.ZodType< ListActivePrimaryNetworkStakingTransactionsGlobals$Outbound, z.ZodTypeDef, ListActivePrimaryNetworkStakingTransactionsGlobals -> = z.object({ + > = z.object({ network: components.GlobalParamNetwork$outboundSchema.optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListActivePrimaryNetworkStakingTransactionsGlobals$ { - /** @deprecated use `ListActivePrimaryNetworkStakingTransactionsGlobals$inboundSchema` instead. */ - export const inboundSchema = ListActivePrimaryNetworkStakingTransactionsGlobals$inboundSchema; - /** @deprecated use `ListActivePrimaryNetworkStakingTransactionsGlobals$outboundSchema` instead. */ - export const outboundSchema = ListActivePrimaryNetworkStakingTransactionsGlobals$outboundSchema; - /** @deprecated use `ListActivePrimaryNetworkStakingTransactionsGlobals$Outbound` instead. */ - export type Outbound = ListActivePrimaryNetworkStakingTransactionsGlobals$Outbound; + /** @deprecated use `ListActivePrimaryNetworkStakingTransactionsGlobals$inboundSchema` instead. */ + export const inboundSchema = + ListActivePrimaryNetworkStakingTransactionsGlobals$inboundSchema; + /** @deprecated use `ListActivePrimaryNetworkStakingTransactionsGlobals$outboundSchema` instead. */ + export const outboundSchema = + ListActivePrimaryNetworkStakingTransactionsGlobals$outboundSchema; + /** @deprecated use `ListActivePrimaryNetworkStakingTransactionsGlobals$Outbound` instead. */ + export type Outbound = + ListActivePrimaryNetworkStakingTransactionsGlobals$Outbound; } /** @internal */ -export const ListActivePrimaryNetworkStakingTransactionsRequest$inboundSchema: z.ZodType< +export const ListActivePrimaryNetworkStakingTransactionsRequest$inboundSchema: + z.ZodType< ListActivePrimaryNetworkStakingTransactionsRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ addresses: z.string().optional(), txTypes: z.array(components.PrimaryNetworkTxType$inboundSchema).optional(), startTimestamp: z.number().int().optional(), @@ -111,27 +117,28 @@ export const ListActivePrimaryNetworkStakingTransactionsRequest$inboundSchema: z blockchainId: components.PChainId$inboundSchema, network: components.GlobalParamNetwork$inboundSchema.optional(), sortOrder: components.SortOrder$inboundSchema.optional(), -}); + }); /** @internal */ export type ListActivePrimaryNetworkStakingTransactionsRequest$Outbound = { - addresses?: string | undefined; - txTypes?: Array | undefined; - startTimestamp?: number | undefined; - endTimestamp?: number | undefined; - pageToken?: string | undefined; - pageSize: number; - blockchainId: string; - network?: string | undefined; - sortOrder?: string | undefined; + addresses?: string | undefined; + txTypes?: Array | undefined; + startTimestamp?: number | undefined; + endTimestamp?: number | undefined; + pageToken?: string | undefined; + pageSize: number; + blockchainId: string; + network?: string | undefined; + sortOrder?: string | undefined; }; /** @internal */ -export const ListActivePrimaryNetworkStakingTransactionsRequest$outboundSchema: z.ZodType< +export const ListActivePrimaryNetworkStakingTransactionsRequest$outboundSchema: + z.ZodType< ListActivePrimaryNetworkStakingTransactionsRequest$Outbound, z.ZodTypeDef, ListActivePrimaryNetworkStakingTransactionsRequest -> = z.object({ + > = z.object({ addresses: z.string().optional(), txTypes: z.array(components.PrimaryNetworkTxType$outboundSchema).optional(), startTimestamp: z.number().int().optional(), @@ -141,66 +148,69 @@ export const ListActivePrimaryNetworkStakingTransactionsRequest$outboundSchema: blockchainId: components.PChainId$outboundSchema, network: components.GlobalParamNetwork$outboundSchema.optional(), sortOrder: components.SortOrder$outboundSchema.optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListActivePrimaryNetworkStakingTransactionsRequest$ { - /** @deprecated use `ListActivePrimaryNetworkStakingTransactionsRequest$inboundSchema` instead. */ - export const inboundSchema = ListActivePrimaryNetworkStakingTransactionsRequest$inboundSchema; - /** @deprecated use `ListActivePrimaryNetworkStakingTransactionsRequest$outboundSchema` instead. */ - export const outboundSchema = ListActivePrimaryNetworkStakingTransactionsRequest$outboundSchema; - /** @deprecated use `ListActivePrimaryNetworkStakingTransactionsRequest$Outbound` instead. */ - export type Outbound = ListActivePrimaryNetworkStakingTransactionsRequest$Outbound; + /** @deprecated use `ListActivePrimaryNetworkStakingTransactionsRequest$inboundSchema` instead. */ + export const inboundSchema = + ListActivePrimaryNetworkStakingTransactionsRequest$inboundSchema; + /** @deprecated use `ListActivePrimaryNetworkStakingTransactionsRequest$outboundSchema` instead. */ + export const outboundSchema = + ListActivePrimaryNetworkStakingTransactionsRequest$outboundSchema; + /** @deprecated use `ListActivePrimaryNetworkStakingTransactionsRequest$Outbound` instead. */ + export type Outbound = + ListActivePrimaryNetworkStakingTransactionsRequest$Outbound; } /** @internal */ -export const ListActivePrimaryNetworkStakingTransactionsResponse$inboundSchema: z.ZodType< +export const ListActivePrimaryNetworkStakingTransactionsResponse$inboundSchema: + z.ZodType< ListActivePrimaryNetworkStakingTransactionsResponse, z.ZodTypeDef, unknown -> = z - .object({ - Result: components.ListPChainTransactionsResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); + > = z.object({ + Result: components.ListPChainTransactionsResponse$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Result": "result", }); + }); /** @internal */ export type ListActivePrimaryNetworkStakingTransactionsResponse$Outbound = { - Result: components.ListPChainTransactionsResponse$Outbound; + Result: components.ListPChainTransactionsResponse$Outbound; }; /** @internal */ -export const ListActivePrimaryNetworkStakingTransactionsResponse$outboundSchema: z.ZodType< +export const ListActivePrimaryNetworkStakingTransactionsResponse$outboundSchema: + z.ZodType< ListActivePrimaryNetworkStakingTransactionsResponse$Outbound, z.ZodTypeDef, ListActivePrimaryNetworkStakingTransactionsResponse -> = z - .object({ - result: components.ListPChainTransactionsResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); + > = z.object({ + result: components.ListPChainTransactionsResponse$outboundSchema, + }).transform((v) => { + return remap$(v, { + result: "Result", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListActivePrimaryNetworkStakingTransactionsResponse$ { - /** @deprecated use `ListActivePrimaryNetworkStakingTransactionsResponse$inboundSchema` instead. */ - export const inboundSchema = ListActivePrimaryNetworkStakingTransactionsResponse$inboundSchema; - /** @deprecated use `ListActivePrimaryNetworkStakingTransactionsResponse$outboundSchema` instead. */ - export const outboundSchema = - ListActivePrimaryNetworkStakingTransactionsResponse$outboundSchema; - /** @deprecated use `ListActivePrimaryNetworkStakingTransactionsResponse$Outbound` instead. */ - export type Outbound = ListActivePrimaryNetworkStakingTransactionsResponse$Outbound; + /** @deprecated use `ListActivePrimaryNetworkStakingTransactionsResponse$inboundSchema` instead. */ + export const inboundSchema = + ListActivePrimaryNetworkStakingTransactionsResponse$inboundSchema; + /** @deprecated use `ListActivePrimaryNetworkStakingTransactionsResponse$outboundSchema` instead. */ + export const outboundSchema = + ListActivePrimaryNetworkStakingTransactionsResponse$outboundSchema; + /** @deprecated use `ListActivePrimaryNetworkStakingTransactionsResponse$Outbound` instead. */ + export type Outbound = + ListActivePrimaryNetworkStakingTransactionsResponse$Outbound; } diff --git a/src/models/operations/listassettransactions.ts b/src/models/operations/listassettransactions.ts index 507a6fd..8ce7b21 100644 --- a/src/models/operations/listassettransactions.ts +++ b/src/models/operations/listassettransactions.ts @@ -2,79 +2,81 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListAssetTransactionsServerList = ["https://glacier-api.avax.network"] as const; +export const ListAssetTransactionsServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListAssetTransactionsGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type ListAssetTransactionsRequest = { - /** - * Query param for filtering items based on transaction types. - */ - txTypes?: Array | undefined; - /** - * Query param for retrieving items after a specific timestamp. - */ - startTimestamp?: number | undefined; - /** - * Query param for retrieving items before a specific timestamp. - */ - endTimestamp?: number | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A primary network blockchain id or alias. - */ - blockchainId: components.XChainId; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; - /** - * Asset ID for any asset on X-Chain - */ - assetId: string; + /** + * Query param for filtering items based on transaction types. + */ + txTypes?: Array | undefined; + /** + * Query param for retrieving items after a specific timestamp. + */ + startTimestamp?: number | undefined; + /** + * Query param for retrieving items before a specific timestamp. + */ + endTimestamp?: number | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A primary network blockchain id or alias. + */ + blockchainId: components.XChainId; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; + /** + * Asset ID for any asset on X-Chain + */ + assetId: string; }; export type ListAssetTransactionsResponse = { - result: components.ListXChainTransactionsResponse; + result: components.ListXChainTransactionsResponse; }; /** @internal */ export const ListAssetTransactionsGlobals$inboundSchema: z.ZodType< - ListAssetTransactionsGlobals, - z.ZodTypeDef, - unknown + ListAssetTransactionsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type ListAssetTransactionsGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const ListAssetTransactionsGlobals$outboundSchema: z.ZodType< - ListAssetTransactionsGlobals$Outbound, - z.ZodTypeDef, - ListAssetTransactionsGlobals + ListAssetTransactionsGlobals$Outbound, + z.ZodTypeDef, + ListAssetTransactionsGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -82,56 +84,56 @@ export const ListAssetTransactionsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListAssetTransactionsGlobals$ { - /** @deprecated use `ListAssetTransactionsGlobals$inboundSchema` instead. */ - export const inboundSchema = ListAssetTransactionsGlobals$inboundSchema; - /** @deprecated use `ListAssetTransactionsGlobals$outboundSchema` instead. */ - export const outboundSchema = ListAssetTransactionsGlobals$outboundSchema; - /** @deprecated use `ListAssetTransactionsGlobals$Outbound` instead. */ - export type Outbound = ListAssetTransactionsGlobals$Outbound; + /** @deprecated use `ListAssetTransactionsGlobals$inboundSchema` instead. */ + export const inboundSchema = ListAssetTransactionsGlobals$inboundSchema; + /** @deprecated use `ListAssetTransactionsGlobals$outboundSchema` instead. */ + export const outboundSchema = ListAssetTransactionsGlobals$outboundSchema; + /** @deprecated use `ListAssetTransactionsGlobals$Outbound` instead. */ + export type Outbound = ListAssetTransactionsGlobals$Outbound; } /** @internal */ export const ListAssetTransactionsRequest$inboundSchema: z.ZodType< - ListAssetTransactionsRequest, - z.ZodTypeDef, - unknown + ListAssetTransactionsRequest, + z.ZodTypeDef, + unknown > = z.object({ - txTypes: z.array(components.PrimaryNetworkTxType$inboundSchema).optional(), - startTimestamp: z.number().int().optional(), - endTimestamp: z.number().int().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - blockchainId: components.XChainId$inboundSchema, - network: components.GlobalParamNetwork$inboundSchema.optional(), - assetId: z.string(), + txTypes: z.array(components.PrimaryNetworkTxType$inboundSchema).optional(), + startTimestamp: z.number().int().optional(), + endTimestamp: z.number().int().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + blockchainId: components.XChainId$inboundSchema, + network: components.GlobalParamNetwork$inboundSchema.optional(), + assetId: z.string(), }); /** @internal */ export type ListAssetTransactionsRequest$Outbound = { - txTypes?: Array | undefined; - startTimestamp?: number | undefined; - endTimestamp?: number | undefined; - pageToken?: string | undefined; - pageSize: number; - blockchainId: string; - network?: string | undefined; - assetId: string; + txTypes?: Array | undefined; + startTimestamp?: number | undefined; + endTimestamp?: number | undefined; + pageToken?: string | undefined; + pageSize: number; + blockchainId: string; + network?: string | undefined; + assetId: string; }; /** @internal */ export const ListAssetTransactionsRequest$outboundSchema: z.ZodType< - ListAssetTransactionsRequest$Outbound, - z.ZodTypeDef, - ListAssetTransactionsRequest + ListAssetTransactionsRequest$Outbound, + z.ZodTypeDef, + ListAssetTransactionsRequest > = z.object({ - txTypes: z.array(components.PrimaryNetworkTxType$outboundSchema).optional(), - startTimestamp: z.number().int().optional(), - endTimestamp: z.number().int().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - blockchainId: components.XChainId$outboundSchema, - network: components.GlobalParamNetwork$outboundSchema.optional(), - assetId: z.string(), + txTypes: z.array(components.PrimaryNetworkTxType$outboundSchema).optional(), + startTimestamp: z.number().int().optional(), + endTimestamp: z.number().int().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + blockchainId: components.XChainId$outboundSchema, + network: components.GlobalParamNetwork$outboundSchema.optional(), + assetId: z.string(), }); /** @@ -139,58 +141,54 @@ export const ListAssetTransactionsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListAssetTransactionsRequest$ { - /** @deprecated use `ListAssetTransactionsRequest$inboundSchema` instead. */ - export const inboundSchema = ListAssetTransactionsRequest$inboundSchema; - /** @deprecated use `ListAssetTransactionsRequest$outboundSchema` instead. */ - export const outboundSchema = ListAssetTransactionsRequest$outboundSchema; - /** @deprecated use `ListAssetTransactionsRequest$Outbound` instead. */ - export type Outbound = ListAssetTransactionsRequest$Outbound; + /** @deprecated use `ListAssetTransactionsRequest$inboundSchema` instead. */ + export const inboundSchema = ListAssetTransactionsRequest$inboundSchema; + /** @deprecated use `ListAssetTransactionsRequest$outboundSchema` instead. */ + export const outboundSchema = ListAssetTransactionsRequest$outboundSchema; + /** @deprecated use `ListAssetTransactionsRequest$Outbound` instead. */ + export type Outbound = ListAssetTransactionsRequest$Outbound; } /** @internal */ export const ListAssetTransactionsResponse$inboundSchema: z.ZodType< - ListAssetTransactionsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListXChainTransactionsResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListAssetTransactionsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListXChainTransactionsResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListAssetTransactionsResponse$Outbound = { - Result: components.ListXChainTransactionsResponse$Outbound; + Result: components.ListXChainTransactionsResponse$Outbound; }; /** @internal */ export const ListAssetTransactionsResponse$outboundSchema: z.ZodType< - ListAssetTransactionsResponse$Outbound, - z.ZodTypeDef, - ListAssetTransactionsResponse -> = z - .object({ - result: components.ListXChainTransactionsResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListAssetTransactionsResponse$Outbound, + z.ZodTypeDef, + ListAssetTransactionsResponse +> = z.object({ + result: components.ListXChainTransactionsResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListAssetTransactionsResponse$ { - /** @deprecated use `ListAssetTransactionsResponse$inboundSchema` instead. */ - export const inboundSchema = ListAssetTransactionsResponse$inboundSchema; - /** @deprecated use `ListAssetTransactionsResponse$outboundSchema` instead. */ - export const outboundSchema = ListAssetTransactionsResponse$outboundSchema; - /** @deprecated use `ListAssetTransactionsResponse$Outbound` instead. */ - export type Outbound = ListAssetTransactionsResponse$Outbound; + /** @deprecated use `ListAssetTransactionsResponse$inboundSchema` instead. */ + export const inboundSchema = ListAssetTransactionsResponse$inboundSchema; + /** @deprecated use `ListAssetTransactionsResponse$outboundSchema` instead. */ + export const outboundSchema = ListAssetTransactionsResponse$outboundSchema; + /** @deprecated use `ListAssetTransactionsResponse$Outbound` instead. */ + export type Outbound = ListAssetTransactionsResponse$Outbound; } diff --git a/src/models/operations/listblockchains.ts b/src/models/operations/listblockchains.ts index a8cf13e..9f2f50d 100644 --- a/src/models/operations/listblockchains.ts +++ b/src/models/operations/listblockchains.ts @@ -2,63 +2,65 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListBlockchainsServerList = ["https://glacier-api.avax.network"] as const; +export const ListBlockchainsServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListBlockchainsGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type ListBlockchainsRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; - /** - * 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. - */ - sortOrder?: components.SortOrder | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; + /** + * 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. + */ + sortOrder?: components.SortOrder | undefined; }; export type ListBlockchainsResponse = { - result: components.ListBlockchainsResponse; + result: components.ListBlockchainsResponse; }; /** @internal */ export const ListBlockchainsGlobals$inboundSchema: z.ZodType< - ListBlockchainsGlobals, - z.ZodTypeDef, - unknown + ListBlockchainsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type ListBlockchainsGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const ListBlockchainsGlobals$outboundSchema: z.ZodType< - ListBlockchainsGlobals$Outbound, - z.ZodTypeDef, - ListBlockchainsGlobals + ListBlockchainsGlobals$Outbound, + z.ZodTypeDef, + ListBlockchainsGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -66,44 +68,44 @@ export const ListBlockchainsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListBlockchainsGlobals$ { - /** @deprecated use `ListBlockchainsGlobals$inboundSchema` instead. */ - export const inboundSchema = ListBlockchainsGlobals$inboundSchema; - /** @deprecated use `ListBlockchainsGlobals$outboundSchema` instead. */ - export const outboundSchema = ListBlockchainsGlobals$outboundSchema; - /** @deprecated use `ListBlockchainsGlobals$Outbound` instead. */ - export type Outbound = ListBlockchainsGlobals$Outbound; + /** @deprecated use `ListBlockchainsGlobals$inboundSchema` instead. */ + export const inboundSchema = ListBlockchainsGlobals$inboundSchema; + /** @deprecated use `ListBlockchainsGlobals$outboundSchema` instead. */ + export const outboundSchema = ListBlockchainsGlobals$outboundSchema; + /** @deprecated use `ListBlockchainsGlobals$Outbound` instead. */ + export type Outbound = ListBlockchainsGlobals$Outbound; } /** @internal */ export const ListBlockchainsRequest$inboundSchema: z.ZodType< - ListBlockchainsRequest, - z.ZodTypeDef, - unknown + ListBlockchainsRequest, + z.ZodTypeDef, + unknown > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - network: components.GlobalParamNetwork$inboundSchema.optional(), - sortOrder: components.SortOrder$inboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + network: components.GlobalParamNetwork$inboundSchema.optional(), + sortOrder: components.SortOrder$inboundSchema.optional(), }); /** @internal */ export type ListBlockchainsRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - network?: string | undefined; - sortOrder?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + network?: string | undefined; + sortOrder?: string | undefined; }; /** @internal */ export const ListBlockchainsRequest$outboundSchema: z.ZodType< - ListBlockchainsRequest$Outbound, - z.ZodTypeDef, - ListBlockchainsRequest + ListBlockchainsRequest$Outbound, + z.ZodTypeDef, + ListBlockchainsRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - network: components.GlobalParamNetwork$outboundSchema.optional(), - sortOrder: components.SortOrder$outboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + network: components.GlobalParamNetwork$outboundSchema.optional(), + sortOrder: components.SortOrder$outboundSchema.optional(), }); /** @@ -111,58 +113,54 @@ export const ListBlockchainsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListBlockchainsRequest$ { - /** @deprecated use `ListBlockchainsRequest$inboundSchema` instead. */ - export const inboundSchema = ListBlockchainsRequest$inboundSchema; - /** @deprecated use `ListBlockchainsRequest$outboundSchema` instead. */ - export const outboundSchema = ListBlockchainsRequest$outboundSchema; - /** @deprecated use `ListBlockchainsRequest$Outbound` instead. */ - export type Outbound = ListBlockchainsRequest$Outbound; + /** @deprecated use `ListBlockchainsRequest$inboundSchema` instead. */ + export const inboundSchema = ListBlockchainsRequest$inboundSchema; + /** @deprecated use `ListBlockchainsRequest$outboundSchema` instead. */ + export const outboundSchema = ListBlockchainsRequest$outboundSchema; + /** @deprecated use `ListBlockchainsRequest$Outbound` instead. */ + export type Outbound = ListBlockchainsRequest$Outbound; } /** @internal */ export const ListBlockchainsResponse$inboundSchema: z.ZodType< - ListBlockchainsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListBlockchainsResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListBlockchainsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListBlockchainsResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListBlockchainsResponse$Outbound = { - Result: components.ListBlockchainsResponse$Outbound; + Result: components.ListBlockchainsResponse$Outbound; }; /** @internal */ export const ListBlockchainsResponse$outboundSchema: z.ZodType< - ListBlockchainsResponse$Outbound, - z.ZodTypeDef, - ListBlockchainsResponse -> = z - .object({ - result: components.ListBlockchainsResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListBlockchainsResponse$Outbound, + z.ZodTypeDef, + ListBlockchainsResponse +> = z.object({ + result: components.ListBlockchainsResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListBlockchainsResponse$ { - /** @deprecated use `ListBlockchainsResponse$inboundSchema` instead. */ - export const inboundSchema = ListBlockchainsResponse$inboundSchema; - /** @deprecated use `ListBlockchainsResponse$outboundSchema` instead. */ - export const outboundSchema = ListBlockchainsResponse$outboundSchema; - /** @deprecated use `ListBlockchainsResponse$Outbound` instead. */ - export type Outbound = ListBlockchainsResponse$Outbound; + /** @deprecated use `ListBlockchainsResponse$inboundSchema` instead. */ + export const inboundSchema = ListBlockchainsResponse$inboundSchema; + /** @deprecated use `ListBlockchainsResponse$outboundSchema` instead. */ + export const outboundSchema = ListBlockchainsResponse$outboundSchema; + /** @deprecated use `ListBlockchainsResponse$Outbound` instead. */ + export type Outbound = ListBlockchainsResponse$Outbound; } diff --git a/src/models/operations/listchains.ts b/src/models/operations/listchains.ts index 1c7c43d..4396f81 100644 --- a/src/models/operations/listchains.ts +++ b/src/models/operations/listchains.ts @@ -2,48 +2,53 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListChainsServerList = ["https://popsicle-api.avax.network"] as const; +export const ListChainsServerList = [ + "https://metrics.avax.network", +] as const; export type ListChainsRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * mainnet or testnet. - */ - network?: components.NetworkType | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * mainnet or testnet. + */ + network?: components.NetworkType | undefined; }; export type ListChainsResponse = { - result: components.MetricsListChainsResponse; + result: components.MetricsListChainsResponse; }; /** @internal */ -export const ListChainsRequest$inboundSchema: z.ZodType = - z.object({ - pageToken: z.string().optional(), - network: components.NetworkType$inboundSchema.optional(), - }); +export const ListChainsRequest$inboundSchema: z.ZodType< + ListChainsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + pageToken: z.string().optional(), + network: components.NetworkType$inboundSchema.optional(), +}); /** @internal */ export type ListChainsRequest$Outbound = { - pageToken?: string | undefined; - network?: string | undefined; + pageToken?: string | undefined; + network?: string | undefined; }; /** @internal */ export const ListChainsRequest$outboundSchema: z.ZodType< - ListChainsRequest$Outbound, - z.ZodTypeDef, - ListChainsRequest + ListChainsRequest$Outbound, + z.ZodTypeDef, + ListChainsRequest > = z.object({ - pageToken: z.string().optional(), - network: components.NetworkType$outboundSchema.optional(), + pageToken: z.string().optional(), + network: components.NetworkType$outboundSchema.optional(), }); /** @@ -51,58 +56,54 @@ export const ListChainsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListChainsRequest$ { - /** @deprecated use `ListChainsRequest$inboundSchema` instead. */ - export const inboundSchema = ListChainsRequest$inboundSchema; - /** @deprecated use `ListChainsRequest$outboundSchema` instead. */ - export const outboundSchema = ListChainsRequest$outboundSchema; - /** @deprecated use `ListChainsRequest$Outbound` instead. */ - export type Outbound = ListChainsRequest$Outbound; + /** @deprecated use `ListChainsRequest$inboundSchema` instead. */ + export const inboundSchema = ListChainsRequest$inboundSchema; + /** @deprecated use `ListChainsRequest$outboundSchema` instead. */ + export const outboundSchema = ListChainsRequest$outboundSchema; + /** @deprecated use `ListChainsRequest$Outbound` instead. */ + export type Outbound = ListChainsRequest$Outbound; } /** @internal */ export const ListChainsResponse$inboundSchema: z.ZodType< - ListChainsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.MetricsListChainsResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListChainsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.MetricsListChainsResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListChainsResponse$Outbound = { - Result: components.MetricsListChainsResponse$Outbound; + Result: components.MetricsListChainsResponse$Outbound; }; /** @internal */ export const ListChainsResponse$outboundSchema: z.ZodType< - ListChainsResponse$Outbound, - z.ZodTypeDef, - ListChainsResponse -> = z - .object({ - result: components.MetricsListChainsResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListChainsResponse$Outbound, + z.ZodTypeDef, + ListChainsResponse +> = z.object({ + result: components.MetricsListChainsResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListChainsResponse$ { - /** @deprecated use `ListChainsResponse$inboundSchema` instead. */ - export const inboundSchema = ListChainsResponse$inboundSchema; - /** @deprecated use `ListChainsResponse$outboundSchema` instead. */ - export const outboundSchema = ListChainsResponse$outboundSchema; - /** @deprecated use `ListChainsResponse$Outbound` instead. */ - export type Outbound = ListChainsResponse$Outbound; + /** @deprecated use `ListChainsResponse$inboundSchema` instead. */ + export const inboundSchema = ListChainsResponse$inboundSchema; + /** @deprecated use `ListChainsResponse$outboundSchema` instead. */ + export const outboundSchema = ListChainsResponse$outboundSchema; + /** @deprecated use `ListChainsResponse$Outbound` instead. */ + export type Outbound = ListChainsResponse$Outbound; } diff --git a/src/models/operations/listcollectiblebalances.ts b/src/models/operations/listcollectiblebalances.ts index 862e555..342fe0b 100644 --- a/src/models/operations/listcollectiblebalances.ts +++ b/src/models/operations/listcollectiblebalances.ts @@ -2,67 +2,69 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListCollectibleBalancesServerList = ["https://glacier-api.avax.network"] as const; +export const ListCollectibleBalancesServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListCollectibleBalancesGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type ListCollectibleBalancesRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * A wallet address. - */ - address: string; - /** - * A contract addresses to filter by. - */ - contractAddress?: string | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * A wallet address. + */ + address: string; + /** + * A contract addresses to filter by. + */ + contractAddress?: string | undefined; }; export type ListCollectibleBalancesResponse = { - result: components.ListCollectibleBalancesResponse; + result: components.ListCollectibleBalancesResponse; }; /** @internal */ export const ListCollectibleBalancesGlobals$inboundSchema: z.ZodType< - ListCollectibleBalancesGlobals, - z.ZodTypeDef, - unknown + ListCollectibleBalancesGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type ListCollectibleBalancesGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const ListCollectibleBalancesGlobals$outboundSchema: z.ZodType< - ListCollectibleBalancesGlobals$Outbound, - z.ZodTypeDef, - ListCollectibleBalancesGlobals + ListCollectibleBalancesGlobals$Outbound, + z.ZodTypeDef, + ListCollectibleBalancesGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -70,47 +72,47 @@ export const ListCollectibleBalancesGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListCollectibleBalancesGlobals$ { - /** @deprecated use `ListCollectibleBalancesGlobals$inboundSchema` instead. */ - export const inboundSchema = ListCollectibleBalancesGlobals$inboundSchema; - /** @deprecated use `ListCollectibleBalancesGlobals$outboundSchema` instead. */ - export const outboundSchema = ListCollectibleBalancesGlobals$outboundSchema; - /** @deprecated use `ListCollectibleBalancesGlobals$Outbound` instead. */ - export type Outbound = ListCollectibleBalancesGlobals$Outbound; + /** @deprecated use `ListCollectibleBalancesGlobals$inboundSchema` instead. */ + export const inboundSchema = ListCollectibleBalancesGlobals$inboundSchema; + /** @deprecated use `ListCollectibleBalancesGlobals$outboundSchema` instead. */ + export const outboundSchema = ListCollectibleBalancesGlobals$outboundSchema; + /** @deprecated use `ListCollectibleBalancesGlobals$Outbound` instead. */ + export type Outbound = ListCollectibleBalancesGlobals$Outbound; } /** @internal */ export const ListCollectibleBalancesRequest$inboundSchema: z.ZodType< - ListCollectibleBalancesRequest, - z.ZodTypeDef, - unknown + ListCollectibleBalancesRequest, + z.ZodTypeDef, + unknown > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), - contractAddress: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), + contractAddress: z.string().optional(), }); /** @internal */ export type ListCollectibleBalancesRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - chainId?: string | undefined; - address: string; - contractAddress?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + chainId?: string | undefined; + address: string; + contractAddress?: string | undefined; }; /** @internal */ export const ListCollectibleBalancesRequest$outboundSchema: z.ZodType< - ListCollectibleBalancesRequest$Outbound, - z.ZodTypeDef, - ListCollectibleBalancesRequest + ListCollectibleBalancesRequest$Outbound, + z.ZodTypeDef, + ListCollectibleBalancesRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), - contractAddress: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), + contractAddress: z.string().optional(), }); /** @@ -118,58 +120,54 @@ export const ListCollectibleBalancesRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListCollectibleBalancesRequest$ { - /** @deprecated use `ListCollectibleBalancesRequest$inboundSchema` instead. */ - export const inboundSchema = ListCollectibleBalancesRequest$inboundSchema; - /** @deprecated use `ListCollectibleBalancesRequest$outboundSchema` instead. */ - export const outboundSchema = ListCollectibleBalancesRequest$outboundSchema; - /** @deprecated use `ListCollectibleBalancesRequest$Outbound` instead. */ - export type Outbound = ListCollectibleBalancesRequest$Outbound; + /** @deprecated use `ListCollectibleBalancesRequest$inboundSchema` instead. */ + export const inboundSchema = ListCollectibleBalancesRequest$inboundSchema; + /** @deprecated use `ListCollectibleBalancesRequest$outboundSchema` instead. */ + export const outboundSchema = ListCollectibleBalancesRequest$outboundSchema; + /** @deprecated use `ListCollectibleBalancesRequest$Outbound` instead. */ + export type Outbound = ListCollectibleBalancesRequest$Outbound; } /** @internal */ export const ListCollectibleBalancesResponse$inboundSchema: z.ZodType< - ListCollectibleBalancesResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListCollectibleBalancesResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListCollectibleBalancesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListCollectibleBalancesResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListCollectibleBalancesResponse$Outbound = { - Result: components.ListCollectibleBalancesResponse$Outbound; + Result: components.ListCollectibleBalancesResponse$Outbound; }; /** @internal */ export const ListCollectibleBalancesResponse$outboundSchema: z.ZodType< - ListCollectibleBalancesResponse$Outbound, - z.ZodTypeDef, - ListCollectibleBalancesResponse -> = z - .object({ - result: components.ListCollectibleBalancesResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListCollectibleBalancesResponse$Outbound, + z.ZodTypeDef, + ListCollectibleBalancesResponse +> = z.object({ + result: components.ListCollectibleBalancesResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListCollectibleBalancesResponse$ { - /** @deprecated use `ListCollectibleBalancesResponse$inboundSchema` instead. */ - export const inboundSchema = ListCollectibleBalancesResponse$inboundSchema; - /** @deprecated use `ListCollectibleBalancesResponse$outboundSchema` instead. */ - export const outboundSchema = ListCollectibleBalancesResponse$outboundSchema; - /** @deprecated use `ListCollectibleBalancesResponse$Outbound` instead. */ - export type Outbound = ListCollectibleBalancesResponse$Outbound; + /** @deprecated use `ListCollectibleBalancesResponse$inboundSchema` instead. */ + export const inboundSchema = ListCollectibleBalancesResponse$inboundSchema; + /** @deprecated use `ListCollectibleBalancesResponse$outboundSchema` instead. */ + export const outboundSchema = ListCollectibleBalancesResponse$outboundSchema; + /** @deprecated use `ListCollectibleBalancesResponse$Outbound` instead. */ + export type Outbound = ListCollectibleBalancesResponse$Outbound; } diff --git a/src/models/operations/listcontractdeployments.ts b/src/models/operations/listcontractdeployments.ts index 22873c6..262b10a 100644 --- a/src/models/operations/listcontractdeployments.ts +++ b/src/models/operations/listcontractdeployments.ts @@ -2,63 +2,65 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListContractDeploymentsServerList = ["https://glacier-api.avax.network"] as const; +export const ListContractDeploymentsServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListContractDeploymentsGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type ListContractDeploymentsRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * A wallet address. - */ - address: string; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * A wallet address. + */ + address: string; }; export type ListContractDeploymentsResponse = { - result: components.ListContractsResponse; + result: components.ListContractsResponse; }; /** @internal */ export const ListContractDeploymentsGlobals$inboundSchema: z.ZodType< - ListContractDeploymentsGlobals, - z.ZodTypeDef, - unknown + ListContractDeploymentsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type ListContractDeploymentsGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const ListContractDeploymentsGlobals$outboundSchema: z.ZodType< - ListContractDeploymentsGlobals$Outbound, - z.ZodTypeDef, - ListContractDeploymentsGlobals + ListContractDeploymentsGlobals$Outbound, + z.ZodTypeDef, + ListContractDeploymentsGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -66,44 +68,44 @@ export const ListContractDeploymentsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListContractDeploymentsGlobals$ { - /** @deprecated use `ListContractDeploymentsGlobals$inboundSchema` instead. */ - export const inboundSchema = ListContractDeploymentsGlobals$inboundSchema; - /** @deprecated use `ListContractDeploymentsGlobals$outboundSchema` instead. */ - export const outboundSchema = ListContractDeploymentsGlobals$outboundSchema; - /** @deprecated use `ListContractDeploymentsGlobals$Outbound` instead. */ - export type Outbound = ListContractDeploymentsGlobals$Outbound; + /** @deprecated use `ListContractDeploymentsGlobals$inboundSchema` instead. */ + export const inboundSchema = ListContractDeploymentsGlobals$inboundSchema; + /** @deprecated use `ListContractDeploymentsGlobals$outboundSchema` instead. */ + export const outboundSchema = ListContractDeploymentsGlobals$outboundSchema; + /** @deprecated use `ListContractDeploymentsGlobals$Outbound` instead. */ + export type Outbound = ListContractDeploymentsGlobals$Outbound; } /** @internal */ export const ListContractDeploymentsRequest$inboundSchema: z.ZodType< - ListContractDeploymentsRequest, - z.ZodTypeDef, - unknown + ListContractDeploymentsRequest, + z.ZodTypeDef, + unknown > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), }); /** @internal */ export type ListContractDeploymentsRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - chainId?: string | undefined; - address: string; + pageToken?: string | undefined; + pageSize: number; + chainId?: string | undefined; + address: string; }; /** @internal */ export const ListContractDeploymentsRequest$outboundSchema: z.ZodType< - ListContractDeploymentsRequest$Outbound, - z.ZodTypeDef, - ListContractDeploymentsRequest + ListContractDeploymentsRequest$Outbound, + z.ZodTypeDef, + ListContractDeploymentsRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), }); /** @@ -111,58 +113,54 @@ export const ListContractDeploymentsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListContractDeploymentsRequest$ { - /** @deprecated use `ListContractDeploymentsRequest$inboundSchema` instead. */ - export const inboundSchema = ListContractDeploymentsRequest$inboundSchema; - /** @deprecated use `ListContractDeploymentsRequest$outboundSchema` instead. */ - export const outboundSchema = ListContractDeploymentsRequest$outboundSchema; - /** @deprecated use `ListContractDeploymentsRequest$Outbound` instead. */ - export type Outbound = ListContractDeploymentsRequest$Outbound; + /** @deprecated use `ListContractDeploymentsRequest$inboundSchema` instead. */ + export const inboundSchema = ListContractDeploymentsRequest$inboundSchema; + /** @deprecated use `ListContractDeploymentsRequest$outboundSchema` instead. */ + export const outboundSchema = ListContractDeploymentsRequest$outboundSchema; + /** @deprecated use `ListContractDeploymentsRequest$Outbound` instead. */ + export type Outbound = ListContractDeploymentsRequest$Outbound; } /** @internal */ export const ListContractDeploymentsResponse$inboundSchema: z.ZodType< - ListContractDeploymentsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListContractsResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListContractDeploymentsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListContractsResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListContractDeploymentsResponse$Outbound = { - Result: components.ListContractsResponse$Outbound; + Result: components.ListContractsResponse$Outbound; }; /** @internal */ export const ListContractDeploymentsResponse$outboundSchema: z.ZodType< - ListContractDeploymentsResponse$Outbound, - z.ZodTypeDef, - ListContractDeploymentsResponse -> = z - .object({ - result: components.ListContractsResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListContractDeploymentsResponse$Outbound, + z.ZodTypeDef, + ListContractDeploymentsResponse +> = z.object({ + result: components.ListContractsResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListContractDeploymentsResponse$ { - /** @deprecated use `ListContractDeploymentsResponse$inboundSchema` instead. */ - export const inboundSchema = ListContractDeploymentsResponse$inboundSchema; - /** @deprecated use `ListContractDeploymentsResponse$outboundSchema` instead. */ - export const outboundSchema = ListContractDeploymentsResponse$outboundSchema; - /** @deprecated use `ListContractDeploymentsResponse$Outbound` instead. */ - export type Outbound = ListContractDeploymentsResponse$Outbound; + /** @deprecated use `ListContractDeploymentsResponse$inboundSchema` instead. */ + export const inboundSchema = ListContractDeploymentsResponse$inboundSchema; + /** @deprecated use `ListContractDeploymentsResponse$outboundSchema` instead. */ + export const outboundSchema = ListContractDeploymentsResponse$outboundSchema; + /** @deprecated use `ListContractDeploymentsResponse$Outbound` instead. */ + export type Outbound = ListContractDeploymentsResponse$Outbound; } diff --git a/src/models/operations/listdelegators.ts b/src/models/operations/listdelegators.ts index dd752e7..c747545 100644 --- a/src/models/operations/listdelegators.ts +++ b/src/models/operations/listdelegators.ts @@ -2,75 +2,77 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListDelegatorsServerList = ["https://glacier-api.avax.network"] as const; +export const ListDelegatorsServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListDelegatorsGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type ListDelegatorsRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A comma separated list of reward addresses to filter by. - */ - rewardAddresses?: string | undefined; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; - /** - * 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. - */ - sortOrder?: components.SortOrder | undefined; - /** - * Delegation status of the node. - */ - delegationStatus?: components.DelegationStatusType | undefined; - /** - * A comma separated list of node ids to filter by. - */ - nodeIds?: string | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A comma separated list of reward addresses to filter by. + */ + rewardAddresses?: string | undefined; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; + /** + * 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. + */ + sortOrder?: components.SortOrder | undefined; + /** + * Delegation status of the node. + */ + delegationStatus?: components.DelegationStatusType | undefined; + /** + * A comma separated list of node ids to filter by. + */ + nodeIds?: string | undefined; }; export type ListDelegatorsResponse = { - result: components.ListDelegatorDetailsResponse; + result: components.ListDelegatorDetailsResponse; }; /** @internal */ export const ListDelegatorsGlobals$inboundSchema: z.ZodType< - ListDelegatorsGlobals, - z.ZodTypeDef, - unknown + ListDelegatorsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type ListDelegatorsGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const ListDelegatorsGlobals$outboundSchema: z.ZodType< - ListDelegatorsGlobals$Outbound, - z.ZodTypeDef, - ListDelegatorsGlobals + ListDelegatorsGlobals$Outbound, + z.ZodTypeDef, + ListDelegatorsGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -78,53 +80,53 @@ export const ListDelegatorsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListDelegatorsGlobals$ { - /** @deprecated use `ListDelegatorsGlobals$inboundSchema` instead. */ - export const inboundSchema = ListDelegatorsGlobals$inboundSchema; - /** @deprecated use `ListDelegatorsGlobals$outboundSchema` instead. */ - export const outboundSchema = ListDelegatorsGlobals$outboundSchema; - /** @deprecated use `ListDelegatorsGlobals$Outbound` instead. */ - export type Outbound = ListDelegatorsGlobals$Outbound; + /** @deprecated use `ListDelegatorsGlobals$inboundSchema` instead. */ + export const inboundSchema = ListDelegatorsGlobals$inboundSchema; + /** @deprecated use `ListDelegatorsGlobals$outboundSchema` instead. */ + export const outboundSchema = ListDelegatorsGlobals$outboundSchema; + /** @deprecated use `ListDelegatorsGlobals$Outbound` instead. */ + export type Outbound = ListDelegatorsGlobals$Outbound; } /** @internal */ export const ListDelegatorsRequest$inboundSchema: z.ZodType< - ListDelegatorsRequest, - z.ZodTypeDef, - unknown + ListDelegatorsRequest, + z.ZodTypeDef, + unknown > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - rewardAddresses: z.string().optional(), - network: components.GlobalParamNetwork$inboundSchema.optional(), - sortOrder: components.SortOrder$inboundSchema.optional(), - delegationStatus: components.DelegationStatusType$inboundSchema.optional(), - nodeIds: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + rewardAddresses: z.string().optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), + sortOrder: components.SortOrder$inboundSchema.optional(), + delegationStatus: components.DelegationStatusType$inboundSchema.optional(), + nodeIds: z.string().optional(), }); /** @internal */ export type ListDelegatorsRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - rewardAddresses?: string | undefined; - network?: string | undefined; - sortOrder?: string | undefined; - delegationStatus?: string | undefined; - nodeIds?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + rewardAddresses?: string | undefined; + network?: string | undefined; + sortOrder?: string | undefined; + delegationStatus?: string | undefined; + nodeIds?: string | undefined; }; /** @internal */ export const ListDelegatorsRequest$outboundSchema: z.ZodType< - ListDelegatorsRequest$Outbound, - z.ZodTypeDef, - ListDelegatorsRequest + ListDelegatorsRequest$Outbound, + z.ZodTypeDef, + ListDelegatorsRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - rewardAddresses: z.string().optional(), - network: components.GlobalParamNetwork$outboundSchema.optional(), - sortOrder: components.SortOrder$outboundSchema.optional(), - delegationStatus: components.DelegationStatusType$outboundSchema.optional(), - nodeIds: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + rewardAddresses: z.string().optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), + sortOrder: components.SortOrder$outboundSchema.optional(), + delegationStatus: components.DelegationStatusType$outboundSchema.optional(), + nodeIds: z.string().optional(), }); /** @@ -132,58 +134,54 @@ export const ListDelegatorsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListDelegatorsRequest$ { - /** @deprecated use `ListDelegatorsRequest$inboundSchema` instead. */ - export const inboundSchema = ListDelegatorsRequest$inboundSchema; - /** @deprecated use `ListDelegatorsRequest$outboundSchema` instead. */ - export const outboundSchema = ListDelegatorsRequest$outboundSchema; - /** @deprecated use `ListDelegatorsRequest$Outbound` instead. */ - export type Outbound = ListDelegatorsRequest$Outbound; + /** @deprecated use `ListDelegatorsRequest$inboundSchema` instead. */ + export const inboundSchema = ListDelegatorsRequest$inboundSchema; + /** @deprecated use `ListDelegatorsRequest$outboundSchema` instead. */ + export const outboundSchema = ListDelegatorsRequest$outboundSchema; + /** @deprecated use `ListDelegatorsRequest$Outbound` instead. */ + export type Outbound = ListDelegatorsRequest$Outbound; } /** @internal */ export const ListDelegatorsResponse$inboundSchema: z.ZodType< - ListDelegatorsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListDelegatorDetailsResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListDelegatorsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListDelegatorDetailsResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListDelegatorsResponse$Outbound = { - Result: components.ListDelegatorDetailsResponse$Outbound; + Result: components.ListDelegatorDetailsResponse$Outbound; }; /** @internal */ export const ListDelegatorsResponse$outboundSchema: z.ZodType< - ListDelegatorsResponse$Outbound, - z.ZodTypeDef, - ListDelegatorsResponse -> = z - .object({ - result: components.ListDelegatorDetailsResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListDelegatorsResponse$Outbound, + z.ZodTypeDef, + ListDelegatorsResponse +> = z.object({ + result: components.ListDelegatorDetailsResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListDelegatorsResponse$ { - /** @deprecated use `ListDelegatorsResponse$inboundSchema` instead. */ - export const inboundSchema = ListDelegatorsResponse$inboundSchema; - /** @deprecated use `ListDelegatorsResponse$outboundSchema` instead. */ - export const outboundSchema = ListDelegatorsResponse$outboundSchema; - /** @deprecated use `ListDelegatorsResponse$Outbound` instead. */ - export type Outbound = ListDelegatorsResponse$Outbound; + /** @deprecated use `ListDelegatorsResponse$inboundSchema` instead. */ + export const inboundSchema = ListDelegatorsResponse$inboundSchema; + /** @deprecated use `ListDelegatorsResponse$outboundSchema` instead. */ + export const outboundSchema = ListDelegatorsResponse$outboundSchema; + /** @deprecated use `ListDelegatorsResponse$Outbound` instead. */ + export type Outbound = ListDelegatorsResponse$Outbound; } diff --git a/src/models/operations/listerc1155balances.ts b/src/models/operations/listerc1155balances.ts index 9eeb325..2169e50 100644 --- a/src/models/operations/listerc1155balances.ts +++ b/src/models/operations/listerc1155balances.ts @@ -2,71 +2,73 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListErc1155BalancesServerList = ["https://glacier-api.avax.network"] as const; +export const ListErc1155BalancesServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListErc1155BalancesGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type ListErc1155BalancesRequest = { - /** - * The block number, if not defined the block number will be the latest block. - */ - blockNumber?: string | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * A wallet address. - */ - address: string; - /** - * A contract addresses to filter by. - */ - contractAddress?: string | undefined; + /** + * The block number, if not defined the block number will be the latest block. + */ + blockNumber?: string | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * A wallet address. + */ + address: string; + /** + * A contract addresses to filter by. + */ + contractAddress?: string | undefined; }; export type ListErc1155BalancesResponse = { - result: components.ListErc1155BalancesResponse; + result: components.ListErc1155BalancesResponse; }; /** @internal */ export const ListErc1155BalancesGlobals$inboundSchema: z.ZodType< - ListErc1155BalancesGlobals, - z.ZodTypeDef, - unknown + ListErc1155BalancesGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type ListErc1155BalancesGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const ListErc1155BalancesGlobals$outboundSchema: z.ZodType< - ListErc1155BalancesGlobals$Outbound, - z.ZodTypeDef, - ListErc1155BalancesGlobals + ListErc1155BalancesGlobals$Outbound, + z.ZodTypeDef, + ListErc1155BalancesGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -74,50 +76,50 @@ export const ListErc1155BalancesGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc1155BalancesGlobals$ { - /** @deprecated use `ListErc1155BalancesGlobals$inboundSchema` instead. */ - export const inboundSchema = ListErc1155BalancesGlobals$inboundSchema; - /** @deprecated use `ListErc1155BalancesGlobals$outboundSchema` instead. */ - export const outboundSchema = ListErc1155BalancesGlobals$outboundSchema; - /** @deprecated use `ListErc1155BalancesGlobals$Outbound` instead. */ - export type Outbound = ListErc1155BalancesGlobals$Outbound; + /** @deprecated use `ListErc1155BalancesGlobals$inboundSchema` instead. */ + export const inboundSchema = ListErc1155BalancesGlobals$inboundSchema; + /** @deprecated use `ListErc1155BalancesGlobals$outboundSchema` instead. */ + export const outboundSchema = ListErc1155BalancesGlobals$outboundSchema; + /** @deprecated use `ListErc1155BalancesGlobals$Outbound` instead. */ + export type Outbound = ListErc1155BalancesGlobals$Outbound; } /** @internal */ export const ListErc1155BalancesRequest$inboundSchema: z.ZodType< - ListErc1155BalancesRequest, - z.ZodTypeDef, - unknown + ListErc1155BalancesRequest, + z.ZodTypeDef, + unknown > = z.object({ - blockNumber: z.string().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), - contractAddress: z.string().optional(), + blockNumber: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), + contractAddress: z.string().optional(), }); /** @internal */ export type ListErc1155BalancesRequest$Outbound = { - blockNumber?: string | undefined; - pageToken?: string | undefined; - pageSize: number; - chainId?: string | undefined; - address: string; - contractAddress?: string | undefined; + blockNumber?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + chainId?: string | undefined; + address: string; + contractAddress?: string | undefined; }; /** @internal */ export const ListErc1155BalancesRequest$outboundSchema: z.ZodType< - ListErc1155BalancesRequest$Outbound, - z.ZodTypeDef, - ListErc1155BalancesRequest + ListErc1155BalancesRequest$Outbound, + z.ZodTypeDef, + ListErc1155BalancesRequest > = z.object({ - blockNumber: z.string().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), - contractAddress: z.string().optional(), + blockNumber: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), + contractAddress: z.string().optional(), }); /** @@ -125,58 +127,54 @@ export const ListErc1155BalancesRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc1155BalancesRequest$ { - /** @deprecated use `ListErc1155BalancesRequest$inboundSchema` instead. */ - export const inboundSchema = ListErc1155BalancesRequest$inboundSchema; - /** @deprecated use `ListErc1155BalancesRequest$outboundSchema` instead. */ - export const outboundSchema = ListErc1155BalancesRequest$outboundSchema; - /** @deprecated use `ListErc1155BalancesRequest$Outbound` instead. */ - export type Outbound = ListErc1155BalancesRequest$Outbound; + /** @deprecated use `ListErc1155BalancesRequest$inboundSchema` instead. */ + export const inboundSchema = ListErc1155BalancesRequest$inboundSchema; + /** @deprecated use `ListErc1155BalancesRequest$outboundSchema` instead. */ + export const outboundSchema = ListErc1155BalancesRequest$outboundSchema; + /** @deprecated use `ListErc1155BalancesRequest$Outbound` instead. */ + export type Outbound = ListErc1155BalancesRequest$Outbound; } /** @internal */ export const ListErc1155BalancesResponse$inboundSchema: z.ZodType< - ListErc1155BalancesResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListErc1155BalancesResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListErc1155BalancesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListErc1155BalancesResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListErc1155BalancesResponse$Outbound = { - Result: components.ListErc1155BalancesResponse$Outbound; + Result: components.ListErc1155BalancesResponse$Outbound; }; /** @internal */ export const ListErc1155BalancesResponse$outboundSchema: z.ZodType< - ListErc1155BalancesResponse$Outbound, - z.ZodTypeDef, - ListErc1155BalancesResponse -> = z - .object({ - result: components.ListErc1155BalancesResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListErc1155BalancesResponse$Outbound, + z.ZodTypeDef, + ListErc1155BalancesResponse +> = z.object({ + result: components.ListErc1155BalancesResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc1155BalancesResponse$ { - /** @deprecated use `ListErc1155BalancesResponse$inboundSchema` instead. */ - export const inboundSchema = ListErc1155BalancesResponse$inboundSchema; - /** @deprecated use `ListErc1155BalancesResponse$outboundSchema` instead. */ - export const outboundSchema = ListErc1155BalancesResponse$outboundSchema; - /** @deprecated use `ListErc1155BalancesResponse$Outbound` instead. */ - export type Outbound = ListErc1155BalancesResponse$Outbound; + /** @deprecated use `ListErc1155BalancesResponse$inboundSchema` instead. */ + export const inboundSchema = ListErc1155BalancesResponse$inboundSchema; + /** @deprecated use `ListErc1155BalancesResponse$outboundSchema` instead. */ + export const outboundSchema = ListErc1155BalancesResponse$outboundSchema; + /** @deprecated use `ListErc1155BalancesResponse$Outbound` instead. */ + export type Outbound = ListErc1155BalancesResponse$Outbound; } diff --git a/src/models/operations/listerc1155transactions.ts b/src/models/operations/listerc1155transactions.ts index 0e26d19..b809bc9 100644 --- a/src/models/operations/listerc1155transactions.ts +++ b/src/models/operations/listerc1155transactions.ts @@ -2,71 +2,73 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListErc1155TransactionsServerList = ["https://glacier-api.avax.network"] as const; +export const ListErc1155TransactionsServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListErc1155TransactionsGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type ListErc1155TransactionsRequest = { - /** - * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block. - */ - startBlock?: number | undefined; - /** - * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block. - */ - endBlock?: number | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * A wallet address. - */ - address: string; + /** + * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block. + */ + startBlock?: number | undefined; + /** + * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block. + */ + endBlock?: number | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * A wallet address. + */ + address: string; }; export type ListErc1155TransactionsResponse = { - result: components.ListErc1155TransactionsResponse; + result: components.ListErc1155TransactionsResponse; }; /** @internal */ export const ListErc1155TransactionsGlobals$inboundSchema: z.ZodType< - ListErc1155TransactionsGlobals, - z.ZodTypeDef, - unknown + ListErc1155TransactionsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type ListErc1155TransactionsGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const ListErc1155TransactionsGlobals$outboundSchema: z.ZodType< - ListErc1155TransactionsGlobals$Outbound, - z.ZodTypeDef, - ListErc1155TransactionsGlobals + ListErc1155TransactionsGlobals$Outbound, + z.ZodTypeDef, + ListErc1155TransactionsGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -74,50 +76,50 @@ export const ListErc1155TransactionsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc1155TransactionsGlobals$ { - /** @deprecated use `ListErc1155TransactionsGlobals$inboundSchema` instead. */ - export const inboundSchema = ListErc1155TransactionsGlobals$inboundSchema; - /** @deprecated use `ListErc1155TransactionsGlobals$outboundSchema` instead. */ - export const outboundSchema = ListErc1155TransactionsGlobals$outboundSchema; - /** @deprecated use `ListErc1155TransactionsGlobals$Outbound` instead. */ - export type Outbound = ListErc1155TransactionsGlobals$Outbound; + /** @deprecated use `ListErc1155TransactionsGlobals$inboundSchema` instead. */ + export const inboundSchema = ListErc1155TransactionsGlobals$inboundSchema; + /** @deprecated use `ListErc1155TransactionsGlobals$outboundSchema` instead. */ + export const outboundSchema = ListErc1155TransactionsGlobals$outboundSchema; + /** @deprecated use `ListErc1155TransactionsGlobals$Outbound` instead. */ + export type Outbound = ListErc1155TransactionsGlobals$Outbound; } /** @internal */ export const ListErc1155TransactionsRequest$inboundSchema: z.ZodType< - ListErc1155TransactionsRequest, - z.ZodTypeDef, - unknown + ListErc1155TransactionsRequest, + z.ZodTypeDef, + unknown > = z.object({ - startBlock: z.number().optional(), - endBlock: z.number().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), + startBlock: z.number().optional(), + endBlock: z.number().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), }); /** @internal */ export type ListErc1155TransactionsRequest$Outbound = { - startBlock?: number | undefined; - endBlock?: number | undefined; - pageToken?: string | undefined; - pageSize: number; - chainId?: string | undefined; - address: string; + startBlock?: number | undefined; + endBlock?: number | undefined; + pageToken?: string | undefined; + pageSize: number; + chainId?: string | undefined; + address: string; }; /** @internal */ export const ListErc1155TransactionsRequest$outboundSchema: z.ZodType< - ListErc1155TransactionsRequest$Outbound, - z.ZodTypeDef, - ListErc1155TransactionsRequest + ListErc1155TransactionsRequest$Outbound, + z.ZodTypeDef, + ListErc1155TransactionsRequest > = z.object({ - startBlock: z.number().optional(), - endBlock: z.number().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), + startBlock: z.number().optional(), + endBlock: z.number().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), }); /** @@ -125,58 +127,54 @@ export const ListErc1155TransactionsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc1155TransactionsRequest$ { - /** @deprecated use `ListErc1155TransactionsRequest$inboundSchema` instead. */ - export const inboundSchema = ListErc1155TransactionsRequest$inboundSchema; - /** @deprecated use `ListErc1155TransactionsRequest$outboundSchema` instead. */ - export const outboundSchema = ListErc1155TransactionsRequest$outboundSchema; - /** @deprecated use `ListErc1155TransactionsRequest$Outbound` instead. */ - export type Outbound = ListErc1155TransactionsRequest$Outbound; + /** @deprecated use `ListErc1155TransactionsRequest$inboundSchema` instead. */ + export const inboundSchema = ListErc1155TransactionsRequest$inboundSchema; + /** @deprecated use `ListErc1155TransactionsRequest$outboundSchema` instead. */ + export const outboundSchema = ListErc1155TransactionsRequest$outboundSchema; + /** @deprecated use `ListErc1155TransactionsRequest$Outbound` instead. */ + export type Outbound = ListErc1155TransactionsRequest$Outbound; } /** @internal */ export const ListErc1155TransactionsResponse$inboundSchema: z.ZodType< - ListErc1155TransactionsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListErc1155TransactionsResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListErc1155TransactionsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListErc1155TransactionsResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListErc1155TransactionsResponse$Outbound = { - Result: components.ListErc1155TransactionsResponse$Outbound; + Result: components.ListErc1155TransactionsResponse$Outbound; }; /** @internal */ export const ListErc1155TransactionsResponse$outboundSchema: z.ZodType< - ListErc1155TransactionsResponse$Outbound, - z.ZodTypeDef, - ListErc1155TransactionsResponse -> = z - .object({ - result: components.ListErc1155TransactionsResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListErc1155TransactionsResponse$Outbound, + z.ZodTypeDef, + ListErc1155TransactionsResponse +> = z.object({ + result: components.ListErc1155TransactionsResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc1155TransactionsResponse$ { - /** @deprecated use `ListErc1155TransactionsResponse$inboundSchema` instead. */ - export const inboundSchema = ListErc1155TransactionsResponse$inboundSchema; - /** @deprecated use `ListErc1155TransactionsResponse$outboundSchema` instead. */ - export const outboundSchema = ListErc1155TransactionsResponse$outboundSchema; - /** @deprecated use `ListErc1155TransactionsResponse$Outbound` instead. */ - export type Outbound = ListErc1155TransactionsResponse$Outbound; + /** @deprecated use `ListErc1155TransactionsResponse$inboundSchema` instead. */ + export const inboundSchema = ListErc1155TransactionsResponse$inboundSchema; + /** @deprecated use `ListErc1155TransactionsResponse$outboundSchema` instead. */ + export const outboundSchema = ListErc1155TransactionsResponse$outboundSchema; + /** @deprecated use `ListErc1155TransactionsResponse$Outbound` instead. */ + export type Outbound = ListErc1155TransactionsResponse$Outbound; } diff --git a/src/models/operations/listerc20balances.ts b/src/models/operations/listerc20balances.ts index b7ca946..9cf7d6f 100644 --- a/src/models/operations/listerc20balances.ts +++ b/src/models/operations/listerc20balances.ts @@ -2,79 +2,81 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListErc20BalancesServerList = ["https://glacier-api.avax.network"] as const; +export const ListErc20BalancesServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListErc20BalancesGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type ListErc20BalancesRequest = { - /** - * The block number, if not defined the block number will be the latest block. - */ - blockNumber?: string | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * whether to filter out spam tokens from the response. Default is true. - */ - filterSpamTokens?: boolean | undefined; - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * A wallet address. - */ - address: string; - /** - * A comma separated list of contract addresses to filter by. - */ - contractAddresses?: string | undefined; - /** - * The currency that return values should use. Defaults to USD. - */ - currency?: components.CurrencyCode | undefined; + /** + * The block number, if not defined the block number will be the latest block. + */ + blockNumber?: string | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * whether to filter out spam tokens from the response. Default is true. + */ + filterSpamTokens?: boolean | undefined; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * A wallet address. + */ + address: string; + /** + * A comma separated list of contract addresses to filter by. + */ + contractAddresses?: string | undefined; + /** + * The currency that return values should use. Defaults to USD. + */ + currency?: components.CurrencyCode | undefined; }; export type ListErc20BalancesResponse = { - result: components.ListErc20BalancesResponse; + result: components.ListErc20BalancesResponse; }; /** @internal */ export const ListErc20BalancesGlobals$inboundSchema: z.ZodType< - ListErc20BalancesGlobals, - z.ZodTypeDef, - unknown + ListErc20BalancesGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type ListErc20BalancesGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const ListErc20BalancesGlobals$outboundSchema: z.ZodType< - ListErc20BalancesGlobals$Outbound, - z.ZodTypeDef, - ListErc20BalancesGlobals + ListErc20BalancesGlobals$Outbound, + z.ZodTypeDef, + ListErc20BalancesGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -82,56 +84,56 @@ export const ListErc20BalancesGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc20BalancesGlobals$ { - /** @deprecated use `ListErc20BalancesGlobals$inboundSchema` instead. */ - export const inboundSchema = ListErc20BalancesGlobals$inboundSchema; - /** @deprecated use `ListErc20BalancesGlobals$outboundSchema` instead. */ - export const outboundSchema = ListErc20BalancesGlobals$outboundSchema; - /** @deprecated use `ListErc20BalancesGlobals$Outbound` instead. */ - export type Outbound = ListErc20BalancesGlobals$Outbound; + /** @deprecated use `ListErc20BalancesGlobals$inboundSchema` instead. */ + export const inboundSchema = ListErc20BalancesGlobals$inboundSchema; + /** @deprecated use `ListErc20BalancesGlobals$outboundSchema` instead. */ + export const outboundSchema = ListErc20BalancesGlobals$outboundSchema; + /** @deprecated use `ListErc20BalancesGlobals$Outbound` instead. */ + export type Outbound = ListErc20BalancesGlobals$Outbound; } /** @internal */ export const ListErc20BalancesRequest$inboundSchema: z.ZodType< - ListErc20BalancesRequest, - z.ZodTypeDef, - unknown + ListErc20BalancesRequest, + z.ZodTypeDef, + unknown > = z.object({ - blockNumber: z.string().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - filterSpamTokens: z.boolean().default(true), - chainId: z.string().optional(), - address: z.string(), - contractAddresses: z.string().optional(), - currency: components.CurrencyCode$inboundSchema.optional(), + blockNumber: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + filterSpamTokens: z.boolean().default(true), + chainId: z.string().optional(), + address: z.string(), + contractAddresses: z.string().optional(), + currency: components.CurrencyCode$inboundSchema.optional(), }); /** @internal */ export type ListErc20BalancesRequest$Outbound = { - blockNumber?: string | undefined; - pageToken?: string | undefined; - pageSize: number; - filterSpamTokens: boolean; - chainId?: string | undefined; - address: string; - contractAddresses?: string | undefined; - currency?: string | undefined; + blockNumber?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + filterSpamTokens: boolean; + chainId?: string | undefined; + address: string; + contractAddresses?: string | undefined; + currency?: string | undefined; }; /** @internal */ export const ListErc20BalancesRequest$outboundSchema: z.ZodType< - ListErc20BalancesRequest$Outbound, - z.ZodTypeDef, - ListErc20BalancesRequest + ListErc20BalancesRequest$Outbound, + z.ZodTypeDef, + ListErc20BalancesRequest > = z.object({ - blockNumber: z.string().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - filterSpamTokens: z.boolean().default(true), - chainId: z.string().optional(), - address: z.string(), - contractAddresses: z.string().optional(), - currency: components.CurrencyCode$outboundSchema.optional(), + blockNumber: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + filterSpamTokens: z.boolean().default(true), + chainId: z.string().optional(), + address: z.string(), + contractAddresses: z.string().optional(), + currency: components.CurrencyCode$outboundSchema.optional(), }); /** @@ -139,58 +141,54 @@ export const ListErc20BalancesRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc20BalancesRequest$ { - /** @deprecated use `ListErc20BalancesRequest$inboundSchema` instead. */ - export const inboundSchema = ListErc20BalancesRequest$inboundSchema; - /** @deprecated use `ListErc20BalancesRequest$outboundSchema` instead. */ - export const outboundSchema = ListErc20BalancesRequest$outboundSchema; - /** @deprecated use `ListErc20BalancesRequest$Outbound` instead. */ - export type Outbound = ListErc20BalancesRequest$Outbound; + /** @deprecated use `ListErc20BalancesRequest$inboundSchema` instead. */ + export const inboundSchema = ListErc20BalancesRequest$inboundSchema; + /** @deprecated use `ListErc20BalancesRequest$outboundSchema` instead. */ + export const outboundSchema = ListErc20BalancesRequest$outboundSchema; + /** @deprecated use `ListErc20BalancesRequest$Outbound` instead. */ + export type Outbound = ListErc20BalancesRequest$Outbound; } /** @internal */ export const ListErc20BalancesResponse$inboundSchema: z.ZodType< - ListErc20BalancesResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListErc20BalancesResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListErc20BalancesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListErc20BalancesResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListErc20BalancesResponse$Outbound = { - Result: components.ListErc20BalancesResponse$Outbound; + Result: components.ListErc20BalancesResponse$Outbound; }; /** @internal */ export const ListErc20BalancesResponse$outboundSchema: z.ZodType< - ListErc20BalancesResponse$Outbound, - z.ZodTypeDef, - ListErc20BalancesResponse -> = z - .object({ - result: components.ListErc20BalancesResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListErc20BalancesResponse$Outbound, + z.ZodTypeDef, + ListErc20BalancesResponse +> = z.object({ + result: components.ListErc20BalancesResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc20BalancesResponse$ { - /** @deprecated use `ListErc20BalancesResponse$inboundSchema` instead. */ - export const inboundSchema = ListErc20BalancesResponse$inboundSchema; - /** @deprecated use `ListErc20BalancesResponse$outboundSchema` instead. */ - export const outboundSchema = ListErc20BalancesResponse$outboundSchema; - /** @deprecated use `ListErc20BalancesResponse$Outbound` instead. */ - export type Outbound = ListErc20BalancesResponse$Outbound; + /** @deprecated use `ListErc20BalancesResponse$inboundSchema` instead. */ + export const inboundSchema = ListErc20BalancesResponse$inboundSchema; + /** @deprecated use `ListErc20BalancesResponse$outboundSchema` instead. */ + export const outboundSchema = ListErc20BalancesResponse$outboundSchema; + /** @deprecated use `ListErc20BalancesResponse$Outbound` instead. */ + export type Outbound = ListErc20BalancesResponse$Outbound; } diff --git a/src/models/operations/listerc20transactions.ts b/src/models/operations/listerc20transactions.ts index c1b6372..591edc8 100644 --- a/src/models/operations/listerc20transactions.ts +++ b/src/models/operations/listerc20transactions.ts @@ -2,71 +2,73 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListErc20TransactionsServerList = ["https://glacier-api.avax.network"] as const; +export const ListErc20TransactionsServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListErc20TransactionsGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type ListErc20TransactionsRequest = { - /** - * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block. - */ - startBlock?: number | undefined; - /** - * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block. - */ - endBlock?: number | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * A wallet address. - */ - address: string; + /** + * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block. + */ + startBlock?: number | undefined; + /** + * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block. + */ + endBlock?: number | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * A wallet address. + */ + address: string; }; export type ListErc20TransactionsResponse = { - result: components.ListErc20TransactionsResponse; + result: components.ListErc20TransactionsResponse; }; /** @internal */ export const ListErc20TransactionsGlobals$inboundSchema: z.ZodType< - ListErc20TransactionsGlobals, - z.ZodTypeDef, - unknown + ListErc20TransactionsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type ListErc20TransactionsGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const ListErc20TransactionsGlobals$outboundSchema: z.ZodType< - ListErc20TransactionsGlobals$Outbound, - z.ZodTypeDef, - ListErc20TransactionsGlobals + ListErc20TransactionsGlobals$Outbound, + z.ZodTypeDef, + ListErc20TransactionsGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -74,50 +76,50 @@ export const ListErc20TransactionsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc20TransactionsGlobals$ { - /** @deprecated use `ListErc20TransactionsGlobals$inboundSchema` instead. */ - export const inboundSchema = ListErc20TransactionsGlobals$inboundSchema; - /** @deprecated use `ListErc20TransactionsGlobals$outboundSchema` instead. */ - export const outboundSchema = ListErc20TransactionsGlobals$outboundSchema; - /** @deprecated use `ListErc20TransactionsGlobals$Outbound` instead. */ - export type Outbound = ListErc20TransactionsGlobals$Outbound; + /** @deprecated use `ListErc20TransactionsGlobals$inboundSchema` instead. */ + export const inboundSchema = ListErc20TransactionsGlobals$inboundSchema; + /** @deprecated use `ListErc20TransactionsGlobals$outboundSchema` instead. */ + export const outboundSchema = ListErc20TransactionsGlobals$outboundSchema; + /** @deprecated use `ListErc20TransactionsGlobals$Outbound` instead. */ + export type Outbound = ListErc20TransactionsGlobals$Outbound; } /** @internal */ export const ListErc20TransactionsRequest$inboundSchema: z.ZodType< - ListErc20TransactionsRequest, - z.ZodTypeDef, - unknown + ListErc20TransactionsRequest, + z.ZodTypeDef, + unknown > = z.object({ - startBlock: z.number().optional(), - endBlock: z.number().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), + startBlock: z.number().optional(), + endBlock: z.number().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), }); /** @internal */ export type ListErc20TransactionsRequest$Outbound = { - startBlock?: number | undefined; - endBlock?: number | undefined; - pageToken?: string | undefined; - pageSize: number; - chainId?: string | undefined; - address: string; + startBlock?: number | undefined; + endBlock?: number | undefined; + pageToken?: string | undefined; + pageSize: number; + chainId?: string | undefined; + address: string; }; /** @internal */ export const ListErc20TransactionsRequest$outboundSchema: z.ZodType< - ListErc20TransactionsRequest$Outbound, - z.ZodTypeDef, - ListErc20TransactionsRequest + ListErc20TransactionsRequest$Outbound, + z.ZodTypeDef, + ListErc20TransactionsRequest > = z.object({ - startBlock: z.number().optional(), - endBlock: z.number().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), + startBlock: z.number().optional(), + endBlock: z.number().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), }); /** @@ -125,58 +127,54 @@ export const ListErc20TransactionsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc20TransactionsRequest$ { - /** @deprecated use `ListErc20TransactionsRequest$inboundSchema` instead. */ - export const inboundSchema = ListErc20TransactionsRequest$inboundSchema; - /** @deprecated use `ListErc20TransactionsRequest$outboundSchema` instead. */ - export const outboundSchema = ListErc20TransactionsRequest$outboundSchema; - /** @deprecated use `ListErc20TransactionsRequest$Outbound` instead. */ - export type Outbound = ListErc20TransactionsRequest$Outbound; + /** @deprecated use `ListErc20TransactionsRequest$inboundSchema` instead. */ + export const inboundSchema = ListErc20TransactionsRequest$inboundSchema; + /** @deprecated use `ListErc20TransactionsRequest$outboundSchema` instead. */ + export const outboundSchema = ListErc20TransactionsRequest$outboundSchema; + /** @deprecated use `ListErc20TransactionsRequest$Outbound` instead. */ + export type Outbound = ListErc20TransactionsRequest$Outbound; } /** @internal */ export const ListErc20TransactionsResponse$inboundSchema: z.ZodType< - ListErc20TransactionsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListErc20TransactionsResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListErc20TransactionsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListErc20TransactionsResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListErc20TransactionsResponse$Outbound = { - Result: components.ListErc20TransactionsResponse$Outbound; + Result: components.ListErc20TransactionsResponse$Outbound; }; /** @internal */ export const ListErc20TransactionsResponse$outboundSchema: z.ZodType< - ListErc20TransactionsResponse$Outbound, - z.ZodTypeDef, - ListErc20TransactionsResponse -> = z - .object({ - result: components.ListErc20TransactionsResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListErc20TransactionsResponse$Outbound, + z.ZodTypeDef, + ListErc20TransactionsResponse +> = z.object({ + result: components.ListErc20TransactionsResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc20TransactionsResponse$ { - /** @deprecated use `ListErc20TransactionsResponse$inboundSchema` instead. */ - export const inboundSchema = ListErc20TransactionsResponse$inboundSchema; - /** @deprecated use `ListErc20TransactionsResponse$outboundSchema` instead. */ - export const outboundSchema = ListErc20TransactionsResponse$outboundSchema; - /** @deprecated use `ListErc20TransactionsResponse$Outbound` instead. */ - export type Outbound = ListErc20TransactionsResponse$Outbound; + /** @deprecated use `ListErc20TransactionsResponse$inboundSchema` instead. */ + export const inboundSchema = ListErc20TransactionsResponse$inboundSchema; + /** @deprecated use `ListErc20TransactionsResponse$outboundSchema` instead. */ + export const outboundSchema = ListErc20TransactionsResponse$outboundSchema; + /** @deprecated use `ListErc20TransactionsResponse$Outbound` instead. */ + export type Outbound = ListErc20TransactionsResponse$Outbound; } diff --git a/src/models/operations/listerc721balances.ts b/src/models/operations/listerc721balances.ts index a21ca9f..5c8f696 100644 --- a/src/models/operations/listerc721balances.ts +++ b/src/models/operations/listerc721balances.ts @@ -2,67 +2,69 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListErc721BalancesServerList = ["https://glacier-api.avax.network"] as const; +export const ListErc721BalancesServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListErc721BalancesGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type ListErc721BalancesRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * A wallet address. - */ - address: string; - /** - * A contract addresses to filter by. - */ - contractAddress?: string | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * A wallet address. + */ + address: string; + /** + * A contract addresses to filter by. + */ + contractAddress?: string | undefined; }; export type ListErc721BalancesResponse = { - result: components.ListErc721BalancesResponse; + result: components.ListErc721BalancesResponse; }; /** @internal */ export const ListErc721BalancesGlobals$inboundSchema: z.ZodType< - ListErc721BalancesGlobals, - z.ZodTypeDef, - unknown + ListErc721BalancesGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type ListErc721BalancesGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const ListErc721BalancesGlobals$outboundSchema: z.ZodType< - ListErc721BalancesGlobals$Outbound, - z.ZodTypeDef, - ListErc721BalancesGlobals + ListErc721BalancesGlobals$Outbound, + z.ZodTypeDef, + ListErc721BalancesGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -70,47 +72,47 @@ export const ListErc721BalancesGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc721BalancesGlobals$ { - /** @deprecated use `ListErc721BalancesGlobals$inboundSchema` instead. */ - export const inboundSchema = ListErc721BalancesGlobals$inboundSchema; - /** @deprecated use `ListErc721BalancesGlobals$outboundSchema` instead. */ - export const outboundSchema = ListErc721BalancesGlobals$outboundSchema; - /** @deprecated use `ListErc721BalancesGlobals$Outbound` instead. */ - export type Outbound = ListErc721BalancesGlobals$Outbound; + /** @deprecated use `ListErc721BalancesGlobals$inboundSchema` instead. */ + export const inboundSchema = ListErc721BalancesGlobals$inboundSchema; + /** @deprecated use `ListErc721BalancesGlobals$outboundSchema` instead. */ + export const outboundSchema = ListErc721BalancesGlobals$outboundSchema; + /** @deprecated use `ListErc721BalancesGlobals$Outbound` instead. */ + export type Outbound = ListErc721BalancesGlobals$Outbound; } /** @internal */ export const ListErc721BalancesRequest$inboundSchema: z.ZodType< - ListErc721BalancesRequest, - z.ZodTypeDef, - unknown + ListErc721BalancesRequest, + z.ZodTypeDef, + unknown > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), - contractAddress: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), + contractAddress: z.string().optional(), }); /** @internal */ export type ListErc721BalancesRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - chainId?: string | undefined; - address: string; - contractAddress?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + chainId?: string | undefined; + address: string; + contractAddress?: string | undefined; }; /** @internal */ export const ListErc721BalancesRequest$outboundSchema: z.ZodType< - ListErc721BalancesRequest$Outbound, - z.ZodTypeDef, - ListErc721BalancesRequest + ListErc721BalancesRequest$Outbound, + z.ZodTypeDef, + ListErc721BalancesRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), - contractAddress: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), + contractAddress: z.string().optional(), }); /** @@ -118,58 +120,54 @@ export const ListErc721BalancesRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc721BalancesRequest$ { - /** @deprecated use `ListErc721BalancesRequest$inboundSchema` instead. */ - export const inboundSchema = ListErc721BalancesRequest$inboundSchema; - /** @deprecated use `ListErc721BalancesRequest$outboundSchema` instead. */ - export const outboundSchema = ListErc721BalancesRequest$outboundSchema; - /** @deprecated use `ListErc721BalancesRequest$Outbound` instead. */ - export type Outbound = ListErc721BalancesRequest$Outbound; + /** @deprecated use `ListErc721BalancesRequest$inboundSchema` instead. */ + export const inboundSchema = ListErc721BalancesRequest$inboundSchema; + /** @deprecated use `ListErc721BalancesRequest$outboundSchema` instead. */ + export const outboundSchema = ListErc721BalancesRequest$outboundSchema; + /** @deprecated use `ListErc721BalancesRequest$Outbound` instead. */ + export type Outbound = ListErc721BalancesRequest$Outbound; } /** @internal */ export const ListErc721BalancesResponse$inboundSchema: z.ZodType< - ListErc721BalancesResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListErc721BalancesResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListErc721BalancesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListErc721BalancesResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListErc721BalancesResponse$Outbound = { - Result: components.ListErc721BalancesResponse$Outbound; + Result: components.ListErc721BalancesResponse$Outbound; }; /** @internal */ export const ListErc721BalancesResponse$outboundSchema: z.ZodType< - ListErc721BalancesResponse$Outbound, - z.ZodTypeDef, - ListErc721BalancesResponse -> = z - .object({ - result: components.ListErc721BalancesResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListErc721BalancesResponse$Outbound, + z.ZodTypeDef, + ListErc721BalancesResponse +> = z.object({ + result: components.ListErc721BalancesResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc721BalancesResponse$ { - /** @deprecated use `ListErc721BalancesResponse$inboundSchema` instead. */ - export const inboundSchema = ListErc721BalancesResponse$inboundSchema; - /** @deprecated use `ListErc721BalancesResponse$outboundSchema` instead. */ - export const outboundSchema = ListErc721BalancesResponse$outboundSchema; - /** @deprecated use `ListErc721BalancesResponse$Outbound` instead. */ - export type Outbound = ListErc721BalancesResponse$Outbound; + /** @deprecated use `ListErc721BalancesResponse$inboundSchema` instead. */ + export const inboundSchema = ListErc721BalancesResponse$inboundSchema; + /** @deprecated use `ListErc721BalancesResponse$outboundSchema` instead. */ + export const outboundSchema = ListErc721BalancesResponse$outboundSchema; + /** @deprecated use `ListErc721BalancesResponse$Outbound` instead. */ + export type Outbound = ListErc721BalancesResponse$Outbound; } diff --git a/src/models/operations/listerc721transactions.ts b/src/models/operations/listerc721transactions.ts index c22a62f..aee2251 100644 --- a/src/models/operations/listerc721transactions.ts +++ b/src/models/operations/listerc721transactions.ts @@ -2,71 +2,73 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListErc721TransactionsServerList = ["https://glacier-api.avax.network"] as const; +export const ListErc721TransactionsServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListErc721TransactionsGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type ListErc721TransactionsRequest = { - /** - * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block. - */ - startBlock?: number | undefined; - /** - * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block. - */ - endBlock?: number | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * A wallet address. - */ - address: string; + /** + * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block. + */ + startBlock?: number | undefined; + /** + * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block. + */ + endBlock?: number | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * A wallet address. + */ + address: string; }; export type ListErc721TransactionsResponse = { - result: components.ListErc721TransactionsResponse; + result: components.ListErc721TransactionsResponse; }; /** @internal */ export const ListErc721TransactionsGlobals$inboundSchema: z.ZodType< - ListErc721TransactionsGlobals, - z.ZodTypeDef, - unknown + ListErc721TransactionsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type ListErc721TransactionsGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const ListErc721TransactionsGlobals$outboundSchema: z.ZodType< - ListErc721TransactionsGlobals$Outbound, - z.ZodTypeDef, - ListErc721TransactionsGlobals + ListErc721TransactionsGlobals$Outbound, + z.ZodTypeDef, + ListErc721TransactionsGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -74,50 +76,50 @@ export const ListErc721TransactionsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc721TransactionsGlobals$ { - /** @deprecated use `ListErc721TransactionsGlobals$inboundSchema` instead. */ - export const inboundSchema = ListErc721TransactionsGlobals$inboundSchema; - /** @deprecated use `ListErc721TransactionsGlobals$outboundSchema` instead. */ - export const outboundSchema = ListErc721TransactionsGlobals$outboundSchema; - /** @deprecated use `ListErc721TransactionsGlobals$Outbound` instead. */ - export type Outbound = ListErc721TransactionsGlobals$Outbound; + /** @deprecated use `ListErc721TransactionsGlobals$inboundSchema` instead. */ + export const inboundSchema = ListErc721TransactionsGlobals$inboundSchema; + /** @deprecated use `ListErc721TransactionsGlobals$outboundSchema` instead. */ + export const outboundSchema = ListErc721TransactionsGlobals$outboundSchema; + /** @deprecated use `ListErc721TransactionsGlobals$Outbound` instead. */ + export type Outbound = ListErc721TransactionsGlobals$Outbound; } /** @internal */ export const ListErc721TransactionsRequest$inboundSchema: z.ZodType< - ListErc721TransactionsRequest, - z.ZodTypeDef, - unknown + ListErc721TransactionsRequest, + z.ZodTypeDef, + unknown > = z.object({ - startBlock: z.number().optional(), - endBlock: z.number().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), + startBlock: z.number().optional(), + endBlock: z.number().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), }); /** @internal */ export type ListErc721TransactionsRequest$Outbound = { - startBlock?: number | undefined; - endBlock?: number | undefined; - pageToken?: string | undefined; - pageSize: number; - chainId?: string | undefined; - address: string; + startBlock?: number | undefined; + endBlock?: number | undefined; + pageToken?: string | undefined; + pageSize: number; + chainId?: string | undefined; + address: string; }; /** @internal */ export const ListErc721TransactionsRequest$outboundSchema: z.ZodType< - ListErc721TransactionsRequest$Outbound, - z.ZodTypeDef, - ListErc721TransactionsRequest + ListErc721TransactionsRequest$Outbound, + z.ZodTypeDef, + ListErc721TransactionsRequest > = z.object({ - startBlock: z.number().optional(), - endBlock: z.number().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), + startBlock: z.number().optional(), + endBlock: z.number().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), }); /** @@ -125,58 +127,54 @@ export const ListErc721TransactionsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc721TransactionsRequest$ { - /** @deprecated use `ListErc721TransactionsRequest$inboundSchema` instead. */ - export const inboundSchema = ListErc721TransactionsRequest$inboundSchema; - /** @deprecated use `ListErc721TransactionsRequest$outboundSchema` instead. */ - export const outboundSchema = ListErc721TransactionsRequest$outboundSchema; - /** @deprecated use `ListErc721TransactionsRequest$Outbound` instead. */ - export type Outbound = ListErc721TransactionsRequest$Outbound; + /** @deprecated use `ListErc721TransactionsRequest$inboundSchema` instead. */ + export const inboundSchema = ListErc721TransactionsRequest$inboundSchema; + /** @deprecated use `ListErc721TransactionsRequest$outboundSchema` instead. */ + export const outboundSchema = ListErc721TransactionsRequest$outboundSchema; + /** @deprecated use `ListErc721TransactionsRequest$Outbound` instead. */ + export type Outbound = ListErc721TransactionsRequest$Outbound; } /** @internal */ export const ListErc721TransactionsResponse$inboundSchema: z.ZodType< - ListErc721TransactionsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListErc721TransactionsResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListErc721TransactionsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListErc721TransactionsResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListErc721TransactionsResponse$Outbound = { - Result: components.ListErc721TransactionsResponse$Outbound; + Result: components.ListErc721TransactionsResponse$Outbound; }; /** @internal */ export const ListErc721TransactionsResponse$outboundSchema: z.ZodType< - ListErc721TransactionsResponse$Outbound, - z.ZodTypeDef, - ListErc721TransactionsResponse -> = z - .object({ - result: components.ListErc721TransactionsResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListErc721TransactionsResponse$Outbound, + z.ZodTypeDef, + ListErc721TransactionsResponse +> = z.object({ + result: components.ListErc721TransactionsResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListErc721TransactionsResponse$ { - /** @deprecated use `ListErc721TransactionsResponse$inboundSchema` instead. */ - export const inboundSchema = ListErc721TransactionsResponse$inboundSchema; - /** @deprecated use `ListErc721TransactionsResponse$outboundSchema` instead. */ - export const outboundSchema = ListErc721TransactionsResponse$outboundSchema; - /** @deprecated use `ListErc721TransactionsResponse$Outbound` instead. */ - export type Outbound = ListErc721TransactionsResponse$Outbound; + /** @deprecated use `ListErc721TransactionsResponse$inboundSchema` instead. */ + export const inboundSchema = ListErc721TransactionsResponse$inboundSchema; + /** @deprecated use `ListErc721TransactionsResponse$outboundSchema` instead. */ + export const outboundSchema = ListErc721TransactionsResponse$outboundSchema; + /** @deprecated use `ListErc721TransactionsResponse$Outbound` instead. */ + export type Outbound = ListErc721TransactionsResponse$Outbound; } diff --git a/src/models/operations/listhistoricalprimarynetworkrewards.ts b/src/models/operations/listhistoricalprimarynetworkrewards.ts index 79a5d91..cd72d9a 100644 --- a/src/models/operations/listhistoricalprimarynetworkrewards.ts +++ b/src/models/operations/listhistoricalprimarynetworkrewards.ts @@ -2,124 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; export const ListHistoricalPrimaryNetworkRewardsServerList = [ - "https://glacier-api.avax.network", + "https://glacier-api.avax.network", ] as const; export type ListHistoricalPrimaryNetworkRewardsGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type ListHistoricalPrimaryNetworkRewardsRequest = { - /** - * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji". Optional, but at least one of addresses or nodeIds is required. - */ - addresses?: string | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; - /** - * A comma separated list of node ids to filter by. Optional, but at least one of addresses or nodeIds is required. - */ - nodeIds?: string | undefined; - /** - * 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. - */ - sortOrder?: components.SortOrder | undefined; - /** - * The currency that return values should use. Defaults to USD. - */ - currency?: components.CurrencyCode | undefined; + /** + * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji". Optional, but at least one of addresses or nodeIds is required. + */ + addresses?: string | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; + /** + * A comma separated list of node ids to filter by. Optional, but at least one of addresses or nodeIds is required. + */ + nodeIds?: string | undefined; + /** + * 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. + */ + sortOrder?: components.SortOrder | undefined; + /** + * The currency that return values should use. Defaults to USD. + */ + currency?: components.CurrencyCode | undefined; }; export type ListHistoricalPrimaryNetworkRewardsResponse = { - result: components.ListHistoricalRewardsResponse; + result: components.ListHistoricalRewardsResponse; }; /** @internal */ -export const ListHistoricalPrimaryNetworkRewardsGlobals$inboundSchema: z.ZodType< - ListHistoricalPrimaryNetworkRewardsGlobals, - z.ZodTypeDef, - unknown -> = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), -}); +export const ListHistoricalPrimaryNetworkRewardsGlobals$inboundSchema: + z.ZodType = + z.object({ + network: components.GlobalParamNetwork$inboundSchema.optional(), + }); /** @internal */ export type ListHistoricalPrimaryNetworkRewardsGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ -export const ListHistoricalPrimaryNetworkRewardsGlobals$outboundSchema: z.ZodType< +export const ListHistoricalPrimaryNetworkRewardsGlobals$outboundSchema: + z.ZodType< ListHistoricalPrimaryNetworkRewardsGlobals$Outbound, z.ZodTypeDef, ListHistoricalPrimaryNetworkRewardsGlobals -> = z.object({ + > = z.object({ network: components.GlobalParamNetwork$outboundSchema.optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListHistoricalPrimaryNetworkRewardsGlobals$ { - /** @deprecated use `ListHistoricalPrimaryNetworkRewardsGlobals$inboundSchema` instead. */ - export const inboundSchema = ListHistoricalPrimaryNetworkRewardsGlobals$inboundSchema; - /** @deprecated use `ListHistoricalPrimaryNetworkRewardsGlobals$outboundSchema` instead. */ - export const outboundSchema = ListHistoricalPrimaryNetworkRewardsGlobals$outboundSchema; - /** @deprecated use `ListHistoricalPrimaryNetworkRewardsGlobals$Outbound` instead. */ - export type Outbound = ListHistoricalPrimaryNetworkRewardsGlobals$Outbound; + /** @deprecated use `ListHistoricalPrimaryNetworkRewardsGlobals$inboundSchema` instead. */ + export const inboundSchema = + ListHistoricalPrimaryNetworkRewardsGlobals$inboundSchema; + /** @deprecated use `ListHistoricalPrimaryNetworkRewardsGlobals$outboundSchema` instead. */ + export const outboundSchema = + ListHistoricalPrimaryNetworkRewardsGlobals$outboundSchema; + /** @deprecated use `ListHistoricalPrimaryNetworkRewardsGlobals$Outbound` instead. */ + export type Outbound = ListHistoricalPrimaryNetworkRewardsGlobals$Outbound; } /** @internal */ -export const ListHistoricalPrimaryNetworkRewardsRequest$inboundSchema: z.ZodType< - ListHistoricalPrimaryNetworkRewardsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - addresses: z.string().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - network: components.GlobalParamNetwork$inboundSchema.optional(), - nodeIds: z.string().optional(), - sortOrder: components.SortOrder$inboundSchema.optional(), - currency: components.CurrencyCode$inboundSchema.optional(), -}); +export const ListHistoricalPrimaryNetworkRewardsRequest$inboundSchema: + z.ZodType = + z.object({ + addresses: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + network: components.GlobalParamNetwork$inboundSchema.optional(), + nodeIds: z.string().optional(), + sortOrder: components.SortOrder$inboundSchema.optional(), + currency: components.CurrencyCode$inboundSchema.optional(), + }); /** @internal */ export type ListHistoricalPrimaryNetworkRewardsRequest$Outbound = { - addresses?: string | undefined; - pageToken?: string | undefined; - pageSize: number; - network?: string | undefined; - nodeIds?: string | undefined; - sortOrder?: string | undefined; - currency?: string | undefined; + addresses?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + network?: string | undefined; + nodeIds?: string | undefined; + sortOrder?: string | undefined; + currency?: string | undefined; }; /** @internal */ -export const ListHistoricalPrimaryNetworkRewardsRequest$outboundSchema: z.ZodType< +export const ListHistoricalPrimaryNetworkRewardsRequest$outboundSchema: + z.ZodType< ListHistoricalPrimaryNetworkRewardsRequest$Outbound, z.ZodTypeDef, ListHistoricalPrimaryNetworkRewardsRequest -> = z.object({ + > = z.object({ addresses: z.string().optional(), pageToken: z.string().optional(), pageSize: z.number().int().default(10), @@ -127,65 +127,67 @@ export const ListHistoricalPrimaryNetworkRewardsRequest$outboundSchema: z.ZodTyp nodeIds: z.string().optional(), sortOrder: components.SortOrder$outboundSchema.optional(), currency: components.CurrencyCode$outboundSchema.optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListHistoricalPrimaryNetworkRewardsRequest$ { - /** @deprecated use `ListHistoricalPrimaryNetworkRewardsRequest$inboundSchema` instead. */ - export const inboundSchema = ListHistoricalPrimaryNetworkRewardsRequest$inboundSchema; - /** @deprecated use `ListHistoricalPrimaryNetworkRewardsRequest$outboundSchema` instead. */ - export const outboundSchema = ListHistoricalPrimaryNetworkRewardsRequest$outboundSchema; - /** @deprecated use `ListHistoricalPrimaryNetworkRewardsRequest$Outbound` instead. */ - export type Outbound = ListHistoricalPrimaryNetworkRewardsRequest$Outbound; + /** @deprecated use `ListHistoricalPrimaryNetworkRewardsRequest$inboundSchema` instead. */ + export const inboundSchema = + ListHistoricalPrimaryNetworkRewardsRequest$inboundSchema; + /** @deprecated use `ListHistoricalPrimaryNetworkRewardsRequest$outboundSchema` instead. */ + export const outboundSchema = + ListHistoricalPrimaryNetworkRewardsRequest$outboundSchema; + /** @deprecated use `ListHistoricalPrimaryNetworkRewardsRequest$Outbound` instead. */ + export type Outbound = ListHistoricalPrimaryNetworkRewardsRequest$Outbound; } /** @internal */ -export const ListHistoricalPrimaryNetworkRewardsResponse$inboundSchema: z.ZodType< +export const ListHistoricalPrimaryNetworkRewardsResponse$inboundSchema: + z.ZodType< ListHistoricalPrimaryNetworkRewardsResponse, z.ZodTypeDef, unknown -> = z - .object({ - Result: components.ListHistoricalRewardsResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); + > = z.object({ + Result: components.ListHistoricalRewardsResponse$inboundSchema, + }).transform((v) => { + return remap$(v, { + "Result": "result", }); + }); /** @internal */ export type ListHistoricalPrimaryNetworkRewardsResponse$Outbound = { - Result: components.ListHistoricalRewardsResponse$Outbound; + Result: components.ListHistoricalRewardsResponse$Outbound; }; /** @internal */ -export const ListHistoricalPrimaryNetworkRewardsResponse$outboundSchema: z.ZodType< +export const ListHistoricalPrimaryNetworkRewardsResponse$outboundSchema: + z.ZodType< ListHistoricalPrimaryNetworkRewardsResponse$Outbound, z.ZodTypeDef, ListHistoricalPrimaryNetworkRewardsResponse -> = z - .object({ - result: components.ListHistoricalRewardsResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); + > = z.object({ + result: components.ListHistoricalRewardsResponse$outboundSchema, + }).transform((v) => { + return remap$(v, { + result: "Result", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListHistoricalPrimaryNetworkRewardsResponse$ { - /** @deprecated use `ListHistoricalPrimaryNetworkRewardsResponse$inboundSchema` instead. */ - export const inboundSchema = ListHistoricalPrimaryNetworkRewardsResponse$inboundSchema; - /** @deprecated use `ListHistoricalPrimaryNetworkRewardsResponse$outboundSchema` instead. */ - export const outboundSchema = ListHistoricalPrimaryNetworkRewardsResponse$outboundSchema; - /** @deprecated use `ListHistoricalPrimaryNetworkRewardsResponse$Outbound` instead. */ - export type Outbound = ListHistoricalPrimaryNetworkRewardsResponse$Outbound; + /** @deprecated use `ListHistoricalPrimaryNetworkRewardsResponse$inboundSchema` instead. */ + export const inboundSchema = + ListHistoricalPrimaryNetworkRewardsResponse$inboundSchema; + /** @deprecated use `ListHistoricalPrimaryNetworkRewardsResponse$outboundSchema` instead. */ + export const outboundSchema = + ListHistoricalPrimaryNetworkRewardsResponse$outboundSchema; + /** @deprecated use `ListHistoricalPrimaryNetworkRewardsResponse$Outbound` instead. */ + export type Outbound = ListHistoricalPrimaryNetworkRewardsResponse$Outbound; } diff --git a/src/models/operations/listinternaltransactions.ts b/src/models/operations/listinternaltransactions.ts index ec2a2c9..23e94b3 100644 --- a/src/models/operations/listinternaltransactions.ts +++ b/src/models/operations/listinternaltransactions.ts @@ -2,71 +2,73 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListInternalTransactionsServerList = ["https://glacier-api.avax.network"] as const; +export const ListInternalTransactionsServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListInternalTransactionsGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type ListInternalTransactionsRequest = { - /** - * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block. - */ - startBlock?: number | undefined; - /** - * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block. - */ - endBlock?: number | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * A wallet address. - */ - address: string; + /** + * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block. + */ + startBlock?: number | undefined; + /** + * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block. + */ + endBlock?: number | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * A wallet address. + */ + address: string; }; export type ListInternalTransactionsResponse = { - result: components.ListInternalTransactionsResponse; + result: components.ListInternalTransactionsResponse; }; /** @internal */ export const ListInternalTransactionsGlobals$inboundSchema: z.ZodType< - ListInternalTransactionsGlobals, - z.ZodTypeDef, - unknown + ListInternalTransactionsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type ListInternalTransactionsGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const ListInternalTransactionsGlobals$outboundSchema: z.ZodType< - ListInternalTransactionsGlobals$Outbound, - z.ZodTypeDef, - ListInternalTransactionsGlobals + ListInternalTransactionsGlobals$Outbound, + z.ZodTypeDef, + ListInternalTransactionsGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -74,50 +76,50 @@ export const ListInternalTransactionsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListInternalTransactionsGlobals$ { - /** @deprecated use `ListInternalTransactionsGlobals$inboundSchema` instead. */ - export const inboundSchema = ListInternalTransactionsGlobals$inboundSchema; - /** @deprecated use `ListInternalTransactionsGlobals$outboundSchema` instead. */ - export const outboundSchema = ListInternalTransactionsGlobals$outboundSchema; - /** @deprecated use `ListInternalTransactionsGlobals$Outbound` instead. */ - export type Outbound = ListInternalTransactionsGlobals$Outbound; + /** @deprecated use `ListInternalTransactionsGlobals$inboundSchema` instead. */ + export const inboundSchema = ListInternalTransactionsGlobals$inboundSchema; + /** @deprecated use `ListInternalTransactionsGlobals$outboundSchema` instead. */ + export const outboundSchema = ListInternalTransactionsGlobals$outboundSchema; + /** @deprecated use `ListInternalTransactionsGlobals$Outbound` instead. */ + export type Outbound = ListInternalTransactionsGlobals$Outbound; } /** @internal */ export const ListInternalTransactionsRequest$inboundSchema: z.ZodType< - ListInternalTransactionsRequest, - z.ZodTypeDef, - unknown + ListInternalTransactionsRequest, + z.ZodTypeDef, + unknown > = z.object({ - startBlock: z.number().optional(), - endBlock: z.number().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), + startBlock: z.number().optional(), + endBlock: z.number().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), }); /** @internal */ export type ListInternalTransactionsRequest$Outbound = { - startBlock?: number | undefined; - endBlock?: number | undefined; - pageToken?: string | undefined; - pageSize: number; - chainId?: string | undefined; - address: string; + startBlock?: number | undefined; + endBlock?: number | undefined; + pageToken?: string | undefined; + pageSize: number; + chainId?: string | undefined; + address: string; }; /** @internal */ export const ListInternalTransactionsRequest$outboundSchema: z.ZodType< - ListInternalTransactionsRequest$Outbound, - z.ZodTypeDef, - ListInternalTransactionsRequest + ListInternalTransactionsRequest$Outbound, + z.ZodTypeDef, + ListInternalTransactionsRequest > = z.object({ - startBlock: z.number().optional(), - endBlock: z.number().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), + startBlock: z.number().optional(), + endBlock: z.number().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), }); /** @@ -125,58 +127,54 @@ export const ListInternalTransactionsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListInternalTransactionsRequest$ { - /** @deprecated use `ListInternalTransactionsRequest$inboundSchema` instead. */ - export const inboundSchema = ListInternalTransactionsRequest$inboundSchema; - /** @deprecated use `ListInternalTransactionsRequest$outboundSchema` instead. */ - export const outboundSchema = ListInternalTransactionsRequest$outboundSchema; - /** @deprecated use `ListInternalTransactionsRequest$Outbound` instead. */ - export type Outbound = ListInternalTransactionsRequest$Outbound; + /** @deprecated use `ListInternalTransactionsRequest$inboundSchema` instead. */ + export const inboundSchema = ListInternalTransactionsRequest$inboundSchema; + /** @deprecated use `ListInternalTransactionsRequest$outboundSchema` instead. */ + export const outboundSchema = ListInternalTransactionsRequest$outboundSchema; + /** @deprecated use `ListInternalTransactionsRequest$Outbound` instead. */ + export type Outbound = ListInternalTransactionsRequest$Outbound; } /** @internal */ export const ListInternalTransactionsResponse$inboundSchema: z.ZodType< - ListInternalTransactionsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListInternalTransactionsResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListInternalTransactionsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListInternalTransactionsResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListInternalTransactionsResponse$Outbound = { - Result: components.ListInternalTransactionsResponse$Outbound; + Result: components.ListInternalTransactionsResponse$Outbound; }; /** @internal */ export const ListInternalTransactionsResponse$outboundSchema: z.ZodType< - ListInternalTransactionsResponse$Outbound, - z.ZodTypeDef, - ListInternalTransactionsResponse -> = z - .object({ - result: components.ListInternalTransactionsResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListInternalTransactionsResponse$Outbound, + z.ZodTypeDef, + ListInternalTransactionsResponse +> = z.object({ + result: components.ListInternalTransactionsResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListInternalTransactionsResponse$ { - /** @deprecated use `ListInternalTransactionsResponse$inboundSchema` instead. */ - export const inboundSchema = ListInternalTransactionsResponse$inboundSchema; - /** @deprecated use `ListInternalTransactionsResponse$outboundSchema` instead. */ - export const outboundSchema = ListInternalTransactionsResponse$outboundSchema; - /** @deprecated use `ListInternalTransactionsResponse$Outbound` instead. */ - export type Outbound = ListInternalTransactionsResponse$Outbound; + /** @deprecated use `ListInternalTransactionsResponse$inboundSchema` instead. */ + export const inboundSchema = ListInternalTransactionsResponse$inboundSchema; + /** @deprecated use `ListInternalTransactionsResponse$outboundSchema` instead. */ + export const outboundSchema = ListInternalTransactionsResponse$outboundSchema; + /** @deprecated use `ListInternalTransactionsResponse$Outbound` instead. */ + export type Outbound = ListInternalTransactionsResponse$Outbound; } diff --git a/src/models/operations/listlatestprimarynetworkblocks.ts b/src/models/operations/listlatestprimarynetworkblocks.ts index 295f86a..03a9cbc 100644 --- a/src/models/operations/listlatestprimarynetworkblocks.ts +++ b/src/models/operations/listlatestprimarynetworkblocks.ts @@ -2,65 +2,65 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; export const ListLatestPrimaryNetworkBlocksServerList = [ - "https://glacier-api.avax.network", + "https://glacier-api.avax.network", ] as const; export type ListLatestPrimaryNetworkBlocksGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type ListLatestPrimaryNetworkBlocksRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A primary network blockchain id or alias. - */ - blockchainId: components.BlockchainId; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A primary network blockchain id or alias. + */ + blockchainId: components.BlockchainId; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type ListLatestPrimaryNetworkBlocksResponse = { - result: components.ListPrimaryNetworkBlocksResponse; + result: components.ListPrimaryNetworkBlocksResponse; }; /** @internal */ export const ListLatestPrimaryNetworkBlocksGlobals$inboundSchema: z.ZodType< - ListLatestPrimaryNetworkBlocksGlobals, - z.ZodTypeDef, - unknown + ListLatestPrimaryNetworkBlocksGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type ListLatestPrimaryNetworkBlocksGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const ListLatestPrimaryNetworkBlocksGlobals$outboundSchema: z.ZodType< - ListLatestPrimaryNetworkBlocksGlobals$Outbound, - z.ZodTypeDef, - ListLatestPrimaryNetworkBlocksGlobals + ListLatestPrimaryNetworkBlocksGlobals$Outbound, + z.ZodTypeDef, + ListLatestPrimaryNetworkBlocksGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -68,44 +68,46 @@ export const ListLatestPrimaryNetworkBlocksGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestPrimaryNetworkBlocksGlobals$ { - /** @deprecated use `ListLatestPrimaryNetworkBlocksGlobals$inboundSchema` instead. */ - export const inboundSchema = ListLatestPrimaryNetworkBlocksGlobals$inboundSchema; - /** @deprecated use `ListLatestPrimaryNetworkBlocksGlobals$outboundSchema` instead. */ - export const outboundSchema = ListLatestPrimaryNetworkBlocksGlobals$outboundSchema; - /** @deprecated use `ListLatestPrimaryNetworkBlocksGlobals$Outbound` instead. */ - export type Outbound = ListLatestPrimaryNetworkBlocksGlobals$Outbound; + /** @deprecated use `ListLatestPrimaryNetworkBlocksGlobals$inboundSchema` instead. */ + export const inboundSchema = + ListLatestPrimaryNetworkBlocksGlobals$inboundSchema; + /** @deprecated use `ListLatestPrimaryNetworkBlocksGlobals$outboundSchema` instead. */ + export const outboundSchema = + ListLatestPrimaryNetworkBlocksGlobals$outboundSchema; + /** @deprecated use `ListLatestPrimaryNetworkBlocksGlobals$Outbound` instead. */ + export type Outbound = ListLatestPrimaryNetworkBlocksGlobals$Outbound; } /** @internal */ export const ListLatestPrimaryNetworkBlocksRequest$inboundSchema: z.ZodType< - ListLatestPrimaryNetworkBlocksRequest, - z.ZodTypeDef, - unknown + ListLatestPrimaryNetworkBlocksRequest, + z.ZodTypeDef, + unknown > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - blockchainId: components.BlockchainId$inboundSchema, - network: components.GlobalParamNetwork$inboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + blockchainId: components.BlockchainId$inboundSchema, + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type ListLatestPrimaryNetworkBlocksRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - blockchainId: string; - network?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + blockchainId: string; + network?: string | undefined; }; /** @internal */ export const ListLatestPrimaryNetworkBlocksRequest$outboundSchema: z.ZodType< - ListLatestPrimaryNetworkBlocksRequest$Outbound, - z.ZodTypeDef, - ListLatestPrimaryNetworkBlocksRequest + ListLatestPrimaryNetworkBlocksRequest$Outbound, + z.ZodTypeDef, + ListLatestPrimaryNetworkBlocksRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - blockchainId: components.BlockchainId$outboundSchema, - network: components.GlobalParamNetwork$outboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + blockchainId: components.BlockchainId$outboundSchema, + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -113,58 +115,58 @@ export const ListLatestPrimaryNetworkBlocksRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestPrimaryNetworkBlocksRequest$ { - /** @deprecated use `ListLatestPrimaryNetworkBlocksRequest$inboundSchema` instead. */ - export const inboundSchema = ListLatestPrimaryNetworkBlocksRequest$inboundSchema; - /** @deprecated use `ListLatestPrimaryNetworkBlocksRequest$outboundSchema` instead. */ - export const outboundSchema = ListLatestPrimaryNetworkBlocksRequest$outboundSchema; - /** @deprecated use `ListLatestPrimaryNetworkBlocksRequest$Outbound` instead. */ - export type Outbound = ListLatestPrimaryNetworkBlocksRequest$Outbound; + /** @deprecated use `ListLatestPrimaryNetworkBlocksRequest$inboundSchema` instead. */ + export const inboundSchema = + ListLatestPrimaryNetworkBlocksRequest$inboundSchema; + /** @deprecated use `ListLatestPrimaryNetworkBlocksRequest$outboundSchema` instead. */ + export const outboundSchema = + ListLatestPrimaryNetworkBlocksRequest$outboundSchema; + /** @deprecated use `ListLatestPrimaryNetworkBlocksRequest$Outbound` instead. */ + export type Outbound = ListLatestPrimaryNetworkBlocksRequest$Outbound; } /** @internal */ export const ListLatestPrimaryNetworkBlocksResponse$inboundSchema: z.ZodType< - ListLatestPrimaryNetworkBlocksResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListPrimaryNetworkBlocksResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListLatestPrimaryNetworkBlocksResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListPrimaryNetworkBlocksResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListLatestPrimaryNetworkBlocksResponse$Outbound = { - Result: components.ListPrimaryNetworkBlocksResponse$Outbound; + Result: components.ListPrimaryNetworkBlocksResponse$Outbound; }; /** @internal */ export const ListLatestPrimaryNetworkBlocksResponse$outboundSchema: z.ZodType< - ListLatestPrimaryNetworkBlocksResponse$Outbound, - z.ZodTypeDef, - ListLatestPrimaryNetworkBlocksResponse -> = z - .object({ - result: components.ListPrimaryNetworkBlocksResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListLatestPrimaryNetworkBlocksResponse$Outbound, + z.ZodTypeDef, + ListLatestPrimaryNetworkBlocksResponse +> = z.object({ + result: components.ListPrimaryNetworkBlocksResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestPrimaryNetworkBlocksResponse$ { - /** @deprecated use `ListLatestPrimaryNetworkBlocksResponse$inboundSchema` instead. */ - export const inboundSchema = ListLatestPrimaryNetworkBlocksResponse$inboundSchema; - /** @deprecated use `ListLatestPrimaryNetworkBlocksResponse$outboundSchema` instead. */ - export const outboundSchema = ListLatestPrimaryNetworkBlocksResponse$outboundSchema; - /** @deprecated use `ListLatestPrimaryNetworkBlocksResponse$Outbound` instead. */ - export type Outbound = ListLatestPrimaryNetworkBlocksResponse$Outbound; + /** @deprecated use `ListLatestPrimaryNetworkBlocksResponse$inboundSchema` instead. */ + export const inboundSchema = + ListLatestPrimaryNetworkBlocksResponse$inboundSchema; + /** @deprecated use `ListLatestPrimaryNetworkBlocksResponse$outboundSchema` instead. */ + export const outboundSchema = + ListLatestPrimaryNetworkBlocksResponse$outboundSchema; + /** @deprecated use `ListLatestPrimaryNetworkBlocksResponse$Outbound` instead. */ + export type Outbound = ListLatestPrimaryNetworkBlocksResponse$Outbound; } diff --git a/src/models/operations/listlatestprimarynetworktransactions.ts b/src/models/operations/listlatestprimarynetworktransactions.ts index 4ab2b9b..e9d885b 100644 --- a/src/models/operations/listlatestprimarynetworktransactions.ts +++ b/src/models/operations/listlatestprimarynetworktransactions.ts @@ -2,117 +2,122 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; export const ListLatestPrimaryNetworkTransactionsServerList = [ - "https://glacier-api.avax.network", + "https://glacier-api.avax.network", ] as const; export type ListLatestPrimaryNetworkTransactionsGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type ListLatestPrimaryNetworkTransactionsRequest = { - /** - * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji". Also accepts EVM formatted addresses starting with "0x" for C-Chain-related atomic transaction lookups. - */ - addresses: string; - /** - * Query param for filtering items based on transaction types. - */ - txTypes?: Array | undefined; - /** - * Query param for retrieving items after a specific timestamp. - */ - startTimestamp?: number | undefined; - /** - * Query param for retrieving items before a specific timestamp. - */ - endTimestamp?: number | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A primary network blockchain id or alias. - */ - blockchainId: components.BlockchainId; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; - /** - * 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. - */ - sortOrder?: components.SortOrder | undefined; + /** + * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji". Also accepts EVM formatted addresses starting with "0x" for C-Chain-related atomic transaction lookups. + */ + addresses: string; + /** + * Query param for filtering items based on transaction types. + */ + txTypes?: Array | undefined; + /** + * Query param for retrieving items after a specific timestamp. + */ + startTimestamp?: number | undefined; + /** + * Query param for retrieving items before a specific timestamp. + */ + endTimestamp?: number | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A primary network blockchain id or alias. + */ + blockchainId: components.BlockchainId; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; + /** + * 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. + */ + sortOrder?: components.SortOrder | undefined; }; /** * Successful response */ export type ListLatestPrimaryNetworkTransactionsResponseBody = + | components.ListPChainTransactionsResponse + | components.ListXChainTransactionsResponse + | components.ListCChainAtomicTransactionsResponse; + +export type ListLatestPrimaryNetworkTransactionsResponse = { + result: | components.ListPChainTransactionsResponse | components.ListXChainTransactionsResponse | components.ListCChainAtomicTransactionsResponse; - -export type ListLatestPrimaryNetworkTransactionsResponse = { - result: - | components.ListPChainTransactionsResponse - | components.ListXChainTransactionsResponse - | components.ListCChainAtomicTransactionsResponse; }; /** @internal */ -export const ListLatestPrimaryNetworkTransactionsGlobals$inboundSchema: z.ZodType< +export const ListLatestPrimaryNetworkTransactionsGlobals$inboundSchema: + z.ZodType< ListLatestPrimaryNetworkTransactionsGlobals, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ network: components.GlobalParamNetwork$inboundSchema.optional(), -}); + }); /** @internal */ export type ListLatestPrimaryNetworkTransactionsGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ -export const ListLatestPrimaryNetworkTransactionsGlobals$outboundSchema: z.ZodType< +export const ListLatestPrimaryNetworkTransactionsGlobals$outboundSchema: + z.ZodType< ListLatestPrimaryNetworkTransactionsGlobals$Outbound, z.ZodTypeDef, ListLatestPrimaryNetworkTransactionsGlobals -> = z.object({ + > = z.object({ network: components.GlobalParamNetwork$outboundSchema.optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestPrimaryNetworkTransactionsGlobals$ { - /** @deprecated use `ListLatestPrimaryNetworkTransactionsGlobals$inboundSchema` instead. */ - export const inboundSchema = ListLatestPrimaryNetworkTransactionsGlobals$inboundSchema; - /** @deprecated use `ListLatestPrimaryNetworkTransactionsGlobals$outboundSchema` instead. */ - export const outboundSchema = ListLatestPrimaryNetworkTransactionsGlobals$outboundSchema; - /** @deprecated use `ListLatestPrimaryNetworkTransactionsGlobals$Outbound` instead. */ - export type Outbound = ListLatestPrimaryNetworkTransactionsGlobals$Outbound; + /** @deprecated use `ListLatestPrimaryNetworkTransactionsGlobals$inboundSchema` instead. */ + export const inboundSchema = + ListLatestPrimaryNetworkTransactionsGlobals$inboundSchema; + /** @deprecated use `ListLatestPrimaryNetworkTransactionsGlobals$outboundSchema` instead. */ + export const outboundSchema = + ListLatestPrimaryNetworkTransactionsGlobals$outboundSchema; + /** @deprecated use `ListLatestPrimaryNetworkTransactionsGlobals$Outbound` instead. */ + export type Outbound = ListLatestPrimaryNetworkTransactionsGlobals$Outbound; } /** @internal */ -export const ListLatestPrimaryNetworkTransactionsRequest$inboundSchema: z.ZodType< +export const ListLatestPrimaryNetworkTransactionsRequest$inboundSchema: + z.ZodType< ListLatestPrimaryNetworkTransactionsRequest, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ addresses: z.string(), txTypes: z.array(components.PrimaryNetworkTxType$inboundSchema).optional(), startTimestamp: z.number().int().optional(), @@ -122,27 +127,28 @@ export const ListLatestPrimaryNetworkTransactionsRequest$inboundSchema: z.ZodTyp blockchainId: components.BlockchainId$inboundSchema, network: components.GlobalParamNetwork$inboundSchema.optional(), sortOrder: components.SortOrder$inboundSchema.optional(), -}); + }); /** @internal */ export type ListLatestPrimaryNetworkTransactionsRequest$Outbound = { - addresses: string; - txTypes?: Array | undefined; - startTimestamp?: number | undefined; - endTimestamp?: number | undefined; - pageToken?: string | undefined; - pageSize: number; - blockchainId: string; - network?: string | undefined; - sortOrder?: string | undefined; + addresses: string; + txTypes?: Array | undefined; + startTimestamp?: number | undefined; + endTimestamp?: number | undefined; + pageToken?: string | undefined; + pageSize: number; + blockchainId: string; + network?: string | undefined; + sortOrder?: string | undefined; }; /** @internal */ -export const ListLatestPrimaryNetworkTransactionsRequest$outboundSchema: z.ZodType< +export const ListLatestPrimaryNetworkTransactionsRequest$outboundSchema: + z.ZodType< ListLatestPrimaryNetworkTransactionsRequest$Outbound, z.ZodTypeDef, ListLatestPrimaryNetworkTransactionsRequest -> = z.object({ + > = z.object({ addresses: z.string(), txTypes: z.array(components.PrimaryNetworkTxType$outboundSchema).optional(), startTimestamp: z.number().int().optional(), @@ -152,117 +158,124 @@ export const ListLatestPrimaryNetworkTransactionsRequest$outboundSchema: z.ZodTy blockchainId: components.BlockchainId$outboundSchema, network: components.GlobalParamNetwork$outboundSchema.optional(), sortOrder: components.SortOrder$outboundSchema.optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestPrimaryNetworkTransactionsRequest$ { - /** @deprecated use `ListLatestPrimaryNetworkTransactionsRequest$inboundSchema` instead. */ - export const inboundSchema = ListLatestPrimaryNetworkTransactionsRequest$inboundSchema; - /** @deprecated use `ListLatestPrimaryNetworkTransactionsRequest$outboundSchema` instead. */ - export const outboundSchema = ListLatestPrimaryNetworkTransactionsRequest$outboundSchema; - /** @deprecated use `ListLatestPrimaryNetworkTransactionsRequest$Outbound` instead. */ - export type Outbound = ListLatestPrimaryNetworkTransactionsRequest$Outbound; + /** @deprecated use `ListLatestPrimaryNetworkTransactionsRequest$inboundSchema` instead. */ + export const inboundSchema = + ListLatestPrimaryNetworkTransactionsRequest$inboundSchema; + /** @deprecated use `ListLatestPrimaryNetworkTransactionsRequest$outboundSchema` instead. */ + export const outboundSchema = + ListLatestPrimaryNetworkTransactionsRequest$outboundSchema; + /** @deprecated use `ListLatestPrimaryNetworkTransactionsRequest$Outbound` instead. */ + export type Outbound = ListLatestPrimaryNetworkTransactionsRequest$Outbound; } /** @internal */ -export const ListLatestPrimaryNetworkTransactionsResponseBody$inboundSchema: z.ZodType< +export const ListLatestPrimaryNetworkTransactionsResponseBody$inboundSchema: + z.ZodType< ListLatestPrimaryNetworkTransactionsResponseBody, z.ZodTypeDef, unknown -> = z.union([ + > = z.union([ components.ListPChainTransactionsResponse$inboundSchema, components.ListXChainTransactionsResponse$inboundSchema, components.ListCChainAtomicTransactionsResponse$inboundSchema, -]); + ]); /** @internal */ export type ListLatestPrimaryNetworkTransactionsResponseBody$Outbound = - | components.ListPChainTransactionsResponse$Outbound - | components.ListXChainTransactionsResponse$Outbound - | components.ListCChainAtomicTransactionsResponse$Outbound; + | components.ListPChainTransactionsResponse$Outbound + | components.ListXChainTransactionsResponse$Outbound + | components.ListCChainAtomicTransactionsResponse$Outbound; /** @internal */ -export const ListLatestPrimaryNetworkTransactionsResponseBody$outboundSchema: z.ZodType< +export const ListLatestPrimaryNetworkTransactionsResponseBody$outboundSchema: + z.ZodType< ListLatestPrimaryNetworkTransactionsResponseBody$Outbound, z.ZodTypeDef, ListLatestPrimaryNetworkTransactionsResponseBody -> = z.union([ + > = z.union([ components.ListPChainTransactionsResponse$outboundSchema, components.ListXChainTransactionsResponse$outboundSchema, components.ListCChainAtomicTransactionsResponse$outboundSchema, -]); + ]); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestPrimaryNetworkTransactionsResponseBody$ { - /** @deprecated use `ListLatestPrimaryNetworkTransactionsResponseBody$inboundSchema` instead. */ - export const inboundSchema = ListLatestPrimaryNetworkTransactionsResponseBody$inboundSchema; - /** @deprecated use `ListLatestPrimaryNetworkTransactionsResponseBody$outboundSchema` instead. */ - export const outboundSchema = ListLatestPrimaryNetworkTransactionsResponseBody$outboundSchema; - /** @deprecated use `ListLatestPrimaryNetworkTransactionsResponseBody$Outbound` instead. */ - export type Outbound = ListLatestPrimaryNetworkTransactionsResponseBody$Outbound; + /** @deprecated use `ListLatestPrimaryNetworkTransactionsResponseBody$inboundSchema` instead. */ + export const inboundSchema = + ListLatestPrimaryNetworkTransactionsResponseBody$inboundSchema; + /** @deprecated use `ListLatestPrimaryNetworkTransactionsResponseBody$outboundSchema` instead. */ + export const outboundSchema = + ListLatestPrimaryNetworkTransactionsResponseBody$outboundSchema; + /** @deprecated use `ListLatestPrimaryNetworkTransactionsResponseBody$Outbound` instead. */ + export type Outbound = + ListLatestPrimaryNetworkTransactionsResponseBody$Outbound; } /** @internal */ -export const ListLatestPrimaryNetworkTransactionsResponse$inboundSchema: z.ZodType< +export const ListLatestPrimaryNetworkTransactionsResponse$inboundSchema: + z.ZodType< ListLatestPrimaryNetworkTransactionsResponse, z.ZodTypeDef, unknown -> = z - .object({ - Result: z.union([ - components.ListPChainTransactionsResponse$inboundSchema, - components.ListXChainTransactionsResponse$inboundSchema, - components.ListCChainAtomicTransactionsResponse$inboundSchema, - ]), - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); + > = z.object({ + Result: z.union([ + components.ListPChainTransactionsResponse$inboundSchema, + components.ListXChainTransactionsResponse$inboundSchema, + components.ListCChainAtomicTransactionsResponse$inboundSchema, + ]), + }).transform((v) => { + return remap$(v, { + "Result": "result", }); + }); /** @internal */ export type ListLatestPrimaryNetworkTransactionsResponse$Outbound = { - Result: - | components.ListPChainTransactionsResponse$Outbound - | components.ListXChainTransactionsResponse$Outbound - | components.ListCChainAtomicTransactionsResponse$Outbound; + Result: + | components.ListPChainTransactionsResponse$Outbound + | components.ListXChainTransactionsResponse$Outbound + | components.ListCChainAtomicTransactionsResponse$Outbound; }; /** @internal */ -export const ListLatestPrimaryNetworkTransactionsResponse$outboundSchema: z.ZodType< +export const ListLatestPrimaryNetworkTransactionsResponse$outboundSchema: + z.ZodType< ListLatestPrimaryNetworkTransactionsResponse$Outbound, z.ZodTypeDef, ListLatestPrimaryNetworkTransactionsResponse -> = z - .object({ - result: z.union([ - components.ListPChainTransactionsResponse$outboundSchema, - components.ListXChainTransactionsResponse$outboundSchema, - components.ListCChainAtomicTransactionsResponse$outboundSchema, - ]), - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); + > = z.object({ + result: z.union([ + components.ListPChainTransactionsResponse$outboundSchema, + components.ListXChainTransactionsResponse$outboundSchema, + components.ListCChainAtomicTransactionsResponse$outboundSchema, + ]), + }).transform((v) => { + return remap$(v, { + result: "Result", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestPrimaryNetworkTransactionsResponse$ { - /** @deprecated use `ListLatestPrimaryNetworkTransactionsResponse$inboundSchema` instead. */ - export const inboundSchema = ListLatestPrimaryNetworkTransactionsResponse$inboundSchema; - /** @deprecated use `ListLatestPrimaryNetworkTransactionsResponse$outboundSchema` instead. */ - export const outboundSchema = ListLatestPrimaryNetworkTransactionsResponse$outboundSchema; - /** @deprecated use `ListLatestPrimaryNetworkTransactionsResponse$Outbound` instead. */ - export type Outbound = ListLatestPrimaryNetworkTransactionsResponse$Outbound; + /** @deprecated use `ListLatestPrimaryNetworkTransactionsResponse$inboundSchema` instead. */ + export const inboundSchema = + ListLatestPrimaryNetworkTransactionsResponse$inboundSchema; + /** @deprecated use `ListLatestPrimaryNetworkTransactionsResponse$outboundSchema` instead. */ + export const outboundSchema = + ListLatestPrimaryNetworkTransactionsResponse$outboundSchema; + /** @deprecated use `ListLatestPrimaryNetworkTransactionsResponse$Outbound` instead. */ + export type Outbound = ListLatestPrimaryNetworkTransactionsResponse$Outbound; } diff --git a/src/models/operations/listlatesttransactions.ts b/src/models/operations/listlatesttransactions.ts index e2d5a50..54a4ef3 100644 --- a/src/models/operations/listlatesttransactions.ts +++ b/src/models/operations/listlatesttransactions.ts @@ -2,63 +2,65 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListLatestTransactionsServerList = ["https://glacier-api.avax.network"] as const; +export const ListLatestTransactionsServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListLatestTransactionsGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type ListLatestTransactionsRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * A status filter for listed transactions. - */ - status?: components.TransactionStatus | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * A status filter for listed transactions. + */ + status?: components.TransactionStatus | undefined; }; export type ListLatestTransactionsResponse = { - result: components.ListNativeTransactionsResponse; + result: components.ListNativeTransactionsResponse; }; /** @internal */ export const ListLatestTransactionsGlobals$inboundSchema: z.ZodType< - ListLatestTransactionsGlobals, - z.ZodTypeDef, - unknown + ListLatestTransactionsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type ListLatestTransactionsGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const ListLatestTransactionsGlobals$outboundSchema: z.ZodType< - ListLatestTransactionsGlobals$Outbound, - z.ZodTypeDef, - ListLatestTransactionsGlobals + ListLatestTransactionsGlobals$Outbound, + z.ZodTypeDef, + ListLatestTransactionsGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -66,44 +68,44 @@ export const ListLatestTransactionsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestTransactionsGlobals$ { - /** @deprecated use `ListLatestTransactionsGlobals$inboundSchema` instead. */ - export const inboundSchema = ListLatestTransactionsGlobals$inboundSchema; - /** @deprecated use `ListLatestTransactionsGlobals$outboundSchema` instead. */ - export const outboundSchema = ListLatestTransactionsGlobals$outboundSchema; - /** @deprecated use `ListLatestTransactionsGlobals$Outbound` instead. */ - export type Outbound = ListLatestTransactionsGlobals$Outbound; + /** @deprecated use `ListLatestTransactionsGlobals$inboundSchema` instead. */ + export const inboundSchema = ListLatestTransactionsGlobals$inboundSchema; + /** @deprecated use `ListLatestTransactionsGlobals$outboundSchema` instead. */ + export const outboundSchema = ListLatestTransactionsGlobals$outboundSchema; + /** @deprecated use `ListLatestTransactionsGlobals$Outbound` instead. */ + export type Outbound = ListLatestTransactionsGlobals$Outbound; } /** @internal */ export const ListLatestTransactionsRequest$inboundSchema: z.ZodType< - ListLatestTransactionsRequest, - z.ZodTypeDef, - unknown + ListLatestTransactionsRequest, + z.ZodTypeDef, + unknown > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - status: components.TransactionStatus$inboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + status: components.TransactionStatus$inboundSchema.optional(), }); /** @internal */ export type ListLatestTransactionsRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - chainId?: string | undefined; - status?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + chainId?: string | undefined; + status?: string | undefined; }; /** @internal */ export const ListLatestTransactionsRequest$outboundSchema: z.ZodType< - ListLatestTransactionsRequest$Outbound, - z.ZodTypeDef, - ListLatestTransactionsRequest + ListLatestTransactionsRequest$Outbound, + z.ZodTypeDef, + ListLatestTransactionsRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - status: components.TransactionStatus$outboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + status: components.TransactionStatus$outboundSchema.optional(), }); /** @@ -111,58 +113,54 @@ export const ListLatestTransactionsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestTransactionsRequest$ { - /** @deprecated use `ListLatestTransactionsRequest$inboundSchema` instead. */ - export const inboundSchema = ListLatestTransactionsRequest$inboundSchema; - /** @deprecated use `ListLatestTransactionsRequest$outboundSchema` instead. */ - export const outboundSchema = ListLatestTransactionsRequest$outboundSchema; - /** @deprecated use `ListLatestTransactionsRequest$Outbound` instead. */ - export type Outbound = ListLatestTransactionsRequest$Outbound; + /** @deprecated use `ListLatestTransactionsRequest$inboundSchema` instead. */ + export const inboundSchema = ListLatestTransactionsRequest$inboundSchema; + /** @deprecated use `ListLatestTransactionsRequest$outboundSchema` instead. */ + export const outboundSchema = ListLatestTransactionsRequest$outboundSchema; + /** @deprecated use `ListLatestTransactionsRequest$Outbound` instead. */ + export type Outbound = ListLatestTransactionsRequest$Outbound; } /** @internal */ export const ListLatestTransactionsResponse$inboundSchema: z.ZodType< - ListLatestTransactionsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListNativeTransactionsResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListLatestTransactionsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListNativeTransactionsResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListLatestTransactionsResponse$Outbound = { - Result: components.ListNativeTransactionsResponse$Outbound; + Result: components.ListNativeTransactionsResponse$Outbound; }; /** @internal */ export const ListLatestTransactionsResponse$outboundSchema: z.ZodType< - ListLatestTransactionsResponse$Outbound, - z.ZodTypeDef, - ListLatestTransactionsResponse -> = z - .object({ - result: components.ListNativeTransactionsResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListLatestTransactionsResponse$Outbound, + z.ZodTypeDef, + ListLatestTransactionsResponse +> = z.object({ + result: components.ListNativeTransactionsResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestTransactionsResponse$ { - /** @deprecated use `ListLatestTransactionsResponse$inboundSchema` instead. */ - export const inboundSchema = ListLatestTransactionsResponse$inboundSchema; - /** @deprecated use `ListLatestTransactionsResponse$outboundSchema` instead. */ - export const outboundSchema = ListLatestTransactionsResponse$outboundSchema; - /** @deprecated use `ListLatestTransactionsResponse$Outbound` instead. */ - export type Outbound = ListLatestTransactionsResponse$Outbound; + /** @deprecated use `ListLatestTransactionsResponse$inboundSchema` instead. */ + export const inboundSchema = ListLatestTransactionsResponse$inboundSchema; + /** @deprecated use `ListLatestTransactionsResponse$outboundSchema` instead. */ + export const outboundSchema = ListLatestTransactionsResponse$outboundSchema; + /** @deprecated use `ListLatestTransactionsResponse$Outbound` instead. */ + export type Outbound = ListLatestTransactionsResponse$Outbound; } diff --git a/src/models/operations/listlatestxchainvertices.ts b/src/models/operations/listlatestxchainvertices.ts index 017bd36..15d2f72 100644 --- a/src/models/operations/listlatestxchainvertices.ts +++ b/src/models/operations/listlatestxchainvertices.ts @@ -2,63 +2,65 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListLatestXChainVerticesServerList = ["https://glacier-api.avax.network"] as const; +export const ListLatestXChainVerticesServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListLatestXChainVerticesGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type ListLatestXChainVerticesRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A primary network blockchain id or alias. - */ - blockchainId: components.XChainId; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A primary network blockchain id or alias. + */ + blockchainId: components.XChainId; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type ListLatestXChainVerticesResponse = { - result: components.ListXChainVerticesResponse; + result: components.ListXChainVerticesResponse; }; /** @internal */ export const ListLatestXChainVerticesGlobals$inboundSchema: z.ZodType< - ListLatestXChainVerticesGlobals, - z.ZodTypeDef, - unknown + ListLatestXChainVerticesGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type ListLatestXChainVerticesGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const ListLatestXChainVerticesGlobals$outboundSchema: z.ZodType< - ListLatestXChainVerticesGlobals$Outbound, - z.ZodTypeDef, - ListLatestXChainVerticesGlobals + ListLatestXChainVerticesGlobals$Outbound, + z.ZodTypeDef, + ListLatestXChainVerticesGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -66,44 +68,44 @@ export const ListLatestXChainVerticesGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestXChainVerticesGlobals$ { - /** @deprecated use `ListLatestXChainVerticesGlobals$inboundSchema` instead. */ - export const inboundSchema = ListLatestXChainVerticesGlobals$inboundSchema; - /** @deprecated use `ListLatestXChainVerticesGlobals$outboundSchema` instead. */ - export const outboundSchema = ListLatestXChainVerticesGlobals$outboundSchema; - /** @deprecated use `ListLatestXChainVerticesGlobals$Outbound` instead. */ - export type Outbound = ListLatestXChainVerticesGlobals$Outbound; + /** @deprecated use `ListLatestXChainVerticesGlobals$inboundSchema` instead. */ + export const inboundSchema = ListLatestXChainVerticesGlobals$inboundSchema; + /** @deprecated use `ListLatestXChainVerticesGlobals$outboundSchema` instead. */ + export const outboundSchema = ListLatestXChainVerticesGlobals$outboundSchema; + /** @deprecated use `ListLatestXChainVerticesGlobals$Outbound` instead. */ + export type Outbound = ListLatestXChainVerticesGlobals$Outbound; } /** @internal */ export const ListLatestXChainVerticesRequest$inboundSchema: z.ZodType< - ListLatestXChainVerticesRequest, - z.ZodTypeDef, - unknown + ListLatestXChainVerticesRequest, + z.ZodTypeDef, + unknown > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - blockchainId: components.XChainId$inboundSchema, - network: components.GlobalParamNetwork$inboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + blockchainId: components.XChainId$inboundSchema, + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type ListLatestXChainVerticesRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - blockchainId: string; - network?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + blockchainId: string; + network?: string | undefined; }; /** @internal */ export const ListLatestXChainVerticesRequest$outboundSchema: z.ZodType< - ListLatestXChainVerticesRequest$Outbound, - z.ZodTypeDef, - ListLatestXChainVerticesRequest + ListLatestXChainVerticesRequest$Outbound, + z.ZodTypeDef, + ListLatestXChainVerticesRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - blockchainId: components.XChainId$outboundSchema, - network: components.GlobalParamNetwork$outboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + blockchainId: components.XChainId$outboundSchema, + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -111,58 +113,54 @@ export const ListLatestXChainVerticesRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestXChainVerticesRequest$ { - /** @deprecated use `ListLatestXChainVerticesRequest$inboundSchema` instead. */ - export const inboundSchema = ListLatestXChainVerticesRequest$inboundSchema; - /** @deprecated use `ListLatestXChainVerticesRequest$outboundSchema` instead. */ - export const outboundSchema = ListLatestXChainVerticesRequest$outboundSchema; - /** @deprecated use `ListLatestXChainVerticesRequest$Outbound` instead. */ - export type Outbound = ListLatestXChainVerticesRequest$Outbound; + /** @deprecated use `ListLatestXChainVerticesRequest$inboundSchema` instead. */ + export const inboundSchema = ListLatestXChainVerticesRequest$inboundSchema; + /** @deprecated use `ListLatestXChainVerticesRequest$outboundSchema` instead. */ + export const outboundSchema = ListLatestXChainVerticesRequest$outboundSchema; + /** @deprecated use `ListLatestXChainVerticesRequest$Outbound` instead. */ + export type Outbound = ListLatestXChainVerticesRequest$Outbound; } /** @internal */ export const ListLatestXChainVerticesResponse$inboundSchema: z.ZodType< - ListLatestXChainVerticesResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListXChainVerticesResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListLatestXChainVerticesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListXChainVerticesResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListLatestXChainVerticesResponse$Outbound = { - Result: components.ListXChainVerticesResponse$Outbound; + Result: components.ListXChainVerticesResponse$Outbound; }; /** @internal */ export const ListLatestXChainVerticesResponse$outboundSchema: z.ZodType< - ListLatestXChainVerticesResponse$Outbound, - z.ZodTypeDef, - ListLatestXChainVerticesResponse -> = z - .object({ - result: components.ListXChainVerticesResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListLatestXChainVerticesResponse$Outbound, + z.ZodTypeDef, + ListLatestXChainVerticesResponse +> = z.object({ + result: components.ListXChainVerticesResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestXChainVerticesResponse$ { - /** @deprecated use `ListLatestXChainVerticesResponse$inboundSchema` instead. */ - export const inboundSchema = ListLatestXChainVerticesResponse$inboundSchema; - /** @deprecated use `ListLatestXChainVerticesResponse$outboundSchema` instead. */ - export const outboundSchema = ListLatestXChainVerticesResponse$outboundSchema; - /** @deprecated use `ListLatestXChainVerticesResponse$Outbound` instead. */ - export type Outbound = ListLatestXChainVerticesResponse$Outbound; + /** @deprecated use `ListLatestXChainVerticesResponse$inboundSchema` instead. */ + export const inboundSchema = ListLatestXChainVerticesResponse$inboundSchema; + /** @deprecated use `ListLatestXChainVerticesResponse$outboundSchema` instead. */ + export const outboundSchema = ListLatestXChainVerticesResponse$outboundSchema; + /** @deprecated use `ListLatestXChainVerticesResponse$Outbound` instead. */ + export type Outbound = ListLatestXChainVerticesResponse$Outbound; } diff --git a/src/models/operations/listnativetransactions.ts b/src/models/operations/listnativetransactions.ts index 227c613..9dafc80 100644 --- a/src/models/operations/listnativetransactions.ts +++ b/src/models/operations/listnativetransactions.ts @@ -2,71 +2,73 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListNativeTransactionsServerList = ["https://glacier-api.avax.network"] as const; +export const ListNativeTransactionsServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListNativeTransactionsGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type ListNativeTransactionsRequest = { - /** - * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block. - */ - startBlock?: number | undefined; - /** - * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block. - */ - endBlock?: number | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * A wallet address. - */ - address: string; + /** + * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block. + */ + startBlock?: number | undefined; + /** + * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block. + */ + endBlock?: number | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * A wallet address. + */ + address: string; }; export type ListNativeTransactionsResponse = { - result: components.ListNativeTransactionsResponse; + result: components.ListNativeTransactionsResponse; }; /** @internal */ export const ListNativeTransactionsGlobals$inboundSchema: z.ZodType< - ListNativeTransactionsGlobals, - z.ZodTypeDef, - unknown + ListNativeTransactionsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type ListNativeTransactionsGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const ListNativeTransactionsGlobals$outboundSchema: z.ZodType< - ListNativeTransactionsGlobals$Outbound, - z.ZodTypeDef, - ListNativeTransactionsGlobals + ListNativeTransactionsGlobals$Outbound, + z.ZodTypeDef, + ListNativeTransactionsGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -74,50 +76,50 @@ export const ListNativeTransactionsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListNativeTransactionsGlobals$ { - /** @deprecated use `ListNativeTransactionsGlobals$inboundSchema` instead. */ - export const inboundSchema = ListNativeTransactionsGlobals$inboundSchema; - /** @deprecated use `ListNativeTransactionsGlobals$outboundSchema` instead. */ - export const outboundSchema = ListNativeTransactionsGlobals$outboundSchema; - /** @deprecated use `ListNativeTransactionsGlobals$Outbound` instead. */ - export type Outbound = ListNativeTransactionsGlobals$Outbound; + /** @deprecated use `ListNativeTransactionsGlobals$inboundSchema` instead. */ + export const inboundSchema = ListNativeTransactionsGlobals$inboundSchema; + /** @deprecated use `ListNativeTransactionsGlobals$outboundSchema` instead. */ + export const outboundSchema = ListNativeTransactionsGlobals$outboundSchema; + /** @deprecated use `ListNativeTransactionsGlobals$Outbound` instead. */ + export type Outbound = ListNativeTransactionsGlobals$Outbound; } /** @internal */ export const ListNativeTransactionsRequest$inboundSchema: z.ZodType< - ListNativeTransactionsRequest, - z.ZodTypeDef, - unknown + ListNativeTransactionsRequest, + z.ZodTypeDef, + unknown > = z.object({ - startBlock: z.number().optional(), - endBlock: z.number().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), + startBlock: z.number().optional(), + endBlock: z.number().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), }); /** @internal */ export type ListNativeTransactionsRequest$Outbound = { - startBlock?: number | undefined; - endBlock?: number | undefined; - pageToken?: string | undefined; - pageSize: number; - chainId?: string | undefined; - address: string; + startBlock?: number | undefined; + endBlock?: number | undefined; + pageToken?: string | undefined; + pageSize: number; + chainId?: string | undefined; + address: string; }; /** @internal */ export const ListNativeTransactionsRequest$outboundSchema: z.ZodType< - ListNativeTransactionsRequest$Outbound, - z.ZodTypeDef, - ListNativeTransactionsRequest + ListNativeTransactionsRequest$Outbound, + z.ZodTypeDef, + ListNativeTransactionsRequest > = z.object({ - startBlock: z.number().optional(), - endBlock: z.number().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), + startBlock: z.number().optional(), + endBlock: z.number().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), }); /** @@ -125,58 +127,54 @@ export const ListNativeTransactionsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListNativeTransactionsRequest$ { - /** @deprecated use `ListNativeTransactionsRequest$inboundSchema` instead. */ - export const inboundSchema = ListNativeTransactionsRequest$inboundSchema; - /** @deprecated use `ListNativeTransactionsRequest$outboundSchema` instead. */ - export const outboundSchema = ListNativeTransactionsRequest$outboundSchema; - /** @deprecated use `ListNativeTransactionsRequest$Outbound` instead. */ - export type Outbound = ListNativeTransactionsRequest$Outbound; + /** @deprecated use `ListNativeTransactionsRequest$inboundSchema` instead. */ + export const inboundSchema = ListNativeTransactionsRequest$inboundSchema; + /** @deprecated use `ListNativeTransactionsRequest$outboundSchema` instead. */ + export const outboundSchema = ListNativeTransactionsRequest$outboundSchema; + /** @deprecated use `ListNativeTransactionsRequest$Outbound` instead. */ + export type Outbound = ListNativeTransactionsRequest$Outbound; } /** @internal */ export const ListNativeTransactionsResponse$inboundSchema: z.ZodType< - ListNativeTransactionsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListNativeTransactionsResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListNativeTransactionsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListNativeTransactionsResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListNativeTransactionsResponse$Outbound = { - Result: components.ListNativeTransactionsResponse$Outbound; + Result: components.ListNativeTransactionsResponse$Outbound; }; /** @internal */ export const ListNativeTransactionsResponse$outboundSchema: z.ZodType< - ListNativeTransactionsResponse$Outbound, - z.ZodTypeDef, - ListNativeTransactionsResponse -> = z - .object({ - result: components.ListNativeTransactionsResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListNativeTransactionsResponse$Outbound, + z.ZodTypeDef, + ListNativeTransactionsResponse +> = z.object({ + result: components.ListNativeTransactionsResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListNativeTransactionsResponse$ { - /** @deprecated use `ListNativeTransactionsResponse$inboundSchema` instead. */ - export const inboundSchema = ListNativeTransactionsResponse$inboundSchema; - /** @deprecated use `ListNativeTransactionsResponse$outboundSchema` instead. */ - export const outboundSchema = ListNativeTransactionsResponse$outboundSchema; - /** @deprecated use `ListNativeTransactionsResponse$Outbound` instead. */ - export type Outbound = ListNativeTransactionsResponse$Outbound; + /** @deprecated use `ListNativeTransactionsResponse$inboundSchema` instead. */ + export const inboundSchema = ListNativeTransactionsResponse$inboundSchema; + /** @deprecated use `ListNativeTransactionsResponse$outboundSchema` instead. */ + export const outboundSchema = ListNativeTransactionsResponse$outboundSchema; + /** @deprecated use `ListNativeTransactionsResponse$Outbound` instead. */ + export type Outbound = ListNativeTransactionsResponse$Outbound; } diff --git a/src/models/operations/listpendingprimarynetworkrewards.ts b/src/models/operations/listpendingprimarynetworkrewards.ts index 62b2f0f..577edb5 100644 --- a/src/models/operations/listpendingprimarynetworkrewards.ts +++ b/src/models/operations/listpendingprimarynetworkrewards.ts @@ -2,73 +2,73 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; export const ListPendingPrimaryNetworkRewardsServerList = [ - "https://glacier-api.avax.network", + "https://glacier-api.avax.network", ] as const; export type ListPendingPrimaryNetworkRewardsGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type ListPendingPrimaryNetworkRewardsRequest = { - /** - * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji". One of addresses or nodeIds is required. - */ - addresses?: string | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; - /** - * A comma separated list of node ids to filter by. One of addresses or nodeIds is required. - */ - nodeIds?: string | undefined; - /** - * 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. - */ - sortOrder?: components.SortOrder | undefined; + /** + * A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji". One of addresses or nodeIds is required. + */ + addresses?: string | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; + /** + * A comma separated list of node ids to filter by. One of addresses or nodeIds is required. + */ + nodeIds?: string | undefined; + /** + * 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. + */ + sortOrder?: components.SortOrder | undefined; }; export type ListPendingPrimaryNetworkRewardsResponse = { - result: components.ListPendingRewardsResponse; + result: components.ListPendingRewardsResponse; }; /** @internal */ export const ListPendingPrimaryNetworkRewardsGlobals$inboundSchema: z.ZodType< - ListPendingPrimaryNetworkRewardsGlobals, - z.ZodTypeDef, - unknown + ListPendingPrimaryNetworkRewardsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type ListPendingPrimaryNetworkRewardsGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const ListPendingPrimaryNetworkRewardsGlobals$outboundSchema: z.ZodType< - ListPendingPrimaryNetworkRewardsGlobals$Outbound, - z.ZodTypeDef, - ListPendingPrimaryNetworkRewardsGlobals + ListPendingPrimaryNetworkRewardsGlobals$Outbound, + z.ZodTypeDef, + ListPendingPrimaryNetworkRewardsGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -76,50 +76,52 @@ export const ListPendingPrimaryNetworkRewardsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPendingPrimaryNetworkRewardsGlobals$ { - /** @deprecated use `ListPendingPrimaryNetworkRewardsGlobals$inboundSchema` instead. */ - export const inboundSchema = ListPendingPrimaryNetworkRewardsGlobals$inboundSchema; - /** @deprecated use `ListPendingPrimaryNetworkRewardsGlobals$outboundSchema` instead. */ - export const outboundSchema = ListPendingPrimaryNetworkRewardsGlobals$outboundSchema; - /** @deprecated use `ListPendingPrimaryNetworkRewardsGlobals$Outbound` instead. */ - export type Outbound = ListPendingPrimaryNetworkRewardsGlobals$Outbound; + /** @deprecated use `ListPendingPrimaryNetworkRewardsGlobals$inboundSchema` instead. */ + export const inboundSchema = + ListPendingPrimaryNetworkRewardsGlobals$inboundSchema; + /** @deprecated use `ListPendingPrimaryNetworkRewardsGlobals$outboundSchema` instead. */ + export const outboundSchema = + ListPendingPrimaryNetworkRewardsGlobals$outboundSchema; + /** @deprecated use `ListPendingPrimaryNetworkRewardsGlobals$Outbound` instead. */ + export type Outbound = ListPendingPrimaryNetworkRewardsGlobals$Outbound; } /** @internal */ export const ListPendingPrimaryNetworkRewardsRequest$inboundSchema: z.ZodType< - ListPendingPrimaryNetworkRewardsRequest, - z.ZodTypeDef, - unknown + ListPendingPrimaryNetworkRewardsRequest, + z.ZodTypeDef, + unknown > = z.object({ - addresses: z.string().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - network: components.GlobalParamNetwork$inboundSchema.optional(), - nodeIds: z.string().optional(), - sortOrder: components.SortOrder$inboundSchema.optional(), + addresses: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + network: components.GlobalParamNetwork$inboundSchema.optional(), + nodeIds: z.string().optional(), + sortOrder: components.SortOrder$inboundSchema.optional(), }); /** @internal */ export type ListPendingPrimaryNetworkRewardsRequest$Outbound = { - addresses?: string | undefined; - pageToken?: string | undefined; - pageSize: number; - network?: string | undefined; - nodeIds?: string | undefined; - sortOrder?: string | undefined; + addresses?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + network?: string | undefined; + nodeIds?: string | undefined; + sortOrder?: string | undefined; }; /** @internal */ export const ListPendingPrimaryNetworkRewardsRequest$outboundSchema: z.ZodType< - ListPendingPrimaryNetworkRewardsRequest$Outbound, - z.ZodTypeDef, - ListPendingPrimaryNetworkRewardsRequest + ListPendingPrimaryNetworkRewardsRequest$Outbound, + z.ZodTypeDef, + ListPendingPrimaryNetworkRewardsRequest > = z.object({ - addresses: z.string().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - network: components.GlobalParamNetwork$outboundSchema.optional(), - nodeIds: z.string().optional(), - sortOrder: components.SortOrder$outboundSchema.optional(), + addresses: z.string().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + network: components.GlobalParamNetwork$outboundSchema.optional(), + nodeIds: z.string().optional(), + sortOrder: components.SortOrder$outboundSchema.optional(), }); /** @@ -127,58 +129,58 @@ export const ListPendingPrimaryNetworkRewardsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPendingPrimaryNetworkRewardsRequest$ { - /** @deprecated use `ListPendingPrimaryNetworkRewardsRequest$inboundSchema` instead. */ - export const inboundSchema = ListPendingPrimaryNetworkRewardsRequest$inboundSchema; - /** @deprecated use `ListPendingPrimaryNetworkRewardsRequest$outboundSchema` instead. */ - export const outboundSchema = ListPendingPrimaryNetworkRewardsRequest$outboundSchema; - /** @deprecated use `ListPendingPrimaryNetworkRewardsRequest$Outbound` instead. */ - export type Outbound = ListPendingPrimaryNetworkRewardsRequest$Outbound; + /** @deprecated use `ListPendingPrimaryNetworkRewardsRequest$inboundSchema` instead. */ + export const inboundSchema = + ListPendingPrimaryNetworkRewardsRequest$inboundSchema; + /** @deprecated use `ListPendingPrimaryNetworkRewardsRequest$outboundSchema` instead. */ + export const outboundSchema = + ListPendingPrimaryNetworkRewardsRequest$outboundSchema; + /** @deprecated use `ListPendingPrimaryNetworkRewardsRequest$Outbound` instead. */ + export type Outbound = ListPendingPrimaryNetworkRewardsRequest$Outbound; } /** @internal */ export const ListPendingPrimaryNetworkRewardsResponse$inboundSchema: z.ZodType< - ListPendingPrimaryNetworkRewardsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListPendingRewardsResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListPendingPrimaryNetworkRewardsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListPendingRewardsResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListPendingPrimaryNetworkRewardsResponse$Outbound = { - Result: components.ListPendingRewardsResponse$Outbound; + Result: components.ListPendingRewardsResponse$Outbound; }; /** @internal */ export const ListPendingPrimaryNetworkRewardsResponse$outboundSchema: z.ZodType< - ListPendingPrimaryNetworkRewardsResponse$Outbound, - z.ZodTypeDef, - ListPendingPrimaryNetworkRewardsResponse -> = z - .object({ - result: components.ListPendingRewardsResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListPendingPrimaryNetworkRewardsResponse$Outbound, + z.ZodTypeDef, + ListPendingPrimaryNetworkRewardsResponse +> = z.object({ + result: components.ListPendingRewardsResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPendingPrimaryNetworkRewardsResponse$ { - /** @deprecated use `ListPendingPrimaryNetworkRewardsResponse$inboundSchema` instead. */ - export const inboundSchema = ListPendingPrimaryNetworkRewardsResponse$inboundSchema; - /** @deprecated use `ListPendingPrimaryNetworkRewardsResponse$outboundSchema` instead. */ - export const outboundSchema = ListPendingPrimaryNetworkRewardsResponse$outboundSchema; - /** @deprecated use `ListPendingPrimaryNetworkRewardsResponse$Outbound` instead. */ - export type Outbound = ListPendingPrimaryNetworkRewardsResponse$Outbound; + /** @deprecated use `ListPendingPrimaryNetworkRewardsResponse$inboundSchema` instead. */ + export const inboundSchema = + ListPendingPrimaryNetworkRewardsResponse$inboundSchema; + /** @deprecated use `ListPendingPrimaryNetworkRewardsResponse$outboundSchema` instead. */ + export const outboundSchema = + ListPendingPrimaryNetworkRewardsResponse$outboundSchema; + /** @deprecated use `ListPendingPrimaryNetworkRewardsResponse$Outbound` instead. */ + export type Outbound = ListPendingPrimaryNetworkRewardsResponse$Outbound; } diff --git a/src/models/operations/listprimarynetworkblocksbynodeid.ts b/src/models/operations/listprimarynetworkblocksbynodeid.ts index b113ac7..27ef63a 100644 --- a/src/models/operations/listprimarynetworkblocksbynodeid.ts +++ b/src/models/operations/listprimarynetworkblocksbynodeid.ts @@ -2,69 +2,69 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; export const ListPrimaryNetworkBlocksByNodeIdServerList = [ - "https://glacier-api.avax.network", + "https://glacier-api.avax.network", ] as const; export type ListPrimaryNetworkBlocksByNodeIdGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type ListPrimaryNetworkBlocksByNodeIdRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A primary network blockchain id or alias. - */ - blockchainId: components.BlockchainId; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; - /** - * A primary network (P or X chain) nodeId. - */ - nodeId: string; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A primary network blockchain id or alias. + */ + blockchainId: components.BlockchainId; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; + /** + * A primary network (P or X chain) nodeId. + */ + nodeId: string; }; export type ListPrimaryNetworkBlocksByNodeIdResponse = { - result: components.ListPrimaryNetworkBlocksResponse; + result: components.ListPrimaryNetworkBlocksResponse; }; /** @internal */ export const ListPrimaryNetworkBlocksByNodeIdGlobals$inboundSchema: z.ZodType< - ListPrimaryNetworkBlocksByNodeIdGlobals, - z.ZodTypeDef, - unknown + ListPrimaryNetworkBlocksByNodeIdGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type ListPrimaryNetworkBlocksByNodeIdGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const ListPrimaryNetworkBlocksByNodeIdGlobals$outboundSchema: z.ZodType< - ListPrimaryNetworkBlocksByNodeIdGlobals$Outbound, - z.ZodTypeDef, - ListPrimaryNetworkBlocksByNodeIdGlobals + ListPrimaryNetworkBlocksByNodeIdGlobals$Outbound, + z.ZodTypeDef, + ListPrimaryNetworkBlocksByNodeIdGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -72,47 +72,49 @@ export const ListPrimaryNetworkBlocksByNodeIdGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPrimaryNetworkBlocksByNodeIdGlobals$ { - /** @deprecated use `ListPrimaryNetworkBlocksByNodeIdGlobals$inboundSchema` instead. */ - export const inboundSchema = ListPrimaryNetworkBlocksByNodeIdGlobals$inboundSchema; - /** @deprecated use `ListPrimaryNetworkBlocksByNodeIdGlobals$outboundSchema` instead. */ - export const outboundSchema = ListPrimaryNetworkBlocksByNodeIdGlobals$outboundSchema; - /** @deprecated use `ListPrimaryNetworkBlocksByNodeIdGlobals$Outbound` instead. */ - export type Outbound = ListPrimaryNetworkBlocksByNodeIdGlobals$Outbound; + /** @deprecated use `ListPrimaryNetworkBlocksByNodeIdGlobals$inboundSchema` instead. */ + export const inboundSchema = + ListPrimaryNetworkBlocksByNodeIdGlobals$inboundSchema; + /** @deprecated use `ListPrimaryNetworkBlocksByNodeIdGlobals$outboundSchema` instead. */ + export const outboundSchema = + ListPrimaryNetworkBlocksByNodeIdGlobals$outboundSchema; + /** @deprecated use `ListPrimaryNetworkBlocksByNodeIdGlobals$Outbound` instead. */ + export type Outbound = ListPrimaryNetworkBlocksByNodeIdGlobals$Outbound; } /** @internal */ export const ListPrimaryNetworkBlocksByNodeIdRequest$inboundSchema: z.ZodType< - ListPrimaryNetworkBlocksByNodeIdRequest, - z.ZodTypeDef, - unknown + ListPrimaryNetworkBlocksByNodeIdRequest, + z.ZodTypeDef, + unknown > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - blockchainId: components.BlockchainId$inboundSchema, - network: components.GlobalParamNetwork$inboundSchema.optional(), - nodeId: z.string(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + blockchainId: components.BlockchainId$inboundSchema, + network: components.GlobalParamNetwork$inboundSchema.optional(), + nodeId: z.string(), }); /** @internal */ export type ListPrimaryNetworkBlocksByNodeIdRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - blockchainId: string; - network?: string | undefined; - nodeId: string; + pageToken?: string | undefined; + pageSize: number; + blockchainId: string; + network?: string | undefined; + nodeId: string; }; /** @internal */ export const ListPrimaryNetworkBlocksByNodeIdRequest$outboundSchema: z.ZodType< - ListPrimaryNetworkBlocksByNodeIdRequest$Outbound, - z.ZodTypeDef, - ListPrimaryNetworkBlocksByNodeIdRequest + ListPrimaryNetworkBlocksByNodeIdRequest$Outbound, + z.ZodTypeDef, + ListPrimaryNetworkBlocksByNodeIdRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - blockchainId: components.BlockchainId$outboundSchema, - network: components.GlobalParamNetwork$outboundSchema.optional(), - nodeId: z.string(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + blockchainId: components.BlockchainId$outboundSchema, + network: components.GlobalParamNetwork$outboundSchema.optional(), + nodeId: z.string(), }); /** @@ -120,58 +122,58 @@ export const ListPrimaryNetworkBlocksByNodeIdRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPrimaryNetworkBlocksByNodeIdRequest$ { - /** @deprecated use `ListPrimaryNetworkBlocksByNodeIdRequest$inboundSchema` instead. */ - export const inboundSchema = ListPrimaryNetworkBlocksByNodeIdRequest$inboundSchema; - /** @deprecated use `ListPrimaryNetworkBlocksByNodeIdRequest$outboundSchema` instead. */ - export const outboundSchema = ListPrimaryNetworkBlocksByNodeIdRequest$outboundSchema; - /** @deprecated use `ListPrimaryNetworkBlocksByNodeIdRequest$Outbound` instead. */ - export type Outbound = ListPrimaryNetworkBlocksByNodeIdRequest$Outbound; + /** @deprecated use `ListPrimaryNetworkBlocksByNodeIdRequest$inboundSchema` instead. */ + export const inboundSchema = + ListPrimaryNetworkBlocksByNodeIdRequest$inboundSchema; + /** @deprecated use `ListPrimaryNetworkBlocksByNodeIdRequest$outboundSchema` instead. */ + export const outboundSchema = + ListPrimaryNetworkBlocksByNodeIdRequest$outboundSchema; + /** @deprecated use `ListPrimaryNetworkBlocksByNodeIdRequest$Outbound` instead. */ + export type Outbound = ListPrimaryNetworkBlocksByNodeIdRequest$Outbound; } /** @internal */ export const ListPrimaryNetworkBlocksByNodeIdResponse$inboundSchema: z.ZodType< - ListPrimaryNetworkBlocksByNodeIdResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListPrimaryNetworkBlocksResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListPrimaryNetworkBlocksByNodeIdResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListPrimaryNetworkBlocksResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListPrimaryNetworkBlocksByNodeIdResponse$Outbound = { - Result: components.ListPrimaryNetworkBlocksResponse$Outbound; + Result: components.ListPrimaryNetworkBlocksResponse$Outbound; }; /** @internal */ export const ListPrimaryNetworkBlocksByNodeIdResponse$outboundSchema: z.ZodType< - ListPrimaryNetworkBlocksByNodeIdResponse$Outbound, - z.ZodTypeDef, - ListPrimaryNetworkBlocksByNodeIdResponse -> = z - .object({ - result: components.ListPrimaryNetworkBlocksResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListPrimaryNetworkBlocksByNodeIdResponse$Outbound, + z.ZodTypeDef, + ListPrimaryNetworkBlocksByNodeIdResponse +> = z.object({ + result: components.ListPrimaryNetworkBlocksResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListPrimaryNetworkBlocksByNodeIdResponse$ { - /** @deprecated use `ListPrimaryNetworkBlocksByNodeIdResponse$inboundSchema` instead. */ - export const inboundSchema = ListPrimaryNetworkBlocksByNodeIdResponse$inboundSchema; - /** @deprecated use `ListPrimaryNetworkBlocksByNodeIdResponse$outboundSchema` instead. */ - export const outboundSchema = ListPrimaryNetworkBlocksByNodeIdResponse$outboundSchema; - /** @deprecated use `ListPrimaryNetworkBlocksByNodeIdResponse$Outbound` instead. */ - export type Outbound = ListPrimaryNetworkBlocksByNodeIdResponse$Outbound; + /** @deprecated use `ListPrimaryNetworkBlocksByNodeIdResponse$inboundSchema` instead. */ + export const inboundSchema = + ListPrimaryNetworkBlocksByNodeIdResponse$inboundSchema; + /** @deprecated use `ListPrimaryNetworkBlocksByNodeIdResponse$outboundSchema` instead. */ + export const outboundSchema = + ListPrimaryNetworkBlocksByNodeIdResponse$outboundSchema; + /** @deprecated use `ListPrimaryNetworkBlocksByNodeIdResponse$Outbound` instead. */ + export type Outbound = ListPrimaryNetworkBlocksByNodeIdResponse$Outbound; } diff --git a/src/models/operations/listsubnets.ts b/src/models/operations/listsubnets.ts index b0a292c..b2f1da8 100644 --- a/src/models/operations/listsubnets.ts +++ b/src/models/operations/listsubnets.ts @@ -2,63 +2,65 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListSubnetsServerList = ["https://glacier-api.avax.network"] as const; +export const ListSubnetsServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListSubnetsGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type ListSubnetsRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; - /** - * 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. - */ - sortOrder?: components.SortOrder | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; + /** + * 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. + */ + sortOrder?: components.SortOrder | undefined; }; export type ListSubnetsResponse = { - result: components.ListSubnetsResponse; + result: components.ListSubnetsResponse; }; /** @internal */ export const ListSubnetsGlobals$inboundSchema: z.ZodType< - ListSubnetsGlobals, - z.ZodTypeDef, - unknown + ListSubnetsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type ListSubnetsGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const ListSubnetsGlobals$outboundSchema: z.ZodType< - ListSubnetsGlobals$Outbound, - z.ZodTypeDef, - ListSubnetsGlobals + ListSubnetsGlobals$Outbound, + z.ZodTypeDef, + ListSubnetsGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -66,44 +68,44 @@ export const ListSubnetsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListSubnetsGlobals$ { - /** @deprecated use `ListSubnetsGlobals$inboundSchema` instead. */ - export const inboundSchema = ListSubnetsGlobals$inboundSchema; - /** @deprecated use `ListSubnetsGlobals$outboundSchema` instead. */ - export const outboundSchema = ListSubnetsGlobals$outboundSchema; - /** @deprecated use `ListSubnetsGlobals$Outbound` instead. */ - export type Outbound = ListSubnetsGlobals$Outbound; + /** @deprecated use `ListSubnetsGlobals$inboundSchema` instead. */ + export const inboundSchema = ListSubnetsGlobals$inboundSchema; + /** @deprecated use `ListSubnetsGlobals$outboundSchema` instead. */ + export const outboundSchema = ListSubnetsGlobals$outboundSchema; + /** @deprecated use `ListSubnetsGlobals$Outbound` instead. */ + export type Outbound = ListSubnetsGlobals$Outbound; } /** @internal */ export const ListSubnetsRequest$inboundSchema: z.ZodType< - ListSubnetsRequest, - z.ZodTypeDef, - unknown + ListSubnetsRequest, + z.ZodTypeDef, + unknown > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - network: components.GlobalParamNetwork$inboundSchema.optional(), - sortOrder: components.SortOrder$inboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + network: components.GlobalParamNetwork$inboundSchema.optional(), + sortOrder: components.SortOrder$inboundSchema.optional(), }); /** @internal */ export type ListSubnetsRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - network?: string | undefined; - sortOrder?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + network?: string | undefined; + sortOrder?: string | undefined; }; /** @internal */ export const ListSubnetsRequest$outboundSchema: z.ZodType< - ListSubnetsRequest$Outbound, - z.ZodTypeDef, - ListSubnetsRequest + ListSubnetsRequest$Outbound, + z.ZodTypeDef, + ListSubnetsRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - network: components.GlobalParamNetwork$outboundSchema.optional(), - sortOrder: components.SortOrder$outboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + network: components.GlobalParamNetwork$outboundSchema.optional(), + sortOrder: components.SortOrder$outboundSchema.optional(), }); /** @@ -111,58 +113,54 @@ export const ListSubnetsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListSubnetsRequest$ { - /** @deprecated use `ListSubnetsRequest$inboundSchema` instead. */ - export const inboundSchema = ListSubnetsRequest$inboundSchema; - /** @deprecated use `ListSubnetsRequest$outboundSchema` instead. */ - export const outboundSchema = ListSubnetsRequest$outboundSchema; - /** @deprecated use `ListSubnetsRequest$Outbound` instead. */ - export type Outbound = ListSubnetsRequest$Outbound; + /** @deprecated use `ListSubnetsRequest$inboundSchema` instead. */ + export const inboundSchema = ListSubnetsRequest$inboundSchema; + /** @deprecated use `ListSubnetsRequest$outboundSchema` instead. */ + export const outboundSchema = ListSubnetsRequest$outboundSchema; + /** @deprecated use `ListSubnetsRequest$Outbound` instead. */ + export type Outbound = ListSubnetsRequest$Outbound; } /** @internal */ export const ListSubnetsResponse$inboundSchema: z.ZodType< - ListSubnetsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListSubnetsResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListSubnetsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListSubnetsResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListSubnetsResponse$Outbound = { - Result: components.ListSubnetsResponse$Outbound; + Result: components.ListSubnetsResponse$Outbound; }; /** @internal */ export const ListSubnetsResponse$outboundSchema: z.ZodType< - ListSubnetsResponse$Outbound, - z.ZodTypeDef, - ListSubnetsResponse -> = z - .object({ - result: components.ListSubnetsResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListSubnetsResponse$Outbound, + z.ZodTypeDef, + ListSubnetsResponse +> = z.object({ + result: components.ListSubnetsResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListSubnetsResponse$ { - /** @deprecated use `ListSubnetsResponse$inboundSchema` instead. */ - export const inboundSchema = ListSubnetsResponse$inboundSchema; - /** @deprecated use `ListSubnetsResponse$outboundSchema` instead. */ - export const outboundSchema = ListSubnetsResponse$outboundSchema; - /** @deprecated use `ListSubnetsResponse$Outbound` instead. */ - export type Outbound = ListSubnetsResponse$Outbound; + /** @deprecated use `ListSubnetsResponse$inboundSchema` instead. */ + export const inboundSchema = ListSubnetsResponse$inboundSchema; + /** @deprecated use `ListSubnetsResponse$outboundSchema` instead. */ + export const outboundSchema = ListSubnetsResponse$outboundSchema; + /** @deprecated use `ListSubnetsResponse$Outbound` instead. */ + export type Outbound = ListSubnetsResponse$Outbound; } diff --git a/src/models/operations/listteleportermessages.ts b/src/models/operations/listteleportermessages.ts index 9702a1a..073cb54 100644 --- a/src/models/operations/listteleportermessages.ts +++ b/src/models/operations/listteleportermessages.ts @@ -2,93 +2,95 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListTeleporterMessagesServerList = ["https://glacier-api.avax.network"] as const; +export const ListTeleporterMessagesServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListTeleporterMessagesRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * The base58 encoded blockchain ID or evm chain ID of the source chain that the teleporter message was sent from. - */ - sourceBlockchainId?: string | undefined; - /** - * The base58 encoded blockchain ID or evm chain ID of the destination chain that the teleporter message was sent to. - */ - destinationBlockchainId?: string | undefined; - /** - * The base58 encoded blockchain ID of either source or destination chain that one teleporter message interacts with. - */ - blockchainId?: string | undefined; - /** - * The address of the recipient of the teleporter message. - */ - to?: string | undefined; - /** - * The address of the sender of the teleporter message. - */ - from?: string | undefined; - /** - * mainnet or testnet. - */ - network?: components.NetworkType | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * The base58 encoded blockchain ID or evm chain ID of the source chain that the teleporter message was sent from. + */ + sourceBlockchainId?: string | undefined; + /** + * The base58 encoded blockchain ID or evm chain ID of the destination chain that the teleporter message was sent to. + */ + destinationBlockchainId?: string | undefined; + /** + * The base58 encoded blockchain ID of either source or destination chain that one teleporter message interacts with. + */ + blockchainId?: string | undefined; + /** + * The address of the recipient of the teleporter message. + */ + to?: string | undefined; + /** + * The address of the sender of the teleporter message. + */ + from?: string | undefined; + /** + * mainnet or testnet. + */ + network?: components.NetworkType | undefined; }; export type ListTeleporterMessagesResponse = { - result: components.ListTeleporterMessagesResponse; + result: components.ListTeleporterMessagesResponse; }; /** @internal */ export const ListTeleporterMessagesRequest$inboundSchema: z.ZodType< - ListTeleporterMessagesRequest, - z.ZodTypeDef, - unknown + ListTeleporterMessagesRequest, + z.ZodTypeDef, + unknown > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - sourceBlockchainId: z.string().optional(), - destinationBlockchainId: z.string().optional(), - blockchainId: z.string().optional(), - to: z.string().optional(), - from: z.string().optional(), - network: components.NetworkType$inboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + sourceBlockchainId: z.string().optional(), + destinationBlockchainId: z.string().optional(), + blockchainId: z.string().optional(), + to: z.string().optional(), + from: z.string().optional(), + network: components.NetworkType$inboundSchema.optional(), }); /** @internal */ export type ListTeleporterMessagesRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - sourceBlockchainId?: string | undefined; - destinationBlockchainId?: string | undefined; - blockchainId?: string | undefined; - to?: string | undefined; - from?: string | undefined; - network?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + sourceBlockchainId?: string | undefined; + destinationBlockchainId?: string | undefined; + blockchainId?: string | undefined; + to?: string | undefined; + from?: string | undefined; + network?: string | undefined; }; /** @internal */ export const ListTeleporterMessagesRequest$outboundSchema: z.ZodType< - ListTeleporterMessagesRequest$Outbound, - z.ZodTypeDef, - ListTeleporterMessagesRequest + ListTeleporterMessagesRequest$Outbound, + z.ZodTypeDef, + ListTeleporterMessagesRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - sourceBlockchainId: z.string().optional(), - destinationBlockchainId: z.string().optional(), - blockchainId: z.string().optional(), - to: z.string().optional(), - from: z.string().optional(), - network: components.NetworkType$outboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + sourceBlockchainId: z.string().optional(), + destinationBlockchainId: z.string().optional(), + blockchainId: z.string().optional(), + to: z.string().optional(), + from: z.string().optional(), + network: components.NetworkType$outboundSchema.optional(), }); /** @@ -96,58 +98,54 @@ export const ListTeleporterMessagesRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTeleporterMessagesRequest$ { - /** @deprecated use `ListTeleporterMessagesRequest$inboundSchema` instead. */ - export const inboundSchema = ListTeleporterMessagesRequest$inboundSchema; - /** @deprecated use `ListTeleporterMessagesRequest$outboundSchema` instead. */ - export const outboundSchema = ListTeleporterMessagesRequest$outboundSchema; - /** @deprecated use `ListTeleporterMessagesRequest$Outbound` instead. */ - export type Outbound = ListTeleporterMessagesRequest$Outbound; + /** @deprecated use `ListTeleporterMessagesRequest$inboundSchema` instead. */ + export const inboundSchema = ListTeleporterMessagesRequest$inboundSchema; + /** @deprecated use `ListTeleporterMessagesRequest$outboundSchema` instead. */ + export const outboundSchema = ListTeleporterMessagesRequest$outboundSchema; + /** @deprecated use `ListTeleporterMessagesRequest$Outbound` instead. */ + export type Outbound = ListTeleporterMessagesRequest$Outbound; } /** @internal */ export const ListTeleporterMessagesResponse$inboundSchema: z.ZodType< - ListTeleporterMessagesResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListTeleporterMessagesResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListTeleporterMessagesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListTeleporterMessagesResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListTeleporterMessagesResponse$Outbound = { - Result: components.ListTeleporterMessagesResponse$Outbound; + Result: components.ListTeleporterMessagesResponse$Outbound; }; /** @internal */ export const ListTeleporterMessagesResponse$outboundSchema: z.ZodType< - ListTeleporterMessagesResponse$Outbound, - z.ZodTypeDef, - ListTeleporterMessagesResponse -> = z - .object({ - result: components.ListTeleporterMessagesResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListTeleporterMessagesResponse$Outbound, + z.ZodTypeDef, + ListTeleporterMessagesResponse +> = z.object({ + result: components.ListTeleporterMessagesResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTeleporterMessagesResponse$ { - /** @deprecated use `ListTeleporterMessagesResponse$inboundSchema` instead. */ - export const inboundSchema = ListTeleporterMessagesResponse$inboundSchema; - /** @deprecated use `ListTeleporterMessagesResponse$outboundSchema` instead. */ - export const outboundSchema = ListTeleporterMessagesResponse$outboundSchema; - /** @deprecated use `ListTeleporterMessagesResponse$Outbound` instead. */ - export type Outbound = ListTeleporterMessagesResponse$Outbound; + /** @deprecated use `ListTeleporterMessagesResponse$inboundSchema` instead. */ + export const inboundSchema = ListTeleporterMessagesResponse$inboundSchema; + /** @deprecated use `ListTeleporterMessagesResponse$outboundSchema` instead. */ + export const outboundSchema = ListTeleporterMessagesResponse$outboundSchema; + /** @deprecated use `ListTeleporterMessagesResponse$Outbound` instead. */ + export type Outbound = ListTeleporterMessagesResponse$Outbound; } diff --git a/src/models/operations/listteleportermessagesbyaddress.ts b/src/models/operations/listteleportermessagesbyaddress.ts new file mode 100644 index 0000000..a59bf5c --- /dev/null +++ b/src/models/operations/listteleportermessagesbyaddress.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import * as components from "../components/index.js"; + +export const ListTeleporterMessagesByAddressServerList = [ + "https://glacier-api.avax.network", +] as const; + +export type ListTeleporterMessagesByAddressRequest = { + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * An EVM address. + */ + address: string; + /** + * mainnet or testnet. + */ + network?: components.NetworkType | undefined; +}; + +/** @internal */ +export const ListTeleporterMessagesByAddressRequest$inboundSchema: z.ZodType< + ListTeleporterMessagesByAddressRequest, + z.ZodTypeDef, + unknown +> = z.object({ + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + address: z.string(), + network: components.NetworkType$inboundSchema.optional(), +}); + +/** @internal */ +export type ListTeleporterMessagesByAddressRequest$Outbound = { + pageToken?: string | undefined; + pageSize: number; + address: string; + network?: string | undefined; +}; + +/** @internal */ +export const ListTeleporterMessagesByAddressRequest$outboundSchema: z.ZodType< + ListTeleporterMessagesByAddressRequest$Outbound, + z.ZodTypeDef, + ListTeleporterMessagesByAddressRequest +> = z.object({ + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + address: z.string(), + network: components.NetworkType$outboundSchema.optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListTeleporterMessagesByAddressRequest$ { + /** @deprecated use `ListTeleporterMessagesByAddressRequest$inboundSchema` instead. */ + export const inboundSchema = + ListTeleporterMessagesByAddressRequest$inboundSchema; + /** @deprecated use `ListTeleporterMessagesByAddressRequest$outboundSchema` instead. */ + export const outboundSchema = + ListTeleporterMessagesByAddressRequest$outboundSchema; + /** @deprecated use `ListTeleporterMessagesByAddressRequest$Outbound` instead. */ + export type Outbound = ListTeleporterMessagesByAddressRequest$Outbound; +} diff --git a/src/models/operations/listtokens.ts b/src/models/operations/listtokens.ts index cdca468..7ba5c4d 100644 --- a/src/models/operations/listtokens.ts +++ b/src/models/operations/listtokens.ts @@ -2,60 +2,65 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListTokensServerList = ["https://glacier-api.avax.network"] as const; +export const ListTokensServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListTokensGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type ListTokensRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * Contract address on the relevant chain. - */ - address: string; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * Contract address on the relevant chain. + */ + address: string; }; export type ListTokensResponse = { - result: components.ListNftTokens; + result: components.ListNftTokens; }; /** @internal */ -export const ListTokensGlobals$inboundSchema: z.ZodType = - z.object({ - chainId: z.string().optional(), - }); +export const ListTokensGlobals$inboundSchema: z.ZodType< + ListTokensGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + chainId: z.string().optional(), +}); /** @internal */ export type ListTokensGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const ListTokensGlobals$outboundSchema: z.ZodType< - ListTokensGlobals$Outbound, - z.ZodTypeDef, - ListTokensGlobals + ListTokensGlobals$Outbound, + z.ZodTypeDef, + ListTokensGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -63,41 +68,44 @@ export const ListTokensGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTokensGlobals$ { - /** @deprecated use `ListTokensGlobals$inboundSchema` instead. */ - export const inboundSchema = ListTokensGlobals$inboundSchema; - /** @deprecated use `ListTokensGlobals$outboundSchema` instead. */ - export const outboundSchema = ListTokensGlobals$outboundSchema; - /** @deprecated use `ListTokensGlobals$Outbound` instead. */ - export type Outbound = ListTokensGlobals$Outbound; + /** @deprecated use `ListTokensGlobals$inboundSchema` instead. */ + export const inboundSchema = ListTokensGlobals$inboundSchema; + /** @deprecated use `ListTokensGlobals$outboundSchema` instead. */ + export const outboundSchema = ListTokensGlobals$outboundSchema; + /** @deprecated use `ListTokensGlobals$Outbound` instead. */ + export type Outbound = ListTokensGlobals$Outbound; } /** @internal */ -export const ListTokensRequest$inboundSchema: z.ZodType = - z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), - }); +export const ListTokensRequest$inboundSchema: z.ZodType< + ListTokensRequest, + z.ZodTypeDef, + unknown +> = z.object({ + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), +}); /** @internal */ export type ListTokensRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - chainId?: string | undefined; - address: string; + pageToken?: string | undefined; + pageSize: number; + chainId?: string | undefined; + address: string; }; /** @internal */ export const ListTokensRequest$outboundSchema: z.ZodType< - ListTokensRequest$Outbound, - z.ZodTypeDef, - ListTokensRequest + ListTokensRequest$Outbound, + z.ZodTypeDef, + ListTokensRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), }); /** @@ -105,58 +113,54 @@ export const ListTokensRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTokensRequest$ { - /** @deprecated use `ListTokensRequest$inboundSchema` instead. */ - export const inboundSchema = ListTokensRequest$inboundSchema; - /** @deprecated use `ListTokensRequest$outboundSchema` instead. */ - export const outboundSchema = ListTokensRequest$outboundSchema; - /** @deprecated use `ListTokensRequest$Outbound` instead. */ - export type Outbound = ListTokensRequest$Outbound; + /** @deprecated use `ListTokensRequest$inboundSchema` instead. */ + export const inboundSchema = ListTokensRequest$inboundSchema; + /** @deprecated use `ListTokensRequest$outboundSchema` instead. */ + export const outboundSchema = ListTokensRequest$outboundSchema; + /** @deprecated use `ListTokensRequest$Outbound` instead. */ + export type Outbound = ListTokensRequest$Outbound; } /** @internal */ export const ListTokensResponse$inboundSchema: z.ZodType< - ListTokensResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListNftTokens$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListTokensResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListNftTokens$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListTokensResponse$Outbound = { - Result: components.ListNftTokens$Outbound; + Result: components.ListNftTokens$Outbound; }; /** @internal */ export const ListTokensResponse$outboundSchema: z.ZodType< - ListTokensResponse$Outbound, - z.ZodTypeDef, - ListTokensResponse -> = z - .object({ - result: components.ListNftTokens$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListTokensResponse$Outbound, + z.ZodTypeDef, + ListTokensResponse +> = z.object({ + result: components.ListNftTokens$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTokensResponse$ { - /** @deprecated use `ListTokensResponse$inboundSchema` instead. */ - export const inboundSchema = ListTokensResponse$inboundSchema; - /** @deprecated use `ListTokensResponse$outboundSchema` instead. */ - export const outboundSchema = ListTokensResponse$outboundSchema; - /** @deprecated use `ListTokensResponse$Outbound` instead. */ - export type Outbound = ListTokensResponse$Outbound; + /** @deprecated use `ListTokensResponse$inboundSchema` instead. */ + export const inboundSchema = ListTokensResponse$inboundSchema; + /** @deprecated use `ListTokensResponse$outboundSchema` instead. */ + export const outboundSchema = ListTokensResponse$outboundSchema; + /** @deprecated use `ListTokensResponse$Outbound` instead. */ + export type Outbound = ListTokensResponse$Outbound; } diff --git a/src/models/operations/listtransactions.ts b/src/models/operations/listtransactions.ts index 70e027e..51fa5c4 100644 --- a/src/models/operations/listtransactions.ts +++ b/src/models/operations/listtransactions.ts @@ -2,75 +2,77 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListTransactionsServerList = ["https://glacier-api.avax.network"] as const; +export const ListTransactionsServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListTransactionsGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type ListTransactionsRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block. - */ - startBlock?: number | undefined; - /** - * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block. - */ - endBlock?: number | undefined; - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * A wallet address. - */ - address: string; - /** - * 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. - */ - sortOrder?: components.SortOrder | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block. + */ + startBlock?: number | undefined; + /** + * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block. + */ + endBlock?: number | undefined; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * A wallet address. + */ + address: string; + /** + * 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. + */ + sortOrder?: components.SortOrder | undefined; }; export type ListTransactionsResponse = { - result: components.ListTransactionDetailsResponse; + result: components.ListTransactionDetailsResponse; }; /** @internal */ export const ListTransactionsGlobals$inboundSchema: z.ZodType< - ListTransactionsGlobals, - z.ZodTypeDef, - unknown + ListTransactionsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type ListTransactionsGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const ListTransactionsGlobals$outboundSchema: z.ZodType< - ListTransactionsGlobals$Outbound, - z.ZodTypeDef, - ListTransactionsGlobals + ListTransactionsGlobals$Outbound, + z.ZodTypeDef, + ListTransactionsGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -78,53 +80,53 @@ export const ListTransactionsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTransactionsGlobals$ { - /** @deprecated use `ListTransactionsGlobals$inboundSchema` instead. */ - export const inboundSchema = ListTransactionsGlobals$inboundSchema; - /** @deprecated use `ListTransactionsGlobals$outboundSchema` instead. */ - export const outboundSchema = ListTransactionsGlobals$outboundSchema; - /** @deprecated use `ListTransactionsGlobals$Outbound` instead. */ - export type Outbound = ListTransactionsGlobals$Outbound; + /** @deprecated use `ListTransactionsGlobals$inboundSchema` instead. */ + export const inboundSchema = ListTransactionsGlobals$inboundSchema; + /** @deprecated use `ListTransactionsGlobals$outboundSchema` instead. */ + export const outboundSchema = ListTransactionsGlobals$outboundSchema; + /** @deprecated use `ListTransactionsGlobals$Outbound` instead. */ + export type Outbound = ListTransactionsGlobals$Outbound; } /** @internal */ export const ListTransactionsRequest$inboundSchema: z.ZodType< - ListTransactionsRequest, - z.ZodTypeDef, - unknown + ListTransactionsRequest, + z.ZodTypeDef, + unknown > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - startBlock: z.number().optional(), - endBlock: z.number().optional(), - chainId: z.string().optional(), - address: z.string(), - sortOrder: components.SortOrder$inboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + startBlock: z.number().optional(), + endBlock: z.number().optional(), + chainId: z.string().optional(), + address: z.string(), + sortOrder: components.SortOrder$inboundSchema.optional(), }); /** @internal */ export type ListTransactionsRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - startBlock?: number | undefined; - endBlock?: number | undefined; - chainId?: string | undefined; - address: string; - sortOrder?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + startBlock?: number | undefined; + endBlock?: number | undefined; + chainId?: string | undefined; + address: string; + sortOrder?: string | undefined; }; /** @internal */ export const ListTransactionsRequest$outboundSchema: z.ZodType< - ListTransactionsRequest$Outbound, - z.ZodTypeDef, - ListTransactionsRequest + ListTransactionsRequest$Outbound, + z.ZodTypeDef, + ListTransactionsRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - startBlock: z.number().optional(), - endBlock: z.number().optional(), - chainId: z.string().optional(), - address: z.string(), - sortOrder: components.SortOrder$outboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + startBlock: z.number().optional(), + endBlock: z.number().optional(), + chainId: z.string().optional(), + address: z.string(), + sortOrder: components.SortOrder$outboundSchema.optional(), }); /** @@ -132,58 +134,54 @@ export const ListTransactionsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTransactionsRequest$ { - /** @deprecated use `ListTransactionsRequest$inboundSchema` instead. */ - export const inboundSchema = ListTransactionsRequest$inboundSchema; - /** @deprecated use `ListTransactionsRequest$outboundSchema` instead. */ - export const outboundSchema = ListTransactionsRequest$outboundSchema; - /** @deprecated use `ListTransactionsRequest$Outbound` instead. */ - export type Outbound = ListTransactionsRequest$Outbound; + /** @deprecated use `ListTransactionsRequest$inboundSchema` instead. */ + export const inboundSchema = ListTransactionsRequest$inboundSchema; + /** @deprecated use `ListTransactionsRequest$outboundSchema` instead. */ + export const outboundSchema = ListTransactionsRequest$outboundSchema; + /** @deprecated use `ListTransactionsRequest$Outbound` instead. */ + export type Outbound = ListTransactionsRequest$Outbound; } /** @internal */ export const ListTransactionsResponse$inboundSchema: z.ZodType< - ListTransactionsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListTransactionDetailsResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListTransactionsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListTransactionDetailsResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListTransactionsResponse$Outbound = { - Result: components.ListTransactionDetailsResponse$Outbound; + Result: components.ListTransactionDetailsResponse$Outbound; }; /** @internal */ export const ListTransactionsResponse$outboundSchema: z.ZodType< - ListTransactionsResponse$Outbound, - z.ZodTypeDef, - ListTransactionsResponse -> = z - .object({ - result: components.ListTransactionDetailsResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListTransactionsResponse$Outbound, + z.ZodTypeDef, + ListTransactionsResponse +> = z.object({ + result: components.ListTransactionDetailsResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTransactionsResponse$ { - /** @deprecated use `ListTransactionsResponse$inboundSchema` instead. */ - export const inboundSchema = ListTransactionsResponse$inboundSchema; - /** @deprecated use `ListTransactionsResponse$outboundSchema` instead. */ - export const outboundSchema = ListTransactionsResponse$outboundSchema; - /** @deprecated use `ListTransactionsResponse$Outbound` instead. */ - export type Outbound = ListTransactionsResponse$Outbound; + /** @deprecated use `ListTransactionsResponse$inboundSchema` instead. */ + export const inboundSchema = ListTransactionsResponse$inboundSchema; + /** @deprecated use `ListTransactionsResponse$outboundSchema` instead. */ + export const outboundSchema = ListTransactionsResponse$outboundSchema; + /** @deprecated use `ListTransactionsResponse$Outbound` instead. */ + export type Outbound = ListTransactionsResponse$Outbound; } diff --git a/src/models/operations/listtransfers.ts b/src/models/operations/listtransfers.ts index f54a519..269708d 100644 --- a/src/models/operations/listtransfers.ts +++ b/src/models/operations/listtransfers.ts @@ -2,71 +2,73 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListTransfersServerList = ["https://glacier-api.avax.network"] as const; +export const ListTransfersServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListTransfersGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type ListTransfersRequest = { - /** - * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block. - */ - startBlock?: number | undefined; - /** - * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block. - */ - endBlock?: number | undefined; - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * A wallet address. - */ - address: string; + /** + * The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block. + */ + startBlock?: number | undefined; + /** + * The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block. + */ + endBlock?: number | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * A wallet address. + */ + address: string; }; export type ListTransfersResponse = { - result: components.ListTransfersResponse; + result: components.ListTransfersResponse; }; /** @internal */ export const ListTransfersGlobals$inboundSchema: z.ZodType< - ListTransfersGlobals, - z.ZodTypeDef, - unknown + ListTransfersGlobals, + z.ZodTypeDef, + unknown > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @internal */ export type ListTransfersGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const ListTransfersGlobals$outboundSchema: z.ZodType< - ListTransfersGlobals$Outbound, - z.ZodTypeDef, - ListTransfersGlobals + ListTransfersGlobals$Outbound, + z.ZodTypeDef, + ListTransfersGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -74,50 +76,50 @@ export const ListTransfersGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTransfersGlobals$ { - /** @deprecated use `ListTransfersGlobals$inboundSchema` instead. */ - export const inboundSchema = ListTransfersGlobals$inboundSchema; - /** @deprecated use `ListTransfersGlobals$outboundSchema` instead. */ - export const outboundSchema = ListTransfersGlobals$outboundSchema; - /** @deprecated use `ListTransfersGlobals$Outbound` instead. */ - export type Outbound = ListTransfersGlobals$Outbound; + /** @deprecated use `ListTransfersGlobals$inboundSchema` instead. */ + export const inboundSchema = ListTransfersGlobals$inboundSchema; + /** @deprecated use `ListTransfersGlobals$outboundSchema` instead. */ + export const outboundSchema = ListTransfersGlobals$outboundSchema; + /** @deprecated use `ListTransfersGlobals$Outbound` instead. */ + export type Outbound = ListTransfersGlobals$Outbound; } /** @internal */ export const ListTransfersRequest$inboundSchema: z.ZodType< - ListTransfersRequest, - z.ZodTypeDef, - unknown + ListTransfersRequest, + z.ZodTypeDef, + unknown > = z.object({ - startBlock: z.number().optional(), - endBlock: z.number().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), + startBlock: z.number().optional(), + endBlock: z.number().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), }); /** @internal */ export type ListTransfersRequest$Outbound = { - startBlock?: number | undefined; - endBlock?: number | undefined; - pageToken?: string | undefined; - pageSize: number; - chainId?: string | undefined; - address: string; + startBlock?: number | undefined; + endBlock?: number | undefined; + pageToken?: string | undefined; + pageSize: number; + chainId?: string | undefined; + address: string; }; /** @internal */ export const ListTransfersRequest$outboundSchema: z.ZodType< - ListTransfersRequest$Outbound, - z.ZodTypeDef, - ListTransfersRequest + ListTransfersRequest$Outbound, + z.ZodTypeDef, + ListTransfersRequest > = z.object({ - startBlock: z.number().optional(), - endBlock: z.number().optional(), - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - chainId: z.string().optional(), - address: z.string(), + startBlock: z.number().optional(), + endBlock: z.number().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + chainId: z.string().optional(), + address: z.string(), }); /** @@ -125,58 +127,54 @@ export const ListTransfersRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTransfersRequest$ { - /** @deprecated use `ListTransfersRequest$inboundSchema` instead. */ - export const inboundSchema = ListTransfersRequest$inboundSchema; - /** @deprecated use `ListTransfersRequest$outboundSchema` instead. */ - export const outboundSchema = ListTransfersRequest$outboundSchema; - /** @deprecated use `ListTransfersRequest$Outbound` instead. */ - export type Outbound = ListTransfersRequest$Outbound; + /** @deprecated use `ListTransfersRequest$inboundSchema` instead. */ + export const inboundSchema = ListTransfersRequest$inboundSchema; + /** @deprecated use `ListTransfersRequest$outboundSchema` instead. */ + export const outboundSchema = ListTransfersRequest$outboundSchema; + /** @deprecated use `ListTransfersRequest$Outbound` instead. */ + export type Outbound = ListTransfersRequest$Outbound; } /** @internal */ export const ListTransfersResponse$inboundSchema: z.ZodType< - ListTransfersResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListTransfersResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListTransfersResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListTransfersResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListTransfersResponse$Outbound = { - Result: components.ListTransfersResponse$Outbound; + Result: components.ListTransfersResponse$Outbound; }; /** @internal */ export const ListTransfersResponse$outboundSchema: z.ZodType< - ListTransfersResponse$Outbound, - z.ZodTypeDef, - ListTransfersResponse -> = z - .object({ - result: components.ListTransfersResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListTransfersResponse$Outbound, + z.ZodTypeDef, + ListTransfersResponse +> = z.object({ + result: components.ListTransfersResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTransfersResponse$ { - /** @deprecated use `ListTransfersResponse$inboundSchema` instead. */ - export const inboundSchema = ListTransfersResponse$inboundSchema; - /** @deprecated use `ListTransfersResponse$outboundSchema` instead. */ - export const outboundSchema = ListTransfersResponse$outboundSchema; - /** @deprecated use `ListTransfersResponse$Outbound` instead. */ - export type Outbound = ListTransfersResponse$Outbound; + /** @deprecated use `ListTransfersResponse$inboundSchema` instead. */ + export const inboundSchema = ListTransfersResponse$inboundSchema; + /** @deprecated use `ListTransfersResponse$outboundSchema` instead. */ + export const outboundSchema = ListTransfersResponse$outboundSchema; + /** @deprecated use `ListTransfersResponse$Outbound` instead. */ + export type Outbound = ListTransfersResponse$Outbound; } diff --git a/src/models/operations/listvalidators.ts b/src/models/operations/listvalidators.ts index 6b48089..9160571 100644 --- a/src/models/operations/listvalidators.ts +++ b/src/models/operations/listvalidators.ts @@ -2,115 +2,117 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListValidatorsServerList = ["https://glacier-api.avax.network"] as const; +export const ListValidatorsServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListValidatorsGlobals = { - /** - * A supported network type mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; + /** + * A supported network type mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; }; export type ListValidatorsRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * Either mainnet or a testnet. - */ - network?: components.GlobalParamNetwork | undefined; - /** - * A comma separated list of node ids to filter by. - */ - nodeIds?: string | undefined; - /** - * Which property to sort by, in conjunction with sortOrder. - * - * @remarks - * - * Note: Delegation fee is only available for mainnet validators. Set `subnetId` to `11111111111111111111111111111111LpoYY` to use this option. - */ - sortBy?: components.SortByOption | undefined; - /** - * 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. - */ - sortOrder?: components.SortOrder | undefined; - /** - * Validation status of the node. - */ - validationStatus?: components.ValidationStatusType | undefined; - /** - * The minimum delegation capacity, in nAVAX, used to filter the set of nodes being returned. Accepts values between 0 and 720,000,000,000,000,000 - */ - minDelegationCapacity?: string | undefined; - /** - * The maximum delegation capacity, in nAVAX, used to filter the set of nodes being returned. Accepts values between 0 and 720,000,000,000,000,000. - */ - maxDelegationCapacity?: string | undefined; - /** - * The minimum validation time remaining, in seconds, used to filter the set of nodes being returned. - */ - minTimeRemaining?: number | undefined; - /** - * The maximum validation time remaining, in seconds, used to filter the set of nodes being returned. - */ - maxTimeRemaining?: number | undefined; - /** - * The minimum fee percentage, used to filter the set of nodes being returned. If this field is populated no subnet validations will be returned, as their fee percentage is null, since subnet delegations are not supported. Default is 2.0, as per the Avalanche spec. - */ - minFeePercentage?: number | undefined; - /** - * The maximum fee percentage, used to filter the set of nodes being returned. If this field is populated no subnet validations will be returned, as their fee percentage is null, since subnet delegations are not supported. Default is 100.0. - */ - maxFeePercentage?: number | undefined; - /** - * The minimum node uptime performance percentage, which represents node health, used to filter the set of nodes being returned Default is 90. - */ - minUptimePerformance?: number | undefined; - /** - * The maximum node uptime performance percentage, which represents node health, used to filter the set of nodes being returned. Default is 100. - */ - maxUptimePerformance?: number | undefined; - /** - * The subnet ID to filter by. If not provided, then all subnets will be returned. - */ - subnetId?: any | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * Either mainnet or a testnet. + */ + network?: components.GlobalParamNetwork | undefined; + /** + * A comma separated list of node ids to filter by. + */ + nodeIds?: string | undefined; + /** + * Which property to sort by, in conjunction with sortOrder. + * + * @remarks + * + * Note: Delegation fee is only available for mainnet validators. Set `subnetId` to `11111111111111111111111111111111LpoYY` to use this option. + */ + sortBy?: components.SortByOption | undefined; + /** + * 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. + */ + sortOrder?: components.SortOrder | undefined; + /** + * Validation status of the node. + */ + validationStatus?: components.ValidationStatusType | undefined; + /** + * The minimum delegation capacity, in nAVAX, used to filter the set of nodes being returned. Accepts values between 0 and 720,000,000,000,000,000 + */ + minDelegationCapacity?: string | undefined; + /** + * The maximum delegation capacity, in nAVAX, used to filter the set of nodes being returned. Accepts values between 0 and 720,000,000,000,000,000. + */ + maxDelegationCapacity?: string | undefined; + /** + * The minimum validation time remaining, in seconds, used to filter the set of nodes being returned. + */ + minTimeRemaining?: number | undefined; + /** + * The maximum validation time remaining, in seconds, used to filter the set of nodes being returned. + */ + maxTimeRemaining?: number | undefined; + /** + * The minimum fee percentage, used to filter the set of nodes being returned. If this field is populated no subnet validations will be returned, as their fee percentage is null, since subnet delegations are not supported. Default is 2.0, as per the Avalanche spec. + */ + minFeePercentage?: number | undefined; + /** + * The maximum fee percentage, used to filter the set of nodes being returned. If this field is populated no subnet validations will be returned, as their fee percentage is null, since subnet delegations are not supported. Default is 100.0. + */ + maxFeePercentage?: number | undefined; + /** + * The minimum node uptime performance percentage, which represents node health, used to filter the set of nodes being returned Default is 90. + */ + minUptimePerformance?: number | undefined; + /** + * The maximum node uptime performance percentage, which represents node health, used to filter the set of nodes being returned. Default is 100. + */ + maxUptimePerformance?: number | undefined; + /** + * The subnet ID to filter by. If not provided, then all subnets will be returned. + */ + subnetId?: any | undefined; }; export type ListValidatorsResponse = { - result: components.ListValidatorDetailsResponse; + result: components.ListValidatorDetailsResponse; }; /** @internal */ export const ListValidatorsGlobals$inboundSchema: z.ZodType< - ListValidatorsGlobals, - z.ZodTypeDef, - unknown + ListValidatorsGlobals, + z.ZodTypeDef, + unknown > = z.object({ - network: components.GlobalParamNetwork$inboundSchema.optional(), + network: components.GlobalParamNetwork$inboundSchema.optional(), }); /** @internal */ export type ListValidatorsGlobals$Outbound = { - network?: string | undefined; + network?: string | undefined; }; /** @internal */ export const ListValidatorsGlobals$outboundSchema: z.ZodType< - ListValidatorsGlobals$Outbound, - z.ZodTypeDef, - ListValidatorsGlobals + ListValidatorsGlobals$Outbound, + z.ZodTypeDef, + ListValidatorsGlobals > = z.object({ - network: components.GlobalParamNetwork$outboundSchema.optional(), + network: components.GlobalParamNetwork$outboundSchema.optional(), }); /** @@ -118,80 +120,80 @@ export const ListValidatorsGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListValidatorsGlobals$ { - /** @deprecated use `ListValidatorsGlobals$inboundSchema` instead. */ - export const inboundSchema = ListValidatorsGlobals$inboundSchema; - /** @deprecated use `ListValidatorsGlobals$outboundSchema` instead. */ - export const outboundSchema = ListValidatorsGlobals$outboundSchema; - /** @deprecated use `ListValidatorsGlobals$Outbound` instead. */ - export type Outbound = ListValidatorsGlobals$Outbound; + /** @deprecated use `ListValidatorsGlobals$inboundSchema` instead. */ + export const inboundSchema = ListValidatorsGlobals$inboundSchema; + /** @deprecated use `ListValidatorsGlobals$outboundSchema` instead. */ + export const outboundSchema = ListValidatorsGlobals$outboundSchema; + /** @deprecated use `ListValidatorsGlobals$Outbound` instead. */ + export type Outbound = ListValidatorsGlobals$Outbound; } /** @internal */ export const ListValidatorsRequest$inboundSchema: z.ZodType< - ListValidatorsRequest, - z.ZodTypeDef, - unknown + ListValidatorsRequest, + z.ZodTypeDef, + unknown > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - network: components.GlobalParamNetwork$inboundSchema.optional(), - nodeIds: z.string().optional(), - sortBy: components.SortByOption$inboundSchema.optional(), - sortOrder: components.SortOrder$inboundSchema.optional(), - validationStatus: components.ValidationStatusType$inboundSchema.optional(), - minDelegationCapacity: z.string().optional(), - maxDelegationCapacity: z.string().optional(), - minTimeRemaining: z.number().optional(), - maxTimeRemaining: z.number().optional(), - minFeePercentage: z.number().optional(), - maxFeePercentage: z.number().optional(), - minUptimePerformance: z.number().optional(), - maxUptimePerformance: z.number().optional(), - subnetId: z.any().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + network: components.GlobalParamNetwork$inboundSchema.optional(), + nodeIds: z.string().optional(), + sortBy: components.SortByOption$inboundSchema.optional(), + sortOrder: components.SortOrder$inboundSchema.optional(), + validationStatus: components.ValidationStatusType$inboundSchema.optional(), + minDelegationCapacity: z.string().optional(), + maxDelegationCapacity: z.string().optional(), + minTimeRemaining: z.number().optional(), + maxTimeRemaining: z.number().optional(), + minFeePercentage: z.number().optional(), + maxFeePercentage: z.number().optional(), + minUptimePerformance: z.number().optional(), + maxUptimePerformance: z.number().optional(), + subnetId: z.any().optional(), }); /** @internal */ export type ListValidatorsRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - network?: string | undefined; - nodeIds?: string | undefined; - sortBy?: string | undefined; - sortOrder?: string | undefined; - validationStatus?: string | undefined; - minDelegationCapacity?: string | undefined; - maxDelegationCapacity?: string | undefined; - minTimeRemaining?: number | undefined; - maxTimeRemaining?: number | undefined; - minFeePercentage?: number | undefined; - maxFeePercentage?: number | undefined; - minUptimePerformance?: number | undefined; - maxUptimePerformance?: number | undefined; - subnetId?: any | undefined; + pageToken?: string | undefined; + pageSize: number; + network?: string | undefined; + nodeIds?: string | undefined; + sortBy?: string | undefined; + sortOrder?: string | undefined; + validationStatus?: string | undefined; + minDelegationCapacity?: string | undefined; + maxDelegationCapacity?: string | undefined; + minTimeRemaining?: number | undefined; + maxTimeRemaining?: number | undefined; + minFeePercentage?: number | undefined; + maxFeePercentage?: number | undefined; + minUptimePerformance?: number | undefined; + maxUptimePerformance?: number | undefined; + subnetId?: any | undefined; }; /** @internal */ export const ListValidatorsRequest$outboundSchema: z.ZodType< - ListValidatorsRequest$Outbound, - z.ZodTypeDef, - ListValidatorsRequest + ListValidatorsRequest$Outbound, + z.ZodTypeDef, + ListValidatorsRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - network: components.GlobalParamNetwork$outboundSchema.optional(), - nodeIds: z.string().optional(), - sortBy: components.SortByOption$outboundSchema.optional(), - sortOrder: components.SortOrder$outboundSchema.optional(), - validationStatus: components.ValidationStatusType$outboundSchema.optional(), - minDelegationCapacity: z.string().optional(), - maxDelegationCapacity: z.string().optional(), - minTimeRemaining: z.number().optional(), - maxTimeRemaining: z.number().optional(), - minFeePercentage: z.number().optional(), - maxFeePercentage: z.number().optional(), - minUptimePerformance: z.number().optional(), - maxUptimePerformance: z.number().optional(), - subnetId: z.any().optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + network: components.GlobalParamNetwork$outboundSchema.optional(), + nodeIds: z.string().optional(), + sortBy: components.SortByOption$outboundSchema.optional(), + sortOrder: components.SortOrder$outboundSchema.optional(), + validationStatus: components.ValidationStatusType$outboundSchema.optional(), + minDelegationCapacity: z.string().optional(), + maxDelegationCapacity: z.string().optional(), + minTimeRemaining: z.number().optional(), + maxTimeRemaining: z.number().optional(), + minFeePercentage: z.number().optional(), + maxFeePercentage: z.number().optional(), + minUptimePerformance: z.number().optional(), + maxUptimePerformance: z.number().optional(), + subnetId: z.any().optional(), }); /** @@ -199,58 +201,54 @@ export const ListValidatorsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListValidatorsRequest$ { - /** @deprecated use `ListValidatorsRequest$inboundSchema` instead. */ - export const inboundSchema = ListValidatorsRequest$inboundSchema; - /** @deprecated use `ListValidatorsRequest$outboundSchema` instead. */ - export const outboundSchema = ListValidatorsRequest$outboundSchema; - /** @deprecated use `ListValidatorsRequest$Outbound` instead. */ - export type Outbound = ListValidatorsRequest$Outbound; + /** @deprecated use `ListValidatorsRequest$inboundSchema` instead. */ + export const inboundSchema = ListValidatorsRequest$inboundSchema; + /** @deprecated use `ListValidatorsRequest$outboundSchema` instead. */ + export const outboundSchema = ListValidatorsRequest$outboundSchema; + /** @deprecated use `ListValidatorsRequest$Outbound` instead. */ + export type Outbound = ListValidatorsRequest$Outbound; } /** @internal */ export const ListValidatorsResponse$inboundSchema: z.ZodType< - ListValidatorsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListValidatorDetailsResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListValidatorsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListValidatorDetailsResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListValidatorsResponse$Outbound = { - Result: components.ListValidatorDetailsResponse$Outbound; + Result: components.ListValidatorDetailsResponse$Outbound; }; /** @internal */ export const ListValidatorsResponse$outboundSchema: z.ZodType< - ListValidatorsResponse$Outbound, - z.ZodTypeDef, - ListValidatorsResponse -> = z - .object({ - result: components.ListValidatorDetailsResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListValidatorsResponse$Outbound, + z.ZodTypeDef, + ListValidatorsResponse +> = z.object({ + result: components.ListValidatorDetailsResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListValidatorsResponse$ { - /** @deprecated use `ListValidatorsResponse$inboundSchema` instead. */ - export const inboundSchema = ListValidatorsResponse$inboundSchema; - /** @deprecated use `ListValidatorsResponse$outboundSchema` instead. */ - export const outboundSchema = ListValidatorsResponse$outboundSchema; - /** @deprecated use `ListValidatorsResponse$Outbound` instead. */ - export type Outbound = ListValidatorsResponse$Outbound; + /** @deprecated use `ListValidatorsResponse$inboundSchema` instead. */ + export const inboundSchema = ListValidatorsResponse$inboundSchema; + /** @deprecated use `ListValidatorsResponse$outboundSchema` instead. */ + export const outboundSchema = ListValidatorsResponse$outboundSchema; + /** @deprecated use `ListValidatorsResponse$Outbound` instead. */ + export type Outbound = ListValidatorsResponse$Outbound; } diff --git a/src/models/operations/listwebhooks.ts b/src/models/operations/listwebhooks.ts index 444c972..9503323 100644 --- a/src/models/operations/listwebhooks.ts +++ b/src/models/operations/listwebhooks.ts @@ -2,58 +2,60 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const ListWebhooksServerList = ["https://glacier-api.avax.network"] as const; +export const ListWebhooksServerList = [ + "https://glacier-api.avax.network", +] as const; export type ListWebhooksRequest = { - /** - * A page token, received from a previous list call. Provide this to retrieve the subsequent page. - */ - pageToken?: string | undefined; - /** - * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. - */ - pageSize?: number | undefined; - /** - * Status of the webhook. Use "active" to return only active webhooks, "inactive" to return only inactive webhooks. Else if no status is provided, all configured webhooks will be returned. - */ - status?: components.WebhookStatus | undefined; + /** + * A page token, received from a previous list call. Provide this to retrieve the subsequent page. + */ + pageToken?: string | undefined; + /** + * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100. + */ + pageSize?: number | undefined; + /** + * Status of the webhook. Use "active" to return only active webhooks, "inactive" to return only inactive webhooks. Else if no status is provided, all configured webhooks will be returned. + */ + status?: components.WebhookStatus | undefined; }; export type ListWebhooksResponse = { - result: components.ListWebhooksResponse; + result: components.ListWebhooksResponse; }; /** @internal */ export const ListWebhooksRequest$inboundSchema: z.ZodType< - ListWebhooksRequest, - z.ZodTypeDef, - unknown + ListWebhooksRequest, + z.ZodTypeDef, + unknown > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - status: components.WebhookStatus$inboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + status: components.WebhookStatus$inboundSchema.optional(), }); /** @internal */ export type ListWebhooksRequest$Outbound = { - pageToken?: string | undefined; - pageSize: number; - status?: string | undefined; + pageToken?: string | undefined; + pageSize: number; + status?: string | undefined; }; /** @internal */ export const ListWebhooksRequest$outboundSchema: z.ZodType< - ListWebhooksRequest$Outbound, - z.ZodTypeDef, - ListWebhooksRequest + ListWebhooksRequest$Outbound, + z.ZodTypeDef, + ListWebhooksRequest > = z.object({ - pageToken: z.string().optional(), - pageSize: z.number().int().default(10), - status: components.WebhookStatus$outboundSchema.optional(), + pageToken: z.string().optional(), + pageSize: z.number().int().default(10), + status: components.WebhookStatus$outboundSchema.optional(), }); /** @@ -61,58 +63,54 @@ export const ListWebhooksRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListWebhooksRequest$ { - /** @deprecated use `ListWebhooksRequest$inboundSchema` instead. */ - export const inboundSchema = ListWebhooksRequest$inboundSchema; - /** @deprecated use `ListWebhooksRequest$outboundSchema` instead. */ - export const outboundSchema = ListWebhooksRequest$outboundSchema; - /** @deprecated use `ListWebhooksRequest$Outbound` instead. */ - export type Outbound = ListWebhooksRequest$Outbound; + /** @deprecated use `ListWebhooksRequest$inboundSchema` instead. */ + export const inboundSchema = ListWebhooksRequest$inboundSchema; + /** @deprecated use `ListWebhooksRequest$outboundSchema` instead. */ + export const outboundSchema = ListWebhooksRequest$outboundSchema; + /** @deprecated use `ListWebhooksRequest$Outbound` instead. */ + export type Outbound = ListWebhooksRequest$Outbound; } /** @internal */ export const ListWebhooksResponse$inboundSchema: z.ZodType< - ListWebhooksResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - Result: components.ListWebhooksResponse$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - Result: "result", - }); - }); + ListWebhooksResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Result: components.ListWebhooksResponse$inboundSchema, +}).transform((v) => { + return remap$(v, { + "Result": "result", + }); +}); /** @internal */ export type ListWebhooksResponse$Outbound = { - Result: components.ListWebhooksResponse$Outbound; + Result: components.ListWebhooksResponse$Outbound; }; /** @internal */ export const ListWebhooksResponse$outboundSchema: z.ZodType< - ListWebhooksResponse$Outbound, - z.ZodTypeDef, - ListWebhooksResponse -> = z - .object({ - result: components.ListWebhooksResponse$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - result: "Result", - }); - }); + ListWebhooksResponse$Outbound, + z.ZodTypeDef, + ListWebhooksResponse +> = z.object({ + result: components.ListWebhooksResponse$outboundSchema, +}).transform((v) => { + return remap$(v, { + result: "Result", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListWebhooksResponse$ { - /** @deprecated use `ListWebhooksResponse$inboundSchema` instead. */ - export const inboundSchema = ListWebhooksResponse$inboundSchema; - /** @deprecated use `ListWebhooksResponse$outboundSchema` instead. */ - export const outboundSchema = ListWebhooksResponse$outboundSchema; - /** @deprecated use `ListWebhooksResponse$Outbound` instead. */ - export type Outbound = ListWebhooksResponse$Outbound; + /** @deprecated use `ListWebhooksResponse$inboundSchema` instead. */ + export const inboundSchema = ListWebhooksResponse$inboundSchema; + /** @deprecated use `ListWebhooksResponse$outboundSchema` instead. */ + export const outboundSchema = ListWebhooksResponse$outboundSchema; + /** @deprecated use `ListWebhooksResponse$Outbound` instead. */ + export type Outbound = ListWebhooksResponse$Outbound; } diff --git a/src/models/operations/metricshealthcheck.ts b/src/models/operations/metricshealthcheck.ts index 3c2b29e..71723f1 100644 --- a/src/models/operations/metricshealthcheck.ts +++ b/src/models/operations/metricshealthcheck.ts @@ -2,199 +2,201 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { collectExtraKeys as collectExtraKeys$ } from "../../lib/schemas.js"; -import * as z from "zod"; -export const MetricsHealthCheckServerList = ["https://popsicle-api.avax.network"] as const; +export const MetricsHealthCheckServerList = [ + "https://metrics.avax.network", +] as const; export type Info = { - status?: string | undefined; - additionalProperties: { [k: string]: string }; + status?: string | undefined; + additionalProperties: { [k: string]: string }; }; export type ErrorT = { - status?: string | undefined; - additionalProperties: { [k: string]: string }; + status?: string | undefined; + additionalProperties: { [k: string]: string }; }; export type Details = { - status?: string | undefined; - additionalProperties: { [k: string]: string }; + status?: string | undefined; + additionalProperties: { [k: string]: string }; }; /** * The Health Check is successful */ export type MetricsHealthCheckResponseBody = { - status?: string | undefined; - info?: { [k: string]: Info } | null | undefined; - error?: { [k: string]: ErrorT } | null | undefined; - details?: { [k: string]: Details } | undefined; + status?: string | undefined; + info?: { [k: string]: Info } | null | undefined; + error?: { [k: string]: ErrorT } | null | undefined; + details?: { [k: string]: Details } | undefined; }; /** @internal */ -export const Info$inboundSchema: z.ZodType = collectExtraKeys$( - z - .object({ - status: z.string().optional(), - }) - .catchall(z.string()), - "additionalProperties" -); +export const Info$inboundSchema: z.ZodType = + collectExtraKeys$( + z.object({ + status: z.string().optional(), + }).catchall(z.string()), + "additionalProperties", + ); /** @internal */ export type Info$Outbound = { - status?: string | undefined; - [additionalProperties: string]: unknown; + status?: string | undefined; + [additionalProperties: string]: unknown; }; /** @internal */ -export const Info$outboundSchema: z.ZodType = z - .object({ - status: z.string().optional(), - additionalProperties: z.record(z.string()), - }) - .transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }); +export const Info$outboundSchema: z.ZodType = + z.object({ + status: z.string().optional(), + additionalProperties: z.record(z.string()), + }).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Info$ { - /** @deprecated use `Info$inboundSchema` instead. */ - export const inboundSchema = Info$inboundSchema; - /** @deprecated use `Info$outboundSchema` instead. */ - export const outboundSchema = Info$outboundSchema; - /** @deprecated use `Info$Outbound` instead. */ - export type Outbound = Info$Outbound; + /** @deprecated use `Info$inboundSchema` instead. */ + export const inboundSchema = Info$inboundSchema; + /** @deprecated use `Info$outboundSchema` instead. */ + export const outboundSchema = Info$outboundSchema; + /** @deprecated use `Info$Outbound` instead. */ + export type Outbound = Info$Outbound; } /** @internal */ -export const ErrorT$inboundSchema: z.ZodType = collectExtraKeys$( - z - .object({ - status: z.string().optional(), - }) - .catchall(z.string()), - "additionalProperties" -); +export const ErrorT$inboundSchema: z.ZodType = + collectExtraKeys$( + z.object({ + status: z.string().optional(), + }).catchall(z.string()), + "additionalProperties", + ); /** @internal */ export type ErrorT$Outbound = { - status?: string | undefined; - [additionalProperties: string]: unknown; + status?: string | undefined; + [additionalProperties: string]: unknown; }; /** @internal */ -export const ErrorT$outboundSchema: z.ZodType = z - .object({ - status: z.string().optional(), - additionalProperties: z.record(z.string()), - }) - .transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }); +export const ErrorT$outboundSchema: z.ZodType< + ErrorT$Outbound, + z.ZodTypeDef, + ErrorT +> = z.object({ + status: z.string().optional(), + additionalProperties: z.record(z.string()), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ErrorT$ { - /** @deprecated use `ErrorT$inboundSchema` instead. */ - export const inboundSchema = ErrorT$inboundSchema; - /** @deprecated use `ErrorT$outboundSchema` instead. */ - export const outboundSchema = ErrorT$outboundSchema; - /** @deprecated use `ErrorT$Outbound` instead. */ - export type Outbound = ErrorT$Outbound; + /** @deprecated use `ErrorT$inboundSchema` instead. */ + export const inboundSchema = ErrorT$inboundSchema; + /** @deprecated use `ErrorT$outboundSchema` instead. */ + export const outboundSchema = ErrorT$outboundSchema; + /** @deprecated use `ErrorT$Outbound` instead. */ + export type Outbound = ErrorT$Outbound; } /** @internal */ -export const Details$inboundSchema: z.ZodType = collectExtraKeys$( - z - .object({ - status: z.string().optional(), - }) - .catchall(z.string()), - "additionalProperties" -); +export const Details$inboundSchema: z.ZodType = + collectExtraKeys$( + z.object({ + status: z.string().optional(), + }).catchall(z.string()), + "additionalProperties", + ); /** @internal */ export type Details$Outbound = { - status?: string | undefined; - [additionalProperties: string]: unknown; + status?: string | undefined; + [additionalProperties: string]: unknown; }; /** @internal */ -export const Details$outboundSchema: z.ZodType = z - .object({ - status: z.string().optional(), - additionalProperties: z.record(z.string()), - }) - .transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }); +export const Details$outboundSchema: z.ZodType< + Details$Outbound, + z.ZodTypeDef, + Details +> = z.object({ + status: z.string().optional(), + additionalProperties: z.record(z.string()), +}).transform((v) => { + return { + ...v.additionalProperties, + ...remap$(v, { + additionalProperties: null, + }), + }; +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Details$ { - /** @deprecated use `Details$inboundSchema` instead. */ - export const inboundSchema = Details$inboundSchema; - /** @deprecated use `Details$outboundSchema` instead. */ - export const outboundSchema = Details$outboundSchema; - /** @deprecated use `Details$Outbound` instead. */ - export type Outbound = Details$Outbound; + /** @deprecated use `Details$inboundSchema` instead. */ + export const inboundSchema = Details$inboundSchema; + /** @deprecated use `Details$outboundSchema` instead. */ + export const outboundSchema = Details$outboundSchema; + /** @deprecated use `Details$Outbound` instead. */ + export type Outbound = Details$Outbound; } /** @internal */ export const MetricsHealthCheckResponseBody$inboundSchema: z.ZodType< - MetricsHealthCheckResponseBody, - z.ZodTypeDef, - unknown + MetricsHealthCheckResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - status: z.string().optional(), - info: z.nullable(z.record(z.lazy(() => Info$inboundSchema))).optional(), - error: z.nullable(z.record(z.lazy(() => ErrorT$inboundSchema))).optional(), - details: z.record(z.lazy(() => Details$inboundSchema)).optional(), + status: z.string().optional(), + info: z.nullable(z.record(z.lazy(() => Info$inboundSchema))).optional(), + error: z.nullable(z.record(z.lazy(() => ErrorT$inboundSchema))).optional(), + details: z.record(z.lazy(() => Details$inboundSchema)).optional(), }); /** @internal */ export type MetricsHealthCheckResponseBody$Outbound = { - status?: string | undefined; - info?: { [k: string]: Info$Outbound } | null | undefined; - error?: { [k: string]: ErrorT$Outbound } | null | undefined; - details?: { [k: string]: Details$Outbound } | undefined; + status?: string | undefined; + info?: { [k: string]: Info$Outbound } | null | undefined; + error?: { [k: string]: ErrorT$Outbound } | null | undefined; + details?: { [k: string]: Details$Outbound } | undefined; }; /** @internal */ export const MetricsHealthCheckResponseBody$outboundSchema: z.ZodType< - MetricsHealthCheckResponseBody$Outbound, - z.ZodTypeDef, - MetricsHealthCheckResponseBody + MetricsHealthCheckResponseBody$Outbound, + z.ZodTypeDef, + MetricsHealthCheckResponseBody > = z.object({ - status: z.string().optional(), - info: z.nullable(z.record(z.lazy(() => Info$outboundSchema))).optional(), - error: z.nullable(z.record(z.lazy(() => ErrorT$outboundSchema))).optional(), - details: z.record(z.lazy(() => Details$outboundSchema)).optional(), + status: z.string().optional(), + info: z.nullable(z.record(z.lazy(() => Info$outboundSchema))).optional(), + error: z.nullable(z.record(z.lazy(() => ErrorT$outboundSchema))).optional(), + details: z.record(z.lazy(() => Details$outboundSchema)).optional(), }); /** @@ -202,10 +204,10 @@ export const MetricsHealthCheckResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MetricsHealthCheckResponseBody$ { - /** @deprecated use `MetricsHealthCheckResponseBody$inboundSchema` instead. */ - export const inboundSchema = MetricsHealthCheckResponseBody$inboundSchema; - /** @deprecated use `MetricsHealthCheckResponseBody$outboundSchema` instead. */ - export const outboundSchema = MetricsHealthCheckResponseBody$outboundSchema; - /** @deprecated use `MetricsHealthCheckResponseBody$Outbound` instead. */ - export type Outbound = MetricsHealthCheckResponseBody$Outbound; + /** @deprecated use `MetricsHealthCheckResponseBody$inboundSchema` instead. */ + export const inboundSchema = MetricsHealthCheckResponseBody$inboundSchema; + /** @deprecated use `MetricsHealthCheckResponseBody$outboundSchema` instead. */ + export const outboundSchema = MetricsHealthCheckResponseBody$outboundSchema; + /** @deprecated use `MetricsHealthCheckResponseBody$Outbound` instead. */ + export type Outbound = MetricsHealthCheckResponseBody$Outbound; } diff --git a/src/models/operations/posttransactionexportjob.ts b/src/models/operations/posttransactionexportjob.ts index b64e1be..119609e 100644 --- a/src/models/operations/posttransactionexportjob.ts +++ b/src/models/operations/posttransactionexportjob.ts @@ -2,38 +2,40 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as components from "../components/index.js"; import * as z from "zod"; +import * as components from "../components/index.js"; -export const PostTransactionExportJobServerList = ["https://glacier-api.avax.network"] as const; +export const PostTransactionExportJobServerList = [ + "https://glacier-api.avax.network", +] as const; export type PostTransactionExportJobRequestBody = - | components.CreateEvmTransactionExportRequest - | components.CreatePrimaryNetworkTransactionExportRequest; + | components.CreateEvmTransactionExportRequest + | components.CreatePrimaryNetworkTransactionExportRequest; /** @internal */ export const PostTransactionExportJobRequestBody$inboundSchema: z.ZodType< - PostTransactionExportJobRequestBody, - z.ZodTypeDef, - unknown + PostTransactionExportJobRequestBody, + z.ZodTypeDef, + unknown > = z.union([ - components.CreateEvmTransactionExportRequest$inboundSchema, - components.CreatePrimaryNetworkTransactionExportRequest$inboundSchema, + components.CreateEvmTransactionExportRequest$inboundSchema, + components.CreatePrimaryNetworkTransactionExportRequest$inboundSchema, ]); /** @internal */ export type PostTransactionExportJobRequestBody$Outbound = - | components.CreateEvmTransactionExportRequest$Outbound - | components.CreatePrimaryNetworkTransactionExportRequest$Outbound; + | components.CreateEvmTransactionExportRequest$Outbound + | components.CreatePrimaryNetworkTransactionExportRequest$Outbound; /** @internal */ export const PostTransactionExportJobRequestBody$outboundSchema: z.ZodType< - PostTransactionExportJobRequestBody$Outbound, - z.ZodTypeDef, - PostTransactionExportJobRequestBody + PostTransactionExportJobRequestBody$Outbound, + z.ZodTypeDef, + PostTransactionExportJobRequestBody > = z.union([ - components.CreateEvmTransactionExportRequest$outboundSchema, - components.CreatePrimaryNetworkTransactionExportRequest$outboundSchema, + components.CreateEvmTransactionExportRequest$outboundSchema, + components.CreatePrimaryNetworkTransactionExportRequest$outboundSchema, ]); /** @@ -41,10 +43,12 @@ export const PostTransactionExportJobRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostTransactionExportJobRequestBody$ { - /** @deprecated use `PostTransactionExportJobRequestBody$inboundSchema` instead. */ - export const inboundSchema = PostTransactionExportJobRequestBody$inboundSchema; - /** @deprecated use `PostTransactionExportJobRequestBody$outboundSchema` instead. */ - export const outboundSchema = PostTransactionExportJobRequestBody$outboundSchema; - /** @deprecated use `PostTransactionExportJobRequestBody$Outbound` instead. */ - export type Outbound = PostTransactionExportJobRequestBody$Outbound; + /** @deprecated use `PostTransactionExportJobRequestBody$inboundSchema` instead. */ + export const inboundSchema = + PostTransactionExportJobRequestBody$inboundSchema; + /** @deprecated use `PostTransactionExportJobRequestBody$outboundSchema` instead. */ + export const outboundSchema = + PostTransactionExportJobRequestBody$outboundSchema; + /** @deprecated use `PostTransactionExportJobRequestBody$Outbound` instead. */ + export type Outbound = PostTransactionExportJobRequestBody$Outbound; } diff --git a/src/models/operations/reindexnft.ts b/src/models/operations/reindexnft.ts index 13d17c4..f12550b 100644 --- a/src/models/operations/reindexnft.ts +++ b/src/models/operations/reindexnft.ts @@ -4,48 +4,53 @@ import * as z from "zod"; -export const ReindexNftServerList = ["https://glacier-api.avax.network"] as const; +export const ReindexNftServerList = [ + "https://glacier-api.avax.network", +] as const; export type ReindexNftGlobals = { - /** - * A supported EVM chain id, chain alias, or blockchain id. - */ - chainId?: string | undefined; + /** + * A supported EVM chain id, chain alias, or blockchain id. + */ + chainId?: string | undefined; }; export type ReindexNftRequest = { - /** - * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. - */ - chainId?: string | undefined; - /** - * Contract address on the relevant chain. - */ - address: string; - /** - * TokenId on the contract - */ - tokenId: string; + /** + * A supported evm chain id, chain alias or blockchain id. Use the `/chains` endpoint to get a list of supported chain ids. + */ + chainId?: string | undefined; + /** + * Contract address on the relevant chain. + */ + address: string; + /** + * TokenId on the contract + */ + tokenId: string; }; /** @internal */ -export const ReindexNftGlobals$inboundSchema: z.ZodType = - z.object({ - chainId: z.string().optional(), - }); +export const ReindexNftGlobals$inboundSchema: z.ZodType< + ReindexNftGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + chainId: z.string().optional(), +}); /** @internal */ export type ReindexNftGlobals$Outbound = { - chainId?: string | undefined; + chainId?: string | undefined; }; /** @internal */ export const ReindexNftGlobals$outboundSchema: z.ZodType< - ReindexNftGlobals$Outbound, - z.ZodTypeDef, - ReindexNftGlobals + ReindexNftGlobals$Outbound, + z.ZodTypeDef, + ReindexNftGlobals > = z.object({ - chainId: z.string().optional(), + chainId: z.string().optional(), }); /** @@ -53,38 +58,41 @@ export const ReindexNftGlobals$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ReindexNftGlobals$ { - /** @deprecated use `ReindexNftGlobals$inboundSchema` instead. */ - export const inboundSchema = ReindexNftGlobals$inboundSchema; - /** @deprecated use `ReindexNftGlobals$outboundSchema` instead. */ - export const outboundSchema = ReindexNftGlobals$outboundSchema; - /** @deprecated use `ReindexNftGlobals$Outbound` instead. */ - export type Outbound = ReindexNftGlobals$Outbound; + /** @deprecated use `ReindexNftGlobals$inboundSchema` instead. */ + export const inboundSchema = ReindexNftGlobals$inboundSchema; + /** @deprecated use `ReindexNftGlobals$outboundSchema` instead. */ + export const outboundSchema = ReindexNftGlobals$outboundSchema; + /** @deprecated use `ReindexNftGlobals$Outbound` instead. */ + export type Outbound = ReindexNftGlobals$Outbound; } /** @internal */ -export const ReindexNftRequest$inboundSchema: z.ZodType = - z.object({ - chainId: z.string().optional(), - address: z.string(), - tokenId: z.string(), - }); +export const ReindexNftRequest$inboundSchema: z.ZodType< + ReindexNftRequest, + z.ZodTypeDef, + unknown +> = z.object({ + chainId: z.string().optional(), + address: z.string(), + tokenId: z.string(), +}); /** @internal */ export type ReindexNftRequest$Outbound = { - chainId?: string | undefined; - address: string; - tokenId: string; + chainId?: string | undefined; + address: string; + tokenId: string; }; /** @internal */ export const ReindexNftRequest$outboundSchema: z.ZodType< - ReindexNftRequest$Outbound, - z.ZodTypeDef, - ReindexNftRequest + ReindexNftRequest$Outbound, + z.ZodTypeDef, + ReindexNftRequest > = z.object({ - chainId: z.string().optional(), - address: z.string(), - tokenId: z.string(), + chainId: z.string().optional(), + address: z.string(), + tokenId: z.string(), }); /** @@ -92,10 +100,10 @@ export const ReindexNftRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ReindexNftRequest$ { - /** @deprecated use `ReindexNftRequest$inboundSchema` instead. */ - export const inboundSchema = ReindexNftRequest$inboundSchema; - /** @deprecated use `ReindexNftRequest$outboundSchema` instead. */ - export const outboundSchema = ReindexNftRequest$outboundSchema; - /** @deprecated use `ReindexNftRequest$Outbound` instead. */ - export type Outbound = ReindexNftRequest$Outbound; + /** @deprecated use `ReindexNftRequest$inboundSchema` instead. */ + export const inboundSchema = ReindexNftRequest$inboundSchema; + /** @deprecated use `ReindexNftRequest$outboundSchema` instead. */ + export const outboundSchema = ReindexNftRequest$outboundSchema; + /** @deprecated use `ReindexNftRequest$Outbound` instead. */ + export type Outbound = ReindexNftRequest$Outbound; } diff --git a/src/models/operations/removeaddressesfromwebhook.ts b/src/models/operations/removeaddressesfromwebhook.ts index 402aa72..32672a9 100644 --- a/src/models/operations/removeaddressesfromwebhook.ts +++ b/src/models/operations/removeaddressesfromwebhook.ts @@ -2,67 +2,66 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const RemoveAddressesFromWebhookServerList = ["https://glacier-api.avax.network"] as const; +export const RemoveAddressesFromWebhookServerList = [ + "https://glacier-api.avax.network", +] as const; export type RemoveAddressesFromWebhookRequest = { - /** - * The webhook identifier. - */ - id: string; - addressesChangeRequest: components.AddressesChangeRequest; + /** + * The webhook identifier. + */ + id: string; + addressesChangeRequest: components.AddressesChangeRequest; }; /** @internal */ export const RemoveAddressesFromWebhookRequest$inboundSchema: z.ZodType< - RemoveAddressesFromWebhookRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - id: z.string(), - AddressesChangeRequest: components.AddressesChangeRequest$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - AddressesChangeRequest: "addressesChangeRequest", - }); - }); + RemoveAddressesFromWebhookRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + AddressesChangeRequest: components.AddressesChangeRequest$inboundSchema, +}).transform((v) => { + return remap$(v, { + "AddressesChangeRequest": "addressesChangeRequest", + }); +}); /** @internal */ export type RemoveAddressesFromWebhookRequest$Outbound = { - id: string; - AddressesChangeRequest: components.AddressesChangeRequest$Outbound; + id: string; + AddressesChangeRequest: components.AddressesChangeRequest$Outbound; }; /** @internal */ export const RemoveAddressesFromWebhookRequest$outboundSchema: z.ZodType< - RemoveAddressesFromWebhookRequest$Outbound, - z.ZodTypeDef, - RemoveAddressesFromWebhookRequest -> = z - .object({ - id: z.string(), - addressesChangeRequest: components.AddressesChangeRequest$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - addressesChangeRequest: "AddressesChangeRequest", - }); - }); + RemoveAddressesFromWebhookRequest$Outbound, + z.ZodTypeDef, + RemoveAddressesFromWebhookRequest +> = z.object({ + id: z.string(), + addressesChangeRequest: components.AddressesChangeRequest$outboundSchema, +}).transform((v) => { + return remap$(v, { + addressesChangeRequest: "AddressesChangeRequest", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace RemoveAddressesFromWebhookRequest$ { - /** @deprecated use `RemoveAddressesFromWebhookRequest$inboundSchema` instead. */ - export const inboundSchema = RemoveAddressesFromWebhookRequest$inboundSchema; - /** @deprecated use `RemoveAddressesFromWebhookRequest$outboundSchema` instead. */ - export const outboundSchema = RemoveAddressesFromWebhookRequest$outboundSchema; - /** @deprecated use `RemoveAddressesFromWebhookRequest$Outbound` instead. */ - export type Outbound = RemoveAddressesFromWebhookRequest$Outbound; + /** @deprecated use `RemoveAddressesFromWebhookRequest$inboundSchema` instead. */ + export const inboundSchema = RemoveAddressesFromWebhookRequest$inboundSchema; + /** @deprecated use `RemoveAddressesFromWebhookRequest$outboundSchema` instead. */ + export const outboundSchema = + RemoveAddressesFromWebhookRequest$outboundSchema; + /** @deprecated use `RemoveAddressesFromWebhookRequest$Outbound` instead. */ + export type Outbound = RemoveAddressesFromWebhookRequest$Outbound; } diff --git a/src/models/operations/supportedchains.ts b/src/models/operations/supportedchains.ts index e4774b8..7fa1531 100644 --- a/src/models/operations/supportedchains.ts +++ b/src/models/operations/supportedchains.ts @@ -2,46 +2,48 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as components from "../components/index.js"; import * as z from "zod"; +import * as components from "../components/index.js"; -export const SupportedChainsServerList = ["https://glacier-api.avax.network"] as const; +export const SupportedChainsServerList = [ + "https://glacier-api.avax.network", +] as const; export type SupportedChainsRequest = { - /** - * mainnet or testnet. - */ - network?: components.NetworkType | undefined; - /** - * Filter by feature. - */ - feature?: components.GlacierApiFeature | undefined; + /** + * mainnet or testnet. + */ + network?: components.NetworkType | undefined; + /** + * Filter by feature. + */ + feature?: components.GlacierApiFeature | undefined; }; /** @internal */ export const SupportedChainsRequest$inboundSchema: z.ZodType< - SupportedChainsRequest, - z.ZodTypeDef, - unknown + SupportedChainsRequest, + z.ZodTypeDef, + unknown > = z.object({ - network: components.NetworkType$inboundSchema.optional(), - feature: components.GlacierApiFeature$inboundSchema.optional(), + network: components.NetworkType$inboundSchema.optional(), + feature: components.GlacierApiFeature$inboundSchema.optional(), }); /** @internal */ export type SupportedChainsRequest$Outbound = { - network?: string | undefined; - feature?: string | undefined; + network?: string | undefined; + feature?: string | undefined; }; /** @internal */ export const SupportedChainsRequest$outboundSchema: z.ZodType< - SupportedChainsRequest$Outbound, - z.ZodTypeDef, - SupportedChainsRequest + SupportedChainsRequest$Outbound, + z.ZodTypeDef, + SupportedChainsRequest > = z.object({ - network: components.NetworkType$outboundSchema.optional(), - feature: components.GlacierApiFeature$outboundSchema.optional(), + network: components.NetworkType$outboundSchema.optional(), + feature: components.GlacierApiFeature$outboundSchema.optional(), }); /** @@ -49,10 +51,10 @@ export const SupportedChainsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SupportedChainsRequest$ { - /** @deprecated use `SupportedChainsRequest$inboundSchema` instead. */ - export const inboundSchema = SupportedChainsRequest$inboundSchema; - /** @deprecated use `SupportedChainsRequest$outboundSchema` instead. */ - export const outboundSchema = SupportedChainsRequest$outboundSchema; - /** @deprecated use `SupportedChainsRequest$Outbound` instead. */ - export type Outbound = SupportedChainsRequest$Outbound; + /** @deprecated use `SupportedChainsRequest$inboundSchema` instead. */ + export const inboundSchema = SupportedChainsRequest$inboundSchema; + /** @deprecated use `SupportedChainsRequest$outboundSchema` instead. */ + export const outboundSchema = SupportedChainsRequest$outboundSchema; + /** @deprecated use `SupportedChainsRequest$Outbound` instead. */ + export type Outbound = SupportedChainsRequest$Outbound; } diff --git a/src/models/operations/updatewebhook.ts b/src/models/operations/updatewebhook.ts index 9f0871b..f0f6261 100644 --- a/src/models/operations/updatewebhook.ts +++ b/src/models/operations/updatewebhook.ts @@ -2,67 +2,65 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; -import * as z from "zod"; -export const UpdateWebhookServerList = ["https://glacier-api.avax.network"] as const; +export const UpdateWebhookServerList = [ + "https://glacier-api.avax.network", +] as const; export type UpdateWebhookRequest = { - /** - * The webhook identifier. - */ - id: string; - updateWebhookRequest: components.UpdateWebhookRequest; + /** + * The webhook identifier. + */ + id: string; + updateWebhookRequest: components.UpdateWebhookRequest; }; /** @internal */ export const UpdateWebhookRequest$inboundSchema: z.ZodType< - UpdateWebhookRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - id: z.string(), - UpdateWebhookRequest: components.UpdateWebhookRequest$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - UpdateWebhookRequest: "updateWebhookRequest", - }); - }); + UpdateWebhookRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + UpdateWebhookRequest: components.UpdateWebhookRequest$inboundSchema, +}).transform((v) => { + return remap$(v, { + "UpdateWebhookRequest": "updateWebhookRequest", + }); +}); /** @internal */ export type UpdateWebhookRequest$Outbound = { - id: string; - UpdateWebhookRequest: components.UpdateWebhookRequest$Outbound; + id: string; + UpdateWebhookRequest: components.UpdateWebhookRequest$Outbound; }; /** @internal */ export const UpdateWebhookRequest$outboundSchema: z.ZodType< - UpdateWebhookRequest$Outbound, - z.ZodTypeDef, - UpdateWebhookRequest -> = z - .object({ - id: z.string(), - updateWebhookRequest: components.UpdateWebhookRequest$outboundSchema, - }) - .transform((v) => { - return remap$(v, { - updateWebhookRequest: "UpdateWebhookRequest", - }); - }); + UpdateWebhookRequest$Outbound, + z.ZodTypeDef, + UpdateWebhookRequest +> = z.object({ + id: z.string(), + updateWebhookRequest: components.UpdateWebhookRequest$outboundSchema, +}).transform((v) => { + return remap$(v, { + updateWebhookRequest: "UpdateWebhookRequest", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateWebhookRequest$ { - /** @deprecated use `UpdateWebhookRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateWebhookRequest$inboundSchema; - /** @deprecated use `UpdateWebhookRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateWebhookRequest$outboundSchema; - /** @deprecated use `UpdateWebhookRequest$Outbound` instead. */ - export type Outbound = UpdateWebhookRequest$Outbound; + /** @deprecated use `UpdateWebhookRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateWebhookRequest$inboundSchema; + /** @deprecated use `UpdateWebhookRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateWebhookRequest$outboundSchema; + /** @deprecated use `UpdateWebhookRequest$Outbound` instead. */ + export type Outbound = UpdateWebhookRequest$Outbound; } diff --git a/src/sdk/avacloudsdkbalances.ts b/src/sdk/avacloudsdkbalances.ts index 0f7d01e..80151eb 100644 --- a/src/sdk/avacloudsdkbalances.ts +++ b/src/sdk/avacloudsdkbalances.ts @@ -14,82 +14,102 @@ import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class AvaCloudSDKBalances extends ClientSDK { - /** - * Get native token balance - * - * @remarks - * Gets native token balance of a wallet address. - * - * Balance at a given block can be retrieved with the `blockNumber` parameter. - */ - async getNativeBalance( - request: operations.GetNativeBalanceRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataEvmBalancesGetNativeBalance(this, request, options)); - } + /** + * Get native token balance + * + * @remarks + * Gets native token balance of a wallet address. + * + * Balance at a given block can be retrieved with the `blockNumber` parameter. + */ + async getNativeBalance( + request: operations.GetNativeBalanceRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataEvmBalancesGetNativeBalance( + this, + request, + options, + )); + } - /** - * List ERC-20 balances - * - * @remarks - * Lists ERC-20 token balances of a wallet address. - * - * Balance at a given block can be retrieved with the `blockNumber` parameter. - * - * Balance for specific contracts can be retrieved with the `contractAddresses` parameter. - */ - async listErc20Balances( - request: operations.ListErc20BalancesRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(dataEvmBalancesListErc20Balances(this, request, options)); - } + /** + * List ERC-20 balances + * + * @remarks + * Lists ERC-20 token balances of a wallet address. + * + * Balance at a given block can be retrieved with the `blockNumber` parameter. + * + * Balance for specific contracts can be retrieved with the `contractAddresses` parameter. + */ + async listErc20Balances( + request: operations.ListErc20BalancesRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataEvmBalancesListErc20Balances( + this, + request, + options, + )); + } - /** - * List ERC-721 balances - * - * @remarks - * Lists ERC-721 token balances of a wallet address. - * - * Balance for a specific contract can be retrieved with the `contractAddress` parameter. - */ - async listErc721Balances( - request: operations.ListErc721BalancesRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(dataEvmBalancesListErc721Balances(this, request, options)); - } + /** + * List ERC-721 balances + * + * @remarks + * Lists ERC-721 token balances of a wallet address. + * + * Balance for a specific contract can be retrieved with the `contractAddress` parameter. + */ + async listErc721Balances( + request: operations.ListErc721BalancesRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataEvmBalancesListErc721Balances( + this, + request, + options, + )); + } - /** - * List ERC-1155 balances - * - * @remarks - * Lists ERC-1155 token balances of a wallet address. - * - * Balance at a given block can be retrieved with the `blockNumber` parameter. - * - * Balance for a specific contract can be retrieved with the `contractAddress` parameter. - */ - async listErc1155Balances( - request: operations.ListErc1155BalancesRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(dataEvmBalancesListErc1155Balances(this, request, options)); - } + /** + * List ERC-1155 balances + * + * @remarks + * Lists ERC-1155 token balances of a wallet address. + * + * Balance at a given block can be retrieved with the `blockNumber` parameter. + * + * Balance for a specific contract can be retrieved with the `contractAddress` parameter. + */ + async listErc1155Balances( + request: operations.ListErc1155BalancesRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataEvmBalancesListErc1155Balances( + this, + request, + options, + )); + } - /** - * List collectible (ERC-721/ERC-1155) balances - * - * @remarks - * Lists ERC-721 and ERC-1155 token balances of a wallet address. - * - * Balance for a specific contract can be retrieved with the `contractAddress` parameter. - */ - async listCollectibleBalances( - request: operations.ListCollectibleBalancesRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(dataEvmBalancesListCollectibleBalances(this, request, options)); - } + /** + * List collectible (ERC-721/ERC-1155) balances + * + * @remarks + * Lists ERC-721 and ERC-1155 token balances of a wallet address. + * + * Balance for a specific contract can be retrieved with the `contractAddress` parameter. + */ + async listCollectibleBalances( + request: operations.ListCollectibleBalancesRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataEvmBalancesListCollectibleBalances( + this, + request, + options, + )); + } } diff --git a/src/sdk/avacloudsdkblocks.ts b/src/sdk/avacloudsdkblocks.ts index 41e4ba9..385cd29 100644 --- a/src/sdk/avacloudsdkblocks.ts +++ b/src/sdk/avacloudsdkblocks.ts @@ -11,29 +11,37 @@ import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class AvaCloudSDKBlocks extends ClientSDK { - /** - * List latest blocks - * - * @remarks - * Lists the latest indexed blocks on the EVM-compatible chain sorted in descending order by block timestamp. - */ - async getLatestBlocks( - request: operations.GetLatestBlocksRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(dataEvmBlocksGetLatestBlocks(this, request, options)); - } + /** + * List latest blocks + * + * @remarks + * Lists the latest indexed blocks on the EVM-compatible chain sorted in descending order by block timestamp. + */ + async getLatestBlocks( + request: operations.GetLatestBlocksRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataEvmBlocksGetLatestBlocks( + this, + request, + options, + )); + } - /** - * Get block - * - * @remarks - * Gets the details of an individual block on the EVM-compatible chain. - */ - async getBlock( - request: operations.GetBlockRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataEvmBlocksGetBlock(this, request, options)); - } + /** + * Get block + * + * @remarks + * Gets the details of an individual block on the EVM-compatible chain. + */ + async getBlock( + request: operations.GetBlockRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataEvmBlocksGetBlock( + this, + request, + options, + )); + } } diff --git a/src/sdk/avacloudsdkchains.ts b/src/sdk/avacloudsdkchains.ts index c7c0d38..6bab336 100644 --- a/src/sdk/avacloudsdkchains.ts +++ b/src/sdk/avacloudsdkchains.ts @@ -10,29 +10,37 @@ import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class AvaCloudSDKChains extends ClientSDK { - /** - * List chains - * - * @remarks - * Lists the supported EVM-compatible chains. Filterable by network. - */ - async supportedChains( - request: operations.SupportedChainsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataEvmChainsSupportedChains(this, request, options)); - } + /** + * List chains + * + * @remarks + * Lists the supported EVM-compatible chains. Filterable by network. + */ + async supportedChains( + request: operations.SupportedChainsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataEvmChainsSupportedChains( + this, + request, + options, + )); + } - /** - * Get chain information - * - * @remarks - * Gets chain information for the EVM-compatible chain if supported by the api. - */ - async getChainInfo( - request: operations.GetChainInfoRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataEvmChainsGetChainInfo(this, request, options)); - } + /** + * Get chain information + * + * @remarks + * Gets chain information for the EVM-compatible chain if supported by the api. + */ + async getChainInfo( + request: operations.GetChainInfoRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataEvmChainsGetChainInfo( + this, + request, + options, + )); + } } diff --git a/src/sdk/avacloudsdkevm.ts b/src/sdk/avacloudsdkevm.ts index 6fd6083..5188138 100644 --- a/src/sdk/avacloudsdkevm.ts +++ b/src/sdk/avacloudsdkevm.ts @@ -10,28 +10,28 @@ import { AvaCloudSDKTransactions } from "./avacloudsdktransactions.js"; import { Contracts } from "./contracts.js"; export class AvaCloudSDKEvm extends ClientSDK { - private _balances?: AvaCloudSDKBalances; - get balances(): AvaCloudSDKBalances { - return (this._balances ??= new AvaCloudSDKBalances(this.options$)); - } + private _balances?: AvaCloudSDKBalances; + get balances(): AvaCloudSDKBalances { + return (this._balances ??= new AvaCloudSDKBalances(this.options$)); + } - private _blocks?: AvaCloudSDKBlocks; - get blocks(): AvaCloudSDKBlocks { - return (this._blocks ??= new AvaCloudSDKBlocks(this.options$)); - } + private _blocks?: AvaCloudSDKBlocks; + get blocks(): AvaCloudSDKBlocks { + return (this._blocks ??= new AvaCloudSDKBlocks(this.options$)); + } - private _transactions?: AvaCloudSDKTransactions; - get transactions(): AvaCloudSDKTransactions { - return (this._transactions ??= new AvaCloudSDKTransactions(this.options$)); - } + private _transactions?: AvaCloudSDKTransactions; + get transactions(): AvaCloudSDKTransactions { + return (this._transactions ??= new AvaCloudSDKTransactions(this.options$)); + } - private _contracts?: Contracts; - get contracts(): Contracts { - return (this._contracts ??= new Contracts(this.options$)); - } + private _contracts?: Contracts; + get contracts(): Contracts { + return (this._contracts ??= new Contracts(this.options$)); + } - private _chains?: AvaCloudSDKChains; - get chains(): AvaCloudSDKChains { - return (this._chains ??= new AvaCloudSDKChains(this.options$)); - } + private _chains?: AvaCloudSDKChains; + get chains(): AvaCloudSDKChains { + return (this._chains ??= new AvaCloudSDKChains(this.options$)); + } } diff --git a/src/sdk/avacloudsdkhealthcheck.ts b/src/sdk/avacloudsdkhealthcheck.ts index 137c0ac..614d608 100644 --- a/src/sdk/avacloudsdkhealthcheck.ts +++ b/src/sdk/avacloudsdkhealthcheck.ts @@ -8,12 +8,15 @@ import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class AvaCloudSDKHealthCheck extends ClientSDK { - /** - * Get the health of the service - */ - async dataHealthCheck( - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataHealthCheckDataHealthCheck(this, options)); - } + /** + * Get the health of the service + */ + async dataHealthCheck( + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataHealthCheckDataHealthCheck( + this, + options, + )); + } } diff --git a/src/sdk/avacloudsdkmetrics.ts b/src/sdk/avacloudsdkmetrics.ts index 3aa067e..a2b6fce 100644 --- a/src/sdk/avacloudsdkmetrics.ts +++ b/src/sdk/avacloudsdkmetrics.ts @@ -5,6 +5,7 @@ import { metricsChainMetricsGetEvmChainMetrics } from "../funcs/metricsChainMetricsGetEvmChainMetrics.js"; import { metricsChainMetricsGetEvmChainRollingWindowMetrics } from "../funcs/metricsChainMetricsGetEvmChainRollingWindowMetrics.js"; import { metricsChainMetricsGetStakingMetrics } from "../funcs/metricsChainMetricsGetStakingMetrics.js"; +import { metricsChainMetricsGetTeleporterMetricsByChain } from "../funcs/metricsChainMetricsGetTeleporterMetricsByChain.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; @@ -12,44 +13,71 @@ import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class AvaCloudSDKMetrics extends ClientSDK { - /** - * Get metrics for EVM chains - * - * @remarks - * Gets metrics for an EVM chain over a specified time interval aggregated at the specified time-interval granularity. - */ - async getEvmChainMetrics( - request: operations.GetEvmChainMetricsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(metricsChainMetricsGetEvmChainMetrics(this, request, options)); - } + /** + * Get metrics for EVM chains + * + * @remarks + * Gets metrics for an EVM chain over a specified time interval aggregated at the specified time-interval granularity. + */ + async getEvmChainMetrics( + request: operations.GetEvmChainMetricsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(metricsChainMetricsGetEvmChainMetrics( + this, + request, + options, + )); + } - /** - * Get rolling window metrics for EVM chains - * - * @remarks - * Gets the rolling window metrics for an EVM chain for the last hour, day, month, year, and all time. - */ - async getEvmChainRollingWindowMetrics( - request: operations.GetEvmChainRollingWindowMetricsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync( - metricsChainMetricsGetEvmChainRollingWindowMetrics(this, request, options) - ); - } + /** + * Get teleporter metrics for EVM chains + * + * @remarks + * Gets teleporter metrics for an EVM chain. + */ + async getTeleporterMetricsByChain( + request: operations.GetTeleporterMetricsByChainRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(metricsChainMetricsGetTeleporterMetricsByChain( + this, + request, + options, + )); + } - /** - * Get staking metrics for a given subnet - * - * @remarks - * Gets staking metrics for a given subnet. - */ - async getStakingMetrics( - request: operations.GetStakingMetricsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(metricsChainMetricsGetStakingMetrics(this, request, options)); - } + /** + * Get rolling window metrics for EVM chains + * + * @remarks + * Gets the rolling window metrics for an EVM chain for the last hour, day, month, year, and all time. + */ + async getEvmChainRollingWindowMetrics( + request: operations.GetEvmChainRollingWindowMetricsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(metricsChainMetricsGetEvmChainRollingWindowMetrics( + this, + request, + options, + )); + } + + /** + * Get staking metrics for a given subnet + * + * @remarks + * Gets staking metrics for a given subnet. + */ + async getStakingMetrics( + request: operations.GetStakingMetricsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(metricsChainMetricsGetStakingMetrics( + this, + request, + options, + )); + } } diff --git a/src/sdk/avacloudsdktransactions.ts b/src/sdk/avacloudsdktransactions.ts index b9f2e9f..a210a82 100644 --- a/src/sdk/avacloudsdktransactions.ts +++ b/src/sdk/avacloudsdktransactions.ts @@ -21,177 +21,211 @@ import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class AvaCloudSDKTransactions extends ClientSDK { - /** - * Get deployment transaction - * - * @remarks - * If the address is a smart contract, returns the transaction in which it was deployed. - */ - async getDeploymentTransaction( - request: operations.GetDeploymentTransactionRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataEvmTransactionsGetDeploymentTransaction(this, request, options)); - } + /** + * Get deployment transaction + * + * @remarks + * If the address is a smart contract, returns the transaction in which it was deployed. + */ + async getDeploymentTransaction( + request: operations.GetDeploymentTransactionRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataEvmTransactionsGetDeploymentTransaction( + this, + request, + options, + )); + } - /** - * List deployed contracts - * - * @remarks - * Lists all contracts deployed by the given address. - */ - async listContractDeployments( - request: operations.ListContractDeploymentsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - dataEvmTransactionsListContractDeployments(this, request, options) - ); - } + /** + * List deployed contracts + * + * @remarks + * Lists all contracts deployed by the given address. + */ + async listContractDeployments( + request: operations.ListContractDeploymentsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataEvmTransactionsListContractDeployments( + this, + request, + options, + )); + } - /** - * List ERC transfers - * - * @remarks - * Lists ERC transfers for an ERC-20, ERC-721, or ERC-1155 contract address. - */ - async listTransfers( - request: operations.ListTransfersRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(dataEvmTransactionsListTransfers(this, request, options)); - } + /** + * List ERC transfers + * + * @remarks + * Lists ERC transfers for an ERC-20, ERC-721, or ERC-1155 contract address. + */ + async listTransfers( + request: operations.ListTransfersRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataEvmTransactionsListTransfers( + this, + request, + options, + )); + } - /** - * List transactions - * - * @remarks - * Returns a list of transactions where the given wallet address had an on-chain interaction for the given chain. The ERC-20 transfers, ERC-721 transfers, ERC-1155, and internal transactions returned are only those where the input address had an interaction. Specifically, those lists only inlcude entries where the input address was the sender (`from` field) or the receiver (`to` field) for the sub-transaction. Therefore the transactions returned from this list may not be complete representations of the on-chain data. For a complete view of a transaction use the `/chains/:chainId/transactions/:txHash` endpoint. - * - * Filterable by block ranges. - */ - async listTransactions( - request: operations.ListTransactionsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(dataEvmTransactionsListTransactions(this, request, options)); - } + /** + * List transactions + * + * @remarks + * Returns a list of transactions where the given wallet address had an on-chain interaction for the given chain. The ERC-20 transfers, ERC-721 transfers, ERC-1155, and internal transactions returned are only those where the input address had an interaction. Specifically, those lists only inlcude entries where the input address was the sender (`from` field) or the receiver (`to` field) for the sub-transaction. Therefore the transactions returned from this list may not be complete representations of the on-chain data. For a complete view of a transaction use the `/chains/:chainId/transactions/:txHash` endpoint. + * + * Filterable by block ranges. + */ + async listTransactions( + request: operations.ListTransactionsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataEvmTransactionsListTransactions( + this, + request, + options, + )); + } - /** - * List native transactions - * - * @remarks - * Lists native transactions for an address. Filterable by block range. - */ - async listNativeTransactions( - request: operations.ListNativeTransactionsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - dataEvmTransactionsListNativeTransactions(this, request, options) - ); - } + /** + * List native transactions + * + * @remarks + * Lists native transactions for an address. Filterable by block range. + */ + async listNativeTransactions( + request: operations.ListNativeTransactionsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataEvmTransactionsListNativeTransactions( + this, + request, + options, + )); + } - /** - * List ERC-20 transfers - * - * @remarks - * Lists ERC-20 transfers for an address. Filterable by block range. - */ - async listErc20Transactions( - request: operations.ListErc20TransactionsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - dataEvmTransactionsListErc20Transactions(this, request, options) - ); - } + /** + * List ERC-20 transfers + * + * @remarks + * Lists ERC-20 transfers for an address. Filterable by block range. + */ + async listErc20Transactions( + request: operations.ListErc20TransactionsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataEvmTransactionsListErc20Transactions( + this, + request, + options, + )); + } - /** - * List ERC-721 transfers - * - * @remarks - * Lists ERC-721 transfers for an address. Filterable by block range. - */ - async listErc721Transactions( - request: operations.ListErc721TransactionsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - dataEvmTransactionsListErc721Transactions(this, request, options) - ); - } + /** + * List ERC-721 transfers + * + * @remarks + * Lists ERC-721 transfers for an address. Filterable by block range. + */ + async listErc721Transactions( + request: operations.ListErc721TransactionsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataEvmTransactionsListErc721Transactions( + this, + request, + options, + )); + } - /** - * List ERC-1155 transfers - * - * @remarks - * Lists ERC-1155 transfers for an address. Filterable by block range. - */ - async listErc1155Transactions( - request: operations.ListErc1155TransactionsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - dataEvmTransactionsListErc1155Transactions(this, request, options) - ); - } + /** + * List ERC-1155 transfers + * + * @remarks + * Lists ERC-1155 transfers for an address. Filterable by block range. + */ + async listErc1155Transactions( + request: operations.ListErc1155TransactionsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataEvmTransactionsListErc1155Transactions( + this, + request, + options, + )); + } - /** - * List internal transactions - * - * @remarks - * Returns a list of internal transactions for an address and chain. Filterable by block range. - * - * Note that the internal transactions list only contains `CALL` or `CALLCODE` transactions with a non-zero value and `CREATE`/`CREATE2` transactions. To get a complete list of internal transactions use the `debug_` prefixed RPC methods on an archive node. - */ - async listInternalTransactions( - request: operations.ListInternalTransactionsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - dataEvmTransactionsListInternalTransactions(this, request, options) - ); - } + /** + * List internal transactions + * + * @remarks + * Returns a list of internal transactions for an address and chain. Filterable by block range. + * + * Note that the internal transactions list only contains `CALL` or `CALLCODE` transactions with a non-zero value and `CREATE`/`CREATE2` transactions. To get a complete list of internal transactions use the `debug_` prefixed RPC methods on an archive node. + */ + async listInternalTransactions( + request: operations.ListInternalTransactionsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataEvmTransactionsListInternalTransactions( + this, + request, + options, + )); + } - /** - * Get transaction - * - * @remarks - * Gets the details of a single transaction. - */ - async getTransaction( - request: operations.GetTransactionRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataEvmTransactionsGetTransaction(this, request, options)); - } + /** + * Get transaction + * + * @remarks + * Gets the details of a single transaction. + */ + async getTransaction( + request: operations.GetTransactionRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataEvmTransactionsGetTransaction( + this, + request, + options, + )); + } - /** - * List transactions for a block - * - * @remarks - * Lists the transactions that occured in a given block. - */ - async getTransactionsForBlock( - request: operations.GetTransactionsForBlockRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataEvmTransactionsGetTransactionsForBlock(this, request, options)); - } + /** + * List transactions for a block + * + * @remarks + * Lists the transactions that occured in a given block. + */ + async getTransactionsForBlock( + request: operations.GetTransactionsForBlockRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataEvmTransactionsGetTransactionsForBlock( + this, + request, + options, + )); + } - /** - * List latest transactions - * - * @remarks - * Lists the latest transactions. Filterable by status. - */ - async listLatestTransactions( - request: operations.ListLatestTransactionsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - dataEvmTransactionsListLatestTransactions(this, request, options) - ); - } + /** + * List latest transactions + * + * @remarks + * Lists the latest transactions. Filterable by status. + */ + async listLatestTransactions( + request: operations.ListLatestTransactionsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataEvmTransactionsListLatestTransactions( + this, + request, + options, + )); + } } diff --git a/src/sdk/balances.ts b/src/sdk/balances.ts index 2b01722..b35f190 100644 --- a/src/sdk/balances.ts +++ b/src/sdk/balances.ts @@ -8,20 +8,22 @@ import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Balances extends ClientSDK { - /** - * Get balances - * - * @remarks - * Gets primary network balances for one of the Primary Network chains for the supplied addresses. - * - * C-Chain balances returned are only the shared atomic memory balance. For EVM balance, use the `/v1/chains/:chainId/addresses/:addressId/balances:getNative` endpoint. - */ - async getBalancesByAddresses( - request: operations.GetBalancesByAddressesRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync( - dataPrimaryNetworkBalancesGetBalancesByAddresses(this, request, options) - ); - } + /** + * Get balances + * + * @remarks + * Gets primary network balances for one of the Primary Network chains for the supplied addresses. + * + * C-Chain balances returned are only the shared atomic memory balance. For EVM balance, use the `/v1/chains/:chainId/addresses/:addressId/balances:getNative` endpoint. + */ + async getBalancesByAddresses( + request: operations.GetBalancesByAddressesRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataPrimaryNetworkBalancesGetBalancesByAddresses( + this, + request, + options, + )); + } } diff --git a/src/sdk/blocks.ts b/src/sdk/blocks.ts index 1a18595..1bfc7ed 100644 --- a/src/sdk/blocks.ts +++ b/src/sdk/blocks.ts @@ -12,46 +12,60 @@ import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Blocks extends ClientSDK { - /** - * Get block - * - * @remarks - * Gets a block by block height or block hash on one of the Primary Network chains. - */ - async getBlockById( - request: operations.GetBlockByIdRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataPrimaryNetworkBlocksGetBlockById(this, request, options)); - } + /** + * Get block + * + * @remarks + * Gets a block by block height or block hash on one of the Primary Network chains. + */ + async getBlockById( + request: operations.GetBlockByIdRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataPrimaryNetworkBlocksGetBlockById( + this, + request, + options, + )); + } - /** - * List blocks proposed by node - * - * @remarks - * Lists the latest blocks proposed by a given NodeID on one of the Primary Network chains. - */ - async listPrimaryNetworkBlocksByNodeId( - request: operations.ListPrimaryNetworkBlocksByNodeIdRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - dataPrimaryNetworkBlocksListPrimaryNetworkBlocksByNodeId(this, request, options) - ); - } + /** + * List blocks proposed by node + * + * @remarks + * Lists the latest blocks proposed by a given NodeID on one of the Primary Network chains. + */ + async listPrimaryNetworkBlocksByNodeId( + request: operations.ListPrimaryNetworkBlocksByNodeIdRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise< + PageIterator + > { + return unwrapResultIterator( + dataPrimaryNetworkBlocksListPrimaryNetworkBlocksByNodeId( + this, + request, + options, + ), + ); + } - /** - * List latest blocks - * - * @remarks - * Lists latest blocks on one of the Primary Network chains. - */ - async listLatestPrimaryNetworkBlocks( - request: operations.ListLatestPrimaryNetworkBlocksRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - dataPrimaryNetworkBlocksListLatestPrimaryNetworkBlocks(this, request, options) - ); - } + /** + * List latest blocks + * + * @remarks + * Lists latest blocks on one of the Primary Network chains. + */ + async listLatestPrimaryNetworkBlocks( + request: operations.ListLatestPrimaryNetworkBlocksRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator( + dataPrimaryNetworkBlocksListLatestPrimaryNetworkBlocks( + this, + request, + options, + ), + ); + } } diff --git a/src/sdk/chain.ts b/src/sdk/chain.ts index 34bf2eb..45be054 100644 --- a/src/sdk/chain.ts +++ b/src/sdk/chain.ts @@ -6,8 +6,8 @@ import { ClientSDK } from "../lib/sdks.js"; import { AvaCloudSDKMetrics } from "./avacloudsdkmetrics.js"; export class Chain extends ClientSDK { - private _metrics?: AvaCloudSDKMetrics; - get metrics(): AvaCloudSDKMetrics { - return (this._metrics ??= new AvaCloudSDKMetrics(this.options$)); - } + private _metrics?: AvaCloudSDKMetrics; + get metrics(): AvaCloudSDKMetrics { + return (this._metrics ??= new AvaCloudSDKMetrics(this.options$)); + } } diff --git a/src/sdk/chains.ts b/src/sdk/chains.ts index 9c40328..d14d366 100644 --- a/src/sdk/chains.ts +++ b/src/sdk/chains.ts @@ -11,29 +11,37 @@ import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Chains extends ClientSDK { - /** - * Get a list of supported blockchains - * - * @remarks - * Get a list of Popsicle API supported blockchains. - */ - async listChains( - request: operations.ListChainsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(metricsEvmChainsListChains(this, request, options)); - } + /** + * Get a list of supported blockchains + * + * @remarks + * Get a list of Metrics API supported blockchains. + */ + async listChains( + request: operations.ListChainsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(metricsEvmChainsListChains( + this, + request, + options, + )); + } - /** - * Get chain information for supported blockchain - * - * @remarks - * Get chain information for Popsicle API supported blockchain. - */ - async getChain( - request: operations.GetChainRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(metricsEvmChainsGetChain(this, request, options)); - } + /** + * Get chain information for supported blockchain + * + * @remarks + * Get chain information for Metrics API supported blockchain. + */ + async getChain( + request: operations.GetChainRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(metricsEvmChainsGetChain( + this, + request, + options, + )); + } } diff --git a/src/sdk/contracts.ts b/src/sdk/contracts.ts index 8062bae..2360e51 100644 --- a/src/sdk/contracts.ts +++ b/src/sdk/contracts.ts @@ -8,16 +8,20 @@ import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Contracts extends ClientSDK { - /** - * Get contract metadata - * - * @remarks - * Gets metadata about the contract at the given address. - */ - async getContractMetadata( - request: operations.GetContractMetadataRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataEvmContractsGetContractMetadata(this, request, options)); - } + /** + * Get contract metadata + * + * @remarks + * Gets metadata about the contract at the given address. + */ + async getContractMetadata( + request: operations.GetContractMetadataRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataEvmContractsGetContractMetadata( + this, + request, + options, + )); + } } diff --git a/src/sdk/data.ts b/src/sdk/data.ts index 73ef657..dd9ad5f 100644 --- a/src/sdk/data.ts +++ b/src/sdk/data.ts @@ -13,43 +13,43 @@ import { UsageMetrics } from "./usagemetrics.js"; import { Webhooks } from "./webhooks.js"; export class Data extends ClientSDK { - private _healthCheck?: AvaCloudSDKHealthCheck; - get healthCheck(): AvaCloudSDKHealthCheck { - return (this._healthCheck ??= new AvaCloudSDKHealthCheck(this.options$)); - } - - private _nfts?: Nfts; - get nfts(): Nfts { - return (this._nfts ??= new Nfts(this.options$)); - } - - private _operations?: Operations; - get operations(): Operations { - return (this._operations ??= new Operations(this.options$)); - } - - private _primaryNetwork?: PrimaryNetwork; - get primaryNetwork(): PrimaryNetwork { - return (this._primaryNetwork ??= new PrimaryNetwork(this.options$)); - } - - private _usageMetrics?: UsageMetrics; - get usageMetrics(): UsageMetrics { - return (this._usageMetrics ??= new UsageMetrics(this.options$)); - } - - private _webhooks?: Webhooks; - get webhooks(): Webhooks { - return (this._webhooks ??= new Webhooks(this.options$)); - } - - private _teleporter?: Teleporter; - get teleporter(): Teleporter { - return (this._teleporter ??= new Teleporter(this.options$)); - } - - private _evm?: AvaCloudSDKEvm; - get evm(): AvaCloudSDKEvm { - return (this._evm ??= new AvaCloudSDKEvm(this.options$)); - } + private _healthCheck?: AvaCloudSDKHealthCheck; + get healthCheck(): AvaCloudSDKHealthCheck { + return (this._healthCheck ??= new AvaCloudSDKHealthCheck(this.options$)); + } + + private _nfts?: Nfts; + get nfts(): Nfts { + return (this._nfts ??= new Nfts(this.options$)); + } + + private _operations?: Operations; + get operations(): Operations { + return (this._operations ??= new Operations(this.options$)); + } + + private _primaryNetwork?: PrimaryNetwork; + get primaryNetwork(): PrimaryNetwork { + return (this._primaryNetwork ??= new PrimaryNetwork(this.options$)); + } + + private _usageMetrics?: UsageMetrics; + get usageMetrics(): UsageMetrics { + return (this._usageMetrics ??= new UsageMetrics(this.options$)); + } + + private _webhooks?: Webhooks; + get webhooks(): Webhooks { + return (this._webhooks ??= new Webhooks(this.options$)); + } + + private _teleporter?: Teleporter; + get teleporter(): Teleporter { + return (this._teleporter ??= new Teleporter(this.options$)); + } + + private _evm?: AvaCloudSDKEvm; + get evm(): AvaCloudSDKEvm { + return (this._evm ??= new AvaCloudSDKEvm(this.options$)); + } } diff --git a/src/sdk/evm.ts b/src/sdk/evm.ts index 120e2de..b9b6f03 100644 --- a/src/sdk/evm.ts +++ b/src/sdk/evm.ts @@ -6,8 +6,8 @@ import { ClientSDK } from "../lib/sdks.js"; import { Chains } from "./chains.js"; export class Evm extends ClientSDK { - private _chains?: Chains; - get chains(): Chains { - return (this._chains ??= new Chains(this.options$)); - } + private _chains?: Chains; + get chains(): Chains { + return (this._chains ??= new Chains(this.options$)); + } } diff --git a/src/sdk/healthcheck.ts b/src/sdk/healthcheck.ts index 9c7f765..e6eb694 100644 --- a/src/sdk/healthcheck.ts +++ b/src/sdk/healthcheck.ts @@ -8,12 +8,15 @@ import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class HealthCheck extends ClientSDK { - /** - * Get the health of the service - */ - async metricsHealthCheck( - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(metricsHealthCheckMetricsHealthCheck(this, options)); - } + /** + * Get the health of the service + */ + async metricsHealthCheck( + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(metricsHealthCheckMetricsHealthCheck( + this, + options, + )); + } } diff --git a/src/sdk/lookingglass.ts b/src/sdk/lookingglass.ts index eba4730..4c0b4e0 100644 --- a/src/sdk/lookingglass.ts +++ b/src/sdk/lookingglass.ts @@ -14,76 +14,92 @@ import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class LookingGlass extends ClientSDK { - /** - * Get NFT holders by contract address - * - * @remarks - * Get list of NFT holders and number of NFTs held by contract address. - */ - async getNftHoldersByContractAddress( - request: operations.GetNftHoldersByContractAddressRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - metricsLookingGlassGetNftHoldersByContractAddress(this, request, options) - ); - } + /** + * Get NFT holders by contract address + * + * @remarks + * Get list of NFT holders and number of NFTs held by contract address. + */ + async getNftHoldersByContractAddress( + request: operations.GetNftHoldersByContractAddressRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator( + metricsLookingGlassGetNftHoldersByContractAddress( + this, + request, + options, + ), + ); + } - /** - * Get addresses by balance over time - * - * @remarks - * Get list of addresses and their latest balances that have held more than a certain threshold of a given token during the specified time frame. - */ - async getAddressesByBalanceOverTime( - request: operations.GetAddressesByBalanceOverTimeRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - metricsLookingGlassGetAddressesByBalanceOverTime(this, request, options) - ); - } + /** + * Get addresses by balance over time + * + * @remarks + * Get list of addresses and their latest balances that have held more than a certain threshold of a given token during the specified time frame. + */ + async getAddressesByBalanceOverTime( + request: operations.GetAddressesByBalanceOverTimeRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator( + metricsLookingGlassGetAddressesByBalanceOverTime( + this, + request, + options, + ), + ); + } - /** - * Get addresses by BTCb bridged balance - * - * @remarks - * Get list of addresses and their net bridged amounts that have bridged more than a certain threshold. - */ - async getAddressesByBtcbBridged( - request: operations.GetAddressesByBtcbBridgedRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - metricsLookingGlassGetAddressesByBtcbBridged(this, request, options) - ); - } + /** + * Get addresses by BTCb bridged balance + * + * @remarks + * Get list of addresses and their net bridged amounts that have bridged more than a certain threshold. + */ + async getAddressesByBtcbBridged( + request: operations.GetAddressesByBtcbBridgedRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(metricsLookingGlassGetAddressesByBtcbBridged( + this, + request, + options, + )); + } - /** - * Get addresses running validators during a given time frame - * - * @remarks - * Get list of addresses and AddValidatorTx timestamps set to receive awards for validation periods during the specified time frame. - */ - async getValidatorsByDateRange( - request: operations.GetValidatorsByDateRangeRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - metricsLookingGlassGetValidatorsByDateRange(this, request, options) - ); - } + /** + * Get addresses running validators during a given time frame + * + * @remarks + * Get list of addresses and AddValidatorTx timestamps set to receive awards for validation periods during the specified time frame. + */ + async getValidatorsByDateRange( + request: operations.GetValidatorsByDateRangeRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(metricsLookingGlassGetValidatorsByDateRange( + this, + request, + options, + )); + } - /** - * Composite query - * - * @remarks - * Composite query to get list of addresses from multiple subqueries. - */ - async compositeQuery( - request: components.CompositeQueryRequestDto, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(metricsLookingGlassCompositeQuery(this, request, options)); - } + /** + * Composite query + * + * @remarks + * Composite query to get list of addresses from multiple subqueries. + */ + async compositeQuery( + request: components.CompositeQueryRequestDto, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(metricsLookingGlassCompositeQuery( + this, + request, + options, + )); + } } diff --git a/src/sdk/metrics.ts b/src/sdk/metrics.ts index 43f5ed3..9c4915d 100644 --- a/src/sdk/metrics.ts +++ b/src/sdk/metrics.ts @@ -9,23 +9,23 @@ import { HealthCheck } from "./healthcheck.js"; import { LookingGlass } from "./lookingglass.js"; export class Metrics extends ClientSDK { - private _healthCheck?: HealthCheck; - get healthCheck(): HealthCheck { - return (this._healthCheck ??= new HealthCheck(this.options$)); - } + private _healthCheck?: HealthCheck; + get healthCheck(): HealthCheck { + return (this._healthCheck ??= new HealthCheck(this.options$)); + } - private _evm?: Evm; - get evm(): Evm { - return (this._evm ??= new Evm(this.options$)); - } + private _evm?: Evm; + get evm(): Evm { + return (this._evm ??= new Evm(this.options$)); + } - private _chain?: Chain; - get chain(): Chain { - return (this._chain ??= new Chain(this.options$)); - } + private _chain?: Chain; + get chain(): Chain { + return (this._chain ??= new Chain(this.options$)); + } - private _lookingGlass?: LookingGlass; - get lookingGlass(): LookingGlass { - return (this._lookingGlass ??= new LookingGlass(this.options$)); - } + private _lookingGlass?: LookingGlass; + get lookingGlass(): LookingGlass { + return (this._lookingGlass ??= new LookingGlass(this.options$)); + } } diff --git a/src/sdk/nfts.ts b/src/sdk/nfts.ts index 8ebfcf4..ed3a667 100644 --- a/src/sdk/nfts.ts +++ b/src/sdk/nfts.ts @@ -11,42 +11,54 @@ import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Nfts extends ClientSDK { - /** - * Reindex NFT metadata - * - * @remarks - * Triggers reindexing of token metadata for an NFT token. Reindexing can only be called once per hour for each NFT token. - */ - async reindexNft( - request: operations.ReindexNftRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataNftsReindexNft(this, request, options)); - } + /** + * Reindex NFT metadata + * + * @remarks + * Triggers reindexing of token metadata for an NFT token. Reindexing can only be called once per hour for each NFT token. + */ + async reindexNft( + request: operations.ReindexNftRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataNftsReindexNft( + this, + request, + options, + )); + } - /** - * List tokens - * - * @remarks - * Lists tokens for an NFT contract. - */ - async listTokens( - request: operations.ListTokensRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(dataNftsListTokens(this, request, options)); - } + /** + * List tokens + * + * @remarks + * Lists tokens for an NFT contract. + */ + async listTokens( + request: operations.ListTokensRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataNftsListTokens( + this, + request, + options, + )); + } - /** - * Get token details - * - * @remarks - * Gets token details for a specific token of an NFT contract. - */ - async getTokenDetails( - request: operations.GetTokenDetailsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataNftsGetTokenDetails(this, request, options)); - } + /** + * Get token details + * + * @remarks + * Gets token details for a specific token of an NFT contract. + */ + async getTokenDetails( + request: operations.GetTokenDetailsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataNftsGetTokenDetails( + this, + request, + options, + )); + } } diff --git a/src/sdk/operations.ts b/src/sdk/operations.ts index 1db1b69..5530476 100644 --- a/src/sdk/operations.ts +++ b/src/sdk/operations.ts @@ -10,31 +10,39 @@ import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Operations extends ClientSDK { - /** - * Get operation - * - * @remarks - * Gets operation details for the given operation id. - */ - async getOperationResult( - request: operations.GetOperationResultRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataOperationsGetOperationResult(this, request, options)); - } + /** + * Get operation + * + * @remarks + * Gets operation details for the given operation id. + */ + async getOperationResult( + request: operations.GetOperationResultRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataOperationsGetOperationResult( + this, + request, + options, + )); + } - /** - * Create transaction export operation - * - * @remarks - * Trigger a transaction export operation with given parameters. - * - * The transaction export operation runs asynchronously in the background. The status of the job can be retrieved from the `/v1/operations/:operationId` endpoint using the `operationId` returned from this endpoint. - */ - async postTransactionExportJob( - request: operations.PostTransactionExportJobRequestBody, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataOperationsPostTransactionExportJob(this, request, options)); - } + /** + * Create transaction export operation + * + * @remarks + * Trigger a transaction export operation with given parameters. + * + * The transaction export operation runs asynchronously in the background. The status of the job can be retrieved from the `/v1/operations/:operationId` endpoint using the `operationId` returned from this endpoint. + */ + async postTransactionExportJob( + request: operations.PostTransactionExportJobRequestBody, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataOperationsPostTransactionExportJob( + this, + request, + options, + )); + } } diff --git a/src/sdk/primarynetwork.ts b/src/sdk/primarynetwork.ts index 3f42ef1..74795d8 100644 --- a/src/sdk/primarynetwork.ts +++ b/src/sdk/primarynetwork.ts @@ -24,152 +24,186 @@ import { Utxos } from "./utxos.js"; import { Vertices } from "./vertices.js"; export class PrimaryNetwork extends ClientSDK { - private _transactions?: Transactions; - get transactions(): Transactions { - return (this._transactions ??= new Transactions(this.options$)); - } - - private _rewards?: Rewards; - get rewards(): Rewards { - return (this._rewards ??= new Rewards(this.options$)); - } - - private _utxos?: Utxos; - get utxos(): Utxos { - return (this._utxos ??= new Utxos(this.options$)); - } - - private _balances?: Balances; - get balances(): Balances { - return (this._balances ??= new Balances(this.options$)); - } - - private _blocks?: Blocks; - get blocks(): Blocks { - return (this._blocks ??= new Blocks(this.options$)); - } - - private _vertices?: Vertices; - get vertices(): Vertices { - return (this._vertices ??= new Vertices(this.options$)); - } - - /** - * Get asset details - * - * @remarks - * Gets asset details corresponding to the given asset id on the X-Chain. - */ - async getAssetDetails( - request: operations.GetAssetDetailsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataPrimaryNetworkGetAssetDetails(this, request, options)); - } - - /** - * Get chain interactions for addresses - * - * @remarks - * Returns Primary Network chains that each address has touched in the form of an address mapped array. If an address has had any on-chain interaction for a chain, that chain's chain id will be returned. - */ - async getChainIdsForAddresses( - request: operations.GetChainIdsForAddressesRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataPrimaryNetworkGetChainIdsForAddresses(this, request, options)); - } - - /** - * Get network details - * - * @remarks - * Gets network details such as validator and delegator stats. - */ - async getNetworkDetails( - request: operations.GetNetworkDetailsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataPrimaryNetworkGetNetworkDetails(this, request, options)); - } - - /** - * List blockchains - * - * @remarks - * Lists all blockchains registered on the network. - */ - async listBlockchains( - request: operations.ListBlockchainsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(dataPrimaryNetworkListBlockchains(this, request, options)); - } - - /** - * List subnets - * - * @remarks - * Lists all subnets registered on the network. - */ - async listSubnets( - request: operations.ListSubnetsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(dataPrimaryNetworkListSubnets(this, request, options)); - } - - /** - * Get Subnet details by ID - * - * @remarks - * Get details of the Subnet registered on the network. - */ - async getSubnetById( - request: operations.GetSubnetByIdRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataPrimaryNetworkGetSubnetById(this, request, options)); - } - - /** - * List validators - * - * @remarks - * Lists details for validators. By default, returns details for all validators. Filterable by validator node ids and minimum delegation capacity. - */ - async listValidators( - request: operations.ListValidatorsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(dataPrimaryNetworkListValidators(this, request, options)); - } - - /** - * Get single validator details - * - * @remarks - * List validator details for a single validator. Filterable by validation status. - */ - async getSingleValidatorDetails( - request: operations.GetSingleValidatorDetailsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - dataPrimaryNetworkGetSingleValidatorDetails(this, request, options) - ); - } - - /** - * List delegators - * - * @remarks - * Lists details for delegators. - */ - async listDelegators( - request: operations.ListDelegatorsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(dataPrimaryNetworkListDelegators(this, request, options)); - } + private _transactions?: Transactions; + get transactions(): Transactions { + return (this._transactions ??= new Transactions(this.options$)); + } + + private _rewards?: Rewards; + get rewards(): Rewards { + return (this._rewards ??= new Rewards(this.options$)); + } + + private _utxos?: Utxos; + get utxos(): Utxos { + return (this._utxos ??= new Utxos(this.options$)); + } + + private _balances?: Balances; + get balances(): Balances { + return (this._balances ??= new Balances(this.options$)); + } + + private _blocks?: Blocks; + get blocks(): Blocks { + return (this._blocks ??= new Blocks(this.options$)); + } + + private _vertices?: Vertices; + get vertices(): Vertices { + return (this._vertices ??= new Vertices(this.options$)); + } + + /** + * Get asset details + * + * @remarks + * Gets asset details corresponding to the given asset id on the X-Chain. + */ + async getAssetDetails( + request: operations.GetAssetDetailsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataPrimaryNetworkGetAssetDetails( + this, + request, + options, + )); + } + + /** + * Get chain interactions for addresses + * + * @remarks + * Returns Primary Network chains that each address has touched in the form of an address mapped array. If an address has had any on-chain interaction for a chain, that chain's chain id will be returned. + */ + async getChainIdsForAddresses( + request: operations.GetChainIdsForAddressesRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataPrimaryNetworkGetChainIdsForAddresses( + this, + request, + options, + )); + } + + /** + * Get network details + * + * @remarks + * Gets network details such as validator and delegator stats. + */ + async getNetworkDetails( + request: operations.GetNetworkDetailsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataPrimaryNetworkGetNetworkDetails( + this, + request, + options, + )); + } + + /** + * List blockchains + * + * @remarks + * Lists all blockchains registered on the network. + */ + async listBlockchains( + request: operations.ListBlockchainsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataPrimaryNetworkListBlockchains( + this, + request, + options, + )); + } + + /** + * List subnets + * + * @remarks + * Lists all subnets registered on the network. + */ + async listSubnets( + request: operations.ListSubnetsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataPrimaryNetworkListSubnets( + this, + request, + options, + )); + } + + /** + * Get Subnet details by ID + * + * @remarks + * Get details of the Subnet registered on the network. + */ + async getSubnetById( + request: operations.GetSubnetByIdRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataPrimaryNetworkGetSubnetById( + this, + request, + options, + )); + } + + /** + * List validators + * + * @remarks + * Lists details for validators. By default, returns details for all validators. Filterable by validator node ids and minimum delegation capacity. + */ + async listValidators( + request: operations.ListValidatorsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataPrimaryNetworkListValidators( + this, + request, + options, + )); + } + + /** + * Get single validator details + * + * @remarks + * List validator details for a single validator. Filterable by validation status. + */ + async getSingleValidatorDetails( + request: operations.GetSingleValidatorDetailsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataPrimaryNetworkGetSingleValidatorDetails( + this, + request, + options, + )); + } + + /** + * List delegators + * + * @remarks + * Lists details for delegators. + */ + async listDelegators( + request: operations.ListDelegatorsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataPrimaryNetworkListDelegators( + this, + request, + options, + )); + } } diff --git a/src/sdk/rewards.ts b/src/sdk/rewards.ts index ecd3d45..e56eabe 100644 --- a/src/sdk/rewards.ts +++ b/src/sdk/rewards.ts @@ -9,33 +9,45 @@ import * as operations from "../models/operations/index.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Rewards extends ClientSDK { - /** - * List pending rewards - * - * @remarks - * Lists pending rewards on the Primary Network for the supplied addresses. - */ - async listPendingPrimaryNetworkRewards( - request: operations.ListPendingPrimaryNetworkRewardsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - dataPrimaryNetworkRewardsListPendingPrimaryNetworkRewards(this, request, options) - ); - } + /** + * List pending rewards + * + * @remarks + * Lists pending rewards on the Primary Network for the supplied addresses. + */ + async listPendingPrimaryNetworkRewards( + request: operations.ListPendingPrimaryNetworkRewardsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise< + PageIterator + > { + return unwrapResultIterator( + dataPrimaryNetworkRewardsListPendingPrimaryNetworkRewards( + this, + request, + options, + ), + ); + } - /** - * List historical rewards - * - * @remarks - * Lists historical rewards on the Primary Network for the supplied addresses. - */ - async listHistoricalPrimaryNetworkRewards( - request: operations.ListHistoricalPrimaryNetworkRewardsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - dataPrimaryNetworkRewardsListHistoricalPrimaryNetworkRewards(this, request, options) - ); - } + /** + * List historical rewards + * + * @remarks + * Lists historical rewards on the Primary Network for the supplied addresses. + */ + async listHistoricalPrimaryNetworkRewards( + request: operations.ListHistoricalPrimaryNetworkRewardsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise< + PageIterator + > { + return unwrapResultIterator( + dataPrimaryNetworkRewardsListHistoricalPrimaryNetworkRewards( + this, + request, + options, + ), + ); + } } diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index 37f5d80..55f01d0 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -7,13 +7,13 @@ import { Data } from "./data.js"; import { Metrics } from "./metrics.js"; export class AvaCloudSDK extends ClientSDK { - private _metrics?: Metrics; - get metrics(): Metrics { - return (this._metrics ??= new Metrics(this.options$)); - } + private _metrics?: Metrics; + get metrics(): Metrics { + return (this._metrics ??= new Metrics(this.options$)); + } - private _data?: Data; - get data(): Data { - return (this._data ??= new Data(this.options$)); - } + private _data?: Data; + get data(): Data { + return (this._data ??= new Data(this.options$)); + } } diff --git a/src/sdk/teleporter.ts b/src/sdk/teleporter.ts index 354ed6f..2d8fe03 100644 --- a/src/sdk/teleporter.ts +++ b/src/sdk/teleporter.ts @@ -4,35 +4,62 @@ import { dataTeleporterGetTeleporterMessage } from "../funcs/dataTeleporterGetTeleporterMessage.js"; import { dataTeleporterListTeleporterMessages } from "../funcs/dataTeleporterListTeleporterMessages.js"; +import { dataTeleporterListTeleporterMessagesByAddress } from "../funcs/dataTeleporterListTeleporterMessagesByAddress.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Teleporter extends ClientSDK { - /** - * Get a teleporter message - * - * @remarks - * Gets a teleporter message by message ID. - */ - async getTeleporterMessage( - request: operations.GetTeleporterMessageRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataTeleporterGetTeleporterMessage(this, request, options)); - } + /** + * Get a teleporter message + * + * @remarks + * Gets a teleporter message by message ID. + */ + async getTeleporterMessage( + request: operations.GetTeleporterMessageRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataTeleporterGetTeleporterMessage( + this, + request, + options, + )); + } - /** - * List teleporter messages - * - * @remarks - * Lists teleporter messages. Ordered by timestamp in descending order. - */ - async listTeleporterMessages( - request: operations.ListTeleporterMessagesRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(dataTeleporterListTeleporterMessages(this, request, options)); - } + /** + * List teleporter messages + * + * @remarks + * Lists teleporter messages. Ordered by timestamp in descending order. + */ + async listTeleporterMessages( + request: operations.ListTeleporterMessagesRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataTeleporterListTeleporterMessages( + this, + request, + options, + )); + } + + /** + * List teleporter messages by address + * + * @remarks + * Lists teleporter messages by address. Ordered by timestamp in descending order. + */ + async listTeleporterMessagesByAddress( + request: operations.ListTeleporterMessagesByAddressRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataTeleporterListTeleporterMessagesByAddress( + this, + request, + options, + )); + } } diff --git a/src/sdk/transactions.ts b/src/sdk/transactions.ts index 38d8109..94eeba6 100644 --- a/src/sdk/transactions.ts +++ b/src/sdk/transactions.ts @@ -12,73 +12,85 @@ import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Transactions extends ClientSDK { - /** - * Get transaction - * - * @remarks - * Gets the details of a single transaction on one of the Primary Network chains. - */ - async getTxByHash( - request: operations.GetTxByHashRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataPrimaryNetworkTransactionsGetTxByHash(this, request, options)); - } + /** + * Get transaction + * + * @remarks + * Gets the details of a single transaction on one of the Primary Network chains. + */ + async getTxByHash( + request: operations.GetTxByHashRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataPrimaryNetworkTransactionsGetTxByHash( + this, + request, + options, + )); + } - /** - * List latest transactions - * - * @remarks - * Lists the latest transactions on one of the Primary Network chains. - * - * Transactions are filterable by addresses, txTypes, and timestamps. When querying for latest transactions without an address parameter, filtering by txTypes and timestamps is not supported. An address filter must be provided to utilize txTypes and timestamp filters. - * - * Given that each transaction may return a large number of UTXO objects, bounded only by the maximum transaction size, the query may return less transactions than the provided page size. The result will contain less results than the page size if the number of utxos contained in the resulting transactions reach a performance threshold. - */ - async listLatestPrimaryNetworkTransactions( - request: operations.ListLatestPrimaryNetworkTransactionsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - dataPrimaryNetworkTransactionsListLatestPrimaryNetworkTransactions( - this, - request, - options - ) - ); - } + /** + * List latest transactions + * + * @remarks + * Lists the latest transactions on one of the Primary Network chains. + * + * Transactions are filterable by addresses, txTypes, and timestamps. When querying for latest transactions without an address parameter, filtering by txTypes and timestamps is not supported. An address filter must be provided to utilize txTypes and timestamp filters. + * + * Given that each transaction may return a large number of UTXO objects, bounded only by the maximum transaction size, the query may return less transactions than the provided page size. The result will contain less results than the page size if the number of utxos contained in the resulting transactions reach a performance threshold. + */ + async listLatestPrimaryNetworkTransactions( + request: operations.ListLatestPrimaryNetworkTransactionsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise< + PageIterator + > { + return unwrapResultIterator( + dataPrimaryNetworkTransactionsListLatestPrimaryNetworkTransactions( + this, + request, + options, + ), + ); + } - /** - * List staking transactions - * - * @remarks - * Lists active staking transactions on the P-Chain for the supplied addresses. - */ - async listActivePrimaryNetworkStakingTransactions( - request: operations.ListActivePrimaryNetworkStakingTransactionsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - dataPrimaryNetworkTransactionsListActivePrimaryNetworkStakingTransactions( - this, - request, - options - ) - ); - } + /** + * List staking transactions + * + * @remarks + * Lists active staking transactions on the P-Chain for the supplied addresses. + */ + async listActivePrimaryNetworkStakingTransactions( + request: operations.ListActivePrimaryNetworkStakingTransactionsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise< + PageIterator + > { + return unwrapResultIterator( + dataPrimaryNetworkTransactionsListActivePrimaryNetworkStakingTransactions( + this, + request, + options, + ), + ); + } - /** - * List asset transactions - * - * @remarks - * Lists asset transactions corresponding to the given asset id on the X-Chain. - */ - async listAssetTransactions( - request: operations.ListAssetTransactionsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - dataPrimaryNetworkTransactionsListAssetTransactions(this, request, options) - ); - } + /** + * List asset transactions + * + * @remarks + * Lists asset transactions corresponding to the given asset id on the X-Chain. + */ + async listAssetTransactions( + request: operations.ListAssetTransactionsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator( + dataPrimaryNetworkTransactionsListAssetTransactions( + this, + request, + options, + ), + ); + } } diff --git a/src/sdk/usagemetrics.ts b/src/sdk/usagemetrics.ts index 8f57523..d868a40 100644 --- a/src/sdk/usagemetrics.ts +++ b/src/sdk/usagemetrics.ts @@ -11,29 +11,37 @@ import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class UsageMetrics extends ClientSDK { - /** - * Get usage metrics for the Glacier API - * - * @remarks - * Gets metrics for Glacier API usage over a specified time interval aggregated at the specified time-duration granularity. - */ - async getApiUsageMetrics( - request: operations.GetApiUsageMetricsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataUsageMetricsGetApiUsageMetrics(this, request, options)); - } + /** + * Get usage metrics for the Glacier API + * + * @remarks + * Gets metrics for Glacier API usage over a specified time interval aggregated at the specified time-duration granularity. + */ + async getApiUsageMetrics( + request: operations.GetApiUsageMetricsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataUsageMetricsGetApiUsageMetrics( + this, + request, + options, + )); + } - /** - * Get logs for requests made by client - * - * @remarks - * Gets logs for requests made by client over a specified time interval for a specific organization. - */ - async getApiLogs( - request: operations.GetApiLogsRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(dataUsageMetricsGetApiLogs(this, request, options)); - } + /** + * Get logs for requests made by client + * + * @remarks + * Gets logs for requests made by client over a specified time interval for a specific organization. + */ + async getApiLogs( + request: operations.GetApiLogsRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataUsageMetricsGetApiLogs( + this, + request, + options, + )); + } } diff --git a/src/sdk/utxos.ts b/src/sdk/utxos.ts index c1ccc3f..ec77dce 100644 --- a/src/sdk/utxos.ts +++ b/src/sdk/utxos.ts @@ -8,18 +8,20 @@ import * as operations from "../models/operations/index.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Utxos extends ClientSDK { - /** - * List UTXOs - * - * @remarks - * Lists UTXOs on one of the Primary Network chains for the supplied addresses. - */ - async getUtxosByAddresses( - request: operations.GetUtxosByAddressesRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - dataPrimaryNetworkUtxosGetUtxosByAddresses(this, request, options) - ); - } + /** + * List UTXOs + * + * @remarks + * Lists UTXOs on one of the Primary Network chains for the supplied addresses. + */ + async getUtxosByAddresses( + request: operations.GetUtxosByAddressesRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataPrimaryNetworkUtxosGetUtxosByAddresses( + this, + request, + options, + )); + } } diff --git a/src/sdk/vertices.ts b/src/sdk/vertices.ts index 4539f45..3b162b8 100644 --- a/src/sdk/vertices.ts +++ b/src/sdk/vertices.ts @@ -12,46 +12,56 @@ import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Vertices extends ClientSDK { - /** - * List vertices - * - * @remarks - * Lists latest vertices on the X-Chain. - */ - async listLatestXChainVertices( - request: operations.ListLatestXChainVerticesRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - dataPrimaryNetworkVerticesListLatestXChainVertices(this, request, options) - ); - } + /** + * List vertices + * + * @remarks + * Lists latest vertices on the X-Chain. + */ + async listLatestXChainVertices( + request: operations.ListLatestXChainVerticesRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator( + dataPrimaryNetworkVerticesListLatestXChainVertices( + this, + request, + options, + ), + ); + } - /** - * Get vertex - * - * @remarks - * Gets a single vertex on the X-Chain. - */ - async getVertexByHash( - request: operations.GetVertexByHashRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataPrimaryNetworkVerticesGetVertexByHash(this, request, options)); - } + /** + * Get vertex + * + * @remarks + * Gets a single vertex on the X-Chain. + */ + async getVertexByHash( + request: operations.GetVertexByHashRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataPrimaryNetworkVerticesGetVertexByHash( + this, + request, + options, + )); + } - /** - * List vertices by height - * - * @remarks - * Lists vertices at the given vertex height on the X-Chain. - */ - async getVertexByHeight( - request: operations.GetVertexByHeightRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator( - dataPrimaryNetworkVerticesGetVertexByHeight(this, request, options) - ); - } + /** + * List vertices by height + * + * @remarks + * Lists vertices at the given vertex height on the X-Chain. + */ + async getVertexByHeight( + request: operations.GetVertexByHeightRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataPrimaryNetworkVerticesGetVertexByHeight( + this, + request, + options, + )); + } } diff --git a/src/sdk/webhooks.ts b/src/sdk/webhooks.ts index 7b5fdab..f172c7e 100644 --- a/src/sdk/webhooks.ts +++ b/src/sdk/webhooks.ts @@ -19,131 +19,169 @@ import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Webhooks extends ClientSDK { - /** - * List webhooks - * - * @remarks - * Lists webhooks for the user. - */ - async listWebhooks( - request: operations.ListWebhooksRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(dataWebhooksListWebhooks(this, request, options)); - } + /** + * List webhooks + * + * @remarks + * Lists webhooks for the user. + */ + async listWebhooks( + request: operations.ListWebhooksRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataWebhooksListWebhooks( + this, + request, + options, + )); + } - /** - * Create a webhook - * - * @remarks - * Create a new webhook. - */ - async createWebhook( - request: components.CreateWebhookRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataWebhooksCreateWebhook(this, request, options)); - } + /** + * Create a webhook + * + * @remarks + * Create a new webhook. + */ + async createWebhook( + request: components.CreateWebhookRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataWebhooksCreateWebhook( + this, + request, + options, + )); + } - /** - * Get a webhook by ID - * - * @remarks - * Retrieves a webhook by ID. - */ - async getWebhook( - request: operations.GetWebhookRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataWebhooksGetWebhook(this, request, options)); - } + /** + * Get a webhook by ID + * + * @remarks + * Retrieves a webhook by ID. + */ + async getWebhook( + request: operations.GetWebhookRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataWebhooksGetWebhook( + this, + request, + options, + )); + } - /** - * Deactivate a webhook - * - * @remarks - * Deactivates a webhook by ID. - */ - async deactivateWebhook( - request: operations.DeactivateWebhookRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataWebhooksDeactivateWebhook(this, request, options)); - } + /** + * Deactivate a webhook + * + * @remarks + * Deactivates a webhook by ID. + */ + async deactivateWebhook( + request: operations.DeactivateWebhookRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataWebhooksDeactivateWebhook( + this, + request, + options, + )); + } - /** - * Update a webhook - * - * @remarks - * Updates an existing webhook. - */ - async updateWebhook( - request: operations.UpdateWebhookRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataWebhooksUpdateWebhook(this, request, options)); - } + /** + * Update a webhook + * + * @remarks + * Updates an existing webhook. + */ + async updateWebhook( + request: operations.UpdateWebhookRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataWebhooksUpdateWebhook( + this, + request, + options, + )); + } - /** - * Generate a shared secret - * - * @remarks - * Generates a new shared secret. - */ - async generateSharedSecret( - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataWebhooksGenerateSharedSecret(this, options)); - } + /** + * Generate a shared secret + * + * @remarks + * Generates a new shared secret. + */ + async generateSharedSecret( + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataWebhooksGenerateSharedSecret( + this, + options, + )); + } - /** - * Get a shared secret - * - * @remarks - * Get a previously generated shared secret. - */ - async getSharedSecret( - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataWebhooksGetSharedSecret(this, options)); - } + /** + * Get a shared secret + * + * @remarks + * Get a previously generated shared secret. + */ + async getSharedSecret( + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataWebhooksGetSharedSecret( + this, + options, + )); + } - /** - * List adresses by webhook - * - * @remarks - * List adresses by webhook. - */ - async getAddressesFromWebhook( - request: operations.GetAddressesFromWebhookRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise> { - return unwrapResultIterator(dataWebhooksGetAddressesFromWebhook(this, request, options)); - } + /** + * List adresses by webhook + * + * @remarks + * List adresses by webhook. + */ + async getAddressesFromWebhook( + request: operations.GetAddressesFromWebhookRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise> { + return unwrapResultIterator(dataWebhooksGetAddressesFromWebhook( + this, + request, + options, + )); + } - /** - * Remove addresses from webhook - * - * @remarks - * Remove addresses from webhook. - */ - async removeAddressesFromWebhook( - request: operations.RemoveAddressesFromWebhookRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataWebhooksRemoveAddressesFromWebhook(this, request, options)); - } + /** + * Remove addresses from webhook + * + * @remarks + * Remove addresses from webhook. + */ + async removeAddressesFromWebhook( + request: operations.RemoveAddressesFromWebhookRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataWebhooksRemoveAddressesFromWebhook( + this, + request, + options, + )); + } - /** - * Add addresses to webhook - * - * @remarks - * Add addresses to webhook. - */ - async addAddressesToWebhook( - request: operations.AddAddressesToWebhookRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(dataWebhooksAddAddressesToWebhook(this, request, options)); - } + /** + * Add addresses to webhook + * + * @remarks + * Add addresses to webhook. + */ + async addAddressesToWebhook( + request: operations.AddAddressesToWebhookRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(dataWebhooksAddAddressesToWebhook( + this, + request, + options, + )); + } } diff --git a/src/types/index.ts b/src/types/index.ts index dbaa5e6..e124e81 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -2,10 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export { RFCDate } from "./rfcdate.js"; export { blobLikeSchema, isBlobLike } from "./blobs.js"; -export type { Paginator, PageIterator } from "./operations.js"; -export { createPageIterator } from "./operations.js"; export { catchUnrecognizedEnum } from "./enums.js"; -export type { OpenEnum, ClosedEnum, Unrecognized } from "./enums.js"; +export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js"; export type { Result } from "./fp.js"; +export type { PageIterator, Paginator } from "./operations.js"; +export { createPageIterator } from "./operations.js"; +export { RFCDate } from "./rfcdate.js";