@postpaybr/protos 1.1.11 → 1.1.16

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.
Files changed (105) hide show
  1. package/dist/typescript/account-entry.d.ts +3 -14
  2. package/dist/typescript/account-entry.js +2 -2
  3. package/dist/typescript/address.d.ts +1 -1
  4. package/dist/typescript/address.js +8 -13
  5. package/dist/typescript/admin-card-verification.d.ts +5 -7
  6. package/dist/typescript/admin-card-verification.js +3 -2
  7. package/dist/typescript/administrator.d.ts +10 -15
  8. package/dist/typescript/administrator.js +3 -2
  9. package/dist/typescript/anticipation.d.ts +2 -1
  10. package/dist/typescript/anticipation.js +3 -2
  11. package/dist/typescript/asset.d.ts +3 -3
  12. package/dist/typescript/asset.js +8 -13
  13. package/dist/typescript/auth.d.ts +2 -2
  14. package/dist/typescript/auth.js +8 -8
  15. package/dist/typescript/bank-account.d.ts +3 -6
  16. package/dist/typescript/bank-account.js +2 -2
  17. package/dist/typescript/card-vault.d.ts +1 -1
  18. package/dist/typescript/card-vault.js +8 -8
  19. package/dist/typescript/card-verification.d.ts +1 -1
  20. package/dist/typescript/card-verification.js +8 -11
  21. package/dist/typescript/card.d.ts +1 -15
  22. package/dist/typescript/card.js +3 -2
  23. package/dist/typescript/charge-schedule.d.ts +3 -15
  24. package/dist/typescript/charge-schedule.js +8 -8
  25. package/dist/typescript/charge.d.ts +87 -97
  26. package/dist/typescript/charge.js +2 -2
  27. package/dist/typescript/common.d.ts +139 -0
  28. package/dist/typescript/common.js +11 -0
  29. package/dist/typescript/context.d.ts +13 -41
  30. package/dist/typescript/context.js +2 -2
  31. package/dist/typescript/customer.d.ts +5 -14
  32. package/dist/typescript/customer.js +2 -2
  33. package/dist/typescript/daily-balance.d.ts +1 -4
  34. package/dist/typescript/daily-balance.js +2 -2
  35. package/dist/typescript/document-verification.d.ts +8 -9
  36. package/dist/typescript/document-verification.js +3 -2
  37. package/dist/typescript/email.js +2 -2
  38. package/dist/typescript/expo-push.d.ts +2 -3
  39. package/dist/typescript/expo-push.js +8 -8
  40. package/dist/typescript/fee.d.ts +1 -2
  41. package/dist/typescript/fee.js +2 -2
  42. package/dist/typescript/location.d.ts +1 -1
  43. package/dist/typescript/location.js +8 -8
  44. package/dist/typescript/notification.d.ts +6 -13
  45. package/dist/typescript/notification.js +3 -2
  46. package/dist/typescript/order.d.ts +20 -17
  47. package/dist/typescript/order.js +3 -2
  48. package/dist/typescript/payable.d.ts +20 -23
  49. package/dist/typescript/payable.js +3 -2
  50. package/dist/typescript/payer.d.ts +1 -1
  51. package/dist/typescript/payer.js +8 -8
  52. package/dist/typescript/payment-calculator.d.ts +4 -56
  53. package/dist/typescript/payment-calculator.js +3 -2
  54. package/dist/typescript/payment-card.d.ts +12 -70
  55. package/dist/typescript/payment-card.js +3 -2
  56. package/dist/typescript/payment-gateway.d.ts +3 -11
  57. package/dist/typescript/payment-gateway.js +3 -2
  58. package/dist/typescript/payment-pix.d.ts +4 -78
  59. package/dist/typescript/payment-pix.js +5 -5
  60. package/dist/typescript/receipt.d.ts +16 -53
  61. package/dist/typescript/receipt.js +3 -2
  62. package/dist/typescript/recipient-payment-gateway.d.ts +8 -15
  63. package/dist/typescript/recipient-payment-gateway.js +3 -2
  64. package/dist/typescript/recipient.d.ts +6 -11
  65. package/dist/typescript/recipient.js +3 -2
  66. package/dist/typescript/role.d.ts +3 -7
  67. package/dist/typescript/role.js +3 -2
  68. package/dist/typescript/sms.d.ts +1 -1
  69. package/dist/typescript/sms.js +8 -8
  70. package/dist/typescript/tax.d.ts +16 -66
  71. package/dist/typescript/tax.js +3 -2
  72. package/dist/typescript/transfer.d.ts +31 -10
  73. package/dist/typescript/transfer.js +2 -2
  74. package/dist/typescript/two-factor.d.ts +7 -7
  75. package/dist/typescript/two-factor.js +3 -2
  76. package/dist/typescript/user.d.ts +13 -17
  77. package/dist/typescript/user.js +2 -2
  78. package/dist/typescript/wallet.d.ts +1 -1
  79. package/dist/typescript/wallet.js +8 -8
  80. package/package.json +3 -2
  81. package/src/protos/account-entry.proto +3 -15
  82. package/src/protos/admin-card-verification.proto +0 -2
  83. package/src/protos/administrator.proto +4 -11
  84. package/src/protos/bank-account.proto +4 -5
  85. package/src/protos/charge.proto +14 -78
  86. package/src/protos/common.proto +152 -0
  87. package/src/protos/context.proto +9 -50
  88. package/src/protos/customer.proto +6 -16
  89. package/src/protos/daily-balance.proto +3 -6
  90. package/src/protos/document-verification.proto +5 -6
  91. package/src/protos/expo-push.proto +3 -3
  92. package/src/protos/fee.proto +3 -3
  93. package/src/protos/notification.proto +4 -12
  94. package/src/protos/order.proto +6 -16
  95. package/src/protos/payable.proto +5 -6
  96. package/src/protos/payment-calculator.proto +11 -87
  97. package/src/protos/payment-card.proto +7 -90
  98. package/src/protos/payment-gateway.proto +4 -14
  99. package/src/protos/payment-pix.proto +5 -95
  100. package/src/protos/receipt.proto +14 -65
  101. package/src/protos/recipient-payment-gateway.proto +5 -15
  102. package/src/protos/recipient.proto +4 -9
  103. package/src/protos/role.proto +6 -11
  104. package/src/protos/tax.proto +18 -81
  105. package/src/protos/user.proto +7 -13
