bitwarden-sdk 0.1.0__cp37-none-win_amd64.whl → 1.0.0__cp37-none-win_amd64.whl
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.
- bitwarden_py/bitwarden_py.pyd +0 -0
- bitwarden_sdk/__init__.py +1 -1
- bitwarden_sdk/bitwarden_client.py +70 -25
- bitwarden_sdk/schemas.py +437 -267
- {bitwarden_sdk-0.1.0.dist-info → bitwarden_sdk-1.0.0.dist-info}/METADATA +32 -3
- bitwarden_sdk-1.0.0.dist-info/RECORD +9 -0
- {bitwarden_sdk-0.1.0.dist-info → bitwarden_sdk-1.0.0.dist-info}/WHEEL +1 -1
- bitwarden_sdk-1.0.0.dist-info/licenses/LICENSE +295 -0
- bitwarden_sdk-0.1.0.dist-info/RECORD +0 -11
bitwarden_sdk/schemas.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from enum import Enum
|
|
2
2
|
from dataclasses import dataclass
|
|
3
|
-
from typing import Optional, Any, List,
|
|
3
|
+
from typing import Optional, Any, List, TypeVar, Type, cast, Callable
|
|
4
4
|
from uuid import UUID
|
|
5
5
|
from datetime import datetime
|
|
6
6
|
import dateutil.parser
|
|
@@ -34,6 +34,11 @@ def to_enum(c: Type[EnumT], x: Any) -> EnumT:
|
|
|
34
34
|
return x.value
|
|
35
35
|
|
|
36
36
|
|
|
37
|
+
def from_bool(x: Any) -> bool:
|
|
38
|
+
assert isinstance(x, bool)
|
|
39
|
+
return x
|
|
40
|
+
|
|
41
|
+
|
|
37
42
|
def from_int(x: Any) -> int:
|
|
38
43
|
assert isinstance(x, int) and not isinstance(x, bool)
|
|
39
44
|
return x
|
|
@@ -44,11 +49,6 @@ def to_class(c: Type[T], x: Any) -> dict:
|
|
|
44
49
|
return cast(Any, x).to_dict()
|
|
45
50
|
|
|
46
51
|
|
|
47
|
-
def from_bool(x: Any) -> bool:
|
|
48
|
-
assert isinstance(x, bool)
|
|
49
|
-
return x
|
|
50
|
-
|
|
51
|
-
|
|
52
52
|
def from_list(f: Callable[[Any], T], x: Any) -> List[T]:
|
|
53
53
|
assert isinstance(x, list)
|
|
54
54
|
return [f(y) for y in x]
|
|
@@ -58,13 +58,9 @@ def from_datetime(x: Any) -> datetime:
|
|
|
58
58
|
return dateutil.parser.parse(x)
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
def from_dict(f: Callable[[Any], T], x: Any) -> Dict[str, T]:
|
|
62
|
-
assert isinstance(x, dict)
|
|
63
|
-
return { k: f(v) for (k, v) in x.items() }
|
|
64
|
-
|
|
65
|
-
|
|
66
61
|
class DeviceType(Enum):
|
|
67
62
|
"""Device type to send to Bitwarden. Defaults to SDK"""
|
|
63
|
+
|
|
68
64
|
ANDROID = "Android"
|
|
69
65
|
ANDROID_AMAZON = "AndroidAmazon"
|
|
70
66
|
CHROME_BROWSER = "ChromeBrowser"
|
|
@@ -97,15 +93,17 @@ class ClientSettings:
|
|
|
97
93
|
|
|
98
94
|
Defaults to
|
|
99
95
|
|
|
100
|
-
``` # use
|
|
101
|
-
|
|
96
|
+
``` # use bitwarden_core::{ClientSettings, DeviceType}; let settings = ClientSettings {
|
|
97
|
+
identity_url: "https://identity.bitwarden.com".to_string(), api_url:
|
|
102
98
|
"https://api.bitwarden.com".to_string(), user_agent: "Bitwarden Rust-SDK".to_string(),
|
|
103
99
|
device_type: DeviceType::SDK, }; let default = ClientSettings::default(); ```
|
|
104
100
|
"""
|
|
105
101
|
api_url: Optional[str] = None
|
|
106
102
|
"""The api url of the targeted Bitwarden instance. Defaults to `https://api.bitwarden.com`"""
|
|
103
|
+
|
|
107
104
|
device_type: Optional[DeviceType] = None
|
|
108
105
|
"""Device type to send to Bitwarden. Defaults to SDK"""
|
|
106
|
+
|
|
109
107
|
identity_url: Optional[str] = None
|
|
110
108
|
"""The identity url of the targeted Bitwarden instance. Defaults to
|
|
111
109
|
`https://identity.bitwarden.com`
|
|
@@ -135,35 +133,16 @@ class ClientSettings:
|
|
|
135
133
|
return result
|
|
136
134
|
|
|
137
135
|
|
|
138
|
-
@dataclass
|
|
139
|
-
class AccessTokenLoginRequest:
|
|
140
|
-
"""Login to Bitwarden with access token"""
|
|
141
|
-
access_token: str
|
|
142
|
-
"""Bitwarden service API access token"""
|
|
143
|
-
state_file: Optional[str] = None
|
|
144
|
-
|
|
145
|
-
@staticmethod
|
|
146
|
-
def from_dict(obj: Any) -> 'AccessTokenLoginRequest':
|
|
147
|
-
assert isinstance(obj, dict)
|
|
148
|
-
access_token = from_str(obj.get("accessToken"))
|
|
149
|
-
state_file = from_union([from_none, from_str], obj.get("stateFile"))
|
|
150
|
-
return AccessTokenLoginRequest(access_token, state_file)
|
|
151
|
-
|
|
152
|
-
def to_dict(self) -> dict:
|
|
153
|
-
result: dict = {}
|
|
154
|
-
result["accessToken"] = from_str(self.access_token)
|
|
155
|
-
if self.state_file is not None:
|
|
156
|
-
result["stateFile"] = from_union([from_none, from_str], self.state_file)
|
|
157
|
-
return result
|
|
158
|
-
|
|
159
|
-
|
|
160
136
|
@dataclass
|
|
161
137
|
class APIKeyLoginRequest:
|
|
162
138
|
"""Login to Bitwarden with Api Key"""
|
|
139
|
+
|
|
163
140
|
client_id: str
|
|
164
141
|
"""Bitwarden account client_id"""
|
|
142
|
+
|
|
165
143
|
client_secret: str
|
|
166
144
|
"""Bitwarden account client_secret"""
|
|
145
|
+
|
|
167
146
|
password: str
|
|
168
147
|
"""Bitwarden account master password"""
|
|
169
148
|
|
|
@@ -187,6 +166,7 @@ class APIKeyLoginRequest:
|
|
|
187
166
|
class FingerprintRequest:
|
|
188
167
|
fingerprint_material: str
|
|
189
168
|
"""The input material, used in the fingerprint generation process."""
|
|
169
|
+
|
|
190
170
|
public_key: str
|
|
191
171
|
"""The user's public key encoded with base64."""
|
|
192
172
|
|
|
@@ -204,6 +184,101 @@ class FingerprintRequest:
|
|
|
204
184
|
return result
|
|
205
185
|
|
|
206
186
|
|
|
187
|
+
@dataclass
|
|
188
|
+
class PasswordGeneratorRequest:
|
|
189
|
+
"""Password generator request options."""
|
|
190
|
+
|
|
191
|
+
avoid_ambiguous: bool
|
|
192
|
+
"""When set to true, the generated password will not contain ambiguous characters. The
|
|
193
|
+
ambiguous characters are: I, O, l, 0, 1
|
|
194
|
+
"""
|
|
195
|
+
length: int
|
|
196
|
+
"""The length of the generated password. Note that the password length must be greater than
|
|
197
|
+
the sum of all the minimums.
|
|
198
|
+
"""
|
|
199
|
+
lowercase: bool
|
|
200
|
+
"""Include lowercase characters (a-z)."""
|
|
201
|
+
|
|
202
|
+
numbers: bool
|
|
203
|
+
"""Include numbers (0-9)."""
|
|
204
|
+
|
|
205
|
+
special: bool
|
|
206
|
+
"""Include special characters: ! @ # $ % ^ & *"""
|
|
207
|
+
|
|
208
|
+
uppercase: bool
|
|
209
|
+
"""Include uppercase characters (A-Z)."""
|
|
210
|
+
|
|
211
|
+
min_lowercase: Optional[int] = None
|
|
212
|
+
"""The minimum number of lowercase characters in the generated password. When set, the value
|
|
213
|
+
must be between 1 and 9. This value is ignored if lowercase is false.
|
|
214
|
+
"""
|
|
215
|
+
min_number: Optional[int] = None
|
|
216
|
+
"""The minimum number of numbers in the generated password. When set, the value must be
|
|
217
|
+
between 1 and 9. This value is ignored if numbers is false.
|
|
218
|
+
"""
|
|
219
|
+
min_special: Optional[int] = None
|
|
220
|
+
"""The minimum number of special characters in the generated password. When set, the value
|
|
221
|
+
must be between 1 and 9. This value is ignored if special is false.
|
|
222
|
+
"""
|
|
223
|
+
min_uppercase: Optional[int] = None
|
|
224
|
+
"""The minimum number of uppercase characters in the generated password. When set, the value
|
|
225
|
+
must be between 1 and 9. This value is ignored if uppercase is false.
|
|
226
|
+
"""
|
|
227
|
+
|
|
228
|
+
@staticmethod
|
|
229
|
+
def from_dict(obj: Any) -> 'PasswordGeneratorRequest':
|
|
230
|
+
assert isinstance(obj, dict)
|
|
231
|
+
avoid_ambiguous = from_bool(obj.get("avoidAmbiguous"))
|
|
232
|
+
length = from_int(obj.get("length"))
|
|
233
|
+
lowercase = from_bool(obj.get("lowercase"))
|
|
234
|
+
numbers = from_bool(obj.get("numbers"))
|
|
235
|
+
special = from_bool(obj.get("special"))
|
|
236
|
+
uppercase = from_bool(obj.get("uppercase"))
|
|
237
|
+
min_lowercase = from_union([from_none, from_int], obj.get("minLowercase"))
|
|
238
|
+
min_number = from_union([from_none, from_int], obj.get("minNumber"))
|
|
239
|
+
min_special = from_union([from_none, from_int], obj.get("minSpecial"))
|
|
240
|
+
min_uppercase = from_union([from_none, from_int], obj.get("minUppercase"))
|
|
241
|
+
return PasswordGeneratorRequest(avoid_ambiguous, length, lowercase, numbers, special, uppercase, min_lowercase, min_number, min_special, min_uppercase)
|
|
242
|
+
|
|
243
|
+
def to_dict(self) -> dict:
|
|
244
|
+
result: dict = {}
|
|
245
|
+
result["avoidAmbiguous"] = from_bool(self.avoid_ambiguous)
|
|
246
|
+
result["length"] = from_int(self.length)
|
|
247
|
+
result["lowercase"] = from_bool(self.lowercase)
|
|
248
|
+
result["numbers"] = from_bool(self.numbers)
|
|
249
|
+
result["special"] = from_bool(self.special)
|
|
250
|
+
result["uppercase"] = from_bool(self.uppercase)
|
|
251
|
+
if self.min_lowercase is not None:
|
|
252
|
+
result["minLowercase"] = from_union([from_none, from_int], self.min_lowercase)
|
|
253
|
+
if self.min_number is not None:
|
|
254
|
+
result["minNumber"] = from_union([from_none, from_int], self.min_number)
|
|
255
|
+
if self.min_special is not None:
|
|
256
|
+
result["minSpecial"] = from_union([from_none, from_int], self.min_special)
|
|
257
|
+
if self.min_uppercase is not None:
|
|
258
|
+
result["minUppercase"] = from_union([from_none, from_int], self.min_uppercase)
|
|
259
|
+
return result
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
@dataclass
|
|
263
|
+
class GeneratorsCommand:
|
|
264
|
+
"""Generate a password
|
|
265
|
+
|
|
266
|
+
Returns: [String]
|
|
267
|
+
"""
|
|
268
|
+
generate_password: PasswordGeneratorRequest
|
|
269
|
+
|
|
270
|
+
@staticmethod
|
|
271
|
+
def from_dict(obj: Any) -> 'GeneratorsCommand':
|
|
272
|
+
assert isinstance(obj, dict)
|
|
273
|
+
generate_password = PasswordGeneratorRequest.from_dict(obj.get("generatePassword"))
|
|
274
|
+
return GeneratorsCommand(generate_password)
|
|
275
|
+
|
|
276
|
+
def to_dict(self) -> dict:
|
|
277
|
+
result: dict = {}
|
|
278
|
+
result["generatePassword"] = to_class(PasswordGeneratorRequest, self.generate_password)
|
|
279
|
+
return result
|
|
280
|
+
|
|
281
|
+
|
|
207
282
|
@dataclass
|
|
208
283
|
class SecretVerificationRequest:
|
|
209
284
|
master_password: Optional[str] = None
|
|
@@ -232,6 +307,30 @@ class SecretVerificationRequest:
|
|
|
232
307
|
return result
|
|
233
308
|
|
|
234
309
|
|
|
310
|
+
@dataclass
|
|
311
|
+
class AccessTokenLoginRequest:
|
|
312
|
+
"""Login to Bitwarden with access token"""
|
|
313
|
+
|
|
314
|
+
access_token: str
|
|
315
|
+
"""Bitwarden service API access token"""
|
|
316
|
+
|
|
317
|
+
state_file: Optional[str] = None
|
|
318
|
+
|
|
319
|
+
@staticmethod
|
|
320
|
+
def from_dict(obj: Any) -> 'AccessTokenLoginRequest':
|
|
321
|
+
assert isinstance(obj, dict)
|
|
322
|
+
access_token = from_str(obj.get("accessToken"))
|
|
323
|
+
state_file = from_union([from_none, from_str], obj.get("stateFile"))
|
|
324
|
+
return AccessTokenLoginRequest(access_token, state_file)
|
|
325
|
+
|
|
326
|
+
def to_dict(self) -> dict:
|
|
327
|
+
result: dict = {}
|
|
328
|
+
result["accessToken"] = from_str(self.access_token)
|
|
329
|
+
if self.state_file is not None:
|
|
330
|
+
result["stateFile"] = from_union([from_none, from_str], self.state_file)
|
|
331
|
+
return result
|
|
332
|
+
|
|
333
|
+
|
|
235
334
|
@dataclass
|
|
236
335
|
class Argon2ID:
|
|
237
336
|
iterations: int
|
|
@@ -272,7 +371,13 @@ class PBKDF2:
|
|
|
272
371
|
|
|
273
372
|
@dataclass
|
|
274
373
|
class Kdf:
|
|
275
|
-
"""Kdf from prelogin
|
|
374
|
+
"""Kdf from prelogin
|
|
375
|
+
|
|
376
|
+
Key Derivation Function for Bitwarden Account
|
|
377
|
+
|
|
378
|
+
In Bitwarden accounts can use multiple KDFs to derive their master key from their
|
|
379
|
+
password. This Enum represents all the possible KDFs.
|
|
380
|
+
"""
|
|
276
381
|
p_bkdf2: Optional[PBKDF2] = None
|
|
277
382
|
argon2_id: Optional[Argon2ID] = None
|
|
278
383
|
|
|
@@ -294,6 +399,7 @@ class Kdf:
|
|
|
294
399
|
|
|
295
400
|
class TwoFactorProvider(Enum):
|
|
296
401
|
"""Two-factor provider"""
|
|
402
|
+
|
|
297
403
|
AUTHENTICATOR = "Authenticator"
|
|
298
404
|
DUO = "Duo"
|
|
299
405
|
EMAIL = "Email"
|
|
@@ -308,8 +414,10 @@ class TwoFactorProvider(Enum):
|
|
|
308
414
|
class TwoFactorRequest:
|
|
309
415
|
provider: TwoFactorProvider
|
|
310
416
|
"""Two-factor provider"""
|
|
417
|
+
|
|
311
418
|
remember: bool
|
|
312
419
|
"""Two-factor remember"""
|
|
420
|
+
|
|
313
421
|
token: str
|
|
314
422
|
"""Two-factor Token"""
|
|
315
423
|
|
|
@@ -332,12 +440,16 @@ class TwoFactorRequest:
|
|
|
332
440
|
@dataclass
|
|
333
441
|
class PasswordLoginRequest:
|
|
334
442
|
"""Login to Bitwarden with Username and Password"""
|
|
443
|
+
|
|
335
444
|
email: str
|
|
336
445
|
"""Bitwarden account email address"""
|
|
446
|
+
|
|
337
447
|
kdf: Kdf
|
|
338
448
|
"""Kdf from prelogin"""
|
|
449
|
+
|
|
339
450
|
password: str
|
|
340
451
|
"""Bitwarden account master password"""
|
|
452
|
+
|
|
341
453
|
two_factor: Optional[TwoFactorRequest] = None
|
|
342
454
|
|
|
343
455
|
@staticmethod
|
|
@@ -434,6 +546,7 @@ class ProjectsListRequest:
|
|
|
434
546
|
class ProjectPutRequest:
|
|
435
547
|
id: UUID
|
|
436
548
|
"""ID of the project to modify"""
|
|
549
|
+
|
|
437
550
|
name: str
|
|
438
551
|
organization_id: UUID
|
|
439
552
|
"""Organization ID of the project to modify"""
|
|
@@ -519,6 +632,7 @@ class SecretCreateRequest:
|
|
|
519
632
|
note: str
|
|
520
633
|
organization_id: UUID
|
|
521
634
|
"""Organization where the secret will be created"""
|
|
635
|
+
|
|
522
636
|
value: str
|
|
523
637
|
project_ids: Optional[List[UUID]] = None
|
|
524
638
|
"""IDs of the projects that this secret will belong to"""
|
|
@@ -612,14 +726,39 @@ class SecretIdentifiersRequest:
|
|
|
612
726
|
return result
|
|
613
727
|
|
|
614
728
|
|
|
729
|
+
@dataclass
|
|
730
|
+
class SecretsSyncRequest:
|
|
731
|
+
organization_id: UUID
|
|
732
|
+
"""Organization to sync secrets from"""
|
|
733
|
+
|
|
734
|
+
last_synced_date: Optional[datetime] = None
|
|
735
|
+
"""Optional date time a sync last occurred"""
|
|
736
|
+
|
|
737
|
+
@staticmethod
|
|
738
|
+
def from_dict(obj: Any) -> 'SecretsSyncRequest':
|
|
739
|
+
assert isinstance(obj, dict)
|
|
740
|
+
organization_id = UUID(obj.get("organizationId"))
|
|
741
|
+
last_synced_date = from_union([from_none, from_datetime], obj.get("lastSyncedDate"))
|
|
742
|
+
return SecretsSyncRequest(organization_id, last_synced_date)
|
|
743
|
+
|
|
744
|
+
def to_dict(self) -> dict:
|
|
745
|
+
result: dict = {}
|
|
746
|
+
result["organizationId"] = str(self.organization_id)
|
|
747
|
+
if self.last_synced_date is not None:
|
|
748
|
+
result["lastSyncedDate"] = from_union([from_none, lambda x: x.isoformat()], self.last_synced_date)
|
|
749
|
+
return result
|
|
750
|
+
|
|
751
|
+
|
|
615
752
|
@dataclass
|
|
616
753
|
class SecretPutRequest:
|
|
617
754
|
id: UUID
|
|
618
755
|
"""ID of the secret to modify"""
|
|
756
|
+
|
|
619
757
|
key: str
|
|
620
758
|
note: str
|
|
621
759
|
organization_id: UUID
|
|
622
760
|
"""Organization ID of the secret to modify"""
|
|
761
|
+
|
|
623
762
|
value: str
|
|
624
763
|
project_ids: Optional[List[UUID]] = None
|
|
625
764
|
|
|
@@ -680,6 +819,13 @@ class SecretsCommand:
|
|
|
680
819
|
|
|
681
820
|
Returns:
|
|
682
821
|
[SecretsDeleteResponse](bitwarden::secrets_manager::secrets::SecretsDeleteResponse)
|
|
822
|
+
|
|
823
|
+
> Requires Authentication > Requires using an Access Token for login Retrieve the secrets
|
|
824
|
+
accessible by the authenticated machine account Optionally, provide the last synced date
|
|
825
|
+
to assess whether any changes have occurred If changes are detected, retrieves all the
|
|
826
|
+
secrets accessible by the authenticated machine account
|
|
827
|
+
|
|
828
|
+
Returns: [SecretsSyncResponse](bitwarden::secrets_manager::secrets::SecretsSyncResponse)
|
|
683
829
|
"""
|
|
684
830
|
get: Optional[SecretGetRequest] = None
|
|
685
831
|
get_by_ids: Optional[SecretsGetRequest] = None
|
|
@@ -687,6 +833,7 @@ class SecretsCommand:
|
|
|
687
833
|
list: Optional[SecretIdentifiersRequest] = None
|
|
688
834
|
update: Optional[SecretPutRequest] = None
|
|
689
835
|
delete: Optional[SecretsDeleteRequest] = None
|
|
836
|
+
sync: Optional[SecretsSyncRequest] = None
|
|
690
837
|
|
|
691
838
|
@staticmethod
|
|
692
839
|
def from_dict(obj: Any) -> 'SecretsCommand':
|
|
@@ -697,7 +844,8 @@ class SecretsCommand:
|
|
|
697
844
|
list = from_union([SecretIdentifiersRequest.from_dict, from_none], obj.get("list"))
|
|
698
845
|
update = from_union([SecretPutRequest.from_dict, from_none], obj.get("update"))
|
|
699
846
|
delete = from_union([SecretsDeleteRequest.from_dict, from_none], obj.get("delete"))
|
|
700
|
-
|
|
847
|
+
sync = from_union([SecretsSyncRequest.from_dict, from_none], obj.get("sync"))
|
|
848
|
+
return SecretsCommand(get, get_by_ids, create, list, update, delete, sync)
|
|
701
849
|
|
|
702
850
|
def to_dict(self) -> dict:
|
|
703
851
|
result: dict = {}
|
|
@@ -713,6 +861,8 @@ class SecretsCommand:
|
|
|
713
861
|
result["update"] = from_union([lambda x: to_class(SecretPutRequest, x), from_none], self.update)
|
|
714
862
|
if self.delete is not None:
|
|
715
863
|
result["delete"] = from_union([lambda x: to_class(SecretsDeleteRequest, x), from_none], self.delete)
|
|
864
|
+
if self.sync is not None:
|
|
865
|
+
result["sync"] = from_union([lambda x: to_class(SecretsSyncRequest, x), from_none], self.sync)
|
|
716
866
|
return result
|
|
717
867
|
|
|
718
868
|
|
|
@@ -769,29 +919,31 @@ class Command:
|
|
|
769
919
|
> Requires Authentication Retrieve all user data, ciphers and organizations the user is a
|
|
770
920
|
part of
|
|
771
921
|
|
|
772
|
-
Returns: [SyncResponse](bitwarden::
|
|
922
|
+
Returns: [SyncResponse](bitwarden::vault::SyncResponse)
|
|
773
923
|
"""
|
|
774
924
|
password_login: Optional[PasswordLoginRequest] = None
|
|
775
925
|
api_key_login: Optional[APIKeyLoginRequest] = None
|
|
776
|
-
|
|
926
|
+
login_access_token: Optional[AccessTokenLoginRequest] = None
|
|
777
927
|
get_user_api_key: Optional[SecretVerificationRequest] = None
|
|
778
928
|
fingerprint: Optional[FingerprintRequest] = None
|
|
779
929
|
sync: Optional[SyncRequest] = None
|
|
780
930
|
secrets: Optional[SecretsCommand] = None
|
|
781
931
|
projects: Optional[ProjectsCommand] = None
|
|
932
|
+
generators: Optional[GeneratorsCommand] = None
|
|
782
933
|
|
|
783
934
|
@staticmethod
|
|
784
935
|
def from_dict(obj: Any) -> 'Command':
|
|
785
936
|
assert isinstance(obj, dict)
|
|
786
937
|
password_login = from_union([PasswordLoginRequest.from_dict, from_none], obj.get("passwordLogin"))
|
|
787
938
|
api_key_login = from_union([APIKeyLoginRequest.from_dict, from_none], obj.get("apiKeyLogin"))
|
|
788
|
-
|
|
939
|
+
login_access_token = from_union([AccessTokenLoginRequest.from_dict, from_none], obj.get("loginAccessToken"))
|
|
789
940
|
get_user_api_key = from_union([SecretVerificationRequest.from_dict, from_none], obj.get("getUserApiKey"))
|
|
790
941
|
fingerprint = from_union([FingerprintRequest.from_dict, from_none], obj.get("fingerprint"))
|
|
791
942
|
sync = from_union([SyncRequest.from_dict, from_none], obj.get("sync"))
|
|
792
943
|
secrets = from_union([SecretsCommand.from_dict, from_none], obj.get("secrets"))
|
|
793
944
|
projects = from_union([ProjectsCommand.from_dict, from_none], obj.get("projects"))
|
|
794
|
-
|
|
945
|
+
generators = from_union([GeneratorsCommand.from_dict, from_none], obj.get("generators"))
|
|
946
|
+
return Command(password_login, api_key_login, login_access_token, get_user_api_key, fingerprint, sync, secrets, projects, generators)
|
|
795
947
|
|
|
796
948
|
def to_dict(self) -> dict:
|
|
797
949
|
result: dict = {}
|
|
@@ -799,8 +951,8 @@ class Command:
|
|
|
799
951
|
result["passwordLogin"] = from_union([lambda x: to_class(PasswordLoginRequest, x), from_none], self.password_login)
|
|
800
952
|
if self.api_key_login is not None:
|
|
801
953
|
result["apiKeyLogin"] = from_union([lambda x: to_class(APIKeyLoginRequest, x), from_none], self.api_key_login)
|
|
802
|
-
if self.
|
|
803
|
-
result["
|
|
954
|
+
if self.login_access_token is not None:
|
|
955
|
+
result["loginAccessToken"] = from_union([lambda x: to_class(AccessTokenLoginRequest, x), from_none], self.login_access_token)
|
|
804
956
|
if self.get_user_api_key is not None:
|
|
805
957
|
result["getUserApiKey"] = from_union([lambda x: to_class(SecretVerificationRequest, x), from_none], self.get_user_api_key)
|
|
806
958
|
if self.fingerprint is not None:
|
|
@@ -811,6 +963,8 @@ class Command:
|
|
|
811
963
|
result["secrets"] = from_union([lambda x: to_class(SecretsCommand, x), from_none], self.secrets)
|
|
812
964
|
if self.projects is not None:
|
|
813
965
|
result["projects"] = from_union([lambda x: to_class(ProjectsCommand, x), from_none], self.projects)
|
|
966
|
+
if self.generators is not None:
|
|
967
|
+
result["generators"] = from_union([lambda x: to_class(GeneratorsCommand, x), from_none], self.generators)
|
|
814
968
|
return result
|
|
815
969
|
|
|
816
970
|
|
|
@@ -914,14 +1068,19 @@ class TwoFactorProviders:
|
|
|
914
1068
|
authenticator: Optional[Authenticator] = None
|
|
915
1069
|
duo: Optional[Duo] = None
|
|
916
1070
|
"""Duo-backed 2fa"""
|
|
1071
|
+
|
|
917
1072
|
email: Optional[Email] = None
|
|
918
1073
|
"""Email 2fa"""
|
|
1074
|
+
|
|
919
1075
|
organization_duo: Optional[Duo] = None
|
|
920
1076
|
"""Duo-backed 2fa operated by an organization the user is a member of"""
|
|
1077
|
+
|
|
921
1078
|
remember: Optional[Remember] = None
|
|
922
1079
|
"""Presence indicates the user has stored this device as bypassing 2fa"""
|
|
1080
|
+
|
|
923
1081
|
web_authn: Optional[WebAuthn] = None
|
|
924
1082
|
"""WebAuthn-backed 2fa"""
|
|
1083
|
+
|
|
925
1084
|
yubi_key: Optional[YubiKey] = None
|
|
926
1085
|
"""Yubikey-backed 2fa"""
|
|
927
1086
|
|
|
@@ -961,8 +1120,10 @@ class APIKeyLoginResponse:
|
|
|
961
1120
|
authenticated: bool
|
|
962
1121
|
force_password_reset: bool
|
|
963
1122
|
"""Whether or not the user is required to update their master password"""
|
|
1123
|
+
|
|
964
1124
|
reset_master_password: bool
|
|
965
1125
|
"""TODO: What does this do?"""
|
|
1126
|
+
|
|
966
1127
|
two_factor: Optional[TwoFactorProviders] = None
|
|
967
1128
|
|
|
968
1129
|
@staticmethod
|
|
@@ -988,8 +1149,10 @@ class APIKeyLoginResponse:
|
|
|
988
1149
|
class ResponseForAPIKeyLoginResponse:
|
|
989
1150
|
success: bool
|
|
990
1151
|
"""Whether or not the SDK request succeeded."""
|
|
1152
|
+
|
|
991
1153
|
data: Optional[APIKeyLoginResponse] = None
|
|
992
1154
|
"""The response data. Populated if `success` is true."""
|
|
1155
|
+
|
|
993
1156
|
error_message: Optional[str] = None
|
|
994
1157
|
"""A message for any error that may occur. Populated if `success` is false."""
|
|
995
1158
|
|
|
@@ -1033,8 +1196,10 @@ class PasswordLoginResponse:
|
|
|
1033
1196
|
authenticated: bool
|
|
1034
1197
|
force_password_reset: bool
|
|
1035
1198
|
"""Whether or not the user is required to update their master password"""
|
|
1199
|
+
|
|
1036
1200
|
reset_master_password: bool
|
|
1037
1201
|
"""TODO: What does this do?"""
|
|
1202
|
+
|
|
1038
1203
|
captcha: Optional[CAPTCHAResponse] = None
|
|
1039
1204
|
"""The information required to present the user with a captcha challenge. Only present when
|
|
1040
1205
|
authentication fails due to requiring validation of a captcha challenge.
|
|
@@ -1070,8 +1235,10 @@ class PasswordLoginResponse:
|
|
|
1070
1235
|
class ResponseForPasswordLoginResponse:
|
|
1071
1236
|
success: bool
|
|
1072
1237
|
"""Whether or not the SDK request succeeded."""
|
|
1238
|
+
|
|
1073
1239
|
data: Optional[PasswordLoginResponse] = None
|
|
1074
1240
|
"""The response data. Populated if `success` is true."""
|
|
1241
|
+
|
|
1075
1242
|
error_message: Optional[str] = None
|
|
1076
1243
|
"""A message for any error that may occur. Populated if `success` is false."""
|
|
1077
1244
|
|
|
@@ -1098,8 +1265,10 @@ class AccessTokenLoginResponse:
|
|
|
1098
1265
|
authenticated: bool
|
|
1099
1266
|
force_password_reset: bool
|
|
1100
1267
|
"""Whether or not the user is required to update their master password"""
|
|
1268
|
+
|
|
1101
1269
|
reset_master_password: bool
|
|
1102
1270
|
"""TODO: What does this do?"""
|
|
1271
|
+
|
|
1103
1272
|
two_factor: Optional[TwoFactorProviders] = None
|
|
1104
1273
|
|
|
1105
1274
|
@staticmethod
|
|
@@ -1125,8 +1294,10 @@ class AccessTokenLoginResponse:
|
|
|
1125
1294
|
class ResponseForAccessTokenLoginResponse:
|
|
1126
1295
|
success: bool
|
|
1127
1296
|
"""Whether or not the SDK request succeeded."""
|
|
1297
|
+
|
|
1128
1298
|
data: Optional[AccessTokenLoginResponse] = None
|
|
1129
1299
|
"""The response data. Populated if `success` is true."""
|
|
1300
|
+
|
|
1130
1301
|
error_message: Optional[str] = None
|
|
1131
1302
|
"""A message for any error that may occur. Populated if `success` is false."""
|
|
1132
1303
|
|
|
@@ -1190,8 +1361,10 @@ class SecretIdentifiersResponse:
|
|
|
1190
1361
|
class ResponseForSecretIdentifiersResponse:
|
|
1191
1362
|
success: bool
|
|
1192
1363
|
"""Whether or not the SDK request succeeded."""
|
|
1364
|
+
|
|
1193
1365
|
data: Optional[SecretIdentifiersResponse] = None
|
|
1194
1366
|
"""The response data. Populated if `success` is true."""
|
|
1367
|
+
|
|
1195
1368
|
error_message: Optional[str] = None
|
|
1196
1369
|
"""A message for any error that may occur. Populated if `success` is false."""
|
|
1197
1370
|
|
|
@@ -1255,8 +1428,10 @@ class SecretResponse:
|
|
|
1255
1428
|
class ResponseForSecretResponse:
|
|
1256
1429
|
success: bool
|
|
1257
1430
|
"""Whether or not the SDK request succeeded."""
|
|
1431
|
+
|
|
1258
1432
|
data: Optional[SecretResponse] = None
|
|
1259
1433
|
"""The response data. Populated if `success` is true."""
|
|
1434
|
+
|
|
1260
1435
|
error_message: Optional[str] = None
|
|
1261
1436
|
"""A message for any error that may occur. Populated if `success` is false."""
|
|
1262
1437
|
|
|
@@ -1298,8 +1473,10 @@ class SecretsResponse:
|
|
|
1298
1473
|
class ResponseForSecretsResponse:
|
|
1299
1474
|
success: bool
|
|
1300
1475
|
"""Whether or not the SDK request succeeded."""
|
|
1476
|
+
|
|
1301
1477
|
data: Optional[SecretsResponse] = None
|
|
1302
1478
|
"""The response data. Populated if `success` is true."""
|
|
1479
|
+
|
|
1303
1480
|
error_message: Optional[str] = None
|
|
1304
1481
|
"""A message for any error that may occur. Populated if `success` is false."""
|
|
1305
1482
|
|
|
@@ -1361,8 +1538,10 @@ class SecretsDeleteResponse:
|
|
|
1361
1538
|
class ResponseForSecretsDeleteResponse:
|
|
1362
1539
|
success: bool
|
|
1363
1540
|
"""Whether or not the SDK request succeeded."""
|
|
1541
|
+
|
|
1364
1542
|
data: Optional[SecretsDeleteResponse] = None
|
|
1365
1543
|
"""The response data. Populated if `success` is true."""
|
|
1544
|
+
|
|
1366
1545
|
error_message: Optional[str] = None
|
|
1367
1546
|
"""A message for any error that may occur. Populated if `success` is false."""
|
|
1368
1547
|
|
|
@@ -1384,6 +1563,55 @@ class ResponseForSecretsDeleteResponse:
|
|
|
1384
1563
|
return result
|
|
1385
1564
|
|
|
1386
1565
|
|
|
1566
|
+
@dataclass
|
|
1567
|
+
class SecretsSyncResponse:
|
|
1568
|
+
has_changes: bool
|
|
1569
|
+
secrets: Optional[List[SecretResponse]] = None
|
|
1570
|
+
|
|
1571
|
+
@staticmethod
|
|
1572
|
+
def from_dict(obj: Any) -> 'SecretsSyncResponse':
|
|
1573
|
+
assert isinstance(obj, dict)
|
|
1574
|
+
has_changes = from_bool(obj.get("hasChanges"))
|
|
1575
|
+
secrets = from_union([from_none, lambda x: from_list(SecretResponse.from_dict, x)], obj.get("secrets"))
|
|
1576
|
+
return SecretsSyncResponse(has_changes, secrets)
|
|
1577
|
+
|
|
1578
|
+
def to_dict(self) -> dict:
|
|
1579
|
+
result: dict = {}
|
|
1580
|
+
result["hasChanges"] = from_bool(self.has_changes)
|
|
1581
|
+
if self.secrets is not None:
|
|
1582
|
+
result["secrets"] = from_union([from_none, lambda x: from_list(lambda x: to_class(SecretResponse, x), x)], self.secrets)
|
|
1583
|
+
return result
|
|
1584
|
+
|
|
1585
|
+
|
|
1586
|
+
@dataclass
|
|
1587
|
+
class ResponseForSecretsSyncResponse:
|
|
1588
|
+
success: bool
|
|
1589
|
+
"""Whether or not the SDK request succeeded."""
|
|
1590
|
+
|
|
1591
|
+
data: Optional[SecretsSyncResponse] = None
|
|
1592
|
+
"""The response data. Populated if `success` is true."""
|
|
1593
|
+
|
|
1594
|
+
error_message: Optional[str] = None
|
|
1595
|
+
"""A message for any error that may occur. Populated if `success` is false."""
|
|
1596
|
+
|
|
1597
|
+
@staticmethod
|
|
1598
|
+
def from_dict(obj: Any) -> 'ResponseForSecretsSyncResponse':
|
|
1599
|
+
assert isinstance(obj, dict)
|
|
1600
|
+
success = from_bool(obj.get("success"))
|
|
1601
|
+
data = from_union([SecretsSyncResponse.from_dict, from_none], obj.get("data"))
|
|
1602
|
+
error_message = from_union([from_none, from_str], obj.get("errorMessage"))
|
|
1603
|
+
return ResponseForSecretsSyncResponse(success, data, error_message)
|
|
1604
|
+
|
|
1605
|
+
def to_dict(self) -> dict:
|
|
1606
|
+
result: dict = {}
|
|
1607
|
+
result["success"] = from_bool(self.success)
|
|
1608
|
+
if self.data is not None:
|
|
1609
|
+
result["data"] = from_union([lambda x: to_class(SecretsSyncResponse, x), from_none], self.data)
|
|
1610
|
+
if self.error_message is not None:
|
|
1611
|
+
result["errorMessage"] = from_union([from_none, from_str], self.error_message)
|
|
1612
|
+
return result
|
|
1613
|
+
|
|
1614
|
+
|
|
1387
1615
|
@dataclass
|
|
1388
1616
|
class ProjectResponse:
|
|
1389
1617
|
creation_date: datetime
|
|
@@ -1416,8 +1644,10 @@ class ProjectResponse:
|
|
|
1416
1644
|
class ResponseForProjectResponse:
|
|
1417
1645
|
success: bool
|
|
1418
1646
|
"""Whether or not the SDK request succeeded."""
|
|
1647
|
+
|
|
1419
1648
|
data: Optional[ProjectResponse] = None
|
|
1420
1649
|
"""The response data. Populated if `success` is true."""
|
|
1650
|
+
|
|
1421
1651
|
error_message: Optional[str] = None
|
|
1422
1652
|
"""A message for any error that may occur. Populated if `success` is false."""
|
|
1423
1653
|
|
|
@@ -1459,8 +1689,10 @@ class ProjectsResponse:
|
|
|
1459
1689
|
class ResponseForProjectsResponse:
|
|
1460
1690
|
success: bool
|
|
1461
1691
|
"""Whether or not the SDK request succeeded."""
|
|
1692
|
+
|
|
1462
1693
|
data: Optional[ProjectsResponse] = None
|
|
1463
1694
|
"""The response data. Populated if `success` is true."""
|
|
1695
|
+
|
|
1464
1696
|
error_message: Optional[str] = None
|
|
1465
1697
|
"""A message for any error that may occur. Populated if `success` is false."""
|
|
1466
1698
|
|
|
@@ -1522,8 +1754,10 @@ class ProjectsDeleteResponse:
|
|
|
1522
1754
|
class ResponseForProjectsDeleteResponse:
|
|
1523
1755
|
success: bool
|
|
1524
1756
|
"""Whether or not the SDK request succeeded."""
|
|
1757
|
+
|
|
1525
1758
|
data: Optional[ProjectsDeleteResponse] = None
|
|
1526
1759
|
"""The response data. Populated if `success` is true."""
|
|
1760
|
+
|
|
1527
1761
|
error_message: Optional[str] = None
|
|
1528
1762
|
"""A message for any error that may occur. Populated if `success` is false."""
|
|
1529
1763
|
|
|
@@ -1545,6 +1779,35 @@ class ResponseForProjectsDeleteResponse:
|
|
|
1545
1779
|
return result
|
|
1546
1780
|
|
|
1547
1781
|
|
|
1782
|
+
@dataclass
|
|
1783
|
+
class ResponseForString:
|
|
1784
|
+
success: bool
|
|
1785
|
+
"""Whether or not the SDK request succeeded."""
|
|
1786
|
+
|
|
1787
|
+
data: Optional[str] = None
|
|
1788
|
+
"""The response data. Populated if `success` is true."""
|
|
1789
|
+
|
|
1790
|
+
error_message: Optional[str] = None
|
|
1791
|
+
"""A message for any error that may occur. Populated if `success` is false."""
|
|
1792
|
+
|
|
1793
|
+
@staticmethod
|
|
1794
|
+
def from_dict(obj: Any) -> 'ResponseForString':
|
|
1795
|
+
assert isinstance(obj, dict)
|
|
1796
|
+
success = from_bool(obj.get("success"))
|
|
1797
|
+
data = from_union([from_none, from_str], obj.get("data"))
|
|
1798
|
+
error_message = from_union([from_none, from_str], obj.get("errorMessage"))
|
|
1799
|
+
return ResponseForString(success, data, error_message)
|
|
1800
|
+
|
|
1801
|
+
def to_dict(self) -> dict:
|
|
1802
|
+
result: dict = {}
|
|
1803
|
+
result["success"] = from_bool(self.success)
|
|
1804
|
+
if self.data is not None:
|
|
1805
|
+
result["data"] = from_union([from_none, from_str], self.data)
|
|
1806
|
+
if self.error_message is not None:
|
|
1807
|
+
result["errorMessage"] = from_union([from_none, from_str], self.error_message)
|
|
1808
|
+
return result
|
|
1809
|
+
|
|
1810
|
+
|
|
1548
1811
|
@dataclass
|
|
1549
1812
|
class FingerprintResponse:
|
|
1550
1813
|
fingerprint: str
|
|
@@ -1565,8 +1828,10 @@ class FingerprintResponse:
|
|
|
1565
1828
|
class ResponseForFingerprintResponse:
|
|
1566
1829
|
success: bool
|
|
1567
1830
|
"""Whether or not the SDK request succeeded."""
|
|
1831
|
+
|
|
1568
1832
|
data: Optional[FingerprintResponse] = None
|
|
1569
1833
|
"""The response data. Populated if `success` is true."""
|
|
1834
|
+
|
|
1570
1835
|
error_message: Optional[str] = None
|
|
1571
1836
|
"""A message for any error that may occur. Populated if `success` is false."""
|
|
1572
1837
|
|
|
@@ -1596,6 +1861,7 @@ class Attachment:
|
|
|
1596
1861
|
size: Optional[str] = None
|
|
1597
1862
|
size_name: Optional[str] = None
|
|
1598
1863
|
"""Readable size, ex: "4.2 KB" or "1.43 GB\""""
|
|
1864
|
+
|
|
1599
1865
|
url: Optional[str] = None
|
|
1600
1866
|
|
|
1601
1867
|
@staticmethod
|
|
@@ -1833,6 +2099,62 @@ class LocalData:
|
|
|
1833
2099
|
return result
|
|
1834
2100
|
|
|
1835
2101
|
|
|
2102
|
+
@dataclass
|
|
2103
|
+
class Fido2Credential:
|
|
2104
|
+
counter: str
|
|
2105
|
+
creation_date: datetime
|
|
2106
|
+
credential_id: str
|
|
2107
|
+
discoverable: str
|
|
2108
|
+
key_algorithm: str
|
|
2109
|
+
key_curve: str
|
|
2110
|
+
key_type: str
|
|
2111
|
+
key_value: str
|
|
2112
|
+
rp_id: str
|
|
2113
|
+
rp_name: Optional[str] = None
|
|
2114
|
+
user_display_name: Optional[str] = None
|
|
2115
|
+
user_handle: Optional[str] = None
|
|
2116
|
+
user_name: Optional[str] = None
|
|
2117
|
+
|
|
2118
|
+
@staticmethod
|
|
2119
|
+
def from_dict(obj: Any) -> 'Fido2Credential':
|
|
2120
|
+
assert isinstance(obj, dict)
|
|
2121
|
+
counter = from_str(obj.get("counter"))
|
|
2122
|
+
creation_date = from_datetime(obj.get("creationDate"))
|
|
2123
|
+
credential_id = from_str(obj.get("credentialId"))
|
|
2124
|
+
discoverable = from_str(obj.get("discoverable"))
|
|
2125
|
+
key_algorithm = from_str(obj.get("keyAlgorithm"))
|
|
2126
|
+
key_curve = from_str(obj.get("keyCurve"))
|
|
2127
|
+
key_type = from_str(obj.get("keyType"))
|
|
2128
|
+
key_value = from_str(obj.get("keyValue"))
|
|
2129
|
+
rp_id = from_str(obj.get("rpId"))
|
|
2130
|
+
rp_name = from_union([from_none, from_str], obj.get("rpName"))
|
|
2131
|
+
user_display_name = from_union([from_none, from_str], obj.get("userDisplayName"))
|
|
2132
|
+
user_handle = from_union([from_none, from_str], obj.get("userHandle"))
|
|
2133
|
+
user_name = from_union([from_none, from_str], obj.get("userName"))
|
|
2134
|
+
return Fido2Credential(counter, creation_date, credential_id, discoverable, key_algorithm, key_curve, key_type, key_value, rp_id, rp_name, user_display_name, user_handle, user_name)
|
|
2135
|
+
|
|
2136
|
+
def to_dict(self) -> dict:
|
|
2137
|
+
result: dict = {}
|
|
2138
|
+
result["counter"] = from_str(self.counter)
|
|
2139
|
+
result["creationDate"] = self.creation_date.isoformat()
|
|
2140
|
+
result["credentialId"] = from_str(self.credential_id)
|
|
2141
|
+
result["discoverable"] = from_str(self.discoverable)
|
|
2142
|
+
result["keyAlgorithm"] = from_str(self.key_algorithm)
|
|
2143
|
+
result["keyCurve"] = from_str(self.key_curve)
|
|
2144
|
+
result["keyType"] = from_str(self.key_type)
|
|
2145
|
+
result["keyValue"] = from_str(self.key_value)
|
|
2146
|
+
result["rpId"] = from_str(self.rp_id)
|
|
2147
|
+
if self.rp_name is not None:
|
|
2148
|
+
result["rpName"] = from_union([from_none, from_str], self.rp_name)
|
|
2149
|
+
if self.user_display_name is not None:
|
|
2150
|
+
result["userDisplayName"] = from_union([from_none, from_str], self.user_display_name)
|
|
2151
|
+
if self.user_handle is not None:
|
|
2152
|
+
result["userHandle"] = from_union([from_none, from_str], self.user_handle)
|
|
2153
|
+
if self.user_name is not None:
|
|
2154
|
+
result["userName"] = from_union([from_none, from_str], self.user_name)
|
|
2155
|
+
return result
|
|
2156
|
+
|
|
2157
|
+
|
|
1836
2158
|
class URIMatchType(Enum):
|
|
1837
2159
|
DOMAIN = "domain"
|
|
1838
2160
|
EXACT = "exact"
|
|
@@ -1846,13 +2168,15 @@ class URIMatchType(Enum):
|
|
|
1846
2168
|
class LoginURI:
|
|
1847
2169
|
match: Optional[URIMatchType] = None
|
|
1848
2170
|
uri: Optional[str] = None
|
|
2171
|
+
uri_checksum: Optional[str] = None
|
|
1849
2172
|
|
|
1850
2173
|
@staticmethod
|
|
1851
2174
|
def from_dict(obj: Any) -> 'LoginURI':
|
|
1852
2175
|
assert isinstance(obj, dict)
|
|
1853
2176
|
match = from_union([from_none, URIMatchType], obj.get("match"))
|
|
1854
2177
|
uri = from_union([from_none, from_str], obj.get("uri"))
|
|
1855
|
-
|
|
2178
|
+
uri_checksum = from_union([from_none, from_str], obj.get("uriChecksum"))
|
|
2179
|
+
return LoginURI(match, uri, uri_checksum)
|
|
1856
2180
|
|
|
1857
2181
|
def to_dict(self) -> dict:
|
|
1858
2182
|
result: dict = {}
|
|
@@ -1860,12 +2184,15 @@ class LoginURI:
|
|
|
1860
2184
|
result["match"] = from_union([from_none, lambda x: to_enum(URIMatchType, x)], self.match)
|
|
1861
2185
|
if self.uri is not None:
|
|
1862
2186
|
result["uri"] = from_union([from_none, from_str], self.uri)
|
|
2187
|
+
if self.uri_checksum is not None:
|
|
2188
|
+
result["uriChecksum"] = from_union([from_none, from_str], self.uri_checksum)
|
|
1863
2189
|
return result
|
|
1864
2190
|
|
|
1865
2191
|
|
|
1866
2192
|
@dataclass
|
|
1867
2193
|
class Login:
|
|
1868
2194
|
autofill_on_page_load: Optional[bool] = None
|
|
2195
|
+
fido2_credentials: Optional[List[Fido2Credential]] = None
|
|
1869
2196
|
password: Optional[str] = None
|
|
1870
2197
|
password_revision_date: Optional[datetime] = None
|
|
1871
2198
|
totp: Optional[str] = None
|
|
@@ -1876,17 +2203,20 @@ class Login:
|
|
|
1876
2203
|
def from_dict(obj: Any) -> 'Login':
|
|
1877
2204
|
assert isinstance(obj, dict)
|
|
1878
2205
|
autofill_on_page_load = from_union([from_none, from_bool], obj.get("autofillOnPageLoad"))
|
|
2206
|
+
fido2_credentials = from_union([from_none, lambda x: from_list(Fido2Credential.from_dict, x)], obj.get("fido2Credentials"))
|
|
1879
2207
|
password = from_union([from_none, from_str], obj.get("password"))
|
|
1880
2208
|
password_revision_date = from_union([from_none, from_datetime], obj.get("passwordRevisionDate"))
|
|
1881
2209
|
totp = from_union([from_none, from_str], obj.get("totp"))
|
|
1882
2210
|
uris = from_union([from_none, lambda x: from_list(LoginURI.from_dict, x)], obj.get("uris"))
|
|
1883
2211
|
username = from_union([from_none, from_str], obj.get("username"))
|
|
1884
|
-
return Login(autofill_on_page_load, password, password_revision_date, totp, uris, username)
|
|
2212
|
+
return Login(autofill_on_page_load, fido2_credentials, password, password_revision_date, totp, uris, username)
|
|
1885
2213
|
|
|
1886
2214
|
def to_dict(self) -> dict:
|
|
1887
2215
|
result: dict = {}
|
|
1888
2216
|
if self.autofill_on_page_load is not None:
|
|
1889
2217
|
result["autofillOnPageLoad"] = from_union([from_none, from_bool], self.autofill_on_page_load)
|
|
2218
|
+
if self.fido2_credentials is not None:
|
|
2219
|
+
result["fido2Credentials"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Fido2Credential, x), x)], self.fido2_credentials)
|
|
1890
2220
|
if self.password is not None:
|
|
1891
2221
|
result["password"] = from_union([from_none, from_str], self.password)
|
|
1892
2222
|
if self.password_revision_date is not None:
|
|
@@ -2150,50 +2480,6 @@ class Folder:
|
|
|
2150
2480
|
return result
|
|
2151
2481
|
|
|
2152
2482
|
|
|
2153
|
-
class PolicyType(Enum):
|
|
2154
|
-
ACTIVATE_AUTOFILL = "ActivateAutofill"
|
|
2155
|
-
DISABLE_PERSONAL_VAULT_EXPORT = "DisablePersonalVaultExport"
|
|
2156
|
-
DISABLE_SEND = "DisableSend"
|
|
2157
|
-
MASTER_PASSWORD = "MasterPassword"
|
|
2158
|
-
MAXIMUM_VAULT_TIMEOUT = "MaximumVaultTimeout"
|
|
2159
|
-
PASSWORD_GENERATOR = "PasswordGenerator"
|
|
2160
|
-
PERSONAL_OWNERSHIP = "PersonalOwnership"
|
|
2161
|
-
REQUIRE_SSO = "RequireSso"
|
|
2162
|
-
RESET_PASSWORD = "ResetPassword"
|
|
2163
|
-
SEND_OPTIONS = "SendOptions"
|
|
2164
|
-
SINGLE_ORG = "SingleOrg"
|
|
2165
|
-
TWO_FACTOR_AUTHENTICATION = "TwoFactorAuthentication"
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
@dataclass
|
|
2169
|
-
class Policy:
|
|
2170
|
-
enabled: bool
|
|
2171
|
-
id: UUID
|
|
2172
|
-
organization_id: UUID
|
|
2173
|
-
type: PolicyType
|
|
2174
|
-
data: Optional[Dict[str, Any]] = None
|
|
2175
|
-
|
|
2176
|
-
@staticmethod
|
|
2177
|
-
def from_dict(obj: Any) -> 'Policy':
|
|
2178
|
-
assert isinstance(obj, dict)
|
|
2179
|
-
enabled = from_bool(obj.get("enabled"))
|
|
2180
|
-
id = UUID(obj.get("id"))
|
|
2181
|
-
organization_id = UUID(obj.get("organization_id"))
|
|
2182
|
-
type = PolicyType(obj.get("type"))
|
|
2183
|
-
data = from_union([from_none, lambda x: from_dict(lambda x: x, x)], obj.get("data"))
|
|
2184
|
-
return Policy(enabled, id, organization_id, type, data)
|
|
2185
|
-
|
|
2186
|
-
def to_dict(self) -> dict:
|
|
2187
|
-
result: dict = {}
|
|
2188
|
-
result["enabled"] = from_bool(self.enabled)
|
|
2189
|
-
result["id"] = str(self.id)
|
|
2190
|
-
result["organization_id"] = str(self.organization_id)
|
|
2191
|
-
result["type"] = to_enum(PolicyType, self.type)
|
|
2192
|
-
if self.data is not None:
|
|
2193
|
-
result["data"] = from_union([from_none, lambda x: from_dict(lambda x: x, x)], self.data)
|
|
2194
|
-
return result
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
2483
|
@dataclass
|
|
2198
2484
|
class ProfileOrganizationResponse:
|
|
2199
2485
|
id: UUID
|
|
@@ -2238,141 +2524,17 @@ class ProfileResponse:
|
|
|
2238
2524
|
return result
|
|
2239
2525
|
|
|
2240
2526
|
|
|
2241
|
-
@dataclass
|
|
2242
|
-
class SendFile:
|
|
2243
|
-
file_name: str
|
|
2244
|
-
id: Optional[str] = None
|
|
2245
|
-
size: Optional[str] = None
|
|
2246
|
-
size_name: Optional[str] = None
|
|
2247
|
-
"""Readable size, ex: "4.2 KB" or "1.43 GB\""""
|
|
2248
|
-
|
|
2249
|
-
@staticmethod
|
|
2250
|
-
def from_dict(obj: Any) -> 'SendFile':
|
|
2251
|
-
assert isinstance(obj, dict)
|
|
2252
|
-
file_name = from_str(obj.get("fileName"))
|
|
2253
|
-
id = from_union([from_none, from_str], obj.get("id"))
|
|
2254
|
-
size = from_union([from_none, from_str], obj.get("size"))
|
|
2255
|
-
size_name = from_union([from_none, from_str], obj.get("sizeName"))
|
|
2256
|
-
return SendFile(file_name, id, size, size_name)
|
|
2257
|
-
|
|
2258
|
-
def to_dict(self) -> dict:
|
|
2259
|
-
result: dict = {}
|
|
2260
|
-
result["fileName"] = from_str(self.file_name)
|
|
2261
|
-
if self.id is not None:
|
|
2262
|
-
result["id"] = from_union([from_none, from_str], self.id)
|
|
2263
|
-
if self.size is not None:
|
|
2264
|
-
result["size"] = from_union([from_none, from_str], self.size)
|
|
2265
|
-
if self.size_name is not None:
|
|
2266
|
-
result["sizeName"] = from_union([from_none, from_str], self.size_name)
|
|
2267
|
-
return result
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
@dataclass
|
|
2271
|
-
class SendText:
|
|
2272
|
-
hidden: bool
|
|
2273
|
-
text: Optional[str] = None
|
|
2274
|
-
|
|
2275
|
-
@staticmethod
|
|
2276
|
-
def from_dict(obj: Any) -> 'SendText':
|
|
2277
|
-
assert isinstance(obj, dict)
|
|
2278
|
-
hidden = from_bool(obj.get("hidden"))
|
|
2279
|
-
text = from_union([from_none, from_str], obj.get("text"))
|
|
2280
|
-
return SendText(hidden, text)
|
|
2281
|
-
|
|
2282
|
-
def to_dict(self) -> dict:
|
|
2283
|
-
result: dict = {}
|
|
2284
|
-
result["hidden"] = from_bool(self.hidden)
|
|
2285
|
-
if self.text is not None:
|
|
2286
|
-
result["text"] = from_union([from_none, from_str], self.text)
|
|
2287
|
-
return result
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
class SendType(Enum):
|
|
2291
|
-
FILE = "File"
|
|
2292
|
-
TEXT = "Text"
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
@dataclass
|
|
2296
|
-
class Send:
|
|
2297
|
-
access_count: int
|
|
2298
|
-
deletion_date: datetime
|
|
2299
|
-
disabled: bool
|
|
2300
|
-
hide_email: bool
|
|
2301
|
-
key: str
|
|
2302
|
-
name: str
|
|
2303
|
-
revision_date: datetime
|
|
2304
|
-
type: SendType
|
|
2305
|
-
access_id: Optional[str] = None
|
|
2306
|
-
expiration_date: Optional[datetime] = None
|
|
2307
|
-
file: Optional[SendFile] = None
|
|
2308
|
-
id: Optional[UUID] = None
|
|
2309
|
-
max_access_count: Optional[int] = None
|
|
2310
|
-
notes: Optional[str] = None
|
|
2311
|
-
password: Optional[str] = None
|
|
2312
|
-
text: Optional[SendText] = None
|
|
2313
|
-
|
|
2314
|
-
@staticmethod
|
|
2315
|
-
def from_dict(obj: Any) -> 'Send':
|
|
2316
|
-
assert isinstance(obj, dict)
|
|
2317
|
-
access_count = from_int(obj.get("accessCount"))
|
|
2318
|
-
deletion_date = from_datetime(obj.get("deletionDate"))
|
|
2319
|
-
disabled = from_bool(obj.get("disabled"))
|
|
2320
|
-
hide_email = from_bool(obj.get("hideEmail"))
|
|
2321
|
-
key = from_str(obj.get("key"))
|
|
2322
|
-
name = from_str(obj.get("name"))
|
|
2323
|
-
revision_date = from_datetime(obj.get("revisionDate"))
|
|
2324
|
-
type = SendType(obj.get("type"))
|
|
2325
|
-
access_id = from_union([from_none, from_str], obj.get("accessId"))
|
|
2326
|
-
expiration_date = from_union([from_none, from_datetime], obj.get("expirationDate"))
|
|
2327
|
-
file = from_union([SendFile.from_dict, from_none], obj.get("file"))
|
|
2328
|
-
id = from_union([from_none, lambda x: UUID(x)], obj.get("id"))
|
|
2329
|
-
max_access_count = from_union([from_none, from_int], obj.get("maxAccessCount"))
|
|
2330
|
-
notes = from_union([from_none, from_str], obj.get("notes"))
|
|
2331
|
-
password = from_union([from_none, from_str], obj.get("password"))
|
|
2332
|
-
text = from_union([SendText.from_dict, from_none], obj.get("text"))
|
|
2333
|
-
return Send(access_count, deletion_date, disabled, hide_email, key, name, revision_date, type, access_id, expiration_date, file, id, max_access_count, notes, password, text)
|
|
2334
|
-
|
|
2335
|
-
def to_dict(self) -> dict:
|
|
2336
|
-
result: dict = {}
|
|
2337
|
-
result["accessCount"] = from_int(self.access_count)
|
|
2338
|
-
result["deletionDate"] = self.deletion_date.isoformat()
|
|
2339
|
-
result["disabled"] = from_bool(self.disabled)
|
|
2340
|
-
result["hideEmail"] = from_bool(self.hide_email)
|
|
2341
|
-
result["key"] = from_str(self.key)
|
|
2342
|
-
result["name"] = from_str(self.name)
|
|
2343
|
-
result["revisionDate"] = self.revision_date.isoformat()
|
|
2344
|
-
result["type"] = to_enum(SendType, self.type)
|
|
2345
|
-
if self.access_id is not None:
|
|
2346
|
-
result["accessId"] = from_union([from_none, from_str], self.access_id)
|
|
2347
|
-
if self.expiration_date is not None:
|
|
2348
|
-
result["expirationDate"] = from_union([from_none, lambda x: x.isoformat()], self.expiration_date)
|
|
2349
|
-
if self.file is not None:
|
|
2350
|
-
result["file"] = from_union([lambda x: to_class(SendFile, x), from_none], self.file)
|
|
2351
|
-
if self.id is not None:
|
|
2352
|
-
result["id"] = from_union([from_none, lambda x: str(x)], self.id)
|
|
2353
|
-
if self.max_access_count is not None:
|
|
2354
|
-
result["maxAccessCount"] = from_union([from_none, from_int], self.max_access_count)
|
|
2355
|
-
if self.notes is not None:
|
|
2356
|
-
result["notes"] = from_union([from_none, from_str], self.notes)
|
|
2357
|
-
if self.password is not None:
|
|
2358
|
-
result["password"] = from_union([from_none, from_str], self.password)
|
|
2359
|
-
if self.text is not None:
|
|
2360
|
-
result["text"] = from_union([lambda x: to_class(SendText, x), from_none], self.text)
|
|
2361
|
-
return result
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
2527
|
@dataclass
|
|
2365
2528
|
class SyncResponse:
|
|
2366
2529
|
ciphers: List[Cipher]
|
|
2367
2530
|
"""List of ciphers accessible by the user"""
|
|
2531
|
+
|
|
2368
2532
|
collections: List[Collection]
|
|
2369
2533
|
folders: List[Folder]
|
|
2370
|
-
policies: List[Policy]
|
|
2371
2534
|
profile: ProfileResponse
|
|
2372
2535
|
"""Data about the user, including their encryption keys and the organizations they are a
|
|
2373
2536
|
part of
|
|
2374
2537
|
"""
|
|
2375
|
-
sends: List[Send]
|
|
2376
2538
|
domains: Optional[DomainResponse] = None
|
|
2377
2539
|
|
|
2378
2540
|
@staticmethod
|
|
@@ -2381,20 +2543,16 @@ class SyncResponse:
|
|
|
2381
2543
|
ciphers = from_list(Cipher.from_dict, obj.get("ciphers"))
|
|
2382
2544
|
collections = from_list(Collection.from_dict, obj.get("collections"))
|
|
2383
2545
|
folders = from_list(Folder.from_dict, obj.get("folders"))
|
|
2384
|
-
policies = from_list(Policy.from_dict, obj.get("policies"))
|
|
2385
2546
|
profile = ProfileResponse.from_dict(obj.get("profile"))
|
|
2386
|
-
sends = from_list(Send.from_dict, obj.get("sends"))
|
|
2387
2547
|
domains = from_union([DomainResponse.from_dict, from_none], obj.get("domains"))
|
|
2388
|
-
return SyncResponse(ciphers, collections, folders,
|
|
2548
|
+
return SyncResponse(ciphers, collections, folders, profile, domains)
|
|
2389
2549
|
|
|
2390
2550
|
def to_dict(self) -> dict:
|
|
2391
2551
|
result: dict = {}
|
|
2392
2552
|
result["ciphers"] = from_list(lambda x: to_class(Cipher, x), self.ciphers)
|
|
2393
2553
|
result["collections"] = from_list(lambda x: to_class(Collection, x), self.collections)
|
|
2394
2554
|
result["folders"] = from_list(lambda x: to_class(Folder, x), self.folders)
|
|
2395
|
-
result["policies"] = from_list(lambda x: to_class(Policy, x), self.policies)
|
|
2396
2555
|
result["profile"] = to_class(ProfileResponse, self.profile)
|
|
2397
|
-
result["sends"] = from_list(lambda x: to_class(Send, x), self.sends)
|
|
2398
2556
|
if self.domains is not None:
|
|
2399
2557
|
result["domains"] = from_union([lambda x: to_class(DomainResponse, x), from_none], self.domains)
|
|
2400
2558
|
return result
|
|
@@ -2404,8 +2562,10 @@ class SyncResponse:
|
|
|
2404
2562
|
class ResponseForSyncResponse:
|
|
2405
2563
|
success: bool
|
|
2406
2564
|
"""Whether or not the SDK request succeeded."""
|
|
2565
|
+
|
|
2407
2566
|
data: Optional[SyncResponse] = None
|
|
2408
2567
|
"""The response data. Populated if `success` is true."""
|
|
2568
|
+
|
|
2409
2569
|
error_message: Optional[str] = None
|
|
2410
2570
|
"""A message for any error that may occur. Populated if `success` is false."""
|
|
2411
2571
|
|
|
@@ -2484,8 +2644,10 @@ class UserAPIKeyResponse:
|
|
|
2484
2644
|
class ResponseForUserAPIKeyResponse:
|
|
2485
2645
|
success: bool
|
|
2486
2646
|
"""Whether or not the SDK request succeeded."""
|
|
2647
|
+
|
|
2487
2648
|
data: Optional[UserAPIKeyResponse] = None
|
|
2488
2649
|
"""The response data. Populated if `success` is true."""
|
|
2650
|
+
|
|
2489
2651
|
error_message: Optional[str] = None
|
|
2490
2652
|
"""A message for any error that may occur. Populated if `success` is false."""
|
|
2491
2653
|
|
|
@@ -2659,6 +2821,14 @@ def secrets_delete_request_to_dict(x: SecretsDeleteRequest) -> Any:
|
|
|
2659
2821
|
return to_class(SecretsDeleteRequest, x)
|
|
2660
2822
|
|
|
2661
2823
|
|
|
2824
|
+
def secrets_sync_request_from_dict(s: Any) -> SecretsSyncRequest:
|
|
2825
|
+
return SecretsSyncRequest.from_dict(s)
|
|
2826
|
+
|
|
2827
|
+
|
|
2828
|
+
def secrets_sync_request_to_dict(x: SecretsSyncRequest) -> Any:
|
|
2829
|
+
return to_class(SecretsSyncRequest, x)
|
|
2830
|
+
|
|
2831
|
+
|
|
2662
2832
|
def projects_command_from_dict(s: Any) -> ProjectsCommand:
|
|
2663
2833
|
return ProjectsCommand.from_dict(s)
|
|
2664
2834
|
|
|
@@ -2707,6 +2877,22 @@ def projects_delete_request_to_dict(x: ProjectsDeleteRequest) -> Any:
|
|
|
2707
2877
|
return to_class(ProjectsDeleteRequest, x)
|
|
2708
2878
|
|
|
2709
2879
|
|
|
2880
|
+
def generators_command_from_dict(s: Any) -> GeneratorsCommand:
|
|
2881
|
+
return GeneratorsCommand.from_dict(s)
|
|
2882
|
+
|
|
2883
|
+
|
|
2884
|
+
def generators_command_to_dict(x: GeneratorsCommand) -> Any:
|
|
2885
|
+
return to_class(GeneratorsCommand, x)
|
|
2886
|
+
|
|
2887
|
+
|
|
2888
|
+
def password_generator_request_from_dict(s: Any) -> PasswordGeneratorRequest:
|
|
2889
|
+
return PasswordGeneratorRequest.from_dict(s)
|
|
2890
|
+
|
|
2891
|
+
|
|
2892
|
+
def password_generator_request_to_dict(x: PasswordGeneratorRequest) -> Any:
|
|
2893
|
+
return to_class(PasswordGeneratorRequest, x)
|
|
2894
|
+
|
|
2895
|
+
|
|
2710
2896
|
def response_for_api_key_login_response_from_dict(s: Any) -> ResponseForAPIKeyLoginResponse:
|
|
2711
2897
|
return ResponseForAPIKeyLoginResponse.from_dict(s)
|
|
2712
2898
|
|
|
@@ -2899,6 +3085,22 @@ def secret_delete_response_to_dict(x: SecretDeleteResponse) -> Any:
|
|
|
2899
3085
|
return to_class(SecretDeleteResponse, x)
|
|
2900
3086
|
|
|
2901
3087
|
|
|
3088
|
+
def response_for_secrets_sync_response_from_dict(s: Any) -> ResponseForSecretsSyncResponse:
|
|
3089
|
+
return ResponseForSecretsSyncResponse.from_dict(s)
|
|
3090
|
+
|
|
3091
|
+
|
|
3092
|
+
def response_for_secrets_sync_response_to_dict(x: ResponseForSecretsSyncResponse) -> Any:
|
|
3093
|
+
return to_class(ResponseForSecretsSyncResponse, x)
|
|
3094
|
+
|
|
3095
|
+
|
|
3096
|
+
def secrets_sync_response_from_dict(s: Any) -> SecretsSyncResponse:
|
|
3097
|
+
return SecretsSyncResponse.from_dict(s)
|
|
3098
|
+
|
|
3099
|
+
|
|
3100
|
+
def secrets_sync_response_to_dict(x: SecretsSyncResponse) -> Any:
|
|
3101
|
+
return to_class(SecretsSyncResponse, x)
|
|
3102
|
+
|
|
3103
|
+
|
|
2902
3104
|
def response_for_project_response_from_dict(s: Any) -> ResponseForProjectResponse:
|
|
2903
3105
|
return ResponseForProjectResponse.from_dict(s)
|
|
2904
3106
|
|
|
@@ -2955,6 +3157,14 @@ def project_delete_response_to_dict(x: ProjectDeleteResponse) -> Any:
|
|
|
2955
3157
|
return to_class(ProjectDeleteResponse, x)
|
|
2956
3158
|
|
|
2957
3159
|
|
|
3160
|
+
def response_for_string_from_dict(s: Any) -> ResponseForString:
|
|
3161
|
+
return ResponseForString.from_dict(s)
|
|
3162
|
+
|
|
3163
|
+
|
|
3164
|
+
def response_for_string_to_dict(x: ResponseForString) -> Any:
|
|
3165
|
+
return to_class(ResponseForString, x)
|
|
3166
|
+
|
|
3167
|
+
|
|
2958
3168
|
def response_for_fingerprint_response_from_dict(s: Any) -> ResponseForFingerprintResponse:
|
|
2959
3169
|
return ResponseForFingerprintResponse.from_dict(s)
|
|
2960
3170
|
|
|
@@ -3067,6 +3277,14 @@ def uri_match_type_to_dict(x: URIMatchType) -> Any:
|
|
|
3067
3277
|
return to_enum(URIMatchType, x)
|
|
3068
3278
|
|
|
3069
3279
|
|
|
3280
|
+
def fido2_credential_from_dict(s: Any) -> Fido2Credential:
|
|
3281
|
+
return Fido2Credential.from_dict(s)
|
|
3282
|
+
|
|
3283
|
+
|
|
3284
|
+
def fido2_credential_to_dict(x: Fido2Credential) -> Any:
|
|
3285
|
+
return to_class(Fido2Credential, x)
|
|
3286
|
+
|
|
3287
|
+
|
|
3070
3288
|
def identity_from_dict(s: Any) -> Identity:
|
|
3071
3289
|
return Identity.from_dict(s)
|
|
3072
3290
|
|
|
@@ -3195,54 +3413,6 @@ def global_domains_to_dict(x: GlobalDomains) -> Any:
|
|
|
3195
3413
|
return to_class(GlobalDomains, x)
|
|
3196
3414
|
|
|
3197
3415
|
|
|
3198
|
-
def policy_from_dict(s: Any) -> Policy:
|
|
3199
|
-
return Policy.from_dict(s)
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
def policy_to_dict(x: Policy) -> Any:
|
|
3203
|
-
return to_class(Policy, x)
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
def policy_type_from_dict(s: Any) -> PolicyType:
|
|
3207
|
-
return PolicyType(s)
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
def policy_type_to_dict(x: PolicyType) -> Any:
|
|
3211
|
-
return to_enum(PolicyType, x)
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
def send_from_dict(s: Any) -> Send:
|
|
3215
|
-
return Send.from_dict(s)
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
def send_to_dict(x: Send) -> Any:
|
|
3219
|
-
return to_class(Send, x)
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
def send_type_from_dict(s: Any) -> SendType:
|
|
3223
|
-
return SendType(s)
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
def send_type_to_dict(x: SendType) -> Any:
|
|
3227
|
-
return to_enum(SendType, x)
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
def send_file_from_dict(s: Any) -> SendFile:
|
|
3231
|
-
return SendFile.from_dict(s)
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
def send_file_to_dict(x: SendFile) -> Any:
|
|
3235
|
-
return to_class(SendFile, x)
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
def send_text_from_dict(s: Any) -> SendText:
|
|
3239
|
-
return SendText.from_dict(s)
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
def send_text_to_dict(x: SendText) -> Any:
|
|
3243
|
-
return to_class(SendText, x)
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
3416
|
def response_for_user_api_key_response_from_dict(s: Any) -> ResponseForUserAPIKeyResponse:
|
|
3247
3417
|
return ResponseForUserAPIKeyResponse.from_dict(s)
|
|
3248
3418
|
|