diff --git a/packages/cactus-core-api/src/main/typescript/plugin/ledger-connector/i-send-request-response-v1.ts b/packages/cactus-core-api/src/main/typescript/plugin/ledger-connector/i-send-request-response-v1.ts new file mode 100644 index 0000000000..13e14c5808 --- /dev/null +++ b/packages/cactus-core-api/src/main/typescript/plugin/ledger-connector/i-send-request-response-v1.ts @@ -0,0 +1,17 @@ +/** + * An interface representing the response object of the send sync and send async + * request methods on the connection-chain verifier API. + * + * Also great when trying to help bridge the gap between the API returning + * results as `unknown` and the tests needing auto-completion for the properties + * to assert for type of data at runtime. + * + * @see {ISocketApiClient} + * @see {Verifier>} + * @see {IVerifier} + */ +export interface ISendRequestResultV1 { + readonly data: T; + readonly errorDetail?: string; + readonly status: number; +} diff --git a/packages/cactus-core-api/src/main/typescript/public-api.ts b/packages/cactus-core-api/src/main/typescript/public-api.ts index 31b6e40b61..fcc684feaa 100755 --- a/packages/cactus-core-api/src/main/typescript/public-api.ts +++ b/packages/cactus-core-api/src/main/typescript/public-api.ts @@ -42,3 +42,5 @@ export { LedgerEvent, IVerifierEventListener, } from "./client/i-verifier"; + +export { ISendRequestResultV1 } from "./plugin/ledger-connector/i-send-request-response-v1";