@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.
- package/package.json +28 -0
- package/src/account-entry.proto +86 -0
- package/src/address.proto +64 -0
- package/src/admin-card-verification.proto +90 -0
- package/src/administrator.proto +192 -0
- package/src/anticipation.proto +86 -0
- package/src/asset.proto +44 -0
- package/src/auth.proto +29 -0
- package/src/bank-account.proto +62 -0
- package/src/card-vault.proto +36 -0
- package/src/card-verification.proto +30 -0
- package/src/card.proto +138 -0
- package/src/charge-schedule.proto +22 -0
- package/src/charge.proto +610 -0
- package/src/context.proto +174 -0
- package/src/customer.proto +234 -0
- package/src/daily-balance.proto +32 -0
- package/src/document-verification.proto +111 -0
- package/src/email.proto +76 -0
- package/src/expo-push.proto +27 -0
- package/src/fee.proto +65 -0
- package/src/location.proto +40 -0
- package/src/notification.proto +207 -0
- package/src/order.proto +189 -0
- package/src/payable.proto +246 -0
- package/src/payer.proto +24 -0
- package/src/payment-calculator.proto +165 -0
- package/src/payment-card.proto +217 -0
- package/src/payment-gateway.proto +94 -0
- package/src/payment-pix.proto +115 -0
- package/src/receipt.proto +212 -0
- package/src/recipient-payment-gateway.proto +101 -0
- package/src/recipient.proto +237 -0
- package/src/role.proto +57 -0
- package/src/sms.proto +36 -0
- package/src/tax.proto +323 -0
- package/src/transfer.proto +206 -0
- package/src/two-factor.proto +67 -0
- package/src/typescript/account-entry.ts +177 -0
- package/src/typescript/address.ts +133 -0
- package/src/typescript/admin-card-verification.ts +181 -0
- package/src/typescript/administrator.ts +375 -0
- package/src/typescript/anticipation.ts +187 -0
- package/src/typescript/asset.ts +123 -0
- package/src/typescript/auth.ts +84 -0
- package/src/typescript/bank-account.ts +157 -0
- package/src/typescript/card-vault.ts +92 -0
- package/src/typescript/card-verification.ts +93 -0
- package/src/typescript/card.ts +283 -0
- package/src/typescript/charge-schedule.ts +86 -0
- package/src/typescript/charge.ts +930 -0
- package/src/typescript/context.ts +296 -0
- package/src/typescript/customer.ts +425 -0
- package/src/typescript/daily-balance.ts +94 -0
- package/src/typescript/document-verification.ts +219 -0
- package/src/typescript/email.ts +183 -0
- package/src/typescript/expo-push.ts +75 -0
- package/src/typescript/fee.ts +131 -0
- package/src/typescript/location.ts +96 -0
- package/src/typescript/notification.ts +372 -0
- package/src/typescript/order.ts +311 -0
- package/src/typescript/payable.ts +414 -0
- package/src/typescript/payer.ts +68 -0
- package/src/typescript/payment-calculator.ts +252 -0
- package/src/typescript/payment-card.ts +290 -0
- package/src/typescript/payment-gateway.ts +209 -0
- package/src/typescript/payment-pix.ts +170 -0
- package/src/typescript/receipt.ts +344 -0
- package/src/typescript/recipient-payment-gateway.ts +209 -0
- package/src/typescript/recipient.ts +413 -0
- package/src/typescript/role.ts +144 -0
- package/src/typescript/sms.ts +96 -0
- package/src/typescript/tax.ts +463 -0
- package/src/typescript/transfer.ts +260 -0
- package/src/typescript/two-factor.ts +177 -0
- package/src/typescript/user.ts +413 -0
- package/src/typescript/wallet.ts +63 -0
- package/src/user.proto +214 -0
- package/src/wallet.proto +18 -0
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@postpaybr/protos",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "src/typescript/index.ts",
|
|
6
|
+
"types": "src/typescript/index.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"src/**/*.proto",
|
|
9
|
+
"src/typescript"
|
|
10
|
+
],
|
|
11
|
+
"exports": {
|
|
12
|
+
".": "./src/typescript/index.ts",
|
|
13
|
+
"./*.proto": "./src/*.proto",
|
|
14
|
+
"./typescript/*": "./src/typescript/*"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"generate:proto": "cross-var npx protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=src/typescript -I=src --ts_proto_opt=nestJs=true src/%npm_config_proto%.proto"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@nestjs/microservices": "^11.1.13",
|
|
21
|
+
"@postpaybr/contracts": "latest"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"cross-var": "^1.1.0",
|
|
25
|
+
"ts-proto": "^2.11.2",
|
|
26
|
+
"typescript": "^5.2.0"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package accountEntry;
|
|
4
|
+
|
|
5
|
+
service AccountEntryService {
|
|
6
|
+
rpc createAccountEntry(CreateAccountEntryRequest) returns (CreateAccountEntryResponse);
|
|
7
|
+
rpc createAccountEntries(CreateAccountEntriesRequest) returns (CreateAccountEntriesResponse);
|
|
8
|
+
rpc getEntriesByTransfer(GetEntriesByTransferRequest) returns (GetEntriesByTransferResponse);
|
|
9
|
+
rpc getEntriesByPeriod(GetEntriesByPeriodRequest) returns (GetEntriesByPeriodResponse);
|
|
10
|
+
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
message CreateAccountEntryRequest {
|
|
14
|
+
double amount = 1;
|
|
15
|
+
string type = 2;
|
|
16
|
+
string description = 3;
|
|
17
|
+
string bankAccountId = 4;
|
|
18
|
+
string recipientId = 5;
|
|
19
|
+
optional string transferId = 6;
|
|
20
|
+
optional string chargeId = 7;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message CreateAccountEntryResponse {
|
|
24
|
+
AccountEntry accountEntry = 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message CreateAccountEntriesRequest {
|
|
28
|
+
repeated CreateAccountEntryRequest entries = 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message CreateAccountEntriesResponse {
|
|
32
|
+
repeated AccountEntry accountEntries = 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message GetEntriesByTransferRequest {
|
|
36
|
+
string transferId = 1;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
message GetEntriesByTransferResponse {
|
|
40
|
+
repeated AccountEntry accountEntries = 1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
message TableFilterParams {
|
|
44
|
+
optional int32 pageIndex = 1;
|
|
45
|
+
optional int32 pageSize = 2;
|
|
46
|
+
repeated string statuses = 3;
|
|
47
|
+
optional string globalFilter = 4;
|
|
48
|
+
optional string startDate = 5;
|
|
49
|
+
optional string endDate = 6;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message GetEntriesByPeriodRequest {
|
|
53
|
+
string recipientId = 1;
|
|
54
|
+
TableFilterParams filter = 2;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message GetEntriesByPeriodResponse {
|
|
58
|
+
repeated AccountEntry accountEntries = 1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
message AccountEntry {
|
|
62
|
+
string id = 1;
|
|
63
|
+
double amount = 2;
|
|
64
|
+
string type = 3;
|
|
65
|
+
string description = 4;
|
|
66
|
+
string bankAccountId = 5;
|
|
67
|
+
string recipientId = 6;
|
|
68
|
+
optional string transferId = 7;
|
|
69
|
+
optional string chargeId = 8;
|
|
70
|
+
string createdAt = 9;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
message Charge {
|
|
74
|
+
string id = 1;
|
|
75
|
+
double amount = 2;
|
|
76
|
+
string paymentMethod = 3;
|
|
77
|
+
string txid = 4;
|
|
78
|
+
string gatewayId = 5;
|
|
79
|
+
string metadata = 6;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
message DailyBalance {
|
|
83
|
+
string date = 1;
|
|
84
|
+
double balance = 2;
|
|
85
|
+
}
|
|
86
|
+
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package address;
|
|
4
|
+
|
|
5
|
+
service AddressService {
|
|
6
|
+
rpc CreateAddress(CreateAddressDto) returns (Address);
|
|
7
|
+
rpc getAddressesByAccountId(getAddressesByAccountIdRequest) returns (AddressList);
|
|
8
|
+
rpc GetAddressById(GetAddressByIdRequest) returns (Address);
|
|
9
|
+
rpc UpdateAddress(UpdateAddressRequest) returns (Address);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
message Address {
|
|
13
|
+
string id = 1;
|
|
14
|
+
string zipCode = 3;
|
|
15
|
+
string street = 4;
|
|
16
|
+
string number = 5;
|
|
17
|
+
optional string complement = 6;
|
|
18
|
+
string neighborhood = 7;
|
|
19
|
+
string city = 8;
|
|
20
|
+
string state = 9;
|
|
21
|
+
optional string nickname = 10;
|
|
22
|
+
optional string reference = 11;
|
|
23
|
+
optional string accountId = 12;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message CreateAddressDto {
|
|
27
|
+
string state = 1;
|
|
28
|
+
string city = 2;
|
|
29
|
+
string zipCode = 3;
|
|
30
|
+
string neighborhood = 4;
|
|
31
|
+
string street = 5;
|
|
32
|
+
string number = 6;
|
|
33
|
+
optional string nickname = 7;
|
|
34
|
+
optional string complement = 8;
|
|
35
|
+
optional string reference = 9;
|
|
36
|
+
optional string accountId = 10;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
message getAddressesByAccountIdRequest {
|
|
40
|
+
string accountId = 1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
message GetAddressByIdRequest {
|
|
44
|
+
string accountId = 1;
|
|
45
|
+
string id = 2;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
message AddressList {
|
|
49
|
+
repeated Address addresses = 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message UpdateAddressRequest {
|
|
53
|
+
string id = 1;
|
|
54
|
+
optional string state = 2;
|
|
55
|
+
optional string city = 3;
|
|
56
|
+
optional string zipCode = 4;
|
|
57
|
+
optional string neighborhood = 5;
|
|
58
|
+
optional string street = 6;
|
|
59
|
+
optional string number = 7;
|
|
60
|
+
optional string nickname = 8;
|
|
61
|
+
optional string complement = 9;
|
|
62
|
+
optional string reference = 10;
|
|
63
|
+
optional string accountId = 11;
|
|
64
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package adminCardVerification;
|
|
4
|
+
|
|
5
|
+
service AdminCardVerificationService {
|
|
6
|
+
rpc initiateCardVerification(CreateCardVerificationRequest) returns (CardVerificationResponse);
|
|
7
|
+
rpc updateVerificationStatus(UpdateVerificationStatusRequest) returns (CardVerificationResponse);
|
|
8
|
+
rpc getVerificationsWithCardDetails(GetVerificationsWithCardDetailsRequest) returns (GetAllVerificationsWithDetailsResponse);
|
|
9
|
+
rpc getVerificationDetailsById(GetVerificationDetailsByIdRequest) returns (VerificationDetailsResponse);
|
|
10
|
+
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
message CreateCardVerificationRequest {
|
|
14
|
+
string customerId = 1;
|
|
15
|
+
string cardId = 2;
|
|
16
|
+
string selfieWithCardUrl = 3;
|
|
17
|
+
string challenge = 4;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
message UpdateVerificationStatusRequest {
|
|
21
|
+
string id = 1;
|
|
22
|
+
string status = 2;
|
|
23
|
+
repeated string rejectionReasons = 3;
|
|
24
|
+
optional string customRejectionReason = 4;
|
|
25
|
+
optional string reviewerId = 5;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message CardVerificationResponse {
|
|
29
|
+
string id = 1;
|
|
30
|
+
string cardId = 2;
|
|
31
|
+
string selfieWithCardUrl = 3;
|
|
32
|
+
repeated string rejectionReasons = 4;
|
|
33
|
+
string customRejectionReason = 5;
|
|
34
|
+
repeated VerificationHistory histories = 6;
|
|
35
|
+
string challenge = 7;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message GetVerificationsWithCardDetailsRequest {
|
|
39
|
+
string status = 1;
|
|
40
|
+
optional int32 offset = 2;
|
|
41
|
+
optional int32 limit = 3;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
message GetAllVerificationsWithDetailsResponse {
|
|
45
|
+
repeated VerificationWithDetails verifications = 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
message VerificationWithDetails {
|
|
49
|
+
string id = 1;
|
|
50
|
+
string customerName = 2;
|
|
51
|
+
string cardNumber = 3;
|
|
52
|
+
string createdAt = 4;
|
|
53
|
+
string reviewedBy = 5;
|
|
54
|
+
string status = 6;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message VerificationHistory {
|
|
58
|
+
string id = 1;
|
|
59
|
+
string status = 2;
|
|
60
|
+
string reviewerId = 3;
|
|
61
|
+
string createdAt = 4;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
message GetVerificationDetailsByIdRequest {
|
|
65
|
+
string id = 1;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
message VerificationDetailsResponse {
|
|
69
|
+
string id = 1;
|
|
70
|
+
string cardNumber = 2;
|
|
71
|
+
string cardName = 3;
|
|
72
|
+
string selfieWithCardUrl = 4;
|
|
73
|
+
string selfieWithDocumentUrl = 5;
|
|
74
|
+
string challenge = 6;
|
|
75
|
+
string status = 7;
|
|
76
|
+
repeated VerificationHistoryWithAdmin histories = 8;
|
|
77
|
+
repeated string rejectionReasons = 9;
|
|
78
|
+
string customRejectionReason = 10;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
message VerificationHistoryWithAdmin {
|
|
82
|
+
string id = 1;
|
|
83
|
+
string status = 2;
|
|
84
|
+
string reviewerId = 3;
|
|
85
|
+
string createdAt = 4;
|
|
86
|
+
string reviewedBy = 5;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
message Empty {}
|
|
90
|
+
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package administrator;
|
|
4
|
+
|
|
5
|
+
service AdministratorService {
|
|
6
|
+
rpc CreateAdministrator(CreateAdministratorRequest) returns (AdministratorResponse);
|
|
7
|
+
rpc GetAdministratorById(GetAdministratorByIdRequest) returns (AdministratorResponse);
|
|
8
|
+
rpc UpdateAdministrator(UpdateAdministratorRequest) returns (AdministratorResponse);
|
|
9
|
+
rpc GetAllAdministrators(GetAllAdministratorsRequest) returns (GetAllAdministratorsResponse);
|
|
10
|
+
rpc ValidateAndSignIn(ValidateAndSignInRequest) returns (ValidateAndSignInResponse);
|
|
11
|
+
rpc VerifyTwoFactorAuthentication(VerifyTwoFactorAuthenticationRequest) returns (VerifyTwoFactorAuthenticationResponse);
|
|
12
|
+
rpc RefreshAccessToken(RefreshTokenRequest) returns (RefreshTokenResponse);
|
|
13
|
+
rpc handleAdministratorChangePassword(handleAdministratorChangePasswordRequest) returns (handleAdministratorChangePasswordResponse);
|
|
14
|
+
rpc ResendVerificationEmail(ResendVerificationEmailRequest) returns (Void);
|
|
15
|
+
rpc ChangeAdministratorStatus(ChangeAdministratorStatusRequest) returns (ChangeAdministratorStatusResponse);
|
|
16
|
+
rpc initiateAdministratorChangePassword(initiateAdministratorChangePasswordRequest) returns (initiateAdministratorChangePasswordResponse);
|
|
17
|
+
rpc GetAdministratorName(GetAdministratorNameRequest) returns (GetAdministratorNameResponse);
|
|
18
|
+
|
|
19
|
+
rpc GetAdministratorsByRecipient(GetAdministratorsByRecipientRequest) returns (GetAdministratorsByRecipientResponse);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message CreateAdministratorRequest {
|
|
23
|
+
string firstName = 1;
|
|
24
|
+
string lastName = 2;
|
|
25
|
+
string email = 3;
|
|
26
|
+
repeated string roleIds = 4;
|
|
27
|
+
string recipientId = 5;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
message GetAdministratorByIdRequest {
|
|
31
|
+
string id = 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message AdministratorResponse {
|
|
35
|
+
string id = 1;
|
|
36
|
+
string firstName = 2;
|
|
37
|
+
string lastName = 3;
|
|
38
|
+
string document = 4;
|
|
39
|
+
string email = 5;
|
|
40
|
+
bool isAccessRestricted = 6;
|
|
41
|
+
repeated Role roles = 7;
|
|
42
|
+
optional string status = 8;
|
|
43
|
+
bool isSuperAdmin = 9;
|
|
44
|
+
string recipientId = 10;
|
|
45
|
+
string userId = 11;
|
|
46
|
+
optional bool twoFactorEnabled = 12;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message UpdateAdministratorRequest {
|
|
50
|
+
string id = 1;
|
|
51
|
+
optional string firstName = 2;
|
|
52
|
+
optional string lastName = 3;
|
|
53
|
+
optional string email = 4;
|
|
54
|
+
repeated string roleIds = 5;
|
|
55
|
+
optional string document = 6;
|
|
56
|
+
optional string status = 7;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
message Role {
|
|
60
|
+
string id = 1;
|
|
61
|
+
string code = 2;
|
|
62
|
+
string description = 3;
|
|
63
|
+
repeated string permissions = 4;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
message GetAllAdministratorsRequest {}
|
|
67
|
+
|
|
68
|
+
message GetAllAdministratorsResponse {
|
|
69
|
+
repeated AdministratorResponse administrators = 1;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
message ValidateAndSignInRequest {
|
|
73
|
+
string email = 1;
|
|
74
|
+
string password = 2;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
message Tokens {
|
|
78
|
+
string accessToken = 1;
|
|
79
|
+
string refreshToken = 2;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
message UserInfo {
|
|
83
|
+
string id = 1;
|
|
84
|
+
string email = 2;
|
|
85
|
+
string name = 3;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
message ValidateAndSignInResponse {
|
|
89
|
+
oneof response {
|
|
90
|
+
SuccessResponse success = 1;
|
|
91
|
+
TwoFactorRequiredResponse twoFactorRequired = 2;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
message SuccessResponse {
|
|
96
|
+
Tokens tokens = 1;
|
|
97
|
+
AdministratorResponse administrator = 2;
|
|
98
|
+
Recipient recipient = 3;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
message TwoFactorRequiredResponse {
|
|
102
|
+
string administratorId = 1;
|
|
103
|
+
UserInfo user = 2;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
message VerifyTwoFactorAuthenticationRequest {
|
|
107
|
+
string administratorId = 1;
|
|
108
|
+
string token = 2;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
message VerifyTwoFactorAuthenticationResponse {
|
|
112
|
+
Tokens tokens = 1;
|
|
113
|
+
AdministratorResponse administrator = 2;
|
|
114
|
+
Recipient recipient = 3;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
message Recipient {
|
|
118
|
+
string id = 1;
|
|
119
|
+
string code = 2;
|
|
120
|
+
string commercialName = 3;
|
|
121
|
+
string socialReason = 4;
|
|
122
|
+
string holderType = 5;
|
|
123
|
+
string document = 6;
|
|
124
|
+
string cnaeId = 7;
|
|
125
|
+
string legalType = 8;
|
|
126
|
+
string contactName = 10;
|
|
127
|
+
string contactEmail = 11;
|
|
128
|
+
string contactPhone = 12;
|
|
129
|
+
bool isAutomaticAnticipationEnabled = 13;
|
|
130
|
+
string foundation = 14;
|
|
131
|
+
optional string avatarUrl = 15;
|
|
132
|
+
bool isActive = 16;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
message RefreshTokenRequest {
|
|
136
|
+
string refreshToken = 1;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
message RefreshTokenResponse {
|
|
140
|
+
string accessToken = 1;
|
|
141
|
+
string refreshToken = 2;
|
|
142
|
+
bool isAccessRestricted = 3;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
message handleAdministratorChangePasswordRequest {
|
|
146
|
+
string administratorId = 1;
|
|
147
|
+
string newPassword = 2;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
message handleAdministratorChangePasswordResponse {
|
|
151
|
+
bool isFirstChangePassword = 1;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
message ResendVerificationEmailRequest {
|
|
155
|
+
string administratorId = 1;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
message Void {}
|
|
159
|
+
|
|
160
|
+
message ChangeAdministratorStatusRequest {
|
|
161
|
+
string administratorId = 1;
|
|
162
|
+
string status = 2;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
message ChangeAdministratorStatusResponse {
|
|
166
|
+
bool success = 1;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
message initiateAdministratorChangePasswordRequest {
|
|
170
|
+
string email = 1;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
message initiateAdministratorChangePasswordResponse {
|
|
174
|
+
bool success = 1;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
message GetAdministratorNameRequest {
|
|
179
|
+
string id = 1;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
message GetAdministratorNameResponse {
|
|
183
|
+
string name = 1;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
message GetAdministratorsByRecipientRequest {
|
|
187
|
+
string recipientId = 1;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
message GetAdministratorsByRecipientResponse {
|
|
191
|
+
repeated AdministratorResponse administrators = 1;
|
|
192
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package anticipation;
|
|
4
|
+
|
|
5
|
+
service AnticipationService {
|
|
6
|
+
rpc simulateAnticipations (SimulateAnticipationsRequest) returns (SimulationResponse);
|
|
7
|
+
rpc createAnticipations (CreateAnticipationsRequest) returns (AnticipationResponse);
|
|
8
|
+
rpc getAnticipationsByRecipient (GetAnticipationsByRecipientRequest) returns (GetAnticipationsResponse);
|
|
9
|
+
rpc getAnticipation (GetAnticipationRequest) returns (Anticipation);
|
|
10
|
+
rpc updateAnticipationStatus (UpdateAnticipationStatusRequest) returns (AnticipationResponse);
|
|
11
|
+
rpc updateAnticipation (UpdateAnticipationRequest) returns (Anticipation);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message SimulateAnticipationsRequest {
|
|
15
|
+
repeated string payableIds = 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
message CreateAnticipationsRequest {
|
|
19
|
+
repeated string payableIds = 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message GetAnticipationsByRecipientRequest {
|
|
23
|
+
string recipientId = 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message GetAnticipationRequest {
|
|
27
|
+
string id = 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
message UpdateAnticipationStatusRequest {
|
|
31
|
+
string anticipationId = 1;
|
|
32
|
+
string status = 2;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message SimulationResponse {
|
|
36
|
+
int32 payableCount = 1;
|
|
37
|
+
double totalAmount = 2;
|
|
38
|
+
string recipientId = 3;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message AnticipationResponse {
|
|
42
|
+
bool success = 1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
message GetAnticipationsResponse {
|
|
46
|
+
repeated Anticipation anticipations = 1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message Anticipation {
|
|
50
|
+
string id = 1;
|
|
51
|
+
double amount = 2;
|
|
52
|
+
double fee = 4;
|
|
53
|
+
double baseFee = 5;
|
|
54
|
+
double feePercentage = 6;
|
|
55
|
+
string status = 7;
|
|
56
|
+
optional string externalId = 8;
|
|
57
|
+
optional int32 anticipatedDays = 9;
|
|
58
|
+
string createdAt = 10;
|
|
59
|
+
string updatedAt = 11;
|
|
60
|
+
Payable payable = 12;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
message Payable {
|
|
64
|
+
string id = 1;
|
|
65
|
+
double amount = 2;
|
|
66
|
+
int32 installment = 3;
|
|
67
|
+
string status = 4;
|
|
68
|
+
string dueAt = 5;
|
|
69
|
+
string createdAt = 6;
|
|
70
|
+
bool isAnticipated = 7;
|
|
71
|
+
string processedAt = 8;
|
|
72
|
+
string chargeId = 9;
|
|
73
|
+
string recipientId = 10;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
message UpdateAnticipationRequest {
|
|
77
|
+
string payableId = 1;
|
|
78
|
+
optional string externalId = 2;
|
|
79
|
+
optional string status = 3;
|
|
80
|
+
optional double amount = 4;
|
|
81
|
+
optional double netAmount = 5;
|
|
82
|
+
optional double fee = 6;
|
|
83
|
+
optional double baseFee = 7;
|
|
84
|
+
optional double feePercentage = 8;
|
|
85
|
+
optional int32 anticipatedDays = 9;
|
|
86
|
+
}
|
package/src/asset.proto
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package asset;
|
|
4
|
+
|
|
5
|
+
service AssetService {
|
|
6
|
+
rpc writeFile (WriteFileRequest) returns (WriteFileResponse);
|
|
7
|
+
rpc readFile (ReadFileRequest) returns (ReadFileResponse);
|
|
8
|
+
rpc deleteFile (DeleteFileRequest) returns (DeleteFileResponse);
|
|
9
|
+
rpc fileExists (FileExistsRequest) returns (FileExistsResponse);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
message WriteFileRequest {
|
|
13
|
+
string mimetype = 1;
|
|
14
|
+
bytes buffer = 2;
|
|
15
|
+
optional string folder = 3;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
message WriteFileResponse {
|
|
19
|
+
string filename = 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message ReadFileRequest {
|
|
23
|
+
string identifier = 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message ReadFileResponse {
|
|
27
|
+
bytes buffer = 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
message DeleteFileRequest {
|
|
31
|
+
string identifier = 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message DeleteFileResponse {
|
|
35
|
+
bool success = 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message FileExistsRequest {
|
|
39
|
+
string identifier = 1;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message FileExistsResponse {
|
|
43
|
+
bool exists = 1;
|
|
44
|
+
}
|
package/src/auth.proto
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package auth;
|
|
4
|
+
|
|
5
|
+
service AuthService {
|
|
6
|
+
rpc SignIn (SignInRequest) returns (SignInResponse);
|
|
7
|
+
rpc RefreshAccessToken (RefreshAccessTokenRequest) returns (RefreshAccessTokenResponse);
|
|
8
|
+
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
message SignInRequest {
|
|
12
|
+
string id = 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message SignInResponse {
|
|
16
|
+
string accessToken = 1;
|
|
17
|
+
string refreshToken = 2;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
message RefreshAccessTokenRequest {
|
|
21
|
+
string refreshToken = 1;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
message RefreshAccessTokenResponse {
|
|
25
|
+
string accessToken = 1;
|
|
26
|
+
string refreshToken = 2;
|
|
27
|
+
optional string accountId = 3;
|
|
28
|
+
}
|
|
29
|
+
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package bankAccount;
|
|
4
|
+
|
|
5
|
+
service BankAccountService {
|
|
6
|
+
rpc CreateBankAccount(CreateBankAccountRequest) returns (BankAccountResponse);
|
|
7
|
+
rpc GetBankAccountByRecipientId(GetBankAccountByRecipientIdRequest) returns (GetBankAccountByRecipientIdResponse);
|
|
8
|
+
rpc GetMainAccount(Void) returns (MainBankAccountResponse);
|
|
9
|
+
rpc GetAllBankAccounts(Void) returns (GetAllBankAccountsResponse);
|
|
10
|
+
rpc GetBankAccount(GetBankAccountRequest) returns (BankAccountResponse);
|
|
11
|
+
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message CreateBankAccountRequest {
|
|
15
|
+
int32 bankCompeCode = 1;
|
|
16
|
+
string agency = 2;
|
|
17
|
+
string account = 3;
|
|
18
|
+
string digitAccount = 4;
|
|
19
|
+
optional string pixKey = 5;
|
|
20
|
+
string holderType = 6;
|
|
21
|
+
string accountType = 7;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
message GetBankAccountByRecipientIdRequest {
|
|
25
|
+
string recipientId = 1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message GetBankAccountByRecipientIdResponse {
|
|
29
|
+
BankAccount bankAccount = 1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
message GetAllBankAccountsResponse {
|
|
33
|
+
repeated BankAccount bankAccount = 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message BankAccount {
|
|
37
|
+
string id = 1;
|
|
38
|
+
int32 bankCompeCode = 2;
|
|
39
|
+
string agency = 3;
|
|
40
|
+
string account = 4;
|
|
41
|
+
string digitAccount = 5;
|
|
42
|
+
double balance = 6;
|
|
43
|
+
optional string pixKey = 7;
|
|
44
|
+
string holderType = 8;
|
|
45
|
+
string accountType = 9;
|
|
46
|
+
string recipientId = 10;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message BankAccountResponse {
|
|
50
|
+
BankAccount bankAccount = 1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message Void {}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
message GetBankAccountRequest {
|
|
57
|
+
string id = 1;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
message MainBankAccountResponse {
|
|
61
|
+
BankAccount mainBankAccount = 1;
|
|
62
|
+
}
|