@mamindom/contracts 1.0.117 → 1.0.119
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/brand.d.ts +2 -0
- package/dist/gen/faq.d.ts +213 -0
- package/dist/gen/faq.js +52 -0
- package/dist/gen/page.d.ts +191 -0
- package/dist/gen/page.js +44 -0
- package/dist/proto/brand.proto +6 -3
- package/dist/proto/faq.proto +186 -0
- package/dist/proto/page.proto +120 -0
- package/dist/src/proto/paths.d.ts +2 -0
- package/dist/src/proto/paths.js +3 -1
- package/gen/brand.ts +5 -1
- package/gen/faq.ts +324 -0
- package/gen/page.ts +232 -0
- package/package.json +1 -1
- package/proto/brand.proto +6 -3
- package/proto/faq.proto +186 -0
- package/proto/page.proto +120 -0
package/gen/page.ts
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.4
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: page.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
import { DeleteResponse, PaginationMeta, PaginationRequest } from "./common_post";
|
|
11
|
+
|
|
12
|
+
export const protobufPackage = "content.v1";
|
|
13
|
+
|
|
14
|
+
export enum PageStatus {
|
|
15
|
+
PAGE_STATUS_UNSPECIFIED = 0,
|
|
16
|
+
PAGE_STATUS_DRAFT = 1,
|
|
17
|
+
PAGE_STATUS_PUBLISHED = 2,
|
|
18
|
+
PAGE_STATUS_ARCHIVED = 3,
|
|
19
|
+
UNRECOGNIZED = -1,
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface PageResponse {
|
|
23
|
+
id: string;
|
|
24
|
+
slug: string;
|
|
25
|
+
status: PageStatus;
|
|
26
|
+
title: { [key: string]: string };
|
|
27
|
+
/**
|
|
28
|
+
* PageBlock[] serialized as JSON-string. ts-proto without oneofs
|
|
29
|
+
* turns discriminated unions into a soup of optional fields; keep
|
|
30
|
+
* the typed union on the gateway side via zod instead.
|
|
31
|
+
*/
|
|
32
|
+
blocksJson: string;
|
|
33
|
+
coverImage?: string | undefined;
|
|
34
|
+
coverImageId?: string | undefined;
|
|
35
|
+
seoTitle: { [key: string]: string };
|
|
36
|
+
seoDescription: { [key: string]: string };
|
|
37
|
+
seoKeywords: { [key: string]: string };
|
|
38
|
+
seoH1: { [key: string]: string };
|
|
39
|
+
publishedAt?: string | undefined;
|
|
40
|
+
createdById: string;
|
|
41
|
+
createdAt: string;
|
|
42
|
+
updatedAt: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface PageResponse_TitleEntry {
|
|
46
|
+
key: string;
|
|
47
|
+
value: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface PageResponse_SeoTitleEntry {
|
|
51
|
+
key: string;
|
|
52
|
+
value: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface PageResponse_SeoDescriptionEntry {
|
|
56
|
+
key: string;
|
|
57
|
+
value: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface PageResponse_SeoKeywordsEntry {
|
|
61
|
+
key: string;
|
|
62
|
+
value: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface PageResponse_SeoH1Entry {
|
|
66
|
+
key: string;
|
|
67
|
+
value: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface PageIdRequest {
|
|
71
|
+
id: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface GetPageRequest {
|
|
75
|
+
slug: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface GetPagesRequest {
|
|
79
|
+
status?: PageStatus | undefined;
|
|
80
|
+
search?: string | undefined;
|
|
81
|
+
pagination: PaginationRequest | undefined;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface GetPagesResponse {
|
|
85
|
+
items: PageResponse[];
|
|
86
|
+
meta: PaginationMeta | undefined;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface CreatePageRequest {
|
|
90
|
+
slug: string;
|
|
91
|
+
status: PageStatus;
|
|
92
|
+
title: { [key: string]: string };
|
|
93
|
+
blocksJson: string;
|
|
94
|
+
coverImage?: string | undefined;
|
|
95
|
+
coverImageId?: string | undefined;
|
|
96
|
+
seoTitle: { [key: string]: string };
|
|
97
|
+
seoDescription: { [key: string]: string };
|
|
98
|
+
seoKeywords: { [key: string]: string };
|
|
99
|
+
seoH1: { [key: string]: string };
|
|
100
|
+
createdById: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface CreatePageRequest_TitleEntry {
|
|
104
|
+
key: string;
|
|
105
|
+
value: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface CreatePageRequest_SeoTitleEntry {
|
|
109
|
+
key: string;
|
|
110
|
+
value: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface CreatePageRequest_SeoDescriptionEntry {
|
|
114
|
+
key: string;
|
|
115
|
+
value: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface CreatePageRequest_SeoKeywordsEntry {
|
|
119
|
+
key: string;
|
|
120
|
+
value: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface CreatePageRequest_SeoH1Entry {
|
|
124
|
+
key: string;
|
|
125
|
+
value: string;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface UpdatePageRequest {
|
|
129
|
+
id: string;
|
|
130
|
+
slug?: string | undefined;
|
|
131
|
+
status?: PageStatus | undefined;
|
|
132
|
+
title: { [key: string]: string };
|
|
133
|
+
blocksJson?: string | undefined;
|
|
134
|
+
coverImage?: string | undefined;
|
|
135
|
+
coverImageId?: string | undefined;
|
|
136
|
+
clearCoverImage: boolean;
|
|
137
|
+
seoTitle: { [key: string]: string };
|
|
138
|
+
seoDescription: { [key: string]: string };
|
|
139
|
+
seoKeywords: { [key: string]: string };
|
|
140
|
+
seoH1: { [key: string]: string };
|
|
141
|
+
updatedById: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface UpdatePageRequest_TitleEntry {
|
|
145
|
+
key: string;
|
|
146
|
+
value: string;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface UpdatePageRequest_SeoTitleEntry {
|
|
150
|
+
key: string;
|
|
151
|
+
value: string;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface UpdatePageRequest_SeoDescriptionEntry {
|
|
155
|
+
key: string;
|
|
156
|
+
value: string;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface UpdatePageRequest_SeoKeywordsEntry {
|
|
160
|
+
key: string;
|
|
161
|
+
value: string;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export interface UpdatePageRequest_SeoH1Entry {
|
|
165
|
+
key: string;
|
|
166
|
+
value: string;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface PublishPageRequest {
|
|
170
|
+
id: string;
|
|
171
|
+
publish: boolean;
|
|
172
|
+
updatedById: string;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export const CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
176
|
+
|
|
177
|
+
export interface PageServiceClient {
|
|
178
|
+
getPage(request: GetPageRequest): Observable<PageResponse>;
|
|
179
|
+
|
|
180
|
+
getPageById(request: PageIdRequest): Observable<PageResponse>;
|
|
181
|
+
|
|
182
|
+
getPages(request: GetPagesRequest): Observable<GetPagesResponse>;
|
|
183
|
+
|
|
184
|
+
createPage(request: CreatePageRequest): Observable<PageResponse>;
|
|
185
|
+
|
|
186
|
+
updatePage(request: UpdatePageRequest): Observable<PageResponse>;
|
|
187
|
+
|
|
188
|
+
deletePage(request: PageIdRequest): Observable<DeleteResponse>;
|
|
189
|
+
|
|
190
|
+
publishPage(request: PublishPageRequest): Observable<PageResponse>;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface PageServiceController {
|
|
194
|
+
getPage(request: GetPageRequest): Promise<PageResponse> | Observable<PageResponse> | PageResponse;
|
|
195
|
+
|
|
196
|
+
getPageById(request: PageIdRequest): Promise<PageResponse> | Observable<PageResponse> | PageResponse;
|
|
197
|
+
|
|
198
|
+
getPages(request: GetPagesRequest): Promise<GetPagesResponse> | Observable<GetPagesResponse> | GetPagesResponse;
|
|
199
|
+
|
|
200
|
+
createPage(request: CreatePageRequest): Promise<PageResponse> | Observable<PageResponse> | PageResponse;
|
|
201
|
+
|
|
202
|
+
updatePage(request: UpdatePageRequest): Promise<PageResponse> | Observable<PageResponse> | PageResponse;
|
|
203
|
+
|
|
204
|
+
deletePage(request: PageIdRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
205
|
+
|
|
206
|
+
publishPage(request: PublishPageRequest): Promise<PageResponse> | Observable<PageResponse> | PageResponse;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export function PageServiceControllerMethods() {
|
|
210
|
+
return function (constructor: Function) {
|
|
211
|
+
const grpcMethods: string[] = [
|
|
212
|
+
"getPage",
|
|
213
|
+
"getPageById",
|
|
214
|
+
"getPages",
|
|
215
|
+
"createPage",
|
|
216
|
+
"updatePage",
|
|
217
|
+
"deletePage",
|
|
218
|
+
"publishPage",
|
|
219
|
+
];
|
|
220
|
+
for (const method of grpcMethods) {
|
|
221
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
222
|
+
GrpcMethod("PageService", method)(constructor.prototype[method], method, descriptor);
|
|
223
|
+
}
|
|
224
|
+
const grpcStreamMethods: string[] = [];
|
|
225
|
+
for (const method of grpcStreamMethods) {
|
|
226
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
227
|
+
GrpcStreamMethod("PageService", method)(constructor.prototype[method], method, descriptor);
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export const PAGE_SERVICE_NAME = "PageService";
|
package/package.json
CHANGED
package/proto/brand.proto
CHANGED
|
@@ -21,14 +21,17 @@ message BrandResponse {
|
|
|
21
21
|
string slug = 2;
|
|
22
22
|
string name = 3;
|
|
23
23
|
optional string image = 4;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
|
|
25
|
+
|
|
26
26
|
map<string, string> description = 5;
|
|
27
27
|
map<string, string> meta_title = 6;
|
|
28
28
|
map<string, string> meta_description = 7;
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
optional string guid_1c = 8;
|
|
31
31
|
optional string image_id = 9;
|
|
32
|
+
|
|
33
|
+
// Кількість АКТИВНИХ товарів бренду (для shop UI).
|
|
34
|
+
int32 product_count = 10;
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
|
package/proto/faq.proto
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package content.v1;
|
|
4
|
+
|
|
5
|
+
import "common_post.proto";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
service FaqService {
|
|
9
|
+
// Storefront
|
|
10
|
+
rpc GetFaqStorefront (GetFaqStorefrontRequest) returns (GetFaqStorefrontResponse);
|
|
11
|
+
rpc SearchFaq (SearchFaqRequest) returns (SearchFaqResponse);
|
|
12
|
+
|
|
13
|
+
// Admin — categories
|
|
14
|
+
rpc GetFaqCategories (GetFaqCategoriesRequest) returns (GetFaqCategoriesResponse);
|
|
15
|
+
rpc GetFaqCategory (FaqCategoryIdRequest) returns (FaqCategoryResponse);
|
|
16
|
+
rpc CreateFaqCategory (CreateFaqCategoryRequest) returns (FaqCategoryResponse);
|
|
17
|
+
rpc UpdateFaqCategory (UpdateFaqCategoryRequest) returns (FaqCategoryResponse);
|
|
18
|
+
rpc DeleteFaqCategory (FaqCategoryIdRequest) returns (DeleteResponse);
|
|
19
|
+
rpc ReorderFaqCategories (ReorderFaqRequest) returns (SuccessResponse);
|
|
20
|
+
|
|
21
|
+
// Admin — items
|
|
22
|
+
rpc GetFaqItems (GetFaqItemsRequest) returns (GetFaqItemsResponse);
|
|
23
|
+
rpc GetFaqItem (FaqItemIdRequest) returns (FaqItemResponse);
|
|
24
|
+
rpc CreateFaqItem (CreateFaqItemRequest) returns (FaqItemResponse);
|
|
25
|
+
rpc UpdateFaqItem (UpdateFaqItemRequest) returns (FaqItemResponse);
|
|
26
|
+
rpc DeleteFaqItem (FaqItemIdRequest) returns (DeleteResponse);
|
|
27
|
+
rpc ReorderFaqItems (ReorderFaqRequest) returns (SuccessResponse);
|
|
28
|
+
rpc BulkSetPopular (BulkSetPopularFaqRequest) returns (SuccessResponse);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
enum FaqStatus {
|
|
33
|
+
FAQ_STATUS_UNSPECIFIED = 0;
|
|
34
|
+
FAQ_STATUS_DRAFT = 1;
|
|
35
|
+
FAQ_STATUS_PUBLISHED = 2;
|
|
36
|
+
FAQ_STATUS_ARCHIVED = 3;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
message FaqCategoryResponse {
|
|
41
|
+
string id = 1;
|
|
42
|
+
string slug = 2;
|
|
43
|
+
|
|
44
|
+
map<string, string> title = 3;
|
|
45
|
+
|
|
46
|
+
optional string icon = 4;
|
|
47
|
+
|
|
48
|
+
int32 sort_order = 5;
|
|
49
|
+
FaqStatus status = 6;
|
|
50
|
+
|
|
51
|
+
int32 items_count = 7;
|
|
52
|
+
|
|
53
|
+
string created_at = 8;
|
|
54
|
+
string updated_at = 9;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
message FaqItemResponse {
|
|
59
|
+
string id = 1;
|
|
60
|
+
string category_id = 2;
|
|
61
|
+
|
|
62
|
+
map<string, string> question = 3;
|
|
63
|
+
map<string, string> answer = 4;
|
|
64
|
+
|
|
65
|
+
bool is_popular = 5;
|
|
66
|
+
int32 sort_order = 6;
|
|
67
|
+
FaqStatus status = 7;
|
|
68
|
+
|
|
69
|
+
string created_at = 8;
|
|
70
|
+
string updated_at = 9;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
message FaqCategoryWithItems {
|
|
75
|
+
FaqCategoryResponse category = 1;
|
|
76
|
+
repeated FaqItemResponse items = 2;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
// ── Storefront ──────────────────────────────────────────────────────────────
|
|
81
|
+
|
|
82
|
+
message GetFaqStorefrontRequest {
|
|
83
|
+
optional int32 popular_limit = 1;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
message GetFaqStorefrontResponse {
|
|
87
|
+
repeated FaqItemResponse popular = 1;
|
|
88
|
+
repeated FaqCategoryWithItems categories = 2;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
message SearchFaqRequest {
|
|
92
|
+
string query = 1;
|
|
93
|
+
optional int32 limit = 2;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
message SearchFaqResponse {
|
|
97
|
+
repeated FaqItemResponse items = 1;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
// ── Categories CRUD ─────────────────────────────────────────────────────────
|
|
102
|
+
|
|
103
|
+
message FaqCategoryIdRequest {
|
|
104
|
+
string id = 1;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
message GetFaqCategoriesRequest {
|
|
108
|
+
optional FaqStatus status = 1;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
message GetFaqCategoriesResponse {
|
|
112
|
+
repeated FaqCategoryResponse items = 1;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
message CreateFaqCategoryRequest {
|
|
116
|
+
string slug = 1;
|
|
117
|
+
map<string, string> title = 2;
|
|
118
|
+
optional string icon = 3;
|
|
119
|
+
int32 sort_order = 4;
|
|
120
|
+
FaqStatus status = 5;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
message UpdateFaqCategoryRequest {
|
|
124
|
+
string id = 1;
|
|
125
|
+
optional string slug = 2;
|
|
126
|
+
map<string, string> title = 3;
|
|
127
|
+
optional string icon = 4;
|
|
128
|
+
optional int32 sort_order = 5;
|
|
129
|
+
optional FaqStatus status = 6;
|
|
130
|
+
bool clear_icon = 7;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
// ── Items CRUD ──────────────────────────────────────────────────────────────
|
|
135
|
+
|
|
136
|
+
message FaqItemIdRequest {
|
|
137
|
+
string id = 1;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
message GetFaqItemsRequest {
|
|
141
|
+
optional string category_id = 1;
|
|
142
|
+
optional FaqStatus status = 2;
|
|
143
|
+
optional string search = 3;
|
|
144
|
+
PaginationRequest pagination = 4;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
message GetFaqItemsResponse {
|
|
148
|
+
repeated FaqItemResponse items = 1;
|
|
149
|
+
PaginationMeta meta = 2;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
message CreateFaqItemRequest {
|
|
153
|
+
string category_id = 1;
|
|
154
|
+
map<string, string> question = 2;
|
|
155
|
+
map<string, string> answer = 3;
|
|
156
|
+
bool is_popular = 4;
|
|
157
|
+
int32 sort_order = 5;
|
|
158
|
+
FaqStatus status = 6;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
message UpdateFaqItemRequest {
|
|
162
|
+
string id = 1;
|
|
163
|
+
optional string category_id = 2;
|
|
164
|
+
map<string, string> question = 3;
|
|
165
|
+
map<string, string> answer = 4;
|
|
166
|
+
optional bool is_popular = 5;
|
|
167
|
+
optional int32 sort_order = 6;
|
|
168
|
+
optional FaqStatus status = 7;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
// ── Reorder / Bulk ──────────────────────────────────────────────────────────
|
|
173
|
+
|
|
174
|
+
message FaqSortEntry {
|
|
175
|
+
string id = 1;
|
|
176
|
+
int32 sort_order = 2;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
message ReorderFaqRequest {
|
|
180
|
+
repeated FaqSortEntry items = 1;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
message BulkSetPopularFaqRequest {
|
|
184
|
+
repeated string ids = 1;
|
|
185
|
+
bool popular = 2;
|
|
186
|
+
}
|
package/proto/page.proto
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package content.v1;
|
|
4
|
+
|
|
5
|
+
import "common_post.proto";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
service PageService {
|
|
9
|
+
rpc GetPage (GetPageRequest) returns (PageResponse);
|
|
10
|
+
rpc GetPageById (PageIdRequest) returns (PageResponse);
|
|
11
|
+
rpc GetPages (GetPagesRequest) returns (GetPagesResponse);
|
|
12
|
+
rpc CreatePage (CreatePageRequest) returns (PageResponse);
|
|
13
|
+
rpc UpdatePage (UpdatePageRequest) returns (PageResponse);
|
|
14
|
+
rpc DeletePage (PageIdRequest) returns (DeleteResponse);
|
|
15
|
+
rpc PublishPage (PublishPageRequest) returns (PageResponse);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
enum PageStatus {
|
|
20
|
+
PAGE_STATUS_UNSPECIFIED = 0;
|
|
21
|
+
PAGE_STATUS_DRAFT = 1;
|
|
22
|
+
PAGE_STATUS_PUBLISHED = 2;
|
|
23
|
+
PAGE_STATUS_ARCHIVED = 3;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
message PageResponse {
|
|
28
|
+
string id = 1;
|
|
29
|
+
string slug = 2;
|
|
30
|
+
PageStatus status = 3;
|
|
31
|
+
|
|
32
|
+
map<string, string> title = 4;
|
|
33
|
+
|
|
34
|
+
// PageBlock[] serialized as JSON-string. ts-proto without oneofs
|
|
35
|
+
// turns discriminated unions into a soup of optional fields; keep
|
|
36
|
+
// the typed union on the gateway side via zod instead.
|
|
37
|
+
string blocks_json = 5;
|
|
38
|
+
|
|
39
|
+
optional string cover_image = 6;
|
|
40
|
+
optional string cover_image_id = 7;
|
|
41
|
+
|
|
42
|
+
map<string, string> seo_title = 8;
|
|
43
|
+
map<string, string> seo_description = 9;
|
|
44
|
+
map<string, string> seo_keywords = 10;
|
|
45
|
+
map<string, string> seo_h1 = 11;
|
|
46
|
+
|
|
47
|
+
optional string published_at = 12;
|
|
48
|
+
|
|
49
|
+
string created_by_id = 13;
|
|
50
|
+
string created_at = 14;
|
|
51
|
+
string updated_at = 15;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
message PageIdRequest {
|
|
56
|
+
string id = 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
message GetPageRequest {
|
|
60
|
+
string slug = 1;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
message GetPagesRequest {
|
|
64
|
+
optional PageStatus status = 1;
|
|
65
|
+
optional string search = 2;
|
|
66
|
+
PaginationRequest pagination = 3;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
message GetPagesResponse {
|
|
70
|
+
repeated PageResponse items = 1;
|
|
71
|
+
PaginationMeta meta = 2;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
message CreatePageRequest {
|
|
76
|
+
string slug = 1;
|
|
77
|
+
PageStatus status = 2;
|
|
78
|
+
|
|
79
|
+
map<string, string> title = 3;
|
|
80
|
+
string blocks_json = 4;
|
|
81
|
+
|
|
82
|
+
optional string cover_image = 5;
|
|
83
|
+
optional string cover_image_id = 6;
|
|
84
|
+
|
|
85
|
+
map<string, string> seo_title = 7;
|
|
86
|
+
map<string, string> seo_description = 8;
|
|
87
|
+
map<string, string> seo_keywords = 9;
|
|
88
|
+
map<string, string> seo_h1 = 10;
|
|
89
|
+
|
|
90
|
+
string created_by_id = 11;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
message UpdatePageRequest {
|
|
95
|
+
string id = 1;
|
|
96
|
+
|
|
97
|
+
optional string slug = 2;
|
|
98
|
+
optional PageStatus status = 3;
|
|
99
|
+
|
|
100
|
+
map<string, string> title = 4;
|
|
101
|
+
optional string blocks_json = 5;
|
|
102
|
+
|
|
103
|
+
optional string cover_image = 6;
|
|
104
|
+
optional string cover_image_id = 7;
|
|
105
|
+
bool clear_cover_image = 8;
|
|
106
|
+
|
|
107
|
+
map<string, string> seo_title = 9;
|
|
108
|
+
map<string, string> seo_description = 10;
|
|
109
|
+
map<string, string> seo_keywords = 11;
|
|
110
|
+
map<string, string> seo_h1 = 12;
|
|
111
|
+
|
|
112
|
+
string updated_by_id = 13;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
message PublishPageRequest {
|
|
117
|
+
string id = 1;
|
|
118
|
+
bool publish = 2;
|
|
119
|
+
string updated_by_id = 3;
|
|
120
|
+
}
|