Skip to content

Commit 0eaf11b

Browse files
authored
feat: extend solana rpc result response with method tag (#174)
1 parent 7a80fc4 commit 0eaf11b

24 files changed

+528
-23
lines changed

custom-models/solana-rpc-result.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// This file is a workaround to generate the desired output.
2+
// Workaround for https://github.com/OpenAPITools/openapi-generator/issues/13417
3+
4+
// May contain unused imports in some cases
5+
// @ts-ignore
6+
import type { FeeEstimateResult } from './fee-estimate-result';
7+
// May contain unused imports in some cases
8+
// @ts-ignore
9+
import type { GetFeaturesEnabledResult } from './get-features-enabled-result';
10+
// May contain unused imports in some cases
11+
// @ts-ignore
12+
import type { GetSupportedTokensItem } from './get-supported-tokens-item';
13+
// May contain unused imports in some cases
14+
// @ts-ignore
15+
import type { GetSupportedTokensResult } from './get-supported-tokens-result';
16+
// May contain unused imports in some cases
17+
// @ts-ignore
18+
import type { PrepareTransactionResult } from './prepare-transaction-result';
19+
// May contain unused imports in some cases
20+
// @ts-ignore
21+
import type { SignAndSendTransactionResult } from './sign-and-send-transaction-result';
22+
// May contain unused imports in some cases
23+
// @ts-ignore
24+
import type { SignTransactionResult } from './sign-transaction-result';
25+
// May contain unused imports in some cases
26+
// @ts-ignore
27+
import type { TransferTransactionResult } from './transfer-transaction-result';
28+
29+
type TransferTransactionResultWithMethod = TransferTransactionResult & {
30+
method: 'transferTransaction';
31+
}
32+
33+
type FeeEstimateResultWithMethod = FeeEstimateResult & {
34+
method: 'feeEstimate';
35+
}
36+
37+
type GetFeaturesEnabledResultWithMethod = GetFeaturesEnabledResult & {
38+
method: 'getFeaturesEnabled';
39+
}
40+
41+
type PrepareTransactionResultWithMethod = PrepareTransactionResult & {
42+
method: 'prepareTransaction';
43+
}
44+
45+
type GetSupportedTokensResultWithMethod = GetSupportedTokensResult & {
46+
method: 'getSupportedTokens';
47+
}
48+
49+
type SignAndSendTransactionResultWithMethod = SignAndSendTransactionResult & {
50+
method: 'signAndSendTransaction';
51+
}
52+
53+
type SignTransactionResultWithMethod = SignTransactionResult & {
54+
method: 'signTransaction';
55+
}
56+
57+
58+
59+
/**
60+
* @type SolanaRpcResult
61+
* @export
62+
*/
63+
export type SolanaRpcResult = FeeEstimateResultWithMethod | GetFeaturesEnabledResultWithMethod | GetSupportedTokensResultWithMethod | PrepareTransactionResultWithMethod | SignAndSendTransactionResultWithMethod | SignTransactionResultWithMethod | TransferTransactionResultWithMethod;
64+

docs/.openapi-generator/FILES

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,13 @@ Models/SolanaRpcRequest_oneOf_4.md
152152
Models/SolanaRpcRequest_oneOf_5.md
153153
Models/SolanaRpcRequest_oneOf_6.md
154154
Models/SolanaRpcResult.md
155+
Models/SolanaRpcResult_oneOf.md
156+
Models/SolanaRpcResult_oneOf_1.md
157+
Models/SolanaRpcResult_oneOf_2.md
158+
Models/SolanaRpcResult_oneOf_3.md
159+
Models/SolanaRpcResult_oneOf_4.md
160+
Models/SolanaRpcResult_oneOf_5.md
161+
Models/SolanaRpcResult_oneOf_6.md
155162
Models/SolanaSwapStrategy.md
156163
Models/SolanaTransactionRequest.md
157164
Models/SolanaTransactionResponse.md

docs/Models/JsonRpcResponse_NetworkRpcResult_result.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
|------------ | ------------- | ------------- | -------------|
66
| **conversion\_rate** | **String** | | [default to null] |
77
| **estimated\_fee** | **String** | | [default to null] |
8+
| **method** | **String** | | [default to null] |
89
| **fee\_in\_lamports** | **String** | | [default to null] |
910
| **fee\_in\_spl** | **String** | | [default to null] |
1011
| **fee\_token** | **String** | | [default to null] |

docs/Models/NetworkRpcResult.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
|------------ | ------------- | ------------- | -------------|
66
| **conversion\_rate** | **String** | | [default to null] |
77
| **estimated\_fee** | **String** | | [default to null] |
8+
| **method** | **String** | | [default to null] |
89
| **fee\_in\_lamports** | **String** | | [default to null] |
910
| **fee\_in\_spl** | **String** | | [default to null] |
1011
| **fee\_token** | **String** | | [default to null] |

docs/Models/SolanaRpcResult.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
|------------ | ------------- | ------------- | -------------|
66
| **conversion\_rate** | **String** | | [default to null] |
77
| **estimated\_fee** | **String** | | [default to null] |
8+
| **method** | **String** | | [default to null] |
89
| **fee\_in\_lamports** | **String** | | [default to null] |
910
| **fee\_in\_spl** | **String** | | [default to null] |
1011
| **fee\_token** | **String** | | [default to null] |
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SolanaRpcResult_oneOf
2+
## Properties
3+
4+
| Name | Type | Description | Notes |
5+
|------------ | ------------- | ------------- | -------------|
6+
| **conversion\_rate** | **String** | | [default to null] |
7+
| **estimated\_fee** | **String** | | [default to null] |
8+
| **method** | **String** | | [default to null] |
9+
10+
[[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+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SolanaRpcResult_oneOf_1
2+
## Properties
3+
4+
| Name | Type | Description | Notes |
5+
|------------ | ------------- | ------------- | -------------|
6+
| **fee\_in\_lamports** | **String** | | [default to null] |
7+
| **fee\_in\_spl** | **String** | | [default to null] |
8+
| **fee\_token** | **String** | | [default to null] |
9+
| **transaction** | **String** | | [default to null] |
10+
| **valid\_until\_blockheight** | **Long** | | [default to null] |
11+
| **method** | **String** | | [default to null] |
12+
13+
[[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+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SolanaRpcResult_oneOf_2
2+
## Properties
3+
4+
| Name | Type | Description | Notes |
5+
|------------ | ------------- | ------------- | -------------|
6+
| **fee\_in\_lamports** | **String** | | [default to null] |
7+
| **fee\_in\_spl** | **String** | | [default to null] |
8+
| **fee\_token** | **String** | | [default to null] |
9+
| **transaction** | **String** | | [default to null] |
10+
| **valid\_until\_blockheight** | **Long** | | [default to null] |
11+
| **method** | **String** | | [default to null] |
12+
13+
[[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+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SolanaRpcResult_oneOf_3
2+
## Properties
3+
4+
| Name | Type | Description | Notes |
5+
|------------ | ------------- | ------------- | -------------|
6+
| **signature** | **String** | | [default to null] |
7+
| **transaction** | **String** | | [default to null] |
8+
| **method** | **String** | | [default to null] |
9+
10+
[[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+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SolanaRpcResult_oneOf_4
2+
## Properties
3+
4+
| Name | Type | Description | Notes |
5+
|------------ | ------------- | ------------- | -------------|
6+
| **id** | **String** | | [default to null] |
7+
| **signature** | **String** | | [default to null] |
8+
| **transaction** | **String** | | [default to null] |
9+
| **method** | **String** | | [default to null] |
10+
11+
[[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+

0 commit comments

Comments
 (0)