@postpaybr/protos 1.1.0

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 (79) hide show
  1. package/package.json +28 -0
  2. package/src/account-entry.proto +86 -0
  3. package/src/address.proto +64 -0
  4. package/src/admin-card-verification.proto +90 -0
  5. package/src/administrator.proto +192 -0
  6. package/src/anticipation.proto +86 -0
  7. package/src/asset.proto +44 -0
  8. package/src/auth.proto +29 -0
  9. package/src/bank-account.proto +62 -0
  10. package/src/card-vault.proto +36 -0
  11. package/src/card-verification.proto +30 -0
  12. package/src/card.proto +138 -0
  13. package/src/charge-schedule.proto +22 -0
  14. package/src/charge.proto +610 -0
  15. package/src/context.proto +174 -0
  16. package/src/customer.proto +234 -0
  17. package/src/daily-balance.proto +32 -0
  18. package/src/document-verification.proto +111 -0
  19. package/src/email.proto +76 -0
  20. package/src/expo-push.proto +27 -0
  21. package/src/fee.proto +65 -0
  22. package/src/location.proto +40 -0
  23. package/src/notification.proto +207 -0
  24. package/src/order.proto +189 -0
  25. package/src/payable.proto +246 -0
  26. package/src/payer.proto +24 -0
  27. package/src/payment-calculator.proto +165 -0
  28. package/src/payment-card.proto +217 -0
  29. package/src/payment-gateway.proto +94 -0
  30. package/src/payment-pix.proto +115 -0
  31. package/src/receipt.proto +212 -0
  32. package/src/recipient-payment-gateway.proto +101 -0
  33. package/src/recipient.proto +237 -0
  34. package/src/role.proto +57 -0
  35. package/src/sms.proto +36 -0
  36. package/src/tax.proto +323 -0
  37. package/src/transfer.proto +206 -0
  38. package/src/two-factor.proto +67 -0
  39. package/src/typescript/account-entry.ts +177 -0
  40. package/src/typescript/address.ts +133 -0
  41. package/src/typescript/admin-card-verification.ts +181 -0
  42. package/src/typescript/administrator.ts +375 -0
  43. package/src/typescript/anticipation.ts +187 -0
  44. package/src/typescript/asset.ts +123 -0
  45. package/src/typescript/auth.ts +84 -0
  46. package/src/typescript/bank-account.ts +157 -0
  47. package/src/typescript/card-vault.ts +92 -0
  48. package/src/typescript/card-verification.ts +93 -0
  49. package/src/typescript/card.ts +283 -0
  50. package/src/typescript/charge-schedule.ts +86 -0
  51. package/src/typescript/charge.ts +930 -0
  52. package/src/typescript/context.ts +296 -0
  53. package/src/typescript/customer.ts +425 -0
  54. package/src/typescript/daily-balance.ts +94 -0
  55. package/src/typescript/document-verification.ts +219 -0
  56. package/src/typescript/email.ts +183 -0
  57. package/src/typescript/expo-push.ts +75 -0
  58. package/src/typescript/fee.ts +131 -0
  59. package/src/typescript/location.ts +96 -0
  60. package/src/typescript/notification.ts +372 -0
  61. package/src/typescript/order.ts +311 -0
  62. package/src/typescript/payable.ts +414 -0
  63. package/src/typescript/payer.ts +68 -0
  64. package/src/typescript/payment-calculator.ts +252 -0
  65. package/src/typescript/payment-card.ts +290 -0
  66. package/src/typescript/payment-gateway.ts +209 -0
  67. package/src/typescript/payment-pix.ts +170 -0
  68. package/src/typescript/receipt.ts +344 -0
  69. package/src/typescript/recipient-payment-gateway.ts +209 -0
  70. package/src/typescript/recipient.ts +413 -0
  71. package/src/typescript/role.ts +144 -0
  72. package/src/typescript/sms.ts +96 -0
  73. package/src/typescript/tax.ts +463 -0
  74. package/src/typescript/transfer.ts +260 -0
  75. package/src/typescript/two-factor.ts +177 -0
  76. package/src/typescript/user.ts +413 -0
  77. package/src/typescript/wallet.ts +63 -0
  78. package/src/user.proto +214 -0
  79. package/src/wallet.proto +18 -0
