@volontariapp/contracts-nest 3.1.6 → 3.1.7
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/CHANGELOG.md +6 -0
- package/dist/post/comment.command.d.ts +9 -0
- package/dist/post/comment.command.d.ts.map +1 -0
- package/dist/post/comment.command.js +2 -0
- package/dist/post/comment.command.js.map +1 -0
- package/dist/post/comment.d.ts +10 -0
- package/dist/post/comment.d.ts.map +1 -0
- package/dist/post/comment.js +2 -0
- package/dist/post/comment.js.map +1 -0
- package/dist/post/comment.query.d.ts +6 -0
- package/dist/post/comment.query.d.ts.map +1 -0
- package/dist/post/comment.query.js +2 -0
- package/dist/post/comment.query.js.map +1 -0
- package/dist/post/comment.responses.d.ts +13 -0
- package/dist/post/comment.responses.d.ts.map +1 -0
- package/dist/post/comment.responses.js +2 -0
- package/dist/post/comment.responses.js.map +1 -0
- package/dist/post/index.d.ts +4 -0
- package/dist/post/index.d.ts.map +1 -1
- package/dist/post/index.js +4 -0
- package/dist/post/index.js.map +1 -1
- package/dist/post/post.command.d.ts +1 -1
- package/dist/post/post.command.d.ts.map +1 -1
- package/dist/post/post.d.ts +3 -0
- package/dist/post/post.d.ts.map +1 -1
- package/dist/post/post.responses.d.ts +2 -2
- package/dist/post/post.services.d.ts +13 -4
- package/dist/post/post.services.d.ts.map +1 -1
- package/dist/post/post.services.js +14 -11
- package/dist/post/post.services.js.map +1 -1
- package/package.json +1 -1
- package/proto/volontariapp/post/comment.command.proto +13 -0
- package/proto/volontariapp/post/comment.proto +14 -0
- package/proto/volontariapp/post/comment.query.proto +10 -0
- package/proto/volontariapp/post/comment.responses.proto +19 -0
- package/proto/volontariapp/post/post.proto +4 -0
- package/proto/volontariapp/post/post.services.proto +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment.command.d.ts","sourceRoot":"","sources":["../../src/post/comment.command.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment.command.js","sourceRoot":"","sources":["../../src/post/comment.command.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Timestamp } from "../google/protobuf/timestamp.js";
|
|
2
|
+
export interface Comment {
|
|
3
|
+
id: string;
|
|
4
|
+
postId: string;
|
|
5
|
+
authorId: string;
|
|
6
|
+
content: string;
|
|
7
|
+
createdAt: Timestamp | undefined;
|
|
8
|
+
updatedAt: Timestamp | undefined;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=comment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../src/post/comment.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment.js","sourceRoot":"","sources":["../../src/post/comment.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment.query.d.ts","sourceRoot":"","sources":["../../src/post/comment.query.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,iBAAiB,GAAG,SAAS,CAAC;CAC3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment.query.js","sourceRoot":"","sources":["../../src/post/comment.query.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PaginationResponse } from "../common/pagination.js";
|
|
2
|
+
import { Comment } from "./comment.js";
|
|
3
|
+
export interface CreateCommentResponse {
|
|
4
|
+
comment: Comment | undefined;
|
|
5
|
+
}
|
|
6
|
+
export interface ListCommentsResponse {
|
|
7
|
+
comments: Comment[];
|
|
8
|
+
pagination: PaginationResponse | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface DeleteCommentResponse {
|
|
11
|
+
success: boolean;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=comment.responses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment.responses.d.ts","sourceRoot":"","sources":["../../src/post/comment.responses.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,UAAU,EAAE,kBAAkB,GAAG,SAAS,CAAC;CAC5C;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment.responses.js","sourceRoot":"","sources":["../../src/post/comment.responses.ts"],"names":[],"mappings":""}
|
package/dist/post/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export * from './post.query.js';
|
|
2
|
+
export * from './comment.responses.js';
|
|
3
|
+
export * from './comment.command.js';
|
|
2
4
|
export * from './post.js';
|
|
3
5
|
export * from './post.command.js';
|
|
4
6
|
export * from './grpc-helpers.js';
|
|
7
|
+
export * from './comment.js';
|
|
8
|
+
export * from './comment.query.js';
|
|
5
9
|
export * from './post.responses.js';
|
|
6
10
|
export * from './post.services.js';
|
|
7
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/post/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/post/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/post/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
|
package/dist/post/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export * from './post.query.js';
|
|
2
|
+
export * from './comment.responses.js';
|
|
3
|
+
export * from './comment.command.js';
|
|
2
4
|
export * from './post.js';
|
|
3
5
|
export * from './post.command.js';
|
|
4
6
|
export * from './grpc-helpers.js';
|
|
7
|
+
export * from './comment.js';
|
|
8
|
+
export * from './comment.query.js';
|
|
5
9
|
export * from './post.responses.js';
|
|
6
10
|
export * from './post.services.js';
|
|
7
11
|
//# sourceMappingURL=index.js.map
|
package/dist/post/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/post/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/post/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post.command.d.ts","sourceRoot":"","sources":["../../src/post/post.command.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,IAAI,GAAG,SAAS,CAAC;IACvB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,oBAAoB;
|
|
1
|
+
{"version":3,"file":"post.command.d.ts","sourceRoot":"","sources":["../../src/post/post.command.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,IAAI,GAAG,SAAS,CAAC;IACvB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,oBAAoB;CACpC"}
|
package/dist/post/post.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { Timestamp } from "../google/protobuf/timestamp.js";
|
|
1
2
|
export interface Post {
|
|
2
3
|
id: string;
|
|
3
4
|
authorId: string;
|
|
4
5
|
title: string;
|
|
5
6
|
content: string;
|
|
7
|
+
createdAt: Timestamp | undefined;
|
|
8
|
+
updatedAt: Timestamp | undefined;
|
|
6
9
|
}
|
|
7
10
|
//# sourceMappingURL=post.d.ts.map
|
package/dist/post/post.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post.d.ts","sourceRoot":"","sources":["../../src/post/post.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"post.d.ts","sourceRoot":"","sources":["../../src/post/post.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;CAClC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { Observable } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { CreateCommentCommand, DeleteCommentCommand } from "./comment.command.js";
|
|
3
|
+
import { ListCommentsQuery } from "./comment.query.js";
|
|
4
|
+
import { CreateCommentResponse, DeleteCommentResponse, ListCommentsResponse } from "./comment.responses.js";
|
|
5
|
+
import { AdminCreatePostCommand, CreatePostCommand, DeleteMyPostsCommand, DeletePostCommand, UpdatePostCommand } from "./post.command.js";
|
|
6
|
+
import { GetPostQuery, ListPostsQuery } from "./post.query.js";
|
|
7
|
+
import { AdminCreatePostResponse, CreatePostResponse, DeleteMyPostsResponse, DeletePostResponse, GetPostResponse, ListPostsResponse, UpdatePostResponse } from "./post.responses.js";
|
|
5
8
|
export interface PostServiceClient {
|
|
6
9
|
getPost(request: GetPostQuery): Observable<GetPostResponse>;
|
|
7
10
|
listPosts(request: ListPostsQuery): Observable<ListPostsResponse>;
|
|
@@ -10,6 +13,9 @@ export interface PostServiceClient {
|
|
|
10
13
|
updatePost(request: UpdatePostCommand): Observable<UpdatePostResponse>;
|
|
11
14
|
deletePost(request: DeletePostCommand): Observable<DeletePostResponse>;
|
|
12
15
|
deleteMyPosts(request: DeleteMyPostsCommand): Observable<DeleteMyPostsResponse>;
|
|
16
|
+
createComment(request: CreateCommentCommand): Observable<CreateCommentResponse>;
|
|
17
|
+
deleteComment(request: DeleteCommentCommand): Observable<DeleteCommentResponse>;
|
|
18
|
+
listComments(request: ListCommentsQuery): Observable<ListCommentsResponse>;
|
|
13
19
|
}
|
|
14
20
|
export interface PostServiceController {
|
|
15
21
|
getPost(request: GetPostQuery): Promise<GetPostResponse> | Observable<GetPostResponse> | GetPostResponse;
|
|
@@ -19,6 +25,9 @@ export interface PostServiceController {
|
|
|
19
25
|
updatePost(request: UpdatePostCommand): Promise<UpdatePostResponse> | Observable<UpdatePostResponse> | UpdatePostResponse;
|
|
20
26
|
deletePost(request: DeletePostCommand): Promise<DeletePostResponse> | Observable<DeletePostResponse> | DeletePostResponse;
|
|
21
27
|
deleteMyPosts(request: DeleteMyPostsCommand): Promise<DeleteMyPostsResponse> | Observable<DeleteMyPostsResponse> | DeleteMyPostsResponse;
|
|
28
|
+
createComment(request: CreateCommentCommand): Promise<CreateCommentResponse> | Observable<CreateCommentResponse> | CreateCommentResponse;
|
|
29
|
+
deleteComment(request: DeleteCommentCommand): Promise<DeleteCommentResponse> | Observable<DeleteCommentResponse> | DeleteCommentResponse;
|
|
30
|
+
listComments(request: ListCommentsQuery): Promise<ListCommentsResponse> | Observable<ListCommentsResponse> | ListCommentsResponse;
|
|
22
31
|
}
|
|
23
32
|
export declare function PostServiceControllerMethods(): (constructor: Function) => void;
|
|
24
33
|
export declare const POST_SERVICE_NAME = "PostService";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post.services.d.ts","sourceRoot":"","sources":["../../src/post/post.services.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,OAAO,EAAE,YAAY,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IAE5D,SAAS,CAAC,OAAO,EAAE,cAAc,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAElE,UAAU,C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F,UAAU,CACR,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,kBAAkB,CAAC,GAAG,UAAU,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,CAAC;IAErF,aAAa,CACX,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,qBAAqB,CAAC,GAAG,UAAU,CAAC,qBAAqB,CAAC,GAAG,qBAAqB,CAAC;IAE9F,aAAa,CACX,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,qBAAqB,CAAC,GAAG,UAAU,CAAC,qBAAqB,CAAC,GAAG,qBAAqB,CAAC;IAE9F,aAAa,CACX,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,qBAAqB,CAAC,GAAG,UAAU,CAAC,qBAAqB,CAAC,GAAG,qBAAqB,CAAC;IAE9F,YAAY,CACV,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,oBAAoB,CAAC,GAAG,UAAU,CAAC,oBAAoB,CAAC,GAAG,oBAAoB,CAAC;CAC5F;AAED,wBAAgB,4BAA4B,kBACZ,QAAQ,UAuBvC;AAED,eAAO,MAAM,iBAAiB,gBAAgB,CAAC"}
|
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import { GrpcMethod, GrpcStreamMethod } from
|
|
1
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
2
2
|
export function PostServiceControllerMethods() {
|
|
3
3
|
return function (constructor) {
|
|
4
4
|
const grpcMethods = [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
"getPost",
|
|
6
|
+
"listPosts",
|
|
7
|
+
"createPost",
|
|
8
|
+
"adminCreatePost",
|
|
9
|
+
"updatePost",
|
|
10
|
+
"deletePost",
|
|
11
|
+
"deleteMyPosts",
|
|
12
|
+
"createComment",
|
|
13
|
+
"deleteComment",
|
|
14
|
+
"listComments",
|
|
12
15
|
];
|
|
13
16
|
for (const method of grpcMethods) {
|
|
14
17
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
15
|
-
GrpcMethod(
|
|
18
|
+
GrpcMethod("PostService", method)(constructor.prototype[method], method, descriptor);
|
|
16
19
|
}
|
|
17
20
|
const grpcStreamMethods = [];
|
|
18
21
|
for (const method of grpcStreamMethods) {
|
|
19
22
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
20
|
-
GrpcStreamMethod(
|
|
23
|
+
GrpcStreamMethod("PostService", method)(constructor.prototype[method], method, descriptor);
|
|
21
24
|
}
|
|
22
25
|
};
|
|
23
26
|
}
|
|
24
|
-
export const POST_SERVICE_NAME =
|
|
27
|
+
export const POST_SERVICE_NAME = "PostService";
|
|
25
28
|
//# sourceMappingURL=post.services.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post.services.js","sourceRoot":"","sources":["../../src/post/post.services.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"post.services.js","sourceRoot":"","sources":["../../src/post/post.services.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAmFrE,MAAM,UAAU,4BAA4B;IAC1C,OAAO,UAAU,WAAqB;QACpC,MAAM,WAAW,GAAa;YAC5B,SAAS;YACT,WAAW;YACX,YAAY;YACZ,iBAAiB;YACjB,YAAY;YACZ,YAAY;YACZ,eAAe;YACf,eAAe;YACf,eAAe;YACf,cAAc;SACf,CAAC;QACF,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE,CAAC;YACjC,MAAM,UAAU,GAAQ,OAAO,CAAC,wBAAwB,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YACxF,UAAU,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QACvF,CAAC;QACD,MAAM,iBAAiB,GAAa,EAAE,CAAC;QACvC,KAAK,MAAM,MAAM,IAAI,iBAAiB,EAAE,CAAC;YACvC,MAAM,UAAU,GAAQ,OAAO,CAAC,wBAAwB,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YACxF,gBAAgB,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QAC7F,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package volontariapp.post;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/timestamp.proto";
|
|
6
|
+
|
|
7
|
+
message Comment {
|
|
8
|
+
string id = 1;
|
|
9
|
+
string post_id = 2;
|
|
10
|
+
string author_id = 3;
|
|
11
|
+
string content = 4;
|
|
12
|
+
google.protobuf.Timestamp created_at = 5;
|
|
13
|
+
google.protobuf.Timestamp updated_at = 6;
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package volontariapp.post;
|
|
4
|
+
|
|
5
|
+
import "volontariapp/common/pagination.proto";
|
|
6
|
+
import "volontariapp/post/comment.proto";
|
|
7
|
+
|
|
8
|
+
message CreateCommentResponse {
|
|
9
|
+
Comment comment = 1;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
message ListCommentsResponse {
|
|
13
|
+
repeated Comment comments = 1;
|
|
14
|
+
volontariapp.common.PaginationResponse pagination = 2;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message DeleteCommentResponse {
|
|
18
|
+
bool success = 1;
|
|
19
|
+
}
|
|
@@ -3,9 +3,13 @@ syntax = "proto3";
|
|
|
3
3
|
package volontariapp.post;
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
import "google/protobuf/timestamp.proto";
|
|
7
|
+
|
|
6
8
|
message Post {
|
|
7
9
|
string id = 1;
|
|
8
10
|
string author_id = 2;
|
|
9
11
|
string title = 3;
|
|
10
12
|
string content = 4;
|
|
13
|
+
google.protobuf.Timestamp created_at = 5;
|
|
14
|
+
google.protobuf.Timestamp updated_at = 6;
|
|
11
15
|
}
|
|
@@ -5,6 +5,9 @@ package volontariapp.post;
|
|
|
5
5
|
import "volontariapp/post/post.query.proto";
|
|
6
6
|
import "volontariapp/post/post.command.proto";
|
|
7
7
|
import "volontariapp/post/post.responses.proto";
|
|
8
|
+
import "volontariapp/post/comment.query.proto";
|
|
9
|
+
import "volontariapp/post/comment.command.proto";
|
|
10
|
+
import "volontariapp/post/comment.responses.proto";
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
|
|
@@ -16,4 +19,8 @@ service PostService {
|
|
|
16
19
|
rpc UpdatePost (UpdatePostCommand) returns (UpdatePostResponse) {}
|
|
17
20
|
rpc DeletePost (DeletePostCommand) returns (DeletePostResponse) {}
|
|
18
21
|
rpc DeleteMyPosts (DeleteMyPostsCommand) returns (DeleteMyPostsResponse) {}
|
|
22
|
+
|
|
23
|
+
rpc CreateComment (CreateCommentCommand) returns (CreateCommentResponse) {}
|
|
24
|
+
rpc DeleteComment (DeleteCommentCommand) returns (DeleteCommentResponse) {}
|
|
25
|
+
rpc ListComments (ListCommentsQuery) returns (ListCommentsResponse) {}
|
|
19
26
|
}
|