protobuf-platform 1.2.728 → 1.2.729
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/log/log.proto +83 -0
- package/log/log_grpc_pb.js +66 -0
- package/log/log_pb.js +2478 -0
- package/package.json +1 -1
package/log/log.proto
CHANGED
|
@@ -8,6 +8,8 @@ service Log {
|
|
|
8
8
|
rpc readListIssues(PaginationRequest) returns (IssueItemsResponse);
|
|
9
9
|
//User Activities
|
|
10
10
|
rpc readListUserActivities(PaginationRequest) returns (UserActivitiesItemsResponse);
|
|
11
|
+
rpc readScopedAuditTrail(AuditListRequest) returns (AuditListResponse);
|
|
12
|
+
rpc readScopedAuditDetail(AuditDetailRequest) returns (AuditDetailResponse);
|
|
11
13
|
//Activity Trail
|
|
12
14
|
rpc readListActivityTrail(PaginationRequest) returns (ActivityTrailItemsResponse);
|
|
13
15
|
}
|
|
@@ -94,3 +96,84 @@ message ActivityTrailItemsResponse {
|
|
|
94
96
|
optional int32 total_pages = 2;
|
|
95
97
|
optional int32 total_items = 3;
|
|
96
98
|
}
|
|
99
|
+
|
|
100
|
+
// Scope is a selector. Gateway authenticates the manager and derives the entity
|
|
101
|
+
// permission and permitted classes server-side. Log authenticates the Gateway
|
|
102
|
+
// service identity AND validates its integrity-protected authorization context
|
|
103
|
+
// bound to the principal, RPC and entity. A caller header is insufficient.
|
|
104
|
+
// Reject absent/invalid context, unsupported entities and empty IDs. Intersect
|
|
105
|
+
// granted classes with Log's entity policy before list, count and detail reads.
|
|
106
|
+
message AuditReadScope {
|
|
107
|
+
string entity_type = 1;
|
|
108
|
+
string entity_id = 2;
|
|
109
|
+
reserved 3;
|
|
110
|
+
reserved "allowed_access_classes";
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Keyset order: occurred_at (UTC instant) DESC, event_id (binary order) DESC.
|
|
114
|
+
// Absent limit defaults to 25; explicit values must be 1..100. Omit cursor
|
|
115
|
+
// for first page; reject empty, malformed, tampered or scope-mismatched cursors.
|
|
116
|
+
// Resume strictly after the last returned tuple. Cursor binds principal, scope
|
|
117
|
+
// and effective class set; reauthorize every page. Pages are live, not snapshots.
|
|
118
|
+
message AuditListRequest {
|
|
119
|
+
AuditReadScope scope = 1;
|
|
120
|
+
optional int32 limit = 2;
|
|
121
|
+
optional string cursor = 3;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
message AuditDetailRequest { AuditReadScope scope = 1; string event_id = 2; }
|
|
125
|
+
|
|
126
|
+
// Use the first min(3, changed_field_count) authorized, sanitized detail changes,
|
|
127
|
+
// in registered field order. Count all such distinct fields before truncation.
|
|
128
|
+
// Omit unknown historical actor fields.
|
|
129
|
+
message AuditSummary {
|
|
130
|
+
string event_id = 1;
|
|
131
|
+
string occurred_at = 2;
|
|
132
|
+
optional string actor_id = 3;
|
|
133
|
+
optional string actor_role = 4;
|
|
134
|
+
string action = 5;
|
|
135
|
+
string category = 6;
|
|
136
|
+
repeated AuditFieldChange preview_changes = 7;
|
|
137
|
+
uint32 changed_field_count = 8;
|
|
138
|
+
uint32 source_version = 9;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Count within the current authorized entity scope; omit cursor on final page.
|
|
142
|
+
message AuditListResponse {
|
|
143
|
+
repeated AuditSummary items = 1;
|
|
144
|
+
uint32 total_items = 2;
|
|
145
|
+
optional string next_cursor = 3;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Require a selected arm. Missing and null markers must be true. False and
|
|
149
|
+
// empty string are valid scalar values. Numeric text must match
|
|
150
|
+
// -?(0|[1-9][0-9]*)([.][0-9]+)? in full, with registered precision and scale.
|
|
151
|
+
// Preserve exact digits from the authoritative source; never convert via float.
|
|
152
|
+
message AuditScalar {
|
|
153
|
+
oneof value {
|
|
154
|
+
bool missing = 1;
|
|
155
|
+
bool null_value = 2;
|
|
156
|
+
bool boolean_value = 3;
|
|
157
|
+
string string_value = 4;
|
|
158
|
+
string decimal_value = 5;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// Both endpoints required, valid for the field, and semantically different.
|
|
163
|
+
message AuditTransition { AuditScalar before = 1; AuditScalar after = 2; }
|
|
164
|
+
|
|
165
|
+
// Require a registered field, one selected display arm and true for changed_only.
|
|
166
|
+
// Only explicitly allowlisted safe scalars may have transitions. For complex
|
|
167
|
+
// or sensitive fields emit only the registered name and changed_only. Omit
|
|
168
|
+
// unregistered fields. Apply the same policy to legacy, preview and detail.
|
|
169
|
+
message AuditFieldChange {
|
|
170
|
+
string field = 1;
|
|
171
|
+
oneof display { bool changed_only = 2; AuditTransition transition = 3; }
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Match both entity and event under the authorized classes. Return the matched
|
|
175
|
+
// event ID; inaccessible and absent events produce the same not-found response.
|
|
176
|
+
message AuditDetailResponse {
|
|
177
|
+
repeated AuditFieldChange changes = 1;
|
|
178
|
+
string event_id = 2;
|
|
179
|
+
}
|
package/log/log_grpc_pb.js
CHANGED
|
@@ -15,6 +15,50 @@ function deserialize_log_ActivityTrailItemsResponse(buffer_arg) {
|
|
|
15
15
|
return log_pb.ActivityTrailItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
function serialize_log_AuditDetailRequest(arg) {
|
|
19
|
+
if (!(arg instanceof log_pb.AuditDetailRequest)) {
|
|
20
|
+
throw new Error('Expected argument of type log.AuditDetailRequest');
|
|
21
|
+
}
|
|
22
|
+
return Buffer.from(arg.serializeBinary());
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function deserialize_log_AuditDetailRequest(buffer_arg) {
|
|
26
|
+
return log_pb.AuditDetailRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function serialize_log_AuditDetailResponse(arg) {
|
|
30
|
+
if (!(arg instanceof log_pb.AuditDetailResponse)) {
|
|
31
|
+
throw new Error('Expected argument of type log.AuditDetailResponse');
|
|
32
|
+
}
|
|
33
|
+
return Buffer.from(arg.serializeBinary());
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function deserialize_log_AuditDetailResponse(buffer_arg) {
|
|
37
|
+
return log_pb.AuditDetailResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function serialize_log_AuditListRequest(arg) {
|
|
41
|
+
if (!(arg instanceof log_pb.AuditListRequest)) {
|
|
42
|
+
throw new Error('Expected argument of type log.AuditListRequest');
|
|
43
|
+
}
|
|
44
|
+
return Buffer.from(arg.serializeBinary());
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function deserialize_log_AuditListRequest(buffer_arg) {
|
|
48
|
+
return log_pb.AuditListRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function serialize_log_AuditListResponse(arg) {
|
|
52
|
+
if (!(arg instanceof log_pb.AuditListResponse)) {
|
|
53
|
+
throw new Error('Expected argument of type log.AuditListResponse');
|
|
54
|
+
}
|
|
55
|
+
return Buffer.from(arg.serializeBinary());
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function deserialize_log_AuditListResponse(buffer_arg) {
|
|
59
|
+
return log_pb.AuditListResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
60
|
+
}
|
|
61
|
+
|
|
18
62
|
function serialize_log_IssueItemsResponse(arg) {
|
|
19
63
|
if (!(arg instanceof log_pb.IssueItemsResponse)) {
|
|
20
64
|
throw new Error('Expected argument of type log.IssueItemsResponse');
|
|
@@ -107,6 +151,28 @@ readListUserActivities: {
|
|
|
107
151
|
responseSerialize: serialize_log_UserActivitiesItemsResponse,
|
|
108
152
|
responseDeserialize: deserialize_log_UserActivitiesItemsResponse,
|
|
109
153
|
},
|
|
154
|
+
readScopedAuditTrail: {
|
|
155
|
+
path: '/log.Log/readScopedAuditTrail',
|
|
156
|
+
requestStream: false,
|
|
157
|
+
responseStream: false,
|
|
158
|
+
requestType: log_pb.AuditListRequest,
|
|
159
|
+
responseType: log_pb.AuditListResponse,
|
|
160
|
+
requestSerialize: serialize_log_AuditListRequest,
|
|
161
|
+
requestDeserialize: deserialize_log_AuditListRequest,
|
|
162
|
+
responseSerialize: serialize_log_AuditListResponse,
|
|
163
|
+
responseDeserialize: deserialize_log_AuditListResponse,
|
|
164
|
+
},
|
|
165
|
+
readScopedAuditDetail: {
|
|
166
|
+
path: '/log.Log/readScopedAuditDetail',
|
|
167
|
+
requestStream: false,
|
|
168
|
+
responseStream: false,
|
|
169
|
+
requestType: log_pb.AuditDetailRequest,
|
|
170
|
+
responseType: log_pb.AuditDetailResponse,
|
|
171
|
+
requestSerialize: serialize_log_AuditDetailRequest,
|
|
172
|
+
requestDeserialize: deserialize_log_AuditDetailRequest,
|
|
173
|
+
responseSerialize: serialize_log_AuditDetailResponse,
|
|
174
|
+
responseDeserialize: deserialize_log_AuditDetailResponse,
|
|
175
|
+
},
|
|
110
176
|
// Activity Trail
|
|
111
177
|
readListActivityTrail: {
|
|
112
178
|
path: '/log.Log/readListActivityTrail',
|