n8n-nodes-base
Version:
Base nodes of n8n
65 lines (60 loc) • 2.37 kB
text/typescript
/**
* Google Cloud Natural Language Node - Version 1
* Discriminator: resource=document, operation=analyzeSentiment
*/
interface Credentials {
googleCloudNaturalLanguageOAuth2Api: CredentialReference;
}
export type GoogleCloudNaturalLanguageV1DocumentAnalyzeSentimentParams = {
resource: 'document';
operation: 'analyzeSentiment';
/**
* The source of the document: a string containing the content or a Google Cloud Storage URI
* @default content
*/
source?: 'content' | 'gcsContentUri' | Expression<string>;
/**
* The content of the input in string format. Cloud audit logging exempt since it is based on user data.
* @displayOptions.show { source: ["content"] }
*/
content?: string | Expression<string> | PlaceholderValue;
/**
* The Google Cloud Storage URI where the file content is located. This URI must be of the form: <code>gs://bucket_name/object_name</code>. For more details, see <a href="https://cloud.google.com/storage/docs/reference-uris.">reference</a>.
* @displayOptions.show { source: ["gcsContentUri"] }
*/
gcsContentUri?: string | Expression<string> | PlaceholderValue;
/**
* Options
* @default {}
*/
options?: {
/** The type of input document
* @default PLAIN_TEXT
*/
documentType?: 'HTML' | 'PLAIN_TEXT' | Expression<string>;
/** The encoding type used by the API to calculate sentence offsets
* @default UTF16
*/
encodingType?: 'NONE' | 'UTF8' | 'UTF16' | 'UTF32' | Expression<string>;
/** The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted.
* @default en
*/
language?: 'ar' | 'zh' | 'zh-Hant' | 'nl' | 'en' | 'fr' | 'de' | 'id' | 'it' | 'ja' | 'ko' | 'pt' | 'es' | 'th' | 'tr' | 'vi' | Expression<string>;
};
};
export type GoogleCloudNaturalLanguageV1DocumentAnalyzeSentimentOutput = {
language?: string;
sentences?: Array<{
text?: {
beginOffset?: number;
content?: string;
};
}>;
};
export type GoogleCloudNaturalLanguageV1DocumentAnalyzeSentimentNode = {
type: 'n8n-nodes-base.googleCloudNaturalLanguage';
version: 1;
credentials?: Credentials;
config: NodeConfig<GoogleCloudNaturalLanguageV1DocumentAnalyzeSentimentParams>;
output?: Items<GoogleCloudNaturalLanguageV1DocumentAnalyzeSentimentOutput>;
};