Skip to content

application_details

Environment = str module-attribute

The Nylas API environment (free-form string, e.g. sandbox).

Region = str module-attribute

The Nylas API region (free-form string, e.g. us, eu).

ApplicationDetails dataclass

Class representation of a Nylas application details object.

Attributes:

Name Type Description
application_id str

Public application ID.

organization_id str

ID representing the organization.

region Region

Region identifier.

environment Environment

Environment identifier.

branding Branding

Branding details for the application.

domain Optional[str]

The white-label domain associated with the application, if any.

hosted_authentication Optional[HostedAuthentication]

Hosted authentication branding details.

idp_settings Optional[IdpSettings]

Identity provider settings.

callback_uris List[RedirectUri]

List of redirect URIs.

created_at Optional[int]

Unix timestamp (seconds) when the application was created.

updated_at Optional[int]

Unix timestamp (seconds) when the application was last updated.

blocked Optional[bool]

Whether the application is blocked.

Source code in nylas/models/application_details.py
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
@dataclass_json
@dataclass
class ApplicationDetails:
    """
    Class representation of a Nylas application details object.

    Attributes:
        application_id: Public application ID.
        organization_id: ID representing the organization.
        region: Region identifier.
        environment: Environment identifier.
        branding: Branding details for the application.
        domain: The white-label domain associated with the application, if any.
        hosted_authentication: Hosted authentication branding details.
        idp_settings: Identity provider settings.
        callback_uris: List of redirect URIs.
        created_at: Unix timestamp (seconds) when the application was created.
        updated_at: Unix timestamp (seconds) when the application was last updated.
        blocked: Whether the application is blocked.
    """

    application_id: str
    organization_id: str
    region: Region
    environment: Environment
    branding: Branding
    domain: Optional[str] = None
    hosted_authentication: Optional[HostedAuthentication] = None
    idp_settings: Optional[IdpSettings] = None
    callback_uris: List[RedirectUri] = field(default_factory=list)
    created_at: Optional[int] = None
    updated_at: Optional[int] = None
    blocked: Optional[bool] = None

Branding dataclass

Class representation of branding details for the application.

Attributes:

Name Type Description
name str

Name of the application.

icon_url Optional[str]

URL pointing to the application icon.

website_url Optional[str]

Application/publisher website URL.

description Optional[str]

Description of the application.

Source code in nylas/models/application_details.py
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@dataclass_json
@dataclass
class Branding:
    """
    Class representation of branding details for the application.

    Attributes:
        name: Name of the application.
        icon_url: URL pointing to the application icon.
        website_url: Application/publisher website URL.
        description: Description of the application.
    """

    name: str
    icon_url: Optional[str] = None
    website_url: Optional[str] = None
    description: Optional[str] = None

HostedAuthentication dataclass

Class representation of hosted authentication branding details.

Attributes:

Name Type Description
background_image_url Optional[str]

URL pointing to the background image.

alignment Optional[str]

Alignment of the background image.

color_primary Optional[str]

Primary color of the hosted authentication page.

color_secondary Optional[str]

Secondary color of the hosted authentication page.

title Optional[str]

Title of the hosted authentication page.

subtitle Optional[str]

Subtitle for the hosted authentication page.

background_color Optional[str]

Background color of the hosted authentication page.

spacing Optional[int]

CSS spacing attribute in px.

terms_of_service_url Optional[str]

URL pointing to the terms of service.

privacy_policy_url Optional[str]

URL pointing to the privacy policy.

Source code in nylas/models/application_details.py
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@dataclass_json
@dataclass
class HostedAuthentication:
    """
    Class representation of hosted authentication branding details.

    Attributes:
        background_image_url: URL pointing to the background image.
        alignment: Alignment of the background image.
        color_primary: Primary color of the hosted authentication page.
        color_secondary: Secondary color of the hosted authentication page.
        title: Title of the hosted authentication page.
        subtitle: Subtitle for the hosted authentication page.
        background_color: Background color of the hosted authentication page.
        spacing: CSS spacing attribute in px.
        terms_of_service_url: URL pointing to the terms of service.
        privacy_policy_url: URL pointing to the privacy policy.
    """

    background_image_url: Optional[str] = None
    alignment: Optional[str] = None
    color_primary: Optional[str] = None
    color_secondary: Optional[str] = None
    title: Optional[str] = None
    subtitle: Optional[str] = None
    background_color: Optional[str] = None
    spacing: Optional[int] = None
    terms_of_service_url: Optional[str] = None
    privacy_policy_url: Optional[str] = None

