Skip to content

connectors

CreateConnectorRequest = Union[GoogleCreateConnectorRequest, MicrosoftCreateConnectorRequest, ImapCreateConnectorRequest, VirtualCalendarsCreateConnectorRequest] module-attribute

The type of the Nylas connector creation request.

BaseCreateConnectorRequest

Bases: TypedDict

Interface representing the base Nylas connector creation request.

Attributes:

Name Type Description
provider Provider

The provider type

Source code in nylas/models/connectors.py
28
29
30
31
32
33
34
35
36
class BaseCreateConnectorRequest(TypedDict):
    """
    Interface representing the base Nylas connector creation request.

    Attributes:
        provider: The provider type
    """

    provider: Provider

Connector dataclass

Interface representing the Nylas connector response.

Attributes:

Name Type Description
provider Provider

The provider type

settings Optional[Dict[str, Any]]

Optional settings from provider

scope Optional[List[str]]

Default scopes for the connector

Source code in nylas/models/connectors.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@dataclass_json
@dataclass
class Connector:
    """
    Interface representing the Nylas connector response.

    Attributes:
        provider: The provider type
        settings: Optional settings from provider
        scope: Default scopes for the connector
    """

    provider: Provider
    settings: Optional[Dict[str, Any]] = None
    scope: Optional[List[str]] = None

GoogleCreateConnectorRequest

Bases: BaseCreateConnectorRequest

Interface representing the base Nylas connector creation request.

Attributes:

Name Type Description
provider Provider

The provider type, should be Google

settings GoogleCreateConnectorSettings

The Google OAuth provider credentials and settings

scope NotRequired[List[str]]

The Google OAuth scopes

Source code in nylas/models/connectors.py
69
70
71
72
73
74
75
76
77
78
79
80
class GoogleCreateConnectorRequest(BaseCreateConnectorRequest):
    """
    Interface representing the base Nylas connector creation request.

    Attributes:
        provider (Provider): The provider type, should be Google
        settings: The Google OAuth provider credentials and settings
        scope: The Google OAuth scopes
    """

    settings: GoogleCreateConnectorSettings
    scope: NotRequired[List[str]]

GoogleCreateConnectorSettings

Bases: TypedDict

Interface representing a Google connector creation request.

Attributes:

Name Type Description
client_id str

The Google Client ID

client_secret str

The Google Client Secret

topic_name NotRequired[str]

The Google Pub/Sub topic name

Source code in nylas/models/connectors.py
39
40
41
42
43
44
45
46
47
48
49
50
51
class GoogleCreateConnectorSettings(TypedDict):
    """
    Interface representing a Google connector creation request.

    Attributes:
        client_id: The Google Client ID
        client_secret: The Google Client Secret
        topic_name: The Google Pub/Sub topic name
    """

    client_id: str
    client_secret: str
    topic_name: NotRequired[str]

ImapCreateConnectorRequest

Bases: BaseCreateConnectorRequest

Interface representing the base Nylas connector creation request.

Attributes:

Name Type Description
name str

Custom name of the connector

provider Provider

The provider type, should be IMAP

Source code in nylas/models/connectors.py
 98
 99
100
101
102
103
104
105
106
107
class ImapCreateConnectorRequest(BaseCreateConnectorRequest):
    """
    Interface representing the base Nylas connector creation request.

    Attributes:
        name (str): Custom name of the connector
        provider (Provider): The provider type, should be IMAP
    """

    pass

ListConnectorQueryParams

Bases: ListQueryParams

Interface of the query parameters for listing connectors.

Attributes:

Name Type Description
limit NotRequired[int]

The maximum number of objects to return. This field defaults to 50. The maximum allowed value is 200.

page_token NotRequired[str]

An identifier that specifies which page of data to return. This value should be taken from a ListResponse object's next_cursor parameter.

Source code in nylas/models/connectors.py
146
147
148
149
150
151
152
153
154
155
156
157
class ListConnectorQueryParams(ListQueryParams):
    """
    Interface of the query parameters for listing connectors.

    Attributes:
        limit (NotRequired[int]): The maximum number of objects to return.
            This field defaults to 50. The maximum allowed value is 200.
        page_token (NotRequired[str]): An identifier that specifies which page of data to return.
            This value should be taken from a ListResponse object's next_cursor parameter.
    """

    pass

MicrosoftCreateConnectorRequest

Bases: BaseCreateConnectorRequest

Interface representing the base Nylas connector creation request.

Attributes:

Name Type Description
name str

Custom name of the connector

provider Provider

The provider type, should be Google

settings MicrosoftCreateConnectorSettings

The Microsoft OAuth provider credentials and settings

scope NotRequired[List[str]]

The Microsoft OAuth scopes

Source code in nylas/models/connectors.py
83
84
85
86
87
88
89
90
91
92
93
94
95
class MicrosoftCreateConnectorRequest(BaseCreateConnectorRequest):
    """
    Interface representing the base Nylas connector creation request.

    Attributes:
        name (str): Custom name of the connector
        provider (Provider): The provider type, should be Google
        settings: The Microsoft OAuth provider credentials and settings
        scope: The Microsoft OAuth scopes
    """

    settings: MicrosoftCreateConnectorSettings
    scope: NotRequired[List[str]]

MicrosoftCreateConnectorSettings

Bases: TypedDict

Interface representing a Microsoft connector creation request.

Attributes:

Name Type Description
client_id str

The Google Client ID

client_secret str

The Google Client Secret

tenant NotRequired[str]

The Microsoft tenant ID

Source code in nylas/models/connectors.py
54
55
56
57
58
59
60
61
62
63
64
65
66
class MicrosoftCreateConnectorSettings(TypedDict):
    """
    Interface representing a Microsoft connector creation request.

    Attributes:
        client_id: The Google Client ID
        client_secret: The Google Client Secret
        tenant: The Microsoft tenant ID
    """

    client_id: str
    client_secret: str
    tenant: NotRequired[str]

UpdateConnectorRequest

Bases: TypedDict

Interface representing the base Nylas connector creation request.

Attributes:

Name Type Description
name NotRequired[str]

Custom name of the connector

settings NotRequired[Dict[str, Any]]

The OAuth provider credentials and settings

scope NotRequired[List[str]]

The OAuth scopes

Source code in nylas/models/connectors.py
131
132
133
134
135
136
137
138
139
140
141
142
143
class UpdateConnectorRequest(TypedDict):
    """
    Interface representing the base Nylas connector creation request.

    Attributes:
        name: Custom name of the connector
        settings: The OAuth provider credentials and settings
        scope: The OAuth scopes
    """

    name: NotRequired[str]
    settings: NotRequired[Dict[str, Any]]
    scope: NotRequired[List[str]]

VirtualCalendarsCreateConnectorRequest

Bases: BaseCreateConnectorRequest

Interface representing the base Nylas connector creation request.

Attributes:

Name Type Description
name str

Custom name of the connector

provider Provider

The provider type

Source code in nylas/models/connectors.py
110
111
112
113
114
115
116
117
118
119
class VirtualCalendarsCreateConnectorRequest(BaseCreateConnectorRequest):
    """
    Interface representing the base Nylas connector creation request.

    Attributes:
        name (str): Custom name of the connector
        provider (Provider): The provider type
    """

    pass