TypeScript protobuf generated types for the Brizy platform. This package provides strongly-typed interfaces for all Brizy protocol buffer messages.
Currently, this package is not available on npm. The repository used from GitHub.
import {
CreateCollectionItemMessage,
UpdateCollectionItemMessage,
DeleteCollectionItemMessage,
Message_DescriminatorType,
create,
fromBinary,
toBinary
} from '@brizy/protogen-ts';import { create, CreateCollectionItemMessageSchema } from '@brizy/protogen-ts';
const message = create(CreateCollectionItemMessageSchema, {
descriminator: Message_DescriminatorType.CREATE_COLLECTION_ITEM_MESSAGE,
projectIri: "project-123",
entityIri: "entity-456",
brziyApiAccessToken: "your-token",
userId: "user-789"
});import { toBinary, fromBinary } from '@brizy/protogen-ts';
// Serialize to binary
const binaryData = toBinary(CreateCollectionItemMessageSchema, message);
// Deserialize from binary
const deserializedMessage = fromBinary(CreateCollectionItemMessageSchema, binaryData);import { toJson, fromJson } from '@brizy/protogen-ts';
// Convert to JSON
const jsonData = toJson(CreateCollectionItemMessageSchema, message);
// Parse from JSON
const messageFromJson = fromJson(CreateCollectionItemMessageSchema, jsonData);This package includes the following protobuf message types:
Message- Base message type with discriminatorMessage_DescriminatorType- Enum for message type discrimination
CreateCollectionItemMessageUpdateCollectionItemMessageDeleteCollectionItemMessageCreateCollectionTypeMessageUpdateCollectionTypeMessageDeleteCollectionTypeMessage
CreateCustomerMessageUpdateCustomerMessageDeleteCustomerMessage
- Various cloud-specific message types for user and project management
- Doctrine message types
- Notification message types
- Translation message types
This package is built with TypeScript and provides full type definitions. All message types are strongly typed, providing excellent IDE support with autocomplete and type checking.
npm run buildThis will:
- Clean the dist directory
- Build all formats:
- CommonJS build in
dist/(for Node.js) - ES modules build in
dist/(for modern bundlers) - TypeScript declarations in
dist/
- CommonJS build in
npm run build- Build all formats (CJS, ESM, types) with auto-generationnpm run clean- Clean the dist directorynpm run build:cjs- Build CommonJS formatnpm run build:esm- Build ES modules formatnpm run build:types- Generate TypeScript declarations
- Generate protobuf files into
gen/directory (using your protoc setup) - Build with
npm run build(or the index will be auto-generated) - Publish with
npm publish
ISC
This package contains generated code from protocol buffer definitions. To update the generated types, regenerate the protobuf files and rebuild the package.