@mamindom/contracts 1.0.51 → 1.0.52
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/dist/gen/common_post.d.ts +18 -0
- package/dist/gen/common_post.js +11 -0
- package/dist/gen/post.d.ts +304 -0
- package/dist/gen/post.js +55 -0
- package/dist/gen/post_category.d.ts +104 -0
- package/dist/gen/post_category.js +43 -0
- package/dist/gen/post_comment.d.ts +54 -0
- package/dist/gen/post_comment.js +36 -0
- package/dist/gen/post_tag.d.ts +68 -0
- package/dist/gen/post_tag.js +28 -0
- package/dist/gen/post_version.d.ts +73 -0
- package/dist/gen/post_version.js +28 -0
- package/dist/proto/common_post.proto +23 -0
- package/dist/proto/post.proto +193 -0
- package/dist/proto/post_category.proto +84 -0
- package/dist/proto/post_comment.proto +66 -0
- package/dist/proto/post_tag.proto +57 -0
- package/dist/proto/post_version.proto +61 -0
- package/dist/src/proto/paths.d.ts +6 -1
- package/dist/src/proto/paths.js +6 -1
- package/gen/common_post.ts +31 -0
- package/gen/post.ts +346 -0
- package/gen/post_category.ts +157 -0
- package/gen/post_comment.ts +99 -0
- package/gen/post_tag.ts +113 -0
- package/gen/post_version.ts +112 -0
- package/package.json +1 -1
- package/proto/common_post.proto +23 -0
- package/proto/post.proto +193 -0
- package/proto/post_category.proto +84 -0
- package/proto/post_comment.proto +66 -0
- package/proto/post_tag.proto +57 -0
- package/proto/post_version.proto +61 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const protobufPackage = "content.v1";
|
|
2
|
+
export interface SuccessResponse {
|
|
3
|
+
success: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface DeleteResponse {
|
|
6
|
+
success: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface PaginationRequest {
|
|
9
|
+
page: number;
|
|
10
|
+
limit: number;
|
|
11
|
+
}
|
|
12
|
+
export interface PaginationMeta {
|
|
13
|
+
totalItems: number;
|
|
14
|
+
totalPages: number;
|
|
15
|
+
currentPage: number;
|
|
16
|
+
perPage: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.11.4
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: common_post.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.CONTENT_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
exports.protobufPackage = "content.v1";
|
|
11
|
+
exports.CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { DeleteResponse, PaginationMeta, PaginationRequest, SuccessResponse } from "./common_post";
|
|
3
|
+
export declare const protobufPackage = "content.v1";
|
|
4
|
+
export declare enum PostType {
|
|
5
|
+
POST_TYPE_UNSPECIFIED = 0,
|
|
6
|
+
POST_TYPE_ARTICLE = 1,
|
|
7
|
+
POST_TYPE_NEWS = 2,
|
|
8
|
+
POST_TYPE_PAGE = 3,
|
|
9
|
+
UNRECOGNIZED = -1
|
|
10
|
+
}
|
|
11
|
+
export declare enum PostStatus {
|
|
12
|
+
POST_STATUS_UNSPECIFIED = 0,
|
|
13
|
+
POST_STATUS_DRAFT = 1,
|
|
14
|
+
POST_STATUS_SCHEDULED = 2,
|
|
15
|
+
POST_STATUS_PUBLISHED = 3,
|
|
16
|
+
POST_STATUS_ARCHIVED = 4,
|
|
17
|
+
UNRECOGNIZED = -1
|
|
18
|
+
}
|
|
19
|
+
export interface PostResponse {
|
|
20
|
+
id: string;
|
|
21
|
+
slug: string;
|
|
22
|
+
type: PostType;
|
|
23
|
+
status: PostStatus;
|
|
24
|
+
title: {
|
|
25
|
+
[key: string]: string;
|
|
26
|
+
};
|
|
27
|
+
excerpt: {
|
|
28
|
+
[key: string]: string;
|
|
29
|
+
};
|
|
30
|
+
content: {
|
|
31
|
+
[key: string]: string;
|
|
32
|
+
};
|
|
33
|
+
coverImage?: string | undefined;
|
|
34
|
+
coverImageId?: string | undefined;
|
|
35
|
+
publishedAt?: string | undefined;
|
|
36
|
+
readTime: number;
|
|
37
|
+
viewsCount: number;
|
|
38
|
+
commentsCount: number;
|
|
39
|
+
seoTitle: {
|
|
40
|
+
[key: string]: string;
|
|
41
|
+
};
|
|
42
|
+
seoDescription: {
|
|
43
|
+
[key: string]: string;
|
|
44
|
+
};
|
|
45
|
+
seoKeywords: {
|
|
46
|
+
[key: string]: string;
|
|
47
|
+
};
|
|
48
|
+
seoH1: {
|
|
49
|
+
[key: string]: string;
|
|
50
|
+
};
|
|
51
|
+
createdById: string;
|
|
52
|
+
createdAt: string;
|
|
53
|
+
updatedAt: string;
|
|
54
|
+
categories: PostCategoryItem[];
|
|
55
|
+
tags: PostTagItem[];
|
|
56
|
+
}
|
|
57
|
+
export interface PostResponse_TitleEntry {
|
|
58
|
+
key: string;
|
|
59
|
+
value: string;
|
|
60
|
+
}
|
|
61
|
+
export interface PostResponse_ExcerptEntry {
|
|
62
|
+
key: string;
|
|
63
|
+
value: string;
|
|
64
|
+
}
|
|
65
|
+
export interface PostResponse_ContentEntry {
|
|
66
|
+
key: string;
|
|
67
|
+
value: string;
|
|
68
|
+
}
|
|
69
|
+
export interface PostResponse_SeoTitleEntry {
|
|
70
|
+
key: string;
|
|
71
|
+
value: string;
|
|
72
|
+
}
|
|
73
|
+
export interface PostResponse_SeoDescriptionEntry {
|
|
74
|
+
key: string;
|
|
75
|
+
value: string;
|
|
76
|
+
}
|
|
77
|
+
export interface PostResponse_SeoKeywordsEntry {
|
|
78
|
+
key: string;
|
|
79
|
+
value: string;
|
|
80
|
+
}
|
|
81
|
+
export interface PostResponse_SeoH1Entry {
|
|
82
|
+
key: string;
|
|
83
|
+
value: string;
|
|
84
|
+
}
|
|
85
|
+
export interface PostCategoryItem {
|
|
86
|
+
id: string;
|
|
87
|
+
slug: string;
|
|
88
|
+
name: {
|
|
89
|
+
[key: string]: string;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export interface PostCategoryItem_NameEntry {
|
|
93
|
+
key: string;
|
|
94
|
+
value: string;
|
|
95
|
+
}
|
|
96
|
+
export interface PostTagItem {
|
|
97
|
+
id: string;
|
|
98
|
+
slug: string;
|
|
99
|
+
name: {
|
|
100
|
+
[key: string]: string;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
export interface PostTagItem_NameEntry {
|
|
104
|
+
key: string;
|
|
105
|
+
value: string;
|
|
106
|
+
}
|
|
107
|
+
export interface PostListItem {
|
|
108
|
+
id: string;
|
|
109
|
+
slug: string;
|
|
110
|
+
type: PostType;
|
|
111
|
+
status: PostStatus;
|
|
112
|
+
title: {
|
|
113
|
+
[key: string]: string;
|
|
114
|
+
};
|
|
115
|
+
excerpt: {
|
|
116
|
+
[key: string]: string;
|
|
117
|
+
};
|
|
118
|
+
coverImage?: string | undefined;
|
|
119
|
+
publishedAt?: string | undefined;
|
|
120
|
+
readTime: number;
|
|
121
|
+
viewsCount: number;
|
|
122
|
+
commentsCount: number;
|
|
123
|
+
categories: PostCategoryItem[];
|
|
124
|
+
tags: PostTagItem[];
|
|
125
|
+
}
|
|
126
|
+
export interface PostListItem_TitleEntry {
|
|
127
|
+
key: string;
|
|
128
|
+
value: string;
|
|
129
|
+
}
|
|
130
|
+
export interface PostListItem_ExcerptEntry {
|
|
131
|
+
key: string;
|
|
132
|
+
value: string;
|
|
133
|
+
}
|
|
134
|
+
export interface GetPostsRequest {
|
|
135
|
+
pagination: PaginationRequest | undefined;
|
|
136
|
+
type?: PostType | undefined;
|
|
137
|
+
status?: PostStatus | undefined;
|
|
138
|
+
search?: string | undefined;
|
|
139
|
+
categoryId?: string | undefined;
|
|
140
|
+
tagId?: string | undefined;
|
|
141
|
+
dateFrom?: string | undefined;
|
|
142
|
+
dateTo?: string | undefined;
|
|
143
|
+
sortBy?: string | undefined;
|
|
144
|
+
}
|
|
145
|
+
export interface GetPostsResponse {
|
|
146
|
+
items: PostListItem[];
|
|
147
|
+
meta: PaginationMeta | undefined;
|
|
148
|
+
}
|
|
149
|
+
export interface GetPostRequest {
|
|
150
|
+
id: string;
|
|
151
|
+
slug?: string | undefined;
|
|
152
|
+
}
|
|
153
|
+
export interface CreatePostRequest {
|
|
154
|
+
type: PostType;
|
|
155
|
+
slug?: string | undefined;
|
|
156
|
+
title: {
|
|
157
|
+
[key: string]: string;
|
|
158
|
+
};
|
|
159
|
+
excerpt: {
|
|
160
|
+
[key: string]: string;
|
|
161
|
+
};
|
|
162
|
+
content: {
|
|
163
|
+
[key: string]: string;
|
|
164
|
+
};
|
|
165
|
+
coverImage?: string | undefined;
|
|
166
|
+
coverImageId?: string | undefined;
|
|
167
|
+
seoTitle: {
|
|
168
|
+
[key: string]: string;
|
|
169
|
+
};
|
|
170
|
+
seoDescription: {
|
|
171
|
+
[key: string]: string;
|
|
172
|
+
};
|
|
173
|
+
seoKeywords: {
|
|
174
|
+
[key: string]: string;
|
|
175
|
+
};
|
|
176
|
+
seoH1: {
|
|
177
|
+
[key: string]: string;
|
|
178
|
+
};
|
|
179
|
+
categoryIds: string[];
|
|
180
|
+
tagIds: string[];
|
|
181
|
+
createdById: string;
|
|
182
|
+
}
|
|
183
|
+
export interface CreatePostRequest_TitleEntry {
|
|
184
|
+
key: string;
|
|
185
|
+
value: string;
|
|
186
|
+
}
|
|
187
|
+
export interface CreatePostRequest_ExcerptEntry {
|
|
188
|
+
key: string;
|
|
189
|
+
value: string;
|
|
190
|
+
}
|
|
191
|
+
export interface CreatePostRequest_ContentEntry {
|
|
192
|
+
key: string;
|
|
193
|
+
value: string;
|
|
194
|
+
}
|
|
195
|
+
export interface CreatePostRequest_SeoTitleEntry {
|
|
196
|
+
key: string;
|
|
197
|
+
value: string;
|
|
198
|
+
}
|
|
199
|
+
export interface CreatePostRequest_SeoDescriptionEntry {
|
|
200
|
+
key: string;
|
|
201
|
+
value: string;
|
|
202
|
+
}
|
|
203
|
+
export interface CreatePostRequest_SeoKeywordsEntry {
|
|
204
|
+
key: string;
|
|
205
|
+
value: string;
|
|
206
|
+
}
|
|
207
|
+
export interface CreatePostRequest_SeoH1Entry {
|
|
208
|
+
key: string;
|
|
209
|
+
value: string;
|
|
210
|
+
}
|
|
211
|
+
export interface UpdatePostRequest {
|
|
212
|
+
id: string;
|
|
213
|
+
slug?: string | undefined;
|
|
214
|
+
title: {
|
|
215
|
+
[key: string]: string;
|
|
216
|
+
};
|
|
217
|
+
excerpt: {
|
|
218
|
+
[key: string]: string;
|
|
219
|
+
};
|
|
220
|
+
content: {
|
|
221
|
+
[key: string]: string;
|
|
222
|
+
};
|
|
223
|
+
coverImage?: string | undefined;
|
|
224
|
+
coverImageId?: string | undefined;
|
|
225
|
+
seoTitle: {
|
|
226
|
+
[key: string]: string;
|
|
227
|
+
};
|
|
228
|
+
seoDescription: {
|
|
229
|
+
[key: string]: string;
|
|
230
|
+
};
|
|
231
|
+
seoKeywords: {
|
|
232
|
+
[key: string]: string;
|
|
233
|
+
};
|
|
234
|
+
seoH1: {
|
|
235
|
+
[key: string]: string;
|
|
236
|
+
};
|
|
237
|
+
categoryIds: string[];
|
|
238
|
+
tagIds: string[];
|
|
239
|
+
updatedById: string;
|
|
240
|
+
}
|
|
241
|
+
export interface UpdatePostRequest_TitleEntry {
|
|
242
|
+
key: string;
|
|
243
|
+
value: string;
|
|
244
|
+
}
|
|
245
|
+
export interface UpdatePostRequest_ExcerptEntry {
|
|
246
|
+
key: string;
|
|
247
|
+
value: string;
|
|
248
|
+
}
|
|
249
|
+
export interface UpdatePostRequest_ContentEntry {
|
|
250
|
+
key: string;
|
|
251
|
+
value: string;
|
|
252
|
+
}
|
|
253
|
+
export interface UpdatePostRequest_SeoTitleEntry {
|
|
254
|
+
key: string;
|
|
255
|
+
value: string;
|
|
256
|
+
}
|
|
257
|
+
export interface UpdatePostRequest_SeoDescriptionEntry {
|
|
258
|
+
key: string;
|
|
259
|
+
value: string;
|
|
260
|
+
}
|
|
261
|
+
export interface UpdatePostRequest_SeoKeywordsEntry {
|
|
262
|
+
key: string;
|
|
263
|
+
value: string;
|
|
264
|
+
}
|
|
265
|
+
export interface UpdatePostRequest_SeoH1Entry {
|
|
266
|
+
key: string;
|
|
267
|
+
value: string;
|
|
268
|
+
}
|
|
269
|
+
export interface DeletePostRequest {
|
|
270
|
+
id: string;
|
|
271
|
+
}
|
|
272
|
+
export interface PostIdRequest {
|
|
273
|
+
id: string;
|
|
274
|
+
}
|
|
275
|
+
export interface SchedulePostRequest {
|
|
276
|
+
id: string;
|
|
277
|
+
publishAt: string;
|
|
278
|
+
updatedById: string;
|
|
279
|
+
}
|
|
280
|
+
export declare const CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
281
|
+
export interface PostServiceClient {
|
|
282
|
+
getPosts(request: GetPostsRequest): Observable<GetPostsResponse>;
|
|
283
|
+
getPost(request: GetPostRequest): Observable<PostResponse>;
|
|
284
|
+
createPost(request: CreatePostRequest): Observable<PostResponse>;
|
|
285
|
+
updatePost(request: UpdatePostRequest): Observable<PostResponse>;
|
|
286
|
+
deletePost(request: DeletePostRequest): Observable<DeleteResponse>;
|
|
287
|
+
publishPost(request: PostIdRequest): Observable<PostResponse>;
|
|
288
|
+
schedulePost(request: SchedulePostRequest): Observable<PostResponse>;
|
|
289
|
+
archivePost(request: PostIdRequest): Observable<PostResponse>;
|
|
290
|
+
incrementViews(request: PostIdRequest): Observable<SuccessResponse>;
|
|
291
|
+
}
|
|
292
|
+
export interface PostServiceController {
|
|
293
|
+
getPosts(request: GetPostsRequest): Promise<GetPostsResponse> | Observable<GetPostsResponse> | GetPostsResponse;
|
|
294
|
+
getPost(request: GetPostRequest): Promise<PostResponse> | Observable<PostResponse> | PostResponse;
|
|
295
|
+
createPost(request: CreatePostRequest): Promise<PostResponse> | Observable<PostResponse> | PostResponse;
|
|
296
|
+
updatePost(request: UpdatePostRequest): Promise<PostResponse> | Observable<PostResponse> | PostResponse;
|
|
297
|
+
deletePost(request: DeletePostRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
298
|
+
publishPost(request: PostIdRequest): Promise<PostResponse> | Observable<PostResponse> | PostResponse;
|
|
299
|
+
schedulePost(request: SchedulePostRequest): Promise<PostResponse> | Observable<PostResponse> | PostResponse;
|
|
300
|
+
archivePost(request: PostIdRequest): Promise<PostResponse> | Observable<PostResponse> | PostResponse;
|
|
301
|
+
incrementViews(request: PostIdRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
302
|
+
}
|
|
303
|
+
export declare function PostServiceControllerMethods(): (constructor: Function) => void;
|
|
304
|
+
export declare const POST_SERVICE_NAME = "PostService";
|
package/dist/gen/post.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.11.4
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: post.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.POST_SERVICE_NAME = exports.CONTENT_V1_PACKAGE_NAME = exports.PostStatus = exports.PostType = exports.protobufPackage = void 0;
|
|
9
|
+
exports.PostServiceControllerMethods = PostServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
exports.protobufPackage = "content.v1";
|
|
13
|
+
var PostType;
|
|
14
|
+
(function (PostType) {
|
|
15
|
+
PostType[PostType["POST_TYPE_UNSPECIFIED"] = 0] = "POST_TYPE_UNSPECIFIED";
|
|
16
|
+
PostType[PostType["POST_TYPE_ARTICLE"] = 1] = "POST_TYPE_ARTICLE";
|
|
17
|
+
PostType[PostType["POST_TYPE_NEWS"] = 2] = "POST_TYPE_NEWS";
|
|
18
|
+
PostType[PostType["POST_TYPE_PAGE"] = 3] = "POST_TYPE_PAGE";
|
|
19
|
+
PostType[PostType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
20
|
+
})(PostType || (exports.PostType = PostType = {}));
|
|
21
|
+
var PostStatus;
|
|
22
|
+
(function (PostStatus) {
|
|
23
|
+
PostStatus[PostStatus["POST_STATUS_UNSPECIFIED"] = 0] = "POST_STATUS_UNSPECIFIED";
|
|
24
|
+
PostStatus[PostStatus["POST_STATUS_DRAFT"] = 1] = "POST_STATUS_DRAFT";
|
|
25
|
+
PostStatus[PostStatus["POST_STATUS_SCHEDULED"] = 2] = "POST_STATUS_SCHEDULED";
|
|
26
|
+
PostStatus[PostStatus["POST_STATUS_PUBLISHED"] = 3] = "POST_STATUS_PUBLISHED";
|
|
27
|
+
PostStatus[PostStatus["POST_STATUS_ARCHIVED"] = 4] = "POST_STATUS_ARCHIVED";
|
|
28
|
+
PostStatus[PostStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
29
|
+
})(PostStatus || (exports.PostStatus = PostStatus = {}));
|
|
30
|
+
exports.CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
31
|
+
function PostServiceControllerMethods() {
|
|
32
|
+
return function (constructor) {
|
|
33
|
+
const grpcMethods = [
|
|
34
|
+
"getPosts",
|
|
35
|
+
"getPost",
|
|
36
|
+
"createPost",
|
|
37
|
+
"updatePost",
|
|
38
|
+
"deletePost",
|
|
39
|
+
"publishPost",
|
|
40
|
+
"schedulePost",
|
|
41
|
+
"archivePost",
|
|
42
|
+
"incrementViews",
|
|
43
|
+
];
|
|
44
|
+
for (const method of grpcMethods) {
|
|
45
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
46
|
+
(0, microservices_1.GrpcMethod)("PostService", method)(constructor.prototype[method], method, descriptor);
|
|
47
|
+
}
|
|
48
|
+
const grpcStreamMethods = [];
|
|
49
|
+
for (const method of grpcStreamMethods) {
|
|
50
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
51
|
+
(0, microservices_1.GrpcStreamMethod)("PostService", method)(constructor.prototype[method], method, descriptor);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
exports.POST_SERVICE_NAME = "PostService";
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { DeleteResponse, PaginationMeta, PaginationRequest } from "./common_post";
|
|
3
|
+
export declare const protobufPackage = "content.v1";
|
|
4
|
+
export declare enum PostCategoryType {
|
|
5
|
+
POST_CATEGORY_TYPE_UNSPECIFIED = 0,
|
|
6
|
+
POST_CATEGORY_TYPE_ARTICLE = 1,
|
|
7
|
+
POST_CATEGORY_TYPE_NEWS = 2,
|
|
8
|
+
POST_CATEGORY_TYPE_PAGE = 3,
|
|
9
|
+
POST_CATEGORY_TYPE_ALL = 4,
|
|
10
|
+
UNRECOGNIZED = -1
|
|
11
|
+
}
|
|
12
|
+
export interface PostCategoryResponse {
|
|
13
|
+
id: string;
|
|
14
|
+
slug: string;
|
|
15
|
+
name: {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
};
|
|
18
|
+
description: {
|
|
19
|
+
[key: string]: string;
|
|
20
|
+
};
|
|
21
|
+
sortOrder: number;
|
|
22
|
+
postType: PostCategoryType;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
}
|
|
26
|
+
export interface PostCategoryResponse_NameEntry {
|
|
27
|
+
key: string;
|
|
28
|
+
value: string;
|
|
29
|
+
}
|
|
30
|
+
export interface PostCategoryResponse_DescriptionEntry {
|
|
31
|
+
key: string;
|
|
32
|
+
value: string;
|
|
33
|
+
}
|
|
34
|
+
export interface GetPostCategoriesRequest {
|
|
35
|
+
pagination: PaginationRequest | undefined;
|
|
36
|
+
postType?: PostCategoryType | undefined;
|
|
37
|
+
}
|
|
38
|
+
export interface GetPostCategoriesResponse {
|
|
39
|
+
items: PostCategoryResponse[];
|
|
40
|
+
meta: PaginationMeta | undefined;
|
|
41
|
+
}
|
|
42
|
+
export interface GetPostCategoryRequest {
|
|
43
|
+
id: string;
|
|
44
|
+
slug?: string | undefined;
|
|
45
|
+
}
|
|
46
|
+
export interface CreatePostCategoryRequest {
|
|
47
|
+
slug: string;
|
|
48
|
+
name: {
|
|
49
|
+
[key: string]: string;
|
|
50
|
+
};
|
|
51
|
+
description: {
|
|
52
|
+
[key: string]: string;
|
|
53
|
+
};
|
|
54
|
+
sortOrder: number;
|
|
55
|
+
postType: PostCategoryType;
|
|
56
|
+
}
|
|
57
|
+
export interface CreatePostCategoryRequest_NameEntry {
|
|
58
|
+
key: string;
|
|
59
|
+
value: string;
|
|
60
|
+
}
|
|
61
|
+
export interface CreatePostCategoryRequest_DescriptionEntry {
|
|
62
|
+
key: string;
|
|
63
|
+
value: string;
|
|
64
|
+
}
|
|
65
|
+
export interface UpdatePostCategoryRequest {
|
|
66
|
+
id: string;
|
|
67
|
+
slug?: string | undefined;
|
|
68
|
+
name: {
|
|
69
|
+
[key: string]: string;
|
|
70
|
+
};
|
|
71
|
+
description: {
|
|
72
|
+
[key: string]: string;
|
|
73
|
+
};
|
|
74
|
+
sortOrder?: number | undefined;
|
|
75
|
+
postType?: PostCategoryType | undefined;
|
|
76
|
+
}
|
|
77
|
+
export interface UpdatePostCategoryRequest_NameEntry {
|
|
78
|
+
key: string;
|
|
79
|
+
value: string;
|
|
80
|
+
}
|
|
81
|
+
export interface UpdatePostCategoryRequest_DescriptionEntry {
|
|
82
|
+
key: string;
|
|
83
|
+
value: string;
|
|
84
|
+
}
|
|
85
|
+
export interface DeletePostCategoryRequest {
|
|
86
|
+
id: string;
|
|
87
|
+
}
|
|
88
|
+
export declare const CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
89
|
+
export interface PostCategoryServiceClient {
|
|
90
|
+
getPostCategories(request: GetPostCategoriesRequest): Observable<GetPostCategoriesResponse>;
|
|
91
|
+
getPostCategory(request: GetPostCategoryRequest): Observable<PostCategoryResponse>;
|
|
92
|
+
createPostCategory(request: CreatePostCategoryRequest): Observable<PostCategoryResponse>;
|
|
93
|
+
updatePostCategory(request: UpdatePostCategoryRequest): Observable<PostCategoryResponse>;
|
|
94
|
+
deletePostCategory(request: DeletePostCategoryRequest): Observable<DeleteResponse>;
|
|
95
|
+
}
|
|
96
|
+
export interface PostCategoryServiceController {
|
|
97
|
+
getPostCategories(request: GetPostCategoriesRequest): Promise<GetPostCategoriesResponse> | Observable<GetPostCategoriesResponse> | GetPostCategoriesResponse;
|
|
98
|
+
getPostCategory(request: GetPostCategoryRequest): Promise<PostCategoryResponse> | Observable<PostCategoryResponse> | PostCategoryResponse;
|
|
99
|
+
createPostCategory(request: CreatePostCategoryRequest): Promise<PostCategoryResponse> | Observable<PostCategoryResponse> | PostCategoryResponse;
|
|
100
|
+
updatePostCategory(request: UpdatePostCategoryRequest): Promise<PostCategoryResponse> | Observable<PostCategoryResponse> | PostCategoryResponse;
|
|
101
|
+
deletePostCategory(request: DeletePostCategoryRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
102
|
+
}
|
|
103
|
+
export declare function PostCategoryServiceControllerMethods(): (constructor: Function) => void;
|
|
104
|
+
export declare const POST_CATEGORY_SERVICE_NAME = "PostCategoryService";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.11.4
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: post_category.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.POST_CATEGORY_SERVICE_NAME = exports.CONTENT_V1_PACKAGE_NAME = exports.PostCategoryType = exports.protobufPackage = void 0;
|
|
9
|
+
exports.PostCategoryServiceControllerMethods = PostCategoryServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
exports.protobufPackage = "content.v1";
|
|
13
|
+
var PostCategoryType;
|
|
14
|
+
(function (PostCategoryType) {
|
|
15
|
+
PostCategoryType[PostCategoryType["POST_CATEGORY_TYPE_UNSPECIFIED"] = 0] = "POST_CATEGORY_TYPE_UNSPECIFIED";
|
|
16
|
+
PostCategoryType[PostCategoryType["POST_CATEGORY_TYPE_ARTICLE"] = 1] = "POST_CATEGORY_TYPE_ARTICLE";
|
|
17
|
+
PostCategoryType[PostCategoryType["POST_CATEGORY_TYPE_NEWS"] = 2] = "POST_CATEGORY_TYPE_NEWS";
|
|
18
|
+
PostCategoryType[PostCategoryType["POST_CATEGORY_TYPE_PAGE"] = 3] = "POST_CATEGORY_TYPE_PAGE";
|
|
19
|
+
PostCategoryType[PostCategoryType["POST_CATEGORY_TYPE_ALL"] = 4] = "POST_CATEGORY_TYPE_ALL";
|
|
20
|
+
PostCategoryType[PostCategoryType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
21
|
+
})(PostCategoryType || (exports.PostCategoryType = PostCategoryType = {}));
|
|
22
|
+
exports.CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
23
|
+
function PostCategoryServiceControllerMethods() {
|
|
24
|
+
return function (constructor) {
|
|
25
|
+
const grpcMethods = [
|
|
26
|
+
"getPostCategories",
|
|
27
|
+
"getPostCategory",
|
|
28
|
+
"createPostCategory",
|
|
29
|
+
"updatePostCategory",
|
|
30
|
+
"deletePostCategory",
|
|
31
|
+
];
|
|
32
|
+
for (const method of grpcMethods) {
|
|
33
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
34
|
+
(0, microservices_1.GrpcMethod)("PostCategoryService", method)(constructor.prototype[method], method, descriptor);
|
|
35
|
+
}
|
|
36
|
+
const grpcStreamMethods = [];
|
|
37
|
+
for (const method of grpcStreamMethods) {
|
|
38
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
39
|
+
(0, microservices_1.GrpcStreamMethod)("PostCategoryService", method)(constructor.prototype[method], method, descriptor);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
exports.POST_CATEGORY_SERVICE_NAME = "PostCategoryService";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { DeleteResponse, PaginationMeta, PaginationRequest } from "./common_post";
|
|
3
|
+
export declare const protobufPackage = "content.v1";
|
|
4
|
+
export declare enum CommentStatus {
|
|
5
|
+
COMMENT_STATUS_UNSPECIFIED = 0,
|
|
6
|
+
COMMENT_STATUS_PENDING = 1,
|
|
7
|
+
COMMENT_STATUS_APPROVED = 2,
|
|
8
|
+
COMMENT_STATUS_REJECTED = 3,
|
|
9
|
+
UNRECOGNIZED = -1
|
|
10
|
+
}
|
|
11
|
+
export interface CommentResponse {
|
|
12
|
+
id: string;
|
|
13
|
+
postId: string;
|
|
14
|
+
authorName: string;
|
|
15
|
+
authorEmail: string;
|
|
16
|
+
body: string;
|
|
17
|
+
status: CommentStatus;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
}
|
|
20
|
+
export interface GetCommentsRequest {
|
|
21
|
+
pagination: PaginationRequest | undefined;
|
|
22
|
+
postId?: string | undefined;
|
|
23
|
+
status?: CommentStatus | undefined;
|
|
24
|
+
}
|
|
25
|
+
export interface GetCommentsResponse {
|
|
26
|
+
items: CommentResponse[];
|
|
27
|
+
meta: PaginationMeta | undefined;
|
|
28
|
+
}
|
|
29
|
+
export interface CreateCommentRequest {
|
|
30
|
+
postId: string;
|
|
31
|
+
authorName: string;
|
|
32
|
+
authorEmail: string;
|
|
33
|
+
body: string;
|
|
34
|
+
}
|
|
35
|
+
export interface CommentIdRequest {
|
|
36
|
+
id: string;
|
|
37
|
+
}
|
|
38
|
+
export declare const CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
39
|
+
export interface PostCommentServiceClient {
|
|
40
|
+
getComments(request: GetCommentsRequest): Observable<GetCommentsResponse>;
|
|
41
|
+
createComment(request: CreateCommentRequest): Observable<CommentResponse>;
|
|
42
|
+
approveComment(request: CommentIdRequest): Observable<CommentResponse>;
|
|
43
|
+
rejectComment(request: CommentIdRequest): Observable<CommentResponse>;
|
|
44
|
+
deleteComment(request: CommentIdRequest): Observable<DeleteResponse>;
|
|
45
|
+
}
|
|
46
|
+
export interface PostCommentServiceController {
|
|
47
|
+
getComments(request: GetCommentsRequest): Promise<GetCommentsResponse> | Observable<GetCommentsResponse> | GetCommentsResponse;
|
|
48
|
+
createComment(request: CreateCommentRequest): Promise<CommentResponse> | Observable<CommentResponse> | CommentResponse;
|
|
49
|
+
approveComment(request: CommentIdRequest): Promise<CommentResponse> | Observable<CommentResponse> | CommentResponse;
|
|
50
|
+
rejectComment(request: CommentIdRequest): Promise<CommentResponse> | Observable<CommentResponse> | CommentResponse;
|
|
51
|
+
deleteComment(request: CommentIdRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
52
|
+
}
|
|
53
|
+
export declare function PostCommentServiceControllerMethods(): (constructor: Function) => void;
|
|
54
|
+
export declare const POST_COMMENT_SERVICE_NAME = "PostCommentService";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.11.4
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: post_comment.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.POST_COMMENT_SERVICE_NAME = exports.CONTENT_V1_PACKAGE_NAME = exports.CommentStatus = exports.protobufPackage = void 0;
|
|
9
|
+
exports.PostCommentServiceControllerMethods = PostCommentServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
exports.protobufPackage = "content.v1";
|
|
13
|
+
var CommentStatus;
|
|
14
|
+
(function (CommentStatus) {
|
|
15
|
+
CommentStatus[CommentStatus["COMMENT_STATUS_UNSPECIFIED"] = 0] = "COMMENT_STATUS_UNSPECIFIED";
|
|
16
|
+
CommentStatus[CommentStatus["COMMENT_STATUS_PENDING"] = 1] = "COMMENT_STATUS_PENDING";
|
|
17
|
+
CommentStatus[CommentStatus["COMMENT_STATUS_APPROVED"] = 2] = "COMMENT_STATUS_APPROVED";
|
|
18
|
+
CommentStatus[CommentStatus["COMMENT_STATUS_REJECTED"] = 3] = "COMMENT_STATUS_REJECTED";
|
|
19
|
+
CommentStatus[CommentStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
20
|
+
})(CommentStatus || (exports.CommentStatus = CommentStatus = {}));
|
|
21
|
+
exports.CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
22
|
+
function PostCommentServiceControllerMethods() {
|
|
23
|
+
return function (constructor) {
|
|
24
|
+
const grpcMethods = ["getComments", "createComment", "approveComment", "rejectComment", "deleteComment"];
|
|
25
|
+
for (const method of grpcMethods) {
|
|
26
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
27
|
+
(0, microservices_1.GrpcMethod)("PostCommentService", method)(constructor.prototype[method], method, descriptor);
|
|
28
|
+
}
|
|
29
|
+
const grpcStreamMethods = [];
|
|
30
|
+
for (const method of grpcStreamMethods) {
|
|
31
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
32
|
+
(0, microservices_1.GrpcStreamMethod)("PostCommentService", method)(constructor.prototype[method], method, descriptor);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
exports.POST_COMMENT_SERVICE_NAME = "PostCommentService";
|