@arbiwallet/contracts 1.0.217 → 1.0.218

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,15 @@ 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
+ requestId?: string | undefined;
49
35
  clientType?: string | undefined;
50
36
  }
51
37
 
52
38
  export interface CreateExchangeDealRequest {
53
- actor: ActorContext | undefined;
39
+ authManagerContext: AuthManagerContext | undefined;
54
40
  calculationId?: string | undefined;
55
41
  paymentId?: string | undefined;
56
42
  methodId: string;
@@ -94,7 +80,7 @@ export interface CreateExchangeDealResponse {
94
80
  }
95
81
 
96
82
  export interface GetExchangeDealsRequest {
97
- actor: ActorContext | undefined;
83
+ authManagerContext: AuthManagerContext | undefined;
98
84
  fromDate?: string | undefined;
99
85
  toDate?: string | undefined;
100
86
  managerId?: string | undefined;
@@ -133,7 +119,7 @@ export interface GetExchangeDealsResponse {
133
119
  }
134
120
 
135
121
  export interface UpdateExchangeDealRequest {
136
- actor: ActorContext | undefined;
122
+ authManagerContext: AuthManagerContext | undefined;
137
123
  id: string;
138
124
  customerId?: string | undefined;
139
125
  inputAmount?: number | undefined;
@@ -180,7 +166,7 @@ export interface UpdateExchangeDealResponse {
180
166
  }
181
167
 
182
168
  export interface CompleteExchangeDealRequest {
183
- actor: ActorContext | undefined;
169
+ authManagerContext: AuthManagerContext | undefined;
184
170
  id: string;
185
171
  }
186
172
 
@@ -188,10 +174,11 @@ export interface CompleteExchangeDealResponse {
188
174
  success: boolean;
189
175
  message?: string | undefined;
190
176
  error?: string | undefined;
177
+ validationErrors?: { [key: string]: any } | undefined;
191
178
  }
192
179
 
193
180
  export interface CancelExchangeDealRequest {
194
- actor: ActorContext | undefined;
181
+ authManagerContext: AuthManagerContext | undefined;
195
182
  id: string;
196
183
  }
197
184
 
@@ -199,10 +186,11 @@ export interface CancelExchangeDealResponse {
199
186
  success: boolean;
200
187
  message?: string | undefined;
201
188
  error?: string | undefined;
189
+ validationErrors?: { [key: string]: any } | undefined;
202
190
  }
203
191
 
204
192
  export interface GetTransactionsRequest {
205
- actor: ActorContext | undefined;
193
+ authManagerContext: AuthManagerContext | undefined;
206
194
  startDate?: string | undefined;
207
195
  endDate?: string | undefined;
208
196
  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.218",
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,15 @@ 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
+ optional string request_id = 3;
102
+ optional string client_type = 4;
106
103
  }
107
104
 
108
105
  message CreateExchangeDealRequest {
109
- ActorContext actor = 1;
106
+ AuthManagerContext auth_manager_context = 1;
110
107
 
111
108
  optional string calculation_id = 3;
112
109
  optional string payment_id = 4;
@@ -159,7 +156,7 @@ message CreateExchangeDealResponse {
159
156
  }
160
157
 
161
158
  message GetExchangeDealsRequest {
162
- ActorContext actor = 1;
159
+ AuthManagerContext auth_manager_context = 1;
163
160
  optional string from_date = 2;
164
161
  optional string to_date = 3;
165
162
  optional string manager_id = 4;
@@ -198,7 +195,7 @@ message GetExchangeDealsResponse {
198
195
  }
199
196
 
200
197
  message UpdateExchangeDealRequest {
201
- ActorContext actor = 1;
198
+ AuthManagerContext auth_manager_context = 1;
202
199
  string id = 2;
203
200
 
204
201
  optional string customer_id = 3;
@@ -247,7 +244,7 @@ message UpdateExchangeDealResponse {
247
244
  }
248
245
 
249
246
  message CompleteExchangeDealRequest {
250
- ActorContext actor = 1;
247
+ AuthManagerContext auth_manager_context = 1;
251
248
  string id = 2;
252
249
  }
253
250
 
@@ -255,10 +252,11 @@ message CompleteExchangeDealResponse {
255
252
  bool success = 1;
256
253
  optional string message = 2;
257
254
  optional string error = 3;
255
+ optional google.protobuf.Struct validationErrors = 4;
258
256
  }
259
257
 
260
258
  message CancelExchangeDealRequest {
261
- ActorContext actor = 1;
259
+ AuthManagerContext auth_manager_context = 1;
262
260
  string id = 2;
263
261
  }
264
262
 
@@ -266,11 +264,11 @@ message CancelExchangeDealResponse {
266
264
  bool success = 1;
267
265
  optional string message = 2;
268
266
  optional string error = 3;
267
+ optional google.protobuf.Struct validationErrors = 4;
269
268
  }
270
269
 
271
-
272
270
  message GetTransactionsRequest {
273
- ActorContext actor = 1;
271
+ AuthManagerContext auth_manager_context = 1;
274
272
  optional string start_date = 2;
275
273
  optional string end_date = 3;
276
274
  optional string user_id = 4;