n8n-nodes-base
Version:
Base nodes of n8n
119 lines (113 loc) • 3.23 kB
text/typescript
/**
* RabbitMQ Trigger Node - Version 1
* Listens to RabbitMQ messages
*/
export interface RabbitmqTriggerV1Params {
/**
* The name of the queue to read from
*/
queue?: string | Expression<string> | PlaceholderValue;
options?: {
/** Arguments to add
* @default {}
*/
arguments?: {
/** Argument
*/
argument?: Array<{
/** Key
*/
key?: string | Expression<string> | PlaceholderValue;
/** Value
*/
value?: string | Expression<string> | PlaceholderValue;
}>;
};
/** Whether to assert the exchange exists before sending
* @default true
*/
assertExchange?: boolean | Expression<boolean>;
/** Whether to assert the queue exists before sending
* @default true
*/
assertQueue?: boolean | Expression<boolean>;
/** Whether the queue will be deleted when the number of consumers drops to zero
* @default false
*/
autoDelete?: boolean | Expression<boolean>;
/** Add binding to queu
* @default {}
*/
binding?: {
/** Binding
*/
bindings?: Array<{
/** Exchange
*/
exchange?: string | Expression<string> | PlaceholderValue;
/** RoutingKey
*/
routingKey?: string | Expression<string> | PlaceholderValue;
}>;
};
/** Whether to save the content as binary
* @default false
*/
contentIsBinary?: boolean | Expression<boolean>;
/** When to acknowledge the message
* @default immediately
*/
acknowledge?: 'executionFinishes' | 'executionFinishesSuccessfully' | 'immediately' | 'laterMessageNode' | Expression<string>;
/** Whether the queue will survive broker restarts
* @default true
*/
durable?: boolean | Expression<boolean>;
/** Whether to scope the queue to the connection
* @default false
*/
exclusive?: boolean | Expression<boolean>;
/** Headers to add
* @default {}
*/
headers?: {
/** Header
*/
header?: Array<{
/** Key
*/
key?: string | Expression<string> | PlaceholderValue;
/** Value
*/
value?: string | Expression<string> | PlaceholderValue;
}>;
};
/** Whether to parse the body to an object
* @displayOptions.hide { contentIsBinary: [true] }
* @default false
*/
jsonParseBody?: boolean | Expression<boolean>;
/** Whether to return only the content property
* @displayOptions.hide { contentIsBinary: [true] }
* @default false
*/
onlyContent?: boolean | Expression<boolean>;
/** Max number of executions at a time. Use -1 for no limit.
* @displayOptions.hide { acknowledge: ["immediately"] }
* @default -1
*/
parallelMessages?: number | Expression<number>;
};
}
export interface RabbitmqTriggerV1Credentials {
rabbitmq: CredentialReference;
}
interface RabbitmqTriggerV1NodeBase {
type: 'n8n-nodes-base.rabbitmqTrigger';
version: 1;
credentials?: RabbitmqTriggerV1Credentials;
isTrigger: true;
}
export type RabbitmqTriggerV1ParamsNode = RabbitmqTriggerV1NodeBase & {
config: NodeConfig<RabbitmqTriggerV1Params>;
};
export type RabbitmqTriggerV1Node = RabbitmqTriggerV1ParamsNode;