@acequants/aegis-contracts 0.1.56 → 0.1.57

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acequants/aegis-contracts",
3
- "version": "0.1.56",
3
+ "version": "0.1.57",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -7,6 +7,140 @@ option java_multiple_files = true;
7
7
  import "google/protobuf/timestamp.proto";
8
8
  // import "shared/v1/shared.proto";
9
9
 
10
+ //----------------------
11
+ // --- GEOSYCN START ---
12
+ //----------------------
13
+ //
14
+ // Geo* delta-sync surface.
15
+ //
16
+ // aegis owns every Geo* table; gtms holds a read-only mirror refreshed
17
+ // hourly via the RPCs below. Each request carries a server-defined
18
+ // cursor (last seen `updated_at` for watermark-friendly tables; last
19
+ // seen `id` for the 3 bridge tables that have no `updated_at`/
20
+ // `deleted_at` column). Responses are stable-ordered pages with
21
+ // `next_cursor` + `has_more` so the consumer can stream until idle.
22
+ //
23
+ // All timestamp fields carry the source-of-truth (aegis) value; the
24
+ // consumer is free to store its own local audit dates separately.
25
+
26
+ message GrpcInputGeoSync {
27
+ // Opaque cursor — for delta tables this is an ISO8601 string of
28
+ // the last seen `updated_at`; for bridge tables it is the last
29
+ // seen integer `id` rendered as decimal. Empty string = from start.
30
+ string cursor = 1;
31
+ // Server clamps to [100, 2000]; 0 / unset → 500.
32
+ int32 page_size = 2;
33
+ }
34
+
35
+ // ---- Geo DTOs (1:1 with aegis schema scalars + FK publicIds) ----
36
+
37
+ message GrpcDtoGeoTimezone {
38
+ string public_id = 1;
39
+ string iana = 2;
40
+ google.protobuf.Timestamp updated_at = 3;
41
+ google.protobuf.Timestamp deleted_at = 4; // nullable
42
+ }
43
+
44
+ message GrpcDtoGeoCurrency {
45
+ string public_id = 1;
46
+ string code = 2;
47
+ string name = 3;
48
+ string symbol = 4; // nullable, empty = unset
49
+ bool is_base = 5;
50
+ bool is_active = 6;
51
+ string exchange_rate = 7; // Decimal serialised as string
52
+ google.protobuf.Timestamp updated_at = 8;
53
+ google.protobuf.Timestamp deleted_at = 9; // nullable
54
+ }
55
+
56
+ message GrpcDtoGeoLanguage {
57
+ string public_id = 1;
58
+ string iso639_1 = 2; // LANGUAGE enum as string
59
+ string iso639_2 = 3; // nullable
60
+ string name = 4;
61
+ bool is_active = 5;
62
+ google.protobuf.Timestamp updated_at = 6;
63
+ google.protobuf.Timestamp deleted_at = 7; // nullable
64
+ }
65
+
66
+ message GrpcDtoGeoLocale {
67
+ string public_id = 1;
68
+ string language_public_id = 2;
69
+ string code = 3;
70
+ string name = 4;
71
+ google.protobuf.Timestamp updated_at = 5;
72
+ // GeoLocale has no deletedAt in aegis schema.
73
+ }
74
+
75
+ message GrpcDtoGeoDivision {
76
+ string public_id = 1;
77
+ string timezone_public_id = 2; // nullable
78
+ string currency_public_id = 3; // nullable
79
+ string parent_public_id = 4; // nullable
80
+ string type = 5; // GEO_DIVISION enum as string
81
+ int32 level = 6;
82
+ string code = 7; // nullable
83
+ string path = 8;
84
+ string iso2 = 9; // nullable
85
+ string iso3 = 10; // nullable
86
+ string name = 11;
87
+ string phone_code = 12; // nullable
88
+ bool is_capital = 13;
89
+ bool is_active = 14;
90
+ double lat = 15; // nullable -> 0 when unset
91
+ double lng = 16; // nullable -> 0 when unset
92
+ bool has_lat = 17;
93
+ bool has_lng = 18;
94
+ string geo_json = 19; // JSON.stringify(geoJson) or empty
95
+ google.protobuf.Timestamp updated_at = 20;
96
+ google.protobuf.Timestamp deleted_at = 21;// nullable
97
+ }
98
+
99
+ message GrpcDtoGeoCountryMeta {
100
+ string public_id = 1;
101
+ string division_public_id = 2;
102
+ google.protobuf.Timestamp updated_at = 3;
103
+ // GeoCountryMeta has no deletedAt in aegis schema.
104
+ }
105
+
106
+ message GrpcDtoGeoCountryTimezone {
107
+ string public_id = 1;
108
+ string country_meta_public_id = 2;
109
+ string timezone_public_id = 3;
110
+ bool is_primary = 4;
111
+ }
112
+
113
+ message GrpcDtoGeoCountryCurrency {
114
+ string public_id = 1;
115
+ string country_meta_public_id = 2;
116
+ string currency_public_id = 3;
117
+ bool is_primary = 4;
118
+ }
119
+
120
+ message GrpcDtoGeoCountryLanguage {
121
+ string public_id = 1;
122
+ string country_meta_public_id = 2;
123
+ string language_public_id = 3;
124
+ bool is_official = 4;
125
+ bool is_national = 5;
126
+ }
127
+
128
+ // ---- Per-table sync responses ----
129
+
130
+ message GrpcDtoGeoTimezonesSync { repeated GrpcDtoGeoTimezone items = 1; string next_cursor = 2; bool has_more = 3; }
131
+ message GrpcDtoGeoCurrenciesSync { repeated GrpcDtoGeoCurrency items = 1; string next_cursor = 2; bool has_more = 3; }
132
+ message GrpcDtoGeoLanguagesSync { repeated GrpcDtoGeoLanguage items = 1; string next_cursor = 2; bool has_more = 3; }
133
+ message GrpcDtoGeoLocalesSync { repeated GrpcDtoGeoLocale items = 1; string next_cursor = 2; bool has_more = 3; }
134
+ message GrpcDtoGeoDivisionsSync { repeated GrpcDtoGeoDivision items = 1; string next_cursor = 2; bool has_more = 3; }
135
+ message GrpcDtoGeoCountryMetasSync { repeated GrpcDtoGeoCountryMeta items = 1; string next_cursor = 2; bool has_more = 3; }
136
+ message GrpcDtoGeoCountryTimezonesSync{ repeated GrpcDtoGeoCountryTimezone items = 1; string next_cursor = 2; bool has_more = 3; }
137
+ message GrpcDtoGeoCountryCurrenciesSync{repeated GrpcDtoGeoCountryCurrency items = 1; string next_cursor = 2; bool has_more = 3; }
138
+ message GrpcDtoGeoCountryLanguagesSync{ repeated GrpcDtoGeoCountryLanguage items = 1; string next_cursor = 2; bool has_more = 3; }
139
+
140
+ //----------------------
141
+ // --- GEOSYCN END -----
142
+ //----------------------
143
+
10
144
  message GrpcDtoPagination {
11
145
  int32 total_items = 1;
12
146
  int32 total_pages = 2;
@@ -229,5 +363,14 @@ service SystemService {
229
363
  rpc ClientFeaturesRemove (GrpcInputClientFeaturesRemove) returns (GrpcDtoMessage);
230
364
  rpc ClientFeatures (GrpcInputClientFeatures) returns (GrpcDtoClientFeatures);
231
365
 
232
- rpc Client_TO_DELETE (GrpcInputClientFeatures) returns (GrpcDtoClientFeatures);
366
+ // --- Geo delta sync (hourly pull from gtms mirror) ---
367
+ rpc GeoTimezonesSync (GrpcInputGeoSync) returns (GrpcDtoGeoTimezonesSync);
368
+ rpc GeoCurrenciesSync (GrpcInputGeoSync) returns (GrpcDtoGeoCurrenciesSync);
369
+ rpc GeoLanguagesSync (GrpcInputGeoSync) returns (GrpcDtoGeoLanguagesSync);
370
+ rpc GeoLocalesSync (GrpcInputGeoSync) returns (GrpcDtoGeoLocalesSync);
371
+ rpc GeoDivisionsSync (GrpcInputGeoSync) returns (GrpcDtoGeoDivisionsSync);
372
+ rpc GeoCountryMetasSync (GrpcInputGeoSync) returns (GrpcDtoGeoCountryMetasSync);
373
+ rpc GeoCountryTimezonesSync (GrpcInputGeoSync) returns (GrpcDtoGeoCountryTimezonesSync);
374
+ rpc GeoCountryCurrenciesSync(GrpcInputGeoSync) returns (GrpcDtoGeoCountryCurrenciesSync);
375
+ rpc GeoCountryLanguagesSync (GrpcInputGeoSync) returns (GrpcDtoGeoCountryLanguagesSync);
233
376
  }