mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 22:54:05 -08:00
50 lines
961 B
TypeScript
50 lines
961 B
TypeScript
|
import { INodeProperties, INodePropertyOptions } from "n8n-workflow";
|
||
|
|
||
|
export const resource = {
|
||
|
name: "Asset",
|
||
|
value: "asset",
|
||
|
} as INodePropertyOptions;
|
||
|
|
||
|
export const operations = [
|
||
|
{
|
||
|
displayName: "Operation",
|
||
|
name: "operation",
|
||
|
type: "options",
|
||
|
displayOptions: {
|
||
|
show: {
|
||
|
resource: [resource.value],
|
||
|
},
|
||
|
},
|
||
|
options: [
|
||
|
{
|
||
|
name: "Get Assets",
|
||
|
value: "get_assets",
|
||
|
},
|
||
|
{
|
||
|
name: "Get Single Asset",
|
||
|
value: "get_asset",
|
||
|
},
|
||
|
],
|
||
|
default: "get_assets",
|
||
|
description: "The operation to perform.",
|
||
|
},
|
||
|
] as INodeProperties[];
|
||
|
|
||
|
export const fields = [
|
||
|
{
|
||
|
displayName: "Asset Id",
|
||
|
name: "asset_id",
|
||
|
type: "string",
|
||
|
default: "",
|
||
|
placeholder: "",
|
||
|
description: "",
|
||
|
required: true,
|
||
|
displayOptions: {
|
||
|
show: {
|
||
|
resource: [resource.value],
|
||
|
operation: ["get_asset"],
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
] as INodeProperties[];
|