n8n-nodes-base
Version:
Base nodes of n8n
100 lines (95 loc) • 2.27 kB
text/typescript
/**
* Gmail Node - Version 2.1
* Discriminator: resource=thread, operation=get
*/
interface Credentials {
googleApi: CredentialReference;
gmailOAuth2: CredentialReference;
}
export type GmailV21ThreadGetParams = {
resource: 'thread';
operation: 'get';
authentication?: 'oAuth2' | 'serviceAccount' | Expression<string>;
/**
* The ID of the thread you are operating on
*/
threadId?: string | Expression<string> | PlaceholderValue;
/**
* Whether to return a simplified version of the response instead of the raw data
* @default true
*/
simple?: boolean | Expression<boolean>;
/**
* Options
* @default {}
*/
options?: {
/** Whether to return only thread messages
* @default true
*/
returnOnlyMessages?: boolean | Expression<boolean>;
};
};
export type GmailV21ThreadGetOutput = {
historyId?: string;
id?: string;
messages?: Array<{
'ARC-Authentication-Results'?: string;
'ARC-Message-Signature'?: string;
'ARC-Seal'?: string;
'Authentication-Results'?: string;
'Content-Type'?: string;
Date?: string;
'Delivered-To'?: string;
'DKIM-Signature'?: string;
From?: string;
historyId?: string;
id?: string;
internalDate?: string;
labels?: Array<{
id?: string;
name?: string;
}>;
'Message-ID'?: string;
'MIME-Version'?: string;
payload?: {
body?: {
data?: string;
size?: number;
};
filename?: string;
mimeType?: string;
partId?: string;
parts?: Array<{
body?: {
data?: string;
size?: number;
};
filename?: string;
headers?: Array<{
name?: string;
value?: string;
}>;
mimeType?: string;
partId?: string;
}>;
};
Received?: string;
'Received-SPF'?: string;
'Return-Path'?: string;
sizeEstimate?: number;
snippet?: string;
Subject?: string;
threadId?: string;
To?: string;
'X-Google-Smtp-Source'?: string;
'X-Received'?: string;
}>;
};
export type GmailV21ThreadGetNode = {
type: 'n8n-nodes-base.gmail';
version: 2.1;
credentials?: Credentials;
config: NodeConfig<GmailV21ThreadGetParams>;
output?: Items<GmailV21ThreadGetOutput>;
};