0.0.3 • Published 6 years ago
communibase-types-generator v0.0.3
Communibase administration types generator
CLI for generating a communibase.d.ts for a specific administration
yarn add @communibase/types-generatorThen
cbtypesgen <api-key> -D @typesWill generate @types/communibase.d.ts for the given api-key administration.
types are declared in namespace Communibase (i.e. Communibase.Address)
Why
This project makes the following multi-cli solution easier;
Generate the
swagger.jsonfrom the administrationnpx communibase-swagger <administrationKey> `./@types/swagger.json`Generate the
swagger.d.tsfrom theswagger.jsonnpx dtsgenerator --out ./@types/swagger.d.ts ./@types/swagger.jsonChange the
./@types/swagger.d.tsto export the namespace---declare namespace Definitions { +++export namespace Definitions {