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
name str

Custom name of the connector

provider Provider

The provider type

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

    Attributes:
        name: Custom name of the connector
        provider: The provider type
    """

    name: str
    provider: Provider

Connector dataclass

Interface representing the Nylas connector response.

Attributes:

Name Type Description
name str

Custom name of the connector

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
26
27
@dataclass_json
@dataclass
class Connector:
    """
    Interface representing the Nylas connector response.

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

    name: str
    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
name str

Custom name of the connector

provider Provider

The provider type, should be Google

settings NotRequired[GoogleCreateConnectorSettings]

The Google OAuth provider credentials and settings

scope NotRequired[List[str]]

The Google OAuth scopes

Source code in nylas/models/connectors.py
73
74
75
76
77
78
79
80
81
82
83
84
85
class GoogleCreateConnectorRequest(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 Google OAuth provider credentials and settings
        scope: The Google OAuth scopes
    """

    settings: NotRequired[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
43
44
45
46
47
48
49
50
51
52
53
54
55
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
103
104
105
106
107
108
109
110
111
112
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
151
152
153
154
155
156
157
158
159
160
161
162
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 NotRequired[MicrosoftCreateConnectorSettings]

The Microsoft OAuth provider credentials and settings

scope NotRequired[List[str]]

The Microsoft OAuth scopes

Source code in nylas/models/connectors.py
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
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: NotRequired[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
58
59
60
61
62
63
64
65
66
67
68
69
70
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
136
137
138
139
140
141
142
143
144
145
146
147
148
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
115
116
117
118
119
120
121
122
123
124
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