@alacard-project/shared 1.1.9 → 1.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.d.ts +1 -6
- package/dist/browser.js +1 -6
- package/dist/browser.js.map +1 -1
- package/dist/constants/iam.constants.d.ts +12 -0
- package/dist/constants/iam.constants.js +16 -0
- package/dist/constants/iam.constants.js.map +1 -0
- package/dist/constants/index.d.ts +4 -0
- package/dist/constants/index.js +4 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/microservices.constants.d.ts +10 -0
- package/dist/constants/microservices.constants.js +10 -0
- package/dist/constants/microservices.constants.js.map +1 -1
- package/dist/constants/orchestrator-messages.constants.d.ts +5 -0
- package/dist/constants/orchestrator-messages.constants.js +9 -0
- package/dist/constants/orchestrator-messages.constants.js.map +1 -0
- package/dist/constants/partner-messages.constants.d.ts +7 -0
- package/dist/constants/partner-messages.constants.js +11 -0
- package/dist/constants/partner-messages.constants.js.map +1 -0
- package/dist/constants/user.constants.d.ts +10 -0
- package/dist/constants/user.constants.js +14 -0
- package/dist/constants/user.constants.js.map +1 -0
- package/dist/contracts/card.contract.d.ts +38 -0
- package/dist/contracts/index.d.ts +1 -0
- package/dist/contracts/index.js +1 -0
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/invoice.contract.d.ts +137 -0
- package/dist/contracts/invoice.contract.js +3 -0
- package/dist/contracts/invoice.contract.js.map +1 -0
- package/dist/contracts/terminal.contract.d.ts +43 -1
- package/dist/contracts/transaction.contract.d.ts +12 -0
- package/dist/decorators/permissions.decorator.d.ts +2 -2
- package/dist/decorators/permissions.decorator.js.map +1 -1
- package/dist/decorators/roles.decorator.d.ts +1 -1
- package/dist/dto/auth.dto.d.ts +1 -0
- package/dist/dto/auth.dto.js +5 -0
- package/dist/dto/auth.dto.js.map +1 -1
- package/dist/dto/card.dto.d.ts +5 -1
- package/dist/dto/card.dto.js +20 -0
- package/dist/dto/card.dto.js.map +1 -1
- package/dist/dto/iam.dto.d.ts +24 -0
- package/dist/dto/iam.dto.js +76 -0
- package/dist/dto/iam.dto.js.map +1 -0
- package/dist/dto/index.d.ts +1 -0
- package/dist/dto/index.js +1 -0
- package/dist/dto/index.js.map +1 -1
- package/dist/dto/invoice.dto.d.ts +29 -2
- package/dist/dto/invoice.dto.js +70 -4
- package/dist/dto/invoice.dto.js.map +1 -1
- package/dist/dto/partner.dto.d.ts +29 -0
- package/dist/dto/partner.dto.js +106 -1
- package/dist/dto/partner.dto.js.map +1 -1
- package/dist/dto/transaction.dto.d.ts +7 -0
- package/dist/dto/transaction.dto.js +35 -0
- package/dist/dto/transaction.dto.js.map +1 -1
- package/dist/enums/iam.enum.d.ts +5 -0
- package/dist/enums/iam.enum.js +7 -1
- package/dist/enums/iam.enum.js.map +1 -1
- package/dist/enums/index.d.ts +1 -0
- package/dist/enums/index.js +1 -0
- package/dist/enums/index.js.map +1 -1
- package/dist/enums/job.enum.d.ts +6 -1
- package/dist/enums/job.enum.js +5 -0
- package/dist/enums/job.enum.js.map +1 -1
- package/dist/enums/partner.enum.d.ts +5 -0
- package/dist/enums/partner.enum.js +10 -0
- package/dist/enums/partner.enum.js.map +1 -0
- package/dist/enums/permission.enum.d.ts +1 -1
- package/dist/enums/permission.enum.js +20 -20
- package/dist/enums/permission.enum.js.map +1 -1
- package/dist/filters/global-exception.filter.d.ts +1 -1
- package/dist/index.d.ts +3 -9
- package/dist/index.js +3 -9
- package/dist/index.js.map +1 -1
- package/dist/middleware/prisma-logging.middleware.d.ts +1 -1
- package/dist/resilience/circuit-breaker.service.js +6 -0
- package/dist/resilience/circuit-breaker.service.js.map +1 -1
- package/dist/resilience/redis-throttler-storage.d.ts +11 -0
- package/dist/resilience/redis-throttler-storage.js +76 -0
- package/dist/resilience/redis-throttler-storage.js.map +1 -0
- package/dist/resilience/resilience.module.js +3 -2
- package/dist/resilience/resilience.module.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/client.types.d.ts +8 -0
- package/dist/types/client.types.js +3 -0
- package/dist/types/client.types.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/orchestrator.types.d.ts +24 -0
- package/dist/types/orchestrator.types.js +3 -0
- package/dist/types/orchestrator.types.js.map +1 -0
- package/dist/utils/app.utils.js +62 -2
- package/dist/utils/app.utils.js.map +1 -1
- package/dist/utils/grpc-tracing.interceptor.d.ts +3 -1
- package/dist/utils/grpc-tracing.interceptor.js +20 -2
- package/dist/utils/grpc-tracing.interceptor.js.map +1 -1
- package/dist/utils/health.utils.d.ts +1 -1
- package/dist/utils/proto-path.js +14 -7
- package/dist/utils/proto-path.js.map +1 -1
- package/dist/utils/tracing.service.js +5 -1
- package/dist/utils/tracing.service.js.map +1 -1
- package/dist/utils/tracing.utils.js +40 -1
- package/dist/utils/tracing.utils.js.map +1 -1
- package/package.json +16 -4
- package/proto/account.proto +0 -32
- package/proto/attachment.proto +0 -12
- package/proto/auth.proto +0 -152
- package/proto/card.proto +0 -140
- package/proto/client.proto +0 -99
- package/proto/config.proto +0 -39
- package/proto/dbf.proto +0 -183
- package/proto/iam.proto +0 -70
- package/proto/logging.proto +0 -153
- package/proto/notification.proto +0 -44
- package/proto/partner.proto +0 -68
- package/proto/terminal.proto +0 -34
- package/proto/transaction.proto +0 -95
- package/proto/user.proto +0 -137
- package/proto/wallet.proto +0 -138
package/proto/notification.proto
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package notification;
|
|
4
|
-
|
|
5
|
-
service NotificationService {
|
|
6
|
-
rpc SendSync (NotificationRequest) returns (NotificationResponse);
|
|
7
|
-
rpc GetUserNotifications (GetUserNotificationsRequest) returns (GetUserNotificationsResponse);
|
|
8
|
-
rpc MarkAsRead (MarkAsReadRequest) returns (NotificationResponse);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
message NotificationRequest {
|
|
12
|
-
string recipient = 1;
|
|
13
|
-
string type = 2; // email, sms, push, in_app
|
|
14
|
-
string template = 3;
|
|
15
|
-
map<string, string> payload = 4;
|
|
16
|
-
string priority = 5; // high, normal, low
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
message NotificationResponse {
|
|
20
|
-
bool success = 1;
|
|
21
|
-
string message = 2;
|
|
22
|
-
string notification_id = 3;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
message GetUserNotificationsRequest {
|
|
26
|
-
string user_id = 1;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
message NotificationItem {
|
|
30
|
-
string id = 1;
|
|
31
|
-
string type = 2;
|
|
32
|
-
string title = 3;
|
|
33
|
-
string message = 4;
|
|
34
|
-
bool is_read = 5;
|
|
35
|
-
string created_at = 6;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
message GetUserNotificationsResponse {
|
|
39
|
-
repeated NotificationItem notifications = 1;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
message MarkAsReadRequest {
|
|
43
|
-
string notification_id = 1;
|
|
44
|
-
}
|
package/proto/partner.proto
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package partner;
|
|
4
|
-
|
|
5
|
-
service PartnerService {
|
|
6
|
-
rpc Create (CreatePartnerRequest) returns (PartnerResponse);
|
|
7
|
-
rpc FindAll (FindAllPartnersRequest) returns (PartnersListResponse);
|
|
8
|
-
rpc FindOne (FindOneRequest) returns (PartnerResponse);
|
|
9
|
-
rpc Update (UpdatePartnerRequest) returns (PartnerResponse);
|
|
10
|
-
rpc Remove (FindOneRequest) returns (RemovePartnerResponse);
|
|
11
|
-
rpc GetStats (GetStatsRequest) returns (PartnerStatsResponse);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
message CreatePartnerRequest {
|
|
15
|
-
string name = 1;
|
|
16
|
-
string type = 2;
|
|
17
|
-
string email = 3;
|
|
18
|
-
string phone = 4;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
message UpdatePartnerRequest {
|
|
22
|
-
string id = 1;
|
|
23
|
-
string name = 2;
|
|
24
|
-
string status = 3;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
message FindAllPartnersRequest {
|
|
28
|
-
int32 page = 1;
|
|
29
|
-
int32 limit = 2;
|
|
30
|
-
string search = 3;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
message FindOneRequest {
|
|
34
|
-
string id = 1;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
message GetStatsRequest {}
|
|
38
|
-
|
|
39
|
-
message PartnerResponse {
|
|
40
|
-
string id = 1;
|
|
41
|
-
string name = 2;
|
|
42
|
-
string bin = 3;
|
|
43
|
-
string type = 4;
|
|
44
|
-
string status = 5;
|
|
45
|
-
string contactPerson = 6;
|
|
46
|
-
string phone = 7;
|
|
47
|
-
string email = 8;
|
|
48
|
-
string address = 9;
|
|
49
|
-
double commission = 10;
|
|
50
|
-
double balance = 11;
|
|
51
|
-
string createdAt = 12;
|
|
52
|
-
string updatedAt = 13;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
message PartnersListResponse {
|
|
56
|
-
repeated PartnerResponse partners = 1;
|
|
57
|
-
int32 total = 2;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
message RemovePartnerResponse {
|
|
61
|
-
bool success = 1;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
message PartnerStatsResponse {
|
|
65
|
-
int32 totalPartners = 1;
|
|
66
|
-
int32 activePartners = 2;
|
|
67
|
-
int32 pendingPartners = 3;
|
|
68
|
-
}
|
package/proto/terminal.proto
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package terminal;
|
|
4
|
-
|
|
5
|
-
service TerminalService {
|
|
6
|
-
rpc FindOne (FindOneRequest) returns (TerminalResponse);
|
|
7
|
-
rpc FindAll (Empty) returns (TerminalListResponse);
|
|
8
|
-
rpc Update (UpdateTerminalRequest) returns (TerminalResponse);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
message Empty {}
|
|
12
|
-
|
|
13
|
-
message FindOneRequest {
|
|
14
|
-
string id = 1;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
message UpdateTerminalRequest {
|
|
18
|
-
string id = 1;
|
|
19
|
-
optional bool isActive = 2;
|
|
20
|
-
optional bool supportsOnline = 3;
|
|
21
|
-
optional string model = 4;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
message TerminalResponse {
|
|
25
|
-
string id = 1;
|
|
26
|
-
string serialNumber = 2;
|
|
27
|
-
string model = 3;
|
|
28
|
-
bool isActive = 4;
|
|
29
|
-
bool supportsOnline = 5;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
message TerminalListResponse {
|
|
33
|
-
repeated TerminalResponse terminals = 1;
|
|
34
|
-
}
|
package/proto/transaction.proto
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package transaction;
|
|
4
|
-
|
|
5
|
-
service TransactionService {
|
|
6
|
-
rpc Create (CreateTransactionDto) returns (Transaction) {}
|
|
7
|
-
rpc FindAll (FindTransactionsDto) returns (TransactionsResponse) {}
|
|
8
|
-
rpc Search (SearchTransactionsDto) returns (TransactionsResult) {}
|
|
9
|
-
rpc FindOne (FindOneTransactionDto) returns (Transaction) {}
|
|
10
|
-
rpc GetStats (GetStatsRequest) returns (StatsResponse) {}
|
|
11
|
-
rpc Update (UpdateTransactionDto) returns (Transaction) {}
|
|
12
|
-
rpc Remove (FindOneTransactionDto) returns (DeleteResponse) {}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
message Transaction {
|
|
16
|
-
string id = 1;
|
|
17
|
-
string externalId = 2;
|
|
18
|
-
string cardId = 3;
|
|
19
|
-
double amount = 4;
|
|
20
|
-
string currency = 5;
|
|
21
|
-
string type = 6;
|
|
22
|
-
string status = 7;
|
|
23
|
-
string description = 8;
|
|
24
|
-
string transactionDate = 9;
|
|
25
|
-
string createdAt = 10;
|
|
26
|
-
string processingMode = 11;
|
|
27
|
-
string source = 12;
|
|
28
|
-
string terminalTxId = 13;
|
|
29
|
-
string posId = 14;
|
|
30
|
-
string updatedAt = 15;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
message CreateTransactionDto {
|
|
34
|
-
string cardId = 1;
|
|
35
|
-
double amount = 2;
|
|
36
|
-
string externalId = 3;
|
|
37
|
-
string currency = 4;
|
|
38
|
-
string description = 5;
|
|
39
|
-
string type = 6;
|
|
40
|
-
string status = 7;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
message UpdateTransactionDto {
|
|
44
|
-
string id = 1;
|
|
45
|
-
string status = 2;
|
|
46
|
-
string metadata = 3;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
message FindOneTransactionDto {
|
|
50
|
-
string id = 1;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
message FindTransactionsDto {
|
|
54
|
-
string cardId = 1;
|
|
55
|
-
int32 skip = 2;
|
|
56
|
-
int32 take = 3;
|
|
57
|
-
int32 year = 4;
|
|
58
|
-
int32 month = 5;
|
|
59
|
-
string status = 6;
|
|
60
|
-
string processingMode = 7;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
message SearchTransactionsDto {
|
|
64
|
-
repeated string cardIds = 1;
|
|
65
|
-
string clientId = 2;
|
|
66
|
-
int32 skip = 3;
|
|
67
|
-
int32 take = 4;
|
|
68
|
-
string orderBy = 5;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
message TransactionsResponse {
|
|
72
|
-
repeated Transaction transactions = 1;
|
|
73
|
-
int32 total = 2;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
message TransactionsResult {
|
|
77
|
-
repeated Transaction items = 1;
|
|
78
|
-
int32 count = 2;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
message GetStatsRequest {
|
|
82
|
-
optional string cardId = 1;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
message StatsResponse {
|
|
86
|
-
int32 total = 1;
|
|
87
|
-
int32 success = 2;
|
|
88
|
-
int32 failed = 3;
|
|
89
|
-
int32 processing = 4;
|
|
90
|
-
double totalAmount = 5;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
message DeleteResponse {
|
|
94
|
-
bool success = 1;
|
|
95
|
-
}
|
package/proto/user.proto
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package user;
|
|
4
|
-
|
|
5
|
-
service UserService {
|
|
6
|
-
rpc GetUserById(GetUserByIdRequest) returns (UserResponse);
|
|
7
|
-
rpc GetUserByEmail(GetUserByEmailRequest) returns (UserResponse);
|
|
8
|
-
rpc GetUserPermissions(GetUserPermissionsRequest) returns (PermissionsResponse);
|
|
9
|
-
rpc CreateUser(CreateUserRequest) returns (UserResponse);
|
|
10
|
-
rpc UpdateUser(UpdateUserRequest) returns (UserResponse);
|
|
11
|
-
rpc UpdateProfile(UpdateProfileRequest) returns (UserResponse);
|
|
12
|
-
rpc DeleteUser(DeleteUserRequest) returns (DeleteUserResponse);
|
|
13
|
-
rpc FindByIdentityId(FindByIdentityIdRequest) returns (UserResponse);
|
|
14
|
-
rpc FindByIdentityIds(FindByIdentityIdsRequest) returns (UserListResponse);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
message GetUserByIdRequest {
|
|
18
|
-
string userId = 1;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
message GetUserByEmailRequest {
|
|
22
|
-
string email = 1;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
message GetUserPermissionsRequest {
|
|
26
|
-
string userId = 1;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
message CreateUserRequest {
|
|
30
|
-
string email = 1;
|
|
31
|
-
string password = 2;
|
|
32
|
-
string role = 3;
|
|
33
|
-
|
|
34
|
-
// Employee Fields
|
|
35
|
-
optional string firstName = 4;
|
|
36
|
-
optional string lastName = 5;
|
|
37
|
-
optional string middleName = 6;
|
|
38
|
-
optional string position = 7;
|
|
39
|
-
optional string department = 8;
|
|
40
|
-
|
|
41
|
-
// Client Fields
|
|
42
|
-
optional string companyName = 9;
|
|
43
|
-
optional string taxId = 10;
|
|
44
|
-
optional string contactPhone = 11;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
message UpdateUserRequest {
|
|
48
|
-
string userId = 1;
|
|
49
|
-
optional string email = 2;
|
|
50
|
-
optional string role = 3;
|
|
51
|
-
optional bool isActive = 4;
|
|
52
|
-
optional string password = 5;
|
|
53
|
-
|
|
54
|
-
// Employee Fields
|
|
55
|
-
optional string firstName = 6;
|
|
56
|
-
optional string lastName = 7;
|
|
57
|
-
optional string middleName = 8;
|
|
58
|
-
optional string position = 9;
|
|
59
|
-
optional string department = 10;
|
|
60
|
-
|
|
61
|
-
// Client Fields
|
|
62
|
-
optional string companyName = 11;
|
|
63
|
-
optional string taxId = 12;
|
|
64
|
-
optional string contactPhone = 13;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
message UpdateProfileRequest {
|
|
68
|
-
string userId = 1;
|
|
69
|
-
optional string firstName = 2;
|
|
70
|
-
optional string lastName = 3;
|
|
71
|
-
optional string phone = 4;
|
|
72
|
-
optional string avatar = 5;
|
|
73
|
-
optional string companyName = 6;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
message DeleteUserRequest {
|
|
77
|
-
string userId = 1;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
message FindByIdentityIdRequest {
|
|
81
|
-
string identityId = 1;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
message FindByIdentityIdsRequest {
|
|
85
|
-
repeated string identityIds = 1;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
message UserResponse {
|
|
89
|
-
string id = 1;
|
|
90
|
-
string email = 2;
|
|
91
|
-
string role = 3;
|
|
92
|
-
bool isActive = 4;
|
|
93
|
-
string createdAt = 5;
|
|
94
|
-
string updatedAt = 6;
|
|
95
|
-
|
|
96
|
-
// Profile Fields (Shared/Employee)
|
|
97
|
-
optional string firstName = 7;
|
|
98
|
-
optional string lastName = 8;
|
|
99
|
-
optional string middleName = 9;
|
|
100
|
-
optional string shortName = 10;
|
|
101
|
-
|
|
102
|
-
// Employee Specific
|
|
103
|
-
optional string position = 11;
|
|
104
|
-
optional string department = 12;
|
|
105
|
-
optional string internalPhone = 13;
|
|
106
|
-
optional string mobilePhone = 14;
|
|
107
|
-
optional string facsimileSignature = 15;
|
|
108
|
-
|
|
109
|
-
// Client Specific
|
|
110
|
-
optional string companyName = 16;
|
|
111
|
-
optional string taxId = 17;
|
|
112
|
-
optional string address = 18;
|
|
113
|
-
optional string contactPhone = 19;
|
|
114
|
-
|
|
115
|
-
optional string avatar = 20;
|
|
116
|
-
string identityId = 21;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
message DeleteUserResponse {
|
|
120
|
-
bool success = 1;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
message UserListResponse {
|
|
124
|
-
repeated UserResponse items = 1;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
message Permission {
|
|
128
|
-
string id = 1;
|
|
129
|
-
string resource = 2;
|
|
130
|
-
string action = 3;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
message PermissionsResponse {
|
|
134
|
-
string userId = 1;
|
|
135
|
-
repeated Permission permissions = 2;
|
|
136
|
-
repeated string scopes = 3;
|
|
137
|
-
}
|
package/proto/wallet.proto
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package wallet;
|
|
4
|
-
|
|
5
|
-
service WalletService {
|
|
6
|
-
rpc GetWallet (GetWalletRequest) returns (WalletResponse);
|
|
7
|
-
rpc CreditWallet (CreditWalletRequest) returns (CreditWalletResponse);
|
|
8
|
-
rpc CreateAllocationOrder (CreateAllocationOrderRequest) returns (AllocationOrderResponse);
|
|
9
|
-
rpc GetPendingAllocations (Empty) returns (PendingAllocationsResponse);
|
|
10
|
-
rpc UpdateAllocationStatus (UpdateAllocationStatusRequest) returns (AllocationOrderResponse);
|
|
11
|
-
rpc GetTransactions (GetTransactionsRequest) returns (TransactionsResponse);
|
|
12
|
-
rpc GetAllocations (GetAllocationsRequest) returns (AllocationsResponse);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
message Empty {}
|
|
16
|
-
|
|
17
|
-
enum WalletOwnerType {
|
|
18
|
-
PARTNER = 0;
|
|
19
|
-
CLIENT = 1;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
enum AllocationStatus {
|
|
23
|
-
PENDING = 0;
|
|
24
|
-
SENT = 1;
|
|
25
|
-
SYNCED = 2;
|
|
26
|
-
FAILED = 3;
|
|
27
|
-
CANCELLED = 4;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
enum WalletTxType {
|
|
31
|
-
CREDIT = 0;
|
|
32
|
-
DEBIT = 1;
|
|
33
|
-
FREEZE = 2;
|
|
34
|
-
UNFREEZE = 3;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
message GetWalletRequest {
|
|
38
|
-
WalletOwnerType owner_type = 1;
|
|
39
|
-
string owner_id = 2;
|
|
40
|
-
string currency = 3;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
message WalletResponse {
|
|
44
|
-
string id = 1;
|
|
45
|
-
WalletOwnerType owner_type = 2;
|
|
46
|
-
string owner_id = 3;
|
|
47
|
-
string currency = 4;
|
|
48
|
-
string free_balance = 5;
|
|
49
|
-
string frozen_balance = 6;
|
|
50
|
-
string created_at = 7;
|
|
51
|
-
string updated_at = 8;
|
|
52
|
-
repeated AllocationOrderResponse recent_allocations = 9;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
message CreditWalletRequest {
|
|
56
|
-
string wallet_id = 1;
|
|
57
|
-
string amount = 2;
|
|
58
|
-
string purpose = 3;
|
|
59
|
-
string payment_ref = 4;
|
|
60
|
-
string reason = 5;
|
|
61
|
-
string reference_id = 6;
|
|
62
|
-
string created_by = 7;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
message CreditWalletResponse {
|
|
66
|
-
WalletResponse wallet = 1;
|
|
67
|
-
WalletTransactionResponse transaction = 2;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
message CreateAllocationOrderRequest {
|
|
71
|
-
string wallet_id = 1;
|
|
72
|
-
string card_id = 2;
|
|
73
|
-
string card_number = 3;
|
|
74
|
-
string amount = 4;
|
|
75
|
-
string note = 5;
|
|
76
|
-
string created_by = 6;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
message AllocationOrderResponse {
|
|
80
|
-
string id = 1;
|
|
81
|
-
string wallet_id = 2;
|
|
82
|
-
string card_id = 3;
|
|
83
|
-
string card_number = 4;
|
|
84
|
-
string amount = 5;
|
|
85
|
-
AllocationStatus status = 6;
|
|
86
|
-
string note = 7;
|
|
87
|
-
string requested_at = 8;
|
|
88
|
-
string sent_at = 9;
|
|
89
|
-
string synced_at = 10;
|
|
90
|
-
string fail_reason = 11;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
message PendingAllocationsResponse {
|
|
94
|
-
repeated AllocationOrderResponse allocations = 1;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
message UpdateAllocationStatusRequest {
|
|
98
|
-
string order_id = 1;
|
|
99
|
-
AllocationStatus status = 2;
|
|
100
|
-
string fail_reason = 3;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
message GetTransactionsRequest {
|
|
104
|
-
string wallet_id = 1;
|
|
105
|
-
int32 page = 2;
|
|
106
|
-
int32 limit = 3;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
message WalletTransactionResponse {
|
|
110
|
-
string id = 1;
|
|
111
|
-
string wallet_id = 2;
|
|
112
|
-
WalletTxType type = 3;
|
|
113
|
-
string purpose = 4;
|
|
114
|
-
string amount = 5;
|
|
115
|
-
string balance_after = 6;
|
|
116
|
-
string reason = 7;
|
|
117
|
-
string reference_id = 8;
|
|
118
|
-
string payment_ref = 9;
|
|
119
|
-
string allocation_id = 10;
|
|
120
|
-
string created_at = 11;
|
|
121
|
-
string created_by = 12;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
message TransactionsResponse {
|
|
125
|
-
repeated WalletTransactionResponse data = 1;
|
|
126
|
-
int32 total = 2;
|
|
127
|
-
int32 page = 3;
|
|
128
|
-
int32 limit = 4;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
message GetAllocationsRequest {
|
|
132
|
-
string wallet_id = 1;
|
|
133
|
-
optional AllocationStatus status = 2;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
message AllocationsResponse {
|
|
137
|
-
repeated AllocationOrderResponse data = 1;
|
|
138
|
-
}
|