n8n-nodes-base
Version:
Base nodes of n8n
158 lines (152 loc) • 4.86 kB
text/typescript
/**
* 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<string>;
/**
* Email address for a subscriber
* @displayOptions.show { operation: ["create"] }
*/
email?: string | Expression<string> | PlaceholderValue;
/**
* Contact ID of the subscriber
* @displayOptions.show { resource: ["contact"], operation: ["update"] }
*/
contactId?: string | Expression<string> | 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<boolean>;
/**
* Additional Fields
* @displayOptions.show { operation: ["create"], resource: ["contact"] }
* @default {}
*/
additionalFields?: {
/** Birth date of a subscriber
*/
birth_date?: string | Expression<string>;
/** Cellphone of a subscriber
*/
cellphone?: string | Expression<string> | 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<string>;
/** Value
*/
value?: string | Expression<string> | PlaceholderValue;
}>;
};
/** Name of a subscriber
*/
first_name?: string | Expression<string> | PlaceholderValue;
/** Name of a subscriber
*/
last_name?: string | Expression<string> | PlaceholderValue;
/** Subscriber's current status
* @default active
*/
status?: 'unconfirmed' | 'active' | 'inactive' | 'removed' | Expression<string>;
/** 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<string>;
/** Cellphone of subscriber
*/
cellphone?: string | Expression<string> | PlaceholderValue;
/** Email address for subscriber
*/
email?: string | Expression<string> | 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<string>;
/** Value
*/
value?: string | Expression<string> | PlaceholderValue;
}>;
};
/** Name of subscriber
*/
first_name?: string | Expression<string> | PlaceholderValue;
/** Name of subscriber
*/
last_name?: string | Expression<string> | PlaceholderValue;
/** Subscriber's current status
* @default active
*/
status?: 'unconfirmed' | 'active' | 'inactive' | 'removed' | Expression<string>;
/** 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<string>;
/**
* Whether to return all results or only up to a given limit
* @displayOptions.show { operation: ["getAll"], resource: ["contact"] }
* @default false
*/
returnAll?: boolean | Expression<boolean>;
/**
* Max number of results to return
* @displayOptions.show { operation: ["getAll"], resource: ["contact"], returnAll: [false] }
* @default 100
*/
limit?: number | Expression<number>;
/**
* 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<boolean>;
}
export interface EgoiV1Credentials {
egoiApi: CredentialReference;
}
interface EgoiV1NodeBase {
type: 'n8n-nodes-base.egoi';
version: 1;
credentials?: EgoiV1Credentials;
}
export type EgoiV1ParamsNode = EgoiV1NodeBase & {
config: NodeConfig<EgoiV1Params>;
};
export type EgoiV1Node = EgoiV1ParamsNode;