-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: return string for post transactions endpoint
- Loading branch information
Showing
7 changed files
with
165 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
client/src/generated/models/PostCoreNodeTransactionsError.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* Stacks 2.0 Blockchain API | ||
* This is the documentation for the Stacks 2.0 Blockchain API. It is comprised of two parts; the Stacks Blockchain API and the Stacks Core API. [![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/614feab5c108d292bffa#?env%5BStacks%20Blockchain%20API%5D=W3sia2V5Ijoic3R4X2FkZHJlc3MiLCJ2YWx1ZSI6IlNUMlRKUkhESE1ZQlE0MTdIRkIwQkRYNDMwVFFBNVBYUlg2NDk1RzFWIiwiZW5hYmxlZCI6dHJ1ZX0seyJrZXkiOiJibG9ja19pZCIsInZhbHVlIjoiMHgiLCJlbmFibGVkIjp0cnVlfSx7ImtleSI6Im9mZnNldCIsInZhbHVlIjoiMCIsImVuYWJsZWQiOnRydWV9LHsia2V5IjoibGltaXRfdHgiLCJ2YWx1ZSI6IjIwMCIsImVuYWJsZWQiOnRydWV9LHsia2V5IjoibGltaXRfYmxvY2siLCJ2YWx1ZSI6IjMwIiwiZW5hYmxlZCI6dHJ1ZX0seyJrZXkiOiJ0eF9pZCIsInZhbHVlIjoiMHg1NDA5MGMxNmE3MDJiNzUzYjQzMTE0ZTg4NGJjMTlhODBhNzk2MzhmZDQ0OWE0MGY4MDY4Y2RmMDAzY2RlNmUwIiwiZW5hYmxlZCI6dHJ1ZX0seyJrZXkiOiJjb250cmFjdF9pZCIsInZhbHVlIjoiU1RKVFhFSlBKUFBWRE5BOUIwNTJOU1JSQkdRQ0ZOS1ZTMTc4VkdIMS5oZWxsb193b3JsZFxuIiwiZW5hYmxlZCI6dHJ1ZX0seyJrZXkiOiJidGNfYWRkcmVzcyIsInZhbHVlIjoiYWJjIiwiZW5hYmxlZCI6dHJ1ZX0seyJrZXkiOiJjb250cmFjdF9hZGRyZXNzIiwidmFsdWUiOiJTVEpUWEVKUEpQUFZETkE5QjA1Mk5TUlJCR1FDRk5LVlMxNzhWR0gxIiwiZW5hYmxlZCI6dHJ1ZX0seyJrZXkiOiJjb250cmFjdF9uYW1lIiwidmFsdWUiOiJoZWxsb193b3JsZCIsImVuYWJsZWQiOnRydWV9LHsia2V5IjoiY29udHJhY3RfbWFwIiwidmFsdWUiOiJzdG9yZSIsImVuYWJsZWQiOnRydWV9LHsia2V5IjoiY29udHJhY3RfbWV0aG9kIiwidmFsdWUiOiJnZXQtdmFsdWUiLCJlbmFibGVkIjp0cnVlfV0=) | ||
* | ||
* The version of the OpenAPI document: 1.0.0 | ||
* | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
import { exists, mapValues } from '../runtime'; | ||
/** | ||
* GET request that returns transactions | ||
* @export | ||
* @interface PostCoreNodeTransactionsError | ||
*/ | ||
export interface PostCoreNodeTransactionsError { | ||
/** | ||
* The error | ||
* @type {string} | ||
* @memberof PostCoreNodeTransactionsError | ||
*/ | ||
error: string; | ||
/** | ||
* The reason for the error | ||
* @type {string} | ||
* @memberof PostCoreNodeTransactionsError | ||
*/ | ||
reason: string; | ||
/** | ||
* More details about the reason | ||
* @type {object} | ||
* @memberof PostCoreNodeTransactionsError | ||
*/ | ||
reason_data: object; | ||
/** | ||
* The relevant transaction id | ||
* @type {string} | ||
* @memberof PostCoreNodeTransactionsError | ||
*/ | ||
txid: string; | ||
} | ||
|
||
export function PostCoreNodeTransactionsErrorFromJSON(json: any): PostCoreNodeTransactionsError { | ||
return PostCoreNodeTransactionsErrorFromJSONTyped(json, false); | ||
} | ||
|
||
export function PostCoreNodeTransactionsErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostCoreNodeTransactionsError { | ||
if ((json === undefined) || (json === null)) { | ||
return json; | ||
} | ||
return { | ||
|
||
'error': json['error'], | ||
'reason': json['reason'], | ||
'reason_data': json['reason_data'], | ||
'txid': json['txid'], | ||
}; | ||
} | ||
|
||
export function PostCoreNodeTransactionsErrorToJSON(value?: PostCoreNodeTransactionsError | null): any { | ||
if (value === undefined) { | ||
return undefined; | ||
} | ||
if (value === null) { | ||
return null; | ||
} | ||
return { | ||
|
||
'error': value.error, | ||
'reason': value.reason, | ||
'reason_data': value.reason_data, | ||
'txid': value.txid, | ||
}; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
docs/api/transaction/post-core-node-transactions-error.example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"error": "transaction rejected", | ||
"reason": "BadNonce", | ||
"reason_data": { | ||
"actual": 4, | ||
"expected": 0, | ||
"is_origin": true, | ||
"principal": "ST2ZRX0K27GW0SP3GJCEMHD95TQGJMKB7G9Y0X1MH" | ||
}, | ||
"txid": "caf6fd60ae05b0c2d19ef14ab6a7670b1095d117fa7c80224c74e76214d0a791" | ||
} |
25 changes: 25 additions & 0 deletions
25
docs/api/transaction/post-core-node-transactions-error.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"description": "GET request that returns transactions", | ||
"title": "PostCoreNodeTransactionsError", | ||
"type": "object", | ||
"required": ["error", "reason", "reason_data", "txid"], | ||
"properties": { | ||
"error": { | ||
"type": "string", | ||
"description": "The error" | ||
}, | ||
"reason": { | ||
"type": "string", | ||
"description": "The reason for the error" | ||
}, | ||
"reason_data": { | ||
"type": "object", | ||
"description": "More details about the reason" | ||
}, | ||
"txid": { | ||
"type": "string", | ||
"description": "The relevant transaction id" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters