@requ1emz/contracts 1.0.16 → 1.0.18

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/gen/family.ts CHANGED
@@ -7,10 +7,15 @@
7
7
  /* eslint-disable */
8
8
  import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
9
  import { Observable } from "rxjs";
10
- import { Empty } from "./google/protobuf/empty";
11
10
 
12
11
  export const protobufPackage = "family.v1";
13
12
 
13
+ export enum ROLE {
14
+ ADMIN = 0,
15
+ MEMBER = 1,
16
+ UNRECOGNIZED = -1,
17
+ }
18
+
14
19
  export interface CreateFamilyRequest {
15
20
  userId: string;
16
21
  name: string;
@@ -21,6 +26,10 @@ export interface DeleteFamilyRequest {
21
26
  familyId: string;
22
27
  }
23
28
 
29
+ export interface DeleteFamilyResponse {
30
+ status: boolean;
31
+ }
32
+
24
33
  export interface GetFamilyRequest {
25
34
  userId: string;
26
35
  }
@@ -34,7 +43,7 @@ export interface FamilyResponse {
34
43
 
35
44
  export interface FamilyMemberDto {
36
45
  userId: string;
37
- role: string;
46
+ role: ROLE;
38
47
  }
39
48
 
40
49
  export const FAMILY_V1_PACKAGE_NAME = "family.v1";
@@ -42,7 +51,7 @@ export const FAMILY_V1_PACKAGE_NAME = "family.v1";
42
51
  export interface FamilyServiceClient {
43
52
  createFamily(request: CreateFamilyRequest): Observable<FamilyResponse>;
44
53
 
45
- deleteFamily(request: DeleteFamilyRequest): Observable<Empty>;
54
+ deleteFamily(request: DeleteFamilyRequest): Observable<DeleteFamilyResponse>;
46
55
 
47
56
  getFamily(request: GetFamilyRequest): Observable<FamilyResponse>;
48
57
  }
@@ -50,7 +59,9 @@ export interface FamilyServiceClient {
50
59
  export interface FamilyServiceController {
51
60
  createFamily(request: CreateFamilyRequest): Promise<FamilyResponse> | Observable<FamilyResponse> | FamilyResponse;
52
61
 
53
- deleteFamily(request: DeleteFamilyRequest): void;
62
+ deleteFamily(
63
+ request: DeleteFamilyRequest,
64
+ ): Promise<DeleteFamilyResponse> | Observable<DeleteFamilyResponse> | DeleteFamilyResponse;
54
65
 
55
66
  getFamily(request: GetFamilyRequest): Promise<FamilyResponse> | Observable<FamilyResponse> | FamilyResponse;
56
67
  }
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.10.1
4
- // protoc v3.21.12
4
+ // protoc v6.33.3
5
5
  // source: google/protobuf/empty.proto
6
6
 
7
7
  /* eslint-disable */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@requ1emz/contracts",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,11 +1,10 @@
1
1
  syntax = "proto3";
2
2
 
3
3
  package family.v1;
4
- import "google/protobuf/empty.proto";
5
4
 
6
5
  service FamilyService {
7
6
  rpc CreateFamily (CreateFamilyRequest) returns (FamilyResponse);
8
- rpc DeleteFamily (DeleteFamilyRequest) returns (google.protobuf.Empty);
7
+ rpc DeleteFamily (DeleteFamilyRequest) returns (DeleteFamilyResponse);
9
8
  rpc GetFamily (GetFamilyRequest) returns (FamilyResponse);
10
9
  }
11
10
 
@@ -19,6 +18,10 @@ message DeleteFamilyRequest {
19
18
  string family_id = 2;
20
19
  }
21
20
 
21
+ message DeleteFamilyResponse {
22
+ bool status = 1;
23
+ }
24
+
22
25
  message GetFamilyRequest {
23
26
  string user_id = 1;
24
27
  }
@@ -32,5 +35,10 @@ message FamilyResponse {
32
35
 
33
36
  message FamilyMemberDto {
34
37
  string user_id = 1;
35
- string role = 2;
38
+ ROLE role = 2;
39
+ }
40
+
41
+ enum ROLE {
42
+ ADMIN = 0;
43
+ MEMBER = 1;
36
44
  }