IdpSettings dataclass

Class representation of identity provider settings for the application.

Attributes:

Name Type Description
origins Optional[str]

Comma-separated list of allowed origins.

issuers Optional[str]

Comma-separated list of allowed issuers.

Source code in nylas/models/application_details.py
66
67
68
69
70
71
72
73
74
75
76
77
78
@dataclass_json
@dataclass
class IdpSettings:
    """
    Class representation of identity provider settings for the application.

    Attributes:
        origins: Comma-separated list of allowed origins.
        issuers: Comma-separated list of allowed issuers.
    """

    origins: Optional[str] = None
    issuers: Optional[str] = None

UpdateApplicationRedirectUriRequest

Bases: TypedDict

Class representing a callback URI provided for an update application call.

Attributes:

Name Type Description
id NotRequired[str]

Existing callback URI ID. Include this when preserving or updating an existing URI.

url str

Redirect URL.

platform NotRequired[str]

Platform identifier. Optional; defaults to "web" server-side.

settings NotRequired[WritableRedirectUriSettings]

Optional settings for the redirect URI.

Source code in nylas/models/application_details.py
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
class UpdateApplicationRedirectUriRequest(TypedDict):
    """
    Class representing a callback URI provided for an update application call.

    Attributes:
        id: Existing callback URI ID. Include this when preserving or updating an existing URI.
        url: Redirect URL.
        platform: Platform identifier. Optional; defaults to "web" server-side.
        settings: Optional settings for the redirect URI.
    """

    id: NotRequired[str]
    url: str
    platform: NotRequired[str]
    settings: NotRequired[WritableRedirectUriSettings]

UpdateApplicationRequest

Bases: TypedDict

Class representing a request to update a Nylas application.

Note

additional_settings is write-only and is stripped from the response.

Attributes:

Name Type Description
branding NotRequired[WritableBranding]

Branding details for the application.

hosted_authentication NotRequired[WritableHostedAuthentication]

Hosted authentication branding details.

idp_settings NotRequired[WritableIdpSettings]

Identity provider settings.

callback_uris NotRequired[List[UpdateApplicationRedirectUriRequest]]

List of callback URIs for the application.

domain NotRequired[str]

The white-label domain associated with the application.

additional_settings NotRequired[WritableAdditionalSettings]

Additional (write-only) application settings.

Source code in nylas/models/application_details.py
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
class UpdateApplicationRequest(TypedDict):
    """
    Class representing a request to update a Nylas application.

    Note:
        ``additional_settings`` is write-only and is stripped from the response.

    Attributes:
        branding: Branding details for the application.
        hosted_authentication: Hosted authentication branding details.
        idp_settings: Identity provider settings.
        callback_uris: List of callback URIs for the application.
        domain: The white-label domain associated with the application.
        additional_settings: Additional (write-only) application settings.
    """

    branding: NotRequired[WritableBranding]
    hosted_authentication: NotRequired[WritableHostedAuthentication]
    idp_settings: NotRequired[WritableIdpSettings]
    callback_uris: NotRequired[List[UpdateApplicationRedirectUriRequest]]
    domain: NotRequired[str]
    additional_settings: NotRequired[WritableAdditionalSettings]

WritableAdditionalSettings

Bases: TypedDict

Class representing additional application settings for an update call.

These settings are write-only: they can be set via the update call but are stripped from every response and are not bound on the application model.

Attributes:

Name Type Description
login_url NotRequired[str]

The login URL.

logout_url NotRequired[str]

The logout URL.

refresh_token_expiration_absolute NotRequired[int]

Absolute refresh token expiration.

refresh_token_expiration_idle NotRequired[int]

Idle refresh token expiration.

rotate_refresh_token NotRequired[bool]

Whether to rotate the refresh token.

allow_query_param_in_redirect_uri NotRequired[bool]

Whether query params are allowed in redirect URIs.

