@acequants/aegis-contracts 0.1.52 → 0.1.54
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/src/gen/auth/v1/auth.d.ts +1 -1
- package/dist/src/gen/auth/v1/auth.d.ts.map +1 -1
- package/dist/src/gen/auth/v1/auth.js +4 -4
- package/dist/src/gen/system/v1/system.d.ts +151 -281
- package/dist/src/gen/system/v1/system.d.ts.map +1 -1
- package/dist/src/gen/system/v1/system.js +370 -903
- package/package.json +1 -1
- package/proto/auth/v1/auth.proto +1 -1
- package/proto/system/v1/system.proto +95 -112
package/package.json
CHANGED
package/proto/auth/v1/auth.proto
CHANGED
|
@@ -31,44 +31,6 @@ message GrpcDtoPermissionsAdd {
|
|
|
31
31
|
repeated GrpcDtoPermission permissions = 1;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
// ---- CLIENT TYPE ----
|
|
35
|
-
message GrpcInputClientTypeSeed {
|
|
36
|
-
string name = 1;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
message GrpcInputClientTypesSeed {
|
|
40
|
-
repeated GrpcInputClientTypeSeed client_types = 1;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
message GrpcInputClientType {
|
|
44
|
-
string publicId = 1;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
message GrpcInputClientTypes {
|
|
48
|
-
optional string search = 1;
|
|
49
|
-
optional int32 page = 2;
|
|
50
|
-
optional int32 page_size = 3;
|
|
51
|
-
optional string sort_by = 4;
|
|
52
|
-
optional string sort_order = 5;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
message GrpcDtoClientType {
|
|
56
|
-
string public_id = 1;
|
|
57
|
-
string name = 2;
|
|
58
|
-
google.protobuf.Timestamp created_at = 3;
|
|
59
|
-
google.protobuf.Timestamp updated_at = 4;
|
|
60
|
-
google.protobuf.Timestamp deleted_at = 5;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
message GrpcDtoClientTypesSeed {
|
|
64
|
-
repeated GrpcDtoClientType client_types = 1;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
message GrpcDtoClientTypes {
|
|
68
|
-
repeated GrpcDtoClientType items = 1;
|
|
69
|
-
GrpcDtoPagination meta = 2;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
34
|
// ---- FEATURES ----
|
|
73
35
|
message GrpcInputFeatureSeed {
|
|
74
36
|
string name = 1;
|
|
@@ -134,98 +96,119 @@ message GrpcDtoFeaturePermissions {
|
|
|
134
96
|
repeated GrpcDtoFeaturePermission featurePermissions = 1;
|
|
135
97
|
}
|
|
136
98
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
99
|
+
service SystemService {
|
|
100
|
+
// --- Features ---
|
|
101
|
+
rpc FeaturesSeed (GrpcInputFeaturesSeed) returns (GrpcDtoFeaturesSeed);
|
|
102
|
+
rpc Features (GrpcInputFeatures) returns (GrpcDtoFeatures);
|
|
103
|
+
rpc Feature (GrpcInputFeature) returns (GrpcDtoFeature);
|
|
104
|
+
rpc FeaturePermissions (GrpcInputFeaturePermissions) returns (GrpcDtoFeaturePermissions);
|
|
105
|
+
rpc FeaturePermissionsAdd (GrpcInputFeaturePermissionsAdd) returns (GrpcDtoPermissionsAdd);
|
|
106
|
+
rpc FeaturePermissionsRemove (GrpcInputFeaturePermissionsRemove) returns (GrpcDtoMessage);
|
|
143
107
|
}
|
|
144
108
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
109
|
+
// ============================================================================
|
|
110
|
+
// GEO REPLICATION CONTRACT
|
|
111
|
+
// ============================================================================
|
|
112
|
+
//
|
|
113
|
+
// Used by aegis (authoritative) to ship GeoDivision rows to subscriber
|
|
114
|
+
// services (today: gtms) so they can maintain a local read-only mirror.
|
|
115
|
+
//
|
|
116
|
+
// RULES
|
|
117
|
+
// - Keyed by public_id only. NEVER add internal numeric ids.
|
|
118
|
+
// - Soft-deleted rows ARE returned so subscribers can mark them deleted.
|
|
119
|
+
// - Ordering is part of the contract: level ASC, public_id ASC. Parents
|
|
120
|
+
// arrive before children so the subscriber can satisfy its self-FK.
|
|
121
|
+
//
|
|
122
|
+
// DO
|
|
123
|
+
// - Add new fields at the END of a message with a new field number.
|
|
124
|
+
// - Bump to a v2 file for removals/renames or breaking semantics.
|
|
125
|
+
//
|
|
126
|
+
// DON'T
|
|
127
|
+
// - Don't reuse field numbers. Ever.
|
|
128
|
+
// - Don't add user/auth context to these payloads — geo is public data.
|
|
129
|
+
// ============================================================================
|
|
130
|
+
|
|
131
|
+
// ---- GEO MESSAGES ----
|
|
132
|
+
message GrpcDtoGeoDivision {
|
|
133
|
+
string public_id = 1;
|
|
134
|
+
// Parent's public_id; empty string when this is a root division (level 0).
|
|
135
|
+
string parent_public_id = 2;
|
|
152
136
|
|
|
153
|
-
|
|
154
|
-
string
|
|
155
|
-
|
|
156
|
-
|
|
137
|
+
// Enum name as string (e.g. "COUNTRY", "REGION") — matches Prisma enum
|
|
138
|
+
// GEO_DIVISION. Kept as string so adding new levels doesn't require a
|
|
139
|
+
// proto bump on the subscriber.
|
|
140
|
+
string type = 3;
|
|
141
|
+
int32 level = 4;
|
|
142
|
+
string code = 5;
|
|
143
|
+
// Immutable hierarchy path (e.g. "KE", "KE.47", "KE.47.001").
|
|
144
|
+
string path = 6;
|
|
157
145
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
146
|
+
string name = 7;
|
|
147
|
+
string iso2 = 8;
|
|
148
|
+
string iso3 = 9;
|
|
149
|
+
string phone_code = 10;
|
|
161
150
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
151
|
+
bool is_capital = 11;
|
|
152
|
+
bool is_active = 12;
|
|
165
153
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
154
|
+
// Optional centroid. Sent as wrapped/optional so 0,0 stays distinguishable
|
|
155
|
+
// from "no value". Using `optional` keyword (proto3 field presence).
|
|
156
|
+
optional double lat = 13;
|
|
157
|
+
optional double lng = 14;
|
|
158
|
+
|
|
159
|
+
// JSON-encoded geometry (GeoJSON). Empty string when not set.
|
|
160
|
+
// Kept as string to avoid pulling in google.protobuf.Struct here and to
|
|
161
|
+
// stay lossless for arbitrary GeoJSON shapes.
|
|
162
|
+
string geo_json = 15;
|
|
163
|
+
|
|
164
|
+
// Flattened relation scalars — subscribers don't need our internal ids.
|
|
165
|
+
string timezone_iana = 16;
|
|
166
|
+
string currency_code = 17;
|
|
169
167
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
optional string search = 3;
|
|
174
|
-
optional int32 page = 4;
|
|
175
|
-
optional int32 pageSize = 5;
|
|
176
|
-
optional string sortBy = 6;
|
|
177
|
-
optional string sortOrder = 7;
|
|
168
|
+
google.protobuf.Timestamp created_at = 18;
|
|
169
|
+
google.protobuf.Timestamp updated_at = 19;
|
|
170
|
+
google.protobuf.Timestamp deleted_at = 20;
|
|
178
171
|
}
|
|
179
172
|
|
|
180
|
-
message
|
|
181
|
-
|
|
182
|
-
string
|
|
183
|
-
|
|
184
|
-
optional GrpcDtoClientType clientType = 4;
|
|
185
|
-
google.protobuf.Timestamp createdAt = 5;
|
|
186
|
-
google.protobuf.Timestamp updatedAt = 6;
|
|
187
|
-
google.protobuf.Timestamp deletedAt = 7;
|
|
173
|
+
message GrpcDtoGeoDivisionsPage {
|
|
174
|
+
repeated GrpcDtoGeoDivision items = 1;
|
|
175
|
+
// Empty string when there is no next page.
|
|
176
|
+
string next_cursor = 2;
|
|
188
177
|
}
|
|
189
178
|
|
|
190
|
-
message
|
|
191
|
-
repeated
|
|
192
|
-
GrpcDtoPagination meta = 2;
|
|
179
|
+
message GrpcDtoGeoDivisions {
|
|
180
|
+
repeated GrpcDtoGeoDivision items = 1;
|
|
193
181
|
}
|
|
194
182
|
|
|
195
|
-
|
|
196
|
-
|
|
183
|
+
// ---- GEO INPUTS ----
|
|
184
|
+
message GrpcInputGeoDivisionsListAll {
|
|
185
|
+
// Empty string means "from the beginning".
|
|
186
|
+
string cursor = 1;
|
|
187
|
+
// 0 means "use server default". Server clamps to its max.
|
|
188
|
+
int32 limit = 2;
|
|
197
189
|
}
|
|
198
190
|
|
|
199
|
-
message
|
|
200
|
-
string
|
|
201
|
-
GrpcDtoFeature feature = 2;
|
|
202
|
-
optional GrpcDtoClient client = 3;
|
|
191
|
+
message GrpcInputGeoDivisionsGetByPublicIds {
|
|
192
|
+
repeated string public_ids = 1;
|
|
203
193
|
}
|
|
204
194
|
|
|
205
|
-
message
|
|
206
|
-
|
|
195
|
+
message GrpcInputGeoDivisionsListChangedSince {
|
|
196
|
+
// Strict `>` comparison server-side. Subscriber should record its
|
|
197
|
+
// "last seen updated_at" and pass it back here unchanged.
|
|
198
|
+
google.protobuf.Timestamp since = 1;
|
|
199
|
+
string cursor = 2;
|
|
200
|
+
int32 limit = 3;
|
|
207
201
|
}
|
|
208
202
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
rpc
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
rpc FeaturesSeed (GrpcInputFeaturesSeed) returns (GrpcDtoFeaturesSeed);
|
|
217
|
-
rpc Features (GrpcInputFeatures) returns (GrpcDtoFeatures);
|
|
218
|
-
rpc Feature (GrpcInputFeature) returns (GrpcDtoFeature);
|
|
219
|
-
rpc FeaturePermissions (GrpcInputFeaturePermissions) returns (GrpcDtoFeaturePermissions);
|
|
220
|
-
rpc FeaturePermissionsAdd (GrpcInputFeaturePermissionsAdd) returns (GrpcDtoPermissionsAdd);
|
|
221
|
-
rpc FeaturePermissionsRemove (GrpcInputFeaturePermissionsRemove) returns (GrpcDtoMessage);
|
|
203
|
+
// ---- GEO SERVICE ----
|
|
204
|
+
service GeoService {
|
|
205
|
+
// Full sync (used on first mirror boot). Paged by public_id cursor.
|
|
206
|
+
rpc GeoDivisionsListAll (GrpcInputGeoDivisionsListAll) returns (GrpcDtoGeoDivisionsPage);
|
|
207
|
+
|
|
208
|
+
// Batch fetch by public_id (used by live Redis event consumers).
|
|
209
|
+
rpc GeoDivisionsGetByPublicIds (GrpcInputGeoDivisionsGetByPublicIds) returns (GrpcDtoGeoDivisions);
|
|
222
210
|
|
|
223
|
-
//
|
|
224
|
-
|
|
225
|
-
rpc
|
|
226
|
-
rpc Clients (GrpcInputClients) returns (GrpcDtoClients);
|
|
227
|
-
rpc Client (GrpcInputClient) returns (GrpcDtoClient);
|
|
228
|
-
rpc ClientFeaturesAdd (GrpcInputClientFeaturesAdd) returns (GrpcDtoFeaturesAdd);
|
|
229
|
-
rpc ClientFeaturesRemove (GrpcInputClientFeaturesRemove) returns (GrpcDtoMessage);
|
|
230
|
-
rpc ClientFeatures (GrpcInputClientFeatures) returns (GrpcDtoClientFeatures);
|
|
211
|
+
// Hourly safety-net reconciler. Catches anything the Redis publisher
|
|
212
|
+
// dropped due to restart races.
|
|
213
|
+
rpc GeoDivisionsListChangedSince (GrpcInputGeoDivisionsListChangedSince) returns (GrpcDtoGeoDivisionsPage);
|
|
231
214
|
}
|