@@ -2,6 +2,9 @@ syntax = "proto3";
2
2
 
3
3
  package charge;
4
4
 
5
+ import "common.proto";
6
+ import "tax.proto";
7
+
5
8
  service ChargeService {
6
9
  rpc createCharge (CreateChargeRequest) returns (ChargeResponse);
7
10
  rpc updateCharge (UpdateChargeRequest) returns (ChargeResponse);
@@ -36,16 +39,6 @@ service ChargeService {
36
39
  rpc getOrderPaymentSummary (GetOrderPaymentSummaryRequest) returns (GetOrderPaymentSummaryResponse);
37
40
  }
38
41
 
39
- message DateFilter {
40
- optional string startDate = 1;
41
- optional string endDate = 2;
42
- }
43
-
44
- message PaginationFilter {
45
- optional int32 limit = 1;
46
- optional int32 offset = 2;
47
- }
48
-
49
42
  message Charge {
50
43
  string id = 1;
51
44
  double amount = 2;
@@ -85,6 +78,7 @@ message ChargeSchedule {
85
78
  Charge charge = 6;
86
79
  }
87
80
 
81
+
88
82
  message CreateChargeRequest {
89
83
  double amount = 1;
90
84
  string paymentMethod = 2;
@@ -189,6 +183,7 @@ message ScheduledChargeDetail {
189
183
  optional CardDetails card = 10;
190
184
  }
191
185
 
186
+
192
187
  message CardDetails {
193
188
  string id = 1;
194
189
  string brand = 2;
@@ -227,13 +222,8 @@ message getChargeAdministratorDetailsResponse {
227
222
  optional string failureReason = 21;
228
223
  optional string failureDetails = 22;
229
224
  repeated ChargeSplit splits = 23;
230
- optional TaxPayload tax = 24;
231
- optional ChargeScheduleDetail schedule = 25;
232
- }
233
-
234
- message ChargeScheduleDetail {
235
- string executionDate = 2;
236
- bool isExecuted = 3;
225
+ optional tax.TaxPayload tax = 24;
226
+ optional common.ChargeScheduleDetail schedule = 25;
237
227
  }
238
228
 
239
229
  message ChargeSplit {
@@ -267,66 +257,12 @@ message Tax {
267
257
  int32 city = 17;
268
258
  string recipientId = 18;
269
259
  string metaType = 19;
270
- Meta meta = 20;
271
- Payer payer = 21;
260
+ common.Meta meta = 20;
261
+ common.Payer payer = 21;
272
262
  OrderItemEntity orderItem = 22;
273
263
  optional Receipt receipt = 23;
274
264
  }
275
265
 
276
- message completeTax {
277
- string id = 1;
278
- string type = 2;
279
- string status = 3;
280
- string description = 4;
281
- double amount = 5;
282
- int32 year = 6;
283
- string dueAt = 7;
284
- string documentId = 8;
285
- string code = 9;
286
- bool isSingleQuota = 10;
287
- optional int32 quota = 11;
288
- }
289
-
290
- message Location {
291
- int32 state = 1;
292
- int32 city = 2;
293
- string recipientId = 3;
294
- }
295
-
296
- message TaxPayload {
297
- completeTax tax = 1;
298
- Payer payer = 2;
299
- Location location = 3;
300
- string metaType = 4;
301
- Meta meta = 5;
302
- }
303
-
304
- message Meta {
305
- optional Address address = 1;
306
- optional string licensePlate = 2;
307
- optional string model = 3;
308
- optional int32 yearManufacture = 4;
309
- optional string renavam = 5;
310
- }
311
-
312
- message Address {
313
- string street = 1;
314
- string number = 2;
315
- string complement = 3;
316
- string neighborhood = 4;
317
- string city = 5;
318
- string state = 6;
319
- string zipCode = 7;
320
- }
321
-
322
- message Payer {
323
- string id = 1;
324
- string name = 2;
325
- string document = 3;
326
- string phone = 4;
327
- repeated Tax taxes = 5;
328
- }
329
-
330
266
  message Order {
331
267
  string id = 1;
332
268
  double totalAmount = 2;
@@ -454,15 +390,15 @@ message ChargeClientDetailsResponse {
454
390
  optional CardDetails card = 16;
455
391
  double discountPercentage = 17;
456
392
  double discountAmount = 18;
457
- optional TaxPayload tax = 19;
458
- optional ChargeScheduleDetail schedule = 20;
393
+ optional tax.TaxPayload tax = 19;
394
+ optional common.ChargeScheduleDetail schedule = 20;
459
395
  optional string orderId = 21;
460
396
  }
461
397
 
462
398
  message GetChargesHistoryRequest {
463
399
  ChargeHistoryFilter data = 1;
464
- PaginationFilter pagination = 2;
465
- DateFilter date = 3;
400
+ common.PaginationFilter pagination = 2;
401
+ common.DateFilter date = 3;
466
402
  }
467
403
 
468
404
  message ChargeHistoryFilter {
@@ -483,7 +419,7 @@ message ChargeCardItem {
483
419
  string propertyDetail = 5;
484
420
  int32 installmentNumber = 6;
485
421
  double installmentValue = 7;
486
- optional ChargeScheduleDetail schedule = 8;
422
+ optional common.ChargeScheduleDetail schedule = 8;
487
423
  string taxType = 9;
488
424
  string status = 10;
489
425
  }
@@ -0,0 +1,152 @@
1
+ syntax = "proto3";
2
+
3
+ package common;
4
+
5
+
6
+ import "tax.proto";
7
+
8
+ message Void {}
9
+
10
+ message Empty {}
11
+
12
+ message TableFilterParams {
13
+ optional int32 pageIndex = 1;
14
+ optional int32 pageSize = 2;
15
+ repeated string statuses = 3;
16
+ optional string globalFilter = 4;
17
+ optional string startDate = 5;
18
+ optional string endDate = 6;
19
+ }
20
+
21
+ message DailyBalance {
22
+ string date = 1;
23
+ double balance = 2;
24
+ }
25
+
26
+ message DateFilter {
27
+ optional string startDate = 1;
28
+ optional string endDate = 2;
29
+ }
30
+
31
+ message PaginationFilter {
32
+ optional int32 limit = 1;
33
+ optional int32 offset = 2;
34
+ }
35
+
36
+ message Role {
37
+ string id = 1;
38
+ string code = 2;
39
+ string description = 3;
40
+ repeated string permissions = 4;
41
+ }
42
+
43
+ message Address {
44
+ string street = 1;
45
+ string number = 2;
46
+ string complement = 3;
47
+ string neighborhood = 4;
48
+ string city = 5;
49
+ string state = 6;
50
+ string zipCode = 7;
51
+ }
52
+
53
+ message Location {
54
+ int32 state = 1;
55
+ int32 city = 2;
56
+ string recipientId = 3;
57
+ }
58
+
59
+ message Payer {
60
+ optional string id = 1;
61
+ string name = 2;
62
+ string document = 3;
63
+ optional string phone = 4;
64
+ }
65
+
66
+
67
+ message FullPayer {
68
+ string id = 1;
69
+ string name = 2;
70
+ string document = 3;
71
+ string phone = 4;
72
+ repeated TaxEntity taxes = 5;
73
+ }
74
+
75
+ message Tax {
76
+ string id = 1;
77
+ string type = 2;
78
+ string status = 3;
79
+ string description = 4;
80
+ double amount = 5;
81
+ int32 year = 6;
82
+ string dueAt = 7;
83
+ string documentId = 8;
84
+ string code = 9;
85
+ bool isSingleQuota = 10;
86
+ optional int32 quota = 11;
87
+ double discountAmount = 12;
88
+ double fee = 13;
89
+ double fine = 14;
90
+ }
91
+
92
+ message Meta {
93
+ optional Address address = 1;
94
+ optional string licensePlate = 2;
95
+ optional string model = 3;
96
+ optional int32 yearManufacture = 4;
97
+ optional string renavam = 5;
98
+ }
99
+
100
+ message PaymentSchedule {
101
+ string type = 1;
102
+ optional string date = 2;
103
+ }
104
+
105
+ message Card {
106
+ string id = 1;
107
+ string shadowNumber = 2;
108
+ string brand = 3;
109
+ optional int32 installments = 4;
110
+ optional double installmentValue = 5;
111
+ }
112
+
113
+ message PaymentDetails {
114
+ string method = 1;
115
+ double amount = 2;
116
+ optional double discountPercentage = 3;
117
+ double fee = 4;
118
+ optional double discountAmount = 5;
119
+ optional string gatewayId = 6;
120
+ optional Card card = 7;
121
+ PaymentSchedule paymentSchedule = 8;
122
+ double baseFee = 9;
123
+ double feePercentage = 10;
124
+ optional string chargeId = 11;
125
+ optional bool isRetry = 12;
126
+ optional string orderId = 13;
127
+ }
128
+
129
+ message TaxPayload {
130
+ Tax tax = 1;
131
+ Payer payer = 2;
132
+ Location location = 3;
133
+ string metaType = 4;
134
+ Meta meta = 5;
135
+ }
136
+
137
+ message ChargeScheduleDetail {
138
+ string executionDate = 2;
139
+ bool isExecuted = 3;
140
+ }
141
+
142
+ message Order {
143
+ string id = 1;
144
+ double totalAmount = 2;
145
+ string status = 3;
146
+ string createdAt = 4;
147
+ }
148
+
149
+ message ImageData {
150
+ string mimetype = 1;
151
+ bytes buffer = 2;
152
+ }
@@ -2,6 +2,8 @@ syntax = "proto3";
2
2
 
3
3
  package context;
4
4
 
5
+ import "common.proto";
6
+
5
7
  service ContextService {
6
8
  rpc GetContext(GetContextRequest) returns (GetContextResponse);
7
9
  rpc ClearContext(ClearContextRequest) returns (ClearContextResponse);
@@ -21,30 +23,6 @@ message LocationDetails {
21
23
  int32 year = 4;
22
24
  }
23
25
 
24
- message Tax {
25
- string id = 1;
26
- string type = 2;
27
- string status = 3;
28
- string description = 4;
29
- double amount = 5;
30
- int32 year = 6;
31
- string dueAt = 7;
32
- string documentId = 8;
33
- string code = 9;
34
- bool isSingleQuota = 10;
35
- optional int32 quota = 11;
36
- double discountAmount = 12;
37
- double fee = 13;
38
- double fine = 14;
39
- }
40
-
41
- message Payer {
42
- optional string id = 1;
43
- string name = 2;
44
- string document = 3;
45
- optional string phone = 4;
46
- }
47
-
48
26
  message MetaAddress {
49
27
  string street = 1;
50
28
  string complement = 2;
@@ -63,16 +41,10 @@ message Meta {
63
41
  optional string renavam = 5;
64
42
  }
65
43
 
66
- message TaxLocation {
67
- int32 state = 1;
68
- int32 city = 2;
69
- string recipientId = 3;
70
- }
71
-
72
44
  message TaxDetail {
73
- Tax tax = 1;
74
- Payer payer = 2;
75
- TaxLocation location = 3;
45
+ common.Tax tax = 1;
46
+ common.Payer payer = 2;
47
+ common.Location location = 3;
76
48
  string metaType = 4;
77
49
  Meta meta = 5;
78
50
  }
@@ -85,7 +57,7 @@ message PaymentDetails {
85
57
  optional double discountAmount = 5;
86
58
  optional string gatewayId = 6;
87
59
  optional Card card = 7;
88
- PaymentSchedule paymentSchedule = 8;
60
+ common.PaymentSchedule paymentSchedule = 8;
89
61
  double baseFee = 9;
90
62
  double feePercentage = 10;
91
63
  optional string chargeId = 11;
@@ -94,15 +66,10 @@ message PaymentDetails {
94
66
  optional bool keepData = 14;
95
67
  }
96
68
 
97
- message PaymentSchedule {
98
- string type = 1;
99
- optional string date = 2;
100
- }
101
-
102
69
  message Card {
103
70
  string id = 1;
104
71
  string shadowNumber = 2;
105
- optional string brand = 3;
72
+ string brand = 3;
106
73
  optional int32 installments = 4;
107
74
  optional double installmentValue = 5;
108
75
  }
@@ -154,21 +121,13 @@ message CheckoutRequest {
154
121
  string customerId = 1;
155
122
  }
156
123
 
157
- message Order {
158
- string id = 1;
159
- double totalAmount = 2;
160
- string status = 3;
161
- string createdAt = 4;
162
- }
163
-
164
124
  message CheckoutResponse {
165
- Order order = 1;
125
+ common.Order order = 1;
166
126
  string orderType = 2;
167
127
  optional string chargeId = 3;
168
128
  }
169
129
 
170
-
171
130
  message PostPaymentDateRequest {
172
131
  string customerId = 1;
173
- PaymentSchedule paymentSchedule = 2;
132
+ common.PaymentSchedule paymentSchedule = 2;
174
133
  }
@@ -2,6 +2,8 @@ syntax = "proto3";
2
2
 
3
3
  package customer;
4
4
 
5
+ import "common.proto";
6
+
5
7
  service CustomerService {
6
8
  rpc CreateCustomer (CreateCustomerRequest) returns (CreateCustomerResponse);
7
9
  rpc CheckCustomerExists (CheckCustomerExistsRequest) returns (CheckCustomerExistsResponse);
@@ -169,7 +171,7 @@ message CustomerSignUp {
169
171
  message User {
170
172
  string id = 1;
171
173
  string password = 2;
172
- Role role = 3;
174
+ common.Role role = 3;
173
175
  repeated Device devices = 4;
174
176
  }
175
177
 
@@ -178,16 +180,9 @@ message UserSignUp {
178
180
  repeated Device devices = 2;
179
181
  }
180
182
 
181
- message Role {
182
- string id = 1;
183
- string code = 2;
184
- string description = 3;
185
- repeated string permissions = 4;
186
- }
187
-
188
183
  message Device {
189
184
  optional string token = 1;
190
- string expoPushToken = 2;
185
+ optional string expoPushToken = 2;
191
186
  }
192
187
 
193
188
 
@@ -213,15 +208,10 @@ message CustomerWithStatus {
213
208
  string userStatus = 6;
214
209
  }
215
210
 
216
- message ImageData {
217
- string mimetype = 1;
218
- bytes buffer = 2;
219
- }
220
-
221
211
  message InitiateDocumentVerificationRequest {
222
212
  string customerId = 1;
223
- ImageData documentFront = 2;
224
- ImageData selfieWithDocument = 3;
213
+ common.ImageData documentFront = 2;
214
+ common.ImageData selfieWithDocument = 3;
225
215
  }
226
216
 
227
217
  message DocumentVerificationResponse {
@@ -2,6 +2,8 @@ syntax = "proto3";
2
2
 
3
3
  package dailyBalance;
4
4
 
5
+ import "common.proto";
6
+
5
7
  service DailyBalanceService {
6
8
  rpc getBalanceHistory(GetBalanceHistoryRequest) returns (GetBalanceHistoryResponse);
7
9
  rpc getCurrentBalance(getCurrentBalanceRequest) returns (getCurrentBalanceResponse);
@@ -13,13 +15,8 @@ message GetBalanceHistoryRequest {
13
15
  string endDate = 3;
14
16
  }
15
17
 
16
- message DailyBalance {
17
- string date = 1;
18
- double balance = 2;
19
- }
20
-
21
18
  message GetBalanceHistoryResponse {
22
- repeated DailyBalance dailyBalances = 1;
19
+ repeated common.DailyBalance dailyBalances = 1;
23
20
  }
24
21
 
25
22
  message getCurrentBalanceRequest {
@@ -2,13 +2,15 @@ syntax = "proto3";
2
2
 
3
3
  package documentVerification;
4
4
 
5
+ import "common.proto";
6
+
5
7
  service DocumentVerificationService {
6
8
  rpc updateVerificationStatus(UpdateDocumentVerificationStatusRequest) returns (DocumentVerificationResponse);
7
9
  rpc getDocumentVerificationsWithDetails(GetVerificationsWithDetailsRequest) returns (GetDocumentVerificationsWithDetailsResponse);
8
10
  rpc getDocumentVerificationDetailsById(GetVerificationDetailsByIdRequest) returns (DocumentVerificationDetailsResponse);
9
11
 
10
- rpc countPendingOrInProgressVerifications(Empty) returns (CountResponse);
11
- rpc getDistinctReviewers(Empty) returns (GetDistinctReviewersResponse);
12
+ rpc countPendingOrInProgressVerifications(common.Empty) returns (CountResponse);
13
+ rpc getDistinctReviewers(common.Empty) returns (GetDistinctReviewersResponse);
12
14
  rpc undoLastStatusChange(UndoLastStatusChangeRequest) returns (DocumentVerificationResponse);
13
15
  }
14
16
 
@@ -89,9 +91,6 @@ message VerificationHistoryWithDetails {
89
91
  string actedBy = 5;
90
92
  }
91
93
 
92
- message Empty {}
93
-
94
-
95
94
  message CountResponse {
96
95
  int32 count = 1;
97
96
  }
@@ -108,4 +107,4 @@ message GetDistinctReviewersResponse {
108
107
  message UndoLastStatusChangeRequest {
109
108
  string verificationId = 1;
110
109
  string actedById = 2;
111
- }
110
+ }
@@ -2,8 +2,10 @@ syntax = "proto3";
2
2
 
3
3
  package expoPush;
4
4
 
5
+ import "common.proto";
6
+
5
7
  service ExpoPushService {
6
- rpc SendNotification (NotificationDto) returns (Empty);
8
+ rpc SendNotification (NotificationDto) returns (common.Empty);
7
9
 
8
10
  }
9
11
 
@@ -23,5 +25,3 @@ message DataValue {
23
25
  }
24
26
  }
25
27
 
26
- message Empty {}
27
-
@@ -2,10 +2,12 @@ syntax = "proto3";
2
2
 
3
3
  package fee;
4
4
 
5
+ import "common.proto";
6
+
5
7
  service FeeService {
6
8
  rpc CreateFee(CreateFeeDto) returns (FeeEntity);
7
9
  rpc UpdateRecipientFee(UpdateFeeDto) returns (FeeEntity);
8
- rpc GetAllDefaultFees(Void) returns (FeeEntityList);
10
+ rpc GetAllDefaultFees(common.Void) returns (FeeEntityList);
9
11
  rpc GetFeeForRecipientAndMethod(GetFeeRequest) returns (FeeEntity);
10
12
 
11
13
  }
@@ -61,5 +63,3 @@ message FeeEntityList {
61
63
  repeated FeeEntity fees = 1;
62
64
  }
63
65
 
64
- message Void {}
65
-
@@ -2,6 +2,8 @@ syntax = "proto3";
2
2
 
3
3
  package notification;
4
4
 
5
+ import "common.proto";
6
+
5
7
  service NotificationService {
6
8
  rpc CreateNotification(CreateNotificationRequest) returns (NotificationResponse);
7
9
  rpc GetNotificationById(GetNotificationByIdRequest) returns (NotificationResponse);
@@ -24,16 +26,6 @@ message GetAllNotificationsDto {
24
26
  optional bool isRead = 4;
25
27
  }
26
28
 
27
- message DateFilter {
28
- optional string startDate = 1;
29
- optional string endDate = 2;
30
- }
31
-
32
- message PaginationFilter {
33
- optional int32 limit = 1;
34
- optional int32 offset = 2;
35
- }
36
-
37
29
  message NotificationChange {
38
30
  string field = 1;
39
31
  string oldValue = 2;
@@ -118,8 +110,8 @@ message GetNotificationByIdRequest {
118
110
 
119
111
  message GetAllNotificationsRequest {
120
112
  GetAllNotificationsDto data = 1;
121
- DateFilter dateFilter = 2;
122
- PaginationFilter pagination = 3;
113
+ common.DateFilter dateFilter = 2;
114
+ common.PaginationFilter pagination = 3;
123
115
  }
124
116
 
125
117
  message NotificationsResponse {
@@ -2,16 +2,18 @@ syntax = "proto3";
2
2
 
3
3
  package order;
4
4
 
5
+ import "common.proto";
6
+
5
7
  service OrderService {
6
8
  rpc CreateOrder(CreateOrderRequest) returns (Order);
7
9
  rpc GetOrderById(GetOrderByIdRequest) returns (Order);
8
10
  rpc GetAllOrders(GetAllOrdersRequest) returns (GetAllOrdersResponse);
9
- rpc CreateOrderItems(CreateOrderItemsRequest) returns (Void);
11
+ rpc CreateOrderItems(CreateOrderItemsRequest) returns (common.Void);
10
12
  rpc GetReceiptsByOrderId(GetReceiptsByOrderIdRequest) returns (GetReceiptsByOrderIdResponse);
11
13
  rpc updateOrderStatus(updateOrderStatusRequest) returns (Order);
12
14
 
13
15
  rpc GetOrderCustomerName(GetOrderByIdRequest) returns (GetOrderCustomerNameResponse);
14
- rpc updateOrderWithChargeId(updateOrderWithChargeIdRequest) returns (Void);
16
+ rpc updateOrderWithChargeId(updateOrderWithChargeIdRequest) returns (common.Void);
15
17
  rpc updateOrderAmountAndStatus (UpdateOrderAmountAndStatusRequest) returns (Order);
16
18
  rpc GetDetailedOrder(GetOrderByIdRequest) returns (DetailedOrderResponse);
17
19
  }
@@ -31,18 +33,8 @@ message GetAllOrdersRequest {
31
33
  optional string recipientId = 1;
32
34
  repeated string statuses = 2;
33
35
  optional string orderType = 3;
34
- PaginationFilter pagination = 4;
35
- DateFilter date = 5;
36
- }
37
-
38
- message PaginationFilter {
39
- optional int32 limit = 1;
40
- optional int32 offset = 2;
41
- }
42
-
43
- message DateFilter {
44
- optional string startDate = 1;
45
- optional string endDate = 2;
36
+ common.PaginationFilter pagination = 4;
37
+ common.DateFilter date = 5;
46
38
  }
47
39
 
48
40
  message GetAllOrdersResponse {
@@ -77,8 +69,6 @@ message HealthCheckResponse {
77
69
  map<string, string> details = 2;
78
70
  }
79
71
 
80
- message Void {}
81
-
82
72
  message Order {
83
73
  string id = 1;
84
74
  double totalAmount = 2;
@@ -2,6 +2,8 @@ syntax = "proto3";
2
2
 
3
3
  package payable;
4
4
 
5
+ import "common.proto";
6
+
5
7
  service PayableService {
6
8
  rpc CreatePayable (CreatePayableRequest) returns (PayableResponse);
7
9
  rpc GetPayablesByChargeId (GetPayablesByChargeIdRequest) returns (GetPayablesByChargeIdResponse);
@@ -48,7 +50,7 @@ message Payable {
48
50
  string dueAt = 5;
49
51
  string createdAt = 6;
50
52
  bool isAnticipated = 7;
51
- Anticipation anticipation = 8;
53
+ optional Anticipation anticipation = 8;
52
54
  optional string chargeId = 9;
53
55
  optional string recipientId = 10;
54
56
  optional string processedAt = 11;
@@ -119,7 +121,7 @@ message DeletePayableResponse {
119
121
  message GetAllPayablesRequest {
120
122
  optional GetAllPayablesData data = 1;
121
123
  PaginationFilter pagination = 2;
122
- DateFilter date = 3;
124
+ common.DateFilter date = 3;
123
125
  }
124
126
 
125
127
  message GetAllPayablesData {
@@ -133,10 +135,7 @@ message PaginationFilter {
133
135
  int32 offset = 2;
134
136
  }
135
137
 
136
- message DateFilter {
137
- optional string startDate = 1;
138
- optional string endDate = 2;
139
- }
138
+
140
139
 
141
140
  message GetAllPayablesResponse {
142
141
  repeated PayableWithDetails payables = 1;