Source code in nylas/models/application_details.py
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
class WritableAdditionalSettings(TypedDict):
    """
    Class representing additional application settings for an update call.

    These settings are write-only: they can be set via the update call but are
    stripped from every response and are not bound on the application model.

    Attributes:
        login_url: The login URL.
        logout_url: The logout URL.
        refresh_token_expiration_absolute: Absolute refresh token expiration.
        refresh_token_expiration_idle: Idle refresh token expiration.
        rotate_refresh_token: Whether to rotate the refresh token.
        allow_query_param_in_redirect_uri: Whether query params are allowed in redirect URIs.
    """

    login_url: NotRequired[str]
    logout_url: NotRequired[str]
    refresh_token_expiration_absolute: NotRequired[int]
    refresh_token_expiration_idle: NotRequired[int]
    rotate_refresh_token: NotRequired[bool]
    allow_query_param_in_redirect_uri: NotRequired[bool]

WritableBranding

Bases: TypedDict

Class representing branding details for a create/update application call.

Attributes:

Name Type Description
name NotRequired[str]

Name of the application.

icon_url NotRequired[str]

URL pointing to the application icon.

website_url NotRequired[str]

Application/publisher website URL.

description NotRequired[str]

Description of the application.

Source code in nylas/models/application_details.py
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
class WritableBranding(TypedDict):
    """
    Class representing branding details for a create/update application call.

    Attributes:
        name: Name of the application.
        icon_url: URL pointing to the application icon.
        website_url: Application/publisher website URL.
        description: Description of the application.
    """

    name: NotRequired[str]
    icon_url: NotRequired[str]
    website_url: NotRequired[str]
    description: NotRequired[str]

WritableHostedAuthentication

Bases: TypedDict

Class representing hosted authentication details for a create/update application call.

Attributes:

Name Type Description
background_image_url NotRequired[str]

URL pointing to the background image.

alignment NotRequired[str]

Alignment of the background image.

color_primary NotRequired[str]

Primary color of the hosted authentication page.

color_secondary NotRequired[str]

Secondary color of the hosted authentication page.

title NotRequired[str]

Title of the hosted authentication page.

subtitle NotRequired[str]

Subtitle for the hosted authentication page.

background_color NotRequired[str]

Background color of the hosted authentication page.

spacing NotRequired[int]

CSS spacing attribute in px.

terms_of_service_url NotRequired[str]

URL pointing to the terms of service.

privacy_policy_url NotRequired[str]

URL pointing to the privacy policy.

Source code in nylas/models/application_details.py
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
class WritableHostedAuthentication(TypedDict):
    """
    Class representing hosted authentication details for a create/update application call.

    Attributes:
        background_image_url: URL pointing to the background image.
        alignment: Alignment of the background image.
        color_primary: Primary color of the hosted authentication page.
        color_secondary: Secondary color of the hosted authentication page.
        title: Title of the hosted authentication page.
        subtitle: Subtitle for the hosted authentication page.
        background_color: Background color of the hosted authentication page.
        spacing: CSS spacing attribute in px.
        terms_of_service_url: URL pointing to the terms of service.
        privacy_policy_url: URL pointing to the privacy policy.
    """

    background_image_url: NotRequired[str]
    alignment: NotRequired[str]
    color_primary: NotRequired[str]
    color_secondary: NotRequired[str]
    title: NotRequired[str]
    subtitle: NotRequired[str]
    background_color: NotRequired[str]
    spacing: NotRequired[int]
    terms_of_service_url: NotRequired[str]
    privacy_policy_url: NotRequired[str]

WritableIdpSettings

Bases: TypedDict

Class representing identity provider settings for a create/update application call.

Attributes:

Name Type Description
origins NotRequired[str]

Comma-separated list of allowed origins.

issuers NotRequired[str]

Comma-separated list of allowed issuers.

Source code in nylas/models/application_details.py
162
163
164
165
166
167
168
169
170
171
172
class WritableIdpSettings(TypedDict):
    """
    Class representing identity provider settings for a create/update application call.

    Attributes:
        origins: Comma-separated list of allowed origins.
        issuers: Comma-separated list of allowed issuers.
    """

    origins: NotRequired[str]
    issuers: NotRequired[str]