flink-typescript
A typescript binding auto-generated from Apache Flink JobManager REST API.
Build
npm run generate
npm run compile
Install
Using npm:
npm install @tensorsmart/flink-typescript
Using yarn:
yarn add @tensorsmart/flink-typescript
Using pnpm:
pnpm add @tensorsmart/flink-typescript
Example
Using a model:
import { JobStatus } from "@tensorsmart/flink-typescript";
console.log(JobStatus.RUNNING)
Calling a method:
import { JobDetails, MultipleJobsDetails, DefaultService, OpenAPI } from "@tensorsmart/flink-typescript";
OpenAPI.BASE = "http://localhost:8081/v1";
DefaultService.getJobsOverview().then((response: MultipleJobsDetails) => {
return response.jobs!.map((job: JobDetails) => new Job(this, job.jobId!, job.jobName!, job.status!));
}).catch((error: any) => {
console.error(error);
});
Refer to Flink JobManager REST API for all models and methods.
Refer to ferdikoomen/openapi-typescript-codegen for more OpenAPI
settings.
Projects that use this package
Thanks to
- Chesnay Schepler for fixing issues in Flink OpenAPI
- Ferdi Koomen for the great OpenAPI Typescript code generator
Everyone should follow them and star their projects.