|
4 | 4 | from dataclasses_json import dataclass_json |
5 | 5 | from typing_extensions import TypedDict, NotRequired |
6 | 6 |
|
7 | | -from nylas.models.redirect_uri import RedirectUri |
| 7 | +from nylas.models.redirect_uri import RedirectUri, WritableRedirectUriSettings |
8 | 8 |
|
9 | 9 | Region = str |
10 | 10 | """ The Nylas API region (free-form string, e.g. ``us``, ``eu``). """ |
@@ -196,26 +196,42 @@ class WritableAdditionalSettings(TypedDict): |
196 | 196 | allow_query_param_in_redirect_uri: NotRequired[bool] |
197 | 197 |
|
198 | 198 |
|
| 199 | +class UpdateApplicationRedirectUriRequest(TypedDict): |
| 200 | + """ |
| 201 | + Class representing a callback URI provided for an update application call. |
| 202 | +
|
| 203 | + Attributes: |
| 204 | + id: Existing callback URI ID. Include this when preserving or updating an existing URI. |
| 205 | + url: Redirect URL. |
| 206 | + platform: Platform identifier. Optional; defaults to "web" server-side. |
| 207 | + settings: Optional settings for the redirect URI. |
| 208 | + """ |
| 209 | + |
| 210 | + id: NotRequired[str] |
| 211 | + url: str |
| 212 | + platform: NotRequired[str] |
| 213 | + settings: NotRequired[WritableRedirectUriSettings] |
| 214 | + |
| 215 | + |
199 | 216 | class UpdateApplicationRequest(TypedDict): |
200 | 217 | """ |
201 | 218 | Class representing a request to update a Nylas application. |
202 | 219 |
|
203 | 220 | Note: |
204 | | - ``callback_uris`` / ``redirect_uris`` cannot be set via this request; the |
205 | | - server silently ignores them. Manage callback URIs via the dedicated |
206 | | - redirect-uris endpoints. ``additional_settings`` is write-only and is |
207 | | - stripped from the response. |
| 221 | + ``additional_settings`` is write-only and is stripped from the response. |
208 | 222 |
|
209 | 223 | Attributes: |
210 | 224 | branding: Branding details for the application. |
211 | 225 | hosted_authentication: Hosted authentication branding details. |
212 | 226 | idp_settings: Identity provider settings. |
| 227 | + callback_uris: List of callback URIs for the application. |
213 | 228 | domain: The white-label domain associated with the application. |
214 | 229 | additional_settings: Additional (write-only) application settings. |
215 | 230 | """ |
216 | 231 |
|
217 | 232 | branding: NotRequired[WritableBranding] |
218 | 233 | hosted_authentication: NotRequired[WritableHostedAuthentication] |
219 | 234 | idp_settings: NotRequired[WritableIdpSettings] |
| 235 | + callback_uris: NotRequired[List[UpdateApplicationRedirectUriRequest]] |
220 | 236 | domain: NotRequired[str] |
221 | 237 | additional_settings: NotRequired[WritableAdditionalSettings] |
0 commit comments