n8n-nodes-base 1.98.0 → 1.98.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -69,12 +69,7 @@ class Snowflake {
69
69
  displayName: "Username",
70
70
  name: "username",
71
71
  type: "string",
72
- default: "",
73
- displayOptions: {
74
- show: {
75
- authentication: ["password"]
76
- }
77
- }
72
+ default: ""
78
73
  },
79
74
  {
80
75
  displayName: "Password",
@@ -105,7 +100,17 @@ class Snowflake {
105
100
  authentication: ["keyPair"]
106
101
  }
107
102
  },
108
- description: "Private PEM key for Key-pair authentication with Snowflake"
103
+ description: 'Private PEM key for Key-pair authentication with Snowflake, follow guide <a href="https://docs.snowflake.com/en/user-guide/key-pair-auth" target="_blank">here</a>'
104
+ },
105
+ {
106
+ displayName: "Passphrase",
107
+ name: "passphrase",
108
+ type: "string",
109
+ default: "",
110
+ description: "If the private key is encrypted, you must provide the passphrase used to encrypt it",
111
+ typeOptions: {
112
+ password: true
113
+ }
109
114
  },
110
115
  {
111
116
  displayName: "Schema",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../credentials/Snowflake.credentials.ts"],"sourcesContent":["import type { ICredentialType, INodeProperties } from 'n8n-workflow';\n\nexport class Snowflake implements ICredentialType {\n\tname = 'snowflake';\n\n\tdisplayName = 'Snowflake';\n\n\tdocumentationUrl = 'snowflake';\n\n\tproperties: INodeProperties[] = [\n\t\t{\n\t\t\tdisplayName: 'Account',\n\t\t\tname: 'account',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription: 'Enter the name of your Snowflake account',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Database',\n\t\t\tname: 'database',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription: 'Specify the database you want to use after creating the connection',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Warehouse',\n\t\t\tname: 'warehouse',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription:\n\t\t\t\t'The default virtual warehouse to use for the session after connecting. Used for performing queries, loading data, etc.',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Authentication',\n\t\t\tname: 'authentication',\n\t\t\ttype: 'options',\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Password',\n\t\t\t\t\tvalue: 'password',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Key-Pair',\n\t\t\t\t\tvalue: 'keyPair',\n\t\t\t\t},\n\t\t\t],\n\t\t\tdefault: 'password',\n\t\t\tdescription: 'The way to authenticate with Snowflake',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Username',\n\t\t\tname: 'username',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tauthentication: ['password'],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Password',\n\t\t\tname: 'password',\n\t\t\ttype: 'string',\n\t\t\ttypeOptions: {\n\t\t\t\tpassword: true,\n\t\t\t},\n\t\t\tdefault: '',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tauthentication: ['password'],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Private Key',\n\t\t\tname: 'privateKey',\n\t\t\ttype: 'string',\n\t\t\ttypeOptions: {\n\t\t\t\tpassword: true,\n\t\t\t\trows: 4,\n\t\t\t},\n\t\t\tdefault: '',\n\t\t\trequired: true,\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tauthentication: ['keyPair'],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdescription: 'Private PEM key for Key-pair authentication with Snowflake',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Schema',\n\t\t\tname: 'schema',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription: 'Enter the schema you want to use after creating the connection',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Role',\n\t\t\tname: 'role',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription: 'Enter the security role you want to use after creating the connection',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Client Session Keep Alive',\n\t\t\tname: 'clientSessionKeepAlive',\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false,\n\t\t\tdescription:\n\t\t\t\t'Whether to keep alive the client session. By default, client connections typically time out approximately 3-4 hours after the most recent query was executed. If the parameter clientSessionKeepAlive is set to true, the client’s connection to the server will be kept alive indefinitely, even if no queries are executed.',\n\t\t},\n\t];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,UAAqC;AAAA,EAA3C;AACN,gBAAO;AAEP,uBAAc;AAEd,4BAAmB;AAEnB,sBAAgC;AAAA,MAC/B;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aACC;AAAA,MACF;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,UACR;AAAA,YACC,MAAM;AAAA,YACN,OAAO;AAAA,UACR;AAAA,UACA;AAAA,YACC,MAAM;AAAA,YACN,OAAO;AAAA,UACR;AAAA,QACD;AAAA,QACA,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,gBAAgB;AAAA,UACf,MAAM;AAAA,YACL,gBAAgB,CAAC,UAAU;AAAA,UAC5B;AAAA,QACD;AAAA,MACD;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,aAAa;AAAA,UACZ,UAAU;AAAA,QACX;AAAA,QACA,SAAS;AAAA,QACT,gBAAgB;AAAA,UACf,MAAM;AAAA,YACL,gBAAgB,CAAC,UAAU;AAAA,UAC5B;AAAA,QACD;AAAA,MACD;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,aAAa;AAAA,UACZ,UAAU;AAAA,UACV,MAAM;AAAA,QACP;AAAA,QACA,SAAS;AAAA,QACT,UAAU;AAAA,QACV,gBAAgB;AAAA,UACf,MAAM;AAAA,YACL,gBAAgB,CAAC,SAAS;AAAA,UAC3B;AAAA,QACD;AAAA,QACA,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aACC;AAAA,MACF;AAAA,IACD;AAAA;AACD;","names":[]}
1
+ {"version":3,"sources":["../../credentials/Snowflake.credentials.ts"],"sourcesContent":["import type { ICredentialType, INodeProperties } from 'n8n-workflow';\n\nexport class Snowflake implements ICredentialType {\n\tname = 'snowflake';\n\n\tdisplayName = 'Snowflake';\n\n\tdocumentationUrl = 'snowflake';\n\n\tproperties: INodeProperties[] = [\n\t\t{\n\t\t\tdisplayName: 'Account',\n\t\t\tname: 'account',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription: 'Enter the name of your Snowflake account',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Database',\n\t\t\tname: 'database',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription: 'Specify the database you want to use after creating the connection',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Warehouse',\n\t\t\tname: 'warehouse',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription:\n\t\t\t\t'The default virtual warehouse to use for the session after connecting. Used for performing queries, loading data, etc.',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Authentication',\n\t\t\tname: 'authentication',\n\t\t\ttype: 'options',\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Password',\n\t\t\t\t\tvalue: 'password',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Key-Pair',\n\t\t\t\t\tvalue: 'keyPair',\n\t\t\t\t},\n\t\t\t],\n\t\t\tdefault: 'password',\n\t\t\tdescription: 'The way to authenticate with Snowflake',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Username',\n\t\t\tname: 'username',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Password',\n\t\t\tname: 'password',\n\t\t\ttype: 'string',\n\t\t\ttypeOptions: {\n\t\t\t\tpassword: true,\n\t\t\t},\n\t\t\tdefault: '',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tauthentication: ['password'],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Private Key',\n\t\t\tname: 'privateKey',\n\t\t\ttype: 'string',\n\t\t\ttypeOptions: {\n\t\t\t\tpassword: true,\n\t\t\t\trows: 4,\n\t\t\t},\n\t\t\tdefault: '',\n\t\t\trequired: true,\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tauthentication: ['keyPair'],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdescription:\n\t\t\t\t'Private PEM key for Key-pair authentication with Snowflake, follow guide <a href=\"https://docs.snowflake.com/en/user-guide/key-pair-auth\" target=\"_blank\">here</a>',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Passphrase',\n\t\t\tname: 'passphrase',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription:\n\t\t\t\t'If the private key is encrypted, you must provide the passphrase used to encrypt it',\n\t\t\ttypeOptions: {\n\t\t\t\tpassword: true,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Schema',\n\t\t\tname: 'schema',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription: 'Enter the schema you want to use after creating the connection',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Role',\n\t\t\tname: 'role',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tdescription: 'Enter the security role you want to use after creating the connection',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Client Session Keep Alive',\n\t\t\tname: 'clientSessionKeepAlive',\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false,\n\t\t\tdescription:\n\t\t\t\t'Whether to keep alive the client session. By default, client connections typically time out approximately 3-4 hours after the most recent query was executed. If the parameter clientSessionKeepAlive is set to true, the client’s connection to the server will be kept alive indefinitely, even if no queries are executed.',\n\t\t},\n\t];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,UAAqC;AAAA,EAA3C;AACN,gBAAO;AAEP,uBAAc;AAEd,4BAAmB;AAEnB,sBAAgC;AAAA,MAC/B;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;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AA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aACC;AAAA,MACF;AAAA,IACD;AAAA;AACD;","names":[]}
@@ -34,7 +34,9 @@ __export(GenericFunctions_exports, {
34
34
  getConnectionOptions: () => getConnectionOptions
35
35
  });
36
36
  module.exports = __toCommonJS(GenericFunctions_exports);
37
+ var import_crypto = require("crypto");
37
38
  var import_pick = __toESM(require("lodash/pick"));
39
+ var import_utilities = require("../../utils/utilities");
38
40
  const commonConnectionFields = [
39
41
  "account",
40
42
  "database",
@@ -43,11 +45,25 @@ const commonConnectionFields = [
43
45
  "role",
44
46
  "clientSessionKeepAlive"
45
47
  ];
48
+ const extractPrivateKey = (credential) => {
49
+ const key = (0, import_utilities.formatPrivateKey)(credential.privateKey);
50
+ if (!credential.passphrase) return key;
51
+ const privateKeyObject = (0, import_crypto.createPrivateKey)({
52
+ key,
53
+ format: "pem",
54
+ passphrase: credential.passphrase
55
+ });
56
+ return privateKeyObject.export({
57
+ format: "pem",
58
+ type: "pkcs8"
59
+ });
60
+ };
46
61
  const getConnectionOptions = (credential) => {
47
62
  const connectionOptions = (0, import_pick.default)(credential, commonConnectionFields);
48
63
  if (credential.authentication === "keyPair") {
49
64
  connectionOptions.authenticator = "SNOWFLAKE_JWT";
50
- connectionOptions.privateKey = credential.privateKey;
65
+ connectionOptions.username = credential.username;
66
+ connectionOptions.privateKey = extractPrivateKey(credential);
51
67
  } else {
52
68
  connectionOptions.username = credential.username;
53
69
  connectionOptions.password = credential.password;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../nodes/Snowflake/GenericFunctions.ts"],"sourcesContent":["import pick from 'lodash/pick';\nimport type snowflake from 'snowflake-sdk';\n\nconst commonConnectionFields = [\n\t'account',\n\t'database',\n\t'schema',\n\t'warehouse',\n\t'role',\n\t'clientSessionKeepAlive',\n] as const;\n\nexport type SnowflakeCredential = Pick<\n\tsnowflake.ConnectionOptions,\n\t(typeof commonConnectionFields)[number]\n> &\n\t(\n\t\t| {\n\t\t\t\tauthentication: 'password';\n\t\t\t\tusername?: string;\n\t\t\t\tpassword?: string;\n\t\t }\n\t\t| {\n\t\t\t\tauthentication: 'keyPair';\n\t\t\t\tprivateKey: string;\n\t\t }\n\t);\n\nexport const getConnectionOptions = (credential: SnowflakeCredential) => {\n\tconst connectionOptions: snowflake.ConnectionOptions = pick(credential, commonConnectionFields);\n\tif (credential.authentication === 'keyPair') {\n\t\tconnectionOptions.authenticator = 'SNOWFLAKE_JWT';\n\t\tconnectionOptions.privateKey = credential.privateKey;\n\t} else {\n\t\tconnectionOptions.username = credential.username;\n\t\tconnectionOptions.password = credential.password;\n\t}\n\treturn connectionOptions;\n};\n\nexport async function connect(conn: snowflake.Connection) {\n\treturn await new Promise<void>((resolve, reject) => {\n\t\tconn.connect((error) => (error ? reject(error) : resolve()));\n\t});\n}\n\nexport async function destroy(conn: snowflake.Connection) {\n\treturn await new Promise<void>((resolve, reject) => {\n\t\tconn.destroy((error) => (error ? reject(error) : resolve()));\n\t});\n}\n\nexport async function execute(\n\tconn: snowflake.Connection,\n\tsqlText: string,\n\tbinds: snowflake.InsertBinds,\n) {\n\treturn await new Promise<any[] | undefined>((resolve, reject) => {\n\t\tconn.execute({\n\t\t\tsqlText,\n\t\t\tbinds,\n\t\t\tcomplete: (error, _, rows) => (error ? reject(error) : resolve(rows)),\n\t\t});\n\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAGjB,MAAM,yBAAyB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAkBO,MAAM,uBAAuB,CAAC,eAAoC;AACxE,QAAM,wBAAiD,YAAAA,SAAK,YAAY,sBAAsB;AAC9F,MAAI,WAAW,mBAAmB,WAAW;AAC5C,sBAAkB,gBAAgB;AAClC,sBAAkB,aAAa,WAAW;AAAA,EAC3C,OAAO;AACN,sBAAkB,WAAW,WAAW;AACxC,sBAAkB,WAAW,WAAW;AAAA,EACzC;AACA,SAAO;AACR;AAEA,eAAsB,QAAQ,MAA4B;AACzD,SAAO,MAAM,IAAI,QAAc,CAAC,SAAS,WAAW;AACnD,SAAK,QAAQ,CAAC,UAAW,QAAQ,OAAO,KAAK,IAAI,QAAQ,CAAE;AAAA,EAC5D,CAAC;AACF;AAEA,eAAsB,QAAQ,MAA4B;AACzD,SAAO,MAAM,IAAI,QAAc,CAAC,SAAS,WAAW;AACnD,SAAK,QAAQ,CAAC,UAAW,QAAQ,OAAO,KAAK,IAAI,QAAQ,CAAE;AAAA,EAC5D,CAAC;AACF;AAEA,eAAsB,QACrB,MACA,SACA,OACC;AACD,SAAO,MAAM,IAAI,QAA2B,CAAC,SAAS,WAAW;AAChE,SAAK,QAAQ;AAAA,MACZ;AAAA,MACA;AAAA,MACA,UAAU,CAAC,OAAO,GAAG,SAAU,QAAQ,OAAO,KAAK,IAAI,QAAQ,IAAI;AAAA,IACpE,CAAC;AAAA,EACF,CAAC;AACF;","names":["pick"]}
1
+ {"version":3,"sources":["../../../nodes/Snowflake/GenericFunctions.ts"],"sourcesContent":["import { createPrivateKey } from 'crypto';\nimport pick from 'lodash/pick';\nimport type snowflake from 'snowflake-sdk';\n\nimport { formatPrivateKey } from '@utils/utilities';\n\nconst commonConnectionFields = [\n\t'account',\n\t'database',\n\t'schema',\n\t'warehouse',\n\t'role',\n\t'clientSessionKeepAlive',\n] as const;\n\nexport type SnowflakeCredential = Pick<\n\tsnowflake.ConnectionOptions,\n\t(typeof commonConnectionFields)[number]\n> &\n\t(\n\t\t| {\n\t\t\t\tauthentication: 'password';\n\t\t\t\tusername?: string;\n\t\t\t\tpassword?: string;\n\t\t }\n\t\t| {\n\t\t\t\tauthentication: 'keyPair';\n\t\t\t\tusername: string;\n\t\t\t\tprivateKey: string;\n\t\t\t\tpassphrase?: string;\n\t\t }\n\t);\n\nconst extractPrivateKey = (credential: { privateKey: string; passphrase?: string }) => {\n\tconst key = formatPrivateKey(credential.privateKey as string);\n\n\tif (!credential.passphrase) return key;\n\n\tconst privateKeyObject = createPrivateKey({\n\t\tkey,\n\t\tformat: 'pem',\n\t\tpassphrase: credential.passphrase as string,\n\t});\n\n\treturn privateKeyObject.export({\n\t\tformat: 'pem',\n\t\ttype: 'pkcs8',\n\t}) as string;\n};\n\nexport const getConnectionOptions = (credential: SnowflakeCredential) => {\n\tconst connectionOptions: snowflake.ConnectionOptions = pick(credential, commonConnectionFields);\n\tif (credential.authentication === 'keyPair') {\n\t\tconnectionOptions.authenticator = 'SNOWFLAKE_JWT';\n\t\tconnectionOptions.username = credential.username;\n\t\tconnectionOptions.privateKey = extractPrivateKey(credential);\n\t} else {\n\t\tconnectionOptions.username = credential.username;\n\t\tconnectionOptions.password = credential.password;\n\t}\n\treturn connectionOptions;\n};\n\nexport async function connect(conn: snowflake.Connection) {\n\treturn await new Promise<void>((resolve, reject) => {\n\t\tconn.connect((error) => (error ? reject(error) : resolve()));\n\t});\n}\n\nexport async function destroy(conn: snowflake.Connection) {\n\treturn await new Promise<void>((resolve, reject) => {\n\t\tconn.destroy((error) => (error ? reject(error) : resolve()));\n\t});\n}\n\nexport async function execute(\n\tconn: snowflake.Connection,\n\tsqlText: string,\n\tbinds: snowflake.InsertBinds,\n) {\n\treturn await new Promise<any[] | undefined>((resolve, reject) => {\n\t\tconn.execute({\n\t\t\tsqlText,\n\t\t\tbinds,\n\t\t\tcomplete: (error, _, rows) => (error ? reject(error) : resolve(rows)),\n\t\t});\n\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAiC;AACjC,kBAAiB;AAGjB,uBAAiC;AAEjC,MAAM,yBAAyB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAA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7 +307,7 @@
307
307
  {"name":"slackOAuth2Api","extends":["oAuth2Api"],"displayName":"Slack OAuth2 API","documentationUrl":"slack","properties":[{"displayName":"Grant Type","name":"grantType","type":"hidden","default":"authorizationCode"},{"displayName":"Authorization URL","name":"authUrl","type":"hidden","default":"https://slack.com/oauth/v2/authorize"},{"displayName":"Access Token URL","name":"accessTokenUrl","type":"hidden","default":"https://slack.com/api/oauth.v2.access"},{"displayName":"Scope","name":"scope","type":"hidden","default":"chat:write"},{"displayName":"Auth URI Query Parameters","name":"authQueryParameters","type":"hidden","default":"user_scope=channels:read channels:write chat:write files:read files:write groups:read im:read mpim:read reactions:read reactions:write stars:read stars:write usergroups:write usergroups:read users.profile:read users.profile:write users:read"},{"displayName":"Authentication","name":"authentication","type":"hidden","default":"body"},{"displayName":"If you get an Invalid Scopes error, make sure you add the correct one <a target=\"_blank\" href=\"https://docs.n8n.io/integrations/builtin/credentials/slack/#using-oauth\">here</a> to your Slack integration","name":"notice","type":"notice","default":""}],"supportedNodes":["slack"],"iconUrl":"icons/n8n-nodes-base/dist/nodes/Slack/slack.svg"},
308
308
  {"name":"sms77Api","displayName":"seven API","documentationUrl":"sms77","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"default":""}],"authenticate":{"type":"generic","properties":{"headers":{"X-Api-Key":"={{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"https://gateway.seven.io/api","url":"/hooks","qs":{"action":"read"}},"rules":[{"type":"responseSuccessBody","properties":{"key":"success","message":"Invalid API Key"}}]},"supportedNodes":["sms77"],"iconUrl":"icons/n8n-nodes-base/dist/nodes/Sms77/seven.svg"},
309
309
  {"name":"smtp","displayName":"SMTP","documentationUrl":"sendemail","properties":[{"displayName":"User","name":"user","type":"string","default":""},{"displayName":"Password","name":"password","type":"string","typeOptions":{"password":true},"default":""},{"displayName":"Host","name":"host","type":"string","default":""},{"displayName":"Port","name":"port","type":"number","default":465},{"displayName":"SSL/TLS","name":"secure","type":"boolean","default":true},{"displayName":"Disable STARTTLS","name":"disableStartTls","type":"boolean","default":false,"displayOptions":{"show":{"secure":[false]}}},{"displayName":"Client Host Name","name":"hostName","type":"string","default":"","placeholder":"","description":"The hostname of the client, used for identifying to the server"}],"supportedNodes":["emailSend"],"icon":"fa:envelope"},
310
- {"name":"snowflake","displayName":"Snowflake","documentationUrl":"snowflake","properties":[{"displayName":"Account","name":"account","type":"string","default":"","description":"Enter the name of your Snowflake account"},{"displayName":"Database","name":"database","type":"string","default":"","description":"Specify the database you want to use after creating the connection"},{"displayName":"Warehouse","name":"warehouse","type":"string","default":"","description":"The default virtual warehouse to use for the session after connecting. Used for performing queries, loading data, etc."},{"displayName":"Authentication","name":"authentication","type":"options","options":[{"name":"Password","value":"password"},{"name":"Key-Pair","value":"keyPair"}],"default":"password","description":"The way to authenticate with Snowflake"},{"displayName":"Username","name":"username","type":"string","default":"","displayOptions":{"show":{"authentication":["password"]}}},{"displayName":"Password","name":"password","type":"string","typeOptions":{"password":true},"default":"","displayOptions":{"show":{"authentication":["password"]}}},{"displayName":"Private Key","name":"privateKey","type":"string","typeOptions":{"password":true,"rows":4},"default":"","required":true,"displayOptions":{"show":{"authentication":["keyPair"]}},"description":"Private PEM key for Key-pair authentication with Snowflake"},{"displayName":"Schema","name":"schema","type":"string","default":"","description":"Enter the schema you want to use after creating the connection"},{"displayName":"Role","name":"role","type":"string","default":"","description":"Enter the security role you want to use after creating the connection"},{"displayName":"Client Session Keep Alive","name":"clientSessionKeepAlive","type":"boolean","default":false,"description":"Whether to keep alive the client session. By default, client connections typically time out approximately 3-4 hours after the most recent query was executed. If the parameter clientSessionKeepAlive is set to true, the client’s connection to the server will be kept alive indefinitely, even if no queries are executed."}],"supportedNodes":["snowflake"],"iconUrl":"icons/n8n-nodes-base/dist/nodes/Snowflake/snowflake.svg"},
310
+ {"name":"snowflake","displayName":"Snowflake","documentationUrl":"snowflake","properties":[{"displayName":"Account","name":"account","type":"string","default":"","description":"Enter the name of your Snowflake account"},{"displayName":"Database","name":"database","type":"string","default":"","description":"Specify the database you want to use after creating the connection"},{"displayName":"Warehouse","name":"warehouse","type":"string","default":"","description":"The default virtual warehouse to use for the session after connecting. Used for performing queries, loading data, etc."},{"displayName":"Authentication","name":"authentication","type":"options","options":[{"name":"Password","value":"password"},{"name":"Key-Pair","value":"keyPair"}],"default":"password","description":"The way to authenticate with Snowflake"},{"displayName":"Username","name":"username","type":"string","default":""},{"displayName":"Password","name":"password","type":"string","typeOptions":{"password":true},"default":"","displayOptions":{"show":{"authentication":["password"]}}},{"displayName":"Private Key","name":"privateKey","type":"string","typeOptions":{"password":true,"rows":4},"default":"","required":true,"displayOptions":{"show":{"authentication":["keyPair"]}},"description":"Private PEM key for Key-pair authentication with Snowflake, follow guide <a href=\"https://docs.snowflake.com/en/user-guide/key-pair-auth\" target=\"_blank\">here</a>"},{"displayName":"Passphrase","name":"passphrase","type":"string","default":"","description":"If the private key is encrypted, you must provide the passphrase used to encrypt it","typeOptions":{"password":true}},{"displayName":"Schema","name":"schema","type":"string","default":"","description":"Enter the schema you want to use after creating the connection"},{"displayName":"Role","name":"role","type":"string","default":"","description":"Enter the security role you want to use after creating the connection"},{"displayName":"Client Session Keep Alive","name":"clientSessionKeepAlive","type":"boolean","default":false,"description":"Whether to keep alive the client session. By default, client connections typically time out approximately 3-4 hours after the most recent query was executed. If the parameter clientSessionKeepAlive is set to true, the client’s connection to the server will be kept alive indefinitely, even if no queries are executed."}],"supportedNodes":["snowflake"],"iconUrl":"icons/n8n-nodes-base/dist/nodes/Snowflake/snowflake.svg"},
311
311
  {"name":"solarWindsIpamApi","displayName":"SolarWinds IPAM","documentationUrl":"solarwindsipam","httpRequestNode":{"name":"SolarWinds IPAM","docsUrl":"https://www.solarwinds.com/ip-address-manager","apiBaseUrlPlaceholder":"https://your-ipam-server"},"properties":[{"displayName":"Base URL","name":"url","required":true,"type":"string","default":"","placeholder":"https://your-ipam-server","description":"The base URL of your SolarWinds IPAM server."},{"displayName":"Username","name":"username","required":true,"type":"string","default":"","description":"The username for SolarWinds IPAM API."},{"displayName":"Password","name":"password","required":true,"type":"string","typeOptions":{"password":true},"default":"","description":"The password for SolarWinds IPAM API."}],"authenticate":{"type":"generic","properties":{"auth":{"username":"={{$credentials.username}}","password":"={{$credentials.password}}"}}},"test":{"request":{"baseURL":"={{$credentials.url}}","url":"/SolarWinds/InformationService/v3/Json/Query","method":"GET","qs":{"query":"SELECT TOP 1 AccountID FROM IPAM.AccountRoles"},"skipSslCertificateValidation":true},"rules":[{"type":"responseCode","properties":{"value":403,"message":"Connection failed: Invalid credentials or unreachable server"}}]},"iconUrl":{"light":"icons/n8n-nodes-base/dist/credentials/icons/SolarWindsIpam.svg","dark":"icons/n8n-nodes-base/dist/credentials/icons/SolarWindsIpam.svg"},"supportedNodes":[]},
312
312
  {"name":"solarWindsObservabilityApi","displayName":"SolarWinds Observability","documentationUrl":"solarwindsobservability","httpRequestNode":{"name":"SolarWinds Observability","docsUrl":"https://documentation.solarwinds.com/en/success_center/observability/content/api/api-swagger.htm","apiBaseUrlPlaceholder":"https://api.xx-yy.cloud.solarwinds.com/"},"properties":[{"displayName":"URL","name":"url","required":true,"type":"string","default":""},{"displayName":"API Token","name":"apiToken","required":true,"type":"string","typeOptions":{"password":true},"default":""}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials.apiToken}}","Content-Type":"application/json-rpc"}}},"test":{"request":{"baseURL":"={{$credentials.url}}","url":"/v1/logs","method":"GET"},"rules":[{"type":"responseSuccessBody","properties":{"key":"error","value":"invalid_auth","message":"Invalid access token"}}]},"iconUrl":{"light":"icons/n8n-nodes-base/dist/credentials/icons/SolarWindsObservability.svg","dark":"icons/n8n-nodes-base/dist/credentials/icons/SolarWindsObservability.svg"},"supportedNodes":[]},
313
313
  {"name":"splunkApi","displayName":"Splunk API","documentationUrl":"splunk","properties":[{"displayName":"Auth Token","name":"authToken","type":"string","typeOptions":{"password":true},"default":""},{"displayName":"Base URL","name":"baseUrl","type":"string","description":"Protocol, domain and port","placeholder":"e.g. https://localhost:8089","default":""},{"displayName":"Allow Self-Signed Certificates","name":"allowUnauthorizedCerts","type":"boolean","description":"Whether to connect even if SSL certificate validation is not possible","default":false}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials?.authToken}}"}}},"test":{"request":{"url":"={{$credentials.baseUrl}}/services/alerts/fired_alerts","method":"GET","skipSslCertificateValidation":"={{$credentials?.allowUnauthorizedCerts}}"}},"supportedNodes":["splunk"],"iconUrl":"icons/n8n-nodes-base/dist/nodes/Splunk/splunk.svg"},