|
5 | 5 | import datetime
|
6 | 6 | from typing import TYPE_CHECKING, Any, Dict, List, Mapping, Optional
|
7 | 7 |
|
8 |
| -from pydantic import BaseModel, Field, HttpUrl, SecretStr, validator |
| 8 | +from pydantic import BaseModel, Field, HttpUrl, validator |
9 | 9 |
|
10 | 10 | from keeper.editiontracking import EditionTrackingModes
|
11 | 11 | from keeper.exceptions import ValidationError
|
|
28 | 28 | from keeper.models import Build, Edition, Product
|
29 | 29 |
|
30 | 30 |
|
31 |
| -class AuthTokenResponse(BaseModel): |
32 |
| - """The auth token resource.""" |
33 |
| - |
34 |
| - token: SecretStr |
35 |
| - """Token string. Use this token in the basic auth "username" field.""" |
36 |
| - |
37 |
| - class Config: |
38 |
| - json_encoders = { |
39 |
| - SecretStr: lambda v: v.get_secret_value() if v else None, |
40 |
| - } |
41 |
| - |
42 |
| - |
43 |
| -class RootLinks(BaseModel): |
44 |
| - """Sub-resource containing links to APIs.""" |
45 |
| - |
46 |
| - self_url: HttpUrl |
47 |
| - """The URL of this resource.""" |
48 |
| - |
49 |
| - token: HttpUrl |
50 |
| - """The URL of the authorization endpoint to obtain a token.""" |
51 |
| - |
52 |
| - products: HttpUrl |
53 |
| - """The endpoint for the products listing.""" |
54 |
| - |
55 |
| - |
56 |
| -class RootData(BaseModel): |
57 |
| - """Sub-resource providing metadata about the service.""" |
58 |
| - |
59 |
| - server_version: str |
60 |
| - """The service vesion.""" |
61 |
| - |
62 |
| - documentation: HttpUrl |
63 |
| - """The URL of the service's documentation.""" |
64 |
| - |
65 |
| - message: str |
66 |
| - """Description of the service.""" |
67 |
| - |
68 |
| - |
69 |
| -class RootResponse(BaseModel): |
70 |
| - """The root endpoint resources provides metadata and links for the |
71 |
| - service. |
72 |
| - """ |
73 |
| - |
74 |
| - data: RootData |
75 |
| - |
76 |
| - links: RootLinks |
77 |
| - |
78 |
| - |
79 | 31 | class PresignedPostUrl(BaseModel):
|
80 | 32 | """An S3 presigned post URL and associated metadata."""
|
81 | 33 |
|
|
0 commit comments