/** * E-goi Node - Version 1 * Consume E-goi API */ export interface EgoiV1Params { resource?: 'contact'; operation?: 'create' | 'get' | 'getAll' | 'update'; /** * ID of list to operate on. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. * @displayOptions.show { operation: ["getAll", "create", "update", "get"] } */ list?: string | Expression; /** * Email address for a subscriber * @displayOptions.show { operation: ["create"] } */ email?: string | Expression | PlaceholderValue; /** * Contact ID of the subscriber * @displayOptions.show { resource: ["contact"], operation: ["update"] } */ contactId?: string | Expression | PlaceholderValue; /** * By default the response just includes the contact ID. If this option gets activated, it will resolve the data automatically. * @displayOptions.show { operation: ["create", "update"] } * @default true */ resolveData?: boolean | Expression; /** * Additional Fields * @displayOptions.show { operation: ["create"], resource: ["contact"] } * @default {} */ additionalFields?: { /** Birth date of a subscriber */ birth_date?: string | Expression; /** Cellphone of a subscriber */ cellphone?: string | Expression | PlaceholderValue; /** Extra Fields * @default {} */ extraFieldsUi?: { /** Extra Field */ extraFieldValues?: Array<{ /** Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a> */ field_id?: string | Expression; /** Value */ value?: string | Expression | PlaceholderValue; }>; }; /** Name of a subscriber */ first_name?: string | Expression | PlaceholderValue; /** Name of a subscriber */ last_name?: string | Expression | PlaceholderValue; /** Subscriber's current status * @default active */ status?: 'unconfirmed' | 'active' | 'inactive' | 'removed' | Expression; /** List of tag IDs to be added. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. * @default [] */ tagIds?: string[]; }; /** * Update Fields * @displayOptions.show { operation: ["update"] } * @default {} */ updateFields?: { /** Birth date of subscriber */ birth_date?: string | Expression; /** Cellphone of subscriber */ cellphone?: string | Expression | PlaceholderValue; /** Email address for subscriber */ email?: string | Expression | PlaceholderValue; /** Extra Fields * @default {} */ extraFieldsUi?: { /** Extra Field */ extraFieldValues?: Array<{ /** Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a> */ field_id?: string | Expression; /** Value */ value?: string | Expression | PlaceholderValue; }>; }; /** Name of subscriber */ first_name?: string | Expression | PlaceholderValue; /** Name of subscriber */ last_name?: string | Expression | PlaceholderValue; /** Subscriber's current status * @default active */ status?: 'unconfirmed' | 'active' | 'inactive' | 'removed' | Expression; /** List of tag IDs to be added. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>. * @default [] */ tagIds?: string[]; }; /** * Search by * @displayOptions.show { operation: ["get"], resource: ["contact"] } * @default id */ by?: 'id' | 'email' | Expression; /** * Whether to return all results or only up to a given limit * @displayOptions.show { operation: ["getAll"], resource: ["contact"] } * @default false */ returnAll?: boolean | Expression; /** * Max number of results to return * @displayOptions.show { operation: ["getAll"], resource: ["contact"], returnAll: [false] } * @default 100 */ limit?: number | Expression; /** * Whether to return a simplified version of the response instead of the raw data * @displayOptions.show { operation: ["get", "getAll"], resource: ["contact"] } * @default true */ simple?: boolean | Expression; } export interface EgoiV1Credentials { egoiApi: CredentialReference; } interface EgoiV1NodeBase { type: 'n8n-nodes-base.egoi'; version: 1; credentials?: EgoiV1Credentials; } export type EgoiV1ParamsNode = EgoiV1NodeBase & { config: NodeConfig; }; export type EgoiV1Node = EgoiV1ParamsNode;