@@ -0,0 +1,40 @@
1
+ syntax = "proto3";
2
+
3
+ package location;
4
+
5
+ service LocationService {
6
+ rpc GetCities (GetCitiesRequest) returns (GetCitiesResponse);
7
+ rpc GetStates (GetStatesRequest) returns (GetStatesResponse);
8
+
9
+ }
10
+
11
+ message State {
12
+ string id = 1;
13
+ string code = 2;
14
+ string name = 3;
15
+ int32 nationalCode = 4;
16
+ repeated City cities = 5;
17
+ }
18
+
19
+ message City {
20
+ string id = 1;
21
+ string name = 2;
22
+ int32 nationalCode = 3;
23
+ bool active = 4;
24
+ State state = 5;
25
+ }
26
+
27
+ message GetCitiesRequest {
28
+ int32 nationalCode = 1;
29
+ }
30
+
31
+ message GetCitiesResponse {
32
+ repeated City cities = 1;
33
+ }
34
+
35
+ message GetStatesRequest {}
36
+
37
+ message GetStatesResponse {
38
+ repeated State states = 1;
39
+ }
40
+
@@ -0,0 +1,207 @@
1
+ syntax = "proto3";
2
+
3
+ package notification;
4
+
5
+ service NotificationService {
6
+ rpc CreateNotification(CreateNotificationRequest) returns (NotificationResponse);
7
+ rpc GetNotificationById(GetNotificationByIdRequest) returns (NotificationResponse);
8
+ rpc GetAllNotifications(GetAllNotificationsRequest) returns (NotificationsResponse);
9
+ rpc CountUnreadNotifications(CountUnreadNotificationsRequest) returns (CountUnreadNotificationsResponse);
10
+ rpc MarkAsRead(MarkAsReadRequest) returns (MarkAsReadResponse);
11
+
12
+ rpc CreateSecurityNotification(CreateSecurityNotificationRequest) returns (NotificationResponse);
13
+ rpc CreatePasswordChangedNotification(CreatePasswordChangedNotificationRequest) returns (NotificationResponse);
14
+ rpc CreateMaintenanceNotification(CreateMaintenanceNotificationRequest) returns (NotificationResponse);
15
+ rpc CreateTermsUpdatedNotification(CreateTermsUpdatedNotificationRequest) returns (NotificationResponse);
16
+ rpc CreateProfileUpdatedNotification(CreateProfileUpdatedNotificationRequest) returns (NotificationResponse);
17
+ rpc GetNotificationStatus(GetNotificationStatusRequest) returns (GetNotificationStatusResponse);
18
+ }
19
+
20
+ message GetAllNotificationsDto {
21
+ string recipientId = 1;
22
+ string recipientType = 2;
23
+ repeated int32 severities = 3;
24
+ optional bool isRead = 4;
25
+ }
26
+
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
+ message NotificationChange {
38
+ string field = 1;
39
+ string oldValue = 2;
40
+ string newValue = 3;
41
+ }
42
+
43
+ message ChangePoint {
44
+ string title = 1;
45
+ string description = 2;
46
+ }
47
+
48
+ message NotificationMetadata {
49
+ optional string actionLabel = 1;
50
+ optional string url = 2;
51
+
52
+ optional string deviceInfo = 3;
53
+ optional string location = 4;
54
+ optional string eventDate = 5;
55
+ optional string securityAction = 6;
56
+
57
+ repeated NotificationChange changes = 7;
58
+
59
+ optional string startDate = 8;
60
+ optional string endDate = 9;
61
+ optional string impactDescription = 10;
62
+
63
+ optional string updateReason = 11;
64
+ repeated ChangePoint changePoints = 12;
65
+
66
+ optional string userId = 13;
67
+ optional string scheduledPaymentDate = 14;
68
+ optional double paymentAmount = 15;
69
+ optional string paymentStatus = 16;
70
+ optional string paymentMethod = 17;
71
+ optional string chargeId = 18;
72
+ optional string receiptId = 19;
73
+ optional string taxId = 20;
74
+
75
+ map<string, string> params = 21;
76
+ optional string actionButtonVariant = 22;
77
+ optional string callToAction = 23;
78
+ }
79
+
80
+ message Notification {
81
+ string id = 1;
82
+ string title = 2;
83
+ string description = 3;
84
+ bool isRead = 4;
85
+ int32 severity = 5;
86
+ string createdAt = 6;
87
+ string updatedAt = 7;
88
+ string category = 8;
89
+ string recipientType = 9;
90
+ string recipientId = 10;
91
+ optional string imageUrl = 11;
92
+ optional string imageType = 12;
93
+ optional NotificationMetadata meta = 13;
94
+ }
95
+
96
+ message CreateNotificationRequest {
97
+ string recipientId = 1;
98
+ string recipientType = 2;
99
+ string title = 3;
100
+ string description = 4;
101
+ optional int32 severity = 5;
102
+ optional string category = 6;
103
+ optional NotificationMetadata meta = 7;
104
+ optional bool isRead = 8;
105
+ optional string imageUrl = 9;
106
+ optional string imageType = 10;
107
+ }
108
+
109
+ message NotificationResponse {
110
+ Notification notification = 1;
111
+ }
112
+
113
+ message GetNotificationByIdRequest {
114
+ string recipientId = 1;
115
+ string recipientType = 2;
116
+ string id = 3;
117
+ }
118
+
119
+ message GetAllNotificationsRequest {
120
+ GetAllNotificationsDto data = 1;
121
+ DateFilter dateFilter = 2;
122
+ PaginationFilter pagination = 3;
123
+ }
124
+
125
+ message NotificationsResponse {
126
+ repeated Notification notifications = 1;
127
+ int32 count = 2;
128
+ }
129
+
130
+ message CountUnreadNotificationsRequest {
131
+ string recipientId = 1;
132
+ string recipientType = 2;
133
+ }
134
+
135
+ message CountUnreadNotificationsResponse {
136
+ int32 countNotRead = 1;
137
+ }
138
+
139
+ message MarkAsReadRequest {
140
+ string recipientId = 1;
141
+ string recipientType = 2;
142
+ string notificationId = 3;
143
+ }
144
+
145
+ message MarkAsReadResponse {
146
+ bool success = 1;
147
+ }
148
+
149
+
150
+ message CreateSecurityNotificationRequest {
151
+ string recipientId = 1;
152
+ string recipientType = 2;
153
+ optional string deviceInfo = 3;
154
+ optional string location = 4;
155
+ string eventDate = 5;
156
+ optional string imageUrl = 6;
157
+ optional string imageType = 7;
158
+ }
159
+
160
+ message CreatePasswordChangedNotificationRequest {
161
+ string recipientId = 1;
162
+ string recipientType = 2;
163
+ optional string deviceInfo = 3;
164
+ optional string location = 4;
165
+ string eventDate = 5;
166
+ optional string imageUrl = 6;
167
+ optional string imageType = 7;
168
+ }
169
+
170
+ message CreateMaintenanceNotificationRequest {
171
+ string recipientId = 1;
172
+ string recipientType = 2;
173
+ string startDate = 3;
174
+ string endDate = 4;
175
+ string impactDescription = 5;
176
+ optional string imageUrl = 6;
177
+ optional string imageType = 7;
178
+ }
179
+
180
+ message CreateTermsUpdatedNotificationRequest {
181
+ string recipientId = 1;
182
+ string recipientType = 2;
183
+ string updateReason = 3;
184
+ repeated ChangePoint changePoints = 4;
185
+ optional string imageUrl = 5;
186
+ optional string imageType = 6;
187
+ }
188
+
189
+ message CreateProfileUpdatedNotificationRequest {
190
+ string recipientId = 1;
191
+ string recipientType = 2;
192
+ repeated NotificationChange changes = 3;
193
+ optional string imageUrl = 4;
194
+ optional string imageType = 5;
195
+ }
196
+
197
+ message GetNotificationStatusRequest {
198
+ string recipientId = 1;
199
+ string recipientType = 2;
200
+ }
201
+
202
+ message GetNotificationStatusResponse {
203
+ bool hasCritical = 1;
204
+ bool hasUpdates = 2;
205
+ bool allCriticalRead = 3;
206
+ bool allUpdatesRead = 4;
207
+ }
@@ -0,0 +1,189 @@
1
+ syntax = "proto3";
2
+
3
+ package order;
4
+
5
+ service OrderService {
6
+ rpc CreateOrder(CreateOrderRequest) returns (Order);
7
+ rpc GetOrderById(GetOrderByIdRequest) returns (Order);
8
+ rpc GetAllOrders(GetAllOrdersRequest) returns (GetAllOrdersResponse);
9
+ rpc CreateOrderItems(CreateOrderItemsRequest) returns (Void);
10
+ rpc GetReceiptsByOrderId(GetReceiptsByOrderIdRequest) returns (GetReceiptsByOrderIdResponse);
11
+ rpc updateOrderStatus(updateOrderStatusRequest) returns (Order);
12
+
13
+ rpc GetOrderCustomerName(GetOrderByIdRequest) returns (GetOrderCustomerNameResponse);
14
+ rpc updateOrderWithChargeId(updateOrderWithChargeIdRequest) returns (Void);
15
+ rpc updateOrderAmountAndStatus (UpdateOrderAmountAndStatusRequest) returns (Order);
16
+ rpc GetDetailedOrder(GetOrderByIdRequest) returns (DetailedOrderResponse);
17
+ }
18
+
19
+ message CreateOrderRequest {
20
+ string customerId = 1;
21
+ double totalAmount = 2;
22
+ string orderType = 3;
23
+ }
24
+
25
+ message GetOrderByIdRequest {
26
+ string id = 1;
27
+ optional string orderType = 2;
28
+ }
29
+
30
+ message GetAllOrdersRequest {
31
+ optional string recipientId = 1;
32
+ repeated string statuses = 2;
33
+ 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;
46
+ }
47
+
48
+ message GetAllOrdersResponse {
49
+ repeated Order orders = 1;
50
+ int32 count = 2;
51
+ }
52
+
53
+ message CreateOrderItemsRequest {
54
+ Order order = 1;
55
+ repeated string taxIds = 2;
56
+ string orderType = 3;
57
+ }
58
+
59
+ message GetReceiptsByOrderIdRequest {
60
+ string orderId = 1;
61
+ string orderType = 3;
62
+ }
63
+
64
+ message GetReceiptsByOrderIdResponse {
65
+ repeated ReceiptEntity receipts = 1;
66
+ }
67
+
68
+ message updateOrderStatusRequest {
69
+ string orderId = 1;
70
+ string orderStatus = 2;
71
+ string orderType = 3;
72
+ }
73
+
74
+ message HealthCheckRequest {}
75
+ message HealthCheckResponse {
76
+ string status = 1;
77
+ map<string, string> details = 2;
78
+ }
79
+
80
+ message Void {}
81
+
82
+ message Order {
83
+ string id = 1;
84
+ double totalAmount = 2;
85
+ string status = 3;
86
+ string createdAt = 4;
87
+ string updatedAt = 5;
88
+ repeated string chargeIds = 6;
89
+ string customerId = 7;
90
+ repeated OrderItem items = 8;
91
+ OrderSchedule orderSchedule = 9;
92
+ optional string type = 10;
93
+ }
94
+
95
+ message OrderSchedule {
96
+ string id = 1;
97
+ double totalAmount = 2;
98
+ string status = 3;
99
+ string createdAt = 4;
100
+ string updatedAt = 5;
101
+ repeated string chargeIds = 6;
102
+ string customerId = 7;
103
+ repeated OrderItem items = 8;
104
+ Order order = 9;
105
+ }
106
+
107
+ message OrderItem {
108
+ string id = 1;
109
+ Order order = 2;
110
+ OrderSchedule orderSchedule = 3;
111
+ string recipientId = 4;
112
+ string taxId = 5;
113
+ }
114
+
115
+ message ReceiptEntity {
116
+ string id = 1;
117
+ string customerId = 2;
118
+ double amount = 3;
119
+ string protocol = 4;
120
+ optional string txid = 5;
121
+ string createdAt = 6;
122
+ }
123
+
124
+ message GetOrderCustomerNameResponse {
125
+ string customerName = 1;
126
+ }
127
+
128
+ message updateOrderWithChargeIdRequest {
129
+ string orderId = 1;
130
+ string chargeId = 2;
131
+ string orderType = 3;
132
+ }
133
+
134
+ message UpdateOrderAmountAndStatusRequest {
135
+ string id = 1;
136
+ string orderType = 2;
137
+ double totalAmount = 3;
138
+ optional string status = 4;
139
+ }
140
+
141
+ message OrderDetail {
142
+ string id = 1;
143
+ double totalAmount = 2;
144
+ string status = 3;
145
+ string createdAt = 4;
146
+ string updatedAt = 5;
147
+ repeated string chargeIds = 6;
148
+ string customerId = 7;
149
+ string type = 8;
150
+ }
151
+
152
+ message OrderPayments {
153
+ double totalPaid = 1;
154
+ double totalPending = 2;
155
+ optional string nextPaymentDate = 3;
156
+ optional string paymentMethod = 4;
157
+ string customerName = 5;
158
+ }
159
+
160
+ message DetailedTax {
161
+ string id = 1;
162
+ string type = 2;
163
+ string description = 3;
164
+ double amount = 4;
165
+ int32 year = 5;
166
+ string documentId = 6;
167
+ }
168
+
169
+ message DetailedRecipient {
170
+ string id = 1;
171
+ string code = 2;
172
+ string commercialName = 3;
173
+ string socialReason = 4;
174
+ }
175
+
176
+ message DetailedOrderItem {
177
+ string id = 1;
178
+ string recipientId = 2;
179
+ string taxId = 3;
180
+ optional DetailedTax taxDetails = 4;
181
+ optional DetailedRecipient recipientDetails = 5;
182
+ optional string recipientName = 6;
183
+ }
184
+
185
+ message DetailedOrderResponse {
186
+ OrderDetail order = 1;
187
+ repeated DetailedOrderItem items = 2;
188
+ OrderPayments payments = 3;
189
+ }
@@ -0,0 +1,246 @@
1
+ syntax = "proto3";
2
+
3
+ package payable;
4
+
5
+ service PayableService {
6
+ rpc CreatePayable (CreatePayableRequest) returns (PayableResponse);
7
+ rpc GetPayablesByChargeId (GetPayablesByChargeIdRequest) returns (GetPayablesByChargeIdResponse);
8
+ rpc GetPayableById (GetPayableByIdRequest) returns (PayableResponse);
9
+ rpc GetPayablesByRecipientId (GetPayablesByRecipientIdRequest) returns (GetPayablesByRecipientIdResponse);
10
+
11
+ rpc UpdatePayablesStatus (UpdatePayablesStatusRequest) returns (UpdatePayablesStatusResponse);
12
+ rpc GetPayablesAvailableForAnticipation (GetPayablesAvailableForAnticipationRequest) returns (GetPayablesAvailableForAnticipationResponse);
13
+ rpc MarkPayableAsAnticipated (MarkPayableAsAnticipatedRequest) returns (PayableResponse);
14
+ rpc DeletePayable (DeletePayableRequest) returns (DeletePayableResponse);
15
+ rpc GetAllPayables (GetAllPayablesRequest) returns (GetAllPayablesResponse);
16
+ rpc GetPayablesSummary (GetPayablesSummaryRequest) returns (GetPayablesSummaryResponse);
17
+ rpc GetPayableDetails (GetPayableDetailsRequest) returns (GetPayableDetailsResponse);
18
+ rpc ForceTransfer (ForceTransferRequest) returns (PayableResponse);
19
+ rpc ForceAnticipation (ForceAnticipationRequest) returns (PayableResponse);
20
+ }
21
+
22
+ message CreatePayableRequest {
23
+ double amount = 1;
24
+ string chargeId = 2;
25
+ string recipientId = 3;
26
+ int32 installment = 4;
27
+ string dueAt = 5;
28
+ string status = 6;
29
+ }
30
+
31
+ message PayableResponse {
32
+ Payable payable = 1;
33
+ }
34
+
35
+ message GetPayablesByChargeIdRequest {
36
+ string chargeId = 1;
37
+ }
38
+
39
+ message GetPayablesByChargeIdResponse {
40
+ repeated Payable payables = 1;
41
+ }
42
+
43
+ message Payable {
44
+ string id = 1;
45
+ double amount = 2;
46
+ int32 installment = 3;
47
+ string status = 4;
48
+ string dueAt = 5;
49
+ string createdAt = 6;
50
+ bool isAnticipated = 7;
51
+ Anticipation anticipation = 8;
52
+ optional string chargeId = 9;
53
+ optional string recipientId = 10;
54
+ optional string processedAt = 11;
55
+ }
56
+
57
+ message Anticipation {
58
+ string id = 1;
59
+ string createdAt = 2;
60
+ }
61
+
62
+ message GetPayableByIdRequest {
63
+ string payableId = 1;
64
+ }
65
+
66
+ message GetPayablesByRecipientIdRequest {
67
+ string recipientId = 1;
68
+ optional string startDate = 2;
69
+ optional string endDate = 3;
70
+ }
71
+
72
+ message GetPayablesByRecipientIdResponse {
73
+ repeated RecipientPayable payables = 1;
74
+ }
75
+
76
+ message RecipientPayable {
77
+ string customer = 1;
78
+ int32 installment = 2;
79
+ int32 installmentNumber = 3;
80
+ string dueAt = 4;
81
+ string paymentMethod = 5;
82
+ double amount = 6;
83
+ double fee = 7;
84
+ double netAmount = 8;
85
+ string chargeId = 9;
86
+ string payableId = 10;
87
+ }
88
+
89
+
90
+ message UpdatePayablesStatusRequest {
91
+ repeated string payableIds = 1;
92
+ string status = 2;
93
+ }
94
+
95
+ message UpdatePayablesStatusResponse {
96
+ int32 affected = 1;
97
+ }
98
+
99
+ message GetPayablesAvailableForAnticipationRequest {
100
+ string recipientId = 1;
101
+ }
102
+
103
+ message GetPayablesAvailableForAnticipationResponse {
104
+ repeated Payable payables = 1;
105
+ }
106
+
107
+ message MarkPayableAsAnticipatedRequest {
108
+ string payableId = 1;
109
+ }
110
+
111
+ message DeletePayableRequest {
112
+ string id = 1;
113
+ }
114
+
115
+ message DeletePayableResponse {
116
+ int32 affected = 1;
117
+ }
118
+
119
+ message GetAllPayablesRequest {
120
+ optional GetAllPayablesData data = 1;
121
+ PaginationFilter pagination = 2;
122
+ DateFilter date = 3;
123
+ }
124
+
125
+ message GetAllPayablesData {
126
+ optional string recipientId = 1;
127
+ repeated string statuses = 2;
128
+ optional bool isAnticipated = 3;
129
+ }
130
+
131
+ message PaginationFilter {
132
+ int32 limit = 1;
133
+ int32 offset = 2;
134
+ }
135
+
136
+ message DateFilter {
137
+ optional string startDate = 1;
138
+ optional string endDate = 2;
139
+ }
140
+
141
+ message GetAllPayablesResponse {
142
+ repeated PayableWithDetails payables = 1;
143
+ int32 count = 2;
144
+ }
145
+
146
+ message PayableWithDetails {
147
+ string id = 1;
148
+ optional string customer = 2;
149
+ int32 installment = 3;
150
+ optional int32 totalInstallments = 4;
151
+ string dueDate = 5;
152
+ optional string paymentMethod = 6;
153
+ double amount = 7;
154
+ optional double fee = 8;
155
+ string status = 9;
156
+ bool isAnticipated = 10;
157
+ string createdAt = 11;
158
+ optional string processedAt = 12;
159
+ optional Anticipation anticipation = 13;
160
+ optional Transfer transfer = 14;
161
+ string chargeId = 15;
162
+ string recipientId = 16;
163
+ }
164
+
165
+ message Transfer {
166
+ string id = 1;
167
+ string status = 2;
168
+ string createdAt = 3;
169
+ }
170
+
171
+ message GetPayablesSummaryRequest {
172
+ string recipientId = 1;
173
+ optional string startDate = 2;
174
+ optional string endDate = 3;
175
+ }
176
+
177
+ message GetPayablesSummaryResponse {
178
+ PayablesSummary summary = 1;
179
+ }
180
+
181
+ message PayablesSummary {
182
+ double totalAmount = 1;
183
+ double pendingAmount = 2;
184
+ double transferredAmount = 3;
185
+ double anticipatedAmount = 4;
186
+ int32 payablesCount = 5;
187
+ int32 pendingCount = 6;
188
+ int32 transferredCount = 7;
189
+ int32 anticipatedCount = 8;
190
+ }
191
+
192
+ message GetPayableDetailsRequest {
193
+ string payableId = 1;
194
+ }
195
+
196
+ message GetPayableDetailsResponse {
197
+ PayableDetails payableDetails = 1;
198
+ }
199
+
200
+ message PayableDetails {
201
+ Payable payable = 1;
202
+ optional AnticipationDetails anticipation = 2;
203
+ optional TransferDetails transfer = 3;
204
+ optional ChargeDetails charge = 4;
205
+ optional string customer = 5;
206
+ }
207
+
208
+ message AnticipationDetails {
209
+ string id = 1;
210
+ double amount = 2;
211
+ double fee = 3;
212
+ double baseFee = 4;
213
+ double feePercentage = 5;
214
+ int32 anticipatedDays = 6;
215
+ string status = 7;
216
+ string externalId = 8;
217
+ string createdAt = 9;
218
+ string updatedAt = 10;
219
+ }
220
+
221
+ message TransferDetails {
222
+ string id = 1;
223
+ double amount = 2;
224
+ string status = 3;
225
+ string description = 4;
226
+ string createdAt = 5;
227
+ optional string processedAt = 6;
228
+ }
229
+
230
+ message ChargeDetails {
231
+ string id = 1;
232
+ double amount = 2;
233
+ double fee = 3;
234
+ int32 installmentNumber = 4;
235
+ string paymentMethod = 5;
236
+ string status = 6;
237
+ string createdAt = 7;
238
+ }
239
+
240
+ message ForceTransferRequest {
241
+ string payableId = 1;
242
+ }
243
+
244
+ message ForceAnticipationRequest {
245
+ string payableId = 1;
246
+ }
@@ -0,0 +1,24 @@
1
+ syntax = "proto3";
2
+
3
+ package payer;
4
+
5
+ service PayerService {
6
+ rpc FindOrCreatePayer (PayerDto) returns (Payer);
7
+
8
+ }
9
+
10
+ message PayerDto {
11
+ optional string id = 1;
12
+ string name = 2;
13
+ string document = 3;
14
+ optional string phone = 4;
15
+ }
16
+
17
+
18
+ message Payer {
19
+ string id = 1;
20
+ string name = 2;
21
+ string document = 3;
22
+ string phone = 4;
23
+ }
24
+