@togatherlabs/shared-protos 1.0.20 β 1.0.21
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
CHANGED
|
@@ -1,73 +1,90 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @togatherlabs/shared-protos
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
TypeScript bindings for ToGather shared protocol buffer definitions.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This package provides type-safe gRPC and ConnectRPC interfaces generated from `.proto` files, ensuring consistency across all ToGather microservices.
|
|
6
6
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
This package is published to the **ToGather NPM organization** under:
|
|
7
|
+
## Installation
|
|
10
8
|
|
|
11
9
|
```bash
|
|
12
|
-
@
|
|
10
|
+
pnpm add @togatherlabs/shared-protos
|
|
13
11
|
```
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
## Usage
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
Import the generated types and services in your application:
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
pnpm add @togatherr/togather-shared-protos
|
|
17
|
+
```typescript
|
|
18
|
+
import { AdminService } from "@togatherlabs/shared-protos/authservice/admin/v1";
|
|
19
|
+
import { UserService } from "@togatherlabs/shared-protos/userservice/user/v1";
|
|
23
20
|
```
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
### Available Modules
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
```
|
|
24
|
+
- `authservice/admin/v1` - Admin authentication service definitions
|
|
25
|
+
- `userservice/user/v1` - User service definitions
|
|
30
26
|
|
|
31
|
-
##
|
|
27
|
+
## Package Structure
|
|
32
28
|
|
|
33
|
-
|
|
29
|
+
```
|
|
30
|
+
dist/
|
|
31
|
+
βββ authservice/
|
|
32
|
+
β βββ admin/
|
|
33
|
+
β βββ v1/
|
|
34
|
+
β βββ admin_pb.d.ts
|
|
35
|
+
β βββ admin_pb.js
|
|
36
|
+
β βββ index.js
|
|
37
|
+
βββ userservice/
|
|
38
|
+
βββ user/
|
|
39
|
+
βββ v1/
|
|
40
|
+
βββ user_pb.d.ts
|
|
41
|
+
βββ user_pb.js
|
|
42
|
+
βββ index.js
|
|
43
|
+
```
|
|
34
44
|
|
|
35
|
-
|
|
36
|
-
| ----------- | ------------------- | -------------------------------------------- |
|
|
37
|
-
| **Patch** | `npm version patch` | Fixes or small improvements (no API changes) |
|
|
38
|
-
| **Minor** | `npm version minor` | Adds backward-compatible features |
|
|
39
|
-
| **Major** | `npm version major` | Breaking changes (API or behavior changes) |
|
|
45
|
+
### Examples
|
|
40
46
|
|
|
41
|
-
|
|
47
|
+
- Added new optional field to proto β **Minor**
|
|
48
|
+
- Fixed type definition error β **Patch**
|
|
49
|
+
- Removed or renamed existing field β **Major**
|
|
42
50
|
|
|
43
|
-
|
|
44
|
-
- Fixed type mismatch in existing interface β **patch**
|
|
45
|
-
- Renamed or removed a field/function β **major**
|
|
51
|
+
## Development
|
|
46
52
|
|
|
47
|
-
|
|
53
|
+
This package is auto-generated from proto definitions. Do not edit the generated files manually.
|
|
48
54
|
|
|
49
|
-
|
|
55
|
+
To regenerate:
|
|
50
56
|
|
|
51
57
|
```bash
|
|
52
|
-
#
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
# Step 2: Publish
|
|
56
|
-
npm publish
|
|
58
|
+
# In the root repository
|
|
59
|
+
pnpm generate
|
|
57
60
|
```
|
|
58
61
|
|
|
59
|
-
|
|
62
|
+
## Publishing
|
|
63
|
+
|
|
64
|
+
This package is automatically published via the root repository's publish script.
|
|
65
|
+
|
|
66
|
+
See the [main repository README](../../README.md) for publishing instructions.
|
|
67
|
+
|
|
68
|
+
## Dependencies
|
|
69
|
+
|
|
70
|
+
**Peer Dependencies:**
|
|
71
|
+
|
|
72
|
+
- `@bufbuild/protobuf` ^2.9.0
|
|
73
|
+
- `@connectrpc/connect` ^2.1.0
|
|
74
|
+
|
|
75
|
+
Make sure these are installed in your consuming application.
|
|
76
|
+
|
|
77
|
+
## Best Practices
|
|
78
|
+
|
|
79
|
+
1. **Always use the latest version** - Keep this package updated across all services
|
|
80
|
+
2. **Import from specific paths** - Use deep imports for better tree-shaking
|
|
81
|
+
3. **Handle breaking changes carefully** - Review changelog before major version updates
|
|
82
|
+
4. **Type safety** - Leverage TypeScript's type checking with these definitions
|
|
60
83
|
|
|
61
|
-
##
|
|
84
|
+
## Support
|
|
62
85
|
|
|
63
|
-
|
|
64
|
-
2. **Always bump versions** when a change affects consumers.
|
|
65
|
-
3. **Keep exports minimal** β expose only whatβs needed.
|
|
66
|
-
4. **Ensure backward compatibility** where possible.
|
|
67
|
-
5. **Document breaking changes** in PR descriptions.
|
|
68
|
-
6. **Verify builds locally** before publishing.
|
|
86
|
+
For issues or questions, please refer to the [main repository](https://github.com/CrossroadsAcademy/togather-shared-protos).
|
|
69
87
|
|
|
70
88
|
---
|
|
71
89
|
|
|
72
|
-
|
|
73
|
-
Please follow the contribution guide and coding standards before submitting PRs.
|
|
90
|
+
Maintained by the ToGather Engineering Team
|
|
@@ -19,9 +19,9 @@ export type GetProfileRequest = Message<"userservice.user.v1.GetProfileRequest">
|
|
|
19
19
|
*/
|
|
20
20
|
export declare const GetProfileRequestSchema: GenMessage<GetProfileRequest>;
|
|
21
21
|
/**
|
|
22
|
-
* @generated from message userservice.user.v1.
|
|
22
|
+
* @generated from message userservice.user.v1.User
|
|
23
23
|
*/
|
|
24
|
-
export type
|
|
24
|
+
export type User = Message<"userservice.user.v1.User"> & {
|
|
25
25
|
/**
|
|
26
26
|
* @generated from field: string id = 1;
|
|
27
27
|
*/
|
|
@@ -51,6 +51,20 @@ export type GetProfileResponse = Message<"userservice.user.v1.GetProfileResponse
|
|
|
51
51
|
*/
|
|
52
52
|
updatedAt: string;
|
|
53
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* Describes the message userservice.user.v1.User.
|
|
56
|
+
* Use `create(UserSchema)` to create a new message.
|
|
57
|
+
*/
|
|
58
|
+
export declare const UserSchema: GenMessage<User>;
|
|
59
|
+
/**
|
|
60
|
+
* @generated from message userservice.user.v1.GetProfileResponse
|
|
61
|
+
*/
|
|
62
|
+
export type GetProfileResponse = Message<"userservice.user.v1.GetProfileResponse"> & {
|
|
63
|
+
/**
|
|
64
|
+
* @generated from field: userservice.user.v1.User user = 1;
|
|
65
|
+
*/
|
|
66
|
+
user?: User;
|
|
67
|
+
};
|
|
54
68
|
/**
|
|
55
69
|
* Describes the message userservice.user.v1.GetProfileResponse.
|
|
56
70
|
* Use `create(GetProfileResponseSchema)` to create a new message.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user_pb.d.ts","sourceRoot":"","sources":["../../../../src/userservice/user/v1/user_pb.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAEpF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,6BAA6B,EAAE,
|
|
1
|
+
{"version":3,"file":"user_pb.d.ts","sourceRoot":"","sources":["../../../../src/userservice/user/v1/user_pb.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAEpF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,6BAA6B,EAAE,OACoe,CAAC;AAEjhB;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,uCAAuC,CAAC,GAAG;IACjF;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,UAAU,CAAC,iBAAiB,CACnB,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG,OAAO,CAAC,0BAA0B,CAAC,GAAG;IACvD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,IAAI,CACO,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,wCAAwC,CAAC,GAAG;IACnF;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,UAAU,CAAC,kBAAkB,CACrB,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC;IACnC;;OAEG;IACH,UAAU,EAAE;QACV,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,uBAAuB,CAAC;QACtC,MAAM,EAAE,OAAO,wBAAwB,CAAC;KACzC,CAAC;CACH,CAC8C,CAAC"}
|
|
@@ -5,17 +5,22 @@ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2
|
|
|
5
5
|
/**
|
|
6
6
|
* Describes the file userservice/user/v1/user.proto.
|
|
7
7
|
*/
|
|
8
|
-
export const file_userservice_user_v1_user = /*@__PURE__*/ fileDesc("
|
|
8
|
+
export const file_userservice_user_v1_user = /*@__PURE__*/ fileDesc("Ch51c2Vyc2VydmljZS91c2VyL3YxL3VzZXIucHJvdG8SE3VzZXJzZXJ2aWNlLnVzZXIudjEiHwoRR2V0UHJvZmlsZVJlcXVlc3QSCgoCaWQYASABKAkidAoEVXNlchIKCgJpZBgBIAEoCRIMCgRuYW1lGAIgASgJEg0KBWVtYWlsGAMgASgJEgsKA2RvYhgEIAEoCRIOCgZnZW5kZXIYBSABKAkSEgoKY3JlYXRlZF9hdBgGIAEoCRISCgp1cGRhdGVkX2F0GAcgASgJIj0KEkdldFByb2ZpbGVSZXNwb25zZRInCgR1c2VyGAEgASgLMhkudXNlcnNlcnZpY2UudXNlci52MS5Vc2VyMmwKC1VzZXJTZXJ2aWNlEl0KCkdldFByb2ZpbGUSJi51c2Vyc2VydmljZS51c2VyLnYxLkdldFByb2ZpbGVSZXF1ZXN0GicudXNlcnNlcnZpY2UudXNlci52MS5HZXRQcm9maWxlUmVzcG9uc2ViBnByb3RvMw");
|
|
9
9
|
/**
|
|
10
10
|
* Describes the message userservice.user.v1.GetProfileRequest.
|
|
11
11
|
* Use `create(GetProfileRequestSchema)` to create a new message.
|
|
12
12
|
*/
|
|
13
13
|
export const GetProfileRequestSchema = /*@__PURE__*/ messageDesc(file_userservice_user_v1_user, 0);
|
|
14
|
+
/**
|
|
15
|
+
* Describes the message userservice.user.v1.User.
|
|
16
|
+
* Use `create(UserSchema)` to create a new message.
|
|
17
|
+
*/
|
|
18
|
+
export const UserSchema = /*@__PURE__*/ messageDesc(file_userservice_user_v1_user, 1);
|
|
14
19
|
/**
|
|
15
20
|
* Describes the message userservice.user.v1.GetProfileResponse.
|
|
16
21
|
* Use `create(GetProfileResponseSchema)` to create a new message.
|
|
17
22
|
*/
|
|
18
|
-
export const GetProfileResponseSchema = /*@__PURE__*/ messageDesc(file_userservice_user_v1_user,
|
|
23
|
+
export const GetProfileResponseSchema = /*@__PURE__*/ messageDesc(file_userservice_user_v1_user, 2);
|
|
19
24
|
/**
|
|
20
25
|
* @generated from service userservice.user.v1.UserService
|
|
21
26
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user_pb.js","sourceRoot":"","sources":["../../../../src/userservice/user/v1/user_pb.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,mGAAmG;AACnG,oBAAoB;AAGpB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAGlF;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAY,aAAa,CACjE,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"user_pb.js","sourceRoot":"","sources":["../../../../src/userservice/user/v1/user_pb.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,mGAAmG;AACnG,oBAAoB;AAGpB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAGlF;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAY,aAAa,CACjE,QAAQ,CAAC,ogBAAogB,CAAC,CAAC;AAYjhB;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAkC,aAAa,CACjF,WAAW,CAAC,6BAA6B,EAAE,CAAC,CAAC,CAAC;AA0ChD;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAqB,aAAa,CACvD,WAAW,CAAC,6BAA6B,EAAE,CAAC,CAAC,CAAC;AAYhD;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAmC,aAAa,CACnF,WAAW,CAAC,6BAA6B,EAAE,CAAC,CAAC,CAAC;AAEhD;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GASnB,aAAa,CAChB,WAAW,CAAC,6BAA6B,EAAE,CAAC,CAAC,CAAC"}
|