Skip to content

credentials

Credential dataclass

Interface representing a Nylas Credential object. Attributes id: Globally unique object identifier; name: Name of the credential credential_type: The type of credential hashed_data: Hashed value of the credential that you created created_at: Timestamp of when the credential was created updated_at: Timestamp of when the credential was updated;

Source code in nylas/models/credentials.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
@dataclass_json
@dataclass
class Credential:
    """
    Interface representing a Nylas Credential object.
    Attributes
    id: Globally unique object identifier;
    name: Name of the credential
    credential_type: The type of credential
    hashed_data: Hashed value of the credential that you created
    created_at: Timestamp of when the credential was created
    updated_at: Timestamp of when the credential was updated;
    """

    id: str
    name: str
    credential_type: Optional[CredentialType] = None
    hashed_data: Optional[str] = None
    created_at: Optional[int] = None
    updated_at: Optional[int] = None

CredentialRequest

Bases: TypedDict

Interface representing a request to create a credential.

Attributes:

Name Type Description
name Optional[str]

Name of the credential

credential_type CredentialType

Type of credential you want to create.

credential_data CredentialData

The data required to successfully create the credential object

Source code in nylas/models/credentials.py
48
49
50
51
52
53
54
55
56
57
58
59
60
class CredentialRequest(TypedDict):
    """
    Interface representing a request to create a credential.

    Attributes:
        name: Name of the credential
        credential_type: Type of credential you want to create.
        credential_data: The data required to successfully create the credential object
    """

    name: Optional[str]
    credential_type: CredentialType
    credential_data: CredentialData

ListCredentialQueryParams

Bases: TypedDict

Interface representing the query parameters for credentials .

Attributes:

Name Type Description
offset NotRequired[int]

Offset results

sort_by NotRequired[str]

Sort entries by field name

order_by NotRequired[str]

Order results by the specified field. Currently only start is supported.

limit NotRequired[int]

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

Source code in nylas/models/credentials.py
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
class ListCredentialQueryParams(TypedDict):
    """
    Interface representing the query parameters for credentials .

    Attributes:
        offset: Offset results
        sort_by: Sort entries by field name
        order_by: Order results by the specified field.
            Currently only start is supported.
        limit: The maximum number of objects to return.
            This field defaults to 50. The maximum allowed value is 200.
    """

    limit: NotRequired[int]
    offset: NotRequired[int]
    order_by: NotRequired[str]
    sort_by: NotRequired[str]

UpdateCredentialRequest

Bases: TypedDict

Interface representing a request to update a credential.

Attributes:

Name Type Description
name Optional[str]

Name of the credential

credential_data Optional[CredentialData]

The data required to successfully create the credential object

Source code in nylas/models/credentials.py
63
64
65
66
67
68
69
70
71
72
73
class UpdateCredentialRequest(TypedDict):
    """
    Interface representing a request to update a credential.

    Attributes:
        name: Name of the credential
        credential_data: The data required to successfully create the credential object
    """

    name: Optional[str]
    credential_data: Optional[CredentialData]