@arbiwallet/contracts 1.0.217 → 1.0.219

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.
@@ -28,29 +28,16 @@ export enum ExchangeDealAction {
28
28
  UNRECOGNIZED = -1,
29
29
  }
30
30
 
31
- export interface ActorContext {
32
- /** users.CustomUser.id */
33
- userId: string;
34
- /** exchanges_manager.id (если есть) */
35
- managerId?:
36
- | string
37
- | undefined;
38
- /** request.user.is_superuser */
39
- isSuperuser: boolean;
40
- /** имена Django-групп из старого проекта */
41
- groupNames: string[];
42
- /** офисы менеджера (для office-based checks) */
31
+ export interface AuthManagerContext {
32
+ managerId: string;
43
33
  officeIds: string[];
44
- /** для аудита/трассировки (по желанию) */
45
- requestId?:
46
- | string
47
- | undefined;
48
- /** тип клиента (опционально) */
34
+ canCrossOffice: boolean;
35
+ requestId?: string | undefined;
49
36
  clientType?: string | undefined;
50
37
  }
51
38
 
52
39
  export interface CreateExchangeDealRequest {
53
- actor: ActorContext | undefined;
40
+ authManagerContext: AuthManagerContext | undefined;
54
41
  calculationId?: string | undefined;
55
42
  paymentId?: string | undefined;
56
43
  methodId: string;
@@ -94,7 +81,7 @@ export interface CreateExchangeDealResponse {
94
81
  }
95
82
 
96
83
  export interface GetExchangeDealsRequest {
97
- actor: ActorContext | undefined;
84
+ authManagerContext: AuthManagerContext | undefined;
98
85
  fromDate?: string | undefined;
99
86
  toDate?: string | undefined;
100
87
  managerId?: string | undefined;
@@ -133,7 +120,7 @@ export interface GetExchangeDealsResponse {
133
120
  }
134
121
 
135
122
  export interface UpdateExchangeDealRequest {
136
- actor: ActorContext | undefined;
123
+ authManagerContext: AuthManagerContext | undefined;
137
124
  id: string;
138
125
  customerId?: string | undefined;
139
126
  inputAmount?: number | undefined;
@@ -180,7 +167,7 @@ export interface UpdateExchangeDealResponse {
180
167
  }
181
168
 
182
169
  export interface CompleteExchangeDealRequest {
183
- actor: ActorContext | undefined;
170
+ authManagerContext: AuthManagerContext | undefined;
184
171
  id: string;
185
172
  }
186
173
 
@@ -188,10 +175,11 @@ export interface CompleteExchangeDealResponse {
188
175
  success: boolean;
189
176
  message?: string | undefined;
190
177
  error?: string | undefined;
178
+ validationErrors?: { [key: string]: any } | undefined;
191
179
  }
192
180
 
193
181
  export interface CancelExchangeDealRequest {
194
- actor: ActorContext | undefined;
182
+ authManagerContext: AuthManagerContext | undefined;
195
183
  id: string;
196
184
  }
197
185
 
@@ -199,10 +187,11 @@ export interface CancelExchangeDealResponse {
199
187
  success: boolean;
200
188
  message?: string | undefined;
201
189
  error?: string | undefined;
190
+ validationErrors?: { [key: string]: any } | undefined;
202
191
  }
203
192
 
204
193
  export interface GetTransactionsRequest {
205
- actor: ActorContext | undefined;
194
+ authManagerContext: AuthManagerContext | undefined;
206
195
  startDate?: string | undefined;
207
196
  endDate?: string | undefined;
208
197
  userId?: string | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arbiwallet/contracts",
3
3
  "descriptions": "Generate and manage smart contracts for ArbiWallet",
4
- "version": "1.0.217",
4
+ "version": "1.0.219",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
@@ -95,18 +95,16 @@ service ExchangeCoreService {
95
95
  // int32 total_pages = 5;
96
96
  // }
97
97
 
98
- message ActorContext {
99
- string user_id = 1; // users.CustomUser.id
100
- optional string manager_id = 2; // exchanges_manager.id (если есть)
101
- bool is_superuser = 3; // request.user.is_superuser
102
- repeated string group_names = 4; // имена Django-групп из старого проекта
103
- repeated string office_ids = 5; // офисы менеджера (для office-based checks)
104
- optional string request_id = 6; // для аудита/трассировки (по желанию)
105
- optional string client_type = 7; // тип клиента (опционально)
98
+ message AuthManagerContext {
99
+ string manager_id = 1;
100
+ repeated string office_ids = 2;
101
+ bool can_cross_office = 3;
102
+ optional string request_id = 4;
103
+ optional string client_type = 5;
106
104
  }
107
105
 
108
106
  message CreateExchangeDealRequest {
109
- ActorContext actor = 1;
107
+ AuthManagerContext auth_manager_context = 1;
110
108
 
111
109
  optional string calculation_id = 3;
112
110
  optional string payment_id = 4;
@@ -159,7 +157,7 @@ message CreateExchangeDealResponse {
159
157
  }
160
158
 
161
159
  message GetExchangeDealsRequest {
162
- ActorContext actor = 1;
160
+ AuthManagerContext auth_manager_context = 1;
163
161
  optional string from_date = 2;
164
162
  optional string to_date = 3;
165
163
  optional string manager_id = 4;
@@ -198,7 +196,7 @@ message GetExchangeDealsResponse {
198
196
  }
199
197
 
200
198
  message UpdateExchangeDealRequest {
201
- ActorContext actor = 1;
199
+ AuthManagerContext auth_manager_context = 1;
202
200
  string id = 2;
203
201
 
204
202
  optional string customer_id = 3;
@@ -247,7 +245,7 @@ message UpdateExchangeDealResponse {
247
245
  }
248
246
 
249
247
  message CompleteExchangeDealRequest {
250
- ActorContext actor = 1;
248
+ AuthManagerContext auth_manager_context = 1;
251
249
  string id = 2;
252
250
  }
253
251
 
@@ -255,10 +253,11 @@ message CompleteExchangeDealResponse {
255
253
  bool success = 1;
256
254
  optional string message = 2;
257
255
  optional string error = 3;
256
+ optional google.protobuf.Struct validationErrors = 4;
258
257
  }
259
258
 
260
259
  message CancelExchangeDealRequest {
261
- ActorContext actor = 1;
260
+ AuthManagerContext auth_manager_context = 1;
262
261
  string id = 2;
263
262
  }
264
263
 
@@ -266,11 +265,11 @@ message CancelExchangeDealResponse {
266
265
  bool success = 1;
267
266
  optional string message = 2;
268
267
  optional string error = 3;
268
+ optional google.protobuf.Struct validationErrors = 4;
269
269
  }
270
270
 
271
-
272
271
  message GetTransactionsRequest {
273
- ActorContext actor = 1;
272
+ AuthManagerContext auth_manager_context = 1;
274
273
  optional string start_date = 2;
275
274
  optional string end_date = 3;
276
275
  optional string user_id = 4;