Skip to content
Merged
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
64 changes: 64 additions & 0 deletions custom-models/solana-rpc-result.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// This file is a workaround to generate the desired output.
// Workaround for https://github.com/OpenAPITools/openapi-generator/issues/13417

// May contain unused imports in some cases
// @ts-ignore
import type { FeeEstimateResult } from './fee-estimate-result';
// May contain unused imports in some cases
// @ts-ignore
import type { GetFeaturesEnabledResult } from './get-features-enabled-result';
// May contain unused imports in some cases
// @ts-ignore
import type { GetSupportedTokensItem } from './get-supported-tokens-item';
// May contain unused imports in some cases
// @ts-ignore
import type { GetSupportedTokensResult } from './get-supported-tokens-result';
// May contain unused imports in some cases
// @ts-ignore
import type { PrepareTransactionResult } from './prepare-transaction-result';
// May contain unused imports in some cases
// @ts-ignore
import type { SignAndSendTransactionResult } from './sign-and-send-transaction-result';
// May contain unused imports in some cases
// @ts-ignore
import type { SignTransactionResult } from './sign-transaction-result';
// May contain unused imports in some cases
// @ts-ignore
import type { TransferTransactionResult } from './transfer-transaction-result';

type TransferTransactionResultWithMethod = TransferTransactionResult & {
method: 'transferTransaction';
}

type FeeEstimateResultWithMethod = FeeEstimateResult & {
method: 'feeEstimate';
}

type GetFeaturesEnabledResultWithMethod = GetFeaturesEnabledResult & {
method: 'getFeaturesEnabled';
}

type PrepareTransactionResultWithMethod = PrepareTransactionResult & {
method: 'prepareTransaction';
}

type GetSupportedTokensResultWithMethod = GetSupportedTokensResult & {
method: 'getSupportedTokens';
}

type SignAndSendTransactionResultWithMethod = SignAndSendTransactionResult & {
method: 'signAndSendTransaction';
}

type SignTransactionResultWithMethod = SignTransactionResult & {
method: 'signTransaction';
}



/**
* @type SolanaRpcResult
* @export
*/
export type SolanaRpcResult = FeeEstimateResultWithMethod | GetFeaturesEnabledResultWithMethod | GetSupportedTokensResultWithMethod | PrepareTransactionResultWithMethod | SignAndSendTransactionResultWithMethod | SignTransactionResultWithMethod | TransferTransactionResultWithMethod;

7 changes: 7 additions & 0 deletions docs/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,13 @@ Models/SolanaRpcRequest_oneOf_4.md
Models/SolanaRpcRequest_oneOf_5.md
Models/SolanaRpcRequest_oneOf_6.md
Models/SolanaRpcResult.md
Models/SolanaRpcResult_oneOf.md
Models/SolanaRpcResult_oneOf_1.md
Models/SolanaRpcResult_oneOf_2.md
Models/SolanaRpcResult_oneOf_3.md
Models/SolanaRpcResult_oneOf_4.md
Models/SolanaRpcResult_oneOf_5.md
Models/SolanaRpcResult_oneOf_6.md
Models/SolanaSwapStrategy.md
Models/SolanaTransactionRequest.md
Models/SolanaTransactionResponse.md
Expand Down
1 change: 1 addition & 0 deletions docs/Models/JsonRpcResponse_NetworkRpcResult_result.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
|------------ | ------------- | ------------- | -------------|
| **conversion\_rate** | **String** | | [default to null] |
| **estimated\_fee** | **String** | | [default to null] |
| **method** | **String** | | [default to null] |
| **fee\_in\_lamports** | **String** | | [default to null] |
| **fee\_in\_spl** | **String** | | [default to null] |
| **fee\_token** | **String** | | [default to null] |
Expand Down
1 change: 1 addition & 0 deletions docs/Models/NetworkRpcResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
|------------ | ------------- | ------------- | -------------|
| **conversion\_rate** | **String** | | [default to null] |
| **estimated\_fee** | **String** | | [default to null] |
| **method** | **String** | | [default to null] |
| **fee\_in\_lamports** | **String** | | [default to null] |
| **fee\_in\_spl** | **String** | | [default to null] |
| **fee\_token** | **String** | | [default to null] |
Expand Down
1 change: 1 addition & 0 deletions docs/Models/SolanaRpcResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
|------------ | ------------- | ------------- | -------------|
| **conversion\_rate** | **String** | | [default to null] |
| **estimated\_fee** | **String** | | [default to null] |
| **method** | **String** | | [default to null] |
| **fee\_in\_lamports** | **String** | | [default to null] |
| **fee\_in\_spl** | **String** | | [default to null] |
| **fee\_token** | **String** | | [default to null] |
Expand Down
11 changes: 11 additions & 0 deletions docs/Models/SolanaRpcResult_oneOf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SolanaRpcResult_oneOf
## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
| **conversion\_rate** | **String** | | [default to null] |
| **estimated\_fee** | **String** | | [default to null] |
| **method** | **String** | | [default to null] |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

