diff --git a/.cspell.json b/.cspell.json index 582a3d14a0..b1aa74f7b5 100644 --- a/.cspell.json +++ b/.cspell.json @@ -46,9 +46,12 @@ "couchdb", "COUCHDBADDRESS", "COUCHDBCONFIG", + "CPIV", "cplcs", "Creds", "Crpc", + "CSDE", + "csdetemplate", "data", "davecgh", "dclm", @@ -197,6 +200,7 @@ "undici", "unixfs", "Unmarshal", + "utxoexample", "uuidv", "vscc", "vuln", diff --git a/packages/cactus-plugin-ledger-connector-corda/package.json b/packages/cactus-plugin-ledger-connector-corda/package.json index 7ef521d7d2..2fbcec0150 100644 --- a/packages/cactus-plugin-ledger-connector-corda/package.json +++ b/packages/cactus-plugin-ledger-connector-corda/package.json @@ -61,14 +61,18 @@ "@hyperledger/cactus-core": "2.0.0-rc.3", "@hyperledger/cactus-core-api": "2.0.0-rc.3", "axios": "1.6.0", + "express": "4.19.2", "express-openapi-validator": "5.2.0", + "http-errors-enhanced-cjs": "2.0.1", "internal-ip": "6.2.0", "joi": "17.13.3", + "node-fetch": "2.7.0", "node-ssh": "13.1.0", "prom-client": "15.1.3", "rxjs": "7.8.1", "temp": "0.9.4", - "typescript-optional": "2.0.1" + "typescript-optional": "2.0.1", + "urlcat": "3.1.0" }, "devDependencies": { "@hyperledger/cactus-test-tooling": "2.0.0-rc.3", diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.openapi-generator/FILES index 6bc04614ee..daff5c5015 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.openapi-generator/FILES +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/.openapi-generator/FILES @@ -3,6 +3,7 @@ settings.gradle src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaController.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaService.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiUtil.kt +src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CPIIDV1.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Request.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ClearMonitorTransactionsV1Response.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CordaNodeSshCredentials.kt @@ -16,6 +17,11 @@ src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/mode src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DiagnoseNodeV1Request.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/DiagnoseNodeV1Response.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowInvocationType.kt +src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowStatusV1Responses.kt +src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowStatusV1ResponsesFlowStatusResponsesInner.kt +src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowV1Error.kt +src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetFlowCidV1Request.kt +src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetFlowCidV1Response.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1Request.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1Response.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetMonitorTransactionsV1ResponseTxInner.kt @@ -25,6 +31,10 @@ src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/mode src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmObject.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmType.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/JvmTypeKind.kt +src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1Request.kt +src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1Response.kt +src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1ResponseCpisInner.kt +src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1ResponseCpisInnerCpksInner.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListFlowsV1Request.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListFlowsV1Response.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/NetworkHostAndPort.kt @@ -33,6 +43,9 @@ src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/mode src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/Party.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/PublicKey.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/SHA256.kt +src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1Request.kt +src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1RequestRequestBody.kt +src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1Response.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartMonitorV1Request.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartMonitorV1Response.kt src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StopMonitorV1Request.kt diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/gradlew b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/gradlew old mode 100755 new mode 100644 diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaController.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaController.kt index b6d1080a16..f8cb2099e0 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaController.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaController.kt @@ -7,13 +7,20 @@ import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DeployC import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DeployContractJarsV1Request import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DiagnoseNodeV1Request import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DiagnoseNodeV1Response +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.FlowStatusV1Responses +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetFlowCidV1Request +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetFlowCidV1Response import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetMonitorTransactionsV1Request import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetMonitorTransactionsV1Response import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.InvokeContractV1Request import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.InvokeContractV1Response +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListCpiV1Request +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListCpiV1Response import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListFlowsV1Request import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListFlowsV1Response import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.NodeInfo +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartFlowV1Request +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartFlowV1Response import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartMonitorV1Request import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartMonitorV1Response import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StopMonitorV1Request @@ -80,6 +87,17 @@ class ApiPluginLedgerConnectorCordaController(@Autowired(required = true) val se } + @RequestMapping( + method = [RequestMethod.GET], + value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid"], + produces = ["text/plain"], + consumes = ["application/json"] + ) + fun getFlowV1( @Valid @RequestBody getFlowCidV1Request: GetFlowCidV1Request): ResponseEntity { + return ResponseEntity(service.getFlowV1(getFlowCidV1Request), HttpStatus.valueOf(200)) + } + + @RequestMapping( method = [RequestMethod.GET], value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions"], @@ -112,6 +130,28 @@ class ApiPluginLedgerConnectorCordaController(@Autowired(required = true) val se } + @RequestMapping( + method = [RequestMethod.GET], + value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi"], + produces = ["application/json"], + consumes = ["application/json"] + ) + fun listCpiV1( @Valid @RequestBody listCpiV1Request: ListCpiV1Request): ResponseEntity { + return ResponseEntity(service.listCpiV1(listCpiV1Request), HttpStatus.valueOf(200)) + } + + + @RequestMapping( + method = [RequestMethod.GET], + value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow"], + produces = ["text/plain"], + consumes = ["application/json"] + ) + fun listFlowV1( @Valid @RequestBody getFlowCidV1Request: GetFlowCidV1Request): ResponseEntity { + return ResponseEntity(service.listFlowV1(getFlowCidV1Request), HttpStatus.valueOf(200)) + } + + @RequestMapping( method = [RequestMethod.POST], value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows"], @@ -134,6 +174,17 @@ class ApiPluginLedgerConnectorCordaController(@Autowired(required = true) val se } + @RequestMapping( + method = [RequestMethod.POST], + value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow"], + produces = ["application/json"], + consumes = ["application/json"] + ) + fun startFlowV1( @Valid @RequestBody startFlowV1Request: StartFlowV1Request): ResponseEntity { + return ResponseEntity(service.startFlowV1(startFlowV1Request), HttpStatus.valueOf(200)) + } + + @RequestMapping( method = [RequestMethod.POST], value = ["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor"], diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaService.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaService.kt index a41fc7b045..c806c30c03 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaService.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/api/ApiPluginLedgerConnectorCordaService.kt @@ -7,13 +7,20 @@ import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DeployC import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DeployContractJarsV1Request import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DiagnoseNodeV1Request import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.DiagnoseNodeV1Response +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.FlowStatusV1Responses +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetFlowCidV1Request +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetFlowCidV1Response import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetMonitorTransactionsV1Request import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.GetMonitorTransactionsV1Response import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.InvokeContractV1Request import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.InvokeContractV1Response +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListCpiV1Request +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListCpiV1Response import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListFlowsV1Request import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListFlowsV1Response import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.NodeInfo +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartFlowV1Request +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartFlowV1Response import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartMonitorV1Request import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartMonitorV1Response import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StopMonitorV1Request @@ -51,6 +58,17 @@ interface ApiPluginLedgerConnectorCordaService { */ fun diagnoseNodeV1(diagnoseNodeV1Request: DiagnoseNodeV1Request?): DiagnoseNodeV1Response + /** + * GET /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid : This method gets the current status of the specified flow instance. + * + * @param getFlowCidV1Request This method gets the current status of the specified flow instance. (required) + * @return OK (status code 200) + * or Unauthorized (status code 401) + * or Forbidden (status code 403) + * @see ApiPluginLedgerConnectorCorda#getFlowV1 + */ + fun getFlowV1(getFlowCidV1Request: GetFlowCidV1Request): GetFlowCidV1Response + /** * GET /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions : Get transactions for monitored state classes. * @@ -77,6 +95,26 @@ interface ApiPluginLedgerConnectorCordaService { */ fun invokeContractV1(invokeContractV1Request: InvokeContractV1Request?): InvokeContractV1Response + /** + * GET /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi : List all CPIs uploaded to the cluster + * + * @param listCpiV1Request (required) + * @return OK (status code 200) + * @see ApiPluginLedgerConnectorCorda#listCpiV1 + */ + fun listCpiV1(listCpiV1Request: ListCpiV1Request): ListCpiV1Response + + /** + * GET /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow : This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. + * + * @param getFlowCidV1Request This method gets the current status of the specified flow instance. (required) + * @return OK (status code 200) + * or Unauthorized (status code 401) + * or Forbidden (status code 403) + * @see ApiPluginLedgerConnectorCorda#listFlowV1 + */ + fun listFlowV1(getFlowCidV1Request: GetFlowCidV1Request): FlowStatusV1Responses + /** * POST /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows * Responds with a list of the flows on the Corda node. @@ -97,6 +135,15 @@ interface ApiPluginLedgerConnectorCordaService { */ fun networkMapV1(body: kotlin.Any?): List + /** + * POST /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow : This method starts a new instance for the specified flow for the specified holding identity. + * + * @param startFlowV1Request Request body for starting a flow (required) + * @return OK (status code 200) + * @see ApiPluginLedgerConnectorCorda#startFlowV1 + */ + fun startFlowV1(startFlowV1Request: StartFlowV1Request): StartFlowV1Response + /** * POST /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor : Start monitoring corda changes (transactions) of given state class * diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CPIIDV1.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CPIIDV1.kt new file mode 100644 index 0000000000..143fea9f02 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/CPIIDV1.kt @@ -0,0 +1,30 @@ +package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Email +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import javax.validation.Valid + +/** + * + * @param name + * @param version + * @param signerSummaryHash + */ +data class CPIIDV1( + + @get:JsonProperty("name", required = true) val name: kotlin.String, + + @get:JsonProperty("version", required = true) val version: kotlin.String, + + @get:JsonProperty("signerSummaryHash") val signerSummaryHash: kotlin.String? = null +) { + +} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowStatusV1Responses.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowStatusV1Responses.kt new file mode 100644 index 0000000000..23e16451a3 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowStatusV1Responses.kt @@ -0,0 +1,26 @@ +package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.FlowStatusV1ResponsesFlowStatusResponsesInner +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Email +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import javax.validation.Valid + +/** + * + * @param flowStatusResponses + */ +data class FlowStatusV1Responses( + + @field:Valid + @get:JsonProperty("flowStatusResponses") val flowStatusResponses: kotlin.collections.List? = null +) { + +} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowStatusV1ResponsesFlowStatusResponsesInner.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowStatusV1ResponsesFlowStatusResponsesInner.kt new file mode 100644 index 0000000000..4c175dc0ab --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowStatusV1ResponsesFlowStatusResponsesInner.kt @@ -0,0 +1,44 @@ +package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.FlowV1Error +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Email +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import javax.validation.Valid + +/** + * + * @param clientRequestId + * @param flowError + * @param flowId + * @param flowResult + * @param flowStatus + * @param holdingIDShortHash + * @param timestamp + */ +data class FlowStatusV1ResponsesFlowStatusResponsesInner( + + @get:JsonProperty("clientRequestId") val clientRequestId: kotlin.String? = null, + + @field:Valid + @get:JsonProperty("flowError") val flowError: FlowV1Error? = null, + + @get:JsonProperty("flowId") val flowId: kotlin.String? = null, + + @get:JsonProperty("flowResult") val flowResult: kotlin.String? = null, + + @get:JsonProperty("flowStatus") val flowStatus: kotlin.String? = null, + + @get:JsonProperty("holdingIDShortHash") val holdingIDShortHash: kotlin.String? = null, + + @get:JsonProperty("timestamp") val timestamp: java.time.OffsetDateTime? = null +) { + +} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowV1Error.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowV1Error.kt new file mode 100644 index 0000000000..e4873b9bde --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/FlowV1Error.kt @@ -0,0 +1,27 @@ +package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Email +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import javax.validation.Valid + +/** + * + * @param message + * @param type + */ +data class FlowV1Error( + + @get:JsonProperty("message", required = true) val message: kotlin.String, + + @get:JsonProperty("type", required = true) val type: kotlin.String +) { + +} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetFlowCidV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetFlowCidV1Request.kt new file mode 100644 index 0000000000..42e6d75247 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetFlowCidV1Request.kt @@ -0,0 +1,36 @@ +package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Email +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import javax.validation.Valid + +/** + * This method gets the current status of the specified flow instance. + * @param username + * @param password + * @param rejectUnauthorized + * @param holdingIDShortHash + * @param clientRequestId + */ +data class GetFlowCidV1Request( + + @get:JsonProperty("username", required = true) val username: kotlin.String, + + @get:JsonProperty("password", required = true) val password: kotlin.String, + + @get:JsonProperty("rejectUnauthorized", required = true) val rejectUnauthorized: kotlin.Boolean, + + @get:JsonProperty("holdingIDShortHash") val holdingIDShortHash: kotlin.String? = null, + + @get:JsonProperty("clientRequestId") val clientRequestId: kotlin.String? = null +) { + +} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetFlowCidV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetFlowCidV1Response.kt new file mode 100644 index 0000000000..a79f7120ca --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/GetFlowCidV1Response.kt @@ -0,0 +1,44 @@ +package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.FlowV1Error +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Email +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import javax.validation.Valid + +/** + * + * @param flowStatus + * @param holdingIDShortHash + * @param timestamp + * @param clientRequestId + * @param flowError + * @param flowId + * @param flowResult + */ +data class GetFlowCidV1Response( + + @get:JsonProperty("flowStatus", required = true) val flowStatus: kotlin.String, + + @get:JsonProperty("holdingIDShortHash", required = true) val holdingIDShortHash: kotlin.String, + + @get:JsonProperty("timestamp", required = true) val timestamp: java.time.OffsetDateTime, + + @get:JsonProperty("clientRequestId") val clientRequestId: kotlin.String? = null, + + @field:Valid + @get:JsonProperty("flowError") val flowError: FlowV1Error? = null, + + @get:JsonProperty("flowId") val flowId: kotlin.String? = null, + + @get:JsonProperty("flowResult") val flowResult: kotlin.String? = null +) { + +} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1Request.kt new file mode 100644 index 0000000000..aca3b6dd39 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1Request.kt @@ -0,0 +1,30 @@ +package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Email +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import javax.validation.Valid + +/** + * + * @param username + * @param password + * @param rejectUnauthorized + */ +data class ListCpiV1Request( + + @get:JsonProperty("username", required = true) val username: kotlin.String, + + @get:JsonProperty("password", required = true) val password: kotlin.String, + + @get:JsonProperty("rejectUnauthorized", required = true) val rejectUnauthorized: kotlin.Boolean +) { + +} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1Response.kt new file mode 100644 index 0000000000..b55eb9335f --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1Response.kt @@ -0,0 +1,26 @@ +package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListCpiV1ResponseCpisInner +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Email +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import javax.validation.Valid + +/** + * + * @param cpis + */ +data class ListCpiV1Response( + + @field:Valid + @get:JsonProperty("cpis") val cpis: kotlin.collections.List? = null +) { + +} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1ResponseCpisInner.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1ResponseCpisInner.kt new file mode 100644 index 0000000000..909630fbf7 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1ResponseCpisInner.kt @@ -0,0 +1,43 @@ +package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.CPIIDV1 +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.ListCpiV1ResponseCpisInnerCpksInner +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Email +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import javax.validation.Valid + +/** + * + * @param cpiFileChecksum + * @param cpiFileFullChecksum + * @param cpks + * @param groupPolicy + * @param id + * @param timestamp + */ +data class ListCpiV1ResponseCpisInner( + + @get:JsonProperty("cpiFileChecksum") val cpiFileChecksum: kotlin.String? = null, + + @get:JsonProperty("cpiFileFullChecksum") val cpiFileFullChecksum: kotlin.String? = null, + + @field:Valid + @get:JsonProperty("cpks") val cpks: kotlin.collections.List? = null, + + @get:JsonProperty("groupPolicy") val groupPolicy: kotlin.String? = null, + + @field:Valid + @get:JsonProperty("id") val id: CPIIDV1? = null, + + @get:JsonProperty("timestamp") val timestamp: java.time.OffsetDateTime? = null +) { + +} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1ResponseCpisInnerCpksInner.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1ResponseCpisInnerCpksInner.kt new file mode 100644 index 0000000000..28ef9d1b62 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/ListCpiV1ResponseCpisInnerCpksInner.kt @@ -0,0 +1,41 @@ +package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.CPIIDV1 +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Email +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import javax.validation.Valid + +/** + * + * @param hash + * @param id + * @param libraries + * @param mainBundle + * @param timestamp + * @param type + */ +data class ListCpiV1ResponseCpisInnerCpksInner( + + @get:JsonProperty("hash") val hash: kotlin.String? = null, + + @field:Valid + @get:JsonProperty("id") val id: CPIIDV1? = null, + + @get:JsonProperty("libraries") val libraries: kotlin.collections.List? = null, + + @get:JsonProperty("mainBundle") val mainBundle: kotlin.String? = null, + + @get:JsonProperty("timestamp") val timestamp: java.time.OffsetDateTime? = null, + + @get:JsonProperty("type") val type: kotlin.String? = null +) { + +} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1Request.kt new file mode 100644 index 0000000000..d5ea76eca0 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1Request.kt @@ -0,0 +1,44 @@ +package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.StartFlowV1RequestRequestBody +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Email +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import javax.validation.Valid + +/** + * This method starts a new instance for the specified flow for the specified holding identity. + * @param username + * @param password + * @param rejectUnauthorized + * @param clientRequestId + * @param flowClassName + * @param requestBody + * @param holdingIDShortHash + */ +data class StartFlowV1Request( + + @get:JsonProperty("username", required = true) val username: kotlin.String, + + @get:JsonProperty("password", required = true) val password: kotlin.String, + + @get:JsonProperty("rejectUnauthorized", required = true) val rejectUnauthorized: kotlin.Boolean, + + @get:JsonProperty("clientRequestId", required = true) val clientRequestId: kotlin.String, + + @get:JsonProperty("flowClassName", required = true) val flowClassName: kotlin.String, + + @field:Valid + @get:JsonProperty("requestBody", required = true) val requestBody: StartFlowV1RequestRequestBody, + + @get:JsonProperty("holdingIDShortHash") val holdingIDShortHash: kotlin.String? = null +) { + +} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1RequestRequestBody.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1RequestRequestBody.kt new file mode 100644 index 0000000000..cb010c02e5 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1RequestRequestBody.kt @@ -0,0 +1,33 @@ +package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Email +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import javax.validation.Valid + +/** + * + * @param chatName + * @param otherMember + * @param message + * @param numberOfRecords + */ +data class StartFlowV1RequestRequestBody( + + @get:JsonProperty("chatName") val chatName: kotlin.String? = null, + + @get:JsonProperty("otherMember") val otherMember: kotlin.String? = null, + + @get:JsonProperty("message") val message: kotlin.String? = null, + + @get:JsonProperty("numberOfRecords") val numberOfRecords: kotlin.String? = null +) { + +} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1Response.kt new file mode 100644 index 0000000000..48965e722f --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/kotlin/org/hyperledger/cactus/plugin/ledger/connector/corda/server/model/StartFlowV1Response.kt @@ -0,0 +1,44 @@ +package org.hyperledger.cactus.plugin.ledger.connector.corda.server.model + +import java.util.Objects +import com.fasterxml.jackson.annotation.JsonProperty +import org.hyperledger.cactus.plugin.ledger.connector.corda.server.model.FlowV1Error +import javax.validation.constraints.DecimalMax +import javax.validation.constraints.DecimalMin +import javax.validation.constraints.Email +import javax.validation.constraints.Max +import javax.validation.constraints.Min +import javax.validation.constraints.NotNull +import javax.validation.constraints.Pattern +import javax.validation.constraints.Size +import javax.validation.Valid + +/** + * + * @param flowStatus + * @param holdingIDShortHash + * @param timestamp + * @param clientRequestId + * @param flowError + * @param flowId + * @param flowResult + */ +data class StartFlowV1Response( + + @get:JsonProperty("flowStatus", required = true) val flowStatus: kotlin.String, + + @get:JsonProperty("holdingIDShortHash", required = true) val holdingIDShortHash: kotlin.String, + + @get:JsonProperty("timestamp", required = true) val timestamp: java.time.OffsetDateTime, + + @get:JsonProperty("clientRequestId") val clientRequestId: kotlin.String? = null, + + @field:Valid + @get:JsonProperty("flowError") val flowError: FlowV1Error? = null, + + @get:JsonProperty("flowId") val flowId: kotlin.String? = null, + + @get:JsonProperty("flowResult") val flowResult: kotlin.String? = null +) { + +} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/resources/openapi.yaml b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/resources/openapi.yaml new file mode 100644 index 0000000000..b528e28193 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main-server/kotlin/gen/kotlin-spring/src/main/resources/openapi.yaml @@ -0,0 +1,1837 @@ +openapi: 3.0.3 +info: + description: Can perform basic tasks on a Corda ledger + license: + name: Apache-2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html + title: Hyperledger Cactus Plugin - Connector Corda + version: v2.0.0-alpha.2 +servers: +- url: / +paths: + /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars: + post: + operationId: deployContractJarsV1 + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeployContractJarsV1Request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DeployContractJarsSuccessV1Response' + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/DeployContractJarsBadRequestV1Response' + description: Bad Request + summary: "Deploys a set of jar files (Cordapps, e.g. the contracts in Corda\ + \ speak)." + x-hyperledger-cactus: + http: + path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars + verbLowerCase: post + /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract: + post: + operationId: invokeContractV1 + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/InvokeContractV1Request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/InvokeContractV1Response' + description: OK + summary: Invokes a contract on a Corda ledger (e.g. a flow) + x-hyperledger-cactus: + http: + path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract + verbLowerCase: post + /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor: + post: + operationId: startMonitorV1 + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StartMonitorV1Request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/StartMonitorV1Response' + description: OK + summary: Start monitoring corda changes (transactions) of given state class + x-hyperledger-cactus: + http: + path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor + verbLowerCase: post + /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions: + get: + operationId: GetMonitorTransactionsV1 + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetMonitorTransactionsV1Request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetMonitorTransactionsV1Response' + description: OK + summary: Get transactions for monitored state classes. + x-hyperledger-cactus: + http: + path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions + verbLowerCase: get + /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions: + delete: + operationId: ClearMonitorTransactionsV1 + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ClearMonitorTransactionsV1Request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ClearMonitorTransactionsV1Response' + description: OK + summary: Clear transactions from internal store so they'll not be available + by GetMonitorTransactionsV1 anymore. + x-hyperledger-cactus: + http: + path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions + verbLowerCase: delete + /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor: + delete: + operationId: stopMonitorV1 + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StopMonitorV1Request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/StopMonitorV1Response' + description: OK + summary: Stop monitoring corda changes (transactions) of given state class + x-hyperledger-cactus: + http: + path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor + verbLowerCase: delete + /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map: + post: + description: "Responds with a snapshot of the network map as provided by the\ + \ Corda RPC call: net.corda.core.messaging.CordaRPCOps public abstract fun\ + \ networkMapSnapshot(): List" + operationId: networkMapV1 + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NetworkMapV1Request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NetworkMapV1Response' + description: OK + x-hyperledger-cactus: + http: + path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map + verbLowerCase: post + /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows: + post: + description: Responds with a list of the flows on the Corda node. + operationId: listFlowsV1 + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ListFlowsV1Request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ListFlowsV1Response' + description: OK + x-hyperledger-cactus: + http: + path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows + verbLowerCase: post + /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node: + post: + description: Responds with diagnostic information about the Corda node + operationId: diagnoseNodeV1 + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DiagnoseNodeV1Request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DiagnoseNodeV1Response' + description: OK + x-hyperledger-cactus: + http: + path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node + verbLowerCase: post + /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics: + get: + operationId: getPrometheusMetricsV1 + parameters: [] + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/PrometheusExporterMetricsResponse' + description: OK + summary: Get the Prometheus Metrics + x-hyperledger-cactus: + http: + verbLowerCase: get + path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics + /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/cpi: + get: + operationId: getCPIResponse + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CPIV5Response' + description: OK + summary: List all CPIs uploaded to the cluster + x-hyperledger-cactus: + https: + verbLowerCase: get + path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/cpi + /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/flow/{holdingIDShortHash}: + get: + operationId: flowStatusResponses + parameters: + - description: Holding identity short hash + explode: false + in: path + name: holdingIDShortHash + required: true + schema: + type: string + style: simple + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/FlowStatusV5Responses' + description: OK + "401": + description: Unauthorized + "403": + description: Forbidden + summary: This method returns an array containing the statuses of all flows running + for a specified holding identity. An empty array is returned if there are + no flows running. + x-hyperledger-cactus: + http: + verbLowerCase: get + path: "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/flow/{holdingIDShortHash}" + post: + operationId: startFlowParameters + parameters: + - description: Holding identity short hash + explode: false + in: path + name: holdingIDShortHash + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StartFlowV5Request' + description: Request body for starting a flow + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FlowStatusV5Response' + description: OK + summary: This method starts a new instance for the specified flow for the specified + holding identity. + x-hyperledger-cactus: + http: + verbLowerCase: post + path: "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/flow/{holdingIDShortHash}" + /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/flow/{holdingIDShortHash}/{clientRequestID}: + get: + operationId: flowStatusResponse + parameters: + - description: Holding identity short hash + explode: false + in: path + name: holdingIDShortHash + required: true + schema: + type: string + style: simple + - description: Client request ID + explode: false + in: path + name: clientRequestID + required: true + schema: + type: string + style: simple + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/FlowStatusV5Response' + description: OK + "401": + description: Unauthorized + "403": + description: Forbidden + summary: This method gets the current status of the specified flow instance. + x-hyperledger-cactus: + http: + verbLowerCase: get + path: "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/flow/{holdingIDShortHash}/{clientRequestID}" +components: + schemas: + SHA256: + description: "SHA-256 is part of the SHA-2 hash function family. Generated hash\ + \ is fixed size, 256-bits (32-bytes)." + example: + offset: 0 + size: 32 + bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= + externalDocs: + description: Official Corda documentation of the SHA256 class. + url: https://api.corda.net/api/corda-os/4.6/html/api/kotlin/corda/net.corda.core.crypto/-secure-hash/-s-h-a256/index.html + properties: + bytes: + example: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= + type: string + offset: + example: 0 + type: integer + size: + example: 32 + type: integer + required: + - bytes + - offset + - size + type: object + CordappInfo: + description: A CordappInfo describes a single CorDapp currently installed on + the node + example: + licence: licence + targetPlatformVersion: 6 + vendor: vendor + name: name + jarHash: + offset: 0 + size: 32 + bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= + shortName: shortName + type: type + version: version + minimumPlatformVersion: 0 + externalDocs: + description: Official Corda Documentation of the class CordappInfo + url: https://api.corda.net/api/corda-os/4.6/html/api/kotlin/corda/net.corda.core.cordapp/-cordapp-info/index.html + properties: + jarHash: + $ref: '#/components/schemas/SHA256' + licence: + description: The name of the licence this CorDapp is released under + type: string + minimumPlatformVersion: + description: The minimum platform version the node must be at for the CorDapp + to run + type: integer + name: + description: The name of the JAR file that defines the CorDapp + type: string + shortName: + description: The name of the CorDapp + type: string + targetPlatformVersion: + description: The target platform version this CorDapp has been tested against + type: integer + type: + description: "A description of what sort of CorDapp this is - either a contract,\ + \ workflow, or a combination." + type: string + vendor: + description: The vendor of this CorDapp + type: string + version: + description: The version of this CorDapp + type: string + required: + - jarHash + - licence + - minimumPlatformVersion + - name + - shortName + - targetPlatformVersion + - type + - vendor + - version + type: object + NodeDiagnosticInfo: + description: A NodeDiagnosticInfo holds information about the current node version. + example: + vendor: vendor + platformVersion: 1 + version: version + cordapps: + - licence: licence + targetPlatformVersion: 6 + vendor: vendor + name: name + jarHash: + offset: 0 + size: 32 + bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= + shortName: shortName + type: type + version: version + minimumPlatformVersion: 0 + - licence: licence + targetPlatformVersion: 6 + vendor: vendor + name: name + jarHash: + offset: 0 + size: 32 + bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= + shortName: shortName + type: type + version: version + minimumPlatformVersion: 0 + - licence: licence + targetPlatformVersion: 6 + vendor: vendor + name: name + jarHash: + offset: 0 + size: 32 + bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= + shortName: shortName + type: type + version: version + minimumPlatformVersion: 0 + - licence: licence + targetPlatformVersion: 6 + vendor: vendor + name: name + jarHash: + offset: 0 + size: 32 + bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= + shortName: shortName + type: type + version: version + minimumPlatformVersion: 0 + - licence: licence + targetPlatformVersion: 6 + vendor: vendor + name: name + jarHash: + offset: 0 + size: 32 + bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= + shortName: shortName + type: type + version: version + minimumPlatformVersion: 0 + revision: revision + externalDocs: + description: Official Corda Documentation of the class NodeDiagnosticInfo + url: https://api.corda.net/api/corda-os/4.6/html/api/kotlin/corda/net.corda.core.node/-node-diagnostic-info/index.html + properties: + cordapps: + description: A list of CorDapps currently installed on this node + items: + $ref: '#/components/schemas/CordappInfo' + maxItems: 4096 + minItems: 0 + type: array + platformVersion: + description: "The platform version of this node. This number represents\ + \ a released API version, and should be used to make functionality decisions\ + \ (e.g. enabling an app feature only if an underlying platform feature\ + \ exists)" + type: integer + revision: + description: The git commit hash this node was built from + type: string + vendor: + description: The vendor of this node + type: string + version: + description: "The current node version string, e.g. 4.3, 4.4-SNAPSHOT. Note\ + \ that this string is effectively freeform, and so should only be used\ + \ for providing diagnostic information. It should not be used to make\ + \ functionality decisions (the platformVersion is a better fit for this)." + type: string + required: + - cordapps + - platformVersion + - revision + - vendor + - version + type: object + FlowInvocationType: + description: Determines which flow starting method will be used on the back-end + when invoking the flow. Based on the value here the plugin back-end might + invoke the rpc.startFlowDynamic() method or the rpc.startTrackedFlowDynamic() + method. Streamed responses are aggregated and returned in a single response + to HTTP callers who are not equipped to handle streams like WebSocket/gRPC/etc. + do. + enum: + - TRACKED_FLOW_DYNAMIC + - FLOW_DYNAMIC + nullable: false + type: string + JarFile: + additionalProperties: true + example: + filename: filename + contentBase64: contentBase64 + hasDbMigrations: true + properties: + filename: + maxLength: 255 + minLength: 1 + nullable: false + type: string + hasDbMigrations: + description: Indicates whether the cordapp jar in question contains any + embedded migrations that Cactus can/should execute between copying the + jar into the cordapp directory and starting the node back up. + nullable: false + type: boolean + contentBase64: + format: base64 + maxLength: 1073741824 + minLength: 1 + nullable: false + type: string + required: + - contentBase64 + - filename + - hasDbMigrations + type: object + JvmType: + description: Represents a reference to a JVM type (such as a Java class) + example: + constructorName: constructorName + invocationTarget: null + fqClassName: fqClassName + properties: + fqClassName: + maxLength: 65535 + minLength: 1 + nullable: false + type: string + constructorName: + description: This parameter is used to specify that the function used to + construct this JvmType is not a constructor function but instead is a + factory function. Setting this parameter will cause the plugin to look + up methods of the class denoted by fqClassName instead of its constructors. + maxLength: 65535 + minLength: 1 + nullable: false + type: string + invocationTarget: + $ref: '#/components/schemas/JvmObject' + required: + - fqClassName + type: object + JvmTypeKind: + enum: + - PRIMITIVE + - REFERENCE + nullable: false + type: string + JvmObject: + description: "Can represent JVM primitive and reference types as well. The jvmTypeKind\ + \ field indicates which one is being stored. If the jvmTypeKind field is set\ + \ to REFERENCE then the jvmCtorArgs array is expected to be filled, otherwise\ + \ (e.g. PRIMITIVE jvmTypeKind) it is expected that the primitiveValue property\ + \ is filled with a primitive data type supported by the JSON standard such\ + \ as strings, booleans, numbers, etc." + example: + jvmCtorArgs: + - null + - null + jvmType: + constructorName: constructorName + invocationTarget: null + fqClassName: fqClassName + primitiveValue: "{}" + jvmTypeKind: null + properties: + jvmTypeKind: + $ref: '#/components/schemas/JvmTypeKind' + primitiveValue: + type: object + jvmCtorArgs: + default: [] + items: + $ref: '#/components/schemas/JvmObject' + maxLength: 1024 + minLength: 0 + nullable: false + type: array + jvmType: + $ref: '#/components/schemas/JvmType' + required: + - jvmType + - jvmTypeKind + type: object + CordappDeploymentConfig: + example: + cordaJarPath: cordaJarPath + cordaNodeStartCmd: ./build/nodes/runNodes + cordappDir: cordappDir + nodeBaseDirPath: nodeBaseDirPath + rpcCredentials: + hostname: hostname + password: password + port: 39501 + username: username + sshCredentials: + password: password + hostname: hostname + port: 5249 + hostKeyEntry: localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmhSBtMctNa4hsZt8QGlsYSE5/gMkjeand69Vj4ir13 + username: username + properties: + sshCredentials: + $ref: '#/components/schemas/CordaNodeSshCredentials' + rpcCredentials: + $ref: '#/components/schemas/CordaRpcCredentials' + cordaNodeStartCmd: + description: The shell command to execute in order to start back up a Corda + node after having placed new jars in the cordapp directory of said node. + example: ./build/nodes/runNodes + maxLength: 65535 + minLength: 1 + nullable: false + type: string + cordappDir: + description: The absolute file system path where the Corda Node is expecting + deployed Cordapp jar files to be placed. + maxLength: 2048 + minLength: 1 + nullable: false + type: string + cordaJarPath: + description: The absolute file system path where the corda.jar file of the + node can be found. This is used to execute database schema migrations + where applicable (H2 database in use in development environments). + maxLength: 2048 + minLength: 1 + nullable: false + type: string + nodeBaseDirPath: + description: The absolute file system path where the base directory of the + Corda node can be found. This is used to pass in to corda.jar when being + invoked for certain tasks such as executing database schema migrations + for a deployed contract. + maxLength: 2048 + minLength: 1 + nullable: false + type: string + required: + - cordaJarPath + - cordaNodeStartCmd + - cordappDir + - nodeBaseDirPath + - rpcCredentials + - sshCredentials + type: object + CordaRpcCredentials: + example: + hostname: hostname + password: password + port: 39501 + username: username + properties: + hostname: + maxLength: 65535 + minLength: 1 + nullable: false + type: string + port: + maximum: 65535 + minimum: 1 + nullable: false + type: integer + username: + maxLength: 1024 + minLength: 1 + nullable: false + type: string + password: + maxLength: 65535 + minLength: 1 + nullable: false + type: string + required: + - hostname + - password + - port + - username + type: object + CordaNodeSshCredentials: + example: + password: password + hostname: hostname + port: 5249 + hostKeyEntry: localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmhSBtMctNa4hsZt8QGlsYSE5/gMkjeand69Vj4ir13 + username: username + properties: + hostKeyEntry: + example: localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmhSBtMctNa4hsZt8QGlsYSE5/gMkjeand69Vj4ir13 + maxLength: 65535 + minLength: 1 + nullable: false + type: string + username: + maxLength: 32 + minLength: 1 + nullable: false + type: string + password: + maxLength: 4096 + minLength: 1 + nullable: false + type: string + hostname: + maxLength: 4096 + minLength: 1 + nullable: false + type: string + port: + maximum: 65535 + minimum: 1 + nullable: false + type: integer + required: + - hostKeyEntry + - hostname + - password + - port + - username + type: object + DeployContractJarsV1Request: + additionalProperties: false + example: + jarFiles: + - filename: filename + contentBase64: contentBase64 + hasDbMigrations: true + - filename: filename + contentBase64: contentBase64 + hasDbMigrations: true + cordappDeploymentConfigs: + - cordaJarPath: cordaJarPath + cordaNodeStartCmd: ./build/nodes/runNodes + cordappDir: cordappDir + nodeBaseDirPath: nodeBaseDirPath + rpcCredentials: + hostname: hostname + password: password + port: 39501 + username: username + sshCredentials: + password: password + hostname: hostname + port: 5249 + hostKeyEntry: localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmhSBtMctNa4hsZt8QGlsYSE5/gMkjeand69Vj4ir13 + username: username + - cordaJarPath: cordaJarPath + cordaNodeStartCmd: ./build/nodes/runNodes + cordappDir: cordappDir + nodeBaseDirPath: nodeBaseDirPath + rpcCredentials: + hostname: hostname + password: password + port: 39501 + username: username + sshCredentials: + password: password + hostname: hostname + port: 5249 + hostKeyEntry: localhost ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPmhSBtMctNa4hsZt8QGlsYSE5/gMkjeand69Vj4ir13 + username: username + properties: + cordappDeploymentConfigs: + default: [] + description: The list of deployment configurations pointing to the nodes + where the provided cordapp jar files are to be deployed . + items: + $ref: '#/components/schemas/CordappDeploymentConfig' + maxLength: 1024 + minLength: 0 + type: array + jarFiles: + items: + $ref: '#/components/schemas/JarFile' + nullable: false + type: array + required: + - cordappDeploymentConfigs + - jarFiles + type: object + DeployContractJarsSuccessV1Response: + example: + deployedJarFiles: + - deployedJarFiles + - deployedJarFiles + properties: + deployedJarFiles: + items: + minItems: 1 + nullable: false + type: string + type: array + required: + - deployedJarFiles + type: object + DeployContractJarsBadRequestV1Response: + properties: + errors: + items: + maxItems: 2048 + maxLength: 65535 + minItems: 1 + minLength: 1 + type: string + type: array + required: + - errors + type: object + InvokeContractV1Request: + additionalProperties: false + example: + flowInvocationType: null + timeoutMs: 0 + flowFullClassName: net.corda.samples.obligation.flows.IOUIssueFlow + params: + - jvmCtorArgs: + - null + - null + jvmType: + constructorName: constructorName + invocationTarget: null + fqClassName: fqClassName + primitiveValue: "{}" + jvmTypeKind: null + - jvmCtorArgs: + - null + - null + jvmType: + constructorName: constructorName + invocationTarget: null + fqClassName: fqClassName + primitiveValue: "{}" + jvmTypeKind: null + properties: + flowFullClassName: + description: The fully qualified name of the Corda flow to invoke + example: net.corda.samples.obligation.flows.IOUIssueFlow + maxLength: 1024 + minLength: 1 + nullable: false + type: string + flowInvocationType: + $ref: '#/components/schemas/FlowInvocationType' + params: + default: [] + description: The list of arguments to pass in to the contract method being + invoked. + items: + $ref: '#/components/schemas/JvmObject' + nullable: false + type: array + timeoutMs: + default: 60000 + description: The amount of milliseconds to wait for a transaction receipt + beforegiving up and crashing. + minimum: 0 + nullable: false + type: integer + required: + - flowFullClassName + - flowInvocationType + - params + - signingCredential + type: object + InvokeContractV1Response: + example: + callOutput: "{}" + success: true + progress: + - progress + - progress + flowId: flowId + transactionId: transactionId + properties: + success: + nullable: false + type: boolean + callOutput: + description: Data returned from the JVM when no transaction is running + type: object + transactionId: + description: The net.corda.core.flows.StateMachineRunId value returned by + the flow execution. + maxLength: 1024 + minLength: 1 + nullable: false + type: string + progress: + default: [] + description: "An array of strings representing the aggregated stream of\ + \ progress updates provided by a *tracked* flow invocation. If the flow\ + \ invocation was not tracked, this array is still returned, but as empty." + items: + maxItems: 10000000 + minItems: 0 + type: string + type: array + flowId: + description: The id for the flow handle + type: string + required: + - callOutput + - flowId + - success + type: object + StartMonitorV1Request: + additionalProperties: false + example: + stateFullClassName: net.corda.samples.example.states.IOUState + clientAppId: frond_v1_x_7Hdg6s + properties: + clientAppId: + description: ID of a client application that wants to monitor the state + changes + example: frond_v1_x_7Hdg6s + maxLength: 1024 + minLength: 1 + nullable: false + type: string + stateFullClassName: + description: The fully qualified name of the Corda state to monitor + example: net.corda.samples.example.states.IOUState + maxLength: 1024 + minLength: 1 + nullable: false + type: string + required: + - clientAppId + - stateFullClassName + type: object + StartMonitorV1Response: + example: + msg: msg + success: true + properties: + success: + description: Flag set to true if monitoring started correctly. + nullable: false + type: boolean + msg: + description: Message describing operation status or any errors that occurred. + nullable: false + type: string + required: + - msg + - success + type: object + GetMonitorTransactionsV1Request: + additionalProperties: false + example: + stateFullClassName: net.corda.samples.example.states.IOUState + clientAppId: frond_v1_x_7Hdg6s + properties: + clientAppId: + description: ID of a client application that wants to monitor the state + changes + example: frond_v1_x_7Hdg6s + maxLength: 1024 + minLength: 1 + nullable: false + type: string + stateFullClassName: + description: The fully qualified name of the Corda state to monitor + example: net.corda.samples.example.states.IOUState + maxLength: 1024 + minLength: 1 + nullable: false + type: string + required: + - clientAppId + - stateFullClassName + type: object + GetMonitorTransactionsV1Response: + example: + msg: msg + tx: + - data: data + index: index + - data: data + index: index + success: true + stateFullClassName: net.corda.samples.example.states.IOUState + properties: + success: + description: Flag set to true if operation completed correctly. + nullable: false + type: boolean + msg: + description: Message describing operation status or any errors that occurred. + nullable: false + type: string + stateFullClassName: + description: The fully qualified name of the Corda state to monitor + example: net.corda.samples.example.states.IOUState + maxLength: 1024 + minLength: 1 + nullable: false + type: string + tx: + default: [] + items: + $ref: '#/components/schemas/GetMonitorTransactionsV1Response_tx_inner' + type: array + required: + - msg + - success + type: object + ClearMonitorTransactionsV1Request: + additionalProperties: false + example: + txIndexes: + - txIndexes + - txIndexes + stateFullClassName: net.corda.samples.example.states.IOUState + clientAppId: frond_v1_x_7Hdg6s + properties: + clientAppId: + description: ID of a client application that wants to monitor the state + changes + example: frond_v1_x_7Hdg6s + maxLength: 1024 + minLength: 1 + nullable: false + type: string + stateFullClassName: + description: The fully qualified name of the Corda state to monitor + example: net.corda.samples.example.states.IOUState + maxLength: 1024 + minLength: 1 + nullable: false + type: string + txIndexes: + default: [] + items: + type: string + type: array + required: + - clientAppId + - stateFullClassName + - txIndexes + type: object + ClearMonitorTransactionsV1Response: + additionalProperties: false + example: + msg: msg + success: true + properties: + success: + description: Flag set to true if operation completed correctly. + nullable: false + type: boolean + msg: + description: Message describing operation status or any errors that occurred. + nullable: false + type: string + required: + - msg + - success + type: object + StopMonitorV1Request: + additionalProperties: false + example: + stateFullClassName: net.corda.samples.example.states.IOUState + clientAppId: frond_v1_x_7Hdg6s + properties: + clientAppId: + description: ID of a client application that wants to monitor the state + changes + example: frond_v1_x_7Hdg6s + maxLength: 1024 + minLength: 1 + nullable: false + type: string + stateFullClassName: + description: The fully qualified name of the Corda state to monitor + example: net.corda.samples.example.states.IOUState + maxLength: 1024 + minLength: 1 + nullable: false + type: string + required: + - clientAppId + - stateFullClassName + type: object + StopMonitorV1Response: + example: + msg: msg + success: true + properties: + success: + description: Flag set to true if operation completed correctly. + nullable: false + type: boolean + msg: + description: Message describing operation status or any errors that occurred. + nullable: false + type: string + required: + - msg + - success + type: object + ListFlowsV1Request: + additionalProperties: false + example: + filter: filter + properties: + filter: + type: string + type: object + ListFlowsV1Response: + example: + flowNames: + - net.corda.finance.flows.CashExitFlow + - net.corda.finance.flows.CashIssueAndPaymentFlow + - net.corda.finance.flows.CashIssueFlow + - net.corda.finance.flows.CashPaymentFlow + - net.corda.finance.internal.CashConfigDataFlow + - net.corda.samples.obligation.flows.IOUIssueFlow + - net.corda.samples.obligation.flows.IOUSettleFlow + - net.corda.samples.obligation.flows.IOUTransferFlow + - net.corda.samples.obligation.flows.SelfIssueCashFlow + properties: + flowNames: + default: [] + description: An array of strings storing the names of the flows as returned + by the flowList Corda RPC. + example: + - net.corda.finance.flows.CashExitFlow + - net.corda.finance.flows.CashIssueAndPaymentFlow + - net.corda.finance.flows.CashIssueFlow + - net.corda.finance.flows.CashPaymentFlow + - net.corda.finance.internal.CashConfigDataFlow + - net.corda.samples.obligation.flows.IOUIssueFlow + - net.corda.samples.obligation.flows.IOUSettleFlow + - net.corda.samples.obligation.flows.IOUTransferFlow + - net.corda.samples.obligation.flows.SelfIssueCashFlow + items: + maxItems: 10000000 + minItems: 0 + type: string + type: array + required: + - flowNames + type: object + NetworkHostAndPort: + example: + port: 0.8008281904610115 + host: host + properties: + host: + type: string + port: + type: number + required: + - host + - port + type: object + PartyAndCertificate: + type: object + PublicKey: + description: An instance of a java.security.PublicKey (which is an interface) + implementation such as org.hyperledger.cactus.plugin.ledger.connector.corda.server.impl.PublicKeyImpl + example: + format: X.509 + algorithm: EdDSA + encoded: MCowBQYDK2VwAyEAac1p4wLsAh70VJOcudQppu7NnKxyoKxVN0DbfTxF+54= + properties: + algorithm: + example: EdDSA + type: string + format: + example: X.509 + type: string + encoded: + example: MCowBQYDK2VwAyEAac1p4wLsAh70VJOcudQppu7NnKxyoKxVN0DbfTxF+54= + type: string + required: + - algorithm + - encoded + - format + type: object + X500Principal: + example: + name: "O=PartyA,L=London,C=GB" + encoded: MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ== + properties: + name: + example: "O=PartyA,L=London,C=GB" + type: string + encoded: + description: Base64 encoded public key + example: MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ== + type: string + required: + - encoded + - name + type: object + CordaX500Name: + example: + commonName: commonName + country: GB + organisationUnit: organisationUnit + locality: London + x500Principal: + name: "O=PartyA,L=London,C=GB" + encoded: MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ== + organisation: PartyA + state: state + properties: + commonName: + type: string + organisationUnit: + type: string + organisation: + example: PartyA + type: string + locality: + example: London + type: string + state: + type: string + country: + example: GB + type: string + x500Principal: + $ref: '#/components/schemas/X500Principal' + required: + - country + - locality + - organisation + - x500Principal + type: object + Party: + example: + owningKey: + format: X.509 + algorithm: EdDSA + encoded: MCowBQYDK2VwAyEAac1p4wLsAh70VJOcudQppu7NnKxyoKxVN0DbfTxF+54= + name: + commonName: commonName + country: GB + organisationUnit: organisationUnit + locality: London + x500Principal: + name: "O=PartyA,L=London,C=GB" + encoded: MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ== + organisation: PartyA + state: state + properties: + name: + $ref: '#/components/schemas/CordaX500Name' + owningKey: + $ref: '#/components/schemas/PublicKey' + required: + - name + - owningKey + type: object + NodeInfo: + example: + legalIdentities: + - owningKey: + format: X.509 + algorithm: EdDSA + encoded: MCowBQYDK2VwAyEAac1p4wLsAh70VJOcudQppu7NnKxyoKxVN0DbfTxF+54= + name: + commonName: commonName + country: GB + organisationUnit: organisationUnit + locality: London + x500Principal: + name: "O=PartyA,L=London,C=GB" + encoded: MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ== + organisation: PartyA + state: state + - owningKey: + format: X.509 + algorithm: EdDSA + encoded: MCowBQYDK2VwAyEAac1p4wLsAh70VJOcudQppu7NnKxyoKxVN0DbfTxF+54= + name: + commonName: commonName + country: GB + organisationUnit: organisationUnit + locality: London + x500Principal: + name: "O=PartyA,L=London,C=GB" + encoded: MC8xCzAJBgNVBAYTAkdCMQ8wDQYDVQQHDAZMb25kb24xDzANBgNVBAoMBlBhcnR5QQ== + organisation: PartyA + state: state + addresses: + - port: 0.8008281904610115 + host: host + - port: 0.8008281904610115 + host: host + serial: 1.4658129805029452 + platformVersion: 6 + legalIdentitiesAndCerts: + - null + - null + properties: + addresses: + items: + $ref: '#/components/schemas/NetworkHostAndPort' + type: array + platformVersion: + type: integer + serial: + type: number + legalIdentities: + items: + $ref: '#/components/schemas/Party' + type: array + legalIdentitiesAndCerts: + items: + $ref: '#/components/schemas/PartyAndCertificate' + type: array + required: + - addresses + - legalIdentities + - legalIdentitiesAndCerts + - platformVersion + - serial + type: object + NetworkMapV1Request: + type: object + NetworkMapV1Response: + items: + $ref: '#/components/schemas/NodeInfo' + maxItems: 2048 + minItems: 1 + nullable: false + type: array + DiagnoseNodeV1Request: + additionalProperties: false + example: + nodeIds: + - nodeIds + - nodeIds + - nodeIds + - nodeIds + - nodeIds + properties: + nodeIds: + default: [] + description: "Optional property specifying which Corda Node should be the\ + \ one being diagnosed in case the Connector has multiple connections established\ + \ for different nodes (which is not yet a supported feature, but we want\ + \ to keep this possibility open for the future)." + items: + nullable: false + type: string + maxItems: 1024 + minItems: 0 + type: array + type: object + DiagnoseNodeV1Response: + example: + nodeDiagnosticInfo: + vendor: vendor + platformVersion: 1 + version: version + cordapps: + - licence: licence + targetPlatformVersion: 6 + vendor: vendor + name: name + jarHash: + offset: 0 + size: 32 + bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= + shortName: shortName + type: type + version: version + minimumPlatformVersion: 0 + - licence: licence + targetPlatformVersion: 6 + vendor: vendor + name: name + jarHash: + offset: 0 + size: 32 + bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= + shortName: shortName + type: type + version: version + minimumPlatformVersion: 0 + - licence: licence + targetPlatformVersion: 6 + vendor: vendor + name: name + jarHash: + offset: 0 + size: 32 + bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= + shortName: shortName + type: type + version: version + minimumPlatformVersion: 0 + - licence: licence + targetPlatformVersion: 6 + vendor: vendor + name: name + jarHash: + offset: 0 + size: 32 + bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= + shortName: shortName + type: type + version: version + minimumPlatformVersion: 0 + - licence: licence + targetPlatformVersion: 6 + vendor: vendor + name: name + jarHash: + offset: 0 + size: 32 + bytes: Vf9MllnrC7vrWxrlDE94OzPMZW7At1HhTETL/XjiAmc= + shortName: shortName + type: type + version: version + minimumPlatformVersion: 0 + revision: revision + properties: + nodeDiagnosticInfo: + $ref: '#/components/schemas/NodeDiagnosticInfo' + required: + - nodeDiagnosticInfo + type: object + PrometheusExporterMetricsResponse: + nullable: false + type: string + CPIV5Response: + example: + cpis: + - cpiFileFullChecksum: string + cpiFileChecksum: string + cpks: + - libraries: + - string + - string + id: + signerSummaryHash: string + name: string + version: string + mainBundle: string + type: string + hash: string + timestamp: 2022-06-24T10:15:30Z + - libraries: + - string + - string + id: + signerSummaryHash: string + name: string + version: string + mainBundle: string + type: string + hash: string + timestamp: 2022-06-24T10:15:30Z + groupPolicy: string + id: + signerSummaryHash: string + name: string + version: string + timestamp: 2022-06-24T10:15:30Z + - cpiFileFullChecksum: string + cpiFileChecksum: string + cpks: + - libraries: + - string + - string + id: + signerSummaryHash: string + name: string + version: string + mainBundle: string + type: string + hash: string + timestamp: 2022-06-24T10:15:30Z + - libraries: + - string + - string + id: + signerSummaryHash: string + name: string + version: string + mainBundle: string + type: string + hash: string + timestamp: 2022-06-24T10:15:30Z + groupPolicy: string + id: + signerSummaryHash: string + name: string + version: string + timestamp: 2022-06-24T10:15:30Z + properties: + cpis: + items: + $ref: '#/components/schemas/CPIV5Response_cpis_inner' + type: array + required: + - hash + - id + - libraries + - mainBundle + - timestamp + - type + type: object + StartFlowV5Request: + description: This method starts a new instance for the specified flow for the + specified holding identity. + example: + requestBody: + numberOfRecords: numberOfRecords + otherMember: otherMember + chatName: chatName + message: message + clientRequestId: clientRequestId + flowClassName: flowClassName + properties: + clientRequestId: + nullable: false + type: string + flowClassName: + nullable: false + type: string + requestBody: + $ref: '#/components/schemas/StartFlowV5Request_requestBody' + required: + - clientRequestId + - flowClassName + - requestBody + type: object + FlowStatusV5Response: + example: + holdingIDShortHash: string + flowError: + message: string + type: string + clientRequestId: string + flowResult: string + flowStatus: string + flowId: string + timestamp: 2022-06-24T10:15:30Z + properties: + clientRequestId: + example: string + nullable: true + type: string + flowError: + $ref: '#/components/schemas/FlowV5Error' + flowId: + example: string + nullable: true + type: string + flowResult: + example: string + nullable: true + type: string + flowStatus: + example: string + nullable: false + type: string + holdingIDShortHash: + example: string + nullable: false + type: string + timestamp: + example: 2022-06-24T10:15:30Z + format: date-time + nullable: false + type: string + required: + - flowStatus + - holdingIDShortHash + - timestamp + type: object + FlowStatusV5Responses: + properties: + flowStatusResponses: + items: + $ref: '#/components/schemas/FlowStatusV5Responses_flowStatusResponses_inner' + type: array + required: + - flowStatus + - holdingIDShortHash + - timestamp + type: object + CPIIDV5: + example: + signerSummaryHash: string + name: string + version: string + properties: + name: + example: string + nullable: false + type: string + signerSummaryHash: + example: string + nullable: true + type: string + version: + example: string + nullable: false + type: string + required: + - name + - version + type: object + FlowV5Error: + example: + message: string + type: string + properties: + message: + example: string + nullable: false + type: string + type: + example: string + nullable: false + type: string + required: + - message + - type + type: object + GetMonitorTransactionsV1Response_tx_inner: + example: + data: data + index: index + properties: + index: + type: string + data: + maxItems: 10000000 + minItems: 0 + type: string + type: object + CPIV5Response_cpis_inner_cpks_inner: + example: + libraries: + - string + - string + id: + signerSummaryHash: string + name: string + version: string + mainBundle: string + type: string + hash: string + timestamp: 2022-06-24T10:15:30Z + properties: + hash: + example: string + nullable: false + type: string + id: + $ref: '#/components/schemas/CPIIDV5' + libraries: + items: + example: string + nullable: false + type: string + type: array + mainBundle: + example: string + nullable: false + type: string + timestamp: + example: 2022-06-24T10:15:30Z + format: date-time + nullable: false + type: string + type: + example: string + nullable: false + type: string + type: object + CPIV5Response_cpis_inner: + example: + cpiFileFullChecksum: string + cpiFileChecksum: string + cpks: + - libraries: + - string + - string + id: + signerSummaryHash: string + name: string + version: string + mainBundle: string + type: string + hash: string + timestamp: 2022-06-24T10:15:30Z + - libraries: + - string + - string + id: + signerSummaryHash: string + name: string + version: string + mainBundle: string + type: string + hash: string + timestamp: 2022-06-24T10:15:30Z + groupPolicy: string + id: + signerSummaryHash: string + name: string + version: string + timestamp: 2022-06-24T10:15:30Z + properties: + cpiFileChecksum: + example: string + nullable: false + type: string + cpiFileFullChecksum: + example: string + nullable: false + type: string + cpks: + items: + $ref: '#/components/schemas/CPIV5Response_cpis_inner_cpks_inner' + type: array + groupPolicy: + example: string + nullable: true + type: string + id: + $ref: '#/components/schemas/CPIIDV5' + timestamp: + example: 2022-06-24T10:15:30Z + format: date-time + nullable: false + type: string + type: object + StartFlowV5Request_requestBody: + example: + numberOfRecords: numberOfRecords + otherMember: otherMember + chatName: chatName + message: message + properties: + chatName: + type: string + otherMember: + type: string + message: + type: string + numberOfRecords: + type: string + type: object + FlowStatusV5Responses_flowStatusResponses_inner: + properties: + clientRequestId: + example: string + nullable: true + type: string + flowError: + $ref: '#/components/schemas/FlowV5Error' + flowId: + example: string + nullable: true + type: string + flowResult: + example: string + nullable: true + type: string + flowStatus: + example: string + nullable: false + type: string + holdingIDShortHash: + example: string + nullable: false + type: string + timestamp: + example: 2022-06-24T10:15:30Z + format: date-time + nullable: false + type: string + type: object diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/.openapi-generator/FILES index 92ac54f527..cc8cc54d82 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/.openapi-generator/FILES +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/.openapi-generator/FILES @@ -13,12 +13,18 @@ model_corda_rpc_credentials.go model_corda_x500_name.go model_cordapp_deployment_config.go model_cordapp_info.go +model_cpiidv1.go model_deploy_contract_jars_bad_request_v1_response.go model_deploy_contract_jars_success_v1_response.go model_deploy_contract_jars_v1_request.go model_diagnose_node_v1_request.go model_diagnose_node_v1_response.go model_flow_invocation_type.go +model_flow_status_v1_responses.go +model_flow_status_v1_responses_flow_status_responses_inner.go +model_flow_v1_error.go +model_get_flow_cid_v1_request.go +model_get_flow_cid_v1_response.go model_get_monitor_transactions_v1_request.go model_get_monitor_transactions_v1_response.go model_get_monitor_transactions_v1_response_tx_inner.go @@ -28,6 +34,10 @@ model_jar_file.go model_jvm_object.go model_jvm_type.go model_jvm_type_kind.go +model_list_cpi_v1_request.go +model_list_cpi_v1_response.go +model_list_cpi_v1_response_cpis_inner.go +model_list_cpi_v1_response_cpis_inner_cpks_inner.go model_list_flows_v1_request.go model_list_flows_v1_response.go model_network_host_and_port.go @@ -36,6 +46,9 @@ model_node_info.go model_party.go model_public_key.go model_sha256.go +model_start_flow_v1_request.go +model_start_flow_v1_request_request_body.go +model_start_flow_v1_response.go model_start_monitor_v1_request.go model_start_monitor_v1_response.go model_stop_monitor_v1_request.go diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/README.md b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/README.md index 1feade332b..0706d3e0e9 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/README.md +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/README.md @@ -80,11 +80,15 @@ Class | Method | HTTP request | Description *DefaultApi* | [**ClearMonitorTransactionsV1**](docs/DefaultApi.md#clearmonitortransactionsv1) | **Delete** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions | Clear transactions from internal store so they'll not be available by GetMonitorTransactionsV1 anymore. *DefaultApi* | [**DeployContractJarsV1**](docs/DefaultApi.md#deploycontractjarsv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars | Deploys a set of jar files (Cordapps, e.g. the contracts in Corda speak). *DefaultApi* | [**DiagnoseNodeV1**](docs/DefaultApi.md#diagnosenodev1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node | +*DefaultApi* | [**GetFlowV1**](docs/DefaultApi.md#getflowv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid | This method gets the current status of the specified flow instance. *DefaultApi* | [**GetMonitorTransactionsV1**](docs/DefaultApi.md#getmonitortransactionsv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions | Get transactions for monitored state classes. *DefaultApi* | [**GetPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics | Get the Prometheus Metrics *DefaultApi* | [**InvokeContractV1**](docs/DefaultApi.md#invokecontractv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract | Invokes a contract on a Corda ledger (e.g. a flow) +*DefaultApi* | [**ListCpiV1**](docs/DefaultApi.md#listcpiv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi | List all CPIs uploaded to the cluster +*DefaultApi* | [**ListFlowV1**](docs/DefaultApi.md#listflowv1) | **Get** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow | This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. *DefaultApi* | [**ListFlowsV1**](docs/DefaultApi.md#listflowsv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows | *DefaultApi* | [**NetworkMapV1**](docs/DefaultApi.md#networkmapv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map | +*DefaultApi* | [**StartFlowV1**](docs/DefaultApi.md#startflowv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow | This method starts a new instance for the specified flow for the specified holding identity. *DefaultApi* | [**StartMonitorV1**](docs/DefaultApi.md#startmonitorv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor | Start monitoring corda changes (transactions) of given state class *DefaultApi* | [**StopMonitorV1**](docs/DefaultApi.md#stopmonitorv1) | **Delete** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor | Stop monitoring corda changes (transactions) of given state class *DefaultApi* | [**VaultQueryV1**](docs/DefaultApi.md#vaultqueryv1) | **Post** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/vault-query | @@ -92,6 +96,7 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [CPIIDV1](docs/CPIIDV1.md) - [ClearMonitorTransactionsV1Request](docs/ClearMonitorTransactionsV1Request.md) - [ClearMonitorTransactionsV1Response](docs/ClearMonitorTransactionsV1Response.md) - [CordaNodeSshCredentials](docs/CordaNodeSshCredentials.md) @@ -105,6 +110,11 @@ Class | Method | HTTP request | Description - [DiagnoseNodeV1Request](docs/DiagnoseNodeV1Request.md) - [DiagnoseNodeV1Response](docs/DiagnoseNodeV1Response.md) - [FlowInvocationType](docs/FlowInvocationType.md) + - [FlowStatusV1Responses](docs/FlowStatusV1Responses.md) + - [FlowStatusV1ResponsesFlowStatusResponsesInner](docs/FlowStatusV1ResponsesFlowStatusResponsesInner.md) + - [FlowV1Error](docs/FlowV1Error.md) + - [GetFlowCidV1Request](docs/GetFlowCidV1Request.md) + - [GetFlowCidV1Response](docs/GetFlowCidV1Response.md) - [GetMonitorTransactionsV1Request](docs/GetMonitorTransactionsV1Request.md) - [GetMonitorTransactionsV1Response](docs/GetMonitorTransactionsV1Response.md) - [GetMonitorTransactionsV1ResponseTxInner](docs/GetMonitorTransactionsV1ResponseTxInner.md) @@ -114,6 +124,10 @@ Class | Method | HTTP request | Description - [JvmObject](docs/JvmObject.md) - [JvmType](docs/JvmType.md) - [JvmTypeKind](docs/JvmTypeKind.md) + - [ListCpiV1Request](docs/ListCpiV1Request.md) + - [ListCpiV1Response](docs/ListCpiV1Response.md) + - [ListCpiV1ResponseCpisInner](docs/ListCpiV1ResponseCpisInner.md) + - [ListCpiV1ResponseCpisInnerCpksInner](docs/ListCpiV1ResponseCpisInnerCpksInner.md) - [ListFlowsV1Request](docs/ListFlowsV1Request.md) - [ListFlowsV1Response](docs/ListFlowsV1Response.md) - [NetworkHostAndPort](docs/NetworkHostAndPort.md) @@ -122,6 +136,9 @@ Class | Method | HTTP request | Description - [Party](docs/Party.md) - [PublicKey](docs/PublicKey.md) - [SHA256](docs/SHA256.md) + - [StartFlowV1Request](docs/StartFlowV1Request.md) + - [StartFlowV1RequestRequestBody](docs/StartFlowV1RequestRequestBody.md) + - [StartFlowV1Response](docs/StartFlowV1Response.md) - [StartMonitorV1Request](docs/StartMonitorV1Request.md) - [StartMonitorV1Response](docs/StartMonitorV1Response.md) - [StopMonitorV1Request](docs/StopMonitorV1Request.md) diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/api/openapi.yaml b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/api/openapi.yaml index 87197e2355..d6698f19df 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/api/openapi.yaml +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/api/openapi.yaml @@ -246,6 +246,107 @@ paths: http: verbLowerCase: get path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics + /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi: + get: + operationId: listCpiV1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ListCpiV1Request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ListCpiV1Response' + description: OK + summary: List all CPIs uploaded to the cluster + x-hyperledger-cactus: + https: + verbLowerCase: get + path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi + /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow: + get: + operationId: listFlowV1 + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetFlowCidV1Request' + description: This method gets the current status of the specified flow instance. + required: true + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/FlowStatusV1Responses' + description: OK + "401": + description: Unauthorized + "403": + description: Forbidden + summary: This method returns an array containing the statuses of all flows running + for a specified holding identity. An empty array is returned if there are + no flows running. + x-hyperledger-cactus: + http: + verbLowerCase: get + path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow + /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid: + get: + operationId: getFlowV1 + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetFlowCidV1Request' + description: This method gets the current status of the specified flow instance. + required: true + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/GetFlowCidV1Response' + description: OK + "401": + description: Unauthorized + "403": + description: Forbidden + summary: This method gets the current status of the specified flow instance. + x-hyperledger-cactus: + http: + verbLowerCase: get + path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid + /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow: + post: + operationId: startFlowV1 + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StartFlowV1Request' + description: Request body for starting a flow + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/StartFlowV1Response' + description: OK + summary: This method starts a new instance for the specified flow for the specified + holding identity. + x-hyperledger-cactus: + http: + verbLowerCase: post + path: /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow components: schemas: SHA256: @@ -1404,6 +1505,303 @@ components: type: object VaultQueryV1Response: type: object + ListCpiV1Response: + example: + cpis: + - cpiFileFullChecksum: string + cpiFileChecksum: string + cpks: + - libraries: + - string + - string + id: + signerSummaryHash: string + name: string + version: string + mainBundle: string + type: string + hash: string + timestamp: 2022-06-24T10:15:30Z + - libraries: + - string + - string + id: + signerSummaryHash: string + name: string + version: string + mainBundle: string + type: string + hash: string + timestamp: 2022-06-24T10:15:30Z + groupPolicy: string + id: + signerSummaryHash: string + name: string + version: string + timestamp: 2022-06-24T10:15:30Z + - cpiFileFullChecksum: string + cpiFileChecksum: string + cpks: + - libraries: + - string + - string + id: + signerSummaryHash: string + name: string + version: string + mainBundle: string + type: string + hash: string + timestamp: 2022-06-24T10:15:30Z + - libraries: + - string + - string + id: + signerSummaryHash: string + name: string + version: string + mainBundle: string + type: string + hash: string + timestamp: 2022-06-24T10:15:30Z + groupPolicy: string + id: + signerSummaryHash: string + name: string + version: string + timestamp: 2022-06-24T10:15:30Z + properties: + cpis: + items: + $ref: '#/components/schemas/ListCpiV1Response_cpis_inner' + type: array + required: + - hash + - id + - libraries + - mainBundle + - timestamp + - type + type: object + ListCpiV1Request: + example: + rejectUnauthorized: true + password: password + username: username + properties: + username: + nullable: false + type: string + password: + nullable: false + type: string + rejectUnauthorized: + nullable: false + type: boolean + required: + - password + - rejectUnauthorized + - username + StartFlowV1Request: + description: This method starts a new instance for the specified flow for the + specified holding identity. + example: + rejectUnauthorized: true + holdingIDShortHash: holdingIDShortHash + password: password + requestBody: + numberOfRecords: numberOfRecords + otherMember: otherMember + chatName: chatName + message: message + clientRequestId: clientRequestId + flowClassName: flowClassName + username: username + properties: + username: + nullable: false + type: string + password: + nullable: false + type: string + rejectUnauthorized: + nullable: false + type: boolean + holdingIDShortHash: + nullable: false + type: string + clientRequestId: + nullable: false + type: string + flowClassName: + nullable: false + type: string + requestBody: + $ref: '#/components/schemas/StartFlowV1Request_requestBody' + required: + - clientRequestId + - flowClassName + - password + - rejectUnauthorized + - requestBody + - username + type: object + GetFlowCidV1Request: + description: This method gets the current status of the specified flow instance. + example: + rejectUnauthorized: true + holdingIDShortHash: holdingIDShortHash + password: password + clientRequestId: clientRequestId + username: username + properties: + username: + nullable: false + type: string + password: + nullable: false + type: string + rejectUnauthorized: + nullable: false + type: boolean + holdingIDShortHash: + nullable: false + type: string + clientRequestId: + nullable: false + type: string + required: + - password + - rejectUnauthorized + - username + GetFlowCidV1Response: + properties: + clientRequestId: + example: string + nullable: true + type: string + flowError: + $ref: '#/components/schemas/FlowV1Error' + flowId: + example: string + nullable: true + type: string + flowResult: + example: string + nullable: true + type: string + flowStatus: + example: string + nullable: false + type: string + holdingIDShortHash: + example: string + nullable: false + type: string + timestamp: + example: 2022-06-24T10:15:30Z + format: date-time + nullable: false + type: string + required: + - flowStatus + - holdingIDShortHash + - timestamp + type: object + FlowStatusV1Responses: + properties: + flowStatusResponses: + items: + $ref: '#/components/schemas/FlowStatusV1Responses_flowStatusResponses_inner' + type: array + required: + - flowStatus + - holdingIDShortHash + - timestamp + type: object + StartFlowV1Response: + example: + holdingIDShortHash: string + flowError: + message: string + type: string + clientRequestId: string + flowResult: string + flowStatus: string + flowId: string + timestamp: 2022-06-24T10:15:30Z + properties: + clientRequestId: + example: string + nullable: true + type: string + flowError: + $ref: '#/components/schemas/FlowV1Error' + flowId: + example: string + nullable: true + type: string + flowResult: + example: string + nullable: true + type: string + flowStatus: + example: string + nullable: false + type: string + holdingIDShortHash: + example: string + nullable: false + type: string + timestamp: + example: 2022-06-24T10:15:30Z + format: date-time + nullable: false + type: string + required: + - flowStatus + - holdingIDShortHash + - timestamp + type: object + CPIIDV1: + example: + signerSummaryHash: string + name: string + version: string + properties: + name: + example: string + nullable: false + type: string + signerSummaryHash: + example: string + nullable: true + type: string + version: + example: string + nullable: false + type: string + required: + - name + - version + type: object + FlowV1Error: + example: + message: string + type: string + properties: + message: + example: string + nullable: false + type: string + type: + example: string + nullable: false + type: string + required: + - message + - type + type: object GetMonitorTransactionsV1Response_tx_inner: example: data: data @@ -1416,3 +1814,147 @@ components: minItems: 0 type: string type: object + ListCpiV1Response_cpis_inner_cpks_inner: + example: + libraries: + - string + - string + id: + signerSummaryHash: string + name: string + version: string + mainBundle: string + type: string + hash: string + timestamp: 2022-06-24T10:15:30Z + properties: + hash: + example: string + nullable: false + type: string + id: + $ref: '#/components/schemas/CPIIDV1' + libraries: + items: + example: string + nullable: false + type: string + type: array + mainBundle: + example: string + nullable: false + type: string + timestamp: + example: 2022-06-24T10:15:30Z + format: date-time + nullable: false + type: string + type: + example: string + nullable: false + type: string + type: object + ListCpiV1Response_cpis_inner: + example: + cpiFileFullChecksum: string + cpiFileChecksum: string + cpks: + - libraries: + - string + - string + id: + signerSummaryHash: string + name: string + version: string + mainBundle: string + type: string + hash: string + timestamp: 2022-06-24T10:15:30Z + - libraries: + - string + - string + id: + signerSummaryHash: string + name: string + version: string + mainBundle: string + type: string + hash: string + timestamp: 2022-06-24T10:15:30Z + groupPolicy: string + id: + signerSummaryHash: string + name: string + version: string + timestamp: 2022-06-24T10:15:30Z + properties: + cpiFileChecksum: + example: string + nullable: false + type: string + cpiFileFullChecksum: + example: string + nullable: false + type: string + cpks: + items: + $ref: '#/components/schemas/ListCpiV1Response_cpis_inner_cpks_inner' + type: array + groupPolicy: + example: string + nullable: true + type: string + id: + $ref: '#/components/schemas/CPIIDV1' + timestamp: + example: 2022-06-24T10:15:30Z + format: date-time + nullable: false + type: string + type: object + StartFlowV1Request_requestBody: + example: + numberOfRecords: numberOfRecords + otherMember: otherMember + chatName: chatName + message: message + properties: + chatName: + type: string + otherMember: + type: string + message: + type: string + numberOfRecords: + type: string + type: object + FlowStatusV1Responses_flowStatusResponses_inner: + properties: + clientRequestId: + example: string + nullable: true + type: string + flowError: + $ref: '#/components/schemas/FlowV1Error' + flowId: + example: string + nullable: true + type: string + flowResult: + example: string + nullable: true + type: string + flowStatus: + example: string + nullable: false + type: string + holdingIDShortHash: + example: string + nullable: false + type: string + timestamp: + example: 2022-06-24T10:15:30Z + format: date-time + nullable: false + type: string + type: object diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/api_default.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/api_default.go index 294ce6fcaf..7a76db5938 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/api_default.go +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/api_default.go @@ -349,6 +349,115 @@ func (a *DefaultApiService) DiagnoseNodeV1Execute(r ApiDiagnoseNodeV1Request) (* return localVarReturnValue, localVarHTTPResponse, nil } +type ApiGetFlowV1Request struct { + ctx context.Context + ApiService *DefaultApiService + getFlowCidV1Request *GetFlowCidV1Request +} + +// This method gets the current status of the specified flow instance. +func (r ApiGetFlowV1Request) GetFlowCidV1Request(getFlowCidV1Request GetFlowCidV1Request) ApiGetFlowV1Request { + r.getFlowCidV1Request = &getFlowCidV1Request + return r +} + +func (r ApiGetFlowV1Request) Execute() (*GetFlowCidV1Response, *http.Response, error) { + return r.ApiService.GetFlowV1Execute(r) +} + +/* +GetFlowV1 This method gets the current status of the specified flow instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetFlowV1Request +*/ +func (a *DefaultApiService) GetFlowV1(ctx context.Context) ApiGetFlowV1Request { + return ApiGetFlowV1Request{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetFlowCidV1Response +func (a *DefaultApiService) GetFlowV1Execute(r ApiGetFlowV1Request) (*GetFlowCidV1Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetFlowCidV1Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetFlowV1") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.getFlowCidV1Request == nil { + return localVarReturnValue, nil, reportError("getFlowCidV1Request is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.getFlowCidV1Request + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiGetMonitorTransactionsV1Request struct { ctx context.Context ApiService *DefaultApiService @@ -656,6 +765,223 @@ func (a *DefaultApiService) InvokeContractV1Execute(r ApiInvokeContractV1Request return localVarReturnValue, localVarHTTPResponse, nil } +type ApiListCpiV1Request struct { + ctx context.Context + ApiService *DefaultApiService + listCpiV1Request *ListCpiV1Request +} + +func (r ApiListCpiV1Request) ListCpiV1Request(listCpiV1Request ListCpiV1Request) ApiListCpiV1Request { + r.listCpiV1Request = &listCpiV1Request + return r +} + +func (r ApiListCpiV1Request) Execute() (*ListCpiV1Response, *http.Response, error) { + return r.ApiService.ListCpiV1Execute(r) +} + +/* +ListCpiV1 List all CPIs uploaded to the cluster + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListCpiV1Request +*/ +func (a *DefaultApiService) ListCpiV1(ctx context.Context) ApiListCpiV1Request { + return ApiListCpiV1Request{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListCpiV1Response +func (a *DefaultApiService) ListCpiV1Execute(r ApiListCpiV1Request) (*ListCpiV1Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListCpiV1Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListCpiV1") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.listCpiV1Request == nil { + return localVarReturnValue, nil, reportError("listCpiV1Request is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.listCpiV1Request + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListFlowV1Request struct { + ctx context.Context + ApiService *DefaultApiService + getFlowCidV1Request *GetFlowCidV1Request +} + +// This method gets the current status of the specified flow instance. +func (r ApiListFlowV1Request) GetFlowCidV1Request(getFlowCidV1Request GetFlowCidV1Request) ApiListFlowV1Request { + r.getFlowCidV1Request = &getFlowCidV1Request + return r +} + +func (r ApiListFlowV1Request) Execute() (*FlowStatusV1Responses, *http.Response, error) { + return r.ApiService.ListFlowV1Execute(r) +} + +/* +ListFlowV1 This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListFlowV1Request +*/ +func (a *DefaultApiService) ListFlowV1(ctx context.Context) ApiListFlowV1Request { + return ApiListFlowV1Request{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return FlowStatusV1Responses +func (a *DefaultApiService) ListFlowV1Execute(r ApiListFlowV1Request) (*FlowStatusV1Responses, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FlowStatusV1Responses + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListFlowV1") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.getFlowCidV1Request == nil { + return localVarReturnValue, nil, reportError("getFlowCidV1Request is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.getFlowCidV1Request + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiListFlowsV1Request struct { ctx context.Context ApiService *DefaultApiService @@ -870,6 +1196,115 @@ func (a *DefaultApiService) NetworkMapV1Execute(r ApiNetworkMapV1Request) ([]Nod return localVarReturnValue, localVarHTTPResponse, nil } +type ApiStartFlowV1Request struct { + ctx context.Context + ApiService *DefaultApiService + startFlowV1Request *StartFlowV1Request +} + +// Request body for starting a flow +func (r ApiStartFlowV1Request) StartFlowV1Request(startFlowV1Request StartFlowV1Request) ApiStartFlowV1Request { + r.startFlowV1Request = &startFlowV1Request + return r +} + +func (r ApiStartFlowV1Request) Execute() (*StartFlowV1Response, *http.Response, error) { + return r.ApiService.StartFlowV1Execute(r) +} + +/* +StartFlowV1 This method starts a new instance for the specified flow for the specified holding identity. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiStartFlowV1Request +*/ +func (a *DefaultApiService) StartFlowV1(ctx context.Context) ApiStartFlowV1Request { + return ApiStartFlowV1Request{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return StartFlowV1Response +func (a *DefaultApiService) StartFlowV1Execute(r ApiStartFlowV1Request) (*StartFlowV1Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *StartFlowV1Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.StartFlowV1") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.startFlowV1Request == nil { + return localVarReturnValue, nil, reportError("startFlowV1Request is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.startFlowV1Request + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiStartMonitorV1Request struct { ctx context.Context ApiService *DefaultApiService diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_cpiidv1.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_cpiidv1.go new file mode 100644 index 0000000000..77d8c60ab9 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_cpiidv1.go @@ -0,0 +1,190 @@ +/* +Hyperledger Cacti Plugin - Connector Corda + +Can perform basic tasks on a Corda ledger + +API version: 2.0.0-rc.3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cactus-plugin-ledger-connector-corda + +import ( + "encoding/json" +) + +// checks if the CPIIDV1 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CPIIDV1{} + +// CPIIDV1 struct for CPIIDV1 +type CPIIDV1 struct { + Name string `json:"name"` + SignerSummaryHash NullableString `json:"signerSummaryHash,omitempty"` + Version string `json:"version"` +} + +// NewCPIIDV1 instantiates a new CPIIDV1 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCPIIDV1(name string, version string) *CPIIDV1 { + this := CPIIDV1{} + this.Name = name + this.Version = version + return &this +} + +// NewCPIIDV1WithDefaults instantiates a new CPIIDV1 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCPIIDV1WithDefaults() *CPIIDV1 { + this := CPIIDV1{} + return &this +} + +// GetName returns the Name field value +func (o *CPIIDV1) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CPIIDV1) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CPIIDV1) SetName(v string) { + o.Name = v +} + +// GetSignerSummaryHash returns the SignerSummaryHash field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CPIIDV1) GetSignerSummaryHash() string { + if o == nil || IsNil(o.SignerSummaryHash.Get()) { + var ret string + return ret + } + return *o.SignerSummaryHash.Get() +} + +// GetSignerSummaryHashOk returns a tuple with the SignerSummaryHash field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CPIIDV1) GetSignerSummaryHashOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.SignerSummaryHash.Get(), o.SignerSummaryHash.IsSet() +} + +// HasSignerSummaryHash returns a boolean if a field has been set. +func (o *CPIIDV1) HasSignerSummaryHash() bool { + if o != nil && o.SignerSummaryHash.IsSet() { + return true + } + + return false +} + +// SetSignerSummaryHash gets a reference to the given NullableString and assigns it to the SignerSummaryHash field. +func (o *CPIIDV1) SetSignerSummaryHash(v string) { + o.SignerSummaryHash.Set(&v) +} +// SetSignerSummaryHashNil sets the value for SignerSummaryHash to be an explicit nil +func (o *CPIIDV1) SetSignerSummaryHashNil() { + o.SignerSummaryHash.Set(nil) +} + +// UnsetSignerSummaryHash ensures that no value is present for SignerSummaryHash, not even an explicit nil +func (o *CPIIDV1) UnsetSignerSummaryHash() { + o.SignerSummaryHash.Unset() +} + +// GetVersion returns the Version field value +func (o *CPIIDV1) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *CPIIDV1) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *CPIIDV1) SetVersion(v string) { + o.Version = v +} + +func (o CPIIDV1) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CPIIDV1) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if o.SignerSummaryHash.IsSet() { + toSerialize["signerSummaryHash"] = o.SignerSummaryHash.Get() + } + toSerialize["version"] = o.Version + return toSerialize, nil +} + +type NullableCPIIDV1 struct { + value *CPIIDV1 + isSet bool +} + +func (v NullableCPIIDV1) Get() *CPIIDV1 { + return v.value +} + +func (v *NullableCPIIDV1) Set(val *CPIIDV1) { + v.value = val + v.isSet = true +} + +func (v NullableCPIIDV1) IsSet() bool { + return v.isSet +} + +func (v *NullableCPIIDV1) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCPIIDV1(val *CPIIDV1) *NullableCPIIDV1 { + return &NullableCPIIDV1{value: val, isSet: true} +} + +func (v NullableCPIIDV1) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCPIIDV1) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_status_v1_responses.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_status_v1_responses.go new file mode 100644 index 0000000000..a0a1484e19 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_status_v1_responses.go @@ -0,0 +1,126 @@ +/* +Hyperledger Cacti Plugin - Connector Corda + +Can perform basic tasks on a Corda ledger + +API version: 2.0.0-rc.3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cactus-plugin-ledger-connector-corda + +import ( + "encoding/json" +) + +// checks if the FlowStatusV1Responses type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FlowStatusV1Responses{} + +// FlowStatusV1Responses struct for FlowStatusV1Responses +type FlowStatusV1Responses struct { + FlowStatusResponses []FlowStatusV1ResponsesFlowStatusResponsesInner `json:"flowStatusResponses,omitempty"` +} + +// NewFlowStatusV1Responses instantiates a new FlowStatusV1Responses object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFlowStatusV1Responses() *FlowStatusV1Responses { + this := FlowStatusV1Responses{} + return &this +} + +// NewFlowStatusV1ResponsesWithDefaults instantiates a new FlowStatusV1Responses object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFlowStatusV1ResponsesWithDefaults() *FlowStatusV1Responses { + this := FlowStatusV1Responses{} + return &this +} + +// GetFlowStatusResponses returns the FlowStatusResponses field value if set, zero value otherwise. +func (o *FlowStatusV1Responses) GetFlowStatusResponses() []FlowStatusV1ResponsesFlowStatusResponsesInner { + if o == nil || IsNil(o.FlowStatusResponses) { + var ret []FlowStatusV1ResponsesFlowStatusResponsesInner + return ret + } + return o.FlowStatusResponses +} + +// GetFlowStatusResponsesOk returns a tuple with the FlowStatusResponses field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlowStatusV1Responses) GetFlowStatusResponsesOk() ([]FlowStatusV1ResponsesFlowStatusResponsesInner, bool) { + if o == nil || IsNil(o.FlowStatusResponses) { + return nil, false + } + return o.FlowStatusResponses, true +} + +// HasFlowStatusResponses returns a boolean if a field has been set. +func (o *FlowStatusV1Responses) HasFlowStatusResponses() bool { + if o != nil && !IsNil(o.FlowStatusResponses) { + return true + } + + return false +} + +// SetFlowStatusResponses gets a reference to the given []FlowStatusV1ResponsesFlowStatusResponsesInner and assigns it to the FlowStatusResponses field. +func (o *FlowStatusV1Responses) SetFlowStatusResponses(v []FlowStatusV1ResponsesFlowStatusResponsesInner) { + o.FlowStatusResponses = v +} + +func (o FlowStatusV1Responses) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FlowStatusV1Responses) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.FlowStatusResponses) { + toSerialize["flowStatusResponses"] = o.FlowStatusResponses + } + return toSerialize, nil +} + +type NullableFlowStatusV1Responses struct { + value *FlowStatusV1Responses + isSet bool +} + +func (v NullableFlowStatusV1Responses) Get() *FlowStatusV1Responses { + return v.value +} + +func (v *NullableFlowStatusV1Responses) Set(val *FlowStatusV1Responses) { + v.value = val + v.isSet = true +} + +func (v NullableFlowStatusV1Responses) IsSet() bool { + return v.isSet +} + +func (v *NullableFlowStatusV1Responses) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFlowStatusV1Responses(val *FlowStatusV1Responses) *NullableFlowStatusV1Responses { + return &NullableFlowStatusV1Responses{value: val, isSet: true} +} + +func (v NullableFlowStatusV1Responses) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFlowStatusV1Responses) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_status_v1_responses_flow_status_responses_inner.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_status_v1_responses_flow_status_responses_inner.go new file mode 100644 index 0000000000..75ae90c7ef --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_status_v1_responses_flow_status_responses_inner.go @@ -0,0 +1,373 @@ +/* +Hyperledger Cacti Plugin - Connector Corda + +Can perform basic tasks on a Corda ledger + +API version: 2.0.0-rc.3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cactus-plugin-ledger-connector-corda + +import ( + "encoding/json" + "time" +) + +// checks if the FlowStatusV1ResponsesFlowStatusResponsesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FlowStatusV1ResponsesFlowStatusResponsesInner{} + +// FlowStatusV1ResponsesFlowStatusResponsesInner struct for FlowStatusV1ResponsesFlowStatusResponsesInner +type FlowStatusV1ResponsesFlowStatusResponsesInner struct { + ClientRequestId NullableString `json:"clientRequestId,omitempty"` + FlowError *FlowV1Error `json:"flowError,omitempty"` + FlowId NullableString `json:"flowId,omitempty"` + FlowResult NullableString `json:"flowResult,omitempty"` + FlowStatus *string `json:"flowStatus,omitempty"` + HoldingIDShortHash *string `json:"holdingIDShortHash,omitempty"` + Timestamp *time.Time `json:"timestamp,omitempty"` +} + +// NewFlowStatusV1ResponsesFlowStatusResponsesInner instantiates a new FlowStatusV1ResponsesFlowStatusResponsesInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFlowStatusV1ResponsesFlowStatusResponsesInner() *FlowStatusV1ResponsesFlowStatusResponsesInner { + this := FlowStatusV1ResponsesFlowStatusResponsesInner{} + return &this +} + +// NewFlowStatusV1ResponsesFlowStatusResponsesInnerWithDefaults instantiates a new FlowStatusV1ResponsesFlowStatusResponsesInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFlowStatusV1ResponsesFlowStatusResponsesInnerWithDefaults() *FlowStatusV1ResponsesFlowStatusResponsesInner { + this := FlowStatusV1ResponsesFlowStatusResponsesInner{} + return &this +} + +// GetClientRequestId returns the ClientRequestId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetClientRequestId() string { + if o == nil || IsNil(o.ClientRequestId.Get()) { + var ret string + return ret + } + return *o.ClientRequestId.Get() +} + +// GetClientRequestIdOk returns a tuple with the ClientRequestId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetClientRequestIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientRequestId.Get(), o.ClientRequestId.IsSet() +} + +// HasClientRequestId returns a boolean if a field has been set. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) HasClientRequestId() bool { + if o != nil && o.ClientRequestId.IsSet() { + return true + } + + return false +} + +// SetClientRequestId gets a reference to the given NullableString and assigns it to the ClientRequestId field. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetClientRequestId(v string) { + o.ClientRequestId.Set(&v) +} +// SetClientRequestIdNil sets the value for ClientRequestId to be an explicit nil +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetClientRequestIdNil() { + o.ClientRequestId.Set(nil) +} + +// UnsetClientRequestId ensures that no value is present for ClientRequestId, not even an explicit nil +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) UnsetClientRequestId() { + o.ClientRequestId.Unset() +} + +// GetFlowError returns the FlowError field value if set, zero value otherwise. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetFlowError() FlowV1Error { + if o == nil || IsNil(o.FlowError) { + var ret FlowV1Error + return ret + } + return *o.FlowError +} + +// GetFlowErrorOk returns a tuple with the FlowError field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetFlowErrorOk() (*FlowV1Error, bool) { + if o == nil || IsNil(o.FlowError) { + return nil, false + } + return o.FlowError, true +} + +// HasFlowError returns a boolean if a field has been set. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) HasFlowError() bool { + if o != nil && !IsNil(o.FlowError) { + return true + } + + return false +} + +// SetFlowError gets a reference to the given FlowV1Error and assigns it to the FlowError field. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetFlowError(v FlowV1Error) { + o.FlowError = &v +} + +// GetFlowId returns the FlowId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetFlowId() string { + if o == nil || IsNil(o.FlowId.Get()) { + var ret string + return ret + } + return *o.FlowId.Get() +} + +// GetFlowIdOk returns a tuple with the FlowId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetFlowIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.FlowId.Get(), o.FlowId.IsSet() +} + +// HasFlowId returns a boolean if a field has been set. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) HasFlowId() bool { + if o != nil && o.FlowId.IsSet() { + return true + } + + return false +} + +// SetFlowId gets a reference to the given NullableString and assigns it to the FlowId field. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetFlowId(v string) { + o.FlowId.Set(&v) +} +// SetFlowIdNil sets the value for FlowId to be an explicit nil +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetFlowIdNil() { + o.FlowId.Set(nil) +} + +// UnsetFlowId ensures that no value is present for FlowId, not even an explicit nil +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) UnsetFlowId() { + o.FlowId.Unset() +} + +// GetFlowResult returns the FlowResult field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetFlowResult() string { + if o == nil || IsNil(o.FlowResult.Get()) { + var ret string + return ret + } + return *o.FlowResult.Get() +} + +// GetFlowResultOk returns a tuple with the FlowResult field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetFlowResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.FlowResult.Get(), o.FlowResult.IsSet() +} + +// HasFlowResult returns a boolean if a field has been set. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) HasFlowResult() bool { + if o != nil && o.FlowResult.IsSet() { + return true + } + + return false +} + +// SetFlowResult gets a reference to the given NullableString and assigns it to the FlowResult field. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetFlowResult(v string) { + o.FlowResult.Set(&v) +} +// SetFlowResultNil sets the value for FlowResult to be an explicit nil +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetFlowResultNil() { + o.FlowResult.Set(nil) +} + +// UnsetFlowResult ensures that no value is present for FlowResult, not even an explicit nil +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) UnsetFlowResult() { + o.FlowResult.Unset() +} + +// GetFlowStatus returns the FlowStatus field value if set, zero value otherwise. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetFlowStatus() string { + if o == nil || IsNil(o.FlowStatus) { + var ret string + return ret + } + return *o.FlowStatus +} + +// GetFlowStatusOk returns a tuple with the FlowStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetFlowStatusOk() (*string, bool) { + if o == nil || IsNil(o.FlowStatus) { + return nil, false + } + return o.FlowStatus, true +} + +// HasFlowStatus returns a boolean if a field has been set. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) HasFlowStatus() bool { + if o != nil && !IsNil(o.FlowStatus) { + return true + } + + return false +} + +// SetFlowStatus gets a reference to the given string and assigns it to the FlowStatus field. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetFlowStatus(v string) { + o.FlowStatus = &v +} + +// GetHoldingIDShortHash returns the HoldingIDShortHash field value if set, zero value otherwise. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetHoldingIDShortHash() string { + if o == nil || IsNil(o.HoldingIDShortHash) { + var ret string + return ret + } + return *o.HoldingIDShortHash +} + +// GetHoldingIDShortHashOk returns a tuple with the HoldingIDShortHash field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetHoldingIDShortHashOk() (*string, bool) { + if o == nil || IsNil(o.HoldingIDShortHash) { + return nil, false + } + return o.HoldingIDShortHash, true +} + +// HasHoldingIDShortHash returns a boolean if a field has been set. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) HasHoldingIDShortHash() bool { + if o != nil && !IsNil(o.HoldingIDShortHash) { + return true + } + + return false +} + +// SetHoldingIDShortHash gets a reference to the given string and assigns it to the HoldingIDShortHash field. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetHoldingIDShortHash(v string) { + o.HoldingIDShortHash = &v +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetTimestamp() time.Time { + if o == nil || IsNil(o.Timestamp) { + var ret time.Time + return ret + } + return *o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) GetTimestampOk() (*time.Time, bool) { + if o == nil || IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) HasTimestamp() bool { + if o != nil && !IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given time.Time and assigns it to the Timestamp field. +func (o *FlowStatusV1ResponsesFlowStatusResponsesInner) SetTimestamp(v time.Time) { + o.Timestamp = &v +} + +func (o FlowStatusV1ResponsesFlowStatusResponsesInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FlowStatusV1ResponsesFlowStatusResponsesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ClientRequestId.IsSet() { + toSerialize["clientRequestId"] = o.ClientRequestId.Get() + } + if !IsNil(o.FlowError) { + toSerialize["flowError"] = o.FlowError + } + if o.FlowId.IsSet() { + toSerialize["flowId"] = o.FlowId.Get() + } + if o.FlowResult.IsSet() { + toSerialize["flowResult"] = o.FlowResult.Get() + } + if !IsNil(o.FlowStatus) { + toSerialize["flowStatus"] = o.FlowStatus + } + if !IsNil(o.HoldingIDShortHash) { + toSerialize["holdingIDShortHash"] = o.HoldingIDShortHash + } + if !IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + return toSerialize, nil +} + +type NullableFlowStatusV1ResponsesFlowStatusResponsesInner struct { + value *FlowStatusV1ResponsesFlowStatusResponsesInner + isSet bool +} + +func (v NullableFlowStatusV1ResponsesFlowStatusResponsesInner) Get() *FlowStatusV1ResponsesFlowStatusResponsesInner { + return v.value +} + +func (v *NullableFlowStatusV1ResponsesFlowStatusResponsesInner) Set(val *FlowStatusV1ResponsesFlowStatusResponsesInner) { + v.value = val + v.isSet = true +} + +func (v NullableFlowStatusV1ResponsesFlowStatusResponsesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableFlowStatusV1ResponsesFlowStatusResponsesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFlowStatusV1ResponsesFlowStatusResponsesInner(val *FlowStatusV1ResponsesFlowStatusResponsesInner) *NullableFlowStatusV1ResponsesFlowStatusResponsesInner { + return &NullableFlowStatusV1ResponsesFlowStatusResponsesInner{value: val, isSet: true} +} + +func (v NullableFlowStatusV1ResponsesFlowStatusResponsesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFlowStatusV1ResponsesFlowStatusResponsesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_v1_error.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_v1_error.go new file mode 100644 index 0000000000..9f1db32c3a --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_flow_v1_error.go @@ -0,0 +1,144 @@ +/* +Hyperledger Cacti Plugin - Connector Corda + +Can perform basic tasks on a Corda ledger + +API version: 2.0.0-rc.3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cactus-plugin-ledger-connector-corda + +import ( + "encoding/json" +) + +// checks if the FlowV1Error type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FlowV1Error{} + +// FlowV1Error struct for FlowV1Error +type FlowV1Error struct { + Message string `json:"message"` + Type string `json:"type"` +} + +// NewFlowV1Error instantiates a new FlowV1Error object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFlowV1Error(message string, type_ string) *FlowV1Error { + this := FlowV1Error{} + this.Message = message + this.Type = type_ + return &this +} + +// NewFlowV1ErrorWithDefaults instantiates a new FlowV1Error object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFlowV1ErrorWithDefaults() *FlowV1Error { + this := FlowV1Error{} + return &this +} + +// GetMessage returns the Message field value +func (o *FlowV1Error) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *FlowV1Error) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *FlowV1Error) SetMessage(v string) { + o.Message = v +} + +// GetType returns the Type field value +func (o *FlowV1Error) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *FlowV1Error) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *FlowV1Error) SetType(v string) { + o.Type = v +} + +func (o FlowV1Error) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FlowV1Error) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableFlowV1Error struct { + value *FlowV1Error + isSet bool +} + +func (v NullableFlowV1Error) Get() *FlowV1Error { + return v.value +} + +func (v *NullableFlowV1Error) Set(val *FlowV1Error) { + v.value = val + v.isSet = true +} + +func (v NullableFlowV1Error) IsSet() bool { + return v.isSet +} + +func (v *NullableFlowV1Error) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFlowV1Error(val *FlowV1Error) *NullableFlowV1Error { + return &NullableFlowV1Error{value: val, isSet: true} +} + +func (v NullableFlowV1Error) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFlowV1Error) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_flow_cid_v1_request.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_flow_cid_v1_request.go new file mode 100644 index 0000000000..5d49803df5 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_flow_cid_v1_request.go @@ -0,0 +1,243 @@ +/* +Hyperledger Cacti Plugin - Connector Corda + +Can perform basic tasks on a Corda ledger + +API version: 2.0.0-rc.3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cactus-plugin-ledger-connector-corda + +import ( + "encoding/json" +) + +// checks if the GetFlowCidV1Request type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetFlowCidV1Request{} + +// GetFlowCidV1Request This method gets the current status of the specified flow instance. +type GetFlowCidV1Request struct { + Username string `json:"username"` + Password string `json:"password"` + RejectUnauthorized bool `json:"rejectUnauthorized"` + HoldingIDShortHash *string `json:"holdingIDShortHash,omitempty"` + ClientRequestId *string `json:"clientRequestId,omitempty"` +} + +// NewGetFlowCidV1Request instantiates a new GetFlowCidV1Request object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetFlowCidV1Request(username string, password string, rejectUnauthorized bool) *GetFlowCidV1Request { + this := GetFlowCidV1Request{} + this.Username = username + this.Password = password + this.RejectUnauthorized = rejectUnauthorized + return &this +} + +// NewGetFlowCidV1RequestWithDefaults instantiates a new GetFlowCidV1Request object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetFlowCidV1RequestWithDefaults() *GetFlowCidV1Request { + this := GetFlowCidV1Request{} + return &this +} + +// GetUsername returns the Username field value +func (o *GetFlowCidV1Request) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *GetFlowCidV1Request) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *GetFlowCidV1Request) SetUsername(v string) { + o.Username = v +} + +// GetPassword returns the Password field value +func (o *GetFlowCidV1Request) GetPassword() string { + if o == nil { + var ret string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *GetFlowCidV1Request) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + +// SetPassword sets field value +func (o *GetFlowCidV1Request) SetPassword(v string) { + o.Password = v +} + +// GetRejectUnauthorized returns the RejectUnauthorized field value +func (o *GetFlowCidV1Request) GetRejectUnauthorized() bool { + if o == nil { + var ret bool + return ret + } + + return o.RejectUnauthorized +} + +// GetRejectUnauthorizedOk returns a tuple with the RejectUnauthorized field value +// and a boolean to check if the value has been set. +func (o *GetFlowCidV1Request) GetRejectUnauthorizedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.RejectUnauthorized, true +} + +// SetRejectUnauthorized sets field value +func (o *GetFlowCidV1Request) SetRejectUnauthorized(v bool) { + o.RejectUnauthorized = v +} + +// GetHoldingIDShortHash returns the HoldingIDShortHash field value if set, zero value otherwise. +func (o *GetFlowCidV1Request) GetHoldingIDShortHash() string { + if o == nil || IsNil(o.HoldingIDShortHash) { + var ret string + return ret + } + return *o.HoldingIDShortHash +} + +// GetHoldingIDShortHashOk returns a tuple with the HoldingIDShortHash field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetFlowCidV1Request) GetHoldingIDShortHashOk() (*string, bool) { + if o == nil || IsNil(o.HoldingIDShortHash) { + return nil, false + } + return o.HoldingIDShortHash, true +} + +// HasHoldingIDShortHash returns a boolean if a field has been set. +func (o *GetFlowCidV1Request) HasHoldingIDShortHash() bool { + if o != nil && !IsNil(o.HoldingIDShortHash) { + return true + } + + return false +} + +// SetHoldingIDShortHash gets a reference to the given string and assigns it to the HoldingIDShortHash field. +func (o *GetFlowCidV1Request) SetHoldingIDShortHash(v string) { + o.HoldingIDShortHash = &v +} + +// GetClientRequestId returns the ClientRequestId field value if set, zero value otherwise. +func (o *GetFlowCidV1Request) GetClientRequestId() string { + if o == nil || IsNil(o.ClientRequestId) { + var ret string + return ret + } + return *o.ClientRequestId +} + +// GetClientRequestIdOk returns a tuple with the ClientRequestId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetFlowCidV1Request) GetClientRequestIdOk() (*string, bool) { + if o == nil || IsNil(o.ClientRequestId) { + return nil, false + } + return o.ClientRequestId, true +} + +// HasClientRequestId returns a boolean if a field has been set. +func (o *GetFlowCidV1Request) HasClientRequestId() bool { + if o != nil && !IsNil(o.ClientRequestId) { + return true + } + + return false +} + +// SetClientRequestId gets a reference to the given string and assigns it to the ClientRequestId field. +func (o *GetFlowCidV1Request) SetClientRequestId(v string) { + o.ClientRequestId = &v +} + +func (o GetFlowCidV1Request) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetFlowCidV1Request) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["username"] = o.Username + toSerialize["password"] = o.Password + toSerialize["rejectUnauthorized"] = o.RejectUnauthorized + if !IsNil(o.HoldingIDShortHash) { + toSerialize["holdingIDShortHash"] = o.HoldingIDShortHash + } + if !IsNil(o.ClientRequestId) { + toSerialize["clientRequestId"] = o.ClientRequestId + } + return toSerialize, nil +} + +type NullableGetFlowCidV1Request struct { + value *GetFlowCidV1Request + isSet bool +} + +func (v NullableGetFlowCidV1Request) Get() *GetFlowCidV1Request { + return v.value +} + +func (v *NullableGetFlowCidV1Request) Set(val *GetFlowCidV1Request) { + v.value = val + v.isSet = true +} + +func (v NullableGetFlowCidV1Request) IsSet() bool { + return v.isSet +} + +func (v *NullableGetFlowCidV1Request) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetFlowCidV1Request(val *GetFlowCidV1Request) *NullableGetFlowCidV1Request { + return &NullableGetFlowCidV1Request{value: val, isSet: true} +} + +func (v NullableGetFlowCidV1Request) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetFlowCidV1Request) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_flow_cid_v1_response.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_flow_cid_v1_response.go new file mode 100644 index 0000000000..552da85a01 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_get_flow_cid_v1_response.go @@ -0,0 +1,346 @@ +/* +Hyperledger Cacti Plugin - Connector Corda + +Can perform basic tasks on a Corda ledger + +API version: 2.0.0-rc.3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cactus-plugin-ledger-connector-corda + +import ( + "encoding/json" + "time" +) + +// checks if the GetFlowCidV1Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetFlowCidV1Response{} + +// GetFlowCidV1Response struct for GetFlowCidV1Response +type GetFlowCidV1Response struct { + ClientRequestId NullableString `json:"clientRequestId,omitempty"` + FlowError *FlowV1Error `json:"flowError,omitempty"` + FlowId NullableString `json:"flowId,omitempty"` + FlowResult NullableString `json:"flowResult,omitempty"` + FlowStatus string `json:"flowStatus"` + HoldingIDShortHash string `json:"holdingIDShortHash"` + Timestamp time.Time `json:"timestamp"` +} + +// NewGetFlowCidV1Response instantiates a new GetFlowCidV1Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetFlowCidV1Response(flowStatus string, holdingIDShortHash string, timestamp time.Time) *GetFlowCidV1Response { + this := GetFlowCidV1Response{} + this.FlowStatus = flowStatus + this.HoldingIDShortHash = holdingIDShortHash + this.Timestamp = timestamp + return &this +} + +// NewGetFlowCidV1ResponseWithDefaults instantiates a new GetFlowCidV1Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetFlowCidV1ResponseWithDefaults() *GetFlowCidV1Response { + this := GetFlowCidV1Response{} + return &this +} + +// GetClientRequestId returns the ClientRequestId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GetFlowCidV1Response) GetClientRequestId() string { + if o == nil || IsNil(o.ClientRequestId.Get()) { + var ret string + return ret + } + return *o.ClientRequestId.Get() +} + +// GetClientRequestIdOk returns a tuple with the ClientRequestId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GetFlowCidV1Response) GetClientRequestIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientRequestId.Get(), o.ClientRequestId.IsSet() +} + +// HasClientRequestId returns a boolean if a field has been set. +func (o *GetFlowCidV1Response) HasClientRequestId() bool { + if o != nil && o.ClientRequestId.IsSet() { + return true + } + + return false +} + +// SetClientRequestId gets a reference to the given NullableString and assigns it to the ClientRequestId field. +func (o *GetFlowCidV1Response) SetClientRequestId(v string) { + o.ClientRequestId.Set(&v) +} +// SetClientRequestIdNil sets the value for ClientRequestId to be an explicit nil +func (o *GetFlowCidV1Response) SetClientRequestIdNil() { + o.ClientRequestId.Set(nil) +} + +// UnsetClientRequestId ensures that no value is present for ClientRequestId, not even an explicit nil +func (o *GetFlowCidV1Response) UnsetClientRequestId() { + o.ClientRequestId.Unset() +} + +// GetFlowError returns the FlowError field value if set, zero value otherwise. +func (o *GetFlowCidV1Response) GetFlowError() FlowV1Error { + if o == nil || IsNil(o.FlowError) { + var ret FlowV1Error + return ret + } + return *o.FlowError +} + +// GetFlowErrorOk returns a tuple with the FlowError field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetFlowCidV1Response) GetFlowErrorOk() (*FlowV1Error, bool) { + if o == nil || IsNil(o.FlowError) { + return nil, false + } + return o.FlowError, true +} + +// HasFlowError returns a boolean if a field has been set. +func (o *GetFlowCidV1Response) HasFlowError() bool { + if o != nil && !IsNil(o.FlowError) { + return true + } + + return false +} + +// SetFlowError gets a reference to the given FlowV1Error and assigns it to the FlowError field. +func (o *GetFlowCidV1Response) SetFlowError(v FlowV1Error) { + o.FlowError = &v +} + +// GetFlowId returns the FlowId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GetFlowCidV1Response) GetFlowId() string { + if o == nil || IsNil(o.FlowId.Get()) { + var ret string + return ret + } + return *o.FlowId.Get() +} + +// GetFlowIdOk returns a tuple with the FlowId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GetFlowCidV1Response) GetFlowIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.FlowId.Get(), o.FlowId.IsSet() +} + +// HasFlowId returns a boolean if a field has been set. +func (o *GetFlowCidV1Response) HasFlowId() bool { + if o != nil && o.FlowId.IsSet() { + return true + } + + return false +} + +// SetFlowId gets a reference to the given NullableString and assigns it to the FlowId field. +func (o *GetFlowCidV1Response) SetFlowId(v string) { + o.FlowId.Set(&v) +} +// SetFlowIdNil sets the value for FlowId to be an explicit nil +func (o *GetFlowCidV1Response) SetFlowIdNil() { + o.FlowId.Set(nil) +} + +// UnsetFlowId ensures that no value is present for FlowId, not even an explicit nil +func (o *GetFlowCidV1Response) UnsetFlowId() { + o.FlowId.Unset() +} + +// GetFlowResult returns the FlowResult field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GetFlowCidV1Response) GetFlowResult() string { + if o == nil || IsNil(o.FlowResult.Get()) { + var ret string + return ret + } + return *o.FlowResult.Get() +} + +// GetFlowResultOk returns a tuple with the FlowResult field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GetFlowCidV1Response) GetFlowResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.FlowResult.Get(), o.FlowResult.IsSet() +} + +// HasFlowResult returns a boolean if a field has been set. +func (o *GetFlowCidV1Response) HasFlowResult() bool { + if o != nil && o.FlowResult.IsSet() { + return true + } + + return false +} + +// SetFlowResult gets a reference to the given NullableString and assigns it to the FlowResult field. +func (o *GetFlowCidV1Response) SetFlowResult(v string) { + o.FlowResult.Set(&v) +} +// SetFlowResultNil sets the value for FlowResult to be an explicit nil +func (o *GetFlowCidV1Response) SetFlowResultNil() { + o.FlowResult.Set(nil) +} + +// UnsetFlowResult ensures that no value is present for FlowResult, not even an explicit nil +func (o *GetFlowCidV1Response) UnsetFlowResult() { + o.FlowResult.Unset() +} + +// GetFlowStatus returns the FlowStatus field value +func (o *GetFlowCidV1Response) GetFlowStatus() string { + if o == nil { + var ret string + return ret + } + + return o.FlowStatus +} + +// GetFlowStatusOk returns a tuple with the FlowStatus field value +// and a boolean to check if the value has been set. +func (o *GetFlowCidV1Response) GetFlowStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FlowStatus, true +} + +// SetFlowStatus sets field value +func (o *GetFlowCidV1Response) SetFlowStatus(v string) { + o.FlowStatus = v +} + +// GetHoldingIDShortHash returns the HoldingIDShortHash field value +func (o *GetFlowCidV1Response) GetHoldingIDShortHash() string { + if o == nil { + var ret string + return ret + } + + return o.HoldingIDShortHash +} + +// GetHoldingIDShortHashOk returns a tuple with the HoldingIDShortHash field value +// and a boolean to check if the value has been set. +func (o *GetFlowCidV1Response) GetHoldingIDShortHashOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.HoldingIDShortHash, true +} + +// SetHoldingIDShortHash sets field value +func (o *GetFlowCidV1Response) SetHoldingIDShortHash(v string) { + o.HoldingIDShortHash = v +} + +// GetTimestamp returns the Timestamp field value +func (o *GetFlowCidV1Response) GetTimestamp() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value +// and a boolean to check if the value has been set. +func (o *GetFlowCidV1Response) GetTimestampOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Timestamp, true +} + +// SetTimestamp sets field value +func (o *GetFlowCidV1Response) SetTimestamp(v time.Time) { + o.Timestamp = v +} + +func (o GetFlowCidV1Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetFlowCidV1Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ClientRequestId.IsSet() { + toSerialize["clientRequestId"] = o.ClientRequestId.Get() + } + if !IsNil(o.FlowError) { + toSerialize["flowError"] = o.FlowError + } + if o.FlowId.IsSet() { + toSerialize["flowId"] = o.FlowId.Get() + } + if o.FlowResult.IsSet() { + toSerialize["flowResult"] = o.FlowResult.Get() + } + toSerialize["flowStatus"] = o.FlowStatus + toSerialize["holdingIDShortHash"] = o.HoldingIDShortHash + toSerialize["timestamp"] = o.Timestamp + return toSerialize, nil +} + +type NullableGetFlowCidV1Response struct { + value *GetFlowCidV1Response + isSet bool +} + +func (v NullableGetFlowCidV1Response) Get() *GetFlowCidV1Response { + return v.value +} + +func (v *NullableGetFlowCidV1Response) Set(val *GetFlowCidV1Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetFlowCidV1Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetFlowCidV1Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetFlowCidV1Response(val *GetFlowCidV1Response) *NullableGetFlowCidV1Response { + return &NullableGetFlowCidV1Response{value: val, isSet: true} +} + +func (v NullableGetFlowCidV1Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetFlowCidV1Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_request.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_request.go new file mode 100644 index 0000000000..1dab68d9bf --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_request.go @@ -0,0 +1,171 @@ +/* +Hyperledger Cacti Plugin - Connector Corda + +Can perform basic tasks on a Corda ledger + +API version: 2.0.0-rc.3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cactus-plugin-ledger-connector-corda + +import ( + "encoding/json" +) + +// checks if the ListCpiV1Request type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCpiV1Request{} + +// ListCpiV1Request struct for ListCpiV1Request +type ListCpiV1Request struct { + Username string `json:"username"` + Password string `json:"password"` + RejectUnauthorized bool `json:"rejectUnauthorized"` +} + +// NewListCpiV1Request instantiates a new ListCpiV1Request object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListCpiV1Request(username string, password string, rejectUnauthorized bool) *ListCpiV1Request { + this := ListCpiV1Request{} + this.Username = username + this.Password = password + this.RejectUnauthorized = rejectUnauthorized + return &this +} + +// NewListCpiV1RequestWithDefaults instantiates a new ListCpiV1Request object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListCpiV1RequestWithDefaults() *ListCpiV1Request { + this := ListCpiV1Request{} + return &this +} + +// GetUsername returns the Username field value +func (o *ListCpiV1Request) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *ListCpiV1Request) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *ListCpiV1Request) SetUsername(v string) { + o.Username = v +} + +// GetPassword returns the Password field value +func (o *ListCpiV1Request) GetPassword() string { + if o == nil { + var ret string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *ListCpiV1Request) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + +// SetPassword sets field value +func (o *ListCpiV1Request) SetPassword(v string) { + o.Password = v +} + +// GetRejectUnauthorized returns the RejectUnauthorized field value +func (o *ListCpiV1Request) GetRejectUnauthorized() bool { + if o == nil { + var ret bool + return ret + } + + return o.RejectUnauthorized +} + +// GetRejectUnauthorizedOk returns a tuple with the RejectUnauthorized field value +// and a boolean to check if the value has been set. +func (o *ListCpiV1Request) GetRejectUnauthorizedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.RejectUnauthorized, true +} + +// SetRejectUnauthorized sets field value +func (o *ListCpiV1Request) SetRejectUnauthorized(v bool) { + o.RejectUnauthorized = v +} + +func (o ListCpiV1Request) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListCpiV1Request) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["username"] = o.Username + toSerialize["password"] = o.Password + toSerialize["rejectUnauthorized"] = o.RejectUnauthorized + return toSerialize, nil +} + +type NullableListCpiV1Request struct { + value *ListCpiV1Request + isSet bool +} + +func (v NullableListCpiV1Request) Get() *ListCpiV1Request { + return v.value +} + +func (v *NullableListCpiV1Request) Set(val *ListCpiV1Request) { + v.value = val + v.isSet = true +} + +func (v NullableListCpiV1Request) IsSet() bool { + return v.isSet +} + +func (v *NullableListCpiV1Request) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListCpiV1Request(val *ListCpiV1Request) *NullableListCpiV1Request { + return &NullableListCpiV1Request{value: val, isSet: true} +} + +func (v NullableListCpiV1Request) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListCpiV1Request) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_response.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_response.go new file mode 100644 index 0000000000..71279c4ed6 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_response.go @@ -0,0 +1,126 @@ +/* +Hyperledger Cacti Plugin - Connector Corda + +Can perform basic tasks on a Corda ledger + +API version: 2.0.0-rc.3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cactus-plugin-ledger-connector-corda + +import ( + "encoding/json" +) + +// checks if the ListCpiV1Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCpiV1Response{} + +// ListCpiV1Response struct for ListCpiV1Response +type ListCpiV1Response struct { + Cpis []ListCpiV1ResponseCpisInner `json:"cpis,omitempty"` +} + +// NewListCpiV1Response instantiates a new ListCpiV1Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListCpiV1Response() *ListCpiV1Response { + this := ListCpiV1Response{} + return &this +} + +// NewListCpiV1ResponseWithDefaults instantiates a new ListCpiV1Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListCpiV1ResponseWithDefaults() *ListCpiV1Response { + this := ListCpiV1Response{} + return &this +} + +// GetCpis returns the Cpis field value if set, zero value otherwise. +func (o *ListCpiV1Response) GetCpis() []ListCpiV1ResponseCpisInner { + if o == nil || IsNil(o.Cpis) { + var ret []ListCpiV1ResponseCpisInner + return ret + } + return o.Cpis +} + +// GetCpisOk returns a tuple with the Cpis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCpiV1Response) GetCpisOk() ([]ListCpiV1ResponseCpisInner, bool) { + if o == nil || IsNil(o.Cpis) { + return nil, false + } + return o.Cpis, true +} + +// HasCpis returns a boolean if a field has been set. +func (o *ListCpiV1Response) HasCpis() bool { + if o != nil && !IsNil(o.Cpis) { + return true + } + + return false +} + +// SetCpis gets a reference to the given []ListCpiV1ResponseCpisInner and assigns it to the Cpis field. +func (o *ListCpiV1Response) SetCpis(v []ListCpiV1ResponseCpisInner) { + o.Cpis = v +} + +func (o ListCpiV1Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListCpiV1Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Cpis) { + toSerialize["cpis"] = o.Cpis + } + return toSerialize, nil +} + +type NullableListCpiV1Response struct { + value *ListCpiV1Response + isSet bool +} + +func (v NullableListCpiV1Response) Get() *ListCpiV1Response { + return v.value +} + +func (v *NullableListCpiV1Response) Set(val *ListCpiV1Response) { + v.value = val + v.isSet = true +} + +func (v NullableListCpiV1Response) IsSet() bool { + return v.isSet +} + +func (v *NullableListCpiV1Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListCpiV1Response(val *ListCpiV1Response) *NullableListCpiV1Response { + return &NullableListCpiV1Response{value: val, isSet: true} +} + +func (v NullableListCpiV1Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListCpiV1Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_response_cpis_inner.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_response_cpis_inner.go new file mode 100644 index 0000000000..d7814a8130 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_response_cpis_inner.go @@ -0,0 +1,317 @@ +/* +Hyperledger Cacti Plugin - Connector Corda + +Can perform basic tasks on a Corda ledger + +API version: 2.0.0-rc.3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cactus-plugin-ledger-connector-corda + +import ( + "encoding/json" + "time" +) + +// checks if the ListCpiV1ResponseCpisInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCpiV1ResponseCpisInner{} + +// ListCpiV1ResponseCpisInner struct for ListCpiV1ResponseCpisInner +type ListCpiV1ResponseCpisInner struct { + CpiFileChecksum *string `json:"cpiFileChecksum,omitempty"` + CpiFileFullChecksum *string `json:"cpiFileFullChecksum,omitempty"` + Cpks []ListCpiV1ResponseCpisInnerCpksInner `json:"cpks,omitempty"` + GroupPolicy NullableString `json:"groupPolicy,omitempty"` + Id *CPIIDV1 `json:"id,omitempty"` + Timestamp *time.Time `json:"timestamp,omitempty"` +} + +// NewListCpiV1ResponseCpisInner instantiates a new ListCpiV1ResponseCpisInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListCpiV1ResponseCpisInner() *ListCpiV1ResponseCpisInner { + this := ListCpiV1ResponseCpisInner{} + return &this +} + +// NewListCpiV1ResponseCpisInnerWithDefaults instantiates a new ListCpiV1ResponseCpisInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListCpiV1ResponseCpisInnerWithDefaults() *ListCpiV1ResponseCpisInner { + this := ListCpiV1ResponseCpisInner{} + return &this +} + +// GetCpiFileChecksum returns the CpiFileChecksum field value if set, zero value otherwise. +func (o *ListCpiV1ResponseCpisInner) GetCpiFileChecksum() string { + if o == nil || IsNil(o.CpiFileChecksum) { + var ret string + return ret + } + return *o.CpiFileChecksum +} + +// GetCpiFileChecksumOk returns a tuple with the CpiFileChecksum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCpiV1ResponseCpisInner) GetCpiFileChecksumOk() (*string, bool) { + if o == nil || IsNil(o.CpiFileChecksum) { + return nil, false + } + return o.CpiFileChecksum, true +} + +// HasCpiFileChecksum returns a boolean if a field has been set. +func (o *ListCpiV1ResponseCpisInner) HasCpiFileChecksum() bool { + if o != nil && !IsNil(o.CpiFileChecksum) { + return true + } + + return false +} + +// SetCpiFileChecksum gets a reference to the given string and assigns it to the CpiFileChecksum field. +func (o *ListCpiV1ResponseCpisInner) SetCpiFileChecksum(v string) { + o.CpiFileChecksum = &v +} + +// GetCpiFileFullChecksum returns the CpiFileFullChecksum field value if set, zero value otherwise. +func (o *ListCpiV1ResponseCpisInner) GetCpiFileFullChecksum() string { + if o == nil || IsNil(o.CpiFileFullChecksum) { + var ret string + return ret + } + return *o.CpiFileFullChecksum +} + +// GetCpiFileFullChecksumOk returns a tuple with the CpiFileFullChecksum field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCpiV1ResponseCpisInner) GetCpiFileFullChecksumOk() (*string, bool) { + if o == nil || IsNil(o.CpiFileFullChecksum) { + return nil, false + } + return o.CpiFileFullChecksum, true +} + +// HasCpiFileFullChecksum returns a boolean if a field has been set. +func (o *ListCpiV1ResponseCpisInner) HasCpiFileFullChecksum() bool { + if o != nil && !IsNil(o.CpiFileFullChecksum) { + return true + } + + return false +} + +// SetCpiFileFullChecksum gets a reference to the given string and assigns it to the CpiFileFullChecksum field. +func (o *ListCpiV1ResponseCpisInner) SetCpiFileFullChecksum(v string) { + o.CpiFileFullChecksum = &v +} + +// GetCpks returns the Cpks field value if set, zero value otherwise. +func (o *ListCpiV1ResponseCpisInner) GetCpks() []ListCpiV1ResponseCpisInnerCpksInner { + if o == nil || IsNil(o.Cpks) { + var ret []ListCpiV1ResponseCpisInnerCpksInner + return ret + } + return o.Cpks +} + +// GetCpksOk returns a tuple with the Cpks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCpiV1ResponseCpisInner) GetCpksOk() ([]ListCpiV1ResponseCpisInnerCpksInner, bool) { + if o == nil || IsNil(o.Cpks) { + return nil, false + } + return o.Cpks, true +} + +// HasCpks returns a boolean if a field has been set. +func (o *ListCpiV1ResponseCpisInner) HasCpks() bool { + if o != nil && !IsNil(o.Cpks) { + return true + } + + return false +} + +// SetCpks gets a reference to the given []ListCpiV1ResponseCpisInnerCpksInner and assigns it to the Cpks field. +func (o *ListCpiV1ResponseCpisInner) SetCpks(v []ListCpiV1ResponseCpisInnerCpksInner) { + o.Cpks = v +} + +// GetGroupPolicy returns the GroupPolicy field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListCpiV1ResponseCpisInner) GetGroupPolicy() string { + if o == nil || IsNil(o.GroupPolicy.Get()) { + var ret string + return ret + } + return *o.GroupPolicy.Get() +} + +// GetGroupPolicyOk returns a tuple with the GroupPolicy field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ListCpiV1ResponseCpisInner) GetGroupPolicyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.GroupPolicy.Get(), o.GroupPolicy.IsSet() +} + +// HasGroupPolicy returns a boolean if a field has been set. +func (o *ListCpiV1ResponseCpisInner) HasGroupPolicy() bool { + if o != nil && o.GroupPolicy.IsSet() { + return true + } + + return false +} + +// SetGroupPolicy gets a reference to the given NullableString and assigns it to the GroupPolicy field. +func (o *ListCpiV1ResponseCpisInner) SetGroupPolicy(v string) { + o.GroupPolicy.Set(&v) +} +// SetGroupPolicyNil sets the value for GroupPolicy to be an explicit nil +func (o *ListCpiV1ResponseCpisInner) SetGroupPolicyNil() { + o.GroupPolicy.Set(nil) +} + +// UnsetGroupPolicy ensures that no value is present for GroupPolicy, not even an explicit nil +func (o *ListCpiV1ResponseCpisInner) UnsetGroupPolicy() { + o.GroupPolicy.Unset() +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ListCpiV1ResponseCpisInner) GetId() CPIIDV1 { + if o == nil || IsNil(o.Id) { + var ret CPIIDV1 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCpiV1ResponseCpisInner) GetIdOk() (*CPIIDV1, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ListCpiV1ResponseCpisInner) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given CPIIDV1 and assigns it to the Id field. +func (o *ListCpiV1ResponseCpisInner) SetId(v CPIIDV1) { + o.Id = &v +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *ListCpiV1ResponseCpisInner) GetTimestamp() time.Time { + if o == nil || IsNil(o.Timestamp) { + var ret time.Time + return ret + } + return *o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCpiV1ResponseCpisInner) GetTimestampOk() (*time.Time, bool) { + if o == nil || IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *ListCpiV1ResponseCpisInner) HasTimestamp() bool { + if o != nil && !IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given time.Time and assigns it to the Timestamp field. +func (o *ListCpiV1ResponseCpisInner) SetTimestamp(v time.Time) { + o.Timestamp = &v +} + +func (o ListCpiV1ResponseCpisInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListCpiV1ResponseCpisInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CpiFileChecksum) { + toSerialize["cpiFileChecksum"] = o.CpiFileChecksum + } + if !IsNil(o.CpiFileFullChecksum) { + toSerialize["cpiFileFullChecksum"] = o.CpiFileFullChecksum + } + if !IsNil(o.Cpks) { + toSerialize["cpks"] = o.Cpks + } + if o.GroupPolicy.IsSet() { + toSerialize["groupPolicy"] = o.GroupPolicy.Get() + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + return toSerialize, nil +} + +type NullableListCpiV1ResponseCpisInner struct { + value *ListCpiV1ResponseCpisInner + isSet bool +} + +func (v NullableListCpiV1ResponseCpisInner) Get() *ListCpiV1ResponseCpisInner { + return v.value +} + +func (v *NullableListCpiV1ResponseCpisInner) Set(val *ListCpiV1ResponseCpisInner) { + v.value = val + v.isSet = true +} + +func (v NullableListCpiV1ResponseCpisInner) IsSet() bool { + return v.isSet +} + +func (v *NullableListCpiV1ResponseCpisInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListCpiV1ResponseCpisInner(val *ListCpiV1ResponseCpisInner) *NullableListCpiV1ResponseCpisInner { + return &NullableListCpiV1ResponseCpisInner{value: val, isSet: true} +} + +func (v NullableListCpiV1ResponseCpisInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListCpiV1ResponseCpisInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_response_cpis_inner_cpks_inner.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_response_cpis_inner_cpks_inner.go new file mode 100644 index 0000000000..b91747fbce --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_list_cpi_v1_response_cpis_inner_cpks_inner.go @@ -0,0 +1,307 @@ +/* +Hyperledger Cacti Plugin - Connector Corda + +Can perform basic tasks on a Corda ledger + +API version: 2.0.0-rc.3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cactus-plugin-ledger-connector-corda + +import ( + "encoding/json" + "time" +) + +// checks if the ListCpiV1ResponseCpisInnerCpksInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCpiV1ResponseCpisInnerCpksInner{} + +// ListCpiV1ResponseCpisInnerCpksInner struct for ListCpiV1ResponseCpisInnerCpksInner +type ListCpiV1ResponseCpisInnerCpksInner struct { + Hash *string `json:"hash,omitempty"` + Id *CPIIDV1 `json:"id,omitempty"` + Libraries []string `json:"libraries,omitempty"` + MainBundle *string `json:"mainBundle,omitempty"` + Timestamp *time.Time `json:"timestamp,omitempty"` + Type *string `json:"type,omitempty"` +} + +// NewListCpiV1ResponseCpisInnerCpksInner instantiates a new ListCpiV1ResponseCpisInnerCpksInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListCpiV1ResponseCpisInnerCpksInner() *ListCpiV1ResponseCpisInnerCpksInner { + this := ListCpiV1ResponseCpisInnerCpksInner{} + return &this +} + +// NewListCpiV1ResponseCpisInnerCpksInnerWithDefaults instantiates a new ListCpiV1ResponseCpisInnerCpksInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListCpiV1ResponseCpisInnerCpksInnerWithDefaults() *ListCpiV1ResponseCpisInnerCpksInner { + this := ListCpiV1ResponseCpisInnerCpksInner{} + return &this +} + +// GetHash returns the Hash field value if set, zero value otherwise. +func (o *ListCpiV1ResponseCpisInnerCpksInner) GetHash() string { + if o == nil || IsNil(o.Hash) { + var ret string + return ret + } + return *o.Hash +} + +// GetHashOk returns a tuple with the Hash field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCpiV1ResponseCpisInnerCpksInner) GetHashOk() (*string, bool) { + if o == nil || IsNil(o.Hash) { + return nil, false + } + return o.Hash, true +} + +// HasHash returns a boolean if a field has been set. +func (o *ListCpiV1ResponseCpisInnerCpksInner) HasHash() bool { + if o != nil && !IsNil(o.Hash) { + return true + } + + return false +} + +// SetHash gets a reference to the given string and assigns it to the Hash field. +func (o *ListCpiV1ResponseCpisInnerCpksInner) SetHash(v string) { + o.Hash = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ListCpiV1ResponseCpisInnerCpksInner) GetId() CPIIDV1 { + if o == nil || IsNil(o.Id) { + var ret CPIIDV1 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCpiV1ResponseCpisInnerCpksInner) GetIdOk() (*CPIIDV1, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ListCpiV1ResponseCpisInnerCpksInner) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given CPIIDV1 and assigns it to the Id field. +func (o *ListCpiV1ResponseCpisInnerCpksInner) SetId(v CPIIDV1) { + o.Id = &v +} + +// GetLibraries returns the Libraries field value if set, zero value otherwise. +func (o *ListCpiV1ResponseCpisInnerCpksInner) GetLibraries() []string { + if o == nil || IsNil(o.Libraries) { + var ret []string + return ret + } + return o.Libraries +} + +// GetLibrariesOk returns a tuple with the Libraries field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCpiV1ResponseCpisInnerCpksInner) GetLibrariesOk() ([]string, bool) { + if o == nil || IsNil(o.Libraries) { + return nil, false + } + return o.Libraries, true +} + +// HasLibraries returns a boolean if a field has been set. +func (o *ListCpiV1ResponseCpisInnerCpksInner) HasLibraries() bool { + if o != nil && !IsNil(o.Libraries) { + return true + } + + return false +} + +// SetLibraries gets a reference to the given []string and assigns it to the Libraries field. +func (o *ListCpiV1ResponseCpisInnerCpksInner) SetLibraries(v []string) { + o.Libraries = v +} + +// GetMainBundle returns the MainBundle field value if set, zero value otherwise. +func (o *ListCpiV1ResponseCpisInnerCpksInner) GetMainBundle() string { + if o == nil || IsNil(o.MainBundle) { + var ret string + return ret + } + return *o.MainBundle +} + +// GetMainBundleOk returns a tuple with the MainBundle field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCpiV1ResponseCpisInnerCpksInner) GetMainBundleOk() (*string, bool) { + if o == nil || IsNil(o.MainBundle) { + return nil, false + } + return o.MainBundle, true +} + +// HasMainBundle returns a boolean if a field has been set. +func (o *ListCpiV1ResponseCpisInnerCpksInner) HasMainBundle() bool { + if o != nil && !IsNil(o.MainBundle) { + return true + } + + return false +} + +// SetMainBundle gets a reference to the given string and assigns it to the MainBundle field. +func (o *ListCpiV1ResponseCpisInnerCpksInner) SetMainBundle(v string) { + o.MainBundle = &v +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *ListCpiV1ResponseCpisInnerCpksInner) GetTimestamp() time.Time { + if o == nil || IsNil(o.Timestamp) { + var ret time.Time + return ret + } + return *o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCpiV1ResponseCpisInnerCpksInner) GetTimestampOk() (*time.Time, bool) { + if o == nil || IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *ListCpiV1ResponseCpisInnerCpksInner) HasTimestamp() bool { + if o != nil && !IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given time.Time and assigns it to the Timestamp field. +func (o *ListCpiV1ResponseCpisInnerCpksInner) SetTimestamp(v time.Time) { + o.Timestamp = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ListCpiV1ResponseCpisInnerCpksInner) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCpiV1ResponseCpisInnerCpksInner) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ListCpiV1ResponseCpisInnerCpksInner) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ListCpiV1ResponseCpisInnerCpksInner) SetType(v string) { + o.Type = &v +} + +func (o ListCpiV1ResponseCpisInnerCpksInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListCpiV1ResponseCpisInnerCpksInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Hash) { + toSerialize["hash"] = o.Hash + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Libraries) { + toSerialize["libraries"] = o.Libraries + } + if !IsNil(o.MainBundle) { + toSerialize["mainBundle"] = o.MainBundle + } + if !IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableListCpiV1ResponseCpisInnerCpksInner struct { + value *ListCpiV1ResponseCpisInnerCpksInner + isSet bool +} + +func (v NullableListCpiV1ResponseCpisInnerCpksInner) Get() *ListCpiV1ResponseCpisInnerCpksInner { + return v.value +} + +func (v *NullableListCpiV1ResponseCpisInnerCpksInner) Set(val *ListCpiV1ResponseCpisInnerCpksInner) { + v.value = val + v.isSet = true +} + +func (v NullableListCpiV1ResponseCpisInnerCpksInner) IsSet() bool { + return v.isSet +} + +func (v *NullableListCpiV1ResponseCpisInnerCpksInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListCpiV1ResponseCpisInnerCpksInner(val *ListCpiV1ResponseCpisInnerCpksInner) *NullableListCpiV1ResponseCpisInnerCpksInner { + return &NullableListCpiV1ResponseCpisInnerCpksInner{value: val, isSet: true} +} + +func (v NullableListCpiV1ResponseCpisInnerCpksInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListCpiV1ResponseCpisInnerCpksInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_flow_v1_request.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_flow_v1_request.go new file mode 100644 index 0000000000..42afa25329 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_flow_v1_request.go @@ -0,0 +1,288 @@ +/* +Hyperledger Cacti Plugin - Connector Corda + +Can perform basic tasks on a Corda ledger + +API version: 2.0.0-rc.3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cactus-plugin-ledger-connector-corda + +import ( + "encoding/json" +) + +// checks if the StartFlowV1Request type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StartFlowV1Request{} + +// StartFlowV1Request This method starts a new instance for the specified flow for the specified holding identity. +type StartFlowV1Request struct { + Username string `json:"username"` + Password string `json:"password"` + RejectUnauthorized bool `json:"rejectUnauthorized"` + HoldingIDShortHash *string `json:"holdingIDShortHash,omitempty"` + ClientRequestId string `json:"clientRequestId"` + FlowClassName string `json:"flowClassName"` + RequestBody StartFlowV1RequestRequestBody `json:"requestBody"` +} + +// NewStartFlowV1Request instantiates a new StartFlowV1Request object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewStartFlowV1Request(username string, password string, rejectUnauthorized bool, clientRequestId string, flowClassName string, requestBody StartFlowV1RequestRequestBody) *StartFlowV1Request { + this := StartFlowV1Request{} + this.Username = username + this.Password = password + this.RejectUnauthorized = rejectUnauthorized + this.ClientRequestId = clientRequestId + this.FlowClassName = flowClassName + this.RequestBody = requestBody + return &this +} + +// NewStartFlowV1RequestWithDefaults instantiates a new StartFlowV1Request object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewStartFlowV1RequestWithDefaults() *StartFlowV1Request { + this := StartFlowV1Request{} + return &this +} + +// GetUsername returns the Username field value +func (o *StartFlowV1Request) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *StartFlowV1Request) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *StartFlowV1Request) SetUsername(v string) { + o.Username = v +} + +// GetPassword returns the Password field value +func (o *StartFlowV1Request) GetPassword() string { + if o == nil { + var ret string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *StartFlowV1Request) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + +// SetPassword sets field value +func (o *StartFlowV1Request) SetPassword(v string) { + o.Password = v +} + +// GetRejectUnauthorized returns the RejectUnauthorized field value +func (o *StartFlowV1Request) GetRejectUnauthorized() bool { + if o == nil { + var ret bool + return ret + } + + return o.RejectUnauthorized +} + +// GetRejectUnauthorizedOk returns a tuple with the RejectUnauthorized field value +// and a boolean to check if the value has been set. +func (o *StartFlowV1Request) GetRejectUnauthorizedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.RejectUnauthorized, true +} + +// SetRejectUnauthorized sets field value +func (o *StartFlowV1Request) SetRejectUnauthorized(v bool) { + o.RejectUnauthorized = v +} + +// GetHoldingIDShortHash returns the HoldingIDShortHash field value if set, zero value otherwise. +func (o *StartFlowV1Request) GetHoldingIDShortHash() string { + if o == nil || IsNil(o.HoldingIDShortHash) { + var ret string + return ret + } + return *o.HoldingIDShortHash +} + +// GetHoldingIDShortHashOk returns a tuple with the HoldingIDShortHash field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StartFlowV1Request) GetHoldingIDShortHashOk() (*string, bool) { + if o == nil || IsNil(o.HoldingIDShortHash) { + return nil, false + } + return o.HoldingIDShortHash, true +} + +// HasHoldingIDShortHash returns a boolean if a field has been set. +func (o *StartFlowV1Request) HasHoldingIDShortHash() bool { + if o != nil && !IsNil(o.HoldingIDShortHash) { + return true + } + + return false +} + +// SetHoldingIDShortHash gets a reference to the given string and assigns it to the HoldingIDShortHash field. +func (o *StartFlowV1Request) SetHoldingIDShortHash(v string) { + o.HoldingIDShortHash = &v +} + +// GetClientRequestId returns the ClientRequestId field value +func (o *StartFlowV1Request) GetClientRequestId() string { + if o == nil { + var ret string + return ret + } + + return o.ClientRequestId +} + +// GetClientRequestIdOk returns a tuple with the ClientRequestId field value +// and a boolean to check if the value has been set. +func (o *StartFlowV1Request) GetClientRequestIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientRequestId, true +} + +// SetClientRequestId sets field value +func (o *StartFlowV1Request) SetClientRequestId(v string) { + o.ClientRequestId = v +} + +// GetFlowClassName returns the FlowClassName field value +func (o *StartFlowV1Request) GetFlowClassName() string { + if o == nil { + var ret string + return ret + } + + return o.FlowClassName +} + +// GetFlowClassNameOk returns a tuple with the FlowClassName field value +// and a boolean to check if the value has been set. +func (o *StartFlowV1Request) GetFlowClassNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FlowClassName, true +} + +// SetFlowClassName sets field value +func (o *StartFlowV1Request) SetFlowClassName(v string) { + o.FlowClassName = v +} + +// GetRequestBody returns the RequestBody field value +func (o *StartFlowV1Request) GetRequestBody() StartFlowV1RequestRequestBody { + if o == nil { + var ret StartFlowV1RequestRequestBody + return ret + } + + return o.RequestBody +} + +// GetRequestBodyOk returns a tuple with the RequestBody field value +// and a boolean to check if the value has been set. +func (o *StartFlowV1Request) GetRequestBodyOk() (*StartFlowV1RequestRequestBody, bool) { + if o == nil { + return nil, false + } + return &o.RequestBody, true +} + +// SetRequestBody sets field value +func (o *StartFlowV1Request) SetRequestBody(v StartFlowV1RequestRequestBody) { + o.RequestBody = v +} + +func (o StartFlowV1Request) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StartFlowV1Request) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["username"] = o.Username + toSerialize["password"] = o.Password + toSerialize["rejectUnauthorized"] = o.RejectUnauthorized + if !IsNil(o.HoldingIDShortHash) { + toSerialize["holdingIDShortHash"] = o.HoldingIDShortHash + } + toSerialize["clientRequestId"] = o.ClientRequestId + toSerialize["flowClassName"] = o.FlowClassName + toSerialize["requestBody"] = o.RequestBody + return toSerialize, nil +} + +type NullableStartFlowV1Request struct { + value *StartFlowV1Request + isSet bool +} + +func (v NullableStartFlowV1Request) Get() *StartFlowV1Request { + return v.value +} + +func (v *NullableStartFlowV1Request) Set(val *StartFlowV1Request) { + v.value = val + v.isSet = true +} + +func (v NullableStartFlowV1Request) IsSet() bool { + return v.isSet +} + +func (v *NullableStartFlowV1Request) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStartFlowV1Request(val *StartFlowV1Request) *NullableStartFlowV1Request { + return &NullableStartFlowV1Request{value: val, isSet: true} +} + +func (v NullableStartFlowV1Request) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStartFlowV1Request) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_flow_v1_request_request_body.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_flow_v1_request_request_body.go new file mode 100644 index 0000000000..1357971003 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_flow_v1_request_request_body.go @@ -0,0 +1,234 @@ +/* +Hyperledger Cacti Plugin - Connector Corda + +Can perform basic tasks on a Corda ledger + +API version: 2.0.0-rc.3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cactus-plugin-ledger-connector-corda + +import ( + "encoding/json" +) + +// checks if the StartFlowV1RequestRequestBody type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StartFlowV1RequestRequestBody{} + +// StartFlowV1RequestRequestBody struct for StartFlowV1RequestRequestBody +type StartFlowV1RequestRequestBody struct { + ChatName *string `json:"chatName,omitempty"` + OtherMember *string `json:"otherMember,omitempty"` + Message *string `json:"message,omitempty"` + NumberOfRecords *string `json:"numberOfRecords,omitempty"` +} + +// NewStartFlowV1RequestRequestBody instantiates a new StartFlowV1RequestRequestBody object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewStartFlowV1RequestRequestBody() *StartFlowV1RequestRequestBody { + this := StartFlowV1RequestRequestBody{} + return &this +} + +// NewStartFlowV1RequestRequestBodyWithDefaults instantiates a new StartFlowV1RequestRequestBody object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewStartFlowV1RequestRequestBodyWithDefaults() *StartFlowV1RequestRequestBody { + this := StartFlowV1RequestRequestBody{} + return &this +} + +// GetChatName returns the ChatName field value if set, zero value otherwise. +func (o *StartFlowV1RequestRequestBody) GetChatName() string { + if o == nil || IsNil(o.ChatName) { + var ret string + return ret + } + return *o.ChatName +} + +// GetChatNameOk returns a tuple with the ChatName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StartFlowV1RequestRequestBody) GetChatNameOk() (*string, bool) { + if o == nil || IsNil(o.ChatName) { + return nil, false + } + return o.ChatName, true +} + +// HasChatName returns a boolean if a field has been set. +func (o *StartFlowV1RequestRequestBody) HasChatName() bool { + if o != nil && !IsNil(o.ChatName) { + return true + } + + return false +} + +// SetChatName gets a reference to the given string and assigns it to the ChatName field. +func (o *StartFlowV1RequestRequestBody) SetChatName(v string) { + o.ChatName = &v +} + +// GetOtherMember returns the OtherMember field value if set, zero value otherwise. +func (o *StartFlowV1RequestRequestBody) GetOtherMember() string { + if o == nil || IsNil(o.OtherMember) { + var ret string + return ret + } + return *o.OtherMember +} + +// GetOtherMemberOk returns a tuple with the OtherMember field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StartFlowV1RequestRequestBody) GetOtherMemberOk() (*string, bool) { + if o == nil || IsNil(o.OtherMember) { + return nil, false + } + return o.OtherMember, true +} + +// HasOtherMember returns a boolean if a field has been set. +func (o *StartFlowV1RequestRequestBody) HasOtherMember() bool { + if o != nil && !IsNil(o.OtherMember) { + return true + } + + return false +} + +// SetOtherMember gets a reference to the given string and assigns it to the OtherMember field. +func (o *StartFlowV1RequestRequestBody) SetOtherMember(v string) { + o.OtherMember = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *StartFlowV1RequestRequestBody) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StartFlowV1RequestRequestBody) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *StartFlowV1RequestRequestBody) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *StartFlowV1RequestRequestBody) SetMessage(v string) { + o.Message = &v +} + +// GetNumberOfRecords returns the NumberOfRecords field value if set, zero value otherwise. +func (o *StartFlowV1RequestRequestBody) GetNumberOfRecords() string { + if o == nil || IsNil(o.NumberOfRecords) { + var ret string + return ret + } + return *o.NumberOfRecords +} + +// GetNumberOfRecordsOk returns a tuple with the NumberOfRecords field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StartFlowV1RequestRequestBody) GetNumberOfRecordsOk() (*string, bool) { + if o == nil || IsNil(o.NumberOfRecords) { + return nil, false + } + return o.NumberOfRecords, true +} + +// HasNumberOfRecords returns a boolean if a field has been set. +func (o *StartFlowV1RequestRequestBody) HasNumberOfRecords() bool { + if o != nil && !IsNil(o.NumberOfRecords) { + return true + } + + return false +} + +// SetNumberOfRecords gets a reference to the given string and assigns it to the NumberOfRecords field. +func (o *StartFlowV1RequestRequestBody) SetNumberOfRecords(v string) { + o.NumberOfRecords = &v +} + +func (o StartFlowV1RequestRequestBody) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StartFlowV1RequestRequestBody) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ChatName) { + toSerialize["chatName"] = o.ChatName + } + if !IsNil(o.OtherMember) { + toSerialize["otherMember"] = o.OtherMember + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.NumberOfRecords) { + toSerialize["numberOfRecords"] = o.NumberOfRecords + } + return toSerialize, nil +} + +type NullableStartFlowV1RequestRequestBody struct { + value *StartFlowV1RequestRequestBody + isSet bool +} + +func (v NullableStartFlowV1RequestRequestBody) Get() *StartFlowV1RequestRequestBody { + return v.value +} + +func (v *NullableStartFlowV1RequestRequestBody) Set(val *StartFlowV1RequestRequestBody) { + v.value = val + v.isSet = true +} + +func (v NullableStartFlowV1RequestRequestBody) IsSet() bool { + return v.isSet +} + +func (v *NullableStartFlowV1RequestRequestBody) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStartFlowV1RequestRequestBody(val *StartFlowV1RequestRequestBody) *NullableStartFlowV1RequestRequestBody { + return &NullableStartFlowV1RequestRequestBody{value: val, isSet: true} +} + +func (v NullableStartFlowV1RequestRequestBody) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStartFlowV1RequestRequestBody) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_flow_v1_response.go b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_flow_v1_response.go new file mode 100644 index 0000000000..c5c604f2d6 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/go/generated/openapi/go-client/model_start_flow_v1_response.go @@ -0,0 +1,346 @@ +/* +Hyperledger Cacti Plugin - Connector Corda + +Can perform basic tasks on a Corda ledger + +API version: 2.0.0-rc.3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cactus-plugin-ledger-connector-corda + +import ( + "encoding/json" + "time" +) + +// checks if the StartFlowV1Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StartFlowV1Response{} + +// StartFlowV1Response struct for StartFlowV1Response +type StartFlowV1Response struct { + ClientRequestId NullableString `json:"clientRequestId,omitempty"` + FlowError *FlowV1Error `json:"flowError,omitempty"` + FlowId NullableString `json:"flowId,omitempty"` + FlowResult NullableString `json:"flowResult,omitempty"` + FlowStatus string `json:"flowStatus"` + HoldingIDShortHash string `json:"holdingIDShortHash"` + Timestamp time.Time `json:"timestamp"` +} + +// NewStartFlowV1Response instantiates a new StartFlowV1Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewStartFlowV1Response(flowStatus string, holdingIDShortHash string, timestamp time.Time) *StartFlowV1Response { + this := StartFlowV1Response{} + this.FlowStatus = flowStatus + this.HoldingIDShortHash = holdingIDShortHash + this.Timestamp = timestamp + return &this +} + +// NewStartFlowV1ResponseWithDefaults instantiates a new StartFlowV1Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewStartFlowV1ResponseWithDefaults() *StartFlowV1Response { + this := StartFlowV1Response{} + return &this +} + +// GetClientRequestId returns the ClientRequestId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StartFlowV1Response) GetClientRequestId() string { + if o == nil || IsNil(o.ClientRequestId.Get()) { + var ret string + return ret + } + return *o.ClientRequestId.Get() +} + +// GetClientRequestIdOk returns a tuple with the ClientRequestId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StartFlowV1Response) GetClientRequestIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ClientRequestId.Get(), o.ClientRequestId.IsSet() +} + +// HasClientRequestId returns a boolean if a field has been set. +func (o *StartFlowV1Response) HasClientRequestId() bool { + if o != nil && o.ClientRequestId.IsSet() { + return true + } + + return false +} + +// SetClientRequestId gets a reference to the given NullableString and assigns it to the ClientRequestId field. +func (o *StartFlowV1Response) SetClientRequestId(v string) { + o.ClientRequestId.Set(&v) +} +// SetClientRequestIdNil sets the value for ClientRequestId to be an explicit nil +func (o *StartFlowV1Response) SetClientRequestIdNil() { + o.ClientRequestId.Set(nil) +} + +// UnsetClientRequestId ensures that no value is present for ClientRequestId, not even an explicit nil +func (o *StartFlowV1Response) UnsetClientRequestId() { + o.ClientRequestId.Unset() +} + +// GetFlowError returns the FlowError field value if set, zero value otherwise. +func (o *StartFlowV1Response) GetFlowError() FlowV1Error { + if o == nil || IsNil(o.FlowError) { + var ret FlowV1Error + return ret + } + return *o.FlowError +} + +// GetFlowErrorOk returns a tuple with the FlowError field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StartFlowV1Response) GetFlowErrorOk() (*FlowV1Error, bool) { + if o == nil || IsNil(o.FlowError) { + return nil, false + } + return o.FlowError, true +} + +// HasFlowError returns a boolean if a field has been set. +func (o *StartFlowV1Response) HasFlowError() bool { + if o != nil && !IsNil(o.FlowError) { + return true + } + + return false +} + +// SetFlowError gets a reference to the given FlowV1Error and assigns it to the FlowError field. +func (o *StartFlowV1Response) SetFlowError(v FlowV1Error) { + o.FlowError = &v +} + +// GetFlowId returns the FlowId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StartFlowV1Response) GetFlowId() string { + if o == nil || IsNil(o.FlowId.Get()) { + var ret string + return ret + } + return *o.FlowId.Get() +} + +// GetFlowIdOk returns a tuple with the FlowId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StartFlowV1Response) GetFlowIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.FlowId.Get(), o.FlowId.IsSet() +} + +// HasFlowId returns a boolean if a field has been set. +func (o *StartFlowV1Response) HasFlowId() bool { + if o != nil && o.FlowId.IsSet() { + return true + } + + return false +} + +// SetFlowId gets a reference to the given NullableString and assigns it to the FlowId field. +func (o *StartFlowV1Response) SetFlowId(v string) { + o.FlowId.Set(&v) +} +// SetFlowIdNil sets the value for FlowId to be an explicit nil +func (o *StartFlowV1Response) SetFlowIdNil() { + o.FlowId.Set(nil) +} + +// UnsetFlowId ensures that no value is present for FlowId, not even an explicit nil +func (o *StartFlowV1Response) UnsetFlowId() { + o.FlowId.Unset() +} + +// GetFlowResult returns the FlowResult field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StartFlowV1Response) GetFlowResult() string { + if o == nil || IsNil(o.FlowResult.Get()) { + var ret string + return ret + } + return *o.FlowResult.Get() +} + +// GetFlowResultOk returns a tuple with the FlowResult field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StartFlowV1Response) GetFlowResultOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.FlowResult.Get(), o.FlowResult.IsSet() +} + +// HasFlowResult returns a boolean if a field has been set. +func (o *StartFlowV1Response) HasFlowResult() bool { + if o != nil && o.FlowResult.IsSet() { + return true + } + + return false +} + +// SetFlowResult gets a reference to the given NullableString and assigns it to the FlowResult field. +func (o *StartFlowV1Response) SetFlowResult(v string) { + o.FlowResult.Set(&v) +} +// SetFlowResultNil sets the value for FlowResult to be an explicit nil +func (o *StartFlowV1Response) SetFlowResultNil() { + o.FlowResult.Set(nil) +} + +// UnsetFlowResult ensures that no value is present for FlowResult, not even an explicit nil +func (o *StartFlowV1Response) UnsetFlowResult() { + o.FlowResult.Unset() +} + +// GetFlowStatus returns the FlowStatus field value +func (o *StartFlowV1Response) GetFlowStatus() string { + if o == nil { + var ret string + return ret + } + + return o.FlowStatus +} + +// GetFlowStatusOk returns a tuple with the FlowStatus field value +// and a boolean to check if the value has been set. +func (o *StartFlowV1Response) GetFlowStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FlowStatus, true +} + +// SetFlowStatus sets field value +func (o *StartFlowV1Response) SetFlowStatus(v string) { + o.FlowStatus = v +} + +// GetHoldingIDShortHash returns the HoldingIDShortHash field value +func (o *StartFlowV1Response) GetHoldingIDShortHash() string { + if o == nil { + var ret string + return ret + } + + return o.HoldingIDShortHash +} + +// GetHoldingIDShortHashOk returns a tuple with the HoldingIDShortHash field value +// and a boolean to check if the value has been set. +func (o *StartFlowV1Response) GetHoldingIDShortHashOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.HoldingIDShortHash, true +} + +// SetHoldingIDShortHash sets field value +func (o *StartFlowV1Response) SetHoldingIDShortHash(v string) { + o.HoldingIDShortHash = v +} + +// GetTimestamp returns the Timestamp field value +func (o *StartFlowV1Response) GetTimestamp() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value +// and a boolean to check if the value has been set. +func (o *StartFlowV1Response) GetTimestampOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Timestamp, true +} + +// SetTimestamp sets field value +func (o *StartFlowV1Response) SetTimestamp(v time.Time) { + o.Timestamp = v +} + +func (o StartFlowV1Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StartFlowV1Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ClientRequestId.IsSet() { + toSerialize["clientRequestId"] = o.ClientRequestId.Get() + } + if !IsNil(o.FlowError) { + toSerialize["flowError"] = o.FlowError + } + if o.FlowId.IsSet() { + toSerialize["flowId"] = o.FlowId.Get() + } + if o.FlowResult.IsSet() { + toSerialize["flowResult"] = o.FlowResult.Get() + } + toSerialize["flowStatus"] = o.FlowStatus + toSerialize["holdingIDShortHash"] = o.HoldingIDShortHash + toSerialize["timestamp"] = o.Timestamp + return toSerialize, nil +} + +type NullableStartFlowV1Response struct { + value *StartFlowV1Response + isSet bool +} + +func (v NullableStartFlowV1Response) Get() *StartFlowV1Response { + return v.value +} + +func (v *NullableStartFlowV1Response) Set(val *StartFlowV1Response) { + v.value = val + v.isSet = true +} + +func (v NullableStartFlowV1Response) IsSet() bool { + return v.isSet +} + +func (v *NullableStartFlowV1Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStartFlowV1Response(val *StartFlowV1Response) *NullableStartFlowV1Response { + return &NullableStartFlowV1Response{value: val, isSet: true} +} + +func (v NullableStartFlowV1Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStartFlowV1Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/json/openapi.json b/packages/cactus-plugin-ledger-connector-corda/src/main/json/openapi.json index d82edb2193..91340c6046 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/json/openapi.json +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/json/openapi.json @@ -878,6 +878,354 @@ }, "VaultQueryV1Response": { "type": "object" + }, + "ListCpiV1Response": { + "type": "object", + "required": [ + "hash", + "id", + "libraries", + "mainBundle", + "timestamp", + "type" + ], + "properties": { + "cpis": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cpiFileChecksum": { + "type": "string", + "nullable": false, + "example": "string" + }, + "cpiFileFullChecksum": { + "type": "string", + "nullable": false, + "example": "string" + }, + "cpks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "hash": { + "type": "string", + "nullable": false, + "example": "string" + }, + "id": { + "$ref": "#/components/schemas/CPIIDV1" + }, + "libraries": { + "type": "array", + "items": { + "type": "string", + "nullable": false, + "example": "string" + } + }, + "mainBundle": { + "type": "string", + "nullable": false, + "example": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": false, + "example": "2022-06-24T10:15:30Z" + }, + "type": { + "type": "string", + "nullable": false, + "example": "string" + } + } + } + }, + "groupPolicy": { + "type": "string", + "nullable": true, + "example": "string" + }, + "id": { + "$ref": "#/components/schemas/CPIIDV1" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": false, + "example": "2022-06-24T10:15:30Z" + } + } + } + } + } + }, + "ListCpiV1Request": { + "required": ["username", "password", "rejectUnauthorized"], + "properties": { + "username": { + "type": "string", + "nullable": false + }, + "password": { + "type": "string", + "nullable": false + }, + "rejectUnauthorized": { + "type": "boolean", + "nullable": false + } + } + }, + "StartFlowV1Request": { + "description": "This method starts a new instance for the specified flow for the specified holding identity.", + "type": "object", + "required": [ + "clientRequestId", + "flowClassName", + "requestBody", + "username", + "password", + "rejectUnauthorized" + ], + "properties": { + "username": { + "type": "string", + "nullable": false + }, + "password": { + "type": "string", + "nullable": false + }, + "rejectUnauthorized": { + "type": "boolean", + "nullable": false + }, + "holdingIDShortHash": { + "type": "string", + "nullable": false + }, + "clientRequestId": { + "type": "string", + "nullable": false + }, + "flowClassName": { + "type": "string", + "nullable": false + }, + "requestBody": { + "type": "object", + "properties": { + "chatName": { + "type": "string" + }, + "otherMember": { + "type": "string" + }, + "message": { + "type": "string" + }, + "numberOfRecords": { + "type": "string" + } + } + } + } + }, + "GetFlowCidV1Request": { + "description": "This method gets the current status of the specified flow instance.", + "required": ["username", "password", "rejectUnauthorized"], + "properties": { + "username": { + "type": "string", + "nullable": false + }, + "password": { + "type": "string", + "nullable": false + }, + "rejectUnauthorized": { + "type": "boolean", + "nullable": false + }, + "holdingIDShortHash": { + "type": "string", + "nullable": false + }, + "clientRequestId": { + "type": "string", + "nullable": false + } + } + }, + "GetFlowCidV1Response": { + "type": "object", + "required": ["flowStatus", "holdingIDShortHash", "timestamp"], + "properties": { + "clientRequestId": { + "type": "string", + "nullable": true, + "example": "string" + }, + "flowError": { + "$ref": "#/components/schemas/FlowV1Error" + }, + "flowId": { + "type": "string", + "nullable": true, + "example": "string" + }, + "flowResult": { + "type": "string", + "nullable": true, + "example": "string" + }, + "flowStatus": { + "type": "string", + "nullable": false, + "example": "string" + }, + "holdingIDShortHash": { + "type": "string", + "nullable": false, + "example": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": false, + "example": "2022-06-24T10:15:30Z" + } + } + }, + "FlowStatusV1Responses": { + "type": "object", + "required": ["flowStatus", "holdingIDShortHash", "timestamp"], + "properties": { + "flowStatusResponses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "clientRequestId": { + "type": "string", + "nullable": true, + "example": "string" + }, + "flowError": { + "$ref": "#/components/schemas/FlowV1Error" + }, + "flowId": { + "type": "string", + "nullable": true, + "example": "string" + }, + "flowResult": { + "type": "string", + "nullable": true, + "example": "string" + }, + "flowStatus": { + "type": "string", + "nullable": false, + "example": "string" + }, + "holdingIDShortHash": { + "type": "string", + "nullable": false, + "example": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": false, + "example": "2022-06-24T10:15:30Z" + } + } + } + } + } + }, + "StartFlowV1Response": { + "type": "object", + "required": ["flowStatus", "holdingIDShortHash", "timestamp"], + "properties": { + "clientRequestId": { + "type": "string", + "nullable": true, + "example": "string" + }, + "flowError": { + "$ref": "#/components/schemas/FlowV1Error" + }, + "flowId": { + "type": "string", + "nullable": true, + "example": "string" + }, + "flowResult": { + "type": "string", + "nullable": true, + "example": "string" + }, + "flowStatus": { + "type": "string", + "nullable": false, + "example": "string" + }, + "holdingIDShortHash": { + "type": "string", + "nullable": false, + "example": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": false, + "example": "2022-06-24T10:15:30Z" + } + } + }, + "CPIIDV1": { + "type": "object", + "required": ["name", "version"], + "properties": { + "name": { + "type": "string", + "nullable": false, + "example": "string" + }, + "signerSummaryHash": { + "type": "string", + "nullable": true, + "example": "string" + }, + "version": { + "type": "string", + "nullable": false, + "example": "string" + } + } + }, + "FlowV1Error": { + "type": "object", + "required": ["message", "type"], + "properties": { + "message": { + "type": "string", + "nullable": false, + "example": "string" + }, + "type": { + "type": "string", + "nullable": false, + "example": "string" + } + } } } }, @@ -1256,6 +1604,160 @@ } } } + }, + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi": { + "get": { + "x-hyperledger-cactus": { + "https": { + "verbLowerCase": "get", + "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi" + } + }, + "operationId": "listCpiV1", + "summary": "List all CPIs uploaded to the cluster", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListCpiV1Request" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListCpiV1Response" + } + } + } + } + } + } + }, + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow": { + "get": { + "x-hyperledger-cactus": { + "http": { + "verbLowerCase": "get", + "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow" + } + }, + "operationId": "listFlowV1", + "summary": "This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running.", + "parameters": [], + "requestBody": { + "description": "This method gets the current status of the specified flow instance.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetFlowCidV1Request" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/FlowStatusV1Responses" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid": { + "get": { + "x-hyperledger-cactus": { + "http": { + "verbLowerCase": "get", + "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid" + } + }, + "operationId": "getFlowV1", + "summary": "This method gets the current status of the specified flow instance.", + "requestBody": { + "description": "This method gets the current status of the specified flow instance.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetFlowCidV1Request" + } + } + } + }, + "parameters": [], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/GetFlowCidV1Response" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow": { + "post": { + "x-hyperledger-cactus": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow" + } + }, + "operationId": "startFlowV1", + "summary": "This method starts a new instance for the specified flow for the specified holding identity.", + "requestBody": { + "description": "Request body for starting a flow", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartFlowV1Request" + } + } + } + }, + "parameters": [], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartFlowV1Response" + } + } + } + } + } + } } } } diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/json/openapi.tpl.json b/packages/cactus-plugin-ledger-connector-corda/src/main/json/openapi.tpl.json index d82edb2193..91340c6046 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/json/openapi.tpl.json +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/json/openapi.tpl.json @@ -878,6 +878,354 @@ }, "VaultQueryV1Response": { "type": "object" + }, + "ListCpiV1Response": { + "type": "object", + "required": [ + "hash", + "id", + "libraries", + "mainBundle", + "timestamp", + "type" + ], + "properties": { + "cpis": { + "type": "array", + "items": { + "type": "object", + "properties": { + "cpiFileChecksum": { + "type": "string", + "nullable": false, + "example": "string" + }, + "cpiFileFullChecksum": { + "type": "string", + "nullable": false, + "example": "string" + }, + "cpks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "hash": { + "type": "string", + "nullable": false, + "example": "string" + }, + "id": { + "$ref": "#/components/schemas/CPIIDV1" + }, + "libraries": { + "type": "array", + "items": { + "type": "string", + "nullable": false, + "example": "string" + } + }, + "mainBundle": { + "type": "string", + "nullable": false, + "example": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": false, + "example": "2022-06-24T10:15:30Z" + }, + "type": { + "type": "string", + "nullable": false, + "example": "string" + } + } + } + }, + "groupPolicy": { + "type": "string", + "nullable": true, + "example": "string" + }, + "id": { + "$ref": "#/components/schemas/CPIIDV1" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": false, + "example": "2022-06-24T10:15:30Z" + } + } + } + } + } + }, + "ListCpiV1Request": { + "required": ["username", "password", "rejectUnauthorized"], + "properties": { + "username": { + "type": "string", + "nullable": false + }, + "password": { + "type": "string", + "nullable": false + }, + "rejectUnauthorized": { + "type": "boolean", + "nullable": false + } + } + }, + "StartFlowV1Request": { + "description": "This method starts a new instance for the specified flow for the specified holding identity.", + "type": "object", + "required": [ + "clientRequestId", + "flowClassName", + "requestBody", + "username", + "password", + "rejectUnauthorized" + ], + "properties": { + "username": { + "type": "string", + "nullable": false + }, + "password": { + "type": "string", + "nullable": false + }, + "rejectUnauthorized": { + "type": "boolean", + "nullable": false + }, + "holdingIDShortHash": { + "type": "string", + "nullable": false + }, + "clientRequestId": { + "type": "string", + "nullable": false + }, + "flowClassName": { + "type": "string", + "nullable": false + }, + "requestBody": { + "type": "object", + "properties": { + "chatName": { + "type": "string" + }, + "otherMember": { + "type": "string" + }, + "message": { + "type": "string" + }, + "numberOfRecords": { + "type": "string" + } + } + } + } + }, + "GetFlowCidV1Request": { + "description": "This method gets the current status of the specified flow instance.", + "required": ["username", "password", "rejectUnauthorized"], + "properties": { + "username": { + "type": "string", + "nullable": false + }, + "password": { + "type": "string", + "nullable": false + }, + "rejectUnauthorized": { + "type": "boolean", + "nullable": false + }, + "holdingIDShortHash": { + "type": "string", + "nullable": false + }, + "clientRequestId": { + "type": "string", + "nullable": false + } + } + }, + "GetFlowCidV1Response": { + "type": "object", + "required": ["flowStatus", "holdingIDShortHash", "timestamp"], + "properties": { + "clientRequestId": { + "type": "string", + "nullable": true, + "example": "string" + }, + "flowError": { + "$ref": "#/components/schemas/FlowV1Error" + }, + "flowId": { + "type": "string", + "nullable": true, + "example": "string" + }, + "flowResult": { + "type": "string", + "nullable": true, + "example": "string" + }, + "flowStatus": { + "type": "string", + "nullable": false, + "example": "string" + }, + "holdingIDShortHash": { + "type": "string", + "nullable": false, + "example": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": false, + "example": "2022-06-24T10:15:30Z" + } + } + }, + "FlowStatusV1Responses": { + "type": "object", + "required": ["flowStatus", "holdingIDShortHash", "timestamp"], + "properties": { + "flowStatusResponses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "clientRequestId": { + "type": "string", + "nullable": true, + "example": "string" + }, + "flowError": { + "$ref": "#/components/schemas/FlowV1Error" + }, + "flowId": { + "type": "string", + "nullable": true, + "example": "string" + }, + "flowResult": { + "type": "string", + "nullable": true, + "example": "string" + }, + "flowStatus": { + "type": "string", + "nullable": false, + "example": "string" + }, + "holdingIDShortHash": { + "type": "string", + "nullable": false, + "example": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": false, + "example": "2022-06-24T10:15:30Z" + } + } + } + } + } + }, + "StartFlowV1Response": { + "type": "object", + "required": ["flowStatus", "holdingIDShortHash", "timestamp"], + "properties": { + "clientRequestId": { + "type": "string", + "nullable": true, + "example": "string" + }, + "flowError": { + "$ref": "#/components/schemas/FlowV1Error" + }, + "flowId": { + "type": "string", + "nullable": true, + "example": "string" + }, + "flowResult": { + "type": "string", + "nullable": true, + "example": "string" + }, + "flowStatus": { + "type": "string", + "nullable": false, + "example": "string" + }, + "holdingIDShortHash": { + "type": "string", + "nullable": false, + "example": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": false, + "example": "2022-06-24T10:15:30Z" + } + } + }, + "CPIIDV1": { + "type": "object", + "required": ["name", "version"], + "properties": { + "name": { + "type": "string", + "nullable": false, + "example": "string" + }, + "signerSummaryHash": { + "type": "string", + "nullable": true, + "example": "string" + }, + "version": { + "type": "string", + "nullable": false, + "example": "string" + } + } + }, + "FlowV1Error": { + "type": "object", + "required": ["message", "type"], + "properties": { + "message": { + "type": "string", + "nullable": false, + "example": "string" + }, + "type": { + "type": "string", + "nullable": false, + "example": "string" + } + } } } }, @@ -1256,6 +1604,160 @@ } } } + }, + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi": { + "get": { + "x-hyperledger-cactus": { + "https": { + "verbLowerCase": "get", + "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi" + } + }, + "operationId": "listCpiV1", + "summary": "List all CPIs uploaded to the cluster", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListCpiV1Request" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListCpiV1Response" + } + } + } + } + } + } + }, + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow": { + "get": { + "x-hyperledger-cactus": { + "http": { + "verbLowerCase": "get", + "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow" + } + }, + "operationId": "listFlowV1", + "summary": "This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running.", + "parameters": [], + "requestBody": { + "description": "This method gets the current status of the specified flow instance.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetFlowCidV1Request" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/FlowStatusV1Responses" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid": { + "get": { + "x-hyperledger-cactus": { + "http": { + "verbLowerCase": "get", + "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid" + } + }, + "operationId": "getFlowV1", + "summary": "This method gets the current status of the specified flow instance.", + "requestBody": { + "description": "This method gets the current status of the specified flow instance.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetFlowCidV1Request" + } + } + } + }, + "parameters": [], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/GetFlowCidV1Response" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + } + } + }, + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow": { + "post": { + "x-hyperledger-cactus": { + "http": { + "verbLowerCase": "post", + "path": "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow" + } + }, + "operationId": "startFlowV1", + "summary": "This method starts a new instance for the specified flow for the specified holding identity.", + "requestBody": { + "description": "Request body for starting a flow", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartFlowV1Request" + } + } + } + }, + "parameters": [], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartFlowV1Response" + } + } + } + } + } + } } } } diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES index 7ba0b49d94..f0523c86bf 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES @@ -21,6 +21,7 @@ src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +src/main/kotlin/org/openapitools/client/models/CPIIDV1.kt src/main/kotlin/org/openapitools/client/models/ClearMonitorTransactionsV1Request.kt src/main/kotlin/org/openapitools/client/models/ClearMonitorTransactionsV1Response.kt src/main/kotlin/org/openapitools/client/models/CordaNodeSshCredentials.kt @@ -34,6 +35,11 @@ src/main/kotlin/org/openapitools/client/models/DeployContractJarsV1Request.kt src/main/kotlin/org/openapitools/client/models/DiagnoseNodeV1Request.kt src/main/kotlin/org/openapitools/client/models/DiagnoseNodeV1Response.kt src/main/kotlin/org/openapitools/client/models/FlowInvocationType.kt +src/main/kotlin/org/openapitools/client/models/FlowStatusV1Responses.kt +src/main/kotlin/org/openapitools/client/models/FlowStatusV1ResponsesFlowStatusResponsesInner.kt +src/main/kotlin/org/openapitools/client/models/FlowV1Error.kt +src/main/kotlin/org/openapitools/client/models/GetFlowCidV1Request.kt +src/main/kotlin/org/openapitools/client/models/GetFlowCidV1Response.kt src/main/kotlin/org/openapitools/client/models/GetMonitorTransactionsV1Request.kt src/main/kotlin/org/openapitools/client/models/GetMonitorTransactionsV1Response.kt src/main/kotlin/org/openapitools/client/models/GetMonitorTransactionsV1ResponseTxInner.kt @@ -43,6 +49,10 @@ src/main/kotlin/org/openapitools/client/models/JarFile.kt src/main/kotlin/org/openapitools/client/models/JvmObject.kt src/main/kotlin/org/openapitools/client/models/JvmType.kt src/main/kotlin/org/openapitools/client/models/JvmTypeKind.kt +src/main/kotlin/org/openapitools/client/models/ListCpiV1Request.kt +src/main/kotlin/org/openapitools/client/models/ListCpiV1Response.kt +src/main/kotlin/org/openapitools/client/models/ListCpiV1ResponseCpisInner.kt +src/main/kotlin/org/openapitools/client/models/ListCpiV1ResponseCpisInnerCpksInner.kt src/main/kotlin/org/openapitools/client/models/ListFlowsV1Request.kt src/main/kotlin/org/openapitools/client/models/ListFlowsV1Response.kt src/main/kotlin/org/openapitools/client/models/NetworkHostAndPort.kt @@ -51,6 +61,9 @@ src/main/kotlin/org/openapitools/client/models/NodeInfo.kt src/main/kotlin/org/openapitools/client/models/Party.kt src/main/kotlin/org/openapitools/client/models/PublicKey.kt src/main/kotlin/org/openapitools/client/models/SHA256.kt +src/main/kotlin/org/openapitools/client/models/StartFlowV1Request.kt +src/main/kotlin/org/openapitools/client/models/StartFlowV1RequestRequestBody.kt +src/main/kotlin/org/openapitools/client/models/StartFlowV1Response.kt src/main/kotlin/org/openapitools/client/models/StartMonitorV1Request.kt src/main/kotlin/org/openapitools/client/models/StartMonitorV1Response.kt src/main/kotlin/org/openapitools/client/models/StopMonitorV1Request.kt diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/README.md b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/README.md index b2715fa724..60019fd973 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/README.md +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/README.md @@ -47,11 +47,15 @@ Class | Method | HTTP request | Description *DefaultApi* | [**clearMonitorTransactionsV1**](docs/DefaultApi.md#clearmonitortransactionsv1) | **DELETE** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/clear-monitor-transactions | Clear transactions from internal store so they'll not be available by GetMonitorTransactionsV1 anymore. *DefaultApi* | [**deployContractJarsV1**](docs/DefaultApi.md#deploycontractjarsv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/deploy-contract-jars | Deploys a set of jar files (Cordapps, e.g. the contracts in Corda speak). *DefaultApi* | [**diagnoseNodeV1**](docs/DefaultApi.md#diagnosenodev1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/diagnose-node | +*DefaultApi* | [**getFlowV1**](docs/DefaultApi.md#getflowv1) | **GET** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid | This method gets the current status of the specified flow instance. *DefaultApi* | [**getMonitorTransactionsV1**](docs/DefaultApi.md#getmonitortransactionsv1) | **GET** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-monitor-transactions | Get transactions for monitored state classes. *DefaultApi* | [**getPrometheusMetricsV1**](docs/DefaultApi.md#getprometheusmetricsv1) | **GET** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-prometheus-exporter-metrics | Get the Prometheus Metrics *DefaultApi* | [**invokeContractV1**](docs/DefaultApi.md#invokecontractv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/invoke-contract | Invokes a contract on a Corda ledger (e.g. a flow) +*DefaultApi* | [**listCpiV1**](docs/DefaultApi.md#listcpiv1) | **GET** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi | List all CPIs uploaded to the cluster +*DefaultApi* | [**listFlowV1**](docs/DefaultApi.md#listflowv1) | **GET** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow | This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. *DefaultApi* | [**listFlowsV1**](docs/DefaultApi.md#listflowsv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flows | *DefaultApi* | [**networkMapV1**](docs/DefaultApi.md#networkmapv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/network-map | +*DefaultApi* | [**startFlowV1**](docs/DefaultApi.md#startflowv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow | This method starts a new instance for the specified flow for the specified holding identity. *DefaultApi* | [**startMonitorV1**](docs/DefaultApi.md#startmonitorv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-monitor | Start monitoring corda changes (transactions) of given state class *DefaultApi* | [**stopMonitorV1**](docs/DefaultApi.md#stopmonitorv1) | **DELETE** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/stop-monitor | Stop monitoring corda changes (transactions) of given state class *DefaultApi* | [**vaultQueryV1**](docs/DefaultApi.md#vaultqueryv1) | **POST** /api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/vault-query | @@ -60,6 +64,7 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [org.openapitools.client.models.CPIIDV1](docs/CPIIDV1.md) - [org.openapitools.client.models.ClearMonitorTransactionsV1Request](docs/ClearMonitorTransactionsV1Request.md) - [org.openapitools.client.models.ClearMonitorTransactionsV1Response](docs/ClearMonitorTransactionsV1Response.md) - [org.openapitools.client.models.CordaNodeSshCredentials](docs/CordaNodeSshCredentials.md) @@ -73,6 +78,11 @@ Class | Method | HTTP request | Description - [org.openapitools.client.models.DiagnoseNodeV1Request](docs/DiagnoseNodeV1Request.md) - [org.openapitools.client.models.DiagnoseNodeV1Response](docs/DiagnoseNodeV1Response.md) - [org.openapitools.client.models.FlowInvocationType](docs/FlowInvocationType.md) + - [org.openapitools.client.models.FlowStatusV1Responses](docs/FlowStatusV1Responses.md) + - [org.openapitools.client.models.FlowStatusV1ResponsesFlowStatusResponsesInner](docs/FlowStatusV1ResponsesFlowStatusResponsesInner.md) + - [org.openapitools.client.models.FlowV1Error](docs/FlowV1Error.md) + - [org.openapitools.client.models.GetFlowCidV1Request](docs/GetFlowCidV1Request.md) + - [org.openapitools.client.models.GetFlowCidV1Response](docs/GetFlowCidV1Response.md) - [org.openapitools.client.models.GetMonitorTransactionsV1Request](docs/GetMonitorTransactionsV1Request.md) - [org.openapitools.client.models.GetMonitorTransactionsV1Response](docs/GetMonitorTransactionsV1Response.md) - [org.openapitools.client.models.GetMonitorTransactionsV1ResponseTxInner](docs/GetMonitorTransactionsV1ResponseTxInner.md) @@ -82,6 +92,10 @@ Class | Method | HTTP request | Description - [org.openapitools.client.models.JvmObject](docs/JvmObject.md) - [org.openapitools.client.models.JvmType](docs/JvmType.md) - [org.openapitools.client.models.JvmTypeKind](docs/JvmTypeKind.md) + - [org.openapitools.client.models.ListCpiV1Request](docs/ListCpiV1Request.md) + - [org.openapitools.client.models.ListCpiV1Response](docs/ListCpiV1Response.md) + - [org.openapitools.client.models.ListCpiV1ResponseCpisInner](docs/ListCpiV1ResponseCpisInner.md) + - [org.openapitools.client.models.ListCpiV1ResponseCpisInnerCpksInner](docs/ListCpiV1ResponseCpisInnerCpksInner.md) - [org.openapitools.client.models.ListFlowsV1Request](docs/ListFlowsV1Request.md) - [org.openapitools.client.models.ListFlowsV1Response](docs/ListFlowsV1Response.md) - [org.openapitools.client.models.NetworkHostAndPort](docs/NetworkHostAndPort.md) @@ -90,6 +104,9 @@ Class | Method | HTTP request | Description - [org.openapitools.client.models.Party](docs/Party.md) - [org.openapitools.client.models.PublicKey](docs/PublicKey.md) - [org.openapitools.client.models.SHA256](docs/SHA256.md) + - [org.openapitools.client.models.StartFlowV1Request](docs/StartFlowV1Request.md) + - [org.openapitools.client.models.StartFlowV1RequestRequestBody](docs/StartFlowV1RequestRequestBody.md) + - [org.openapitools.client.models.StartFlowV1Response](docs/StartFlowV1Response.md) - [org.openapitools.client.models.StartMonitorV1Request](docs/StartMonitorV1Request.md) - [org.openapitools.client.models.StartMonitorV1Response](docs/StartMonitorV1Response.md) - [org.openapitools.client.models.StopMonitorV1Request](docs/StopMonitorV1Request.md) diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt index d28e9ef55e..55d83cd9f1 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt @@ -26,13 +26,20 @@ import org.openapitools.client.models.DeployContractJarsSuccessV1Response import org.openapitools.client.models.DeployContractJarsV1Request import org.openapitools.client.models.DiagnoseNodeV1Request import org.openapitools.client.models.DiagnoseNodeV1Response +import org.openapitools.client.models.FlowStatusV1Responses +import org.openapitools.client.models.GetFlowCidV1Request +import org.openapitools.client.models.GetFlowCidV1Response import org.openapitools.client.models.GetMonitorTransactionsV1Request import org.openapitools.client.models.GetMonitorTransactionsV1Response import org.openapitools.client.models.InvokeContractV1Request import org.openapitools.client.models.InvokeContractV1Response +import org.openapitools.client.models.ListCpiV1Request +import org.openapitools.client.models.ListCpiV1Response import org.openapitools.client.models.ListFlowsV1Request import org.openapitools.client.models.ListFlowsV1Response import org.openapitools.client.models.NodeInfo +import org.openapitools.client.models.StartFlowV1Request +import org.openapitools.client.models.StartFlowV1Response import org.openapitools.client.models.StartMonitorV1Request import org.openapitools.client.models.StartMonitorV1Response import org.openapitools.client.models.StopMonitorV1Request @@ -279,6 +286,77 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient ) } + /** + * This method gets the current status of the specified flow instance. + * + * @param getFlowCidV1Request This method gets the current status of the specified flow instance. + * @return GetFlowCidV1Response + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun getFlowV1(getFlowCidV1Request: GetFlowCidV1Request) : GetFlowCidV1Response { + val localVarResponse = getFlowV1WithHttpInfo(getFlowCidV1Request = getFlowCidV1Request) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as GetFlowCidV1Response + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * This method gets the current status of the specified flow instance. + * + * @param getFlowCidV1Request This method gets the current status of the specified flow instance. + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun getFlowV1WithHttpInfo(getFlowCidV1Request: GetFlowCidV1Request) : ApiResponse { + val localVariableConfig = getFlowV1RequestConfig(getFlowCidV1Request = getFlowCidV1Request) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation getFlowV1 + * + * @param getFlowCidV1Request This method gets the current status of the specified flow instance. + * @return RequestConfig + */ + fun getFlowV1RequestConfig(getFlowCidV1Request: GetFlowCidV1Request) : RequestConfig { + val localVariableBody = getFlowCidV1Request + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + body = localVariableBody + ) + } + /** * Get transactions for monitored state classes. * @@ -490,6 +568,149 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient ) } + /** + * List all CPIs uploaded to the cluster + * + * @param listCpiV1Request + * @return ListCpiV1Response + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun listCpiV1(listCpiV1Request: ListCpiV1Request) : ListCpiV1Response { + val localVarResponse = listCpiV1WithHttpInfo(listCpiV1Request = listCpiV1Request) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as ListCpiV1Response + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * List all CPIs uploaded to the cluster + * + * @param listCpiV1Request + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun listCpiV1WithHttpInfo(listCpiV1Request: ListCpiV1Request) : ApiResponse { + val localVariableConfig = listCpiV1RequestConfig(listCpiV1Request = listCpiV1Request) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation listCpiV1 + * + * @param listCpiV1Request + * @return RequestConfig + */ + fun listCpiV1RequestConfig(listCpiV1Request: ListCpiV1Request) : RequestConfig { + val localVariableBody = listCpiV1Request + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + body = localVariableBody + ) + } + + /** + * This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. + * + * @param getFlowCidV1Request This method gets the current status of the specified flow instance. + * @return FlowStatusV1Responses + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun listFlowV1(getFlowCidV1Request: GetFlowCidV1Request) : FlowStatusV1Responses { + val localVarResponse = listFlowV1WithHttpInfo(getFlowCidV1Request = getFlowCidV1Request) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as FlowStatusV1Responses + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. + * + * @param getFlowCidV1Request This method gets the current status of the specified flow instance. + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun listFlowV1WithHttpInfo(getFlowCidV1Request: GetFlowCidV1Request) : ApiResponse { + val localVariableConfig = listFlowV1RequestConfig(getFlowCidV1Request = getFlowCidV1Request) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation listFlowV1 + * + * @param getFlowCidV1Request This method gets the current status of the specified flow instance. + * @return RequestConfig + */ + fun listFlowV1RequestConfig(getFlowCidV1Request: GetFlowCidV1Request) : RequestConfig { + val localVariableBody = getFlowCidV1Request + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + + return RequestConfig( + method = RequestMethod.GET, + path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + body = localVariableBody + ) + } + /** * * Responds with a list of the flows on the Corda node. @@ -634,6 +855,78 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient ) } + /** + * This method starts a new instance for the specified flow for the specified holding identity. + * + * @param startFlowV1Request Request body for starting a flow + * @return StartFlowV1Response + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + * @throws UnsupportedOperationException If the API returns an informational or redirection response + * @throws ClientException If the API returns a client error response + * @throws ServerException If the API returns a server error response + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class) + fun startFlowV1(startFlowV1Request: StartFlowV1Request) : StartFlowV1Response { + val localVarResponse = startFlowV1WithHttpInfo(startFlowV1Request = startFlowV1Request) + + return when (localVarResponse.responseType) { + ResponseType.Success -> (localVarResponse as Success<*>).data as StartFlowV1Response + ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.") + ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.") + ResponseType.ClientError -> { + val localVarError = localVarResponse as ClientError<*> + throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + ResponseType.ServerError -> { + val localVarError = localVarResponse as ServerError<*> + throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) + } + } + } + + /** + * This method starts a new instance for the specified flow for the specified holding identity. + * + * @param startFlowV1Request Request body for starting a flow + * @return ApiResponse + * @throws IllegalStateException If the request is not correctly configured + * @throws IOException Rethrows the OkHttp execute method exception + */ + @Suppress("UNCHECKED_CAST") + @Throws(IllegalStateException::class, IOException::class) + fun startFlowV1WithHttpInfo(startFlowV1Request: StartFlowV1Request) : ApiResponse { + val localVariableConfig = startFlowV1RequestConfig(startFlowV1Request = startFlowV1Request) + + return request( + localVariableConfig + ) + } + + /** + * To obtain the request config of the operation startFlowV1 + * + * @param startFlowV1Request Request body for starting a flow + * @return RequestConfig + */ + fun startFlowV1RequestConfig(startFlowV1Request: StartFlowV1Request) : RequestConfig { + val localVariableBody = startFlowV1Request + val localVariableQuery: MultiValueMap = mutableMapOf() + val localVariableHeaders: MutableMap = mutableMapOf() + localVariableHeaders["Content-Type"] = "application/json" + localVariableHeaders["Accept"] = "application/json" + + return RequestConfig( + method = RequestMethod.POST, + path = "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow", + query = localVariableQuery, + headers = localVariableHeaders, + requiresAuthentication = false, + body = localVariableBody + ) + } + /** * Start monitoring corda changes (transactions) of given state class * diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CPIIDV1.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CPIIDV1.kt new file mode 100644 index 0000000000..a8d6a8ed1d --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CPIIDV1.kt @@ -0,0 +1,43 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param name + * @param version + * @param signerSummaryHash + */ + + +data class CPIIDV1 ( + + @Json(name = "name") + val name: kotlin.String, + + @Json(name = "version") + val version: kotlin.String, + + @Json(name = "signerSummaryHash") + val signerSummaryHash: kotlin.String? = null + +) + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowStatusV1Responses.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowStatusV1Responses.kt new file mode 100644 index 0000000000..ec65d761cf --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowStatusV1Responses.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + +import org.openapitools.client.models.FlowStatusV1ResponsesFlowStatusResponsesInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param flowStatusResponses + */ + + +data class FlowStatusV1Responses ( + + @Json(name = "flowStatusResponses") + val flowStatusResponses: kotlin.collections.List? = null + +) + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowStatusV1ResponsesFlowStatusResponsesInner.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowStatusV1ResponsesFlowStatusResponsesInner.kt new file mode 100644 index 0000000000..8e97285f91 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowStatusV1ResponsesFlowStatusResponsesInner.kt @@ -0,0 +1,60 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + +import org.openapitools.client.models.FlowV1Error + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param clientRequestId + * @param flowError + * @param flowId + * @param flowResult + * @param flowStatus + * @param holdingIDShortHash + * @param timestamp + */ + + +data class FlowStatusV1ResponsesFlowStatusResponsesInner ( + + @Json(name = "clientRequestId") + val clientRequestId: kotlin.String? = null, + + @Json(name = "flowError") + val flowError: FlowV1Error? = null, + + @Json(name = "flowId") + val flowId: kotlin.String? = null, + + @Json(name = "flowResult") + val flowResult: kotlin.String? = null, + + @Json(name = "flowStatus") + val flowStatus: kotlin.String? = null, + + @Json(name = "holdingIDShortHash") + val holdingIDShortHash: kotlin.String? = null, + + @Json(name = "timestamp") + val timestamp: java.time.OffsetDateTime? = null + +) + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowV1Error.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowV1Error.kt new file mode 100644 index 0000000000..937ef910a9 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/FlowV1Error.kt @@ -0,0 +1,39 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param message + * @param type + */ + + +data class FlowV1Error ( + + @Json(name = "message") + val message: kotlin.String, + + @Json(name = "type") + val type: kotlin.String + +) + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetFlowCidV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetFlowCidV1Request.kt new file mode 100644 index 0000000000..2a4ca31b0f --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetFlowCidV1Request.kt @@ -0,0 +1,51 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * This method gets the current status of the specified flow instance. + * + * @param username + * @param password + * @param rejectUnauthorized + * @param holdingIDShortHash + * @param clientRequestId + */ + + +data class GetFlowCidV1Request ( + + @Json(name = "username") + val username: kotlin.String, + + @Json(name = "password") + val password: kotlin.String, + + @Json(name = "rejectUnauthorized") + val rejectUnauthorized: kotlin.Boolean, + + @Json(name = "holdingIDShortHash") + val holdingIDShortHash: kotlin.String? = null, + + @Json(name = "clientRequestId") + val clientRequestId: kotlin.String? = null + +) + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetFlowCidV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetFlowCidV1Response.kt new file mode 100644 index 0000000000..4a3890b727 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/GetFlowCidV1Response.kt @@ -0,0 +1,60 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + +import org.openapitools.client.models.FlowV1Error + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param flowStatus + * @param holdingIDShortHash + * @param timestamp + * @param clientRequestId + * @param flowError + * @param flowId + * @param flowResult + */ + + +data class GetFlowCidV1Response ( + + @Json(name = "flowStatus") + val flowStatus: kotlin.String, + + @Json(name = "holdingIDShortHash") + val holdingIDShortHash: kotlin.String, + + @Json(name = "timestamp") + val timestamp: java.time.OffsetDateTime, + + @Json(name = "clientRequestId") + val clientRequestId: kotlin.String? = null, + + @Json(name = "flowError") + val flowError: FlowV1Error? = null, + + @Json(name = "flowId") + val flowId: kotlin.String? = null, + + @Json(name = "flowResult") + val flowResult: kotlin.String? = null + +) + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1Request.kt new file mode 100644 index 0000000000..d89cc00789 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1Request.kt @@ -0,0 +1,43 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param username + * @param password + * @param rejectUnauthorized + */ + + +data class ListCpiV1Request ( + + @Json(name = "username") + val username: kotlin.String, + + @Json(name = "password") + val password: kotlin.String, + + @Json(name = "rejectUnauthorized") + val rejectUnauthorized: kotlin.Boolean + +) + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1Response.kt new file mode 100644 index 0000000000..cdccb81ee1 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1Response.kt @@ -0,0 +1,36 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + +import org.openapitools.client.models.ListCpiV1ResponseCpisInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param cpis + */ + + +data class ListCpiV1Response ( + + @Json(name = "cpis") + val cpis: kotlin.collections.List? = null + +) + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1ResponseCpisInner.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1ResponseCpisInner.kt new file mode 100644 index 0000000000..6fe2958dc9 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1ResponseCpisInner.kt @@ -0,0 +1,57 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + +import org.openapitools.client.models.CPIIDV1 +import org.openapitools.client.models.ListCpiV1ResponseCpisInnerCpksInner + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param cpiFileChecksum + * @param cpiFileFullChecksum + * @param cpks + * @param groupPolicy + * @param id + * @param timestamp + */ + + +data class ListCpiV1ResponseCpisInner ( + + @Json(name = "cpiFileChecksum") + val cpiFileChecksum: kotlin.String? = null, + + @Json(name = "cpiFileFullChecksum") + val cpiFileFullChecksum: kotlin.String? = null, + + @Json(name = "cpks") + val cpks: kotlin.collections.List? = null, + + @Json(name = "groupPolicy") + val groupPolicy: kotlin.String? = null, + + @Json(name = "id") + val id: CPIIDV1? = null, + + @Json(name = "timestamp") + val timestamp: java.time.OffsetDateTime? = null + +) + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1ResponseCpisInnerCpksInner.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1ResponseCpisInnerCpksInner.kt new file mode 100644 index 0000000000..ee0b917e36 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ListCpiV1ResponseCpisInnerCpksInner.kt @@ -0,0 +1,56 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + +import org.openapitools.client.models.CPIIDV1 + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param hash + * @param id + * @param libraries + * @param mainBundle + * @param timestamp + * @param type + */ + + +data class ListCpiV1ResponseCpisInnerCpksInner ( + + @Json(name = "hash") + val hash: kotlin.String? = null, + + @Json(name = "id") + val id: CPIIDV1? = null, + + @Json(name = "libraries") + val libraries: kotlin.collections.List? = null, + + @Json(name = "mainBundle") + val mainBundle: kotlin.String? = null, + + @Json(name = "timestamp") + val timestamp: java.time.OffsetDateTime? = null, + + @Json(name = "type") + val type: kotlin.String? = null + +) + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartFlowV1Request.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartFlowV1Request.kt new file mode 100644 index 0000000000..9b0e6bdb56 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartFlowV1Request.kt @@ -0,0 +1,60 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + +import org.openapitools.client.models.StartFlowV1RequestRequestBody + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * This method starts a new instance for the specified flow for the specified holding identity. + * + * @param username + * @param password + * @param rejectUnauthorized + * @param clientRequestId + * @param flowClassName + * @param requestBody + * @param holdingIDShortHash + */ + + +data class StartFlowV1Request ( + + @Json(name = "username") + val username: kotlin.String, + + @Json(name = "password") + val password: kotlin.String, + + @Json(name = "rejectUnauthorized") + val rejectUnauthorized: kotlin.Boolean, + + @Json(name = "clientRequestId") + val clientRequestId: kotlin.String, + + @Json(name = "flowClassName") + val flowClassName: kotlin.String, + + @Json(name = "requestBody") + val requestBody: StartFlowV1RequestRequestBody, + + @Json(name = "holdingIDShortHash") + val holdingIDShortHash: kotlin.String? = null + +) + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartFlowV1RequestRequestBody.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartFlowV1RequestRequestBody.kt new file mode 100644 index 0000000000..2fe79b7768 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartFlowV1RequestRequestBody.kt @@ -0,0 +1,47 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param chatName + * @param otherMember + * @param message + * @param numberOfRecords + */ + + +data class StartFlowV1RequestRequestBody ( + + @Json(name = "chatName") + val chatName: kotlin.String? = null, + + @Json(name = "otherMember") + val otherMember: kotlin.String? = null, + + @Json(name = "message") + val message: kotlin.String? = null, + + @Json(name = "numberOfRecords") + val numberOfRecords: kotlin.String? = null + +) + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartFlowV1Response.kt b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartFlowV1Response.kt new file mode 100644 index 0000000000..359b707968 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/StartFlowV1Response.kt @@ -0,0 +1,60 @@ +/** + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + * + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package org.openapitools.client.models + +import org.openapitools.client.models.FlowV1Error + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * + * + * @param flowStatus + * @param holdingIDShortHash + * @param timestamp + * @param clientRequestId + * @param flowError + * @param flowId + * @param flowResult + */ + + +data class StartFlowV1Response ( + + @Json(name = "flowStatus") + val flowStatus: kotlin.String, + + @Json(name = "holdingIDShortHash") + val holdingIDShortHash: kotlin.String, + + @Json(name = "timestamp") + val timestamp: java.time.OffsetDateTime, + + @Json(name = "clientRequestId") + val clientRequestId: kotlin.String? = null, + + @Json(name = "flowError") + val flowError: FlowV1Error? = null, + + @Json(name = "flowId") + val flowId: kotlin.String? = null, + + @Json(name = "flowResult") + val flowResult: kotlin.String? = null + +) + diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/api.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/api.ts index c4def3caae..0ea6c3fea5 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/api.ts +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/generated/openapi/typescript-axios/api.ts @@ -23,6 +23,31 @@ import type { RequestArgs } from './base'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; +/** + * + * @export + * @interface CPIIDV1 + */ +export interface CPIIDV1 { + /** + * + * @type {string} + * @memberof CPIIDV1 + */ + 'name': string; + /** + * + * @type {string} + * @memberof CPIIDV1 + */ + 'signerSummaryHash'?: string | null; + /** + * + * @type {string} + * @memberof CPIIDV1 + */ + 'version': string; +} /** * * @export @@ -373,6 +398,173 @@ export const FlowInvocationType = { export type FlowInvocationType = typeof FlowInvocationType[keyof typeof FlowInvocationType]; +/** + * + * @export + * @interface FlowStatusV1Responses + */ +export interface FlowStatusV1Responses { + /** + * + * @type {Array} + * @memberof FlowStatusV1Responses + */ + 'flowStatusResponses'?: Array; +} +/** + * + * @export + * @interface FlowStatusV1ResponsesFlowStatusResponsesInner + */ +export interface FlowStatusV1ResponsesFlowStatusResponsesInner { + /** + * + * @type {string} + * @memberof FlowStatusV1ResponsesFlowStatusResponsesInner + */ + 'clientRequestId'?: string | null; + /** + * + * @type {FlowV1Error} + * @memberof FlowStatusV1ResponsesFlowStatusResponsesInner + */ + 'flowError'?: FlowV1Error; + /** + * + * @type {string} + * @memberof FlowStatusV1ResponsesFlowStatusResponsesInner + */ + 'flowId'?: string | null; + /** + * + * @type {string} + * @memberof FlowStatusV1ResponsesFlowStatusResponsesInner + */ + 'flowResult'?: string | null; + /** + * + * @type {string} + * @memberof FlowStatusV1ResponsesFlowStatusResponsesInner + */ + 'flowStatus'?: string; + /** + * + * @type {string} + * @memberof FlowStatusV1ResponsesFlowStatusResponsesInner + */ + 'holdingIDShortHash'?: string; + /** + * + * @type {string} + * @memberof FlowStatusV1ResponsesFlowStatusResponsesInner + */ + 'timestamp'?: string; +} +/** + * + * @export + * @interface FlowV1Error + */ +export interface FlowV1Error { + /** + * + * @type {string} + * @memberof FlowV1Error + */ + 'message': string; + /** + * + * @type {string} + * @memberof FlowV1Error + */ + 'type': string; +} +/** + * This method gets the current status of the specified flow instance. + * @export + * @interface GetFlowCidV1Request + */ +export interface GetFlowCidV1Request { + /** + * + * @type {string} + * @memberof GetFlowCidV1Request + */ + 'username': string; + /** + * + * @type {string} + * @memberof GetFlowCidV1Request + */ + 'password': string; + /** + * + * @type {boolean} + * @memberof GetFlowCidV1Request + */ + 'rejectUnauthorized': boolean; + /** + * + * @type {string} + * @memberof GetFlowCidV1Request + */ + 'holdingIDShortHash'?: string; + /** + * + * @type {string} + * @memberof GetFlowCidV1Request + */ + 'clientRequestId'?: string; +} +/** + * + * @export + * @interface GetFlowCidV1Response + */ +export interface GetFlowCidV1Response { + /** + * + * @type {string} + * @memberof GetFlowCidV1Response + */ + 'clientRequestId'?: string | null; + /** + * + * @type {FlowV1Error} + * @memberof GetFlowCidV1Response + */ + 'flowError'?: FlowV1Error; + /** + * + * @type {string} + * @memberof GetFlowCidV1Response + */ + 'flowId'?: string | null; + /** + * + * @type {string} + * @memberof GetFlowCidV1Response + */ + 'flowResult'?: string | null; + /** + * + * @type {string} + * @memberof GetFlowCidV1Response + */ + 'flowStatus': string; + /** + * + * @type {string} + * @memberof GetFlowCidV1Response + */ + 'holdingIDShortHash': string; + /** + * + * @type {string} + * @memberof GetFlowCidV1Response + */ + 'timestamp': string; +} /** * * @export @@ -611,6 +803,130 @@ export const JvmTypeKind = { export type JvmTypeKind = typeof JvmTypeKind[keyof typeof JvmTypeKind]; +/** + * + * @export + * @interface ListCpiV1Request + */ +export interface ListCpiV1Request { + /** + * + * @type {string} + * @memberof ListCpiV1Request + */ + 'username': string; + /** + * + * @type {string} + * @memberof ListCpiV1Request + */ + 'password': string; + /** + * + * @type {boolean} + * @memberof ListCpiV1Request + */ + 'rejectUnauthorized': boolean; +} +/** + * + * @export + * @interface ListCpiV1Response + */ +export interface ListCpiV1Response { + /** + * + * @type {Array} + * @memberof ListCpiV1Response + */ + 'cpis'?: Array; +} +/** + * + * @export + * @interface ListCpiV1ResponseCpisInner + */ +export interface ListCpiV1ResponseCpisInner { + /** + * + * @type {string} + * @memberof ListCpiV1ResponseCpisInner + */ + 'cpiFileChecksum'?: string; + /** + * + * @type {string} + * @memberof ListCpiV1ResponseCpisInner + */ + 'cpiFileFullChecksum'?: string; + /** + * + * @type {Array} + * @memberof ListCpiV1ResponseCpisInner + */ + 'cpks'?: Array; + /** + * + * @type {string} + * @memberof ListCpiV1ResponseCpisInner + */ + 'groupPolicy'?: string | null; + /** + * + * @type {CPIIDV1} + * @memberof ListCpiV1ResponseCpisInner + */ + 'id'?: CPIIDV1; + /** + * + * @type {string} + * @memberof ListCpiV1ResponseCpisInner + */ + 'timestamp'?: string; +} +/** + * + * @export + * @interface ListCpiV1ResponseCpisInnerCpksInner + */ +export interface ListCpiV1ResponseCpisInnerCpksInner { + /** + * + * @type {string} + * @memberof ListCpiV1ResponseCpisInnerCpksInner + */ + 'hash'?: string; + /** + * + * @type {CPIIDV1} + * @memberof ListCpiV1ResponseCpisInnerCpksInner + */ + 'id'?: CPIIDV1; + /** + * + * @type {Array} + * @memberof ListCpiV1ResponseCpisInnerCpksInner + */ + 'libraries'?: Array; + /** + * + * @type {string} + * @memberof ListCpiV1ResponseCpisInnerCpksInner + */ + 'mainBundle'?: string; + /** + * + * @type {string} + * @memberof ListCpiV1ResponseCpisInnerCpksInner + */ + 'timestamp'?: string; + /** + * + * @type {string} + * @memberof ListCpiV1ResponseCpisInnerCpksInner + */ + 'type'?: string; +} /** * * @export @@ -799,6 +1115,135 @@ export interface SHA256 { */ 'size': number; } +/** + * This method starts a new instance for the specified flow for the specified holding identity. + * @export + * @interface StartFlowV1Request + */ +export interface StartFlowV1Request { + /** + * + * @type {string} + * @memberof StartFlowV1Request + */ + 'username': string; + /** + * + * @type {string} + * @memberof StartFlowV1Request + */ + 'password': string; + /** + * + * @type {boolean} + * @memberof StartFlowV1Request + */ + 'rejectUnauthorized': boolean; + /** + * + * @type {string} + * @memberof StartFlowV1Request + */ + 'holdingIDShortHash'?: string; + /** + * + * @type {string} + * @memberof StartFlowV1Request + */ + 'clientRequestId': string; + /** + * + * @type {string} + * @memberof StartFlowV1Request + */ + 'flowClassName': string; + /** + * + * @type {StartFlowV1RequestRequestBody} + * @memberof StartFlowV1Request + */ + 'requestBody': StartFlowV1RequestRequestBody; +} +/** + * + * @export + * @interface StartFlowV1RequestRequestBody + */ +export interface StartFlowV1RequestRequestBody { + /** + * + * @type {string} + * @memberof StartFlowV1RequestRequestBody + */ + 'chatName'?: string; + /** + * + * @type {string} + * @memberof StartFlowV1RequestRequestBody + */ + 'otherMember'?: string; + /** + * + * @type {string} + * @memberof StartFlowV1RequestRequestBody + */ + 'message'?: string; + /** + * + * @type {string} + * @memberof StartFlowV1RequestRequestBody + */ + 'numberOfRecords'?: string; +} +/** + * + * @export + * @interface StartFlowV1Response + */ +export interface StartFlowV1Response { + /** + * + * @type {string} + * @memberof StartFlowV1Response + */ + 'clientRequestId'?: string | null; + /** + * + * @type {FlowV1Error} + * @memberof StartFlowV1Response + */ + 'flowError'?: FlowV1Error; + /** + * + * @type {string} + * @memberof StartFlowV1Response + */ + 'flowId'?: string | null; + /** + * + * @type {string} + * @memberof StartFlowV1Response + */ + 'flowResult'?: string | null; + /** + * + * @type {string} + * @memberof StartFlowV1Response + */ + 'flowStatus': string; + /** + * + * @type {string} + * @memberof StartFlowV1Response + */ + 'holdingIDShortHash': string; + /** + * + * @type {string} + * @memberof StartFlowV1Response + */ + 'timestamp': string; +} /** * * @export @@ -1015,6 +1460,42 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati options: localVarRequestOptions, }; }, + /** + * + * @summary This method gets the current status of the specified flow instance. + * @param {GetFlowCidV1Request} getFlowCidV1Request This method gets the current status of the specified flow instance. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFlowV1: async (getFlowCidV1Request: GetFlowCidV1Request, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'getFlowCidV1Request' is not null or undefined + assertParamExists('getFlowV1', 'getFlowCidV1Request', getFlowCidV1Request) + const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(getFlowCidV1Request, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * * @summary Get transactions for monitored state classes. @@ -1113,6 +1594,78 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati options: localVarRequestOptions, }; }, + /** + * + * @summary List all CPIs uploaded to the cluster + * @param {ListCpiV1Request} listCpiV1Request + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listCpiV1: async (listCpiV1Request: ListCpiV1Request, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'listCpiV1Request' is not null or undefined + assertParamExists('listCpiV1', 'listCpiV1Request', listCpiV1Request) + const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(listCpiV1Request, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. + * @param {GetFlowCidV1Request} getFlowCidV1Request This method gets the current status of the specified flow instance. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listFlowV1: async (getFlowCidV1Request: GetFlowCidV1Request, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'getFlowCidV1Request' is not null or undefined + assertParamExists('listFlowV1', 'getFlowCidV1Request', getFlowCidV1Request) + const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(getFlowCidV1Request, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Responds with a list of the flows on the Corda node. * @param {ListFlowsV1Request} [listFlowsV1Request] @@ -1179,6 +1732,42 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati options: localVarRequestOptions, }; }, + /** + * + * @summary This method starts a new instance for the specified flow for the specified holding identity. + * @param {StartFlowV1Request} startFlowV1Request Request body for starting a flow + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + startFlowV1: async (startFlowV1Request: StartFlowV1Request, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'startFlowV1Request' is not null or undefined + assertParamExists('startFlowV1', 'startFlowV1Request', startFlowV1Request) + const localVarPath = `/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(startFlowV1Request, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * * @summary Start monitoring corda changes (transactions) of given state class @@ -1322,6 +1911,17 @@ export const DefaultApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.diagnoseNodeV1(diagnoseNodeV1Request, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * + * @summary This method gets the current status of the specified flow instance. + * @param {GetFlowCidV1Request} getFlowCidV1Request This method gets the current status of the specified flow instance. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getFlowV1(getFlowCidV1Request: GetFlowCidV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFlowV1(getFlowCidV1Request, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * * @summary Get transactions for monitored state classes. @@ -1354,6 +1954,28 @@ export const DefaultApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.invokeContractV1(invokeContractV1Request, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * + * @summary List all CPIs uploaded to the cluster + * @param {ListCpiV1Request} listCpiV1Request + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listCpiV1(listCpiV1Request: ListCpiV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listCpiV1(listCpiV1Request, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * + * @summary This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. + * @param {GetFlowCidV1Request} getFlowCidV1Request This method gets the current status of the specified flow instance. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listFlowV1(getFlowCidV1Request: GetFlowCidV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listFlowV1(getFlowCidV1Request, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Responds with a list of the flows on the Corda node. * @param {ListFlowsV1Request} [listFlowsV1Request] @@ -1374,6 +1996,17 @@ export const DefaultApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.networkMapV1(body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * + * @summary This method starts a new instance for the specified flow for the specified holding identity. + * @param {StartFlowV1Request} startFlowV1Request Request body for starting a flow + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async startFlowV1(startFlowV1Request: StartFlowV1Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.startFlowV1(startFlowV1Request, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * * @summary Start monitoring corda changes (transactions) of given state class @@ -1445,6 +2078,16 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa diagnoseNodeV1(diagnoseNodeV1Request?: DiagnoseNodeV1Request, options?: any): AxiosPromise { return localVarFp.diagnoseNodeV1(diagnoseNodeV1Request, options).then((request) => request(axios, basePath)); }, + /** + * + * @summary This method gets the current status of the specified flow instance. + * @param {GetFlowCidV1Request} getFlowCidV1Request This method gets the current status of the specified flow instance. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getFlowV1(getFlowCidV1Request: GetFlowCidV1Request, options?: any): AxiosPromise { + return localVarFp.getFlowV1(getFlowCidV1Request, options).then((request) => request(axios, basePath)); + }, /** * * @summary Get transactions for monitored state classes. @@ -1474,6 +2117,26 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa invokeContractV1(invokeContractV1Request?: InvokeContractV1Request, options?: any): AxiosPromise { return localVarFp.invokeContractV1(invokeContractV1Request, options).then((request) => request(axios, basePath)); }, + /** + * + * @summary List all CPIs uploaded to the cluster + * @param {ListCpiV1Request} listCpiV1Request + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listCpiV1(listCpiV1Request: ListCpiV1Request, options?: any): AxiosPromise { + return localVarFp.listCpiV1(listCpiV1Request, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. + * @param {GetFlowCidV1Request} getFlowCidV1Request This method gets the current status of the specified flow instance. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listFlowV1(getFlowCidV1Request: GetFlowCidV1Request, options?: any): AxiosPromise { + return localVarFp.listFlowV1(getFlowCidV1Request, options).then((request) => request(axios, basePath)); + }, /** * Responds with a list of the flows on the Corda node. * @param {ListFlowsV1Request} [listFlowsV1Request] @@ -1492,6 +2155,16 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa networkMapV1(body?: object, options?: any): AxiosPromise> { return localVarFp.networkMapV1(body, options).then((request) => request(axios, basePath)); }, + /** + * + * @summary This method starts a new instance for the specified flow for the specified holding identity. + * @param {StartFlowV1Request} startFlowV1Request Request body for starting a flow + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + startFlowV1(startFlowV1Request: StartFlowV1Request, options?: any): AxiosPromise { + return localVarFp.startFlowV1(startFlowV1Request, options).then((request) => request(axios, basePath)); + }, /** * * @summary Start monitoring corda changes (transactions) of given state class @@ -1566,6 +2239,18 @@ export class DefaultApi extends BaseAPI { return DefaultApiFp(this.configuration).diagnoseNodeV1(diagnoseNodeV1Request, options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @summary This method gets the current status of the specified flow instance. + * @param {GetFlowCidV1Request} getFlowCidV1Request This method gets the current status of the specified flow instance. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public getFlowV1(getFlowCidV1Request: GetFlowCidV1Request, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).getFlowV1(getFlowCidV1Request, options).then((request) => request(this.axios, this.basePath)); + } + /** * * @summary Get transactions for monitored state classes. @@ -1601,6 +2286,30 @@ export class DefaultApi extends BaseAPI { return DefaultApiFp(this.configuration).invokeContractV1(invokeContractV1Request, options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @summary List all CPIs uploaded to the cluster + * @param {ListCpiV1Request} listCpiV1Request + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public listCpiV1(listCpiV1Request: ListCpiV1Request, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).listCpiV1(listCpiV1Request, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary This method returns an array containing the statuses of all flows running for a specified holding identity. An empty array is returned if there are no flows running. + * @param {GetFlowCidV1Request} getFlowCidV1Request This method gets the current status of the specified flow instance. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public listFlowV1(getFlowCidV1Request: GetFlowCidV1Request, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).listFlowV1(getFlowCidV1Request, options).then((request) => request(this.axios, this.basePath)); + } + /** * Responds with a list of the flows on the Corda node. * @param {ListFlowsV1Request} [listFlowsV1Request] @@ -1623,6 +2332,18 @@ export class DefaultApi extends BaseAPI { return DefaultApiFp(this.configuration).networkMapV1(body, options).then((request) => request(this.axios, this.basePath)); } + /** + * + * @summary This method starts a new instance for the specified flow for the specified holding identity. + * @param {StartFlowV1Request} startFlowV1Request Request body for starting a flow + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public startFlowV1(startFlowV1Request: StartFlowV1Request, options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).startFlowV1(startFlowV1Request, options).then((request) => request(this.axios, this.basePath)); + } + /** * * @summary Start monitoring corda changes (transactions) of given state class diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/plugin-ledger-connector-corda.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/plugin-ledger-connector-corda.ts index 02729494ed..fd1b0fc57d 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/plugin-ledger-connector-corda.ts +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/plugin-ledger-connector-corda.ts @@ -2,8 +2,17 @@ import type { Server } from "http"; import type { Server as SecureServer } from "https"; import type { Config as SshConfig } from "node-ssh"; import type { Express } from "express"; - +import urlcat from "urlcat"; import OAS from "../json/openapi.json"; +import { BadRequestError, GatewayTimeoutError } from "http-errors-enhanced-cjs"; + +import { + ListCpiV1Response, + StartFlowV1Request, + GetFlowCidV1Response, + GetFlowCidV1Request, + ListCpiV1Request, +} from "./generated/openapi/typescript-axios"; import { IPluginLedgerConnector, @@ -32,6 +41,19 @@ import { IInvokeContractEndpointV1Options, InvokeContractEndpointV1, } from "./web-services/invoke-contract-endpoint-v1"; + +import { + IListCPIEndpointV1Options, + ListCPIEndpointV1, +} from "./web-services/list-cpi-endpoint-v1"; +import { + IFlowStatusEndpointV1Options, + FlowStatusEndpointV1, +} from "./web-services/list-flow-endpoint-v1"; +import { + IFlowStatusResponseEndpointV1Options, + FlowStatusResponseEndpointV1, +} from "./web-services/get-flow-endpoint-v1"; import { IListFlowsEndpointV1Options, ListFlowsEndpointV1, @@ -44,9 +66,17 @@ import { IDiagnoseNodeEndpointV1Options, DiagnoseNodeEndpointV1, } from "./web-services/diagnose-node-endpoint-v1"; - +import { + IStartFlowEndpointV1Options, + StartFlowEndpointV1, +} from "./web-services/start-flow-endpoint-v1"; import fs from "fs"; - +import fetch from "node-fetch"; +import https from "https"; +export enum CordaVersion { + CORDA_V4X = "CORDA_V4X", + CORDA_V5 = "CORDA_V5X", +} export interface IPluginLedgerConnectorCordaOptions extends ICactusPluginOptions { logLevel?: LogLevelDesc; @@ -56,6 +86,9 @@ export interface IPluginLedgerConnectorCordaOptions cordaStartCmd?: string; cordaStopCmd?: string; apiUrl?: string; + cordaVersion?: CordaVersion; + holdingIDShortHash?: any; + clientRequestID?: any; /** * Path to the file where the private key for the ssh configuration is located * This property is optional. Its use is not recommended for most cases, it will override the privateKey property of the sshConfigAdminShell. @@ -63,19 +96,26 @@ export interface IPluginLedgerConnectorCordaOptions * @memberof IPluginLedgerConnectorCordaOptions */ sshPrivateKeyPath?: string; + cordaApiUrl?: string; } export class PluginLedgerConnectorCorda - implements IPluginLedgerConnector, IPluginWebService + implements + IPluginLedgerConnector< + GetFlowCidV1Response, + StartFlowV1Request, + ListCpiV1Response, + any + >, + IPluginWebService { public static readonly CLASS_NAME = "DeployContractJarsEndpoint"; private readonly instanceId: string; private readonly log: Logger; public prometheusExporter: PrometheusExporter; - private endpoints: IWebServiceEndpoint[] | undefined; - + public readonly cordaApiUrl: string; public get className(): string { return DeployContractJarsEndpoint.CLASS_NAME; } @@ -100,6 +140,9 @@ export class PluginLedgerConnectorCorda this.prometheusExporter, `${fnTag} options.prometheusExporter`, ); + + this.cordaApiUrl = options.cordaApiUrl || "https://127.0.0.1:8888"; + this.prometheusExporter.startMetricsCollection(); // if privateKeyPath exists, overwrite privateKey in sshConfigAdminShell this.readSshPrivateKeyFromFile(); @@ -204,7 +247,6 @@ export class PluginLedgerConnectorCorda const endpoint = new GetPrometheusExporterMetricsEndpointV1(opts); endpoints.push(endpoint); } - { const opts: IListFlowsEndpointV1Options = { apiUrl: this.options.apiUrl, @@ -232,6 +274,47 @@ export class PluginLedgerConnectorCorda endpoints.push(endpoint); } + { + const opts: IListCPIEndpointV1Options = { + apiUrl: this.options.apiUrl as string, + logLevel: this.options.logLevel, + connector: this, + }; + const endpoint = new ListCPIEndpointV1(opts); + endpoints.push(endpoint); + } + + { + const opts: IFlowStatusEndpointV1Options = { + apiUrl: this.options.apiUrl as string, + logLevel: this.options.logLevel, + holdingIDShortHash: this.options.holdingIDShortHash, + connector: this, + }; + const endpoint = new FlowStatusEndpointV1(opts); + endpoints.push(endpoint); + } + + { + const opts: IFlowStatusResponseEndpointV1Options = { + apiUrl: this.options.apiUrl as string, + logLevel: this.options.logLevel, + holdingIDShortHash: this.options.holdingIDShortHash, + clientRequestID: this.options.clientRequestID, + connector: this, + }; + const endpoint = new FlowStatusResponseEndpointV1(opts); + endpoints.push(endpoint); + } + { + const opts: IStartFlowEndpointV1Options = { + apiUrl: this.options.apiUrl as string, + logLevel: this.options.logLevel, + connector: this, + }; + const endpoint = new StartFlowEndpointV1(opts); + endpoints.push(endpoint); + } this.log.info(`Instantiated endpoints of ${pkgName}`); return endpoints; } @@ -243,4 +326,225 @@ export class PluginLedgerConnectorCorda public async getFlowList(): Promise { return ["getFlowList()_NOT_IMPLEMENTED"]; } + + private async setupRequest( + username: string, + password: string, + rejectUnauthorized: boolean, + ): Promise<{ headers: any; agent: any }> { + const authString = Buffer.from(`${username}:${password}`).toString( + "base64", + ); + const headers = { Authorization: `Basic ${authString}` }; + const httpsAgent = new https.Agent({ + rejectUnauthorized, + }); + return { headers, agent: httpsAgent }; + } + + private validateHoldingIDShortHash(inputString: string): boolean { + /* only hexadecimal characters and exactly 12 characters long as per the corda docs + https://docs.r3.com/en/platform/corda/5.2/developing-applications/cordapp-template/utxo-ledger-example-cordapp/running-the-chat-cordapp.html#using-swagger + */ + const pattern = /^[0-9A-Fa-f]{12}$/; + return pattern.test(inputString); + } + + public async startFlow(req: StartFlowV1Request): Promise { + try { + const { headers, agent } = await this.setupRequest( + req.username, + req.password, + req.rejectUnauthorized, + ); + const holdingIDShortHash = req.holdingIDShortHash; + if (typeof holdingIDShortHash === "undefined") { + throw new BadRequestError("holdingIDShortHash is undefined"); + } + if (!this.validateHoldingIDShortHash(holdingIDShortHash)) { + throw new BadRequestError( + `Invalid holdingIDShortHash: ${holdingIDShortHash}`, + ); + } + const cordaReq = { + clientRequestId: req.clientRequestId, + flowClassName: req.flowClassName, + requestBody: req.requestBody, + }; + const cordaReqBuff = Buffer.from(JSON.stringify(cordaReq)); + const startFlowUrl = urlcat( + this.cordaApiUrl, + "/api/v1/flow/:holdingIDShortHash", + { + holdingIDShortHash, + }, + ); + const response = await fetch(startFlowUrl, { + method: `POST`, + headers, + body: cordaReqBuff, + agent, + }); + await new Promise((resolve) => setTimeout(resolve, 5000)); + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + const responseData = await this.pollEndpointUntilCompleted( + req.holdingIDShortHash!, + req.clientRequestId, + ); + return responseData; + } catch (error) { + console.error("Error starting flow:", error); + throw error; + } + } + + public async listCPI(req: ListCpiV1Request): Promise { + try { + const { headers, agent } = await this.setupRequest( + req.username, + req.password, + req.rejectUnauthorized, + ); + const cpiUrl = urlcat(this.cordaApiUrl, "/api/v1/cpi"); + const response = await fetch(cpiUrl, { + method: `GET`, + headers: headers, + agent, + }); + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + const responseData = await response.json(); + return responseData; + } catch (error) { + console.error("Error fetching data:", error); + } + } + + public async getFlow(req: GetFlowCidV1Request): Promise { + try { + const { headers, agent } = await this.setupRequest( + req.username, + req.password, + req.rejectUnauthorized, + ); + if (typeof req.holdingIDShortHash === "undefined") { + throw new BadRequestError("holdingIDShortHash is undefined"); + } + if (!this.validateHoldingIDShortHash(req.holdingIDShortHash)) { + throw new BadRequestError( + `Invalid holdingIDShortHash: ${req.holdingIDShortHash}`, + ); + } + const getFlowUrl = urlcat( + this.cordaApiUrl, + "/api/v1/flow/:holdingIDShortHash/:clientRequestId", + { + holdingIDShortHash: req.holdingIDShortHash, + clientRequestId: req.clientRequestId, + }, + ); + const response = await fetch(getFlowUrl, { + method: `GET`, + headers: headers, + agent, + }); + if (!response.ok) { + throw new BadRequestError(`HTTP error! status: ${response.status}`); + } + const responseData = await response.json(); + return responseData; + } catch (error) { + console.error("Error fetching data:", error); + } + } + + public async listFlows(req: GetFlowCidV1Request): Promise { + try { + const { headers, agent } = await this.setupRequest( + req.username, + req.password, + req.rejectUnauthorized, + ); + if (typeof req.holdingIDShortHash === "undefined") { + throw new BadRequestError("holdingIDShortHash is undefined"); + } + if (!this.validateHoldingIDShortHash(req.holdingIDShortHash)) { + throw new BadRequestError( + `Invalid holdingIDShortHash: ${req.holdingIDShortHash}`, + ); + } + const listFlowsUrl = urlcat( + this.cordaApiUrl, + "/api/v1/flow/:holdingIDShortHash", + { + holdingIDShortHash: req.holdingIDShortHash, + }, + ); + const response = await fetch(listFlowsUrl, { + method: `GET`, + headers: headers, + agent, + }); + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + const responseData = await response.json(); + return responseData; + } catch (error) { + console.error("Error fetching data:", error); + } + } + + public async pollEndpointUntilCompleted( + shortHash: string, + clientRequestId: string, + interval = 5000, + maxAttempts = 10, + ): Promise { + return new Promise(async (resolve, reject) => { + let attempts = 0; + + const poll = async () => { + attempts++; + const queryVar: GetFlowCidV1Request = { + username: "admin", + password: "admin", + rejectUnauthorized: false, + holdingIDShortHash: shortHash, + clientRequestId, + }; + try { + const response = await this.getFlow(queryVar); + if (response.flowStatus === "COMPLETED") { + resolve(response); + } else { + if (attempts < maxAttempts) { + setTimeout(poll, interval); + } else { + reject( + new Error( + `Max attempts (${maxAttempts}) reached. Flow status not completed.`, + ), + ); + } + } + } catch (error) { + if (attempts < maxAttempts) { + setTimeout(poll, interval); + } else { + reject( + new GatewayTimeoutError( + `Max attempts (${maxAttempts}) reached. Unable to get flow status.`, + ), + ); + } + } + }; + + poll(); + }); + } } diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/public-api.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/public-api.ts index 7bc9ecc5cf..df61e94b95 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/public-api.ts +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/public-api.ts @@ -1,6 +1,7 @@ export { PluginLedgerConnectorCorda, IPluginLedgerConnectorCordaOptions, + CordaVersion, } from "./plugin-ledger-connector-corda"; export * from "./generated/openapi/typescript-axios/index"; diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/get-flow-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/get-flow-endpoint-v1.ts new file mode 100644 index 0000000000..f29adf235a --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/get-flow-endpoint-v1.ts @@ -0,0 +1,119 @@ +import { Express, Request, Response } from "express"; + +import { + IWebServiceEndpoint, + IExpressRequestHandler, + IEndpointAuthzOptions, +} from "@hyperledger/cactus-core-api"; + +import { + registerWebServiceEndpoint, + handleRestEndpointException, +} from "@hyperledger/cactus-core"; + +import { + Checks, + IAsyncProvider, + Logger, + LoggerProvider, + LogLevelDesc, +} from "@hyperledger/cactus-common"; +import { InternalServerError } from "http-errors-enhanced-cjs"; +import OAS from "../../json/openapi.json"; +import { PluginLedgerConnectorCorda } from "../plugin-ledger-connector-corda"; + +export interface IFlowStatusResponseEndpointV1Options { + logLevel?: LogLevelDesc; + apiUrl: string; + holdingIDShortHash: string; + clientRequestID: string; + connector: PluginLedgerConnectorCorda; +} + +export class FlowStatusResponseEndpointV1 implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "FlowStatusResponseEndpointV1"; + + private readonly log: Logger; + private readonly apiUrl: string; + public get className(): string { + return FlowStatusResponseEndpointV1.CLASS_NAME; + } + + constructor(public readonly options: IFlowStatusResponseEndpointV1Options) { + const fnTag = `${this.className}#constructor()`; + + Checks.truthy(options, `${fnTag} options`); + Checks.truthy(options.connector, `${fnTag} options.connector`); + Checks.nonBlankString(options.apiUrl, `${fnTag} options.apiUrl`); + + this.log = LoggerProvider.getOrCreate({ + label: "list-flow-status-response-endpoint-v1", + level: options.logLevel || "INFO", + }); + + try { + new URL(options.apiUrl); + } catch (err) { + throw new Error(`${fnTag} Invalid URL: ${options.apiUrl}`); + } + this.apiUrl = options.apiUrl; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + return { + get: async () => ({ + isProtected: true, + requiredRoles: [], + }), + }; + } + + public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid"] { + return OAS.paths[ + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/get-flow-cid" + ]; + } + + /** + * Returns the endpoint path to be used when installing the endpoint into the + * API server of Cactus. + */ + public getPath(): string { + return this.oasPath.get["x-hyperledger-cactus"].http.path; + } + + public getVerbLowerCase(): string { + return this.oasPath.get["x-hyperledger-cactus"].http.verbLowerCase; + } + + public getOperationId(): string { + return this.oasPath.get.operationId; + } + + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + + async handleRequest(req: Request, res: Response): Promise { + const fnTag = "getFlowV1#handleRequest()"; + const verbUpper = this.getVerbLowerCase().toUpperCase(); + this.log.debug(`${verbUpper} ${this.getPath()}`); + try { + if (this.apiUrl === undefined) + throw new InternalServerError("apiUrl option is necessary"); + const body = await this.options.connector.getFlow(req.body); + res.status(200); + res.json(body); + } catch (ex) { + const errorMsg = `${fnTag} Failed to perform request:`; + handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); + } + } +} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/list-cpi-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/list-cpi-endpoint-v1.ts new file mode 100644 index 0000000000..5483b981d1 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/list-cpi-endpoint-v1.ts @@ -0,0 +1,117 @@ +import { Express, Request, Response } from "express"; +import { + IWebServiceEndpoint, + IExpressRequestHandler, + IEndpointAuthzOptions, +} from "@hyperledger/cactus-core-api"; + +import { + registerWebServiceEndpoint, + handleRestEndpointException, +} from "@hyperledger/cactus-core"; + +import { + Checks, + IAsyncProvider, + Logger, + LoggerProvider, + LogLevelDesc, +} from "@hyperledger/cactus-common"; +import { InternalServerError } from "http-errors-enhanced-cjs"; +import OAS from "../../json/openapi.json"; +import { PluginLedgerConnectorCorda } from "../plugin-ledger-connector-corda"; +export interface IListCPIEndpointV1Options { + logLevel?: LogLevelDesc; + apiUrl: string; + connector: PluginLedgerConnectorCorda; +} + +export class ListCPIEndpointV1 implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "ListCPIEndpointV1"; + + private readonly log: Logger; + private readonly apiUrl: string; + + public get className(): string { + return ListCPIEndpointV1.CLASS_NAME; + } + + constructor(public readonly options: IListCPIEndpointV1Options) { + const fnTag = `${this.className}#constructor()`; + + Checks.truthy(options, `${fnTag} options`); + Checks.truthy(options.connector, `${fnTag} options.connector`); + Checks.nonBlankString(options.apiUrl, `${fnTag} options.apiUrl`); + + this.log = LoggerProvider.getOrCreate({ + label: "list-cpi-endpoint-v1", + level: options.logLevel || "INFO", + }); + + try { + new URL(options.apiUrl); + } catch (err) { + throw new Error(`${fnTag} Invalid URL: ${options.apiUrl}`); + } + this.apiUrl = options.apiUrl; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + return { + get: async () => ({ + isProtected: true, + requiredRoles: [], + }), + }; + } + + public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi"] { + return OAS.paths[ + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-cpi" + ]; + } + + /** + * Returns the endpoint path to be used when installing the endpoint into the + * API server of Cactus. + */ + public getPath(): string { + return this.oasPath.get["x-hyperledger-cactus"].https.path; + } + + public getVerbLowerCase(): string { + return this.oasPath.get["x-hyperledger-cactus"].https.verbLowerCase; + } + + public getOperationId(): string { + return this.oasPath.get.operationId; + } + + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + + async handleRequest(req: Request, res: Response): Promise { + const fnTag = "listCPIV1#handleRequest()"; + const verbUpper = this.getVerbLowerCase().toUpperCase(); + this.log.debug(`${verbUpper} ${this.getPath()}`); + + try { + if (this.apiUrl === undefined) + throw new InternalServerError("apiUrl option is necessary"); + const body = await this.options.connector.listCPI(req.body); + res.status(200); + res.json(body); + } catch (ex) { + const errorMsg = `${fnTag} Failed to perform request:`; + handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); + } + } +} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/list-flow-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/list-flow-endpoint-v1.ts new file mode 100644 index 0000000000..64c7618d98 --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/list-flow-endpoint-v1.ts @@ -0,0 +1,119 @@ +import { Express, Request, Response } from "express"; + +import { + IWebServiceEndpoint, + IExpressRequestHandler, + IEndpointAuthzOptions, +} from "@hyperledger/cactus-core-api"; + +import { + registerWebServiceEndpoint, + handleRestEndpointException, +} from "@hyperledger/cactus-core"; + +import { + Checks, + IAsyncProvider, + Logger, + LoggerProvider, + LogLevelDesc, +} from "@hyperledger/cactus-common"; + +import { InternalServerError } from "http-errors-enhanced-cjs"; +import OAS from "../../json/openapi.json"; +import { PluginLedgerConnectorCorda } from "../plugin-ledger-connector-corda"; + +export interface IFlowStatusEndpointV1Options { + logLevel?: LogLevelDesc; + apiUrl: string; + holdingIDShortHash: string; + connector: PluginLedgerConnectorCorda; +} + +export class FlowStatusEndpointV1 implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "FlowStatusEndpointV1"; + + private readonly log: Logger; + private readonly apiUrl: string; + + public get className(): string { + return FlowStatusEndpointV1.CLASS_NAME; + } + + constructor(public readonly options: IFlowStatusEndpointV1Options) { + const fnTag = `${this.className}#constructor()`; + + Checks.truthy(options, `${fnTag} options`); + Checks.truthy(options.connector, `${fnTag} options.connector`); + Checks.nonBlankString(options.apiUrl, `${fnTag} options.apiUrl`); + + this.log = LoggerProvider.getOrCreate({ + label: "list-flow-status-endpoint-v1", + level: options.logLevel || "INFO", + }); + + try { + new URL(options.apiUrl); + } catch (err) { + throw new Error(`${fnTag} Invalid URL: ${options.apiUrl}`); + } + this.apiUrl = options.apiUrl; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + return { + get: async () => ({ + isProtected: true, + requiredRoles: [], + }), + }; + } + + public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow"] { + return OAS.paths[ + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/list-flow" + ]; + } + + /** + * Returns the endpoint path to be used when installing the endpoint into the + * API server of Cactus. + */ + public getPath(): string { + return this.oasPath.get["x-hyperledger-cactus"].http.path; + } + + public getVerbLowerCase(): string { + return this.oasPath.get["x-hyperledger-cactus"].http.verbLowerCase; + } + + public getOperationId(): string { + return this.oasPath.get.operationId; + } + + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + async handleRequest(req: Request, res: Response): Promise { + const fnTag = "listFlowV1#handleRequest()"; + const verbUpper = this.getVerbLowerCase().toUpperCase(); + this.log.debug(`${verbUpper} ${this.getPath()}`); + try { + if (this.apiUrl === undefined) + throw new InternalServerError("apiUrl option is necessary"); + const body = await this.options.connector.listFlows(req.body); + res.status(200); + res.json(body); + } catch (ex) { + const errorMsg = `${fnTag} Failed to perform request:`; + handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); + } + } +} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/start-flow-endpoint-v1.ts b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/start-flow-endpoint-v1.ts new file mode 100644 index 0000000000..7da6f8cf1f --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/main/typescript/web-services/start-flow-endpoint-v1.ts @@ -0,0 +1,117 @@ +import { Express, Request, Response } from "express"; + +import { + IWebServiceEndpoint, + IExpressRequestHandler, + IEndpointAuthzOptions, +} from "@hyperledger/cactus-core-api"; + +import { + registerWebServiceEndpoint, + handleRestEndpointException, +} from "@hyperledger/cactus-core"; + +import { + Checks, + IAsyncProvider, + Logger, + LoggerProvider, + LogLevelDesc, +} from "@hyperledger/cactus-common"; +import { InternalServerError } from "http-errors-enhanced-cjs"; +import OAS from "../../json/openapi.json"; +import { PluginLedgerConnectorCorda } from "../plugin-ledger-connector-corda"; + +export interface IStartFlowEndpointV1Options { + logLevel?: LogLevelDesc; + apiUrl: string; + connector: PluginLedgerConnectorCorda; +} + +export class StartFlowEndpointV1 implements IWebServiceEndpoint { + public static readonly CLASS_NAME = "StartFlowEndpointV1"; + + private readonly log: Logger; + private readonly apiUrl: string; + + public get className(): string { + return StartFlowEndpointV1.CLASS_NAME; + } + + constructor(public readonly options: IStartFlowEndpointV1Options) { + const fnTag = `${this.className}#constructor()`; + + Checks.truthy(options, `${fnTag} options`); + Checks.truthy(options.connector, `${fnTag} options.connector`); + Checks.nonBlankString(options.apiUrl, `${fnTag} options.apiUrl`); + + this.log = LoggerProvider.getOrCreate({ + label: "start-flow-endpoint-v1", + level: options.logLevel || "INFO", + }); + + try { + new URL(options.apiUrl); + } catch (err) { + throw new Error(`${fnTag} Invalid URL: ${options.apiUrl}`); + } + this.apiUrl = options.apiUrl; + } + + getAuthorizationOptionsProvider(): IAsyncProvider { + return { + get: async () => ({ + isProtected: true, + requiredRoles: [], + }), + }; + } + + public get oasPath(): (typeof OAS.paths)["/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow"] { + return OAS.paths[ + "/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-corda/start-flow" + ]; + } + + /** + * Returns the endpoint path to be used when installing the endpoint into the + * API server of Cactus. + */ + public getPath(): string { + return this.oasPath.post["x-hyperledger-cactus"].http.path; + } + + public getVerbLowerCase(): string { + return this.oasPath.post["x-hyperledger-cactus"].http.verbLowerCase; + } + + public getOperationId(): string { + return this.oasPath.post.operationId; + } + + public getExpressRequestHandler(): IExpressRequestHandler { + return this.handleRequest.bind(this); + } + + public async registerExpress( + expressApp: Express, + ): Promise { + await registerWebServiceEndpoint(expressApp, this); + return this; + } + async handleRequest(req: Request, res: Response): Promise { + const fnTag = "startFlowV1#handleRequest()"; + const verbUpper = this.getVerbLowerCase().toUpperCase(); + this.log.debug(`${verbUpper} ${this.getPath()}`); + try { + if (this.apiUrl === undefined) + throw new InternalServerError("apiUrl option is necessary"); + const body = await this.options.connector.startFlow(req.body); + res.status(200); + res.json(body); + } catch (ex) { + const errorMsg = `${fnTag} Failed to perform request:`; + handleRestEndpointException({ errorMsg, log: this.log, error: ex, res }); + } + } +} diff --git a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/corda-v5-x/corda-v5-flow.test.ts b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/corda-v5-x/corda-v5-flow.test.ts new file mode 100644 index 0000000000..338ff7982f --- /dev/null +++ b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/corda-v5-x/corda-v5-flow.test.ts @@ -0,0 +1,324 @@ +import { v4 as uuidv4 } from "uuid"; +import "jest-extended"; +import { + CordaV5TestLedger, + Containers, + pruneDockerAllIfGithubAction, +} from "@hyperledger/cactus-test-tooling"; + +import { + IListenOptions, + LogLevelDesc, + Servers, +} from "@hyperledger/cactus-common"; +import { + PluginLedgerConnectorCorda, + CordaVersion, +} from "../../../../main/typescript/plugin-ledger-connector-corda"; +import { DefaultApi } from "../../../../main/typescript/generated/openapi/typescript-axios/index"; + +const logLevel: LogLevelDesc = "TRACE"; + +import http from "http"; +import { extractShortHash } from "./../../../../../../cactus-test-tooling/src/main/typescript/corda/corda-v5-test-ledger"; +import express from "express"; +import bodyParser from "body-parser"; +import { AddressInfo } from "net"; +import { Configuration } from "@hyperledger/cactus-core-api"; + +describe("Corda Test Case", () => { + const cordaV5TestLedger = new CordaV5TestLedger(); + let apiClient: DefaultApi; + const expressApp = express(); + const server = http.createServer(expressApp); + let plugin: PluginLedgerConnectorCorda; + + beforeAll(async () => { + await cordaV5TestLedger.start(); + expect(cordaV5TestLedger).toBeTruthy(); + const pruning = pruneDockerAllIfGithubAction({ logLevel }); + await expect(pruning).resolves.toBeTruthy(); + expressApp.use(bodyParser.json({ limit: "250mb" })); + const sshConfig = await cordaV5TestLedger.getSshConfig(); + + plugin = new PluginLedgerConnectorCorda({ + instanceId: uuidv4(), + sshConfigAdminShell: sshConfig, + corDappsDir: "", + logLevel, + cordaVersion: CordaVersion.CORDA_V5, + apiUrl: "https://127.0.0.1:8888", + }); + const listenOptions: IListenOptions = { + hostname: "127.0.0.1", + port: 0, + server, + }; + const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; + const { address, port } = addressInfo; + const apiHost = `http://${address}:${port}`; + const config = new Configuration({ basePath: apiHost }); + await plugin.registerWebServices(expressApp); + apiClient = new DefaultApi(config); + }); + afterAll(async () => { + await cordaV5TestLedger.stop(); + await cordaV5TestLedger.destroy(); + await Servers.shutdown(server); + }); + let shortHashID: string; + it("Listing VNodes", async () => { + const container = cordaV5TestLedger.getContainer(); + const cmd = ["./gradlew", "listVNodes"]; + const timeout = 180000; // 3 minutes + const cwd = "/CSDE-cordapp-template-kotlin"; + shortHashID = await Containers.exec(container, cmd, timeout, logLevel, cwd); + }); + + describe("Endpoint Testing", () => { + let shortHashAlice = ""; + let shortHashBob = ""; + let shortHashCharlie = ""; + let shortHashDave = ""; + it("Extract short hash for Alice", () => { + shortHashAlice = extractShortHash(shortHashID, "Alice"); + expect(shortHashAlice).toBeTruthy(); + expect(`Short hash ID for Alice: ${shortHashAlice}`).toMatch( + /Short hash ID for Alice:/, + ); + console.log(`Short hash ID for Alice: ${shortHashAlice}`); + }); + it("Extract short hash for Bob", () => { + shortHashBob = extractShortHash(shortHashID, "Bob"); + expect(shortHashBob).toBeTruthy(); + expect(`Short hash ID for Bob: ${shortHashBob}`).toMatch( + /Short hash ID for Bob:/, + ); + console.log(`Short hash ID for Bob: ${shortHashBob}`); + }); + it("Extract short hash for Charlie", () => { + shortHashCharlie = extractShortHash(shortHashID, "Charlie"); + expect(typeof shortHashCharlie === "string").toBe(true); + expect(shortHashCharlie).toBeTruthy(); + expect(`Short hash ID for Charlie: ${shortHashCharlie}`).toMatch( + /Short hash ID for Charlie:/, + ); + console.log(`Short hash ID for Charlie: ${shortHashCharlie}`); + }); + it("Extract short hash for Dave", () => { + shortHashDave = extractShortHash(shortHashID, "Dave"); + expect(shortHashDave).toBeTruthy(); + expect(`Short hash ID for Dave: ${shortHashDave}`).toMatch( + /Short hash ID for Dave:/, + ); + console.log(`Short hash ID for Dave: ${shortHashDave}`); + }); + + it("Listing CPIs", async () => { + const req = { + username: "admin", + password: "admin", + rejectUnauthorized: false, + }; + const listCPI = await apiClient.listCpiV1(req); + expect(listCPI).toBeTruthy(); + }); + test("Simulate conversation between Alice and Bob", async () => { + const username = "admin"; + const password = "admin"; + const rejectUnauthorized = false; + //1. Alice creates a new chat + const aliceCreateChat = { + username, + password, + rejectUnauthorized, + holdingIDShortHash: shortHashAlice, + clientRequestId: "create-1", + flowClassName: + "com.r3.developers.csdetemplate.utxoexample.workflows.CreateNewChatFlow", + requestBody: { + chatName: "Chat with Bob", + otherMember: "CN=Bob, OU=Test Dept, O=R3, L=London, C=GB", + message: "Hello Bob", + }, + }; + let startflowChat = await apiClient.startFlowV1(aliceCreateChat); + expect(startflowChat).toBeTruthy(); + + //2. Bob lists his chats + const bobListChats = { + username, + password, + rejectUnauthorized, + holdingIDShortHash: shortHashBob, + clientRequestId: "list-1", + flowClassName: + "com.r3.developers.csdetemplate.utxoexample.workflows.ListChatsFlow", + requestBody: {}, + }; + startflowChat = await apiClient.startFlowV1(bobListChats); + expect(startflowChat).toBeTruthy(); + const flowResult = + startflowChat.data !== null && startflowChat.data !== undefined + ? startflowChat.data.flowResult + : null; + const chatWithBobId = (() => { + if (typeof flowResult === "string") { + const parseFlowResult = JSON.parse(flowResult); + const chatWithBobObj = parseFlowResult.find( + (item: { chatName: string }) => item.chatName === "Chat with Bob", + ); + return chatWithBobObj && "id" in chatWithBobObj + ? chatWithBobObj.id + : undefined; + } + })(); + //3. Bob updates chat twice + const bobUpdate1 = { + username, + password, + rejectUnauthorized, + holdingIDShortHash: shortHashBob, + clientRequestId: "update-1", + flowClassName: + "com.r3.developers.csdetemplate.utxoexample.workflows.UpdateChatFlow", + requestBody: { + id: chatWithBobId, + message: "Hi Alice", + }, + }; + const bobUpdate1Response = await apiClient.startFlowV1(bobUpdate1); + expect(bobUpdate1Response).toBeTruthy(); + const bobUpdate2 = { + username, + password, + rejectUnauthorized, + holdingIDShortHash: shortHashBob, + clientRequestId: "update-2", + flowClassName: + "com.r3.developers.csdetemplate.utxoexample.workflows.UpdateChatFlow", + requestBody: { + id: chatWithBobId, + message: "How are you today?", + }, + }; + const bobUpdate2Response = await apiClient.startFlowV1(bobUpdate2); + expect(bobUpdate2Response).toBeTruthy(); + + //4. Alice lists chat + const aliceListsChat = { + username, + password, + rejectUnauthorized, + holdingIDShortHash: shortHashAlice, + clientRequestId: "list-2", + flowClassName: + "com.r3.developers.csdetemplate.utxoexample.workflows.ListChatsFlow", + requestBody: {}, + }; + const aliceList2Response = await apiClient.startFlowV1(aliceListsChat); + expect(aliceList2Response).toBeTruthy(); + + //5. Alice checks the history of the chat with Bob + const aliceHistoryRequest = { + username, + password, + rejectUnauthorized, + holdingIDShortHash: shortHashAlice, + clientRequestId: "get-1", + flowClassName: + "com.r3.developers.csdetemplate.utxoexample.workflows.GetChatFlow", + requestBody: { + id: chatWithBobId, + numberOfRecords: "4", + }, + }; + const aliceHistoryResponse = + await apiClient.startFlowV1(aliceHistoryRequest); + expect(aliceHistoryResponse).toBeTruthy(); + + //6. Alice replies to Bob + const aliceReply = { + username, + password, + rejectUnauthorized, + holdingIDShortHash: shortHashAlice, + clientRequestId: "update-4", + flowClassName: + "com.r3.developers.csdetemplate.utxoexample.workflows.UpdateChatFlow", + requestBody: { + id: chatWithBobId, + message: "I am very well thank you", + }, + }; + + const aliceReplyResponse = await apiClient.startFlowV1(aliceReply); + expect(aliceReplyResponse).toBeTruthy(); + + //7. Bob gets the chat history + const bobHistoryRequest = { + username, + password, + rejectUnauthorized, + holdingIDShortHash: shortHashBob, + clientRequestId: "get-2", + flowClassName: + "com.r3.developers.csdetemplate.utxoexample.workflows.GetChatFlow", + requestBody: { + id: chatWithBobId, + numberOfRecords: "2", + }, + }; + const bobHistoryResponse = await apiClient.startFlowV1(bobHistoryRequest); + expect(bobHistoryResponse).toBeTruthy(); + + //8. List Flows Endpoint Test + const queryVar = { + username, + password, + rejectUnauthorized, + holdingIDShortHash: shortHashBob, + }; + const response = await apiClient.listFlowV1(queryVar); + expect(response).toBeTruthy(); + }); + + describe("Negative Testing", () => { + it("Invalid username and password", async () => { + const request = { + username: "invalidUsername", + password: "invalidPassword", + rejectUnauthorized: false, + }; + try { + await apiClient.listCpiV1(request); + fail("Expected an error for unauthorized access but it succeeded."); + } catch (error) { + expect(error).toBeDefined(); + } + }); + + it("Invalid flow class name", async () => { + const invalidFlowName = "nonExistentFlow"; + const request = { + username: "admin", + password: "admin", + rejectUnauthorized: false, + holdingIDShortHash: shortHashBob, + clientRequestId: "test-1", + flowClassName: invalidFlowName, + requestBody: { + chatName: "Test-1", + otherMember: "CN=Bob, OU=Test Dept, O=R3, L=London, C=GB", + message: "Testing", + }, + }; + try { + await apiClient.startFlowV1(request); + } catch (error) { + expect(error).toBeDefined(); + } + }); + }); + }); +}); diff --git a/packages/cactus-test-tooling/src/main/typescript/corda/corda-v5-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/corda/corda-v5-test-ledger.ts new file mode 100644 index 0000000000..57c452be1a --- /dev/null +++ b/packages/cactus-test-tooling/src/main/typescript/corda/corda-v5-test-ledger.ts @@ -0,0 +1,267 @@ +import { EventEmitter } from "events"; +//import path from "path"; + +import { Config as SshConfig } from "node-ssh"; +import Docker, { Container, ContainerInfo } from "dockerode"; +import Joi from "joi"; + +import { ITestLedger } from "../i-test-ledger"; +import { Containers } from "../common/containers"; + +import { + LogLevelDesc, + Logger, + LoggerProvider, + Checks, + Bools, +} from "@hyperledger/cactus-common"; + +/* + * Contains options for Corda container + */ +export interface ICordaV5TestLedgerConstructorOptions { + imageVersion?: string; + imageName?: string; + publicPort?: number; + postgresPort?: number; + logLevel?: LogLevelDesc; + emitContainerLogs?: boolean; + rpcPortA?: number; +} + +/* + * Provides default options for Corda container + */ +const DEFAULTS = Object.freeze({ + imageVersion: "2024-06-18-issue3293-3e1660df4", + imageName: "ghcr.io/hyperledger/cacti-corda-5-all-in-one", + publicPort: 8888, + postgresPort: 5431, + rpcPortA: 10008, +}); +export const CORDA_V5_TEST_LEDGER_DEFAULT_OPTIONS = DEFAULTS; + +/* + * Provides validations for the Corda container's options + */ +export const JOI_SCHEMA: Joi.Schema = Joi.object().keys({ + imageVersion: Joi.string().min(5).required(), + imageName: Joi.string().min(1).required(), + publicPort: Joi.number().min(1).max(65535).required(), + postgresPort: Joi.number().min(1).max(65535).required(), +}); +export const CORDA_V5_TEST_LEDGER_OPTIONS_JOI_SCHEMA = JOI_SCHEMA; + +export class CordaV5TestLedger implements ITestLedger { + public static readonly CLASS_NAME = "CordaV5TestLedger"; + + private readonly log: Logger; + //private readonly envVars: string[]; + + public get className(): string { + return CordaV5TestLedger.CLASS_NAME; + } + public readonly rpcPortA: number; + public readonly imageVersion: string; + public readonly imageName: string; + public readonly publicPort: number; + public readonly postgresPort: number; + public readonly emitContainerLogs: boolean; + + private container: Container | undefined; + private containerId: string | undefined; + + constructor(public readonly opts: ICordaV5TestLedgerConstructorOptions = {}) { + const fnTag = `${this.className}#constructor()`; + Checks.truthy(opts, `${fnTag} options`); + + this.imageVersion = opts.imageVersion || DEFAULTS.imageVersion; + this.imageName = opts.imageName || DEFAULTS.imageName; + + this.publicPort = opts.publicPort || DEFAULTS.publicPort; + this.postgresPort = opts.postgresPort || DEFAULTS.postgresPort; + this.emitContainerLogs = Bools.isBooleanStrict(opts.emitContainerLogs) + ? (opts.emitContainerLogs as boolean) + : true; + + this.rpcPortA = opts.rpcPortA || DEFAULTS.rpcPortA; + + this.validateConstructorOptions(); + const label = "corda-v5-test-ledger"; + const level = opts.logLevel || "INFO"; + this.log = LoggerProvider.getOrCreate({ level, label }); + } + + public getContainerId(): string { + const fnTag = `${this.className}.getContainerId()`; + Checks.nonBlankString(this.containerId, `${fnTag}::containerId`); + return this.containerId as string; + } + + public async start(skipPull = false): Promise { + const imageFqn = this.getContainerImageName(); + + if (this.container) { + await this.container.stop(); + await this.container.remove(); + } + const docker = new Docker(); + + if (!skipPull) { + await Containers.pullImage(imageFqn, {}, this.opts.logLevel); + } + + return new Promise((resolve, reject) => { + const eventEmitter: EventEmitter = docker.run( + imageFqn, + [], + [], + { + User: "root", + NetworkMode: "host", // Set the container to use the host network + Binds: ["/var/run/docker.sock:/var/run/docker.sock"], // Mount the Docker socket + PublishAllPorts: true, + Privileged: true, + }, + {}, + (err: unknown) => { + if (err) { + reject(err); + } + }, + ); + + eventEmitter.once("start", async (container: Container) => { + this.container = container; + this.containerId = container.id; + + if (this.emitContainerLogs) { + const fnTag = `[${this.getContainerImageName()}]`; + await Containers.streamLogs({ + container: this.getContainer(), + tag: fnTag, + log: this.log, + }); + } + + try { + let isHealthy = false; + do { + const containerInfo = await this.getContainerInfo(); + this.log.debug(`ContainerInfo.Status=%o`, containerInfo.Status); + this.log.debug(`ContainerInfo.State=%o`, containerInfo.State); + isHealthy = containerInfo.Status.endsWith("(healthy)"); + if (!isHealthy) { + await new Promise((resolve2) => setTimeout(resolve2, 1000)); + } + } while (!isHealthy); + resolve(container); + } catch (ex) { + reject(ex); + } + }); + }); + } + + public async logDebugPorts(): Promise { + const publicPort = await this.getPublicPort(); + this.log.info(`R3 Corda V5 public port: ${publicPort}`); + + const supervisorDUrl = await this.getSupervisorDLocalhostUrl(); + this.log.info(`SupervisorD Web UI accessible: %o`, supervisorDUrl); + } + + public stop(): Promise { + return Containers.stop(this.getContainer()); + } + + public destroy(): Promise { + const fnTag = `${this.className}.destroy()`; + if (this.container) { + return this.container.remove(); + } else { + return Promise.reject( + new Error(`${fnTag} Container was never created, nothing to destroy.`), + ); + } + } + + protected async getContainerInfo(): Promise { + const fnTag = `${this.className}.getContainerInfo()`; + const docker = new Docker(); + const containerInfos = await docker.listContainers({}); + const id = this.getContainerId(); + + const aContainerInfo = containerInfos.find((ci) => ci.Id === id); + + if (aContainerInfo) { + return aContainerInfo; + } else { + throw new Error(`${fnTag} no container with ID "${id}"`); + } + } + + public async getPublicPort(): Promise { + const aContainerInfo = await this.getContainerInfo(); + return Containers.getPublicPort(8888, aContainerInfo); + } + + public async getSupervisorDLocalhostUrl(): Promise { + const port = await this.getPublicPort(); + return `https://localhost:${port}/api/v1/swagger#`; + } + + public async getSSHPublicPort(): Promise { + const aContainerInfo = await this.getContainerInfo(); + return Containers.getPublicPort(22, aContainerInfo); + } + + public async getSshConfig(): Promise { + //port 22 is not being checked as of now because we can't modify the export ports unless we change the gradle sample + //const publicPort = await this.getSSHPublicPort(); + const sshConfig: SshConfig = { + host: "127.0.0.1", + port: 22, + username: "root", + }; + + return sshConfig; + } + + public getContainer(): Container { + const fnTag = `${this.className}.getContainer()`; + if (!this.container) { + throw new Error(`${fnTag} container not set on this instance yet.`); + } else { + return this.container; + } + } + + public getContainerImageName(): string { + return `${this.imageName}:${this.imageVersion}`; + } + + private validateConstructorOptions(): void { + const fnTag = `${this.className}#validateConstructorOptions()`; + const validationResult = JOI_SCHEMA.validate({ + imageVersion: this.imageVersion, + imageName: this.imageName, + publicPort: this.publicPort, + postgresPort: this.postgresPort, + }); + + if (validationResult.error) { + throw new Error(`${fnTag} ${validationResult.error.annotate()}`); + } + } +} + +export function extractShortHash(shortHashID: string, name: string) { + const regex = new RegExp(`MyCorDapp\\s*([A-Z0-9]*)\\s*CN=${name}`); + const match = shortHashID.match(regex); + if (match) { + return match[1]; + } else { + return "err"; + } +} diff --git a/packages/cactus-test-tooling/src/main/typescript/public-api.ts b/packages/cactus-test-tooling/src/main/typescript/public-api.ts index 6b9dee61f3..ec19ee7324 100755 --- a/packages/cactus-test-tooling/src/main/typescript/public-api.ts +++ b/packages/cactus-test-tooling/src/main/typescript/public-api.ts @@ -22,6 +22,13 @@ export { export { ICordappJarFile } from "./corda/cordapp-jar-file"; +export { + CordaV5TestLedger, + ICordaV5TestLedgerConstructorOptions, + CORDA_V5_TEST_LEDGER_DEFAULT_OPTIONS, + CORDA_V5_TEST_LEDGER_OPTIONS_JOI_SCHEMA, +} from "./corda/corda-v5-test-ledger"; + export { Containers, IPruneDockerResourcesRequest, diff --git a/tools/docker/corda-all-in-one/corda-v5/Dockerfile b/tools/docker/corda-all-in-one/corda-v5/Dockerfile index 4316e323d5..b75fec94e2 100644 --- a/tools/docker/corda-all-in-one/corda-v5/Dockerfile +++ b/tools/docker/corda-all-in-one/corda-v5/Dockerfile @@ -1,84 +1,81 @@ -FROM cruizba/ubuntu-dind:20.10.9 - -WORKDIR / - -RUN apt update -RUN apt -y upgrade - -# # Install git so we can check out the corda5-solarsystem-contracts-demo repo of Corda -RUN apt install -y git - -# Need curl to run healthchecks -RUN apt install -y curl - -RUN export DEBIAN_FRONTEND=noninteractive \ - && apt-get -y install --no-install-recommends openjdk-11-jdk - -# jq is needed by the /download-frozen-image-v2.sh script to pre-fetch docker images without docker. -RUN apt install -y jq - -# Get the utility script that can pre-fetch the container images without -# a functioning Docker daemon available which we do not have at image build -# time so have to resort to manually get the images instead of just saying -# "docker pull my/cool-image..." etc. -# The reason to jump trough these hoops is to avoid DockerHub rate limiting issues -RUN curl -sSL https://raw.githubusercontent.com/moby/moby/dedf8528a51c6db40686ed6676e9486d1ed5f9c0/contrib/download-frozen-image-v2.sh > /download-frozen-image-v2.sh -RUN chmod +x /download-frozen-image-v2.sh -RUN mkdir -p /etc/corda/corda-dev/ -RUN /download-frozen-image-v2.sh /etc/corda/corda-dev/ corda/corda-dev:5.0.0-devpreview-1.0 - -RUN curl https://download.corda.net/corda-cli/1.0.0-DevPreview/get-corda-cli.sh > /get-corda-cli.sh -RUN chmod +x /get-corda-cli.sh -RUN /get-corda-cli.sh - -RUN curl https://download.corda.net/cordapp-builder/5.0.0-DevPreview-1.0/cordapp-builder-installer.jar --output /cordapp-builder-installer.jar -RUN java -jar /cordapp-builder-installer.jar - -RUN git clone https://github.com/corda/corda5-solarsystem-contracts-demo.git -WORKDIR /corda5-solarsystem-contracts-demo - -# Placing the ARG here instead of the top may seem like bad form, but it has -# better build performance this way when we change the ARG's value it will -# not spend 5 to 10 minutes installing the OS level dependencies on the top of -# the image definition file because the cached layers will be the same for those. -ARG SOLARSYSTEM_DEMO_SHA=a3be5ad48d249be7f71c5f15074c874dc0d09b41 -RUN git checkout ${SOLARSYSTEM_DEMO_SHA} - -RUN /root/bin/corda-cli/bin/corda-cli network config docker-compose solar-system -RUN chmod +x gradlew -RUN ./gradlew build - -RUN /root/bin/corda-cli/bin/corda-cli network deploy -n solar-system -f solar-system.yaml > docker-compose.yaml - -RUN sed -i 's+corda/corda-dev:latest+corda/corda-dev:5.0.0-devpreview-1.0+g' /corda5-solarsystem-contracts-demo/docker-compose.yaml - -RUN /root/.local/lib/cordapp-builder/bin/cordapp-builder create --cpk contracts/build/libs/corda5-solar-system-contracts-demo-contracts-1.0-SNAPSHOT-cordapp.cpk --cpk workflows/build/libs/corda5-solar-system-contracts-demo-workflows-1.0-SNAPSHOT-cordapp.cpk -o solar-system.cpb - -# OpenSSH server +FROM docker:20.10.3-dind + +RUN apk update +RUN apk add py-pip python3-dev libffi-dev openssl-dev gcc libc-dev make + +# Need curl for healthchecks +RUN apk add --no-cache curl + +# Need to run shell script run.sh for Corda CLI +RUN apk add --no-cache bash + +# The file binary is used to inspect exectubles when debugging container image issues +RUN apk add --no-cache file +RUN apk add --no-cache ca-certificates +RUN apk add --no-cache tzdata +RUN apk add --no-cache gnupg + +#----------------- INSTALLING CORDA CDSE PREREQUISITES -------------------- +#-------------------------------------------------------------------------- + +# Installing Zulu17 JDK +RUN wget -P /etc/apk/keys/ \ +https://cdn.azul.com/public_keys/alpine-signing@azul.com-5d5dc44c.rsa.pub +RUN echo "https://repos.azul.com/zulu/alpine" | tee -a /etc/apk/repositories +RUN apk update +RUN apk add --no-cache zulu17-jdk + +# ENV JAVA_HOME /usr/lib/jvm/zulu17-ca +# ENV PATH $PATH:$JAVA_HOME/bin + +# Installing Corda CLI +RUN mkdir /platform-jars && \ + wget -O /platform-jars/binary.tar.gz \ + https://download.corda.net/c5-release-pack/f82c7008-3b72-48fb-8e25-5ca38a9483b1-5.1.0/platform-jars-5.1.0.tar.gz + +RUN cd /platform-jars/ && \ + tar -xvzf binary.tar.gz && \ + cp net/corda/cli/deployment/corda-cli-installer/5.1.0.0/corda-cli-installer-5.1.0.0.zip . && \ + unzip corda-cli-installer-5.1.0.0.zip -d corda-cli-installer && \ + corda-cli-installer/./install.sh +ENV PATH="$PATH:~/.corda/cli" + +#-------------------------------------------------------------------------- +#-------------------------------------------------------------------------- + +# Installing CORDA CDSE +RUN apk add --no-cache git +RUN git clone https://github.com/corda/CSDE-cordapp-template-kotlin.git + +RUN cd CSDE-cordapp-template-kotlin/ && \ + git checkout release/corda-5-0 && \ + sed -i 's/cordaNotaryPluginsVersion=5.0.0.0/cordaNotaryPluginsVersion=5.0.1.0/' gradle.properties && \ + sed -i 's/combinedWorkerJarVersion=5.0.0.0/combinedWorkerJarVersion=5.0.1.0/' gradle.properties && \ + sed -i 's/import static org.gradle.api.JavaVersion.VERSION_11/import static org.gradle.api.JavaVersion.VERSION_17/' build.gradle && \ + sed -i 's/def javaVersion = VERSION_11/def javaVersion = VERSION_17/' build.gradle + +RUN apk add --no-cache supervisor +## TO FIX: Exposing the required ports 5005, 5432 and 8888 for CSDE +## and 9001 for supervisor. Currently commented because of "--network host" being used to run the container +# EXPOSE 5005 +# EXPOSE 5432 +# EXPOSE 8888 +# EXPOSE 9001 EXPOSE 22 -# supervisord web ui/dashboard -EXPOSE 9001 - -# earth-node RPC -EXPOSE 12112 - -# mars-node RPC -EXPOSE 12116 +COPY supervisord.conf /etc/supervisord.conf -# pluto-node RPC -EXPOSE 12119 +COPY start-services.sh /start-services.sh +RUN chmod +x /start-services.sh -# notary-node RPC -EXPOSE 12122 +COPY healthcheck.sh /healthcheck.sh +RUN chmod +x /healthcheck.sh -COPY ./start-services.sh /start-services.sh +WORKDIR /CSDE-cordapp-template-kotlin/ -COPY ./supervisor/ /etc/supervisor/conf.d/ +# Extend the parent image's entrypoint +# https://superuser.com/questions/1459466/can-i-add-an-additional-docker-entrypoint-script ENTRYPOINT ["/usr/bin/supervisord"] -CMD ["--nodaemon"] +CMD ["--configuration", "/etc/supervisord.conf", "--nodaemon"] -# Add our healthcheck script that determines when do we consider the container healthy -COPY healthcheck.sh / -HEALTHCHECK --interval=2s --timeout=5s --start-period=30s --retries=180 CMD /healthcheck.sh -#RUN ~/bin/corda-cli/bin/corda-cli package install -n solar-system solar-system.cpb +HEALTHCHECK --interval=30s --timeout=60s --start-period=200s --retries=100 CMD /healthcheck.sh diff --git a/tools/docker/corda-all-in-one/corda-v5/README.md b/tools/docker/corda-all-in-one/corda-v5/README.md new file mode 100644 index 0000000000..fe53d2d451 --- /dev/null +++ b/tools/docker/corda-all-in-one/corda-v5/README.md @@ -0,0 +1,7 @@ +# Instructions to compile and run the new Corda v5.0 test network + +To create an image of the dockerfile run: +`DOCKER_BUILDKIT=1 docker build ./tools/docker/corda-all-in-one/corda-v5 -t newcordaimg` + +To run the AIO, execute: +`docker run -it --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock --network host -d newcordaimg` \ No newline at end of file diff --git a/tools/docker/corda-all-in-one/corda-v5/healthcheck.sh b/tools/docker/corda-all-in-one/corda-v5/healthcheck.sh index 469aab0086..5ab3f7cf08 100755 --- a/tools/docker/corda-all-in-one/corda-v5/healthcheck.sh +++ b/tools/docker/corda-all-in-one/corda-v5/healthcheck.sh @@ -1,8 +1,48 @@ #!/bin/bash set -e -#/root/bin/corda-cli/bin/corda-cli network status -n solar-system +gradleOutput="" -curl -u martian:password --insecure https://localhost:12116/api/v1/nodestatus/getnetworkreadinessstatus -curl -u earthling:password --insecure https://localhost:12112/api/v1/nodestatus/getnetworkreadinessstatus -curl -u plutonian:password --insecure https://localhost:12119/api/v1/nodestatus/getnetworkreadinessstatus +# Check if all nodes are up and running +checkNodesStatus() { + # Run Gradle task and capture the output + cd /CSDE-cordapp-template-kotlin/ + gradleOutput=$(./gradlew listVNodes) + echo "gradleOutput: $gradleOutput" + local upAndRunningCount + upAndRunningCount=$(echo "$gradleOutput" | grep -c -E "MyCorDapp|NotaryServer") + + # Check if all 5 nodes are up and running + if [ "$upAndRunningCount" -eq 5 ]; then + echo "All 5 nodes are up and running." + else + echo "Waiting for all nodes to be up and running..." + sleep 5 + checkNodesStatus + fi +} + +# Check if request is successful +checkCurlSuccess() { + echo "Executing checkCurlSuccess function..." + local holding_identity_shorthash_test + holding_identity_shorthash_test=$(echo "$gradleOutput" | grep -oE '\b[0-9A-F]{12}\b' | tail -n 1) + local response_code + response_code=$(curl -k -s -o /dev/null -w "%{http_code}" -u admin:admin "https://localhost:8888/api/v1/members/$holding_identity_shorthash_test/group-parameters") + if [ "$response_code" -eq 200 ]; then + echo "CURL request successful." + else + echo "CURL request failed with response code: $response_code" + exit 1 + fi +} + +checkNodesStatus + +checkCurlSuccess + +WAIT_TIME=30 +echo "Waiting for $WAIT_TIME seconds to ensure stability before exiting with status code 0..." +sleep $WAIT_TIME + +exit 0 \ No newline at end of file diff --git a/tools/docker/corda-all-in-one/corda-v5/start-services.sh b/tools/docker/corda-all-in-one/corda-v5/start-services.sh index 9df798835b..2fd31d2cc3 100755 --- a/tools/docker/corda-all-in-one/corda-v5/start-services.sh +++ b/tools/docker/corda-all-in-one/corda-v5/start-services.sh @@ -1,11 +1,14 @@ #!/bin/bash +set -e -# Load the cached container images into the Docker Daemon before launching -# the Docker Compose network. This is the preferred workaround to synchronizing -# different processes of a supervisord configuration -tar -cC '/etc/corda/corda-dev/' . | docker load +cd /CSDE-cordapp-template-kotlin/ +while true; do + echo "Waiting for startCorda to execute..." + if ./gradlew listVNodes | grep "X500"; then + echo "Starting v5NodeSetup..."; + ./gradlew 5-vNodeSetup + break; + fi + sleep 5; +done -# Now that the images are cached **and** loaded to the daemon, we can start the -# corda network via the docker-compose file and it will not need to download -# anything from DockerHub (if it does, that's a bug) -supervisorctl start corda5-solarsystem-contracts-demo-network diff --git a/tools/docker/corda-all-in-one/corda-v5/supervisor/corda5-solarsystem-contracts-demo-network.conf b/tools/docker/corda-all-in-one/corda-v5/supervisord.conf similarity index 58% rename from tools/docker/corda-all-in-one/corda-v5/supervisor/corda5-solarsystem-contracts-demo-network.conf rename to tools/docker/corda-all-in-one/corda-v5/supervisord.conf index 8d7bbe324b..a7a8dd0405 100644 --- a/tools/docker/corda-all-in-one/corda-v5/supervisor/corda5-solarsystem-contracts-demo-network.conf +++ b/tools/docker/corda-all-in-one/corda-v5/supervisord.conf @@ -1,30 +1,27 @@ [supervisord] -logfile = /var/log/supervisord.log logfile_maxbytes = 50MB logfile_backups=10 loglevel = info -[rpcinterface:supervisor] -supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface - -[supervisorctl] -serverurl=http://127.0.0.1:9001 - [inet_http_server] port = 0.0.0.0:9001 -[program:start-services] -command=/start-services.sh +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[program:startCorda] +directory=/CSDE-cordapp-template-kotlin +command=/bin/bash -c "./gradlew startCorda" autostart=true stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 -[program:corda5-solarsystem-contracts-demo-network] -command=/usr/local/bin/docker-compose -f /corda5-solarsystem-contracts-demo/docker-compose.yaml up -autostart=false -autorestart=true +[program:5vNodeSetup] +directory=/ +command=/bin/bash -c "./start-services.sh" +autostart=true stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr diff --git a/yarn.lock b/yarn.lock index af4cdfd85d..231c6bd39e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10287,13 +10287,16 @@ __metadata: body-parser: "npm:1.20.2" express: "npm:4.19.2" express-openapi-validator: "npm:5.2.0" + http-errors-enhanced-cjs: "npm:2.0.1" internal-ip: "npm:6.2.0" joi: "npm:17.13.3" + node-fetch: "npm:2.7.0" node-ssh: "npm:13.1.0" prom-client: "npm:15.1.3" rxjs: "npm:7.8.1" temp: "npm:0.9.4" typescript-optional: "npm:2.0.1" + urlcat: "npm:3.1.0" uuid: "npm:10.0.0" languageName: unknown linkType: soft @@ -40159,6 +40162,20 @@ __metadata: languageName: node linkType: hard +"node-fetch@npm:2.7.0, node-fetch@npm:^2.6.8, node-fetch@npm:^2.6.9": + version: 2.7.0 + resolution: "node-fetch@npm:2.7.0" + dependencies: + whatwg-url: "npm:^5.0.0" + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: 10/b24f8a3dc937f388192e59bcf9d0857d7b6940a2496f328381641cb616efccc9866e89ec43f2ec956bbd6c3d3ee05524ce77fe7b29ccd34692b3a16f237d6676 + languageName: node + linkType: hard + "node-fetch@npm:3.0.0-beta.9": version: 3.0.0-beta.9 resolution: "node-fetch@npm:3.0.0-beta.9" @@ -40183,20 +40200,6 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^2.6.8, node-fetch@npm:^2.6.9": - version: 2.7.0 - resolution: "node-fetch@npm:2.7.0" - dependencies: - whatwg-url: "npm:^5.0.0" - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - checksum: 10/b24f8a3dc937f388192e59bcf9d0857d7b6940a2496f328381641cb616efccc9866e89ec43f2ec956bbd6c3d3ee05524ce77fe7b29ccd34692b3a16f237d6676 - languageName: node - linkType: hard - "node-fetch@npm:^3.3.2": version: 3.3.2 resolution: "node-fetch@npm:3.3.2" @@ -52235,6 +52238,15 @@ __metadata: languageName: node linkType: hard +"urlcat@npm:3.1.0": + version: 3.1.0 + resolution: "urlcat@npm:3.1.0" + dependencies: + qs: "npm:^6.9.4" + checksum: 10/1e6106c96bf71bf268b5bcd528e8e07b82001039f7103ec637702f89eebe1b5c2a5120f3dcff8a1b968a6edaafaa87ec67832e2f13302da4cabbb98880d45183 + languageName: node + linkType: hard + "use@npm:^3.1.0": version: 3.1.1 resolution: "use@npm:3.1.1"