@bonsae/node-red-salesforce 0.2.0 → 0.3.0

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.
package/index.mjs CHANGED
@@ -1,40 +1,40 @@
1
1
  var P = Object.defineProperty;
2
2
  var B = (a, o, n) => o in a ? P(a, o, { enumerable: !0, configurable: !0, writable: !0, value: n }) : a[o] = n;
3
3
  var f = (a, o) => P(a, "name", { value: o, configurable: !0 });
4
- var i = (a, o, n) => B(a, typeof o != "symbol" ? o + "" : o, n);
4
+ var s = (a, o, n) => B(a, typeof o != "symbol" ? o + "" : o, n);
5
5
  import { fileURLToPath as q } from "url";
6
6
  import { dirname as J } from "path";
7
7
  import { registerTypes as G } from "@bonsae/nrg/server";
8
- import { defineSchema as h, SchemaType as t, ConfigNode as Q, IONode as A, defineModule as Y } from "@bonsae/nrg/server";
8
+ import { defineSchema as h, SchemaType as e, ConfigNode as Q, IONode as A, defineModule as Y } from "@bonsae/nrg/server";
9
9
  import K from "jsforce";
10
10
  import M from "node:crypto";
11
- var V = q(import.meta.url), Lt = J(V);
11
+ var V = q(import.meta.url), Ae = J(V);
12
12
  const W = h(
13
13
  {
14
- name: t.String({ default: "" }),
15
- loginUrl: t.String({
14
+ name: e.String({ default: "" }),
15
+ loginUrl: e.String({
16
16
  default: "https://login.salesforce.com",
17
17
  "x-nrg-form": { icon: "globe" }
18
18
  }),
19
- clientId: t.String({
19
+ clientId: e.String({
20
20
  default: "",
21
21
  "x-nrg-form": { icon: "key" }
22
22
  }),
23
- apiVersion: t.Union(
23
+ apiVersion: e.Union(
24
24
  [
25
- t.Literal("62.0"),
26
- t.Literal("61.0"),
27
- t.Literal("60.0"),
28
- t.Literal("59.0"),
29
- t.Literal("58.0"),
30
- t.Literal("57.0"),
31
- t.Literal("56.0"),
32
- t.Literal("55.0")
25
+ e.Literal("62.0"),
26
+ e.Literal("61.0"),
27
+ e.Literal("60.0"),
28
+ e.Literal("59.0"),
29
+ e.Literal("58.0"),
30
+ e.Literal("57.0"),
31
+ e.Literal("56.0"),
32
+ e.Literal("55.0")
33
33
  ],
34
34
  { default: "62.0", "x-nrg-form": { icon: "code-fork" } }
35
35
  ),
36
- callbackUrl: t.Optional(
37
- t.String({
36
+ callbackUrl: e.Optional(
37
+ e.String({
38
38
  default: "",
39
39
  "x-nrg-form": { icon: "exchange" }
40
40
  })
@@ -43,12 +43,12 @@ const W = h(
43
43
  { $id: "salesforce-connection:config" }
44
44
  ), X = h(
45
45
  {
46
- accessToken: t.String({ default: "", format: "password" }),
47
- refreshToken: t.String({ default: "", format: "password" }),
48
- instanceUrl: t.String({ default: "" })
46
+ accessToken: e.String({ default: "", format: "password" }),
47
+ refreshToken: e.String({ default: "", format: "password" }),
48
+ instanceUrl: e.String({ default: "" })
49
49
  },
50
50
  { $id: "salesforce-connection:credentials" }
51
- ), H = 600 * 1e3, k = /* @__PURE__ */ new Map();
51
+ ), H = 600 * 1e3, F = /* @__PURE__ */ new Map();
52
52
  function Z() {
53
53
  return M.randomBytes(32).toString("base64url");
54
54
  }
@@ -58,8 +58,8 @@ function D(a) {
58
58
  }
59
59
  f(D, "generateCodeChallenge");
60
60
  function _(a) {
61
- const o = M.randomUUID(), n = Z(), e = D(n);
62
- k.set(o, {
61
+ const o = M.randomUUID(), n = Z(), t = D(n);
62
+ F.set(o, {
63
63
  codeVerifier: n,
64
64
  nodeId: a.nodeId,
65
65
  clientId: a.clientId,
@@ -67,44 +67,44 @@ function _(a) {
67
67
  callbackUrl: a.callbackUrl,
68
68
  timestamp: Date.now()
69
69
  });
70
- for (const [s, r] of k)
71
- Date.now() - r.timestamp > H && k.delete(s);
72
- return { state: o, codeChallenge: e };
70
+ for (const [i, r] of F)
71
+ Date.now() - r.timestamp > H && F.delete(i);
72
+ return { state: o, codeChallenge: t };
73
73
  }
74
74
  f(_, "createAuthState");
75
- function tt(a) {
76
- const o = k.get(a);
77
- return !o || (k.delete(a), Date.now() - o.timestamp > H) ? null : o;
75
+ function ee(a) {
76
+ const o = F.get(a);
77
+ return !o || (F.delete(a), Date.now() - o.timestamp > H) ? null : o;
78
78
  }
79
- f(tt, "consumeAuthState");
80
- function et(a) {
79
+ f(ee, "consumeAuthState");
80
+ function te(a) {
81
81
  return a.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
82
82
  }
83
- f(et, "escapeHtml");
84
- function F(a, o = !0) {
83
+ f(te, "escapeHtml");
84
+ function k(a, o = !0) {
85
85
  const n = o ? "<script>setTimeout(function(){window.close()},3000)</script>" : "";
86
- return `<html><body><h2>Authorization Failed</h2><p>${et(a)}</p>${n}</body></html>`;
86
+ return `<html><body><h2>Authorization Failed</h2><p>${te(a)}</p>${n}</body></html>`;
87
87
  }
88
- f(F, "errorPage");
89
- function nt(a) {
88
+ f(k, "errorPage");
89
+ function ne(a) {
90
90
  const o = (a.settings.httpAdminRoot || "").replace(
91
91
  /\/$/,
92
92
  ""
93
93
  );
94
- a.httpAdmin.post("/salesforce/auth/start", (n, e) => {
94
+ a.httpAdmin.post("/salesforce/auth/start", (n, t) => {
95
95
  try {
96
96
  const {
97
- nodeId: s,
97
+ nodeId: i,
98
98
  loginUrl: r,
99
99
  clientId: l,
100
100
  callbackUrl: d
101
101
  } = n.body;
102
- if (!s || !r || !l) {
103
- e.status(400).json({ error: "nodeId, loginUrl, and clientId are required" });
102
+ if (!i || !r || !l) {
103
+ t.status(400).json({ error: "nodeId, loginUrl, and clientId are required" });
104
104
  return;
105
105
  }
106
106
  const c = d || `${n.protocol}://${n.get("host")}${o}/salesforce/auth/callback`, { state: g, codeChallenge: u } = _({
107
- nodeId: s,
107
+ nodeId: i,
108
108
  clientId: l,
109
109
  loginUrl: r,
110
110
  callbackUrl: c
@@ -116,31 +116,31 @@ function nt(a) {
116
116
  code_challenge: u,
117
117
  code_challenge_method: "S256"
118
118
  });
119
- e.json({
119
+ t.json({
120
120
  authorizationUrl: `${r}/services/oauth2/authorize?${m.toString()}`
121
121
  });
122
- } catch (s) {
122
+ } catch (i) {
123
123
  a.log.error(
124
- `salesforce-connection: auth/start error: ${s instanceof Error ? s.message : String(s)}`
125
- ), e.status(500).json({ error: "Failed to start authorization" });
124
+ `salesforce-connection: auth/start error: ${i instanceof Error ? i.message : String(i)}`
125
+ ), t.status(500).json({ error: "Failed to start authorization" });
126
126
  }
127
- }), a.httpAdmin.get("/salesforce/auth/callback", async (n, e) => {
127
+ }), a.httpAdmin.get("/salesforce/auth/callback", async (n, t) => {
128
128
  try {
129
- const { code: s, state: r, error: l, error_description: d } = n.query;
129
+ const { code: i, state: r, error: l, error_description: d } = n.query;
130
130
  if (l) {
131
131
  a.log.error(
132
132
  `salesforce-connection: OAuth error: ${l} - ${d}`
133
- ), e.status(400).send(F(String(d || l)));
133
+ ), t.status(400).send(k(String(d || l)));
134
134
  return;
135
135
  }
136
- if (!s || !r) {
137
- e.status(400).send(F("Missing code or state parameter"));
136
+ if (!i || !r) {
137
+ t.status(400).send(k("Missing code or state parameter"));
138
138
  return;
139
139
  }
140
- const c = tt(r);
140
+ const c = ee(r);
141
141
  if (!c) {
142
- e.status(400).send(
143
- F(
142
+ t.status(400).send(
143
+ k(
144
144
  "Invalid or expired authorization state. Please try again."
145
145
  )
146
146
  );
@@ -153,7 +153,7 @@ function nt(a) {
153
153
  headers: { "Content-Type": "application/x-www-form-urlencoded" },
154
154
  body: new URLSearchParams({
155
155
  grant_type: "authorization_code",
156
- code: s,
156
+ code: i,
157
157
  client_id: c.clientId,
158
158
  redirect_uri: c.callbackUrl,
159
159
  code_verifier: c.codeVerifier
@@ -164,8 +164,8 @@ function nt(a) {
164
164
  const p = await g.text();
165
165
  a.log.error(
166
166
  `salesforce-connection: Token exchange failed: ${p}`
167
- ), e.status(500).send(
168
- F(
167
+ ), t.status(500).send(
168
+ k(
169
169
  "Token exchange failed. Check the Node-RED logs for details."
170
170
  )
171
171
  );
@@ -186,7 +186,7 @@ function nt(a) {
186
186
  refreshToken: u.refresh_token,
187
187
  instanceUrl: u.instance_url
188
188
  });
189
- e.send(`<!DOCTYPE html>
189
+ t.send(`<!DOCTYPE html>
190
190
  <html>
191
191
  <body>
192
192
  <h2>Authorization Successful</h2>
@@ -199,35 +199,35 @@ function nt(a) {
199
199
  </script>
200
200
  </body>
201
201
  </html>`);
202
- } catch (s) {
202
+ } catch (i) {
203
203
  a.log.error(
204
- `salesforce-connection: auth/callback error: ${s instanceof Error ? s.message : String(s)}`
205
- ), e.status(500).send(F("An unexpected error occurred."));
204
+ `salesforce-connection: auth/callback error: ${i instanceof Error ? i.message : String(i)}`
205
+ ), t.status(500).send(k("An unexpected error occurred."));
206
206
  }
207
- }), a.httpAdmin.get("/salesforce/auth/status/:nodeId", (n, e) => {
207
+ }), a.httpAdmin.get("/salesforce/auth/status/:nodeId", (n, t) => {
208
208
  try {
209
- const s = a.nodes.getCredentials(n.params.nodeId), r = !!(s != null && s.accessToken && (s != null && s.instanceUrl));
210
- e.json({
209
+ const i = a.nodes.getCredentials(n.params.nodeId), r = !!(i != null && i.accessToken && (i != null && i.instanceUrl));
210
+ t.json({
211
211
  authenticated: r,
212
- instanceUrl: r ? s.instanceUrl : void 0
212
+ instanceUrl: r ? i.instanceUrl : void 0
213
213
  });
214
214
  } catch {
215
- e.json({ authenticated: !1 });
215
+ t.json({ authenticated: !1 });
216
216
  }
217
217
  });
218
218
  }
219
- f(nt, "initAuthRoutes");
220
- function ot(a) {
221
- nt(a);
219
+ f(ne, "initAuthRoutes");
220
+ function oe(a) {
221
+ ne(a);
222
222
  }
223
- f(ot, "initRoutes");
224
- const C = class C extends Q {
223
+ f(oe, "initRoutes");
224
+ const L = class L extends Q {
225
225
  constructor() {
226
226
  super(...arguments);
227
- i(this, "conn", null);
227
+ s(this, "conn", null);
228
228
  }
229
229
  static async registered(n) {
230
- ot(n);
230
+ oe(n);
231
231
  }
232
232
  async getConnection() {
233
233
  if (this.conn) return this.conn;
@@ -245,10 +245,10 @@ const C = class C extends Q {
245
245
  accessToken: n.accessToken,
246
246
  refreshToken: n.refreshToken,
247
247
  version: this.config.apiVersion
248
- }), this.conn.on("refresh", (e) => {
248
+ }), this.conn.on("refresh", (t) => {
249
249
  this.RED.nodes.addCredentials(this.id, {
250
250
  ...this.credentials,
251
- accessToken: e
251
+ accessToken: t
252
252
  });
253
253
  }), this.conn;
254
254
  }
@@ -264,15 +264,15 @@ const C = class C extends Q {
264
264
  this.conn = null;
265
265
  }
266
266
  };
267
- f(C, "SalesforceConnection"), i(C, "type", "salesforce-connection"), i(C, "configSchema", W), i(C, "credentialsSchema", X);
268
- let w = C;
269
- const it = h(
267
+ f(L, "SalesforceConnection"), s(L, "type", "salesforce-connection"), s(L, "configSchema", W), s(L, "credentialsSchema", X);
268
+ let $ = L;
269
+ const ie = h(
270
270
  {
271
- name: t.String({ default: "", "x-nrg-form": { icon: "tag" } }),
272
- connection: t.NodeRef(w, {
271
+ name: e.String({ default: "", "x-nrg-form": { icon: "tag" } }),
272
+ connection: e.NodeRef($, {
273
273
  "x-nrg-form": { icon: "cloud" }
274
274
  }),
275
- query: t.TypedInput({
275
+ query: e.TypedInput({
276
276
  "x-nrg-form": {
277
277
  icon: "search",
278
278
  typedInputTypes: ["str", "msg", "flow", "global"]
@@ -280,16 +280,16 @@ const it = h(
280
280
  })
281
281
  },
282
282
  { $id: "salesforce-soql:config" }
283
- ), st = h(
283
+ ), se = h(
284
284
  {
285
- payload: t.Any()
285
+ payload: e.Any()
286
286
  },
287
287
  { $id: "salesforce-soql:input" }
288
- ), rt = h(
288
+ ), re = h(
289
289
  {
290
- payload: t.Array(t.Any()),
291
- totalSize: t.Number(),
292
- done: t.Boolean()
290
+ payload: e.Array(e.Any()),
291
+ totalSize: e.Number(),
292
+ done: e.Boolean()
293
293
  },
294
294
  { $id: "salesforce-soql:output" }
295
295
  ), y = class y extends A {
@@ -301,7 +301,7 @@ const it = h(
301
301
  }
302
302
  try {
303
303
  this.status({ fill: "green", shape: "dot", text: "querying..." });
304
- const e = await n.getConnection(), s = await this.config.query.resolve(o), r = await e.query(s);
304
+ const t = await n.getConnection(), i = await this.config.query.resolve(o), r = await t.query(i);
305
305
  this.status({
306
306
  fill: "green",
307
307
  shape: "dot",
@@ -312,65 +312,65 @@ const it = h(
312
312
  totalSize: r.totalSize,
313
313
  done: r.done
314
314
  });
315
- } catch (e) {
315
+ } catch (t) {
316
316
  this.status({
317
317
  fill: "red",
318
318
  shape: "dot",
319
- text: e instanceof Error ? e.message : String(e)
319
+ text: t instanceof Error ? t.message : String(t)
320
320
  }), this.error(
321
- `SOQL query failed: ${e instanceof Error ? e.message : String(e)}`,
321
+ `SOQL query failed: ${t instanceof Error ? t.message : String(t)}`,
322
322
  o
323
323
  );
324
324
  }
325
325
  }
326
326
  };
327
- f(y, "SalesforceSoql"), i(y, "type", "salesforce-soql"), i(y, "category", "salesforce"), i(y, "color", "#FFFFFF"), i(y, "inputs", 1), i(y, "outputs", 1), i(y, "configSchema", it), i(y, "inputSchema", st), i(y, "outputsSchema", rt);
328
- let R = y;
329
- const at = h(
327
+ f(y, "SalesforceSoql"), s(y, "type", "salesforce-soql"), s(y, "category", "salesforce"), s(y, "color", "#FFFFFF"), s(y, "configSchema", ie), s(y, "inputSchema", se), s(y, "outputsSchema", re);
328
+ let U = y;
329
+ const ae = h(
330
330
  {
331
- name: t.String({ default: "", "x-nrg-form": { icon: "tag" } }),
332
- connection: t.NodeRef(w, {
331
+ name: e.String({ default: "", "x-nrg-form": { icon: "tag" } }),
332
+ connection: e.NodeRef($, {
333
333
  "x-nrg-form": { icon: "cloud" }
334
334
  }),
335
- operation: t.Union(
335
+ operation: e.Union(
336
336
  [
337
- t.Literal("create"),
338
- t.Literal("read"),
339
- t.Literal("update"),
340
- t.Literal("delete"),
341
- t.Literal("upsert")
337
+ e.Literal("create"),
338
+ e.Literal("read"),
339
+ e.Literal("update"),
340
+ e.Literal("delete"),
341
+ e.Literal("upsert")
342
342
  ],
343
343
  { default: "create", "x-nrg-form": { icon: "pencil" } }
344
344
  ),
345
- sObjectType: t.TypedInput({
345
+ sObjectType: e.TypedInput({
346
346
  "x-nrg-form": {
347
347
  icon: "cube",
348
348
  typedInputTypes: ["str", "msg"]
349
349
  }
350
350
  }),
351
- record: t.TypedInput({
351
+ record: e.TypedInput({
352
352
  "x-nrg-form": {
353
353
  icon: "file-code-o",
354
354
  typedInputTypes: ["json", "msg"]
355
355
  }
356
356
  }),
357
- externalIdField: t.Optional(
358
- t.String({
357
+ externalIdField: e.Optional(
358
+ e.String({
359
359
  default: "",
360
360
  "x-nrg-form": { icon: "key" }
361
361
  })
362
362
  ),
363
- emitError: t.Boolean({ default: !1 }),
364
- emitComplete: t.Boolean({ default: !1 }),
365
- emitStatus: t.Boolean({ default: !1 })
363
+ emitError: e.Boolean({ default: !1 }),
364
+ emitComplete: e.Boolean({ default: !1 }),
365
+ emitStatus: e.Boolean({ default: !1 })
366
366
  },
367
367
  {
368
368
  $id: "salesforce-dml:config",
369
- if: t.Object({
370
- operation: t.Literal("upsert")
369
+ if: e.Object({
370
+ operation: e.Literal("upsert")
371
371
  }),
372
- then: t.Object({
373
- externalIdField: t.String({ minLength: 1 })
372
+ then: e.Object({
373
+ externalIdField: e.String({ minLength: 1 })
374
374
  }),
375
375
  errorMessage: {
376
376
  properties: {
@@ -378,14 +378,14 @@ const at = h(
378
378
  }
379
379
  }
380
380
  }
381
- ), ct = h(
381
+ ), ce = h(
382
382
  {
383
- payload: t.Any()
383
+ payload: e.Any()
384
384
  },
385
385
  { $id: "salesforce-dml:input" }
386
- ), lt = h(
386
+ ), le = h(
387
387
  {
388
- payload: t.Any()
388
+ payload: e.Any()
389
389
  },
390
390
  { $id: "salesforce-dml:output" }
391
391
  ), x = class x extends A {
@@ -396,11 +396,11 @@ const at = h(
396
396
  return;
397
397
  }
398
398
  try {
399
- const e = this.config.operation;
400
- this.status({ fill: "green", shape: "dot", text: `${e}...` });
401
- const s = await n.getConnection(), r = await this.config.sObjectType.resolve(o), l = s.sobject(r), d = await this.config.record.resolve(o) ?? o.payload;
399
+ const t = this.config.operation;
400
+ this.status({ fill: "green", shape: "dot", text: `${t}...` });
401
+ const i = await n.getConnection(), r = await this.config.sObjectType.resolve(o), l = i.sobject(r), d = await this.config.record.resolve(o) ?? o.payload;
402
402
  let c;
403
- switch (e) {
403
+ switch (t) {
404
404
  case "create":
405
405
  c = await l.create(d);
406
406
  break;
@@ -417,98 +417,98 @@ const at = h(
417
417
  c = await l.upsert(d, this.config.externalIdField);
418
418
  break;
419
419
  default:
420
- throw new Error(`Unknown operation: ${e}`);
420
+ throw new Error(`Unknown operation: ${t}`);
421
421
  }
422
- this.status({ fill: "green", shape: "dot", text: `${e} done` }), this.send({ ...o, payload: c });
423
- } catch (e) {
422
+ this.status({ fill: "green", shape: "dot", text: `${t} done` }), this.send({ ...o, payload: c });
423
+ } catch (t) {
424
424
  this.status({
425
425
  fill: "red",
426
426
  shape: "dot",
427
- text: e instanceof Error ? e.message : String(e)
427
+ text: t instanceof Error ? t.message : String(t)
428
428
  }), this.error(
429
- `DML ${this.config.operation} failed: ${e instanceof Error ? e.message : String(e)}`,
429
+ `DML ${this.config.operation} failed: ${t instanceof Error ? t.message : String(t)}`,
430
430
  o
431
431
  );
432
432
  }
433
433
  }
434
434
  };
435
- f(x, "SalesforceDml"), i(x, "type", "salesforce-dml"), i(x, "category", "salesforce"), i(x, "color", "#FFFFFF"), i(x, "inputs", 1), i(x, "outputs", 1), i(x, "configSchema", at), i(x, "inputSchema", ct), i(x, "outputsSchema", lt);
436
- let S = x;
437
- const dt = h(
435
+ f(x, "SalesforceDml"), s(x, "type", "salesforce-dml"), s(x, "category", "salesforce"), s(x, "color", "#FFFFFF"), s(x, "configSchema", ae), s(x, "inputSchema", ce), s(x, "outputsSchema", le);
436
+ let R = x;
437
+ const de = h(
438
438
  {
439
- name: t.String({ default: "", "x-nrg-form": { icon: "tag" } }),
440
- connection: t.NodeRef(w, {
439
+ name: e.String({ default: "", "x-nrg-form": { icon: "tag" } }),
440
+ connection: e.NodeRef($, {
441
441
  "x-nrg-form": { icon: "cloud" }
442
442
  }),
443
- operation: t.Union(
443
+ operation: e.Union(
444
444
  [
445
- t.Literal("insert"),
446
- t.Literal("update"),
447
- t.Literal("upsert"),
448
- t.Literal("delete"),
449
- t.Literal("query")
445
+ e.Literal("insert"),
446
+ e.Literal("update"),
447
+ e.Literal("upsert"),
448
+ e.Literal("delete"),
449
+ e.Literal("query")
450
450
  ],
451
451
  { default: "insert", "x-nrg-form": { icon: "database" } }
452
452
  ),
453
- sObjectType: t.TypedInput({
453
+ sObjectType: e.TypedInput({
454
454
  "x-nrg-form": {
455
455
  icon: "cube",
456
456
  typedInputTypes: ["str", "msg"]
457
457
  }
458
458
  }),
459
- externalIdField: t.Optional(
460
- t.String({
459
+ externalIdField: e.Optional(
460
+ e.String({
461
461
  default: "",
462
462
  "x-nrg-form": { icon: "key" }
463
463
  })
464
464
  ),
465
- assignmentRuleId: t.Optional(
466
- t.String({
465
+ assignmentRuleId: e.Optional(
466
+ e.String({
467
467
  default: "",
468
468
  "x-nrg-form": { icon: "gavel" }
469
469
  })
470
470
  ),
471
- columnDelimiter: t.Union(
471
+ columnDelimiter: e.Union(
472
472
  [
473
- t.Literal("COMMA"),
474
- t.Literal("TAB"),
475
- t.Literal("PIPE"),
476
- t.Literal("SEMICOLON"),
477
- t.Literal("CARET"),
478
- t.Literal("BACKQUOTE")
473
+ e.Literal("COMMA"),
474
+ e.Literal("TAB"),
475
+ e.Literal("PIPE"),
476
+ e.Literal("SEMICOLON"),
477
+ e.Literal("CARET"),
478
+ e.Literal("BACKQUOTE")
479
479
  ],
480
480
  { default: "COMMA", "x-nrg-form": { icon: "columns" } }
481
481
  ),
482
- lineEnding: t.Union(
483
- [t.Literal("LF"), t.Literal("CRLF")],
482
+ lineEnding: e.Union(
483
+ [e.Literal("LF"), e.Literal("CRLF")],
484
484
  { default: "LF", "x-nrg-form": { icon: "level-down" } }
485
485
  ),
486
- pollInterval: t.Number({
486
+ pollInterval: e.Number({
487
487
  default: 5e3,
488
488
  minimum: 1e3,
489
489
  "x-nrg-form": { icon: "clock-o" }
490
490
  }),
491
- pollTimeout: t.Number({
491
+ pollTimeout: e.Number({
492
492
  default: 6e4,
493
493
  minimum: 5e3,
494
494
  "x-nrg-form": { icon: "hourglass" }
495
495
  }),
496
- emitJobCreated: t.Boolean({
496
+ emitJobCreated: e.Boolean({
497
497
  default: !1,
498
498
  "x-nrg-form": { icon: "flag", toggle: !0 }
499
499
  }),
500
- outputs: t.Number({ default: 2 }),
501
- emitError: t.Boolean({ default: !1 }),
502
- emitComplete: t.Boolean({ default: !1 }),
503
- emitStatus: t.Boolean({ default: !1 })
500
+ outputs: e.Number({ default: 2 }),
501
+ emitError: e.Boolean({ default: !1 }),
502
+ emitComplete: e.Boolean({ default: !1 }),
503
+ emitStatus: e.Boolean({ default: !1 })
504
504
  },
505
505
  {
506
506
  $id: "salesforce-bulk:config",
507
- if: t.Object({
508
- operation: t.Literal("upsert")
507
+ if: e.Object({
508
+ operation: e.Literal("upsert")
509
509
  }),
510
- then: t.Object({
511
- externalIdField: t.String({ minLength: 1 })
510
+ then: e.Object({
511
+ externalIdField: e.String({ minLength: 1 })
512
512
  }),
513
513
  errorMessage: {
514
514
  properties: {
@@ -516,29 +516,35 @@ const dt = h(
516
516
  }
517
517
  }
518
518
  }
519
- ), ut = h(
519
+ ), ue = h(
520
520
  {
521
- payload: t.Any()
521
+ payload: e.Any()
522
522
  },
523
523
  { $id: "salesforce-bulk:input" }
524
524
  );
525
525
  h(
526
526
  {
527
- payload: t.Array(t.Any())
527
+ payload: e.Array(e.Any())
528
528
  },
529
529
  { $id: "salesforce-bulk:output" }
530
530
  );
531
- const I = class I extends A {
531
+ const he = h(
532
+ {},
533
+ { $id: "salesforce-bulk:output-port-1" }
534
+ ), pe = h(
535
+ {},
536
+ { $id: "salesforce-bulk:output-port-2" }
537
+ ), b = class b extends A {
532
538
  sendRecord(o, n) {
533
- const e = this.config.emitJobCreated ? 3 : 2, s = Array(e).fill(null);
534
- s[0] = { ...o, payload: n }, this.send(s);
539
+ const t = this.config.emitJobCreated ? 3 : 2, i = Array(t).fill(null);
540
+ i[0] = { ...o, payload: n }, this.send(i);
535
541
  }
536
542
  sendJobCreated(o, n) {
537
543
  this.config.emitJobCreated && this.send([null, null, { ...o, payload: n }]);
538
544
  }
539
545
  sendComplete(o, n) {
540
- const e = this.config.emitJobCreated ? 3 : 2, s = Array(e).fill(null);
541
- s[1] = { ...o, payload: n }, this.send(s);
546
+ const t = this.config.emitJobCreated ? 3 : 2, i = Array(t).fill(null);
547
+ i[1] = { ...o, payload: n }, this.send(i);
542
548
  }
543
549
  async input(o) {
544
550
  const n = this.config.connection;
@@ -547,16 +553,16 @@ const I = class I extends A {
547
553
  return;
548
554
  }
549
555
  try {
550
- const e = this.config.operation;
556
+ const t = this.config.operation;
551
557
  this.status({
552
558
  fill: "green",
553
559
  shape: "dot",
554
- text: `bulk ${e}...`
560
+ text: `bulk ${t}...`
555
561
  });
556
- const s = await n.getConnection(), r = await this.config.sObjectType.resolve(o);
562
+ const i = await n.getConnection(), r = await this.config.sObjectType.resolve(o);
557
563
  let l = 0;
558
- if (e === "query") {
559
- const d = await s.bulk2.query(o.payload, {
564
+ if (t === "query") {
565
+ const d = await i.bulk2.query(o.payload, {
560
566
  pollTimeout: this.config.pollTimeout,
561
567
  pollInterval: this.config.pollInterval,
562
568
  columnDelimiter: this.config.columnDelimiter,
@@ -569,85 +575,88 @@ const I = class I extends A {
569
575
  }), this.status({
570
576
  fill: "green",
571
577
  shape: "dot",
572
- text: `bulk ${e}: ${l} records`
573
- }), this.sendComplete(o, { operation: e, sObjectType: r, totalRecords: l });
578
+ text: `bulk ${t}: ${l} records`
579
+ }), this.sendComplete(o, { operation: t, sObjectType: r, totalRecords: l });
574
580
  } else {
575
- const d = o.payload, c = s.bulk2.createJob({
576
- operation: e,
581
+ const d = o.payload, c = i.bulk2.createJob({
582
+ operation: t,
577
583
  object: r,
578
584
  columnDelimiter: this.config.columnDelimiter,
579
585
  lineEnding: this.config.lineEnding,
580
- ...e === "upsert" && this.config.externalIdField ? { externalIdFieldName: this.config.externalIdField } : {},
586
+ ...t === "upsert" && this.config.externalIdField ? { externalIdFieldName: this.config.externalIdField } : {},
581
587
  ...this.config.assignmentRuleId ? { assignmentRuleId: this.config.assignmentRuleId } : {}
582
588
  });
583
589
  await c.open(), this.sendJobCreated(o, {
584
590
  jobId: c.id,
585
- operation: e,
591
+ operation: t,
586
592
  sObjectType: r,
587
593
  state: "Open"
588
594
  }), await c.uploadData(d), await c.close(), await c.poll(this.config.pollInterval, this.config.pollTimeout);
589
595
  const g = await c.getAllResults(), u = g.successfulResults ?? [], m = g.failedResults ?? [], p = g.unprocessedRecords ?? [];
590
596
  l = u.length + m.length + p.length;
591
- for (const U of u)
592
- this.sendRecord(o, U);
593
- for (const U of m)
594
- this.sendRecord(o, U);
595
- const L = u.length, z = m.length;
597
+ for (const E of u)
598
+ this.sendRecord(o, E);
599
+ for (const E of m)
600
+ this.sendRecord(o, E);
601
+ const S = u.length, z = m.length;
596
602
  this.status({
597
603
  fill: z > 0 ? "red" : "green",
598
604
  shape: "dot",
599
- text: `bulk ${e}: ${l} records`
605
+ text: `bulk ${t}: ${l} records`
600
606
  }), this.sendComplete(o, {
601
607
  jobId: c.id,
602
- operation: e,
608
+ operation: t,
603
609
  sObjectType: r,
604
610
  totalRecords: l,
605
- successCount: L,
611
+ successCount: S,
606
612
  failureCount: z,
607
613
  unprocessedCount: p.length
608
614
  });
609
615
  }
610
- } catch (e) {
611
- const s = e instanceof Error ? e.message : String(e);
612
- this.status({ fill: "red", shape: "dot", text: s }), this.error(`Bulk ${this.config.operation} failed: ${s}`, o);
616
+ } catch (t) {
617
+ const i = t instanceof Error ? t.message : String(t);
618
+ this.status({ fill: "red", shape: "dot", text: i }), this.error(`Bulk ${this.config.operation} failed: ${i}`, o);
613
619
  }
614
620
  }
615
621
  };
616
- f(I, "SalesforceBulk"), i(I, "type", "salesforce-bulk"), i(I, "category", "salesforce"), i(I, "color", "#FFFFFF"), i(I, "inputs", 1), i(I, "outputs", 2), i(I, "configSchema", dt), i(I, "inputSchema", ut);
617
- let O = I;
618
- const ht = h(
622
+ f(b, "SalesforceBulk"), s(b, "type", "salesforce-bulk"), s(b, "category", "salesforce"), s(b, "color", "#FFFFFF"), s(b, "configSchema", de), s(b, "inputSchema", ue), s(b, "outputsSchema", [
623
+ he,
624
+ pe
625
+ ]);
626
+ let O = b;
627
+ const fe = h(
619
628
  {
620
- name: t.String({ default: "", "x-nrg-form": { icon: "tag" } }),
621
- connection: t.NodeRef(w, {
629
+ name: e.String({ default: "", "x-nrg-form": { icon: "tag" } }),
630
+ connection: e.NodeRef($, {
622
631
  "x-nrg-form": { icon: "cloud" }
623
632
  }),
624
- sObjectType: t.TypedInput({
633
+ sObjectType: e.TypedInput({
625
634
  "x-nrg-form": {
626
635
  icon: "cube",
627
636
  typedInputTypes: ["str", "msg"]
628
637
  }
629
638
  }),
630
- emitError: t.Boolean({ default: !1 }),
631
- emitComplete: t.Boolean({ default: !1 }),
632
- emitStatus: t.Boolean({ default: !1 })
639
+ emitError: e.Boolean({ default: !1 }),
640
+ emitComplete: e.Boolean({ default: !1 }),
641
+ emitStatus: e.Boolean({ default: !1 })
633
642
  },
634
643
  { $id: "salesforce-describe:config" }
635
- ), pt = h(
644
+ ), ge = h(
636
645
  {
637
- payload: t.Any()
646
+ payload: e.Any()
638
647
  },
639
648
  { $id: "salesforce-describe:input" }
640
- ), ft = h(
649
+ ), me = h(
641
650
  {
642
- payload: t.Object({
643
- name: t.String(),
644
- fields: t.Array(t.Any()),
645
- childRelationships: t.Array(t.Any()),
646
- recordTypeInfos: t.Array(t.Any())
651
+ payload: e.Object({
652
+ name: e.String(),
653
+ fields: e.Array(e.Any()),
654
+ childRelationships: e.Array(e.Any()),
655
+ recordTypeInfos: e.Array(e.Any())
647
656
  })
648
657
  },
649
658
  { $id: "salesforce-describe:output" }
650
- ), b = class b extends A {
659
+ ), T = class T extends A {
651
660
  async input(o) {
652
661
  const n = this.config.connection;
653
662
  if (!n) {
@@ -656,7 +665,7 @@ const ht = h(
656
665
  }
657
666
  try {
658
667
  this.status({ fill: "green", shape: "dot", text: "describing..." });
659
- const e = await n.getConnection(), s = await this.config.sObjectType.resolve(o), r = await e.sobject(s).describe();
668
+ const t = await n.getConnection(), i = await this.config.sObjectType.resolve(o), r = await t.sobject(i).describe();
660
669
  this.status({
661
670
  fill: "green",
662
671
  shape: "dot",
@@ -670,60 +679,60 @@ const ht = h(
670
679
  recordTypeInfos: r.recordTypeInfos
671
680
  }
672
681
  });
673
- } catch (e) {
682
+ } catch (t) {
674
683
  this.status({
675
684
  fill: "red",
676
685
  shape: "dot",
677
- text: e instanceof Error ? e.message : String(e)
686
+ text: t instanceof Error ? t.message : String(t)
678
687
  }), this.error(
679
- `Describe failed: ${e instanceof Error ? e.message : String(e)}`,
688
+ `Describe failed: ${t instanceof Error ? t.message : String(t)}`,
680
689
  o
681
690
  );
682
691
  }
683
692
  }
684
693
  };
685
- f(b, "SalesforceDescribe"), i(b, "type", "salesforce-describe"), i(b, "category", "salesforce"), i(b, "color", "#FFFFFF"), i(b, "inputs", 1), i(b, "outputs", 1), i(b, "configSchema", ht), i(b, "inputSchema", pt), i(b, "outputsSchema", ft);
686
- let j = b;
687
- const gt = h(
694
+ f(T, "SalesforceDescribe"), s(T, "type", "salesforce-describe"), s(T, "category", "salesforce"), s(T, "color", "#FFFFFF"), s(T, "configSchema", fe), s(T, "inputSchema", ge), s(T, "outputsSchema", me);
695
+ let j = T;
696
+ const ye = h(
688
697
  {
689
- name: t.String({ default: "", "x-nrg-form": { icon: "tag" } }),
690
- connection: t.NodeRef(w, {
698
+ name: e.String({ default: "", "x-nrg-form": { icon: "tag" } }),
699
+ connection: e.NodeRef($, {
691
700
  "x-nrg-form": { icon: "cloud" }
692
701
  }),
693
- channelName: t.String({
702
+ channelName: e.String({
694
703
  default: "",
695
704
  "x-nrg-form": { icon: "rss" }
696
705
  }),
697
- subscribeType: t.Union(
706
+ subscribeType: e.Union(
698
707
  [
699
- t.Literal("LATEST"),
700
- t.Literal("EARLIEST"),
701
- t.Literal("CUSTOM")
708
+ e.Literal("LATEST"),
709
+ e.Literal("EARLIEST"),
710
+ e.Literal("CUSTOM")
702
711
  ],
703
712
  { default: "LATEST", "x-nrg-form": { icon: "history" } }
704
713
  ),
705
- replayId: t.Optional(
706
- t.String({
714
+ replayId: e.Optional(
715
+ e.String({
707
716
  default: "",
708
717
  "x-nrg-form": { icon: "bookmark" }
709
718
  })
710
719
  ),
711
- numRequested: t.Number({
720
+ numRequested: e.Number({
712
721
  default: 100,
713
722
  minimum: 1,
714
723
  maximum: 100,
715
724
  "x-nrg-form": { icon: "sort-numeric-asc" }
716
725
  }),
717
- emitError: t.Boolean({ default: !1 }),
718
- emitStatus: t.Boolean({ default: !1 })
726
+ emitError: e.Boolean({ default: !1 }),
727
+ emitStatus: e.Boolean({ default: !1 })
719
728
  },
720
729
  {
721
730
  $id: "salesforce-streaming:config",
722
- if: t.Object({
723
- subscribeType: t.Literal("CUSTOM")
731
+ if: e.Object({
732
+ subscribeType: e.Literal("CUSTOM")
724
733
  }),
725
- then: t.Object({
726
- replayId: t.String({ minLength: 1 })
734
+ then: e.Object({
735
+ replayId: e.String({ minLength: 1 })
727
736
  }),
728
737
  errorMessage: {
729
738
  properties: {
@@ -731,23 +740,23 @@ const gt = h(
731
740
  }
732
741
  }
733
742
  }
734
- ), mt = h(
743
+ ), xe = h(
735
744
  {
736
- payload: t.Any(),
737
- replayId: t.Any(),
738
- channel: t.String(),
739
- topic: t.String()
745
+ payload: e.Any(),
746
+ replayId: e.Any(),
747
+ channel: e.String(),
748
+ topic: e.String()
740
749
  },
741
750
  { $id: "salesforce-streaming:output" }
742
- ), $ = class $ extends A {
751
+ ), w = class w extends A {
743
752
  constructor() {
744
753
  super(...arguments);
745
- i(this, "client", null);
746
- i(this, "reconnectAttempt", 0);
747
- i(this, "maxReconnectDelay", 6e4);
748
- i(this, "maxReconnectAttempts", 10);
749
- i(this, "grpcErrorHandler", null);
750
- i(this, "stopped", !1);
754
+ s(this, "client", null);
755
+ s(this, "reconnectAttempt", 0);
756
+ s(this, "maxReconnectDelay", 6e4);
757
+ s(this, "maxReconnectAttempts", 10);
758
+ s(this, "grpcErrorHandler", null);
759
+ s(this, "stopped", !1);
751
760
  }
752
761
  async created() {
753
762
  const n = this.config.connection;
@@ -761,22 +770,22 @@ const gt = h(
761
770
  if (!this.stopped)
762
771
  try {
763
772
  this.status({ fill: "green", shape: "dot", text: "connecting..." });
764
- let e;
773
+ let t;
765
774
  try {
766
- e = await n.getConnection(), await e.identity();
775
+ t = await n.getConnection(), await t.identity();
767
776
  } catch {
768
777
  this.status({ fill: "red", shape: "dot", text: "auth expired" }), this.error("Salesforce token expired. Re-authorize the connection.");
769
778
  return;
770
779
  }
771
- const s = n.getAccessToken(), r = n.getInstanceUrl();
772
- if (!s || !r) {
780
+ const i = n.getAccessToken(), r = n.getInstanceUrl();
781
+ if (!i || !r) {
773
782
  this.status({ fill: "red", shape: "dot", text: "not authorized" }), this.error("Salesforce connection not authorized");
774
783
  return;
775
784
  }
776
785
  const l = (await import("salesforce-pubsub-api-client")).default;
777
786
  this.client = new l({
778
787
  authType: "user-supplied",
779
- accessToken: s,
788
+ accessToken: i,
780
789
  instanceUrl: r
781
790
  }), await this.client.connect();
782
791
  const d = this.config.numRequested || null, c = this.config.channelName, g = /* @__PURE__ */ f((u, m, p) => {
@@ -788,8 +797,8 @@ const gt = h(
788
797
  topic: c
789
798
  });
790
799
  else if (m === "error") {
791
- const L = p instanceof Error ? p.message : String(p ?? "stream error");
792
- if (this.warn(`Streaming error: ${L}`), L.includes("UNAUTHENTICATED") || L.includes("authentication")) {
800
+ const S = p instanceof Error ? p.message : String(p ?? "stream error");
801
+ if (this.warn(`Streaming error: ${S}`), S.includes("UNAUTHENTICATED") || S.includes("authentication")) {
793
802
  this.stopped = !0, this.status({
794
803
  fill: "red",
795
804
  shape: "dot",
@@ -799,7 +808,7 @@ const gt = h(
799
808
  ), this.cleanup();
800
809
  return;
801
810
  }
802
- this.status({ fill: "red", shape: "dot", text: L }), this.scheduleReconnect(n);
811
+ this.status({ fill: "red", shape: "dot", text: S }), this.scheduleReconnect(n);
803
812
  } else if (m === "end") {
804
813
  if (this.stopped) return;
805
814
  this.log("Streaming subscription ended"), this.status({ fill: "red", shape: "dot", text: "disconnected" }), this.scheduleReconnect(n);
@@ -833,13 +842,13 @@ const gt = h(
833
842
  shape: "dot",
834
843
  text: `subscribed: ${c}`
835
844
  }), this.reconnectAttempt = 0;
836
- } catch (e) {
845
+ } catch (t) {
837
846
  this.status({
838
847
  fill: "red",
839
848
  shape: "dot",
840
- text: e instanceof Error ? e.message : String(e)
849
+ text: t instanceof Error ? t.message : String(t)
841
850
  }), this.error(
842
- `Streaming subscription failed: ${e instanceof Error ? e.message : String(e)}`
851
+ `Streaming subscription failed: ${t instanceof Error ? t.message : String(t)}`
843
852
  ), this.scheduleReconnect(n);
844
853
  }
845
854
  }
@@ -855,73 +864,71 @@ const gt = h(
855
864
  });
856
865
  return;
857
866
  }
858
- const e = Math.min(
867
+ const t = Math.min(
859
868
  1e3 * Math.pow(2, this.reconnectAttempt),
860
869
  this.maxReconnectDelay
861
870
  );
862
871
  this.log(
863
- `Scheduling reconnect in ${e}ms (attempt ${this.reconnectAttempt}/${this.maxReconnectAttempts})`
872
+ `Scheduling reconnect in ${t}ms (attempt ${this.reconnectAttempt}/${this.maxReconnectAttempts})`
864
873
  ), this.status({
865
874
  fill: "green",
866
875
  shape: "dot",
867
- text: `reconnecting in ${Math.round(e / 1e3)}s`
876
+ text: `reconnecting in ${Math.round(t / 1e3)}s`
868
877
  }), this.setTimeout(async () => {
869
878
  await this.cleanup(), await this.subscribe(n);
870
- }, e);
879
+ }, t);
871
880
  }
872
881
  async cleanup() {
873
- var n, e;
882
+ var n, t;
874
883
  try {
875
- this.grpcErrorHandler && (process.removeListener("uncaughtException", this.grpcErrorHandler), this.grpcErrorHandler = null), this.client && (await ((e = (n = this.client).close) == null ? void 0 : e.call(n)), this.client = null);
884
+ this.grpcErrorHandler && (process.removeListener("uncaughtException", this.grpcErrorHandler), this.grpcErrorHandler = null), this.client && (await ((t = (n = this.client).close) == null ? void 0 : t.call(n)), this.client = null);
876
885
  } catch {
877
886
  }
878
887
  }
879
- async input() {
880
- }
881
888
  async closed() {
882
889
  await this.cleanup();
883
890
  }
884
891
  };
885
- f($, "SalesforceStreaming"), i($, "type", "salesforce-streaming"), i($, "category", "salesforce"), i($, "color", "#FFFFFF"), i($, "inputs", 0), i($, "outputs", 1), i($, "configSchema", gt), i($, "outputsSchema", mt);
886
- let v = $;
887
- const yt = h(
892
+ f(w, "SalesforceStreaming"), s(w, "type", "salesforce-streaming"), s(w, "category", "salesforce"), s(w, "color", "#FFFFFF"), s(w, "configSchema", ye), s(w, "outputsSchema", xe);
893
+ let v = w;
894
+ const be = h(
888
895
  {
889
- name: t.String({ default: "", "x-nrg-form": { icon: "tag" } }),
890
- connection: t.NodeRef(w, {
896
+ name: e.String({ default: "", "x-nrg-form": { icon: "tag" } }),
897
+ connection: e.NodeRef($, {
891
898
  "x-nrg-form": { icon: "cloud" }
892
899
  }),
893
- method: t.Union(
900
+ method: e.Union(
894
901
  [
895
- t.Literal("GET"),
896
- t.Literal("POST"),
897
- t.Literal("PUT"),
898
- t.Literal("PATCH"),
899
- t.Literal("DELETE")
902
+ e.Literal("GET"),
903
+ e.Literal("POST"),
904
+ e.Literal("PUT"),
905
+ e.Literal("PATCH"),
906
+ e.Literal("DELETE")
900
907
  ],
901
908
  { default: "POST", "x-nrg-form": { icon: "random" } }
902
909
  ),
903
- path: t.TypedInput({
910
+ path: e.TypedInput({
904
911
  "x-nrg-form": {
905
912
  icon: "link",
906
913
  typedInputTypes: ["str", "msg"]
907
914
  }
908
915
  }),
909
- emitError: t.Boolean({ default: !1 }),
910
- emitComplete: t.Boolean({ default: !1 }),
911
- emitStatus: t.Boolean({ default: !1 })
916
+ emitError: e.Boolean({ default: !1 }),
917
+ emitComplete: e.Boolean({ default: !1 }),
918
+ emitStatus: e.Boolean({ default: !1 })
912
919
  },
913
920
  { $id: "salesforce-apex:config" }
914
- ), xt = h(
921
+ ), Te = h(
915
922
  {
916
- payload: t.Any()
923
+ payload: e.Any()
917
924
  },
918
925
  { $id: "salesforce-apex:input" }
919
- ), bt = h(
926
+ ), Ie = h(
920
927
  {
921
- payload: t.Any()
928
+ payload: e.Any()
922
929
  },
923
930
  { $id: "salesforce-apex:output" }
924
- ), T = class T extends A {
931
+ ), I = class I extends A {
925
932
  async input(o) {
926
933
  const n = this.config.connection;
927
934
  if (!n) {
@@ -929,40 +936,40 @@ const yt = h(
929
936
  return;
930
937
  }
931
938
  try {
932
- const e = this.config.method;
933
- this.status({ fill: "green", shape: "dot", text: `${e}...` });
934
- const s = await n.getConnection(), r = await this.config.path.resolve(o);
939
+ const t = this.config.method;
940
+ this.status({ fill: "green", shape: "dot", text: `${t}...` });
941
+ const i = await n.getConnection(), r = await this.config.path.resolve(o);
935
942
  let l;
936
- const d = e.toLowerCase();
937
- d === "get" || d === "delete" ? l = await s.apex[d](r) : l = await s.apex[d](r, o.payload), this.status({ fill: "green", shape: "dot", text: `${e} done` }), this.send({ ...o, payload: l });
938
- } catch (e) {
943
+ const d = t.toLowerCase();
944
+ d === "get" || d === "delete" ? l = await i.apex[d](r) : l = await i.apex[d](r, o.payload), this.status({ fill: "green", shape: "dot", text: `${t} done` }), this.send({ ...o, payload: l });
945
+ } catch (t) {
939
946
  this.status({
940
947
  fill: "red",
941
948
  shape: "dot",
942
- text: e instanceof Error ? e.message : String(e)
949
+ text: t instanceof Error ? t.message : String(t)
943
950
  }), this.error(
944
- `Apex ${this.config.method} failed: ${e instanceof Error ? e.message : String(e)}`,
951
+ `Apex ${this.config.method} failed: ${t instanceof Error ? t.message : String(t)}`,
945
952
  o
946
953
  );
947
954
  }
948
955
  }
949
956
  };
950
- f(T, "SalesforceApex"), i(T, "type", "salesforce-apex"), i(T, "category", "salesforce"), i(T, "color", "#FFFFFF"), i(T, "inputs", 1), i(T, "outputs", 1), i(T, "configSchema", yt), i(T, "inputSchema", xt), i(T, "outputsSchema", bt);
951
- let N = T;
952
- const Tt = Y({
957
+ f(I, "SalesforceApex"), s(I, "type", "salesforce-apex"), s(I, "category", "salesforce"), s(I, "color", "#FFFFFF"), s(I, "configSchema", be), s(I, "inputSchema", Te), s(I, "outputsSchema", Ie);
958
+ let N = I;
959
+ const $e = Y({
953
960
  nodes: [
954
- w,
961
+ $,
962
+ U,
955
963
  R,
956
- S,
957
964
  O,
958
965
  j,
959
966
  v,
960
967
  N
961
968
  ]
962
969
  });
963
- var E = Tt;
964
- E && typeof E == "object" && Array.isArray(E.nodes) && (E = G(E.nodes));
970
+ var C = $e;
971
+ C && typeof C == "object" && Array.isArray(C.nodes) && (C = G(C.nodes));
965
972
  export {
966
- E as default
973
+ C as default
967
974
  };
968
975
  //# sourceMappingURL=index.mjs.map