Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Nexus API bindings #2107

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changelog/2107.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update Nexus API bindings
2 changes: 1 addition & 1 deletion src/vendors/nexus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface ExtendedRuntimeTransaction extends NexusRuntimeTransaction {
export function getNexusAPIs(url: string | 'https://nexus.oasis.io/v1/') {
const explorerConfig = new Configuration({
basePath: url,
...throwAPIErrors,
fetchApi: throwAPIErrors.fetchApi,
})

const api = new NexusApi(explorerConfig)
Expand Down
43 changes: 21 additions & 22 deletions src/vendors/nexus/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
.openapi-generator-ignore
apis/DefaultApi.ts
apis/index.ts
index.ts
models/Account.ts
models/AccountList.ts
models/AccountListAllOf.ts
models/AccountListAllOfAccounts.ts
models/AccountStats.ts
models/ActiveAccounts.ts
models/ActiveAccountsList.ts
Expand All @@ -14,60 +13,60 @@ models/Allowance.ts
models/BareTokenHolder.ts
models/Block.ts
models/BlockList.ts
models/BlockListAllOf.ts
models/BlockListAllOfBlocks.ts
models/ConsensusEvent.ts
models/ConsensusEventList.ts
models/ConsensusEventListAllOf.ts
models/ConsensusEventListAllOfEvents.ts
models/ConsensusEventType.ts
models/ConsensusTxMethod.ts
models/DebondingDelegation.ts
models/DebondingDelegationList.ts
models/DebondingDelegationListAllOf.ts
models/DebondingDelegationListAllOfDebondingDelegations.ts
models/Delegation.ts
models/DelegationList.ts
models/DelegationListAllOf.ts
models/DelegationListAllOfDelegations.ts
models/Entity.ts
models/EntityList.ts
models/EntityListAllOf.ts
models/EntityListAllOfEntities.ts
models/Epoch.ts
models/EpochList.ts
models/EpochListAllOf.ts
models/EpochListAllOfEpochs.ts
models/Escrow.ts
models/EvmAbiParam.ts
models/EvmEventToken.ts
models/EvmNft.ts
models/EvmNftList.ts
models/EvmNftListAllOf.ts
models/EvmNftListAllOfEvmNfts.ts
models/EvmToken.ts
models/EvmTokenList.ts
models/EvmTokenListAllOf.ts
models/EvmTokenListAllOfEvmTokens.ts
models/EvmTokenType.ts
models/InlineResponse400.ts
models/GetStatus400Response.ts
models/Layer.ts
models/List.ts
models/Node.ts
models/NodeList.ts
models/NodeListAllOf.ts
models/NodeListAllOfNodes.ts
models/Proposal.ts
models/ProposalList.ts
models/ProposalListAllOf.ts
models/ProposalListAllOfProposals.ts
models/ProposalState.ts
models/ProposalTarget.ts
models/ProposalVote.ts
models/ProposalVotes.ts
models/ProposalVotesAllOf.ts
models/ProposalVotesAllOfVotes.ts
models/RoothashMessage.ts
models/RoothashMessageList.ts
models/RoothashMessageListAllOf.ts
models/RoothashMessageListAllOfRoothashMessages.ts
models/RoothashMessageType.ts
models/Runtime.ts
models/RuntimeAccount.ts
models/RuntimeBlock.ts
models/RuntimeBlockList.ts
models/RuntimeBlockListAllOf.ts
models/RuntimeBlockListAllOfBlocks.ts
models/RuntimeEvent.ts
models/RuntimeEventList.ts
models/RuntimeEventListAllOf.ts
models/RuntimeEventListAllOfEvents.ts
models/RuntimeEventType.ts
models/RuntimeEvmBalance.ts
models/RuntimeEvmContract.ts
Expand All @@ -77,24 +76,24 @@ models/RuntimeStatus.ts
models/RuntimeTransaction.ts
models/RuntimeTransactionEncryptionEnvelope.ts
models/RuntimeTransactionList.ts
models/RuntimeTransactionListAllOf.ts
models/RuntimeTransactionListAllOfTransactions.ts
models/Status.ts
models/TokenHolderList.ts
models/TokenHolderListAllOf.ts
models/TokenHolderListAllOfHolders.ts
models/Transaction.ts
models/TransactionList.ts
models/TransactionListAllOf.ts
models/TransactionListAllOfTransactions.ts
models/TxError.ts
models/TxVolume.ts
models/TxVolumeList.ts
models/Validator.ts
models/ValidatorAggStats.ts
models/ValidatorCommissionBound.ts
models/ValidatorHistory.ts
models/ValidatorHistoryAllOf.ts
models/ValidatorHistoryAllOfHistory.ts
models/ValidatorHistoryPoint.ts
models/ValidatorList.ts
models/ValidatorListAllOf.ts
models/ValidatorListAllOfValidators.ts
models/ValidatorMedia.ts
models/ValidatorsResponse.ts
models/VerificationLevel.ts
Expand Down
2 changes: 1 addition & 1 deletion src/vendors/nexus/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.1.0
7.10.0
25 changes: 23 additions & 2 deletions src/vendors/nexus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

This folder contains generated typescript bindings for Nexus.

Validate @openapitools/openapi-generator-cli version:

```
npx @openapitools/openapi-generator-cli version
```

In order to use type mappings make sure to use at least `7.10.0` version.
To bump version use a following command:

```
npx @openapitools/openapi-generator-cli version-manager set 7.10.0
```

You can also use `version-manager`:

```
npx @openapitools/openapi-generator-cli version-manager list
```

To update the bindings:

1. Update openapi.json based on
Expand All @@ -14,7 +33,8 @@ To update the bindings:
-i openapi.json \
-g typescript-fetch \
-o . \
--additional-properties=modelPropertyNaming=original,typescriptThreePlus=true
--additional-properties=modelPropertyNaming=original,typescriptThreePlus=true \
--type-mappings string+date-time=string
```

or
Expand All @@ -27,7 +47,8 @@ To update the bindings:
-i openapi.json \
-g typescript-fetch \
-o . \
--additional-properties=modelPropertyNaming=original,typescriptThreePlus=true
--additional-properties=modelPropertyNaming=original,typescriptThreePlus=true \
--type-mappings string+date-time=string
```

3. Lint:
Expand Down
Loading
Loading