n8n-nodes-base
Version:
Base nodes of n8n
148 lines (142 loc) • 5.99 kB
text/typescript
/**
* Zendesk Trigger Node - Version 1
* Handle Zendesk events via webhooks
*/
export interface ZendeskTriggerV1Params {
authentication?: 'apiToken' | 'oAuth2' | Expression<string>;
service?: 'support' | Expression<string>;
/**
* Options
* @displayOptions.show { service: ["support"] }
* @default {}
*/
options?: {
/** The fields to return the values of. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
* @default []
*/
fields?: string[];
};
/**
* The condition to set
* @displayOptions.show { service: ["support"] }
* @default {}
*/
conditions?: {
/** All
*/
all?: Array<{
/** Resource
* @default ticket
*/
resource?: 'ticket';
/** Field
* @displayOptions.show { resource: ["ticket"] }
* @default status
*/
field?: 'assignee' | 'group' | 'priority' | 'status' | 'type' | Expression<string>;
/** Operation
* @displayOptions.hide { field: ["assignee"] }
* @default is
*/
operation?: 'changed' | 'value_previous' | 'value' | 'greater_than' | 'is' | 'is_not' | 'less_than' | 'not_changed' | 'not_value_previous' | 'not_value' | Expression<string>;
/** Operation
* @displayOptions.show { field: ["assignee"] }
* @default is
*/
operation?: 'changed' | 'value_previous' | 'value' | 'is' | 'is_not' | 'not_changed' | 'not_value_previous' | 'not_value' | Expression<string>;
/** Value
* @displayOptions.show { field: ["status"] }
* @displayOptions.hide { operation: ["changed", "not_changed"], field: ["assignee", "group", "priority", "type"] }
* @default open
*/
value?: 'closed' | 'new' | 'open' | 'pending' | 'solved' | Expression<string>;
/** Value
* @displayOptions.show { field: ["type"] }
* @displayOptions.hide { operation: ["changed", "not_changed"], field: ["assignee", "group", "priority", "status"] }
* @default question
*/
value?: 'question' | 'incident' | 'problem' | 'task' | Expression<string>;
/** Value
* @displayOptions.show { field: ["priority"] }
* @displayOptions.hide { operation: ["changed", "not_changed"], field: ["assignee", "group", "type", "status"] }
* @default low
*/
value?: 'low' | 'normal' | 'high' | 'urgent' | Expression<string>;
/** Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>
* @displayOptions.show { field: ["group"] }
* @displayOptions.hide { field: ["assignee", "priority", "type", "status"] }
*/
value?: string | Expression<string>;
/** Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>
* @displayOptions.show { field: ["assignee"] }
* @displayOptions.hide { field: ["group", "priority", "type", "status"] }
*/
value?: string | Expression<string>;
}>;
/** Any
*/
any?: Array<{
/** Resource
* @default ticket
*/
resource?: 'ticket';
/** Field
* @displayOptions.show { resource: ["ticket"] }
* @default status
*/
field?: 'assignee' | 'group' | 'priority' | 'status' | 'type' | Expression<string>;
/** Operation
* @displayOptions.hide { field: ["assignee"] }
* @default is
*/
operation?: 'changed' | 'value_previous' | 'value' | 'greater_than' | 'is' | 'is_not' | 'less_than' | 'not_changed' | 'not_value_previous' | 'not_value' | Expression<string>;
/** Operation
* @displayOptions.show { field: ["assignee"] }
* @default is
*/
operation?: 'changed' | 'value_previous' | 'value' | 'is' | 'is_not' | 'not_changed' | 'not_value_previous' | 'not_value' | Expression<string>;
/** Value
* @displayOptions.show { field: ["status"] }
* @displayOptions.hide { operation: ["changed", "not_changed"], field: ["assignee", "group", "priority", "type"] }
* @default open
*/
value?: 'closed' | 'new' | 'open' | 'pending' | 'solved' | Expression<string>;
/** Value
* @displayOptions.show { field: ["type"] }
* @displayOptions.hide { operation: ["changed", "not_changed"], field: ["assignee", "group", "priority", "status"] }
* @default question
*/
value?: 'question' | 'incident' | 'problem' | 'task' | Expression<string>;
/** Value
* @displayOptions.show { field: ["priority"] }
* @displayOptions.hide { operation: ["changed", "not_changed"], field: ["assignee", "group", "type", "status"] }
* @default low
*/
value?: 'low' | 'normal' | 'high' | 'urgent' | Expression<string>;
/** Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>
* @displayOptions.show { field: ["group"] }
* @displayOptions.hide { field: ["assignee", "priority", "type", "status"] }
*/
value?: string | Expression<string>;
/** Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>
* @displayOptions.show { field: ["assignee"] }
* @displayOptions.hide { field: ["group", "priority", "type", "status"] }
*/
value?: string | Expression<string>;
}>;
};
}
export interface ZendeskTriggerV1Credentials {
zendeskApi: CredentialReference;
zendeskOAuth2Api: CredentialReference;
}
interface ZendeskTriggerV1NodeBase {
type: 'n8n-nodes-base.zendeskTrigger';
version: 1;
credentials?: ZendeskTriggerV1Credentials;
isTrigger: true;
}
export type ZendeskTriggerV1ParamsNode = ZendeskTriggerV1NodeBase & {
config: NodeConfig<ZendeskTriggerV1Params>;
};
export type ZendeskTriggerV1Node = ZendeskTriggerV1ParamsNode;