14 changes: 14 additions & 0 deletions docs/Models/SolanaRpcResult_oneOf_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SolanaRpcResult_oneOf_1
## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
| **fee\_in\_lamports** | **String** | | [default to null] |
| **fee\_in\_spl** | **String** | | [default to null] |
| **fee\_token** | **String** | | [default to null] |
| **transaction** | **String** | | [default to null] |
| **valid\_until\_blockheight** | **Long** | | [default to null] |
| **method** | **String** | | [default to null] |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

14 changes: 14 additions & 0 deletions docs/Models/SolanaRpcResult_oneOf_2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SolanaRpcResult_oneOf_2
## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
| **fee\_in\_lamports** | **String** | | [default to null] |
| **fee\_in\_spl** | **String** | | [default to null] |
| **fee\_token** | **String** | | [default to null] |
| **transaction** | **String** | | [default to null] |
| **valid\_until\_blockheight** | **Long** | | [default to null] |
| **method** | **String** | | [default to null] |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

11 changes: 11 additions & 0 deletions docs/Models/SolanaRpcResult_oneOf_3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SolanaRpcResult_oneOf_3
## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
| **signature** | **String** | | [default to null] |
| **transaction** | **String** | | [default to null] |
| **method** | **String** | | [default to null] |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

12 changes: 12 additions & 0 deletions docs/Models/SolanaRpcResult_oneOf_4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SolanaRpcResult_oneOf_4
## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
| **id** | **String** | | [default to null] |
| **signature** | **String** | | [default to null] |
| **transaction** | **String** | | [default to null] |
| **method** | **String** | | [default to null] |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

10 changes: 10 additions & 0 deletions docs/Models/SolanaRpcResult_oneOf_5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# SolanaRpcResult_oneOf_5
## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
| **tokens** | [**List**](GetSupportedTokensItem.md) | | [default to null] |
| **method** | **String** | | [default to null] |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

10 changes: 10 additions & 0 deletions docs/Models/SolanaRpcResult_oneOf_6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# SolanaRpcResult_oneOf_6
## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
| **features** | **List** | | [default to null] |
| **method** | **String** | | [default to null] |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

