@revenexx/integrations-node-sdk 1.11.0 → 1.14.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/dist/types.d.ts CHANGED
@@ -3,7 +3,31 @@ export type LocalizedString = string | Record<string, string>;
3
3
  export type DataType = 'any' | 'object' | 'array' | 'string' | 'number' | 'boolean';
4
4
  export type OutputKind = 'default' | 'branch' | 'error';
5
5
  export type NodeCategory = 'trigger' | 'action' | 'transform' | 'control' | 'io';
6
- export type ConfigType = 'string' | 'number' | 'boolean' | 'select' | 'multiselect' | 'object' | 'array' | 'expression' | 'secret-ref' | 'credentials-ref' | 'state-ref' | 'dynamic-schema';
6
+ export type ConfigType = 'string' | 'number' | 'boolean' | 'select' | 'multiselect' | 'object' | 'array' | 'expression' | 'secret-ref' | 'credentials-ref' | 'state-ref' | 'dynamic-schema' | 'vpn-route';
7
+ /**
8
+ * What a node receives at run time for a `vpn-route` setting (PO-831).
9
+ *
10
+ * The editor stores `{ connection: string; route: string }`, or `null` (or no
11
+ * value) for the public internet. Before `execute`, the worker replaces a stored
12
+ * reference with the route as it stands now, so the node never resolves it
13
+ * itself; a connection that is not active fails the step as `VPN_UNAVAILABLE`,
14
+ * one that is gone as `VPN_ROUTE_MISSING` (see `VPN_ERROR_CODES`). A setting left
15
+ * on the public internet stays `null` or absent.
16
+ */
17
+ export interface ResolvedVpnRoute {
18
+ /** The VPN connection's name. */
19
+ connection: string;
20
+ /** The route's name within that connection. */
21
+ route: string;
22
+ kind: 'http' | 'tcp';
23
+ /**
24
+ * Where the run reaches the route: for `http` a base URL
25
+ * (`http://10.31.0.7:8080/sap-odata/`), for `tcp` a `host:port`
26
+ * (`10.31.0.7:20001`). The address is on the run's allow-list, so
27
+ * `safeFetch` reaches it although it is private.
28
+ */
29
+ endpoint: string;
30
+ }
7
31
  /**
8
32
  * Semantic category of an image, driving how the registry/CDN organises and
9
33
  * displays it.
@@ -48,6 +72,12 @@ export interface IOutputField {
48
72
  export interface IOutputPort {
49
73
  kind: OutputKind;
50
74
  dataType: DataType;
75
+ /**
76
+ * The port's name, as a branch and an edge refer to it. Lowercase kebab-case —
77
+ * `not-found`, never `notFound` — because the registry refuses anything else
78
+ * on upload and `rvnxx-nodes manifest` stops on it (`SLUG_PATTERN`). A setting's
79
+ * `key` may be camelCase; a port name may not.
80
+ */
51
81
  name?: string;
52
82
  label?: LocalizedString;
53
83
  description?: LocalizedString;
@@ -71,6 +101,7 @@ export interface IOutputPort {
71
101
  */
72
102
  resolveOutputs?: boolean;
73
103
  fallback?: {
104
+ /** Lowercase kebab-case, as {@link IOutputPort.name}. */
74
105
  name: string;
75
106
  label?: LocalizedString;
76
107
  description?: LocalizedString;
@@ -186,6 +217,15 @@ export interface IConfigFieldBase {
186
217
  * the node whose config names it.
187
218
  */
188
219
  stateRole?: 'mapping' | 'cursor' | 'dedupe' | 'digest';
220
+ /**
221
+ * Only meaningful when `type === 'vpn-route'`: which kind of route the picker
222
+ * offers (PO-831) — `http` for a node that sends HTTP requests through the
223
+ * relay's proxy, `tcp` for one that opens a socket. Defaults to `'http'`.
224
+ *
225
+ * **Accepted by the registry only once integrations#406 is deployed** — until
226
+ * then a package declaring it is refused on upload.
227
+ */
228
+ routeKind?: 'http' | 'tcp';
189
229
  }
190
230
  export interface IConfigField extends IConfigFieldBase {
191
231
  /**
@@ -504,6 +544,29 @@ export interface ICredentialDescription {
504
544
  images?: IImage[];
505
545
  authKind: CredentialAuthKind;
506
546
  fields: ICredentialField[];
547
+ /**
548
+ * Which of this type's fields a VPN route replaces (PO-829). A type without it
549
+ * cannot be routed through a VPN, and the studio offers no choice.
550
+ *
551
+ * - `tcp` — the route's relay address and port replace the `hostField` and
552
+ * `portField` values (both keys of `fields`).
553
+ * - `http` — the route's endpoint replaces the base of the `urlField` value,
554
+ * keeping any path the author typed after it.
555
+ *
556
+ * The stored configuration is never rewritten; the platform substitutes the
557
+ * route's current endpoint each time the credential is tested or resolved.
558
+ *
559
+ * **Accepted by the registry only once integrations#406 is deployed** — until
560
+ * then a package declaring it is refused on upload.
561
+ */
562
+ network?: {
563
+ kind: 'tcp';
564
+ hostField: string;
565
+ portField: string;
566
+ } | {
567
+ kind: 'http';
568
+ urlField: string;
569
+ };
507
570
  }
508
571
  /**
509
572
  * Runtime context handed to a credential's `test`/`resolve`. Runs in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revenexx/integrations-node-sdk",
3
- "version": "1.11.0",
3
+ "version": "1.14.0",
4
4
  "description": "TypeScript interfaces and utilities for Revenexx integration nodes",
5
5
  "license": "MIT",
6
6
  "author": "revenexx GmbH",
@@ -63,6 +63,7 @@
63
63
  "typescript": "^7.0.2"
64
64
  },
65
65
  "dependencies": {
66
- "ipaddr.js": "2.5.0"
66
+ "ipaddr.js": "2.5.0",
67
+ "undici": "6.29.1"
67
68
  }
68
69
  }