@hauptmedia/zeebe-gateway-types
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Zeebe gRPC Gateway Protocol Client, Typescript Types & JSON Schemas

Compatible with: Camunda Platform 8

Follow this link for the Zeebe gRPC Gateway Protocol Documentation.

This library provides:

  • a ready to use grpc-js client for the Zeebe Gateway Protocol

  • Typescript type definitions for requests and responses including JSON transformers

  • JSON Schemas for all requests and responses objects

Installation

npm i --save @hauptmedia/zeebe-gateway-types

Supported Messages

Message Type Docs JSON Schema
ActivateJobsRequest docs JSON Schema
ActivateJobsResponse docs JSON Schema
CancelProcessInstanceRequest docs JSON Schema
CancelProcessInstanceResponse docs JSON Schema
CompleteJobRequest docs JSON Schema
CompleteJobResponse docs JSON Schema
CreateProcessInstanceRequest docs JSON Schema
CreateProcessInstanceResponse docs JSON Schema
CreateProcessInstanceWithResultRequest docs JSON Schema
CreateProcessInstanceWithResultResponse docs JSON Schema
DeployResourceRequest docs JSON Schema
DeployResourceResponse docs JSON Schema
FailJobRequest docs JSON Schema
FailJobResponse docs JSON Schema
ModifyProcessInstanceRequest docs JSON Schema
ModifyProcessInstanceResponse docs JSON Schema
PublishMessageRequest docs JSON Schema
PublishMessageResponse docs JSON Schema
ResolveIncidentRequest docs JSON Schema
ResolveIncidentResponse docs JSON Schema
SetVariablesRequest docs JSON Schema
SetVariablesResponse docs JSON Schema
ThrowErrorRequest docs JSON Schema
ThrowErrorResponse docs JSON Schema
TopologyRequest docs JSON Schema
TopologyResponse docs JSON Schema
UpdateJobRetriesRequest docs JSON Schema
UpdateJobRetriesResponse docs JSON Schema

Usage for the grpc-js client

import {GatewayClient, DeployResourceRequest} from "@hauptmedia/zeebe-gateway-types";
import {ChannelCredentials} from "@grpc/grpc-js";

const zbc = new GatewayClient("localhost:26500", ChannelCredentials.createInsecure());

const req = DeployResourceRequest.fromJSON({
    "resources": [
        {
            "name": "test.bpmn",
            "content": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTg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Zj0iU3RhcnRFdmVudF8xIiB0YXJnZXRSZWY9IkV2ZW50XzE3anp2eGwiIC8+CjwvYnBtbjpwcm9jZXNzPgo8YnBtbmRpOkJQTU5EaWFncmFtIGlkPSJCUE1ORGlhZ3JhbV8xIj4KPGJwbW5kaTpCUE1OUGxhbmUgaWQ9IkJQTU5QbGFuZV8xIiBicG1uRWxlbWVudD0iUHJvY2Vzc18xMXpsbmVnIj4KPGJwbW5kaTpCUE1OU2hhcGUgaWQ9Il9CUE1OU2hhcGVfU3RhcnRFdmVudF8yIiBicG1uRWxlbWVudD0iU3RhcnRFdmVudF8xIj4KPGRjOkJvdW5kcyB4PSIxNzkiIHk9Ijc5IiB3aWR0aD0iMzYiIGhlaWdodD0iMzYiIC8+CjwvYnBtbmRpOkJQTU5TaGFwZT4KPGJwbW5kaTpCUE1OU2hhcGUgaWQ9IkV2ZW50XzE3anp2eGxfZGkiIGJwbW5FbGVtZW50PSJFdmVudF8xN2p6dnhsIj4KPGRjOkJvdW5kcyB4PSIyOTIiIHk9Ijc5IiB3aWR0aD0iMzYiIGhlaWdodD0iMzYiIC8+CjwvYnBtbmRpOkJQTU5TaGFwZT4KPGJwbW5kaTpCUE1ORWRnZSBpZD0iRmxvd18wanQ4bHUzX2RpIiBicG1uRWxlbWVudD0iRmxvd18wanQ4bHUzIj4KPGRpOndheXBvaW50IHg9IjIxNSIgeT0iOTciIC8+CjxkaTp3YXlwb2ludCB4PSIyOTIiIHk9Ijk3IiAvPgo8L2JwbW5kaTpCUE1ORWRnZT4KPC9icG1uZGk6QlBNTlBsYW5lPgo8L2JwbW5kaTpCUE1ORGlhZ3JhbT4KPC9icG1uOmRlZmluaXRpb25zPg=="
        }
    ]
});

zbc.deployResource(req, (error, response) => {
    if (error)
        throw error;
    else
        console.log(response);
});

Package Sidebar

Install

npm i @hauptmedia/zeebe-gateway-types

Weekly Downloads

15

Version

1.0.0

License

Apache-2.0

Unpacked Size

2.98 MB

Total Files

135

Last publish

Collaborators

  • hauptmedia