Skip to content

Commit 03f5b9c

Browse files
author
ivanmilevtues
committed
Added high-level diagrams
1 parent be4a41c commit 03f5b9c

9 files changed

+1616
-0
lines changed

.codeboarding/ApiClientCore.md

Lines changed: 293 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
```mermaid
2+
graph LR
3+
AuthenticationService["AuthenticationService"]
4+
OAuth2FlowBase["OAuth2FlowBase"]
5+
OAuth2FlowNoRedirect["OAuth2FlowNoRedirect"]
6+
OAuth2FlowRedirect["OAuth2FlowRedirect"]
7+
OAuth2FlowResults["OAuth2FlowResults"]
8+
OAuth2FlowExceptions["OAuth2FlowExceptions"]
9+
AuthErrors["AuthErrors"]
10+
AuthenticationService -- "orchestrates" --> OAuth2FlowNoRedirect
11+
AuthenticationService -- "orchestrates" --> OAuth2FlowRedirect
12+
AuthenticationService -- "handles" --> AuthErrors
13+
AuthenticationService -- "handles" --> OAuth2FlowExceptions
14+
OAuth2FlowNoRedirect -- "inherits from" --> OAuth2FlowBase
15+
OAuth2FlowRedirect -- "inherits from" --> OAuth2FlowBase
16+
OAuth2FlowNoRedirect -- "produces" --> OAuth2FlowResults
17+
OAuth2FlowRedirect -- "produces" --> OAuth2FlowResults
18+
OAuth2FlowBase -- "raises" --> OAuth2FlowExceptions
19+
OAuth2FlowRedirect -- "validates with" --> OAuth2FlowExceptions
20+
AuthErrors -- "groups" --> AccessError
21+
AuthErrors -- "groups" --> AuthError
22+
```
23+
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org)
24+
25+
## Component Details
26+
27+
The AuthenticationService subsystem in Dropbox manages secure user authentication and authorization using OAuth2, including PKCE. It provides distinct flows for redirect-based (web) and no-redirect (command-line) applications, ensuring proper handling of authorization codes, access tokens, and refresh tokens. The subsystem also defines a comprehensive set of exceptions to manage various authentication and access-related errors, providing clear error handling for different failure scenarios.
28+
29+
### AuthenticationService
30+
Manages user authentication and authorization flows, including OAuth2 and PKCE, and defines various authentication-related errors. It ensures secure access to Dropbox resources.
31+
32+
33+
**Related Classes/Methods**:
34+
35+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/oauth.py#L119-L263" target="_blank" rel="noopener noreferrer">`dropbox.oauth.DropboxOAuth2FlowBase` (119:263)</a>
36+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/oauth.py#L266-L350" target="_blank" rel="noopener noreferrer">`dropbox.oauth.DropboxOAuth2FlowNoRedirect` (266:350)</a>
37+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/oauth.py#L353-L536" target="_blank" rel="noopener noreferrer">`dropbox.oauth.DropboxOAuth2Flow` (353:536)</a>
38+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/auth.py#L10-L100" target="_blank" rel="noopener noreferrer">`dropbox.auth.AccessError` (10:100)</a>
39+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/auth.py#L104-L229" target="_blank" rel="noopener noreferrer">`dropbox.auth.AuthError` (104:229)</a>
40+
41+
42+
### OAuth2FlowBase
43+
This component provides the foundational logic for all OAuth2 authorization flows, handling common tasks like URL construction, parameter encoding, and PKCE (Proof Key for Code Exchange) operations. It serves as the base class for specific flow implementations.
44+
45+
46+
**Related Classes/Methods**:
47+
48+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/oauth.py#L119-L263" target="_blank" rel="noopener noreferrer">`dropbox.oauth.DropboxOAuth2FlowBase` (119:263)</a>
49+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/oauth.py#L604-L622" target="_blank" rel="noopener noreferrer">`dropbox.oauth._params_to_urlencoded` (604:622)</a>
50+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/oauth.py#L624-L629" target="_blank" rel="noopener noreferrer">`dropbox.oauth._generate_pkce_code_verifier` (624:629)</a>
51+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/oauth.py#L631-L635" target="_blank" rel="noopener noreferrer">`dropbox.oauth._generate_pkce_code_challenge` (631:635)</a>
52+
53+
54+
### OAuth2FlowNoRedirect
55+
This component specializes in OAuth2 authorization for applications that do not use a redirect URI, such as command-line tools. It extends the base OAuth2 flow functionality to support this specific use case.
56+
57+
58+
**Related Classes/Methods**:
59+
60+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/oauth.py#L266-L350" target="_blank" rel="noopener noreferrer">`dropbox.oauth.DropboxOAuth2FlowNoRedirect` (266:350)</a>
61+
62+
63+
### OAuth2FlowRedirect
64+
This component handles OAuth2 authorization for web applications that rely on a redirect URI. It includes mechanisms for CSRF protection and manages the state throughout the authorization process.
65+
66+
67+
**Related Classes/Methods**:
68+
69+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/oauth.py#L353-L536" target="_blank" rel="noopener noreferrer">`dropbox.oauth.DropboxOAuth2Flow` (353:536)</a>
70+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/oauth.py#L595-L601" target="_blank" rel="noopener noreferrer">`dropbox.oauth._safe_equals` (595:601)</a>
71+
72+
73+
### OAuth2FlowResults
74+
This component defines the data structures used to encapsulate the results of successful OAuth2 authorization flows. OAuth2FlowNoRedirectResult is a general result type, and OAuth2FlowResult is a specific result that inherits from it, providing access tokens, account information, and other relevant details.
75+
76+
77+
**Related Classes/Methods**:
78+
79+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/oauth.py#L80-L116" target="_blank" rel="noopener noreferrer">`dropbox.oauth.OAuth2FlowResult` (80:116)</a>
80+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/oauth.py#L40-L77" target="_blank" rel="noopener noreferrer">`dropbox.oauth.OAuth2FlowNoRedirectResult` (40:77)</a>
81+
82+
83+
### OAuth2FlowExceptions
84+
This component groups all exceptions specific to the OAuth2 authorization process, providing distinct error types for various failure scenarios like bad input, invalid requests, state mismatches, or user denial.
85+
86+
87+
**Related Classes/Methods**:
88+
89+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/oauth.py#L585-L592" target="_blank" rel="noopener noreferrer">`dropbox.oauth.BadInputException` (585:592)</a>
90+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/oauth.py#L539-L545" target="_blank" rel="noopener noreferrer">`dropbox.oauth.BadRequestException` (539:545)</a>
91+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/oauth.py#L548-L555" target="_blank" rel="noopener noreferrer">`dropbox.oauth.BadStateException` (548:555)</a>
92+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/oauth.py#L558-L565" target="_blank" rel="noopener noreferrer">`dropbox.oauth.CsrfException` (558:565)</a>
93+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/oauth.py#L568-L572" target="_blank" rel="noopener noreferrer">`dropbox.oauth.NotApprovedException` (568:572)</a>
94+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/oauth.py#L575-L582" target="_blank" rel="noopener noreferrer">`dropbox.oauth.ProviderException` (575:582)</a>
95+
96+
97+
### AuthErrors
98+
This component defines exceptions related to general authentication and access control, distinct from the OAuth2 flow-specific errors.
99+
100+
101+
**Related Classes/Methods**:
102+
103+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/auth.py#L10-L100" target="_blank" rel="noopener noreferrer">`dropbox.auth.AccessError` (10:100)</a>
104+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/auth.py#L104-L229" target="_blank" rel="noopener noreferrer">`dropbox.auth.AuthError` (104:229)</a>
105+
106+
107+
108+
109+
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)

