@mamindom/contracts 1.0.53 → 1.0.54
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/post.d.ts +14 -0
- package/dist/proto/post.proto +29 -16
- package/gen/post.ts +16 -0
- package/package.json +1 -1
- package/proto/post.proto +29 -16
package/dist/gen/post.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export interface PostResponse {
|
|
|
53
53
|
updatedAt: string;
|
|
54
54
|
categories: PostCategoryItem[];
|
|
55
55
|
tags: PostTagItem[];
|
|
56
|
+
images: PostImageResponse[];
|
|
56
57
|
}
|
|
57
58
|
export interface PostResponse_TitleEntry {
|
|
58
59
|
key: string;
|
|
@@ -104,6 +105,17 @@ export interface PostTagItem_NameEntry {
|
|
|
104
105
|
key: string;
|
|
105
106
|
value: string;
|
|
106
107
|
}
|
|
108
|
+
export interface PostImageResponse {
|
|
109
|
+
id: string;
|
|
110
|
+
url: string;
|
|
111
|
+
mediaId: string;
|
|
112
|
+
sortOrder: number;
|
|
113
|
+
}
|
|
114
|
+
export interface PostImagePayload {
|
|
115
|
+
url: string;
|
|
116
|
+
mediaId: string;
|
|
117
|
+
sortOrder: number;
|
|
118
|
+
}
|
|
107
119
|
export interface PostListItem {
|
|
108
120
|
id: string;
|
|
109
121
|
slug: string;
|
|
@@ -178,6 +190,7 @@ export interface CreatePostRequest {
|
|
|
178
190
|
};
|
|
179
191
|
categoryIds: string[];
|
|
180
192
|
tagIds: string[];
|
|
193
|
+
images: PostImagePayload[];
|
|
181
194
|
createdById: string;
|
|
182
195
|
}
|
|
183
196
|
export interface CreatePostRequest_TitleEntry {
|
|
@@ -236,6 +249,7 @@ export interface UpdatePostRequest {
|
|
|
236
249
|
};
|
|
237
250
|
categoryIds: string[];
|
|
238
251
|
tagIds: string[];
|
|
252
|
+
images: PostImagePayload[];
|
|
239
253
|
updatedById: string;
|
|
240
254
|
}
|
|
241
255
|
export interface UpdatePostRequest_TitleEntry {
|
package/dist/proto/post.proto
CHANGED
|
@@ -5,6 +5,7 @@ package content.v1;
|
|
|
5
5
|
import "common_post.proto";
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
|
|
8
9
|
service PostService {
|
|
9
10
|
|
|
10
11
|
rpc GetPosts (GetPostsRequest) returns (GetPostsResponse);
|
|
@@ -13,12 +14,12 @@ service PostService {
|
|
|
13
14
|
rpc UpdatePost (UpdatePostRequest) returns (PostResponse);
|
|
14
15
|
rpc DeletePost (DeletePostRequest) returns (DeleteResponse);
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
|
|
17
18
|
rpc PublishPost (PostIdRequest) returns (PostResponse);
|
|
18
19
|
rpc SchedulePost (SchedulePostRequest) returns (PostResponse);
|
|
19
|
-
rpc ArchivePost (PostIdRequest) returns (PostResponse);
|
|
20
|
+
rpc ArchivePost (PostIdRequest) returns (PostResponse);
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
|
|
22
23
|
rpc IncrementViews (PostIdRequest) returns (SuccessResponse);
|
|
23
24
|
}
|
|
24
25
|
|
|
@@ -65,8 +66,9 @@ message PostResponse {
|
|
|
65
66
|
string created_at = 19;
|
|
66
67
|
string updated_at = 20;
|
|
67
68
|
|
|
68
|
-
repeated PostCategoryItem
|
|
69
|
+
repeated PostCategoryItem categories = 21;
|
|
69
70
|
repeated PostTagItem tags = 22;
|
|
71
|
+
repeated PostImageResponse images = 23;
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
|
|
@@ -83,6 +85,21 @@ message PostTagItem {
|
|
|
83
85
|
}
|
|
84
86
|
|
|
85
87
|
|
|
88
|
+
message PostImageResponse {
|
|
89
|
+
string id = 1;
|
|
90
|
+
string url = 2;
|
|
91
|
+
string media_id = 3;
|
|
92
|
+
int32 sort_order = 4;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
message PostImagePayload {
|
|
97
|
+
string url = 1;
|
|
98
|
+
string media_id = 2;
|
|
99
|
+
int32 sort_order = 3;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
86
103
|
message PostListItem {
|
|
87
104
|
string id = 1;
|
|
88
105
|
string slug = 2;
|
|
@@ -102,7 +119,6 @@ message PostListItem {
|
|
|
102
119
|
repeated PostTagItem tags = 13;
|
|
103
120
|
}
|
|
104
121
|
|
|
105
|
-
|
|
106
122
|
message GetPostsRequest {
|
|
107
123
|
PaginationRequest pagination = 1;
|
|
108
124
|
|
|
@@ -121,13 +137,11 @@ message GetPostsResponse {
|
|
|
121
137
|
PaginationMeta meta = 2;
|
|
122
138
|
}
|
|
123
139
|
|
|
124
|
-
|
|
125
140
|
message GetPostRequest {
|
|
126
141
|
string id = 1;
|
|
127
142
|
optional string slug = 2;
|
|
128
143
|
}
|
|
129
144
|
|
|
130
|
-
|
|
131
145
|
message CreatePostRequest {
|
|
132
146
|
PostType type = 1;
|
|
133
147
|
|
|
@@ -145,13 +159,13 @@ message CreatePostRequest {
|
|
|
145
159
|
map<string, string> seo_keywords = 10;
|
|
146
160
|
map<string, string> seo_h1 = 11;
|
|
147
161
|
|
|
148
|
-
repeated string
|
|
149
|
-
repeated string
|
|
162
|
+
repeated string category_ids = 12;
|
|
163
|
+
repeated string tag_ids = 13;
|
|
164
|
+
repeated PostImagePayload images = 14;
|
|
150
165
|
|
|
151
|
-
string created_by_id =
|
|
166
|
+
string created_by_id = 15;
|
|
152
167
|
}
|
|
153
168
|
|
|
154
|
-
|
|
155
169
|
message UpdatePostRequest {
|
|
156
170
|
string id = 1;
|
|
157
171
|
|
|
@@ -169,10 +183,11 @@ message UpdatePostRequest {
|
|
|
169
183
|
map<string, string> seo_keywords = 10;
|
|
170
184
|
map<string, string> seo_h1 = 11;
|
|
171
185
|
|
|
172
|
-
repeated string
|
|
173
|
-
repeated string
|
|
186
|
+
repeated string category_ids = 12;
|
|
187
|
+
repeated string tag_ids = 13;
|
|
188
|
+
repeated PostImagePayload images = 14;
|
|
174
189
|
|
|
175
|
-
string updated_by_id =
|
|
190
|
+
string updated_by_id = 15;
|
|
176
191
|
}
|
|
177
192
|
|
|
178
193
|
|
|
@@ -180,12 +195,10 @@ message DeletePostRequest {
|
|
|
180
195
|
string id = 1;
|
|
181
196
|
}
|
|
182
197
|
|
|
183
|
-
|
|
184
198
|
message PostIdRequest {
|
|
185
199
|
string id = 1;
|
|
186
200
|
}
|
|
187
201
|
|
|
188
|
-
|
|
189
202
|
message SchedulePostRequest {
|
|
190
203
|
string id = 1;
|
|
191
204
|
string publish_at = 2;
|
package/gen/post.ts
CHANGED
|
@@ -51,6 +51,7 @@ export interface PostResponse {
|
|
|
51
51
|
updatedAt: string;
|
|
52
52
|
categories: PostCategoryItem[];
|
|
53
53
|
tags: PostTagItem[];
|
|
54
|
+
images: PostImageResponse[];
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
export interface PostResponse_TitleEntry {
|
|
@@ -110,6 +111,19 @@ export interface PostTagItem_NameEntry {
|
|
|
110
111
|
value: string;
|
|
111
112
|
}
|
|
112
113
|
|
|
114
|
+
export interface PostImageResponse {
|
|
115
|
+
id: string;
|
|
116
|
+
url: string;
|
|
117
|
+
mediaId: string;
|
|
118
|
+
sortOrder: number;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface PostImagePayload {
|
|
122
|
+
url: string;
|
|
123
|
+
mediaId: string;
|
|
124
|
+
sortOrder: number;
|
|
125
|
+
}
|
|
126
|
+
|
|
113
127
|
export interface PostListItem {
|
|
114
128
|
id: string;
|
|
115
129
|
slug: string;
|
|
@@ -172,6 +186,7 @@ export interface CreatePostRequest {
|
|
|
172
186
|
seoH1: { [key: string]: string };
|
|
173
187
|
categoryIds: string[];
|
|
174
188
|
tagIds: string[];
|
|
189
|
+
images: PostImagePayload[];
|
|
175
190
|
createdById: string;
|
|
176
191
|
}
|
|
177
192
|
|
|
@@ -224,6 +239,7 @@ export interface UpdatePostRequest {
|
|
|
224
239
|
seoH1: { [key: string]: string };
|
|
225
240
|
categoryIds: string[];
|
|
226
241
|
tagIds: string[];
|
|
242
|
+
images: PostImagePayload[];
|
|
227
243
|
updatedById: string;
|
|
228
244
|
}
|
|
229
245
|
|
package/package.json
CHANGED
package/proto/post.proto
CHANGED
|
@@ -5,6 +5,7 @@ package content.v1;
|
|
|
5
5
|
import "common_post.proto";
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
|
|
8
9
|
service PostService {
|
|
9
10
|
|
|
10
11
|
rpc GetPosts (GetPostsRequest) returns (GetPostsResponse);
|
|
@@ -13,12 +14,12 @@ service PostService {
|
|
|
13
14
|
rpc UpdatePost (UpdatePostRequest) returns (PostResponse);
|
|
14
15
|
rpc DeletePost (DeletePostRequest) returns (DeleteResponse);
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
|
|
17
18
|
rpc PublishPost (PostIdRequest) returns (PostResponse);
|
|
18
19
|
rpc SchedulePost (SchedulePostRequest) returns (PostResponse);
|
|
19
|
-
rpc ArchivePost (PostIdRequest) returns (PostResponse);
|
|
20
|
+
rpc ArchivePost (PostIdRequest) returns (PostResponse);
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
|
|
22
23
|
rpc IncrementViews (PostIdRequest) returns (SuccessResponse);
|
|
23
24
|
}
|
|
24
25
|
|
|
@@ -65,8 +66,9 @@ message PostResponse {
|
|
|
65
66
|
string created_at = 19;
|
|
66
67
|
string updated_at = 20;
|
|
67
68
|
|
|
68
|
-
repeated PostCategoryItem
|
|
69
|
+
repeated PostCategoryItem categories = 21;
|
|
69
70
|
repeated PostTagItem tags = 22;
|
|
71
|
+
repeated PostImageResponse images = 23;
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
|
|
@@ -83,6 +85,21 @@ message PostTagItem {
|
|
|
83
85
|
}
|
|
84
86
|
|
|
85
87
|
|
|
88
|
+
message PostImageResponse {
|
|
89
|
+
string id = 1;
|
|
90
|
+
string url = 2;
|
|
91
|
+
string media_id = 3;
|
|
92
|
+
int32 sort_order = 4;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
message PostImagePayload {
|
|
97
|
+
string url = 1;
|
|
98
|
+
string media_id = 2;
|
|
99
|
+
int32 sort_order = 3;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
86
103
|
message PostListItem {
|
|
87
104
|
string id = 1;
|
|
88
105
|
string slug = 2;
|
|
@@ -102,7 +119,6 @@ message PostListItem {
|
|
|
102
119
|
repeated PostTagItem tags = 13;
|
|
103
120
|
}
|
|
104
121
|
|
|
105
|
-
|
|
106
122
|
message GetPostsRequest {
|
|
107
123
|
PaginationRequest pagination = 1;
|
|
108
124
|
|
|
@@ -121,13 +137,11 @@ message GetPostsResponse {
|
|
|
121
137
|
PaginationMeta meta = 2;
|
|
122
138
|
}
|
|
123
139
|
|
|
124
|
-
|
|
125
140
|
message GetPostRequest {
|
|
126
141
|
string id = 1;
|
|
127
142
|
optional string slug = 2;
|
|
128
143
|
}
|
|
129
144
|
|
|
130
|
-
|
|
131
145
|
message CreatePostRequest {
|
|
132
146
|
PostType type = 1;
|
|
133
147
|
|
|
@@ -145,13 +159,13 @@ message CreatePostRequest {
|
|
|
145
159
|
map<string, string> seo_keywords = 10;
|
|
146
160
|
map<string, string> seo_h1 = 11;
|
|
147
161
|
|
|
148
|
-
repeated string
|
|
149
|
-
repeated string
|
|
162
|
+
repeated string category_ids = 12;
|
|
163
|
+
repeated string tag_ids = 13;
|
|
164
|
+
repeated PostImagePayload images = 14;
|
|
150
165
|
|
|
151
|
-
string created_by_id =
|
|
166
|
+
string created_by_id = 15;
|
|
152
167
|
}
|
|
153
168
|
|
|
154
|
-
|
|
155
169
|
message UpdatePostRequest {
|
|
156
170
|
string id = 1;
|
|
157
171
|
|
|
@@ -169,10 +183,11 @@ message UpdatePostRequest {
|
|
|
169
183
|
map<string, string> seo_keywords = 10;
|
|
170
184
|
map<string, string> seo_h1 = 11;
|
|
171
185
|
|
|
172
|
-
repeated string
|
|
173
|
-
repeated string
|
|
186
|
+
repeated string category_ids = 12;
|
|
187
|
+
repeated string tag_ids = 13;
|
|
188
|
+
repeated PostImagePayload images = 14;
|
|
174
189
|
|
|
175
|
-
string updated_by_id =
|
|
190
|
+
string updated_by_id = 15;
|
|
176
191
|
}
|
|
177
192
|
|
|
178
193
|
|
|
@@ -180,12 +195,10 @@ message DeletePostRequest {
|
|
|
180
195
|
string id = 1;
|
|
181
196
|
}
|
|
182
197
|
|
|
183
|
-
|
|
184
198
|
message PostIdRequest {
|
|
185
199
|
string id = 1;
|
|
186
200
|
}
|
|
187
201
|
|
|
188
|
-
|
|
189
202
|
message SchedulePostRequest {
|
|
190
203
|
string id = 1;
|
|
191
204
|
string publish_at = 2;
|