@togatherlabs/event-sdk 1.0.1 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# togather-shared-events
|
|
2
2
|
|
|
3
|
-
This repository contains **event schemas** for the
|
|
3
|
+
This repository contains **event schemas** for the toGather event-driven backend system. We use **Protocol Buffers (Protobuf)** as the messaging format for events. It provides type-safe code generation for **TypeScript** and **Python**, enabling services in different languages to share a consistent event schema.
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
## Table of Contents
|
|
@@ -103,7 +103,7 @@ pnpm add @bufbuild/protobuf@^2.9.0
|
|
|
103
103
|
**Example usage:**
|
|
104
104
|
|
|
105
105
|
```ts
|
|
106
|
-
import { UserCreated, UserCreatedSchema } from '
|
|
106
|
+
import { UserCreated, UserCreatedSchema } from '<path>/user/create/v1/user_pb';
|
|
107
107
|
import { create, toBinary, fromBinary, toJson } from '@bufbuild/protobuf';
|
|
108
108
|
|
|
109
109
|
// Create a new message
|
|
@@ -126,6 +126,9 @@ const json = toJson(UserCreatedSchema, decoded);
|
|
|
126
126
|
|
|
127
127
|
> **Tip:** Use `toBinary`/`fromBinary` for Kafka or network transmission. Use `toJson`/`fromJson` for logging or debugging.
|
|
128
128
|
|
|
129
|
+
|
|
130
|
+
<br>
|
|
131
|
+
|
|
129
132
|
### Python
|
|
130
133
|
|
|
131
134
|
**Dependencies:**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@togatherlabs/event-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Shared Protobuf event schemas and generated code for toGather microservices",
|
|
5
5
|
"main": "./gen/ts/index.js",
|
|
6
6
|
"types": "./gen/ts/index.d.ts",
|
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
36
36
|
"commit": "git-cz",
|
|
37
37
|
"buf:lint": "buf lint",
|
|
38
|
-
"buf:generate": "buf generate"
|
|
38
|
+
"buf:generate": "buf generate",
|
|
39
|
+
"package:patch": "pnpm version patch",
|
|
40
|
+
"package:publish": "pnpm publish --access public"
|
|
39
41
|
}
|
|
40
42
|
}
|