7 changes: 7 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,13 @@ All URIs are relative to *http://localhost*
- [SolanaRpcRequest_oneOf_5](./Models/SolanaRpcRequest_oneOf_5.md)
- [SolanaRpcRequest_oneOf_6](./Models/SolanaRpcRequest_oneOf_6.md)
- [SolanaRpcResult](./Models/SolanaRpcResult.md)
- [SolanaRpcResult_oneOf](./Models/SolanaRpcResult_oneOf.md)
- [SolanaRpcResult_oneOf_1](./Models/SolanaRpcResult_oneOf_1.md)
- [SolanaRpcResult_oneOf_2](./Models/SolanaRpcResult_oneOf_2.md)
- [SolanaRpcResult_oneOf_3](./Models/SolanaRpcResult_oneOf_3.md)
- [SolanaRpcResult_oneOf_4](./Models/SolanaRpcResult_oneOf_4.md)
- [SolanaRpcResult_oneOf_5](./Models/SolanaRpcResult_oneOf_5.md)
- [SolanaRpcResult_oneOf_6](./Models/SolanaRpcResult_oneOf_6.md)
- [SolanaSwapStrategy](./Models/SolanaSwapStrategy.md)
- [SolanaTransactionRequest](./Models/SolanaTransactionRequest.md)
- [SolanaTransactionResponse](./Models/SolanaTransactionResponse.md)
Expand Down
140 changes: 133 additions & 7 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -6753,25 +6753,151 @@
"SolanaRpcResult": {
"oneOf": [
{
"$ref": "#/components/schemas/FeeEstimateResult"
"allOf": [
{
"$ref": "#/components/schemas/FeeEstimateResult"
},
{
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"type": "string",
"enum": [
"feeEstimate"
]
}
}
}
]
},
{
"$ref": "#/components/schemas/TransferTransactionResult"
"allOf": [
{
"$ref": "#/components/schemas/TransferTransactionResult"
},
{
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"type": "string",
"enum": [
"transferTransaction"
]
}
}
}
]
},
{
"$ref": "#/components/schemas/PrepareTransactionResult"
"allOf": [
{
"$ref": "#/components/schemas/PrepareTransactionResult"
},
{
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"type": "string",
"enum": [
"prepareTransaction"
]
}
}
}
]
},
{
"$ref": "#/components/schemas/SignTransactionResult"
"allOf": [
{
"$ref": "#/components/schemas/SignTransactionResult"
},
{
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"type": "string",
"enum": [
"signTransaction"
]
}
}
}
]
},
{
"$ref": "#/components/schemas/SignAndSendTransactionResult"
"allOf": [
{
"$ref": "#/components/schemas/SignAndSendTransactionResult"
},
{
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"type": "string",
"enum": [
"signAndSendTransaction"
]
}
}
}
]
},
{
"$ref": "#/components/schemas/GetSupportedTokensResult"
"allOf": [
{
"$ref": "#/components/schemas/GetSupportedTokensResult"
},
{
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"type": "string",
"enum": [
"getSupportedTokens"
]
}
}
}
]
},
{
"$ref": "#/components/schemas/GetFeaturesEnabledResult"
"allOf": [
{
"$ref": "#/components/schemas/GetFeaturesEnabledResult"
},
{
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"type": "string",
"enum": [
"getFeaturesEnabled"
]
}
}
}
]
}
]
},
Expand Down
7 changes: 7 additions & 0 deletions src/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,13 @@ models/solana-rpc-request-one-of4.ts
models/solana-rpc-request-one-of5.ts
models/solana-rpc-request-one-of6.ts
models/solana-rpc-request.ts
models/solana-rpc-result-one-of.ts
models/solana-rpc-result-one-of1.ts
models/solana-rpc-result-one-of2.ts
models/solana-rpc-result-one-of3.ts
models/solana-rpc-result-one-of4.ts
models/solana-rpc-result-one-of5.ts
models/solana-rpc-result-one-of6.ts
models/solana-rpc-result.ts
models/solana-swap-strategy.ts
models/solana-transaction-request.ts
Expand Down
7 changes: 7 additions & 0 deletions src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ export * from './solana-rpc-request-one-of4';
export * from './solana-rpc-request-one-of5';
export * from './solana-rpc-request-one-of6';
export * from './solana-rpc-result';
export * from './solana-rpc-result-one-of';
export * from './solana-rpc-result-one-of1';
export * from './solana-rpc-result-one-of2';
export * from './solana-rpc-result-one-of3';
export * from './solana-rpc-result-one-of4';
export * from './solana-rpc-result-one-of5';
export * from './solana-rpc-result-one-of6';
export * from './solana-swap-strategy';
export * from './solana-transaction-request';
export * from './solana-transaction-response';
Expand Down
Loading