@faiber/faiber-idp 0.3.0 → 0.5.0

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.
@@ -1,32 +1,49 @@
1
1
  import type { ApiEnvelope, JsonObject, JsonValue, QueryParams } from "@faiber/sdk-core";
2
2
  /** Generated route contracts. Dynamic payload members remain JSON-safe and are documented with their Rust source type. */
3
- /** Backend response type: response without a declared JSON model. */
3
+ /** Backend response type: handler-defined response. */
4
4
  export interface RouterStatusRouteGetResponse extends ApiEnvelope<JsonValue> {
5
5
  }
6
- /** Backend response type: response without a declared JSON model. */
6
+ /** Backend response type: handler-defined response. */
7
7
  export interface RouterOpenapiJsonGetResponse extends ApiEnvelope<JsonValue> {
8
8
  }
9
9
  /** Backend response type: PermissionListResponse. */
10
+ export interface AclPermissionsIndexGetResponseDataPermissions extends JsonObject {
11
+ "id": string;
12
+ "name": string;
13
+ }
10
14
  export interface AclPermissionsIndexGetResponseData extends JsonObject {
11
- "permissions": JsonValue[];
15
+ "permissions": AclPermissionsIndexGetResponseDataPermissions[];
12
16
  "services": string[];
13
17
  }
14
18
  export interface AclPermissionsIndexGetResponse extends ApiEnvelope<AclPermissionsIndexGetResponseData> {
15
19
  }
16
20
  /** Backend response type: RoleListResponse. */
21
+ export interface AclRolesIndexGetResponseDataRoles extends JsonObject {
22
+ "id": string;
23
+ "name": string;
24
+ }
17
25
  export interface AclRolesIndexGetResponseData extends JsonObject {
18
- "roles": JsonValue[];
26
+ "roles": AclRolesIndexGetResponseDataRoles[];
19
27
  }
20
28
  export interface AclRolesIndexGetResponse extends ApiEnvelope<AclRolesIndexGetResponseData> {
21
29
  }
22
30
  /** Backend request type: CreateRole. */
23
31
  export interface AclRolesCreatePostInput extends JsonObject {
24
32
  "name": string;
25
- "permissions": string[];
33
+ "permissions"?: string[];
26
34
  }
27
35
  /** Backend response type: RoleSingleResponse. */
36
+ export interface AclRolesCreatePostResponseDataRolePermissions extends JsonObject {
37
+ "id": string;
38
+ "name": string;
39
+ }
40
+ export interface AclRolesCreatePostResponseDataRole extends JsonObject {
41
+ "id": string;
42
+ "name": string;
43
+ "permissions": AclRolesCreatePostResponseDataRolePermissions[];
44
+ }
28
45
  export interface AclRolesCreatePostResponseData extends JsonObject {
29
- "role": JsonValue;
46
+ "role": AclRolesCreatePostResponseDataRole;
30
47
  }
31
48
  export interface AclRolesCreatePostResponse extends ApiEnvelope<AclRolesCreatePostResponseData> {
32
49
  }
