@mamindom/contracts 1.0.48 → 1.0.50

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.
@@ -84,27 +84,17 @@ export interface AdminCreateAccountRequest {
84
84
  export interface AdminCreateAccountResponse {
85
85
  id: string;
86
86
  }
87
- export interface AdminGetAllAccountsRequest {
88
- page: number;
89
- limit: number;
87
+ export interface AdminGetAccountsRequest {
88
+ page?: number | undefined;
89
+ limit?: number | undefined;
90
90
  search?: string | undefined;
91
91
  role?: Role | undefined;
92
+ isBlocked?: boolean | undefined;
93
+ sortBy?: string | undefined;
92
94
  }
93
- export interface AdminAccountItem {
94
- id: string;
95
- phone: string;
96
- email: string;
97
- firstName: string;
98
- lastName: string;
99
- role: Role;
100
- isBlocked: boolean;
101
- createdAt: string;
102
- }
103
- export interface AdminGetAllAccountsResponse {
104
- items: AdminAccountItem[];
95
+ export interface AdminGetAccountsResponse {
96
+ items: AdminGetAccountResponse[];
105
97
  total: number;
106
- page: number;
107
- limit: number;
108
98
  }
109
99
  export declare const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
110
100
  export interface AccountServiceClient {
@@ -116,7 +106,7 @@ export interface AccountServiceClient {
116
106
  adminGetAccount(request: AdminGetAccountRequest): Observable<AdminGetAccountResponse>;
117
107
  adminBlockAccount(request: AdminBlockAccountRequest): Observable<AdminBlockAccountResponse>;
118
108
  adminCreateAccount(request: AdminCreateAccountRequest): Observable<AdminCreateAccountResponse>;
119
- adminGetAllAccounts(request: AdminGetAllAccountsRequest): Observable<AdminGetAllAccountsResponse>;
109
+ adminGetAccounts(request: AdminGetAccountsRequest): Observable<AdminGetAccountsResponse>;
120
110
  }
121
111
  export interface AccountServiceController {
122
112
  getAccount(request: GetAccountRequest): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
@@ -127,7 +117,7 @@ export interface AccountServiceController {
127
117
  adminGetAccount(request: AdminGetAccountRequest): Promise<AdminGetAccountResponse> | Observable<AdminGetAccountResponse> | AdminGetAccountResponse;
128
118
  adminBlockAccount(request: AdminBlockAccountRequest): Promise<AdminBlockAccountResponse> | Observable<AdminBlockAccountResponse> | AdminBlockAccountResponse;
129
119
  adminCreateAccount(request: AdminCreateAccountRequest): Promise<AdminCreateAccountResponse> | Observable<AdminCreateAccountResponse> | AdminCreateAccountResponse;
130
- adminGetAllAccounts(request: AdminGetAllAccountsRequest): Promise<AdminGetAllAccountsResponse> | Observable<AdminGetAllAccountsResponse> | AdminGetAllAccountsResponse;
120
+ adminGetAccounts(request: AdminGetAccountsRequest): Promise<AdminGetAccountsResponse> | Observable<AdminGetAccountsResponse> | AdminGetAccountsResponse;
131
121
  }
132
122
  export declare function AccountServiceControllerMethods(): (constructor: Function) => void;
133
123
  export declare const ACCOUNT_SERVICE_NAME = "AccountService";
@@ -31,7 +31,7 @@ function AccountServiceControllerMethods() {
31
31
  "adminGetAccount",
32
32
  "adminBlockAccount",
33
33
  "adminCreateAccount",
34
- "adminGetAllAccounts",
34
+ "adminGetAccounts",
35
35
  ];
36
36
  for (const method of grpcMethods) {
37
37
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
@@ -0,0 +1,18 @@
1
+ export declare const protobufPackage = "promo.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 PROMO_V1_PACKAGE_NAME = "promo.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_promo.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.PROMO_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ exports.protobufPackage = "promo.v1";
11
+ exports.PROMO_V1_PACKAGE_NAME = "promo.v1";
@@ -0,0 +1,293 @@
1
+ import { Observable } from "rxjs";
2
+ import { DeleteResponse, PaginationMeta, PaginationRequest } from "./common_promo";
3
+ export declare const protobufPackage = "promo.v1";
4
+ export declare enum PromotionType {
5
+ PROMOTION_TYPE_UNSPECIFIED = 0,
6
+ PROMOTION_TYPE_FIXED = 1,
7
+ PROMOTION_TYPE_PERCENTAGE = 2,
8
+ PROMOTION_TYPE_COUPON = 3,
9
+ PROMOTION_TYPE_N_PLUS_M = 4,
10
+ PROMOTION_TYPE_FIRST_PURCHASE = 5,
11
+ PROMOTION_TYPE_PROMO_PERIOD = 6,
12
+ UNRECOGNIZED = -1
13
+ }
14
+ export declare enum PromotionStatus {
15
+ PROMOTION_STATUS_UNSPECIFIED = 0,
16
+ PROMOTION_STATUS_ACTIVE = 1,
17
+ PROMOTION_STATUS_INACTIVE = 2,
18
+ PROMOTION_STATUS_SCHEDULED = 3,
19
+ PROMOTION_STATUS_ARCHIVED = 4,
20
+ UNRECOGNIZED = -1
21
+ }
22
+ export interface ProductContextItem {
23
+ productId: string;
24
+ categoryId: string;
25
+ brandId: string;
26
+ basePrice: number;
27
+ }
28
+ export interface GetProductsDiscountsRequest {
29
+ items: ProductContextItem[];
30
+ }
31
+ export interface DiscountedProductItem {
32
+ productId: string;
33
+ originalPrice: number;
34
+ discountedPrice: number;
35
+ appliedPromotionId: string;
36
+ }
37
+ export interface GetProductsDiscountsResponse {
38
+ items: DiscountedProductItem[];
39
+ }
40
+ export interface CartItem {
41
+ productId: string;
42
+ categoryId: string;
43
+ brandId: string;
44
+ price: number;
45
+ quantity: number;
46
+ }
47
+ export interface ValidateAndCalculateRequest {
48
+ userId: string;
49
+ items: CartItem[];
50
+ promoCode?: string | undefined;
51
+ isFirstPurchase: boolean;
52
+ }
53
+ export interface AppliedDiscount {
54
+ promotionId: string;
55
+ title: string;
56
+ discountAmount: number;
57
+ }
58
+ export interface ValidateAndCalculateResponse {
59
+ originalTotal: number;
60
+ finalTotal: number;
61
+ totalDiscount: number;
62
+ appliedDiscounts: AppliedDiscount[];
63
+ isCouponValid: boolean;
64
+ couponErrorMessage?: string | undefined;
65
+ }
66
+ export interface PromotionResponse {
67
+ id: string;
68
+ type: PromotionType;
69
+ status: PromotionStatus;
70
+ title: {
71
+ [key: string]: string;
72
+ };
73
+ description: {
74
+ [key: string]: string;
75
+ };
76
+ metaTitle: {
77
+ [key: string]: string;
78
+ };
79
+ metaDescription: {
80
+ [key: string]: string;
81
+ };
82
+ metaKeywords: {
83
+ [key: string]: string;
84
+ };
85
+ image?: string | undefined;
86
+ imageId?: string | undefined;
87
+ discountValue?: number | undefined;
88
+ startDate?: string | undefined;
89
+ endDate?: string | undefined;
90
+ minOrderAmount: number;
91
+ isCombinable: boolean;
92
+ isActive: boolean;
93
+ conditions: string;
94
+ createdAt: string;
95
+ updatedAt: string;
96
+ }
97
+ export interface PromotionResponse_TitleEntry {
98
+ key: string;
99
+ value: string;
100
+ }
101
+ export interface PromotionResponse_DescriptionEntry {
102
+ key: string;
103
+ value: string;
104
+ }
105
+ export interface PromotionResponse_MetaTitleEntry {
106
+ key: string;
107
+ value: string;
108
+ }
109
+ export interface PromotionResponse_MetaDescriptionEntry {
110
+ key: string;
111
+ value: string;
112
+ }
113
+ export interface PromotionResponse_MetaKeywordsEntry {
114
+ key: string;
115
+ value: string;
116
+ }
117
+ export interface GetPromotionsRequest {
118
+ pagination: PaginationRequest | undefined;
119
+ type?: PromotionType | undefined;
120
+ status?: PromotionStatus | undefined;
121
+ search?: string | undefined;
122
+ }
123
+ export interface GetPromotionsResponse {
124
+ items: PromotionResponse[];
125
+ meta: PaginationMeta | undefined;
126
+ }
127
+ export interface GetPromotionRequest {
128
+ id: string;
129
+ }
130
+ export interface CreatePromotionRequest {
131
+ type: PromotionType;
132
+ status: PromotionStatus;
133
+ title: {
134
+ [key: string]: string;
135
+ };
136
+ description: {
137
+ [key: string]: string;
138
+ };
139
+ metaTitle: {
140
+ [key: string]: string;
141
+ };
142
+ metaDescription: {
143
+ [key: string]: string;
144
+ };
145
+ metaKeywords: {
146
+ [key: string]: string;
147
+ };
148
+ image?: string | undefined;
149
+ imageId?: string | undefined;
150
+ discountValue?: number | undefined;
151
+ startDate?: string | undefined;
152
+ endDate?: string | undefined;
153
+ minOrderAmount?: number | undefined;
154
+ isCombinable: boolean;
155
+ isActive: boolean;
156
+ conditions: string;
157
+ }
158
+ export interface CreatePromotionRequest_TitleEntry {
159
+ key: string;
160
+ value: string;
161
+ }
162
+ export interface CreatePromotionRequest_DescriptionEntry {
163
+ key: string;
164
+ value: string;
165
+ }
166
+ export interface CreatePromotionRequest_MetaTitleEntry {
167
+ key: string;
168
+ value: string;
169
+ }
170
+ export interface CreatePromotionRequest_MetaDescriptionEntry {
171
+ key: string;
172
+ value: string;
173
+ }
174
+ export interface CreatePromotionRequest_MetaKeywordsEntry {
175
+ key: string;
176
+ value: string;
177
+ }
178
+ export interface UpdatePromotionRequest {
179
+ id: string;
180
+ type?: PromotionType | undefined;
181
+ status?: PromotionStatus | undefined;
182
+ title: {
183
+ [key: string]: string;
184
+ };
185
+ description: {
186
+ [key: string]: string;
187
+ };
188
+ metaTitle: {
189
+ [key: string]: string;
190
+ };
191
+ metaDescription: {
192
+ [key: string]: string;
193
+ };
194
+ metaKeywords: {
195
+ [key: string]: string;
196
+ };
197
+ image?: string | undefined;
198
+ imageId?: string | undefined;
199
+ discountValue?: number | undefined;
200
+ startDate?: string | undefined;
201
+ endDate?: string | undefined;
202
+ minOrderAmount?: number | undefined;
203
+ isCombinable?: boolean | undefined;
204
+ isActive?: boolean | undefined;
205
+ conditions?: string | undefined;
206
+ }
207
+ export interface UpdatePromotionRequest_TitleEntry {
208
+ key: string;
209
+ value: string;
210
+ }
211
+ export interface UpdatePromotionRequest_DescriptionEntry {
212
+ key: string;
213
+ value: string;
214
+ }
215
+ export interface UpdatePromotionRequest_MetaTitleEntry {
216
+ key: string;
217
+ value: string;
218
+ }
219
+ export interface UpdatePromotionRequest_MetaDescriptionEntry {
220
+ key: string;
221
+ value: string;
222
+ }
223
+ export interface UpdatePromotionRequest_MetaKeywordsEntry {
224
+ key: string;
225
+ value: string;
226
+ }
227
+ export interface DeletePromotionRequest {
228
+ id: string;
229
+ }
230
+ export interface GenerateCouponsBatchRequest {
231
+ promotionId: string;
232
+ batchName: string;
233
+ count: number;
234
+ prefix?: string | undefined;
235
+ globalUsageLimit?: number | undefined;
236
+ perUserUsageLimit?: number | undefined;
237
+ }
238
+ export interface GenerateCouponsBatchResponse {
239
+ batchId: string;
240
+ generatedCount: number;
241
+ success: boolean;
242
+ }
243
+ export interface ExportCouponsCSVRequest {
244
+ promotionId?: string | undefined;
245
+ batchId?: string | undefined;
246
+ }
247
+ export interface ExportCouponsCSVResponse {
248
+ downloadUrl: string;
249
+ }
250
+ export interface GetPromotionAnalyticsRequest {
251
+ promotionId: string;
252
+ }
253
+ export interface PromotionAnalyticsResponse {
254
+ promotionId: string;
255
+ totalUses: number;
256
+ totalDiscountGiven: number;
257
+ totalRevenue: number;
258
+ averageDiscount: number;
259
+ conversionRate: number;
260
+ }
261
+ export declare const PROMO_V1_PACKAGE_NAME = "promo.v1";
262
+ export interface PublicPromoServiceClient {
263
+ getProductsDiscounts(request: GetProductsDiscountsRequest): Observable<GetProductsDiscountsResponse>;
264
+ validateAndCalculate(request: ValidateAndCalculateRequest): Observable<ValidateAndCalculateResponse>;
265
+ }
266
+ export interface PublicPromoServiceController {
267
+ getProductsDiscounts(request: GetProductsDiscountsRequest): Promise<GetProductsDiscountsResponse> | Observable<GetProductsDiscountsResponse> | GetProductsDiscountsResponse;
268
+ validateAndCalculate(request: ValidateAndCalculateRequest): Promise<ValidateAndCalculateResponse> | Observable<ValidateAndCalculateResponse> | ValidateAndCalculateResponse;
269
+ }
270
+ export declare function PublicPromoServiceControllerMethods(): (constructor: Function) => void;
271
+ export declare const PUBLIC_PROMO_SERVICE_NAME = "PublicPromoService";
272
+ export interface AdminPromoServiceClient {
273
+ getPromotions(request: GetPromotionsRequest): Observable<GetPromotionsResponse>;
274
+ getPromotion(request: GetPromotionRequest): Observable<PromotionResponse>;
275
+ createPromotion(request: CreatePromotionRequest): Observable<PromotionResponse>;
276
+ updatePromotion(request: UpdatePromotionRequest): Observable<PromotionResponse>;
277
+ deletePromotion(request: DeletePromotionRequest): Observable<DeleteResponse>;
278
+ generateCouponsBatch(request: GenerateCouponsBatchRequest): Observable<GenerateCouponsBatchResponse>;
279
+ exportCouponsCsv(request: ExportCouponsCSVRequest): Observable<ExportCouponsCSVResponse>;
280
+ getPromotionAnalytics(request: GetPromotionAnalyticsRequest): Observable<PromotionAnalyticsResponse>;
281
+ }
282
+ export interface AdminPromoServiceController {
283
+ getPromotions(request: GetPromotionsRequest): Promise<GetPromotionsResponse> | Observable<GetPromotionsResponse> | GetPromotionsResponse;
284
+ getPromotion(request: GetPromotionRequest): Promise<PromotionResponse> | Observable<PromotionResponse> | PromotionResponse;
285
+ createPromotion(request: CreatePromotionRequest): Promise<PromotionResponse> | Observable<PromotionResponse> | PromotionResponse;
286
+ updatePromotion(request: UpdatePromotionRequest): Promise<PromotionResponse> | Observable<PromotionResponse> | PromotionResponse;
287
+ deletePromotion(request: DeletePromotionRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
288
+ generateCouponsBatch(request: GenerateCouponsBatchRequest): Promise<GenerateCouponsBatchResponse> | Observable<GenerateCouponsBatchResponse> | GenerateCouponsBatchResponse;
289
+ exportCouponsCsv(request: ExportCouponsCSVRequest): Promise<ExportCouponsCSVResponse> | Observable<ExportCouponsCSVResponse> | ExportCouponsCSVResponse;
290
+ getPromotionAnalytics(request: GetPromotionAnalyticsRequest): Promise<PromotionAnalyticsResponse> | Observable<PromotionAnalyticsResponse> | PromotionAnalyticsResponse;
291
+ }
292
+ export declare function AdminPromoServiceControllerMethods(): (constructor: Function) => void;
293
+ export declare const ADMIN_PROMO_SERVICE_NAME = "AdminPromoService";
@@ -0,0 +1,73 @@
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: promo.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ADMIN_PROMO_SERVICE_NAME = exports.PUBLIC_PROMO_SERVICE_NAME = exports.PROMO_V1_PACKAGE_NAME = exports.PromotionStatus = exports.PromotionType = exports.protobufPackage = void 0;
9
+ exports.PublicPromoServiceControllerMethods = PublicPromoServiceControllerMethods;
10
+ exports.AdminPromoServiceControllerMethods = AdminPromoServiceControllerMethods;
11
+ /* eslint-disable */
12
+ const microservices_1 = require("@nestjs/microservices");
13
+ exports.protobufPackage = "promo.v1";
14
+ var PromotionType;
15
+ (function (PromotionType) {
16
+ PromotionType[PromotionType["PROMOTION_TYPE_UNSPECIFIED"] = 0] = "PROMOTION_TYPE_UNSPECIFIED";
17
+ PromotionType[PromotionType["PROMOTION_TYPE_FIXED"] = 1] = "PROMOTION_TYPE_FIXED";
18
+ PromotionType[PromotionType["PROMOTION_TYPE_PERCENTAGE"] = 2] = "PROMOTION_TYPE_PERCENTAGE";
19
+ PromotionType[PromotionType["PROMOTION_TYPE_COUPON"] = 3] = "PROMOTION_TYPE_COUPON";
20
+ PromotionType[PromotionType["PROMOTION_TYPE_N_PLUS_M"] = 4] = "PROMOTION_TYPE_N_PLUS_M";
21
+ PromotionType[PromotionType["PROMOTION_TYPE_FIRST_PURCHASE"] = 5] = "PROMOTION_TYPE_FIRST_PURCHASE";
22
+ PromotionType[PromotionType["PROMOTION_TYPE_PROMO_PERIOD"] = 6] = "PROMOTION_TYPE_PROMO_PERIOD";
23
+ PromotionType[PromotionType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
24
+ })(PromotionType || (exports.PromotionType = PromotionType = {}));
25
+ var PromotionStatus;
26
+ (function (PromotionStatus) {
27
+ PromotionStatus[PromotionStatus["PROMOTION_STATUS_UNSPECIFIED"] = 0] = "PROMOTION_STATUS_UNSPECIFIED";
28
+ PromotionStatus[PromotionStatus["PROMOTION_STATUS_ACTIVE"] = 1] = "PROMOTION_STATUS_ACTIVE";
29
+ PromotionStatus[PromotionStatus["PROMOTION_STATUS_INACTIVE"] = 2] = "PROMOTION_STATUS_INACTIVE";
30
+ PromotionStatus[PromotionStatus["PROMOTION_STATUS_SCHEDULED"] = 3] = "PROMOTION_STATUS_SCHEDULED";
31
+ PromotionStatus[PromotionStatus["PROMOTION_STATUS_ARCHIVED"] = 4] = "PROMOTION_STATUS_ARCHIVED";
32
+ PromotionStatus[PromotionStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
33
+ })(PromotionStatus || (exports.PromotionStatus = PromotionStatus = {}));
34
+ exports.PROMO_V1_PACKAGE_NAME = "promo.v1";
35
+ function PublicPromoServiceControllerMethods() {
36
+ return function (constructor) {
37
+ const grpcMethods = ["getProductsDiscounts", "validateAndCalculate"];
38
+ for (const method of grpcMethods) {
39
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
40
+ (0, microservices_1.GrpcMethod)("PublicPromoService", method)(constructor.prototype[method], method, descriptor);
41
+ }
42
+ const grpcStreamMethods = [];
43
+ for (const method of grpcStreamMethods) {
44
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
45
+ (0, microservices_1.GrpcStreamMethod)("PublicPromoService", method)(constructor.prototype[method], method, descriptor);
46
+ }
47
+ };
48
+ }
49
+ exports.PUBLIC_PROMO_SERVICE_NAME = "PublicPromoService";
50
+ function AdminPromoServiceControllerMethods() {
51
+ return function (constructor) {
52
+ const grpcMethods = [
53
+ "getPromotions",
54
+ "getPromotion",
55
+ "createPromotion",
56
+ "updatePromotion",
57
+ "deletePromotion",
58
+ "generateCouponsBatch",
59
+ "exportCouponsCsv",
60
+ "getPromotionAnalytics",
61
+ ];
62
+ for (const method of grpcMethods) {
63
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
64
+ (0, microservices_1.GrpcMethod)("AdminPromoService", method)(constructor.prototype[method], method, descriptor);
65
+ }
66
+ const grpcStreamMethods = [];
67
+ for (const method of grpcStreamMethods) {
68
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
69
+ (0, microservices_1.GrpcStreamMethod)("AdminPromoService", method)(constructor.prototype[method], method, descriptor);
70
+ }
71
+ };
72
+ }
73
+ exports.ADMIN_PROMO_SERVICE_NAME = "AdminPromoService";
@@ -15,7 +15,7 @@ service AccountService {
15
15
  rpc AdminBlockAccount(AdminBlockAccountRequest) returns (AdminBlockAccountResponse);
16
16
  rpc AdminCreateAccount(AdminCreateAccountRequest) returns (AdminCreateAccountResponse);
17
17
 
18
- rpc AdminGetAllAccounts(AdminGetAllAccountsRequest) returns (AdminGetAllAccountsResponse);
18
+ rpc AdminGetAccounts(AdminGetAccountsRequest) returns (AdminGetAccountsResponse);
19
19
  }
20
20
 
21
21
  message GetAccountRequest {
@@ -116,29 +116,20 @@ message AdminCreateAccountResponse {
116
116
  string id = 1;
117
117
  }
118
118
 
119
- message AdminGetAllAccountsRequest {
120
- int32 page = 1;
121
- int32 limit = 2;
119
+
120
+
121
+ message AdminGetAccountsRequest {
122
+ optional int32 page = 1;
123
+ optional int32 limit = 2;
122
124
  optional string search = 3;
123
125
  optional Role role = 4;
126
+ optional bool is_blocked = 5;
127
+ optional string sort_by = 6;
124
128
  }
125
129
 
126
- message AdminAccountItem {
127
- string id = 1;
128
- string phone = 2;
129
- string email = 3;
130
- string first_name = 4;
131
- string last_name = 5;
132
- Role role = 6;
133
- bool is_blocked = 7;
134
- string created_at = 8;
135
- }
136
-
137
- message AdminGetAllAccountsResponse {
138
- repeated AdminAccountItem items = 1;
130
+ message AdminGetAccountsResponse {
131
+ repeated AdminGetAccountResponse items = 1;
139
132
  int32 total = 2;
140
- int32 page = 3;
141
- int32 limit = 4;
142
133
  }
143
134
 
144
135
 
@@ -0,0 +1,24 @@
1
+ syntax = "proto3";
2
+
3
+ package promo.v1;
4
+
5
+ message SuccessResponse {
6
+ bool success = 1;
7
+ }
8
+
9
+ message DeleteResponse {
10
+ bool success = 1;
11
+ }
12
+
13
+
14
+ message PaginationRequest {
15
+ int32 page = 1;
16
+ int32 limit = 2;
17
+ }
18
+
19
+ message PaginationMeta {
20
+ int32 total_items = 1;
21
+ int32 total_pages = 2;
22
+ int32 current_page = 3;
23
+ int32 per_page = 4;
24
+ }