@photon-ai/proto
v0.2.4
Published
Generated TypeScript bindings for photon.slack.v1 and photon.fusor.v1 gRPC services.
Readme
@photon-ai/proto
Generated TypeScript bindings for the public Photon gRPC contracts.
Wraps two proto packages:
photon.slack.v1— Slack runtime contract (MessageService,FileService, inbound event variants, file metadata).photon.fusor.v1— Cross-channelRawInboundEventenvelope.
Generated with ts-proto using the
photon-hq canonical config (nice-grpc + generic-definitions service
output). Pair with nice-grpc for
Node transport or nice-grpc-web
for browsers.
Install
npm install @photon-ai/protoUsage
import { InboundMessage } from "@photon-ai/proto/photon/slack/v1/common";
// Construct via the generated helper:
const msg = InboundMessage.create({
channel: "C012345",
user: "U67890",
text: "hello",
});
// Or just an object literal — InboundMessage is a plain interface:
const msg2: InboundMessage = {
channel: "C012345",
user: "U67890",
text: "hello",
ts: "",
isFromMe: false,
files: [],
};
// Encode to wire bytes:
const bytes = InboundMessage.encode(msg).finish();
const round = InboundMessage.decode(bytes);Source
Definitions live in photon-hq/proto. Releases are cut by the release-public GitHub Actions workflow.
License
MIT — see LICENSE.