@@ -38,8 +55,17 @@ export interface AclRolesDeleteDeleteResponseData extends JsonObject {
38
55
  export interface AclRolesDeleteDeleteResponse extends ApiEnvelope<AclRolesDeleteDeleteResponseData> {
39
56
  }
40
57
  /** Backend response type: RoleSingleResponse. */
58
+ export interface AclRolesShowGetResponseDataRolePermissions extends JsonObject {
59
+ "id": string;
60
+ "name": string;
61
+ }
62
+ export interface AclRolesShowGetResponseDataRole extends JsonObject {
63
+ "id": string;
64
+ "name": string;
65
+ "permissions": AclRolesShowGetResponseDataRolePermissions[];
66
+ }
41
67
  export interface AclRolesShowGetResponseData extends JsonObject {
42
- "role": JsonValue;
68
+ "role": AclRolesShowGetResponseDataRole;
43
69
  }
44
70
  export interface AclRolesShowGetResponse extends ApiEnvelope<AclRolesShowGetResponseData> {
45
71
  }
@@ -48,8 +74,17 @@ export interface AclRolesUpdatePatchInput extends JsonObject {
48
74
  "permissions": string[];
49
75
  }
50
76
  /** Backend response type: RoleSingleResponse. */
77
+ export interface AclRolesUpdatePatchResponseDataRolePermissions extends JsonObject {
78
+ "id": string;
79
+ "name": string;
80
+ }
81
+ export interface AclRolesUpdatePatchResponseDataRole extends JsonObject {
82
+ "id": string;
83
+ "name": string;
84
+ "permissions": AclRolesUpdatePatchResponseDataRolePermissions[];
85
+ }
51
86
  export interface AclRolesUpdatePatchResponseData extends JsonObject {
52
- "role": JsonValue;
87
+ "role": AclRolesUpdatePatchResponseDataRole;
53
88
  }
54
89
  export interface AclRolesUpdatePatchResponse extends ApiEnvelope<AclRolesUpdatePatchResponseData> {
55
90
  }
@@ -58,24 +93,41 @@ export interface AclRolesUpdatePutInput extends JsonObject {
58
93
  "permissions": string[];
59
94
  }
60
95
  /** Backend response type: RoleSingleResponse. */
96
+ export interface AclRolesUpdatePutResponseDataRolePermissions extends JsonObject {
97
+ "id": string;
98
+ "name": string;
99
+ }
100
+ export interface AclRolesUpdatePutResponseDataRole extends JsonObject {
101
+ "id": string;
102
+ "name": string;
103
+ "permissions": AclRolesUpdatePutResponseDataRolePermissions[];
104
+ }
61
105
  export interface AclRolesUpdatePutResponseData extends JsonObject {
62
- "role": JsonValue;
106
+ "role": AclRolesUpdatePutResponseDataRole;
63
107
  }
64
108
  export interface AclRolesUpdatePutResponse extends ApiEnvelope<AclRolesUpdatePutResponseData> {
65
109
  }
66
110
  /** Backend request type: AccountTokenRequest. */
67
111
  export interface AuthLoginAccountPostInput extends JsonObject {
68
112
  "account": string;
69
- "device_id"?: string;
113
+ "device_id"?: string | null;
70
114
  }
71
- /** Backend response type: response without a declared JSON model. */
115
+ /** Backend response type: handler-defined response. */
72
116
  export interface AuthLoginAccountPostResponse extends ApiEnvelope<JsonValue> {
73
117
  }
74
- /** Backend response type: response without a declared JSON model. */
118
+ /** Backend response type: handler-defined response. */
75
119
  export interface AuthGenerateOneTimeTokenRoutePostResponse extends ApiEnvelope<JsonValue> {
76
120
  }
77
121
  /** Backend response type: LinkedIdentitiesResponse. */
78
- export interface AuthListLinkedIdentitiesGetResponse extends ApiEnvelope<JsonValue> {
122
+ export interface AuthListLinkedIdentitiesGetResponseDataIdentities extends JsonObject {
123
+ "provider": string;
124
+ "provider_id": string;
125
+ "linked_at": string;
126
+ }
127
+ export interface AuthListLinkedIdentitiesGetResponseData extends JsonObject {
128
+ "identities": AuthListLinkedIdentitiesGetResponseDataIdentities[];
129
+ }
130
+ export interface AuthListLinkedIdentitiesGetResponse extends ApiEnvelope<AuthListLinkedIdentitiesGetResponseData> {
79
131
  }
80
132
  /** Backend request type: PasswordTokenRequest. */
81
133
  export interface AuthLoginPostInput extends JsonObject {
@@ -84,29 +136,38 @@ export interface AuthLoginPostInput extends JsonObject {
84
136
  "password": string;
85
137
  "client_id": string;
86
138
  "client_secret": string;
87
- "device_id"?: string;
139
+ "device_id"?: string | null;
88
140
  }
89
- /** Backend response type: response without a declared JSON model. */
141
+ /** Backend response type: handler-defined response. */
90
142
  export interface AuthLoginPostResponse extends ApiEnvelope<JsonValue> {
91
143
  }
92
- /** Backend response type: response without a declared JSON model. */
144
+ /** Backend response type: handler-defined response. */
145
+ export interface AuthLogoutGetResponse extends ApiEnvelope<JsonValue> {
146
+ }
147
+ /** Backend response type: handler-defined response. */
148
+ export interface AuthAuthorizeGetResponse extends ApiEnvelope<JsonValue> {
149
+ }
150
+ /** Backend response type: handler-defined response. */
151
+ export interface AuthTokenPostResponse extends ApiEnvelope<JsonValue> {
152
+ }
153
+ /** Backend response type: handler-defined response. */
93
154
  export interface AuthOauthUnlinkDeleteResponse extends ApiEnvelope<JsonValue> {
94
155
  }
95
156
  /** Backend query type: OAuthStartQuery. */
96
157
  export interface AuthOauthStartGetQuery extends QueryParams {
97
- "redirect"?: string;
98
- "intent"?: string;
158
+ "redirect"?: string | null;
159
+ "intent"?: string | null;
99
160
  }
100
- /** Backend response type: response without a declared JSON model. */
161
+ /** Backend response type: handler-defined response. */
101
162
  export interface AuthOauthStartGetResponse extends ApiEnvelope<JsonValue> {
102
163
  }
103
164
  /** Backend query type: OAuthCallbackQuery. */
104
165
  export interface AuthOauthCallbackGetQuery extends QueryParams {
105
- "code"?: string;
106
- "state"?: string;
107
- "error"?: string;
166
+ "code"?: string | null;
167
+ "state"?: string | null;
168
+ "error"?: string | null;
108
169
  }
109
- /** Backend response type: response without a declared JSON model. */
170
+ /** Backend response type: handler-defined response. */
110
171
  export interface AuthOauthCallbackGetResponse extends ApiEnvelope<JsonValue> {
111
172
  }
112
173
  /** Backend response type: OAuthProvidersPublicResponse. */
@@ -122,31 +183,51 @@ export interface AuthOtpLoginPostInput extends JsonObject {
122
183
  "otp_code": string;
123
184
  "client_id": string;
124
185
  "client_secret": string;
125
- "device_id"?: string;
186
+ "device_id"?: string | null;
126
187
  }
127
- /** Backend response type: response without a declared JSON model. */
188
+ /** Backend response type: handler-defined response. */
128
189
  export interface AuthOtpLoginPostResponse extends ApiEnvelope<JsonValue> {
129
190
  }
130
- /** Backend response type: response without a declared JSON model. */
191
+ /** Backend response type: handler-defined response. */
131
192
  export interface AuthRefreshTokenGetResponse extends ApiEnvelope<JsonValue> {
132
193
  }
133
- /** Backend response type: response without a declared JSON model. */
194
+ /** Backend response type: handler-defined response. */
134
195
  export interface AuthGenerateSecureOneTimeTokenRoutePostResponse extends ApiEnvelope<JsonValue> {
135
196
  }
197
+ /** Backend response type: Vec<SessionResponse>. */
198
+ export interface AuthListSessionsGetResponseItemClient extends JsonObject {
199
+ "id": string;
200
+ "name": string;
201
+ }
202
+ export interface AuthListSessionsGetResponseItem extends JsonObject {
203
+ "id": string;
204
+ "client": AuthListSessionsGetResponseItemClient;
205
+ "browser": string;
206
+ "operating_system": string;
207
+ "device_id"?: string | null;
208
+ "user_agent"?: string | null;
209
+ "ip_address"?: string | null;
210
+ "ip_address_v6"?: string | null;
211
+ "created_at": string;
212
+ "last_accessed"?: string | null;
213
+ "is_current": boolean;
214
+ }
215
+ export interface AuthListSessionsGetResponse extends ApiEnvelope<AuthListSessionsGetResponseItem[]> {
216
+ }
217
+ /** Backend response type: handler-defined response. */
218
+ export interface AuthDeleteSessionDeleteResponse extends ApiEnvelope<JsonValue> {
219
+ }
136
220
  /** Backend query type: TokenQuery. */
137
221
  export interface AuthLoginTokenGetQuery extends QueryParams {
138
222
  "token": string;
139
223
  "redirect": string;
140
224
  }
141
- /** Backend response type: response without a declared JSON model. */
225
+ /** Backend response type: handler-defined response. */
142
226
  export interface AuthLoginTokenGetResponse extends ApiEnvelope<JsonValue> {
143
227
  }
144
- /** Backend response type: response without a declared JSON model. */
228
+ /** Backend response type: handler-defined response. */
145
229
  export interface AuthValidateGetResponse extends ApiEnvelope<JsonValue> {
146
230
  }
147
- /** Backend response type: response without a declared JSON model. */
148
- export interface AuthLogoutGetResponse extends ApiEnvelope<JsonValue> {
149
- }
150
231
  /** Backend request type: PasswordTokenRequest. */
151
232
  export interface AuthLoginWebPostInput extends JsonObject {
152
233
  "grant_type": string;
@@ -154,44 +235,87 @@ export interface AuthLoginWebPostInput extends JsonObject {
154
235
  "password": string;
155
236
  "client_id": string;
156
237
  "client_secret": string;
157
- "device_id"?: string;
238
+ "device_id"?: string | null;
158
239
  }
159
- /** Backend response type: response without a declared JSON model. */
240
+ /** Backend response type: handler-defined response. */
160
241
  export interface AuthLoginWebPostResponse extends ApiEnvelope<JsonValue> {
161
242
  }
162
243
  /** Backend response type: infera_flow_sdk::FlowIntegrationResponse. */
163
244
  export interface IntegrationFlowIntegrationShowGetResponse extends ApiEnvelope<JsonValue> {
164
245
  }
165
246
  /** Backend response type: OAuthSettingsResponse. */
247
+ export interface SettingsOauthSettingsShowGetResponseDataGoogle extends JsonObject {
248
+ "client_id": string;
249
+ "has_secret": boolean;
250
+ "scope"?: string | null;
251
+ }
252
+ export interface SettingsOauthSettingsShowGetResponseDataGithub extends JsonObject {
253
+ "client_id": string;
254
+ "has_secret": boolean;
255
+ "scope"?: string | null;
256
+ }
166
257
  export interface SettingsOauthSettingsShowGetResponseData extends JsonObject {
167
- "google": JsonValue;
168
- "github": JsonValue;
258
+ "google": SettingsOauthSettingsShowGetResponseDataGoogle;
259
+ "github": SettingsOauthSettingsShowGetResponseDataGithub;
169
260
  }
170
261
  export interface SettingsOauthSettingsShowGetResponse extends ApiEnvelope<SettingsOauthSettingsShowGetResponseData> {
171
262
  }
172
263
  /** Backend request type: UpdateOAuthSettings. */
264
+ export interface SettingsOauthSettingsUpdatePutInputGoogle extends JsonObject {
265
+ "client_id": string;
266
+ "client_secret"?: string | null;
267
+ "scope"?: string | null;
268
+ }
269
+ export interface SettingsOauthSettingsUpdatePutInputGithub extends JsonObject {
270
+ "client_id": string;
271
+ "client_secret"?: string | null;
272
+ "scope"?: string | null;
273
+ }
173
274
  export interface SettingsOauthSettingsUpdatePutInput extends JsonObject {
174
- "google": JsonValue;
175
- "github": JsonValue;
275
+ "google": SettingsOauthSettingsUpdatePutInputGoogle;
276
+ "github": SettingsOauthSettingsUpdatePutInputGithub;
176
277
  }
177
278
  /** Backend response type: OAuthSettingsResponse. */
279
+ export interface SettingsOauthSettingsUpdatePutResponseDataGoogle extends JsonObject {
280
+ "client_id": string;
281
+ "has_secret": boolean;
282
+ "scope"?: string | null;
283
+ }
284
+ export interface SettingsOauthSettingsUpdatePutResponseDataGithub extends JsonObject {
285
+ "client_id": string;
286
+ "has_secret": boolean;
287
+ "scope"?: string | null;
288
+ }
178
289
  export interface SettingsOauthSettingsUpdatePutResponseData extends JsonObject {
179
- "google": JsonValue;
180
- "github": JsonValue;
290
+ "google": SettingsOauthSettingsUpdatePutResponseDataGoogle;
291
+ "github": SettingsOauthSettingsUpdatePutResponseDataGithub;
181
292
  }
182
293
  export interface SettingsOauthSettingsUpdatePutResponse extends ApiEnvelope<SettingsOauthSettingsUpdatePutResponseData> {
183
294
  }
184
295
  /** Backend query type: UsersQuery. */
185
296
  export interface UserUsersIndexGetQuery extends QueryParams {
186
- "search"?: string;
187
- "status"?: string;
188
- "role_id"?: string;
189
- "page"?: number;
190
- "per_page"?: number;
297
+ "search"?: string | null;
298
+ "status"?: string | null;
299
+ "role_id"?: string | null;
300
+ "page"?: number | null;
301
+ "per_page"?: number | null;
191
302
  }
192
303
  /** Backend response type: UserListResponse. */
304
+ export interface UserUsersIndexGetResponseDataUsersRoles extends JsonObject {
305
+ "id": string;
306
+ "name": string;
307
+ }
308
+ export interface UserUsersIndexGetResponseDataUsers extends JsonObject {
309
+ "id": string;
310
+ "phone"?: string | null;
311
+ "email"?: string | null;
312
+ "national_code"?: string | null;
313
+ "status": number;
314
+ "active_sessions": number;
315
+ "roles": UserUsersIndexGetResponseDataUsersRoles[];
316
+ }
193
317
  export interface UserUsersIndexGetResponseData extends JsonObject {
194
- "users": JsonValue[];
318
+ "users": UserUsersIndexGetResponseDataUsers[];
195
319
  "total": number;
196
320
  "page": number;
197
321
  "per_page": number;
@@ -200,97 +324,227 @@ export interface UserUsersIndexGetResponse extends ApiEnvelope<UserUsersIndexGet
200
324
  }
201
325
  /** Backend request type: CreateUser. */
202
326
  export interface UserUserCreatePostInput extends JsonObject {
203
- "phone"?: string;
204
- "email"?: string;
205
- "national_code"?: string;
206
- "password"?: string;
207
- "roles": string[];
327
+ "phone"?: string | null;
328
+ "email"?: string | null;
329
+ "national_code"?: string | null;
330
+ "password"?: string | null;
331
+ "roles"?: string[];
208
332
  }
209
333
  /** Backend response type: UserResponse. */
334
+ export interface UserUserCreatePostResponseDataUserRoles extends JsonObject {
335
+ "id": string;
336
+ "name": string;
337
+ }
338
+ export interface UserUserCreatePostResponseDataUser extends JsonObject {
339
+ "id": string;
340
+ "phone"?: string | null;
341
+ "email"?: string | null;
342
+ "national_code"?: string | null;
343
+ "status": number;
344
+ "active_sessions": number;
345
+ "roles": UserUserCreatePostResponseDataUserRoles[];
346
+ }
210
347
  export interface UserUserCreatePostResponseData extends JsonObject {
211
- "user": JsonValue;
348
+ "user": UserUserCreatePostResponseDataUser;
212
349
  }
213
350
  export interface UserUserCreatePostResponse extends ApiEnvelope<UserUserCreatePostResponseData> {
214
351
  }
215
352
  /** Backend response type: UserResponse. */
353
+ export interface UserUserDeleteDeleteResponseDataUserRoles extends JsonObject {
354
+ "id": string;
355
+ "name": string;
356
+ }
357
+ export interface UserUserDeleteDeleteResponseDataUser extends JsonObject {
358
+ "id": string;
359
+ "phone"?: string | null;
360
+ "email"?: string | null;
361
+ "national_code"?: string | null;
362
+ "status": number;
363
+ "active_sessions": number;
364
+ "roles": UserUserDeleteDeleteResponseDataUserRoles[];
365
+ }
216
366
  export interface UserUserDeleteDeleteResponseData extends JsonObject {
217
- "user": JsonValue;
367
+ "user": UserUserDeleteDeleteResponseDataUser;
218
368
  }
219
369
  export interface UserUserDeleteDeleteResponse extends ApiEnvelope<UserUserDeleteDeleteResponseData> {
220
370
  }
221
371
  /** Backend response type: UserResponse. */
372
+ export interface UserUserFindGetResponseDataUserRoles extends JsonObject {
373
+ "id": string;
374
+ "name": string;
375
+ }
376
+ export interface UserUserFindGetResponseDataUser extends JsonObject {
377
+ "id": string;
378
+ "phone"?: string | null;
379
+ "email"?: string | null;
380
+ "national_code"?: string | null;
381
+ "status": number;
382
+ "active_sessions": number;
383
+ "roles": UserUserFindGetResponseDataUserRoles[];
384
+ }
222
385
  export interface UserUserFindGetResponseData extends JsonObject {
223
- "user": JsonValue;
386
+ "user": UserUserFindGetResponseDataUser;
224
387
  }
225
388
  export interface UserUserFindGetResponse extends ApiEnvelope<UserUserFindGetResponseData> {
226
389
  }
227
390
  /** Backend request type: UpdateUser. */
228
391
  export interface UserUserUpdatePatchInput extends JsonObject {
229
- "phone"?: string;
230
- "email"?: string;
231
- "national_code"?: string;
392
+ "phone"?: string | null;
393
+ "email"?: string | null;
394
+ "national_code"?: string | null;
232
395
  }
233
396
  /** Backend response type: UserResponse. */
397
+ export interface UserUserUpdatePatchResponseDataUserRoles extends JsonObject {
398
+ "id": string;
399
+ "name": string;
400
+ }
401
+ export interface UserUserUpdatePatchResponseDataUser extends JsonObject {
402
+ "id": string;
403
+ "phone"?: string | null;
404
+ "email"?: string | null;
405
+ "national_code"?: string | null;
406
+ "status": number;
407
+ "active_sessions": number;
408
+ "roles": UserUserUpdatePatchResponseDataUserRoles[];
409
+ }
234
410
  export interface UserUserUpdatePatchResponseData extends JsonObject {
235
- "user": JsonValue;
411
+ "user": UserUserUpdatePatchResponseDataUser;
236
412
  }
237
413
  export interface UserUserUpdatePatchResponse extends ApiEnvelope<UserUserUpdatePatchResponseData> {
238
414
  }
239
415
  /** Backend request type: UpdateUser. */
240
416
  export interface UserUserUpdatePutInput extends JsonObject {
241
- "phone"?: string;
242
- "email"?: string;
243
- "national_code"?: string;
417
+ "phone"?: string | null;
418
+ "email"?: string | null;
419
+ "national_code"?: string | null;
244
420
  }
245
421
  /** Backend response type: UserResponse. */
422
+ export interface UserUserUpdatePutResponseDataUserRoles extends JsonObject {
423
+ "id": string;
424
+ "name": string;
425
+ }
426
+ export interface UserUserUpdatePutResponseDataUser extends JsonObject {
427
+ "id": string;
428
+ "phone"?: string | null;
429
+ "email"?: string | null;
430
+ "national_code"?: string | null;
431
+ "status": number;
432
+ "active_sessions": number;
433
+ "roles": UserUserUpdatePutResponseDataUserRoles[];
434
+ }
246
435
  export interface UserUserUpdatePutResponseData extends JsonObject {
247
- "user": JsonValue;
436
+ "user": UserUserUpdatePutResponseDataUser;
248
437
  }
249
438
  export interface UserUserUpdatePutResponse extends ApiEnvelope<UserUserUpdatePutResponseData> {
250
439
  }
251
440
  /** Backend request type: UpdateUserPassword. */
252
441
  export interface UserChangePasswordPatchInput extends JsonObject {
253
- "password"?: string;
442
+ "password"?: string | null;
254
443
  }
255
444
  /** Backend response type: UserResponse. */
445
+ export interface UserChangePasswordPatchResponseDataUserRoles extends JsonObject {
446
+ "id": string;
447
+ "name": string;
448
+ }
449
+ export interface UserChangePasswordPatchResponseDataUser extends JsonObject {
450
+ "id": string;
451
+ "phone"?: string | null;
452
+ "email"?: string | null;
453
+ "national_code"?: string | null;
454
+ "status": number;
455
+ "active_sessions": number;
456
+ "roles": UserChangePasswordPatchResponseDataUserRoles[];
457
+ }
256
458
  export interface UserChangePasswordPatchResponseData extends JsonObject {
257
- "user": JsonValue;
459
+ "user": UserChangePasswordPatchResponseDataUser;
258
460
  }
259
461
  export interface UserChangePasswordPatchResponse extends ApiEnvelope<UserChangePasswordPatchResponseData> {
260
462
  }
261
463
  /** Backend request type: UpdateUserPassword. */
262
464
  export interface UserChangePasswordPutInput extends JsonObject {
263
- "password"?: string;
465
+ "password"?: string | null;
264
466
  }
265
467
  /** Backend response type: UserResponse. */
468
+ export interface UserChangePasswordPutResponseDataUserRoles extends JsonObject {
469
+ "id": string;
470
+ "name": string;
471
+ }
472
+ export interface UserChangePasswordPutResponseDataUser extends JsonObject {
473
+ "id": string;
474
+ "phone"?: string | null;
475
+ "email"?: string | null;
476
+ "national_code"?: string | null;
477
+ "status": number;
478
+ "active_sessions": number;
479
+ "roles": UserChangePasswordPutResponseDataUserRoles[];
480
+ }
266
481
  export interface UserChangePasswordPutResponseData extends JsonObject {
267
- "user": JsonValue;
482
+ "user": UserChangePasswordPutResponseDataUser;
268
483
  }
269
484
  export interface UserChangePasswordPutResponse extends ApiEnvelope<UserChangePasswordPutResponseData> {
270
485
  }
271
486
  /** Backend request type: UpdateUserRoles. */
272
487
  export interface UserChangeRolesPatchInput extends JsonObject {
273
- "roles"?: string[];
488
+ "roles"?: string[] | null;
274
489
  }
275
490
  /** Backend response type: UserResponse. */
491
+ export interface UserChangeRolesPatchResponseDataUserRoles extends JsonObject {
492
+ "id": string;
493
+ "name": string;
494
+ }
495
+ export interface UserChangeRolesPatchResponseDataUser extends JsonObject {
496
+ "id": string;
497
+ "phone"?: string | null;
498
+ "email"?: string | null;
499
+ "national_code"?: string | null;
500
+ "status": number;
501
+ "active_sessions": number;
502
+ "roles": UserChangeRolesPatchResponseDataUserRoles[];
503
+ }
276
504
  export interface UserChangeRolesPatchResponseData extends JsonObject {
277
- "user": JsonValue;
505
+ "user": UserChangeRolesPatchResponseDataUser;
278
506
  }
279
507
  export interface UserChangeRolesPatchResponse extends ApiEnvelope<UserChangeRolesPatchResponseData> {
280
508
  }
281
509
  /** Backend request type: UpdateUserRoles. */
282
510
  export interface UserChangeRolesPutInput extends JsonObject {
283
- "roles"?: string[];
511
+ "roles"?: string[] | null;
284
512
  }
285
513
  /** Backend response type: UserResponse. */
514
+ export interface UserChangeRolesPutResponseDataUserRoles extends JsonObject {
515
+ "id": string;
516
+ "name": string;
517
+ }
518
+ export interface UserChangeRolesPutResponseDataUser extends JsonObject {
519
+ "id": string;
520
+ "phone"?: string | null;
521
+ "email"?: string | null;
522
+ "national_code"?: string | null;
523
+ "status": number;
524
+ "active_sessions": number;
525
+ "roles": UserChangeRolesPutResponseDataUserRoles[];
526
+ }
286
527
  export interface UserChangeRolesPutResponseData extends JsonObject {
287
- "user": JsonValue;
528
+ "user": UserChangeRolesPutResponseDataUser;
288
529
  }
289
530
  export interface UserChangeRolesPutResponse extends ApiEnvelope<UserChangeRolesPutResponseData> {
290
531
  }
291
532
  /** Backend response type: UserResponse. */
533
+ export interface UserUserLogoutGetResponseDataUserRoles extends JsonObject {
534
+ "id": string;
535
+ "name": string;
536
+ }
537
+ export interface UserUserLogoutGetResponseDataUser extends JsonObject {
538
+ "id": string;
539
+ "phone"?: string | null;
540
+ "email"?: string | null;
541
+ "national_code"?: string | null;
542
+ "status": number;
543
+ "active_sessions": number;
544
+ "roles": UserUserLogoutGetResponseDataUserRoles[];
545
+ }
292
546
  export interface UserUserLogoutGetResponseData extends JsonObject {
293
- "user": JsonValue;
547
+ "user": UserUserLogoutGetResponseDataUser;
294
548
  }
295
549
  export interface UserUserLogoutGetResponse extends ApiEnvelope<UserUserLogoutGetResponseData> {
296
550
  }
@@ -299,8 +553,21 @@ export interface UserUserSetStatusPatchInput extends JsonObject {
299
553
  "enabled": boolean;
300
554
  }
301
555
  /** Backend response type: UserResponse. */
556
+ export interface UserUserSetStatusPatchResponseDataUserRoles extends JsonObject {
557
+ "id": string;
558
+ "name": string;
559
+ }
560
+ export interface UserUserSetStatusPatchResponseDataUser extends JsonObject {
561
+ "id": string;
562
+ "phone"?: string | null;
563
+ "email"?: string | null;
564
+ "national_code"?: string | null;
565
+ "status": number;
566
+ "active_sessions": number;
567
+ "roles": UserUserSetStatusPatchResponseDataUserRoles[];
568
+ }
302
569
  export interface UserUserSetStatusPatchResponseData extends JsonObject {
303
- "user": JsonValue;
570
+ "user": UserUserSetStatusPatchResponseDataUser;
304
571
  }
305
572
  export interface UserUserSetStatusPatchResponse extends ApiEnvelope<UserUserSetStatusPatchResponseData> {
306
573
  }
@@ -309,22 +576,39 @@ export interface UserUserSetStatusPutInput extends JsonObject {
309
576
  "enabled": boolean;
310
577
  }
311
578
  /** Backend response type: UserResponse. */
579
+ export interface UserUserSetStatusPutResponseDataUserRoles extends JsonObject {
580
+ "id": string;
581
+ "name": string;
582
+ }
583
+ export interface UserUserSetStatusPutResponseDataUser extends JsonObject {
584
+ "id": string;
585
+ "phone"?: string | null;
586
+ "email"?: string | null;
587
+ "national_code"?: string | null;
588
+ "status": number;
589
+ "active_sessions": number;
590
+ "roles": UserUserSetStatusPutResponseDataUserRoles[];
591
+ }
312
592
  export interface UserUserSetStatusPutResponseData extends JsonObject {
313
- "user": JsonValue;
593
+ "user": UserUserSetStatusPutResponseDataUser;
314
594
  }
315
595
  export interface UserUserSetStatusPutResponse extends ApiEnvelope<UserUserSetStatusPutResponseData> {
316
596
  }
317
597
  /** Backend request type: FullRegister. */
318
598
  export interface UserRegisterPostInput extends JsonObject {
319
- "phone"?: string;
320
- "email"?: string;
321
- "national_code"?: string;
322
- "role"?: string;
323
- "roles"?: string[];
599
+ "phone"?: string | null;
600
+ "email"?: string | null;
601
+ "national_code"?: string | null;
602
+ "role"?: string | null;
603
+ "roles"?: string[] | null;
324
604
  }
325
605
  /** Backend response type: FindUserResponse. */
606
+ export interface UserRegisterPostResponseDataUser extends JsonObject {
607
+ "user_id": string;
608
+ "created": boolean;
609
+ }
326
610
  export interface UserRegisterPostResponseData extends JsonObject {
327
- "user": JsonValue;
611
+ "user": UserRegisterPostResponseDataUser;
328
612
  }
329
613
  export interface UserRegisterPostResponse extends ApiEnvelope<UserRegisterPostResponseData> {
330
614
  }
@@ -333,34 +617,64 @@ export interface UserRegisterWithEmailPostInput extends JsonObject {
333
617
  "email": string;
334
618
  }
335
619
  /** Backend response type: RegisterResponse. */
620
+ export interface UserRegisterWithEmailPostResponseDataOtpSent extends JsonObject {
621
+ "phone": boolean;
622
+ "email": boolean;
623
+ }
336
624
  export interface UserRegisterWithEmailPostResponseData extends JsonObject {
337
625
  "user_id": string;
338
- "otp_sent": JsonValue;
626
+ "otp_sent": UserRegisterWithEmailPostResponseDataOtpSent;
339
627
  }
340
628
  export interface UserRegisterWithEmailPostResponse extends ApiEnvelope<UserRegisterWithEmailPostResponseData> {
341
629
  }
342
630
  /** Backend request type: PhoneRegister. */
343
631
  export interface UserRegisterWithPhonePostInput extends JsonObject {
344
632
  "phone": string;
345
- "role"?: string;
346
- "roles"?: string[];
633
+ "role"?: string | null;
634
+ "roles"?: string[] | null;
347
635
  }
348
636
  /** Backend response type: RegisterResponse. */
637
+ export interface UserRegisterWithPhonePostResponseDataOtpSent extends JsonObject {
638
+ "phone": boolean;
639
+ "email": boolean;
640
+ }
349
641
  export interface UserRegisterWithPhonePostResponseData extends JsonObject {
350
642
  "user_id": string;
351
- "otp_sent": JsonValue;
643
+ "otp_sent": UserRegisterWithPhonePostResponseDataOtpSent;
352
644
  }
353
645
  export interface UserRegisterWithPhonePostResponse extends ApiEnvelope<UserRegisterWithPhonePostResponseData> {
354
646
  }
647
+ /** Backend query type: RegistrationStatsQuery. */
648
+ export interface UserUsersRegistrationStatsGetQuery extends QueryParams {
649
+ "range"?: string | null;
650
+ }
651
+ /** Backend response type: RegistrationStatsResponse. */
652
+ export interface UserUsersRegistrationStatsGetResponseDataPoints extends JsonObject {
653
+ "bucket": string;
654
+ "registrations": number;
655
+ }
656
+ export interface UserUsersRegistrationStatsGetResponseData extends JsonObject {
657
+ "points": UserUsersRegistrationStatsGetResponseDataPoints[];
658
+ }
659
+ export interface UserUsersRegistrationStatsGetResponse extends ApiEnvelope<UserUsersRegistrationStatsGetResponseData> {
660
+ }
355
661
  /** Backend response type: UserSelfResponse. */
662
+ export interface UserUserFindSelfGetResponseDataRoles extends JsonObject {
663
+ "id": string;
664
+ "name": string;
665
+ }
666
+ export interface UserUserFindSelfGetResponseDataPermissions extends JsonObject {
667
+ "id": string;
668
+ "name": string;
669
+ }
356
670
  export interface UserUserFindSelfGetResponseData extends JsonObject {
357
671
  "id": string;
358
- "phone"?: string;
359
- "email"?: string;
360
- "national_code"?: string;
672
+ "phone"?: string | null;
673
+ "email"?: string | null;
674
+ "national_code"?: string | null;
361
675
  "status": number;
362
- "roles": JsonValue[];
363
- "permissions": JsonValue[];
676
+ "roles": UserUserFindSelfGetResponseDataRoles[];
677
+ "permissions": UserUserFindSelfGetResponseDataPermissions[];
364
678
  }
365
679
  export interface UserUserFindSelfGetResponse extends ApiEnvelope<UserUserFindSelfGetResponseData> {
366
680
  }