@alacard-project/shared 1.1.7 → 1.1.9
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 +6 -0
- package/dist/browser.js +23 -0
- package/dist/browser.js.map +1 -0
- package/dist/constants/microservices.constants.d.ts +4 -0
- package/dist/constants/microservices.constants.js +4 -0
- package/dist/constants/microservices.constants.js.map +1 -1
- package/dist/contracts/auth.contract.d.ts +25 -0
- package/dist/contracts/client.contract.d.ts +30 -0
- package/dist/contracts/client.contract.js +3 -0
- package/dist/contracts/client.contract.js.map +1 -0
- package/dist/contracts/iam.contract.d.ts +51 -0
- package/dist/contracts/iam.contract.js +3 -0
- package/dist/contracts/iam.contract.js.map +1 -0
- package/dist/contracts/index.d.ts +6 -0
- package/dist/contracts/index.js +6 -0
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/logging.contract.d.ts +28 -14
- package/dist/contracts/notification.contract.d.ts +35 -0
- package/dist/contracts/notification.contract.js +3 -0
- package/dist/contracts/notification.contract.js.map +1 -0
- package/dist/contracts/partner.contract.d.ts +42 -0
- package/dist/contracts/partner.contract.js +3 -0
- package/dist/contracts/partner.contract.js.map +1 -0
- package/dist/contracts/terminal.contract.d.ts +25 -0
- package/dist/contracts/terminal.contract.js +3 -0
- package/dist/contracts/terminal.contract.js.map +1 -0
- package/dist/contracts/transaction.contract.d.ts +8 -2
- package/dist/contracts/user.contract.d.ts +37 -0
- package/dist/contracts/user.contract.js +3 -0
- package/dist/contracts/user.contract.js.map +1 -0
- package/dist/contracts/wallet.contract.d.ts +114 -0
- package/dist/contracts/wallet.contract.js +24 -0
- package/dist/contracts/wallet.contract.js.map +1 -0
- package/dist/dto/card.dto.d.ts +9 -0
- package/dist/dto/card.dto.js +45 -0
- package/dist/dto/card.dto.js.map +1 -1
- package/dist/dto/partner.dto.d.ts +1 -0
- package/dist/dto/partner.dto.js +5 -0
- package/dist/dto/partner.dto.js.map +1 -1
- package/dist/dto/transaction.dto.d.ts +5 -0
- package/dist/dto/transaction.dto.js +21 -0
- package/dist/dto/transaction.dto.js.map +1 -1
- package/dist/dto/user.dto.d.ts +36 -7
- package/dist/dto/user.dto.js +128 -11
- package/dist/dto/user.dto.js.map +1 -1
- package/dist/enums/card.enum.d.ts +4 -0
- package/dist/enums/card.enum.js +9 -0
- package/dist/enums/card.enum.js.map +1 -0
- package/dist/enums/iam.enum.d.ts +2 -0
- package/dist/enums/iam.enum.js +2 -0
- package/dist/enums/iam.enum.js.map +1 -1
- package/dist/enums/index.d.ts +4 -0
- package/dist/enums/index.js +4 -0
- package/dist/enums/index.js.map +1 -1
- package/dist/enums/job.enum.d.ts +13 -0
- package/dist/enums/job.enum.js +19 -0
- package/dist/enums/job.enum.js.map +1 -0
- package/dist/enums/saga.enum.d.ts +8 -0
- package/dist/enums/saga.enum.js +13 -0
- package/dist/enums/saga.enum.js.map +1 -0
- package/dist/enums/transaction.enum.d.ts +4 -0
- package/dist/enums/transaction.enum.js +9 -0
- package/dist/enums/transaction.enum.js.map +1 -0
- package/dist/enums/user.enum.d.ts +7 -1
- package/dist/enums/user.enum.js +8 -1
- package/dist/enums/user.enum.js.map +1 -1
- package/dist/resilience/circuit-breaker.service.d.ts +1 -2
- package/dist/resilience/circuit-breaker.service.js +7 -3
- package/dist/resilience/circuit-breaker.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/iam.types.d.ts +30 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/saga.types.d.ts +24 -0
- package/dist/types/saga.types.js +3 -0
- package/dist/types/saga.types.js.map +1 -0
- package/dist/types/user.types.d.ts +38 -1
- package/dist/utils/app.utils.js +5 -4
- package/dist/utils/app.utils.js.map +1 -1
- package/dist/utils/proto-path.js +14 -0
- package/dist/utils/proto-path.js.map +1 -1
- package/package.json +5 -2
- package/proto/account.proto +32 -0
- package/proto/attachment.proto +12 -0
- package/proto/auth.proto +152 -0
- package/proto/card.proto +140 -0
- package/proto/client.proto +99 -0
- package/proto/config.proto +39 -0
- package/proto/dbf.proto +183 -0
- package/proto/iam.proto +70 -0
- package/proto/logging.proto +153 -0
- package/proto/notification.proto +44 -0
- package/proto/partner.proto +68 -0
- package/proto/terminal.proto +34 -0
- package/proto/transaction.proto +95 -0
- package/proto/user.proto +137 -0
- package/proto/wallet.proto +138 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package config;
|
|
4
|
+
|
|
5
|
+
service ConfigService {
|
|
6
|
+
rpc GetConfig (GetConfigRequest) returns (ConfigResponse);
|
|
7
|
+
rpc SetConfig (SetConfigRequest) returns (ConfigResponse);
|
|
8
|
+
rpc ListConfigs (ListConfigsRequest) returns (ListConfigsResponse);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
message GetConfigRequest {
|
|
12
|
+
string serviceName = 1;
|
|
13
|
+
string environment = 2;
|
|
14
|
+
string version = 3;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message ConfigResponse {
|
|
18
|
+
map<string, string> values = 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message SetConfigRequest {
|
|
22
|
+
string serviceName = 1;
|
|
23
|
+
string environment = 2;
|
|
24
|
+
string key = 3;
|
|
25
|
+
string value = 4;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message ListConfigsRequest {
|
|
29
|
+
string environment = 1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
message ServiceConfig {
|
|
33
|
+
string serviceName = 1;
|
|
34
|
+
map<string, string> values = 2;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message ListConfigsResponse {
|
|
38
|
+
repeated ServiceConfig configs = 1;
|
|
39
|
+
}
|
package/proto/dbf.proto
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package dbf;
|
|
4
|
+
|
|
5
|
+
// ==================== Service Definition ====================
|
|
6
|
+
|
|
7
|
+
service DbfService {
|
|
8
|
+
// Read DBF file with optional filtering
|
|
9
|
+
rpc ReadDbf(ReadDbfRequest) returns (ReadDbfResponse);
|
|
10
|
+
|
|
11
|
+
// Update a single field in specific record(s)
|
|
12
|
+
rpc UpdateField(UpdateFieldRequest) returns (UpdateFieldResponse);
|
|
13
|
+
|
|
14
|
+
// Batch update multiple records
|
|
15
|
+
rpc BatchUpdate(BatchUpdateRequest) returns (BatchUpdateResponse);
|
|
16
|
+
|
|
17
|
+
// Get DBF file schema/structure
|
|
18
|
+
rpc GetSchema(GetSchemaRequest) returns (GetSchemaResponse);
|
|
19
|
+
|
|
20
|
+
// List available DBF files
|
|
21
|
+
rpc ListFiles(ListFilesRequest) returns (ListFilesResponse);
|
|
22
|
+
|
|
23
|
+
// Pack DBF - remove deleted records (PACK in FoxPro)
|
|
24
|
+
rpc Pack(PackRequest) returns (PackResponse);
|
|
25
|
+
|
|
26
|
+
// Reindex DBF - rebuild indexes (REINDEX in FoxPro)
|
|
27
|
+
rpc Reindex(ReindexRequest) returns (ReindexResponse);
|
|
28
|
+
|
|
29
|
+
// Mark record for deletion (DELETE in FoxPro)
|
|
30
|
+
rpc MarkForDeletion(MarkForDeletionRequest) returns (MarkForDeletionResponse);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// ==================== Read Operations ====================
|
|
34
|
+
|
|
35
|
+
message ReadDbfRequest {
|
|
36
|
+
string filename = 1;
|
|
37
|
+
optional string filter = 2; // JSON filter conditions
|
|
38
|
+
optional int32 limit = 3;
|
|
39
|
+
optional int32 offset = 4;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message ReadDbfResponse {
|
|
43
|
+
bool success = 1;
|
|
44
|
+
repeated Record records = 2;
|
|
45
|
+
int32 total = 3;
|
|
46
|
+
optional string error = 4;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message Record {
|
|
50
|
+
map<string, string> fields = 1; // Field name -> value
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// ==================== Update Operations ====================
|
|
54
|
+
|
|
55
|
+
message UpdateFieldRequest {
|
|
56
|
+
string filename = 1;
|
|
57
|
+
string field_name = 2;
|
|
58
|
+
string new_value = 3;
|
|
59
|
+
optional string filter = 4; // JSON filter to identify records
|
|
60
|
+
optional int32 record_index = 5; // Direct record index
|
|
61
|
+
string user_id = 6; // For audit logging
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
message UpdateFieldResponse {
|
|
65
|
+
bool success = 1;
|
|
66
|
+
int32 records_updated = 2;
|
|
67
|
+
optional string backup_path = 3;
|
|
68
|
+
optional string error = 4;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message BatchUpdateRequest {
|
|
72
|
+
string filename = 1;
|
|
73
|
+
repeated FieldUpdate updates = 2;
|
|
74
|
+
string user_id = 3;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
message FieldUpdate {
|
|
78
|
+
int32 record_index = 1;
|
|
79
|
+
string field_name = 2;
|
|
80
|
+
string new_value = 3;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
message BatchUpdateResponse {
|
|
84
|
+
bool success = 1;
|
|
85
|
+
int32 records_updated = 2;
|
|
86
|
+
int32 records_failed = 3;
|
|
87
|
+
repeated FailedUpdate failures = 4;
|
|
88
|
+
optional string backup_path = 5;
|
|
89
|
+
optional string error = 6;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
message FailedUpdate {
|
|
93
|
+
int32 record_index = 1;
|
|
94
|
+
string error = 2;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// ==================== Schema Operations ====================
|
|
98
|
+
|
|
99
|
+
message GetSchemaRequest {
|
|
100
|
+
string filename = 1;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
message GetSchemaResponse {
|
|
104
|
+
bool success = 1;
|
|
105
|
+
repeated FieldDefinition fields = 2;
|
|
106
|
+
int32 record_count = 3;
|
|
107
|
+
optional string error = 4;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
message FieldDefinition {
|
|
111
|
+
string name = 1;
|
|
112
|
+
string type = 2; // C, N, L, D, etc.
|
|
113
|
+
int32 length = 3;
|
|
114
|
+
int32 decimal_count = 4;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// ==================== File Listing ====================
|
|
118
|
+
|
|
119
|
+
message ListFilesRequest {
|
|
120
|
+
optional string directory = 1;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
message ListFilesResponse {
|
|
124
|
+
bool success = 1;
|
|
125
|
+
repeated DbfFile files = 2;
|
|
126
|
+
optional string error = 3;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
message DbfFile {
|
|
130
|
+
string filename = 1;
|
|
131
|
+
string path = 2;
|
|
132
|
+
int64 size_bytes = 3;
|
|
133
|
+
int32 record_count = 4;
|
|
134
|
+
string last_modified = 5; // ISO string
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// ==================== Pack Operation ====================
|
|
138
|
+
|
|
139
|
+
message PackRequest {
|
|
140
|
+
string filename = 1;
|
|
141
|
+
string user_id = 2;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
message PackResponse {
|
|
145
|
+
bool success = 1;
|
|
146
|
+
int32 records_before = 2;
|
|
147
|
+
int32 records_after = 3;
|
|
148
|
+
int32 removed_count = 4;
|
|
149
|
+
optional string backup_path = 5;
|
|
150
|
+
optional string error = 6;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// ==================== Reindex Operation ====================
|
|
154
|
+
|
|
155
|
+
message ReindexRequest {
|
|
156
|
+
string filename = 1;
|
|
157
|
+
optional string index_field = 2; // Specific field to reindex
|
|
158
|
+
optional string user_id = 3;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
message ReindexResponse {
|
|
162
|
+
bool success = 1;
|
|
163
|
+
string message = 2;
|
|
164
|
+
repeated string index_files = 3; // .CDX, .IDX files found
|
|
165
|
+
optional string recommendation = 4;
|
|
166
|
+
optional string error = 5;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// ==================== Mark for Deletion ====================
|
|
170
|
+
|
|
171
|
+
message MarkForDeletionRequest {
|
|
172
|
+
string filename = 1;
|
|
173
|
+
int32 record_index = 2;
|
|
174
|
+
string user_id = 3;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
message MarkForDeletionResponse {
|
|
178
|
+
bool success = 1;
|
|
179
|
+
int32 record_index = 2;
|
|
180
|
+
bool marked_for_deletion = 3;
|
|
181
|
+
optional string backup_path = 4;
|
|
182
|
+
optional string error = 5;
|
|
183
|
+
}
|
package/proto/iam.proto
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package iam;
|
|
4
|
+
|
|
5
|
+
service IamService {
|
|
6
|
+
rpc GetIdentity (GetIdentityRequest) returns (IdentityResponse);
|
|
7
|
+
rpc ListIdentities (ListIdentitiesRequest) returns (IdentitiesListResponse);
|
|
8
|
+
rpc CreateIdentity (CreateIdentityRequest) returns (IdentityResponse);
|
|
9
|
+
rpc UpdateIdentityStatus (UpdateStatusRequest) returns (IdentityResponse);
|
|
10
|
+
rpc AssignRole (RoleRequest) returns (SuccessResponse);
|
|
11
|
+
rpc RevokeRole (RoleRequest) returns (SuccessResponse);
|
|
12
|
+
rpc ListRoles (Empty) returns (RolesListResponse);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message Empty {}
|
|
16
|
+
|
|
17
|
+
message GetIdentityRequest {
|
|
18
|
+
string id = 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message ListIdentitiesRequest {
|
|
22
|
+
int32 skip = 1;
|
|
23
|
+
int32 take = 2;
|
|
24
|
+
string roleId = 3;
|
|
25
|
+
string status = 4;
|
|
26
|
+
string subjectType = 5;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
message CreateIdentityRequest {
|
|
30
|
+
string subjectType = 1;
|
|
31
|
+
string email = 2;
|
|
32
|
+
string password = 3;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message UpdateStatusRequest {
|
|
36
|
+
string id = 1;
|
|
37
|
+
string status = 2;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
message RoleRequest {
|
|
41
|
+
string identityId = 1;
|
|
42
|
+
string roleId = 2;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
message IdentityResponse {
|
|
46
|
+
string id = 1;
|
|
47
|
+
string subjectType = 2;
|
|
48
|
+
string status = 3;
|
|
49
|
+
string email = 4;
|
|
50
|
+
repeated Role roles = 5;
|
|
51
|
+
string createdAt = 6;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
message Role {
|
|
55
|
+
string id = 1;
|
|
56
|
+
string name = 2;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
message IdentitiesListResponse {
|
|
60
|
+
repeated IdentityResponse items = 1;
|
|
61
|
+
int32 total = 2;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
message RolesListResponse {
|
|
65
|
+
repeated Role items = 1;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
message SuccessResponse {
|
|
69
|
+
bool success = 1;
|
|
70
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package logging;
|
|
4
|
+
|
|
5
|
+
service LoggingService {
|
|
6
|
+
// Log a service event
|
|
7
|
+
rpc LogEvent (LogEventRequest) returns (LogEventResponse);
|
|
8
|
+
|
|
9
|
+
// Log user action for audit trail
|
|
10
|
+
rpc LogUserAction (LogUserActionRequest) returns (LogUserActionResponse);
|
|
11
|
+
|
|
12
|
+
// Update service health status
|
|
13
|
+
rpc UpdateServiceStatus (UpdateServiceStatusRequest) returns (UpdateServiceStatusResponse);
|
|
14
|
+
|
|
15
|
+
// Query service logs
|
|
16
|
+
rpc GetServiceLogs (GetServiceLogsRequest) returns (GetServiceLogsResponse);
|
|
17
|
+
|
|
18
|
+
// Get service health status
|
|
19
|
+
rpc GetServiceStatus (GetServiceStatusRequest) returns (GetServiceStatusResponse);
|
|
20
|
+
|
|
21
|
+
// Query user actions
|
|
22
|
+
rpc GetUserActions (GetUserActionsRequest) returns (GetUserActionsResponse);
|
|
23
|
+
|
|
24
|
+
rpc GetMetrics (GetMetricsRequest) returns (GetMetricsResponse);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Log Event Messages
|
|
28
|
+
message LogEventRequest {
|
|
29
|
+
string serviceId = 1;
|
|
30
|
+
string serviceName = 2;
|
|
31
|
+
string level = 3; // DEBUG, INFO, WARN, ERROR, FATAL
|
|
32
|
+
string message = 4;
|
|
33
|
+
string metadata = 5; // JSON string
|
|
34
|
+
optional string userId = 6;
|
|
35
|
+
optional string requestId = 7;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message LogEventResponse {
|
|
39
|
+
bool success = 1;
|
|
40
|
+
string logId = 2;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// User Action Messages
|
|
44
|
+
message LogUserActionRequest {
|
|
45
|
+
string userId = 1;
|
|
46
|
+
string userName = 2;
|
|
47
|
+
string action = 3;
|
|
48
|
+
string resource = 4;
|
|
49
|
+
optional string details = 5; // JSON string
|
|
50
|
+
optional string ipAddress = 6;
|
|
51
|
+
optional string userAgent = 7;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
message LogUserActionResponse {
|
|
55
|
+
bool success = 1;
|
|
56
|
+
string actionId = 2;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Service Status Messages
|
|
60
|
+
message UpdateServiceStatusRequest {
|
|
61
|
+
string serviceName = 1;
|
|
62
|
+
string status = 2; // HEALTHY, DEGRADED, DOWN, UNKNOWN
|
|
63
|
+
optional string version = 3;
|
|
64
|
+
optional int32 uptime = 4;
|
|
65
|
+
optional string metadata = 5; // JSON string
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
message UpdateServiceStatusResponse {
|
|
69
|
+
bool success = 1;
|
|
70
|
+
string statusId = 2;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Query Messages
|
|
74
|
+
message GetServiceLogsRequest {
|
|
75
|
+
optional string serviceName = 1;
|
|
76
|
+
optional string level = 2;
|
|
77
|
+
optional string userId = 3;
|
|
78
|
+
optional string requestId = 4;
|
|
79
|
+
optional string startDate = 5; // ISO 8601 format
|
|
80
|
+
optional string endDate = 6; // ISO 8601 format
|
|
81
|
+
optional int32 limit = 7;
|
|
82
|
+
optional int32 offset = 8;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
message ServiceLogEntry {
|
|
86
|
+
string id = 1;
|
|
87
|
+
string serviceId = 2;
|
|
88
|
+
string serviceName = 3;
|
|
89
|
+
string level = 4;
|
|
90
|
+
string message = 5;
|
|
91
|
+
string metadata = 6;
|
|
92
|
+
string timestamp = 7;
|
|
93
|
+
optional string userId = 8;
|
|
94
|
+
optional string requestId = 9;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
message GetServiceLogsResponse {
|
|
98
|
+
repeated ServiceLogEntry logs = 1;
|
|
99
|
+
int32 total = 2;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
message GetServiceStatusRequest {
|
|
103
|
+
optional string serviceName = 1;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
message ServiceStatusEntry {
|
|
107
|
+
string id = 1;
|
|
108
|
+
string serviceName = 2;
|
|
109
|
+
string status = 3;
|
|
110
|
+
string lastHeartbeat = 4;
|
|
111
|
+
optional string version = 5;
|
|
112
|
+
optional int32 uptime = 6;
|
|
113
|
+
optional string metadata = 7;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
message GetServiceStatusResponse {
|
|
117
|
+
repeated ServiceStatusEntry statuses = 1;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
message GetUserActionsRequest {
|
|
121
|
+
optional string userId = 1;
|
|
122
|
+
optional string action = 2;
|
|
123
|
+
optional string resource = 3;
|
|
124
|
+
optional string startDate = 4;
|
|
125
|
+
optional string endDate = 5;
|
|
126
|
+
optional int32 limit = 6;
|
|
127
|
+
optional int32 offset = 7;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
message UserActionEntry {
|
|
131
|
+
string id = 1;
|
|
132
|
+
string userId = 2;
|
|
133
|
+
string userName = 3;
|
|
134
|
+
string action = 4;
|
|
135
|
+
string resource = 5;
|
|
136
|
+
string details = 6;
|
|
137
|
+
string timestamp = 7;
|
|
138
|
+
optional string ipAddress = 8;
|
|
139
|
+
optional string userAgent = 9;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
message GetUserActionsResponse {
|
|
143
|
+
repeated UserActionEntry actions = 1;
|
|
144
|
+
int32 total = 2;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
message GetMetricsRequest {
|
|
148
|
+
string service_name = 1;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
message GetMetricsResponse {
|
|
152
|
+
string metrics = 1;
|
|
153
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
}
|