/**
 * Google Chat Node - Version 1
 * Discriminator: resource=message, operation=create
 */


interface Credentials {
  googleApi: CredentialReference;
  googleChatOAuth2Api: CredentialReference;
}

/** Create a message */
export type GoogleChatV1MessageCreateParams = {
  resource: 'message';
  operation: 'create';
  authentication?: 'oAuth2' | 'serviceAccount' | Expression<string>;
/**
 * Space resource name, in the form "spaces/*". Example: spaces/AAAAMpdlehY. Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
 */
    spaceId?: string | Expression<string>;
/**
 * Whether to pass the message object as JSON
 * @default false
 */
    jsonParameters?: boolean | Expression<boolean>;
/**
 * Message
 * @displayOptions.show { jsonParameters: [false] }
 * @default {}
 */
    messageUi?: {
    /** Text
     */
    text?: string | Expression<string> | PlaceholderValue;
  };
/**
 * Message input as JSON Object or JSON String
 * @displayOptions.show { jsonParameters: [true] }
 */
    messageJson?: IDataObject | string | Expression<string>;
/**
 * Additional Fields
 * @default {}
 */
    additionalFields?: {
    /** A unique request ID for this message. If a message has already been created in the space with this request ID, the subsequent request will return the existing message and no new message will be created.
     */
    requestId?: string | Expression<string> | PlaceholderValue;
  };
};

export type GoogleChatV1MessageCreateOutput = {
  argumentText?: string;
  createTime?: string;
  formattedText?: string;
  name?: string;
  sender?: {
    displayName?: string;
    name?: string;
    type?: string;
  };
  space?: {
    lastActiveTime?: string;
    membershipCount?: {
      joinedDirectHumanUserCount?: number;
    };
    name?: string;
    spaceHistoryState?: string;
    spaceThreadingState?: string;
    spaceType?: string;
    spaceUri?: string;
    type?: string;
  };
  text?: string;
  thread?: {
    name?: string;
  };
};

export type GoogleChatV1MessageCreateNode = {
  type: 'n8n-nodes-base.googleChat';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<GoogleChatV1MessageCreateParams>;
  output?: Items<GoogleChatV1MessageCreateOutput>;
};