@@ -10,6 +10,7 @@ def __init__(self, client):
10
10
super (Account , self ).__init__ (client )
11
11
12
12
def get (self ):
13
+ """Get account"""
13
14
14
15
api_path = '/account'
15
16
api_params = {}
@@ -19,6 +20,7 @@ def get(self):
19
20
}, api_params )
20
21
21
22
def create (self , user_id : str , email : str , password : str , name : str = None ):
23
+ """Create account"""
22
24
23
25
api_path = '/account'
24
26
api_params = {}
@@ -42,6 +44,7 @@ def create(self, user_id: str, email: str, password: str, name: str = None):
42
44
}, api_params )
43
45
44
46
def update_email (self , email : str , password : str ):
47
+ """Update email"""
45
48
46
49
api_path = '/account/email'
47
50
api_params = {}
@@ -59,7 +62,8 @@ def update_email(self, email: str, password: str):
59
62
'content-type' : 'application/json' ,
60
63
}, api_params )
61
64
62
- def list_identities (self , queries : list = None ):
65
+ def list_identities (self , queries : list [str ] = None ):
66
+ """List identities"""
63
67
64
68
api_path = '/account/identities'
65
69
api_params = {}
@@ -71,6 +75,7 @@ def list_identities(self, queries: list = None):
71
75
}, api_params )
72
76
73
77
def delete_identity (self , identity_id : str ):
78
+ """Delete identity"""
74
79
75
80
api_path = '/account/identities/{identityId}'
76
81
api_params = {}
@@ -85,6 +90,7 @@ def delete_identity(self, identity_id: str):
85
90
}, api_params )
86
91
87
92
def create_jwt (self ):
93
+ """Create JWT"""
88
94
89
95
api_path = '/account/jwts'
90
96
api_params = {}
@@ -93,7 +99,8 @@ def create_jwt(self):
93
99
'content-type' : 'application/json' ,
94
100
}, api_params )
95
101
96
- def list_logs (self , queries : list = None ):
102
+ def list_logs (self , queries : list [str ] = None ):
103
+ """List logs"""
97
104
98
105
api_path = '/account/logs'
99
106
api_params = {}
@@ -105,6 +112,7 @@ def list_logs(self, queries: list = None):
105
112
}, api_params )
106
113
107
114
def update_mfa (self , mfa : bool ):
115
+ """Update MFA"""
108
116
109
117
api_path = '/account/mfa'
110
118
api_params = {}
@@ -119,6 +127,7 @@ def update_mfa(self, mfa: bool):
119
127
}, api_params )
120
128
121
129
def create_mfa_authenticator (self , type : AuthenticatorType ):
130
+ """Create authenticator"""
122
131
123
132
api_path = '/account/mfa/authenticators/{type}'
124
133
api_params = {}
@@ -133,6 +142,7 @@ def create_mfa_authenticator(self, type: AuthenticatorType):
133
142
}, api_params )
134
143
135
144
def update_mfa_authenticator (self , type : AuthenticatorType , otp : str ):
145
+ """Verify authenticator"""
136
146
137
147
api_path = '/account/mfa/authenticators/{type}'
138
148
api_params = {}
@@ -151,6 +161,7 @@ def update_mfa_authenticator(self, type: AuthenticatorType, otp: str):
151
161
}, api_params )
152
162
153
163
def delete_mfa_authenticator (self , type : AuthenticatorType ):
164
+ """Delete authenticator"""
154
165
155
166
api_path = '/account/mfa/authenticators/{type}'
156
167
api_params = {}
@@ -165,6 +176,7 @@ def delete_mfa_authenticator(self, type: AuthenticatorType):
165
176
}, api_params )
166
177
167
178
def create_mfa_challenge (self , factor : AuthenticationFactor ):
179
+ """Create MFA challenge"""
168
180
169
181
api_path = '/account/mfa/challenge'
170
182
api_params = {}
@@ -179,6 +191,7 @@ def create_mfa_challenge(self, factor: AuthenticationFactor):
179
191
}, api_params )
180
192
181
193
def update_mfa_challenge (self , challenge_id : str , otp : str ):
194
+ """Create MFA challenge (confirmation)"""
182
195
183
196
api_path = '/account/mfa/challenge'
184
197
api_params = {}
@@ -197,6 +210,7 @@ def update_mfa_challenge(self, challenge_id: str, otp: str):
197
210
}, api_params )
198
211
199
212
def list_mfa_factors (self ):
213
+ """List factors"""
200
214
201
215
api_path = '/account/mfa/factors'
202
216
api_params = {}
@@ -206,6 +220,7 @@ def list_mfa_factors(self):
206
220
}, api_params )
207
221
208
222
def get_mfa_recovery_codes (self ):
223
+ """Get MFA recovery codes"""
209
224
210
225
api_path = '/account/mfa/recovery-codes'
211
226
api_params = {}
@@ -215,6 +230,7 @@ def get_mfa_recovery_codes(self):
215
230
}, api_params )
216
231
217
232
def create_mfa_recovery_codes (self ):
233
+ """Create MFA recovery codes"""
218
234
219
235
api_path = '/account/mfa/recovery-codes'
220
236
api_params = {}
@@ -224,6 +240,7 @@ def create_mfa_recovery_codes(self):
224
240
}, api_params )
225
241
226
242
def update_mfa_recovery_codes (self ):
243
+ """Regenerate MFA recovery codes"""
227
244
228
245
api_path = '/account/mfa/recovery-codes'
229
246
api_params = {}
@@ -233,6 +250,7 @@ def update_mfa_recovery_codes(self):
233
250
}, api_params )
234
251
235
252
def update_name (self , name : str ):
253
+ """Update name"""
236
254
237
255
api_path = '/account/name'
238
256
api_params = {}
@@ -247,6 +265,7 @@ def update_name(self, name: str):
247
265
}, api_params )
248
266
249
267
def update_password (self , password : str , old_password : str = None ):
268
+ """Update password"""
250
269
251
270
api_path = '/account/password'
252
271
api_params = {}
@@ -262,6 +281,7 @@ def update_password(self, password: str, old_password: str = None):
262
281
}, api_params )
263
282
264
283
def update_phone (self , phone : str , password : str ):
284
+ """Update phone"""
265
285
266
286
api_path = '/account/phone'
267
287
api_params = {}
@@ -280,6 +300,7 @@ def update_phone(self, phone: str, password: str):
280
300
}, api_params )
281
301
282
302
def get_prefs (self ):
303
+ """Get account preferences"""
283
304
284
305
api_path = '/account/prefs'
285
306
api_params = {}
@@ -289,6 +310,7 @@ def get_prefs(self):
289
310
}, api_params )
290
311
291
312
def update_prefs (self , prefs : dict ):
313
+ """Update preferences"""
292
314
293
315
api_path = '/account/prefs'
294
316
api_params = {}
@@ -303,6 +325,7 @@ def update_prefs(self, prefs: dict):
303
325
}, api_params )
304
326
305
327
def create_recovery (self , email : str , url : str ):
328
+ """Create password recovery"""
306
329
307
330
api_path = '/account/recovery'
308
331
api_params = {}
@@ -321,6 +344,7 @@ def create_recovery(self, email: str, url: str):
321
344
}, api_params )
322
345
323
346
def update_recovery (self , user_id : str , secret : str , password : str ):
347
+ """Create password recovery (confirmation)"""
324
348
325
349
api_path = '/account/recovery'
326
350
api_params = {}
@@ -343,6 +367,7 @@ def update_recovery(self, user_id: str, secret: str, password: str):
343
367
}, api_params )
344
368
345
369
def list_sessions (self ):
370
+ """List sessions"""
346
371
347
372
api_path = '/account/sessions'
348
373
api_params = {}
@@ -352,6 +377,7 @@ def list_sessions(self):
352
377
}, api_params )
353
378
354
379
def delete_sessions (self ):
380
+ """Delete sessions"""
355
381
356
382
api_path = '/account/sessions'
357
383
api_params = {}
@@ -361,6 +387,7 @@ def delete_sessions(self):
361
387
}, api_params )
362
388
363
389
def create_anonymous_session (self ):
390
+ """Create anonymous session"""
364
391
365
392
api_path = '/account/sessions/anonymous'
366
393
api_params = {}
@@ -370,6 +397,7 @@ def create_anonymous_session(self):
370
397
}, api_params )
371
398
372
399
def create_email_password_session (self , email : str , password : str ):
400
+ """Create email password session"""
373
401
374
402
api_path = '/account/sessions/email'
375
403
api_params = {}
@@ -388,6 +416,7 @@ def create_email_password_session(self, email: str, password: str):
388
416
}, api_params )
389
417
390
418
def update_magic_url_session (self , user_id : str , secret : str ):
419
+ """Update magic URL session"""
391
420
392
421
api_path = '/account/sessions/magic-url'
393
422
api_params = {}
@@ -406,6 +435,7 @@ def update_magic_url_session(self, user_id: str, secret: str):
406
435
}, api_params )
407
436
408
437
def update_phone_session (self , user_id : str , secret : str ):
438
+ """Update phone session"""
409
439
410
440
api_path = '/account/sessions/phone'
411
441
api_params = {}
@@ -424,6 +454,7 @@ def update_phone_session(self, user_id: str, secret: str):
424
454
}, api_params )
425
455
426
456
def create_session (self , user_id : str , secret : str ):
457
+ """Create session"""
427
458
428
459
api_path = '/account/sessions/token'
429
460
api_params = {}
@@ -442,6 +473,7 @@ def create_session(self, user_id: str, secret: str):
442
473
}, api_params )
443
474
444
475
def get_session (self , session_id : str ):
476
+ """Get session"""
445
477
446
478
api_path = '/account/sessions/{sessionId}'
447
479
api_params = {}
@@ -456,6 +488,7 @@ def get_session(self, session_id: str):
456
488
}, api_params )
457
489
458
490
def update_session (self , session_id : str ):
491
+ """Update session"""
459
492
460
493
api_path = '/account/sessions/{sessionId}'
461
494
api_params = {}
@@ -470,6 +503,7 @@ def update_session(self, session_id: str):
470
503
}, api_params )
471
504
472
505
def delete_session (self , session_id : str ):
506
+ """Delete session"""
473
507
474
508
api_path = '/account/sessions/{sessionId}'
475
509
api_params = {}
@@ -484,6 +518,7 @@ def delete_session(self, session_id: str):
484
518
}, api_params )
485
519
486
520
def update_status (self ):
521
+ """Update status"""
487
522
488
523
api_path = '/account/status'
489
524
api_params = {}
@@ -493,6 +528,7 @@ def update_status(self):
493
528
}, api_params )
494
529
495
530
def create_email_token (self , user_id : str , email : str , phrase : bool = None ):
531
+ """Create email token (OTP)"""
496
532
497
533
api_path = '/account/tokens/email'
498
534
api_params = {}
@@ -512,6 +548,7 @@ def create_email_token(self, user_id: str, email: str, phrase: bool = None):
512
548
}, api_params )
513
549
514
550
def create_magic_url_token (self , user_id : str , email : str , url : str = None , phrase : bool = None ):
551
+ """Create magic URL token"""
515
552
516
553
api_path = '/account/tokens/magic-url'
517
554
api_params = {}
@@ -531,7 +568,8 @@ def create_magic_url_token(self, user_id: str, email: str, url: str = None, phra
531
568
'content-type' : 'application/json' ,
532
569
}, api_params )
533
570
534
- def create_o_auth2_token (self , provider : OAuthProvider , success : str = None , failure : str = None , scopes : list = None ):
571
+ def create_o_auth2_token (self , provider : OAuthProvider , success : str = None , failure : str = None , scopes : list [str ] = None ):
572
+ """Create OAuth2 token"""
535
573
536
574
api_path = '/account/tokens/oauth2/{provider}'
537
575
api_params = {}
@@ -549,6 +587,7 @@ def create_o_auth2_token(self, provider: OAuthProvider, success: str = None, fai
549
587
}, api_params , response_type = 'location' )
550
588
551
589
def create_phone_token (self , user_id : str , phone : str ):
590
+ """Create phone token"""
552
591
553
592
api_path = '/account/tokens/phone'
554
593
api_params = {}
@@ -567,6 +606,7 @@ def create_phone_token(self, user_id: str, phone: str):
567
606
}, api_params )
568
607
569
608
def create_verification (self , url : str ):
609
+ """Create email verification"""
570
610
571
611
api_path = '/account/verification'
572
612
api_params = {}
@@ -581,6 +621,7 @@ def create_verification(self, url: str):
581
621
}, api_params )
582
622
583
623
def update_verification (self , user_id : str , secret : str ):
624
+ """Create email verification (confirmation)"""
584
625
585
626
api_path = '/account/verification'
586
627
api_params = {}
@@ -599,6 +640,7 @@ def update_verification(self, user_id: str, secret: str):
599
640
}, api_params )
600
641
601
642
def create_phone_verification (self ):
643
+ """Create phone verification"""
602
644
603
645
api_path = '/account/verification/phone'
604
646
api_params = {}
@@ -608,6 +650,7 @@ def create_phone_verification(self):
608
650
}, api_params )
609
651
610
652
def update_phone_verification (self , user_id : str , secret : str ):
653
+ """Update phone verification (confirmation)"""
611
654
612
655
api_path = '/account/verification/phone'
613
656
api_params = {}
0 commit comments