/** * Google Perspective Node - Version 1 * Consume Google Perspective API */ export interface GooglePerspectiveV1Params { operation?: 'analyzeComment'; /** * Text * @displayOptions.show { operation: ["analyzeComment"] } */ text?: string | Expression | PlaceholderValue; /** * Attributes to Analyze * @displayOptions.show { operation: ["analyzeComment"] } * @default {} */ requestedAttributesUi?: { /** Properties */ requestedAttributesValues?: Array<{ /** Attribute to analyze in the text. Details <a href="https://developers.perspectiveapi.com/s/about-the-api-attributes-and-languages">here</a>. * @default flirtation */ attributeName?: 'flirtation' | 'identity_attack' | 'insult' | 'profanity' | 'severe_toxicity' | 'sexually_explicit' | 'threat' | 'toxicity' | Expression; /** Score above which to return results. At zero, all scores are returned. * @default 0 */ scoreThreshold?: number | Expression; }>; }; /** * Options * @displayOptions.show { operation: ["analyzeComment"] } * @default {} */ options?: { /** Languages of the text input. If unspecified, the API will auto-detect the comment language. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. */ languages?: string | Expression; }; } export interface GooglePerspectiveV1Credentials { googlePerspectiveOAuth2Api: CredentialReference; } interface GooglePerspectiveV1NodeBase { type: 'n8n-nodes-base.googlePerspective'; version: 1; credentials?: GooglePerspectiveV1Credentials; } export type GooglePerspectiveV1ParamsNode = GooglePerspectiveV1NodeBase & { config: NodeConfig; }; export type GooglePerspectiveV1Node = GooglePerspectiveV1ParamsNode;