@mamindom/contracts 1.0.118 → 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/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/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/faq.ts +324 -0
- package/gen/page.ts +232 -0
- package/package.json +1 -1
- package/proto/faq.proto +186 -0
- package/proto/page.proto +120 -0
|
@@ -0,0 +1,213 @@
|
|
|
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 FaqStatus {
|
|
5
|
+
FAQ_STATUS_UNSPECIFIED = 0,
|
|
6
|
+
FAQ_STATUS_DRAFT = 1,
|
|
7
|
+
FAQ_STATUS_PUBLISHED = 2,
|
|
8
|
+
FAQ_STATUS_ARCHIVED = 3,
|
|
9
|
+
UNRECOGNIZED = -1
|
|
10
|
+
}
|
|
11
|
+
export interface FaqCategoryResponse {
|
|
12
|
+
id: string;
|
|
13
|
+
slug: string;
|
|
14
|
+
title: {
|
|
15
|
+
[key: string]: string;
|
|
16
|
+
};
|
|
17
|
+
icon?: string | undefined;
|
|
18
|
+
sortOrder: number;
|
|
19
|
+
status: FaqStatus;
|
|
20
|
+
itemsCount: number;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
}
|
|
24
|
+
export interface FaqCategoryResponse_TitleEntry {
|
|
25
|
+
key: string;
|
|
26
|
+
value: string;
|
|
27
|
+
}
|
|
28
|
+
export interface FaqItemResponse {
|
|
29
|
+
id: string;
|
|
30
|
+
categoryId: string;
|
|
31
|
+
question: {
|
|
32
|
+
[key: string]: string;
|
|
33
|
+
};
|
|
34
|
+
answer: {
|
|
35
|
+
[key: string]: string;
|
|
36
|
+
};
|
|
37
|
+
isPopular: boolean;
|
|
38
|
+
sortOrder: number;
|
|
39
|
+
status: FaqStatus;
|
|
40
|
+
createdAt: string;
|
|
41
|
+
updatedAt: string;
|
|
42
|
+
}
|
|
43
|
+
export interface FaqItemResponse_QuestionEntry {
|
|
44
|
+
key: string;
|
|
45
|
+
value: string;
|
|
46
|
+
}
|
|
47
|
+
export interface FaqItemResponse_AnswerEntry {
|
|
48
|
+
key: string;
|
|
49
|
+
value: string;
|
|
50
|
+
}
|
|
51
|
+
export interface FaqCategoryWithItems {
|
|
52
|
+
category: FaqCategoryResponse | undefined;
|
|
53
|
+
items: FaqItemResponse[];
|
|
54
|
+
}
|
|
55
|
+
export interface GetFaqStorefrontRequest {
|
|
56
|
+
popularLimit?: number | undefined;
|
|
57
|
+
}
|
|
58
|
+
export interface GetFaqStorefrontResponse {
|
|
59
|
+
popular: FaqItemResponse[];
|
|
60
|
+
categories: FaqCategoryWithItems[];
|
|
61
|
+
}
|
|
62
|
+
export interface SearchFaqRequest {
|
|
63
|
+
query: string;
|
|
64
|
+
limit?: number | undefined;
|
|
65
|
+
}
|
|
66
|
+
export interface SearchFaqResponse {
|
|
67
|
+
items: FaqItemResponse[];
|
|
68
|
+
}
|
|
69
|
+
export interface FaqCategoryIdRequest {
|
|
70
|
+
id: string;
|
|
71
|
+
}
|
|
72
|
+
export interface GetFaqCategoriesRequest {
|
|
73
|
+
status?: FaqStatus | undefined;
|
|
74
|
+
}
|
|
75
|
+
export interface GetFaqCategoriesResponse {
|
|
76
|
+
items: FaqCategoryResponse[];
|
|
77
|
+
}
|
|
78
|
+
export interface CreateFaqCategoryRequest {
|
|
79
|
+
slug: string;
|
|
80
|
+
title: {
|
|
81
|
+
[key: string]: string;
|
|
82
|
+
};
|
|
83
|
+
icon?: string | undefined;
|
|
84
|
+
sortOrder: number;
|
|
85
|
+
status: FaqStatus;
|
|
86
|
+
}
|
|
87
|
+
export interface CreateFaqCategoryRequest_TitleEntry {
|
|
88
|
+
key: string;
|
|
89
|
+
value: string;
|
|
90
|
+
}
|
|
91
|
+
export interface UpdateFaqCategoryRequest {
|
|
92
|
+
id: string;
|
|
93
|
+
slug?: string | undefined;
|
|
94
|
+
title: {
|
|
95
|
+
[key: string]: string;
|
|
96
|
+
};
|
|
97
|
+
icon?: string | undefined;
|
|
98
|
+
sortOrder?: number | undefined;
|
|
99
|
+
status?: FaqStatus | undefined;
|
|
100
|
+
clearIcon: boolean;
|
|
101
|
+
}
|
|
102
|
+
export interface UpdateFaqCategoryRequest_TitleEntry {
|
|
103
|
+
key: string;
|
|
104
|
+
value: string;
|
|
105
|
+
}
|
|
106
|
+
export interface FaqItemIdRequest {
|
|
107
|
+
id: string;
|
|
108
|
+
}
|
|
109
|
+
export interface GetFaqItemsRequest {
|
|
110
|
+
categoryId?: string | undefined;
|
|
111
|
+
status?: FaqStatus | undefined;
|
|
112
|
+
search?: string | undefined;
|
|
113
|
+
pagination: PaginationRequest | undefined;
|
|
114
|
+
}
|
|
115
|
+
export interface GetFaqItemsResponse {
|
|
116
|
+
items: FaqItemResponse[];
|
|
117
|
+
meta: PaginationMeta | undefined;
|
|
118
|
+
}
|
|
119
|
+
export interface CreateFaqItemRequest {
|
|
120
|
+
categoryId: string;
|
|
121
|
+
question: {
|
|
122
|
+
[key: string]: string;
|
|
123
|
+
};
|
|
124
|
+
answer: {
|
|
125
|
+
[key: string]: string;
|
|
126
|
+
};
|
|
127
|
+
isPopular: boolean;
|
|
128
|
+
sortOrder: number;
|
|
129
|
+
status: FaqStatus;
|
|
130
|
+
}
|
|
131
|
+
export interface CreateFaqItemRequest_QuestionEntry {
|
|
132
|
+
key: string;
|
|
133
|
+
value: string;
|
|
134
|
+
}
|
|
135
|
+
export interface CreateFaqItemRequest_AnswerEntry {
|
|
136
|
+
key: string;
|
|
137
|
+
value: string;
|
|
138
|
+
}
|
|
139
|
+
export interface UpdateFaqItemRequest {
|
|
140
|
+
id: string;
|
|
141
|
+
categoryId?: string | undefined;
|
|
142
|
+
question: {
|
|
143
|
+
[key: string]: string;
|
|
144
|
+
};
|
|
145
|
+
answer: {
|
|
146
|
+
[key: string]: string;
|
|
147
|
+
};
|
|
148
|
+
isPopular?: boolean | undefined;
|
|
149
|
+
sortOrder?: number | undefined;
|
|
150
|
+
status?: FaqStatus | undefined;
|
|
151
|
+
}
|
|
152
|
+
export interface UpdateFaqItemRequest_QuestionEntry {
|
|
153
|
+
key: string;
|
|
154
|
+
value: string;
|
|
155
|
+
}
|
|
156
|
+
export interface UpdateFaqItemRequest_AnswerEntry {
|
|
157
|
+
key: string;
|
|
158
|
+
value: string;
|
|
159
|
+
}
|
|
160
|
+
export interface FaqSortEntry {
|
|
161
|
+
id: string;
|
|
162
|
+
sortOrder: number;
|
|
163
|
+
}
|
|
164
|
+
export interface ReorderFaqRequest {
|
|
165
|
+
items: FaqSortEntry[];
|
|
166
|
+
}
|
|
167
|
+
export interface BulkSetPopularFaqRequest {
|
|
168
|
+
ids: string[];
|
|
169
|
+
popular: boolean;
|
|
170
|
+
}
|
|
171
|
+
export declare const CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
172
|
+
export interface FaqServiceClient {
|
|
173
|
+
/** Storefront */
|
|
174
|
+
getFaqStorefront(request: GetFaqStorefrontRequest): Observable<GetFaqStorefrontResponse>;
|
|
175
|
+
searchFaq(request: SearchFaqRequest): Observable<SearchFaqResponse>;
|
|
176
|
+
/** Admin — categories */
|
|
177
|
+
getFaqCategories(request: GetFaqCategoriesRequest): Observable<GetFaqCategoriesResponse>;
|
|
178
|
+
getFaqCategory(request: FaqCategoryIdRequest): Observable<FaqCategoryResponse>;
|
|
179
|
+
createFaqCategory(request: CreateFaqCategoryRequest): Observable<FaqCategoryResponse>;
|
|
180
|
+
updateFaqCategory(request: UpdateFaqCategoryRequest): Observable<FaqCategoryResponse>;
|
|
181
|
+
deleteFaqCategory(request: FaqCategoryIdRequest): Observable<DeleteResponse>;
|
|
182
|
+
reorderFaqCategories(request: ReorderFaqRequest): Observable<SuccessResponse>;
|
|
183
|
+
/** Admin — items */
|
|
184
|
+
getFaqItems(request: GetFaqItemsRequest): Observable<GetFaqItemsResponse>;
|
|
185
|
+
getFaqItem(request: FaqItemIdRequest): Observable<FaqItemResponse>;
|
|
186
|
+
createFaqItem(request: CreateFaqItemRequest): Observable<FaqItemResponse>;
|
|
187
|
+
updateFaqItem(request: UpdateFaqItemRequest): Observable<FaqItemResponse>;
|
|
188
|
+
deleteFaqItem(request: FaqItemIdRequest): Observable<DeleteResponse>;
|
|
189
|
+
reorderFaqItems(request: ReorderFaqRequest): Observable<SuccessResponse>;
|
|
190
|
+
bulkSetPopular(request: BulkSetPopularFaqRequest): Observable<SuccessResponse>;
|
|
191
|
+
}
|
|
192
|
+
export interface FaqServiceController {
|
|
193
|
+
/** Storefront */
|
|
194
|
+
getFaqStorefront(request: GetFaqStorefrontRequest): Promise<GetFaqStorefrontResponse> | Observable<GetFaqStorefrontResponse> | GetFaqStorefrontResponse;
|
|
195
|
+
searchFaq(request: SearchFaqRequest): Promise<SearchFaqResponse> | Observable<SearchFaqResponse> | SearchFaqResponse;
|
|
196
|
+
/** Admin — categories */
|
|
197
|
+
getFaqCategories(request: GetFaqCategoriesRequest): Promise<GetFaqCategoriesResponse> | Observable<GetFaqCategoriesResponse> | GetFaqCategoriesResponse;
|
|
198
|
+
getFaqCategory(request: FaqCategoryIdRequest): Promise<FaqCategoryResponse> | Observable<FaqCategoryResponse> | FaqCategoryResponse;
|
|
199
|
+
createFaqCategory(request: CreateFaqCategoryRequest): Promise<FaqCategoryResponse> | Observable<FaqCategoryResponse> | FaqCategoryResponse;
|
|
200
|
+
updateFaqCategory(request: UpdateFaqCategoryRequest): Promise<FaqCategoryResponse> | Observable<FaqCategoryResponse> | FaqCategoryResponse;
|
|
201
|
+
deleteFaqCategory(request: FaqCategoryIdRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
202
|
+
reorderFaqCategories(request: ReorderFaqRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
203
|
+
/** Admin — items */
|
|
204
|
+
getFaqItems(request: GetFaqItemsRequest): Promise<GetFaqItemsResponse> | Observable<GetFaqItemsResponse> | GetFaqItemsResponse;
|
|
205
|
+
getFaqItem(request: FaqItemIdRequest): Promise<FaqItemResponse> | Observable<FaqItemResponse> | FaqItemResponse;
|
|
206
|
+
createFaqItem(request: CreateFaqItemRequest): Promise<FaqItemResponse> | Observable<FaqItemResponse> | FaqItemResponse;
|
|
207
|
+
updateFaqItem(request: UpdateFaqItemRequest): Promise<FaqItemResponse> | Observable<FaqItemResponse> | FaqItemResponse;
|
|
208
|
+
deleteFaqItem(request: FaqItemIdRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
209
|
+
reorderFaqItems(request: ReorderFaqRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
210
|
+
bulkSetPopular(request: BulkSetPopularFaqRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
|
|
211
|
+
}
|
|
212
|
+
export declare function FaqServiceControllerMethods(): (constructor: Function) => void;
|
|
213
|
+
export declare const FAQ_SERVICE_NAME = "FaqService";
|
package/dist/gen/faq.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
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: faq.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.FAQ_SERVICE_NAME = exports.CONTENT_V1_PACKAGE_NAME = exports.FaqStatus = exports.protobufPackage = void 0;
|
|
9
|
+
exports.FaqServiceControllerMethods = FaqServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
exports.protobufPackage = "content.v1";
|
|
13
|
+
var FaqStatus;
|
|
14
|
+
(function (FaqStatus) {
|
|
15
|
+
FaqStatus[FaqStatus["FAQ_STATUS_UNSPECIFIED"] = 0] = "FAQ_STATUS_UNSPECIFIED";
|
|
16
|
+
FaqStatus[FaqStatus["FAQ_STATUS_DRAFT"] = 1] = "FAQ_STATUS_DRAFT";
|
|
17
|
+
FaqStatus[FaqStatus["FAQ_STATUS_PUBLISHED"] = 2] = "FAQ_STATUS_PUBLISHED";
|
|
18
|
+
FaqStatus[FaqStatus["FAQ_STATUS_ARCHIVED"] = 3] = "FAQ_STATUS_ARCHIVED";
|
|
19
|
+
FaqStatus[FaqStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
20
|
+
})(FaqStatus || (exports.FaqStatus = FaqStatus = {}));
|
|
21
|
+
exports.CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
22
|
+
function FaqServiceControllerMethods() {
|
|
23
|
+
return function (constructor) {
|
|
24
|
+
const grpcMethods = [
|
|
25
|
+
"getFaqStorefront",
|
|
26
|
+
"searchFaq",
|
|
27
|
+
"getFaqCategories",
|
|
28
|
+
"getFaqCategory",
|
|
29
|
+
"createFaqCategory",
|
|
30
|
+
"updateFaqCategory",
|
|
31
|
+
"deleteFaqCategory",
|
|
32
|
+
"reorderFaqCategories",
|
|
33
|
+
"getFaqItems",
|
|
34
|
+
"getFaqItem",
|
|
35
|
+
"createFaqItem",
|
|
36
|
+
"updateFaqItem",
|
|
37
|
+
"deleteFaqItem",
|
|
38
|
+
"reorderFaqItems",
|
|
39
|
+
"bulkSetPopular",
|
|
40
|
+
];
|
|
41
|
+
for (const method of grpcMethods) {
|
|
42
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
43
|
+
(0, microservices_1.GrpcMethod)("FaqService", method)(constructor.prototype[method], method, descriptor);
|
|
44
|
+
}
|
|
45
|
+
const grpcStreamMethods = [];
|
|
46
|
+
for (const method of grpcStreamMethods) {
|
|
47
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
48
|
+
(0, microservices_1.GrpcStreamMethod)("FaqService", method)(constructor.prototype[method], method, descriptor);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
exports.FAQ_SERVICE_NAME = "FaqService";
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { DeleteResponse, PaginationMeta, PaginationRequest } from "./common_post";
|
|
3
|
+
export declare const protobufPackage = "content.v1";
|
|
4
|
+
export declare enum PageStatus {
|
|
5
|
+
PAGE_STATUS_UNSPECIFIED = 0,
|
|
6
|
+
PAGE_STATUS_DRAFT = 1,
|
|
7
|
+
PAGE_STATUS_PUBLISHED = 2,
|
|
8
|
+
PAGE_STATUS_ARCHIVED = 3,
|
|
9
|
+
UNRECOGNIZED = -1
|
|
10
|
+
}
|
|
11
|
+
export interface PageResponse {
|
|
12
|
+
id: string;
|
|
13
|
+
slug: string;
|
|
14
|
+
status: PageStatus;
|
|
15
|
+
title: {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* PageBlock[] serialized as JSON-string. ts-proto without oneofs
|
|
20
|
+
* turns discriminated unions into a soup of optional fields; keep
|
|
21
|
+
* the typed union on the gateway side via zod instead.
|
|
22
|
+
*/
|
|
23
|
+
blocksJson: string;
|
|
24
|
+
coverImage?: string | undefined;
|
|
25
|
+
coverImageId?: string | undefined;
|
|
26
|
+
seoTitle: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
};
|
|
29
|
+
seoDescription: {
|
|
30
|
+
[key: string]: string;
|
|
31
|
+
};
|
|
32
|
+
seoKeywords: {
|
|
33
|
+
[key: string]: string;
|
|
34
|
+
};
|
|
35
|
+
seoH1: {
|
|
36
|
+
[key: string]: string;
|
|
37
|
+
};
|
|
38
|
+
publishedAt?: string | undefined;
|
|
39
|
+
createdById: string;
|
|
40
|
+
createdAt: string;
|
|
41
|
+
updatedAt: string;
|
|
42
|
+
}
|
|
43
|
+
export interface PageResponse_TitleEntry {
|
|
44
|
+
key: string;
|
|
45
|
+
value: string;
|
|
46
|
+
}
|
|
47
|
+
export interface PageResponse_SeoTitleEntry {
|
|
48
|
+
key: string;
|
|
49
|
+
value: string;
|
|
50
|
+
}
|
|
51
|
+
export interface PageResponse_SeoDescriptionEntry {
|
|
52
|
+
key: string;
|
|
53
|
+
value: string;
|
|
54
|
+
}
|
|
55
|
+
export interface PageResponse_SeoKeywordsEntry {
|
|
56
|
+
key: string;
|
|
57
|
+
value: string;
|
|
58
|
+
}
|
|
59
|
+
export interface PageResponse_SeoH1Entry {
|
|
60
|
+
key: string;
|
|
61
|
+
value: string;
|
|
62
|
+
}
|
|
63
|
+
export interface PageIdRequest {
|
|
64
|
+
id: string;
|
|
65
|
+
}
|
|
66
|
+
export interface GetPageRequest {
|
|
67
|
+
slug: string;
|
|
68
|
+
}
|
|
69
|
+
export interface GetPagesRequest {
|
|
70
|
+
status?: PageStatus | undefined;
|
|
71
|
+
search?: string | undefined;
|
|
72
|
+
pagination: PaginationRequest | undefined;
|
|
73
|
+
}
|
|
74
|
+
export interface GetPagesResponse {
|
|
75
|
+
items: PageResponse[];
|
|
76
|
+
meta: PaginationMeta | undefined;
|
|
77
|
+
}
|
|
78
|
+
export interface CreatePageRequest {
|
|
79
|
+
slug: string;
|
|
80
|
+
status: PageStatus;
|
|
81
|
+
title: {
|
|
82
|
+
[key: string]: string;
|
|
83
|
+
};
|
|
84
|
+
blocksJson: string;
|
|
85
|
+
coverImage?: string | undefined;
|
|
86
|
+
coverImageId?: string | undefined;
|
|
87
|
+
seoTitle: {
|
|
88
|
+
[key: string]: string;
|
|
89
|
+
};
|
|
90
|
+
seoDescription: {
|
|
91
|
+
[key: string]: string;
|
|
92
|
+
};
|
|
93
|
+
seoKeywords: {
|
|
94
|
+
[key: string]: string;
|
|
95
|
+
};
|
|
96
|
+
seoH1: {
|
|
97
|
+
[key: string]: string;
|
|
98
|
+
};
|
|
99
|
+
createdById: string;
|
|
100
|
+
}
|
|
101
|
+
export interface CreatePageRequest_TitleEntry {
|
|
102
|
+
key: string;
|
|
103
|
+
value: string;
|
|
104
|
+
}
|
|
105
|
+
export interface CreatePageRequest_SeoTitleEntry {
|
|
106
|
+
key: string;
|
|
107
|
+
value: string;
|
|
108
|
+
}
|
|
109
|
+
export interface CreatePageRequest_SeoDescriptionEntry {
|
|
110
|
+
key: string;
|
|
111
|
+
value: string;
|
|
112
|
+
}
|
|
113
|
+
export interface CreatePageRequest_SeoKeywordsEntry {
|
|
114
|
+
key: string;
|
|
115
|
+
value: string;
|
|
116
|
+
}
|
|
117
|
+
export interface CreatePageRequest_SeoH1Entry {
|
|
118
|
+
key: string;
|
|
119
|
+
value: string;
|
|
120
|
+
}
|
|
121
|
+
export interface UpdatePageRequest {
|
|
122
|
+
id: string;
|
|
123
|
+
slug?: string | undefined;
|
|
124
|
+
status?: PageStatus | undefined;
|
|
125
|
+
title: {
|
|
126
|
+
[key: string]: string;
|
|
127
|
+
};
|
|
128
|
+
blocksJson?: string | undefined;
|
|
129
|
+
coverImage?: string | undefined;
|
|
130
|
+
coverImageId?: string | undefined;
|
|
131
|
+
clearCoverImage: boolean;
|
|
132
|
+
seoTitle: {
|
|
133
|
+
[key: string]: string;
|
|
134
|
+
};
|
|
135
|
+
seoDescription: {
|
|
136
|
+
[key: string]: string;
|
|
137
|
+
};
|
|
138
|
+
seoKeywords: {
|
|
139
|
+
[key: string]: string;
|
|
140
|
+
};
|
|
141
|
+
seoH1: {
|
|
142
|
+
[key: string]: string;
|
|
143
|
+
};
|
|
144
|
+
updatedById: string;
|
|
145
|
+
}
|
|
146
|
+
export interface UpdatePageRequest_TitleEntry {
|
|
147
|
+
key: string;
|
|
148
|
+
value: string;
|
|
149
|
+
}
|
|
150
|
+
export interface UpdatePageRequest_SeoTitleEntry {
|
|
151
|
+
key: string;
|
|
152
|
+
value: string;
|
|
153
|
+
}
|
|
154
|
+
export interface UpdatePageRequest_SeoDescriptionEntry {
|
|
155
|
+
key: string;
|
|
156
|
+
value: string;
|
|
157
|
+
}
|
|
158
|
+
export interface UpdatePageRequest_SeoKeywordsEntry {
|
|
159
|
+
key: string;
|
|
160
|
+
value: string;
|
|
161
|
+
}
|
|
162
|
+
export interface UpdatePageRequest_SeoH1Entry {
|
|
163
|
+
key: string;
|
|
164
|
+
value: string;
|
|
165
|
+
}
|
|
166
|
+
export interface PublishPageRequest {
|
|
167
|
+
id: string;
|
|
168
|
+
publish: boolean;
|
|
169
|
+
updatedById: string;
|
|
170
|
+
}
|
|
171
|
+
export declare const CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
172
|
+
export interface PageServiceClient {
|
|
173
|
+
getPage(request: GetPageRequest): Observable<PageResponse>;
|
|
174
|
+
getPageById(request: PageIdRequest): Observable<PageResponse>;
|
|
175
|
+
getPages(request: GetPagesRequest): Observable<GetPagesResponse>;
|
|
176
|
+
createPage(request: CreatePageRequest): Observable<PageResponse>;
|
|
177
|
+
updatePage(request: UpdatePageRequest): Observable<PageResponse>;
|
|
178
|
+
deletePage(request: PageIdRequest): Observable<DeleteResponse>;
|
|
179
|
+
publishPage(request: PublishPageRequest): Observable<PageResponse>;
|
|
180
|
+
}
|
|
181
|
+
export interface PageServiceController {
|
|
182
|
+
getPage(request: GetPageRequest): Promise<PageResponse> | Observable<PageResponse> | PageResponse;
|
|
183
|
+
getPageById(request: PageIdRequest): Promise<PageResponse> | Observable<PageResponse> | PageResponse;
|
|
184
|
+
getPages(request: GetPagesRequest): Promise<GetPagesResponse> | Observable<GetPagesResponse> | GetPagesResponse;
|
|
185
|
+
createPage(request: CreatePageRequest): Promise<PageResponse> | Observable<PageResponse> | PageResponse;
|
|
186
|
+
updatePage(request: UpdatePageRequest): Promise<PageResponse> | Observable<PageResponse> | PageResponse;
|
|
187
|
+
deletePage(request: PageIdRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
188
|
+
publishPage(request: PublishPageRequest): Promise<PageResponse> | Observable<PageResponse> | PageResponse;
|
|
189
|
+
}
|
|
190
|
+
export declare function PageServiceControllerMethods(): (constructor: Function) => void;
|
|
191
|
+
export declare const PAGE_SERVICE_NAME = "PageService";
|
package/dist/gen/page.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
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: page.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.PAGE_SERVICE_NAME = exports.CONTENT_V1_PACKAGE_NAME = exports.PageStatus = exports.protobufPackage = void 0;
|
|
9
|
+
exports.PageServiceControllerMethods = PageServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
exports.protobufPackage = "content.v1";
|
|
13
|
+
var PageStatus;
|
|
14
|
+
(function (PageStatus) {
|
|
15
|
+
PageStatus[PageStatus["PAGE_STATUS_UNSPECIFIED"] = 0] = "PAGE_STATUS_UNSPECIFIED";
|
|
16
|
+
PageStatus[PageStatus["PAGE_STATUS_DRAFT"] = 1] = "PAGE_STATUS_DRAFT";
|
|
17
|
+
PageStatus[PageStatus["PAGE_STATUS_PUBLISHED"] = 2] = "PAGE_STATUS_PUBLISHED";
|
|
18
|
+
PageStatus[PageStatus["PAGE_STATUS_ARCHIVED"] = 3] = "PAGE_STATUS_ARCHIVED";
|
|
19
|
+
PageStatus[PageStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
20
|
+
})(PageStatus || (exports.PageStatus = PageStatus = {}));
|
|
21
|
+
exports.CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
22
|
+
function PageServiceControllerMethods() {
|
|
23
|
+
return function (constructor) {
|
|
24
|
+
const grpcMethods = [
|
|
25
|
+
"getPage",
|
|
26
|
+
"getPageById",
|
|
27
|
+
"getPages",
|
|
28
|
+
"createPage",
|
|
29
|
+
"updatePage",
|
|
30
|
+
"deletePage",
|
|
31
|
+
"publishPage",
|
|
32
|
+
];
|
|
33
|
+
for (const method of grpcMethods) {
|
|
34
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
35
|
+
(0, microservices_1.GrpcMethod)("PageService", method)(constructor.prototype[method], method, descriptor);
|
|
36
|
+
}
|
|
37
|
+
const grpcStreamMethods = [];
|
|
38
|
+
for (const method of grpcStreamMethods) {
|
|
39
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
40
|
+
(0, microservices_1.GrpcStreamMethod)("PageService", method)(constructor.prototype[method], method, descriptor);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
exports.PAGE_SERVICE_NAME = "PageService";
|
|
@@ -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
|
+
}
|