.codeboarding/CoreDataModels.md

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
```mermaid
2+
graph LR
3+
Core_Data_Models["Core Data Models"]
4+
User_Account_Models["User Account Models"]
5+
Team_and_Group_Models["Team and Group Models"]
6+
User_Feature_Models["User Feature Models"]
7+
Space_Allocation_Models["Space Allocation Models"]
8+
User_Account_Models -- "uses" --> Core_Data_Models
9+
Team_and_Group_Models -- "uses" --> Core_Data_Models
10+
User_Feature_Models -- "uses" --> Core_Data_Models
11+
Space_Allocation_Models -- "uses" --> Core_Data_Models
12+
```
13+
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org)
14+
15+
## Component Details
16+
17+
This graph illustrates the core data models and their relationships within the Dropbox SDK. The central component, 'Core Data Models', provides foundational data structures and utility classes that are widely reused. Other components, such as 'User Account Models', 'Team and Group Models', 'User Feature Models', and 'Space Allocation Models', depend on and utilize these core data models to define their specific domain-related structures, ensuring consistency and reusability across the SDK.
18+
19+
### Core Data Models
20+
Contains shared data models and utility classes used across different parts of the Dropbox SDK, promoting consistency and reusability. This includes foundational data structures for path roots, root information (user and team specific), and common data type validators, as well as shared models specific to teams and users.
21+
22+
23+
**Related Classes/Methods**:
24+
25+
- `dropbox.common` (full file reference)
26+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L10-L116" target="_blank" rel="noopener noreferrer">`dropbox.common.PathRoot` (10:116)</a>
27+
- `dropbox.common.PathRoot:home` (full file reference)
28+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L34-L42" target="_blank" rel="noopener noreferrer">`dropbox.common.PathRoot:root` (34:42)</a>
29+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L45-L53" target="_blank" rel="noopener noreferrer">`dropbox.common.PathRoot:namespace_id` (45:53)</a>
30+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L87-L99" target="_blank" rel="noopener noreferrer">`dropbox.common.PathRoot:get_root` (87:99)</a>
31+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L101-L113" target="_blank" rel="noopener noreferrer">`dropbox.common.PathRoot:get_namespace_id` (101:113)</a>
32+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L55-L61" target="_blank" rel="noopener noreferrer">`dropbox.common.PathRoot.is_home` (55:61)</a>
33+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L63-L69" target="_blank" rel="noopener noreferrer">`dropbox.common.PathRoot.is_root` (63:69)</a>
34+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L71-L77" target="_blank" rel="noopener noreferrer">`dropbox.common.PathRoot.is_namespace_id` (71:77)</a>
35+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L120-L188" target="_blank" rel="noopener noreferrer">`dropbox.common.PathRootError` (120:188)</a>
36+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L140-L148" target="_blank" rel="noopener noreferrer">`dropbox.common.PathRootError:invalid_root` (140:148)</a>
37+
- `dropbox.common.PathRootError:no_permission` (full file reference)
38+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L174-L185" target="_blank" rel="noopener noreferrer">`dropbox.common.PathRootError:get_invalid_root` (174:185)</a>
39+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L150-L156" target="_blank" rel="noopener noreferrer">`dropbox.common.PathRootError.is_invalid_root` (150:156)</a>
40+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L192-L228" target="_blank" rel="noopener noreferrer">`dropbox.common.RootInfo` (192:228)</a>
41+
- `dropbox.common.RootInfo:root_namespace_id` (full file reference)
42+
- `dropbox.common.RootInfo:home_namespace_id` (full file reference)
43+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L232-L260" target="_blank" rel="noopener noreferrer">`dropbox.common.TeamRootInfo` (232:260)</a>
44+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L246-L254" target="_blank" rel="noopener noreferrer">`dropbox.common.TeamRootInfo:__init__` (246:254)</a>
45+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L259-L260" target="_blank" rel="noopener noreferrer">`dropbox.common.TeamRootInfo:_process_custom_annotations` (259:260)</a>
46+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L264-L282" target="_blank" rel="noopener noreferrer">`dropbox.common.UserRootInfo` (264:282)</a>
47+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L275-L279" target="_blank" rel="noopener noreferrer">`dropbox.common.UserRootInfo:__init__` (275:279)</a>
48+
- <a href="https://github.com/dropbox/dropbox-sdk-python/blob/master/dropbox/common.py#L281-L282" target="_blank" rel="noopener noreferrer">`dropbox.common.UserRootInfo:_process_custom_annotations` (281:282)</a>
49+
- `dropbox.team_common` (full file reference)
50+
- `dropbox.users_common` (full file reference)
51+
52+
53+
### User Account Models
54+
This component defines the data structures for various types of user accounts, including basic and full account details, and related information like names and account retrieval arguments/errors.
55+
56+
57+
**Related Classes/Methods**:
58+
59+
- `dropbox.users.Account` (full file reference)
60+
- `dropbox.users.Account:__init__` (full file reference)
61+
- `dropbox.users.Account:_process_custom_annotations` (full file reference)
62+
- `dropbox.users.BasicAccount` (full file reference)
63+
- `dropbox.users.BasicAccount:__init__` (full file reference)
64+
- `dropbox.users.BasicAccount:_process_custom_annotations` (full file reference)
65+
- `dropbox.users.FullAccount` (full file reference)
66+
- `dropbox.users.FullAccount:__init__` (full file reference)
67+
- `dropbox.users.FullAccount:_process_custom_annotations` (full file reference)
68+
- `dropbox.users.Name` (full file reference)
69+
- `dropbox.users.GetAccountArg` (full file reference)
70+
- `dropbox.users.GetAccountBatchArg` (full file reference)
71+
- `dropbox.users.GetAccountBatchError` (full file reference)
72+
- `dropbox.users.GetAccountBatchError:no_account` (full file reference)
73+
- `dropbox.users.GetAccountBatchError:get_no_account` (full file reference)
74+
- `dropbox.users.GetAccountBatchError.is_no_account` (full file reference)
75+
- `dropbox.users.GetAccountError` (full file reference)
76+
77+
78+
### Team and Group Models
79+
This component defines data structures for team and group information, including basic team details and full group information. It interacts with an external common group summary for shared processing.
80+
81+
82+
**Related Classes/Methods**:
83+
84+
- `dropbox.users.Team` (full file reference)
85+
- `dropbox.users.Team:__init__` (full file reference)
86+
- `dropbox.users.Team:_process_custom_annotations` (full file reference)
87+
- `dropbox.users.FullTeam` (full file reference)
88+
- `dropbox.users.FullTeam:__init__` (full file reference)
89+
- `dropbox.users.FullTeam:_process_custom_annotations` (full file reference)
90+
- `dropbox.sharing.GroupInfo` (full file reference)
91+
- `dropbox.sharing.GroupInfo:__init__` (full file reference)
92+
- `dropbox.sharing.GroupInfo:_process_custom_annotations` (full file reference)
93+
- `dropbox.team.GroupFullInfo` (full file reference)
94+
- `dropbox.team.GroupFullInfo:__init__` (full file reference)
95+
- `dropbox.team.GroupFullInfo:_process_custom_annotations` (full file reference)
96+
97+
98+
### User Feature Models
99+
This component encapsulates various user-specific features, such as file locking and Paper document handling, defining their possible values and states.
100+
101+
102+
**Related Classes/Methods**:
103+
104+
- `dropbox.users.FileLockingValue` (full file reference)
105+
- `dropbox.users.FileLockingValue:enabled` (full file reference)
106+
- `dropbox.users.FileLockingValue:get_enabled` (full file reference)
107+
- `dropbox.users.FileLockingValue.is_enabled` (full file reference)
108+
- `dropbox.users.PaperAsFilesValue` (full file reference)
109+
- `dropbox.users.PaperAsFilesValue:enabled` (full file reference)
110+
- `dropbox.users.PaperAsFilesValue:get_enabled` (full file reference)
111+
- `dropbox.users.PaperAsFilesValue.is_enabled` (full file reference)
112+
- `dropbox.users.UserFeature` (full file reference)
113+
- `dropbox.users.UserFeatureValue` (full file reference)
114+
- `dropbox.users.UserFeatureValue:paper_as_files` (full file reference)
115+
- `dropbox.users.UserFeatureValue:file_locking` (full file reference)
116+
- `dropbox.users.UserFeatureValue:get_paper_as_files` (full file reference)
117+
- `dropbox.users.UserFeatureValue:get_file_locking` (full file reference)
118+
- `dropbox.users.UserFeatureValue.is_paper_as_files` (full file reference)
119+
- `dropbox.users.UserFeatureValue.is_file_locking` (full file reference)
120+
121+
122+
### Space Allocation Models
123+
This component describes how storage space is allocated and used, differentiating between individual and team-based allocations.
124+
125+
126+
**Related Classes/Methods**:
127+
128+
- `dropbox.users.SpaceAllocation` (full file reference)
129+
- `dropbox.users.SpaceAllocation:individual` (full file reference)
130+
- `dropbox.users.SpaceAllocation:team` (full file reference)
131+
- `dropbox.users.SpaceAllocation:get_individual` (full file reference)
132+
- `dropbox.users.SpaceAllocation:get_team` (full file reference)
133+
- `dropbox.users.SpaceAllocation.is_individual` (full file reference)
134+
- `dropbox.users.SpaceAllocation.is_team` (full file reference)
135+
- `dropbox.users.IndividualSpaceAllocation` (full file reference)
136+
- `dropbox.users.TeamSpaceAllocation` (full file reference)
137+
- `dropbox.users.SpaceUsage` (full file reference)
138+
139+
140+
141+
142+
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)

0 commit comments

Comments
 (0)