n8n-nodes-lifespace 0.1.2 → 0.1.4
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/README.md +51 -17
- package/dist/nodes/LifeSpace/LifeSpace.node.js +188 -539
- package/dist/nodes/LifeSpace/LifeSpace.node.js.map +1 -1
- package/dist/nodes/LifeSpaceTrigger/LifeSpaceTrigger.node.js +15 -11
- package/dist/nodes/LifeSpaceTrigger/LifeSpaceTrigger.node.js.map +1 -1
- package/dist/nodes/lifespaceDiscovery.d.ts +44 -2
- package/dist/nodes/lifespaceDiscovery.js +242 -20
- package/dist/nodes/lifespaceDiscovery.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,17 +62,21 @@ The token is shown only when it is created or rotated. Store it in n8n immediate
|
|
|
62
62
|
|
|
63
63
|
A **LifeSpace Trigger** additionally uses a **LifeSpace Webhook Signing** credential containing the endpoint-scoped HMAC signing secret. This is deliberately separate from the API credential: the Service API Token authenticates outbound n8n → LifeSpace calls, while the signing secret verifies inbound LifeSpace → n8n deliveries and rotates with its Webhook Endpoint. The Trigger still reuses the LifeSpace API credential for Space/Record Type discovery, so API context is not duplicated.
|
|
64
64
|
|
|
65
|
-
Runtime Discovery determines which Spaces, Record Types, fields, queries, Actions and relation lookup capabilities the current API credential can use. Execution authorization is still enforced by LifeSpace from the current principal, credential scope, Application × Model Access and current Space/Data Grant authority.
|
|
65
|
+
Runtime Discovery determines which Spaces, Record Types, fields, queries, Actions and relation lookup capabilities the current API credential can use. The adapter starts from the compact current-principal inventory, then loads static semantic detail only for the selected Space/Record Type. Relation target lookup remains lazy and field-scoped. Execution authorization is still enforced by LifeSpace from the current principal, credential scope, Application × Model Access and current Space/Data Grant authority.
|
|
66
66
|
|
|
67
67
|
## Generated Record UX
|
|
68
68
|
|
|
69
|
-
Create/Update
|
|
69
|
+
Create/Update keep scalar fields in n8n Resource Mapper while using native n8n controls for LifeSpace calendar-date fields and supported relations. Single relations use a selector; multi-relations use multi-select. List / Query offers typed filter variants for text, enum, boolean, number, date/time and authorized relations, while retaining the raw legacy filter as an expression/compatibility escape hatch.
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
The node displays the authorized human-readable `spaceName` when present while continuing to submit the stable `spc_*` ID.
|
|
72
|
+
|
|
73
|
+
Record Type identity and REST routing remain distinct. LifeSpace `modelKey` is the stable semantic identity, while the Discovery `route` is a REST transport detail. The n8n adapter persists an adapter-local `recordType` selector containing both values when the workflow is configured. At execution time the selector is decoded locally, so Get/List/Delete do not add a Discovery request merely to translate `modelKey` to a REST route.
|
|
74
|
+
|
|
75
|
+
Calendar-backed models use canonical `capabilityBindings.calendar` field roles instead of Event-specific field names while the node is being configured. Date-only values are normalized to `YYYY-MM-DD`. Create/Update execution does not fetch fresh semantic Discovery solely to produce an adapter-local Calendar conflict error; the canonical mutation goes directly to LifeSpace Core, which remains authoritative for Calendar validation and current authorization.
|
|
72
76
|
|
|
73
77
|
## LifeSpace contract compatibility
|
|
74
78
|
|
|
75
|
-
This package follows the current LifeSpace Core Kernel `0.
|
|
79
|
+
This package follows the current LifeSpace Core Kernel `0.31.0` contract family. It consumes Runtime/Discovery semantics only; Eventing configuration and webhook delivery semantics are owned independently by Integration/Eventing `0.1.0`.
|
|
76
80
|
|
|
77
81
|
The UX depends on these Kernel capabilities:
|
|
78
82
|
|
|
@@ -82,7 +86,28 @@ The UX depends on these Kernel capabilities:
|
|
|
82
86
|
- `0.21.0`: invitation-token transport hardening retained by the current baseline;
|
|
83
87
|
- `0.22.0`: authoritative field `title` metadata plus ordered repeatable Generic Query sort metadata;
|
|
84
88
|
- `0.23.0`: authorized source-field-aware Relation Target Lookup for `person` / `person_list` fields;
|
|
85
|
-
- `0.24.0`: authorized human-readable `spaceName` projection
|
|
89
|
+
- `0.24.0`: authorized human-readable `spaceName` projection while `spaceId` remains stable;
|
|
90
|
+
- `0.25.0`: bounded Capability field-role bindings, beginning with Calendar;
|
|
91
|
+
- `0.26.0`: progressively loadable single-model static semantic detail;
|
|
92
|
+
- `0.27.0`: compact current-principal inventory that de-duplicates model semantics from Space visibility edges;
|
|
93
|
+
- `0.28.0`: bounded batch Reference Resolution for relation IDs;
|
|
94
|
+
- `0.29.0`: canonical ordinary-record `referenceLabel` semantics plus `record` / `record_list` lookup and resolution;
|
|
95
|
+
- `0.30.0`: explicit paginated Change History collection and Model Control Plane ownership split;
|
|
96
|
+
- `0.31.0`: Integration/Eventing wire representation moves to the independent Integration/Eventing `0.1.0` contract while Core remains the Runtime authority.
|
|
97
|
+
|
|
98
|
+
The adapter prefers the `0.27+` progressive flow while configuring a node:
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
GET /me/_discovery/inventory
|
|
102
|
+
-> choose current Space / Record Type
|
|
103
|
+
-> GET /spaces/{spaceId}/_discovery/models/{modelKey}
|
|
104
|
+
-> relation target lookup / reference resolution only when needed
|
|
105
|
+
-> persist stable workflow configuration
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Execution is deliberately narrower. Get/List/Delete derive the REST route locally from the persisted Record Type selector. Create/Update submit the configured mutation without a fresh Runtime Discovery preflight. Execute Action loads only the selected model's `0.26+` static semantic detail, and reuses that detail within the same node execution for repeated items using the same Space/Record Type. No cached Discovery result is treated as authorization proof; every CRUD or Action request still goes through canonical LifeSpace Core current-state enforcement.
|
|
109
|
+
|
|
110
|
+
The legacy aggregate `GET /me/_discovery` remains an intentional design-time compatibility fallback. Neither cached Discovery nor relation lookup is treated as authorization proof; every mutation still goes through canonical LifeSpace Runtime enforcement.
|
|
86
111
|
|
|
87
112
|
Ordinary Record CRUD/Action routes remain model-contract surfaces derived from published Model Definitions; the n8n adapter does not maintain a second copy of those schemas.
|
|
88
113
|
|
|
@@ -95,17 +120,18 @@ Examples:
|
|
|
95
120
|
```text
|
|
96
121
|
{{$json.spaceId}}
|
|
97
122
|
{{$json.recordId}}
|
|
123
|
+
{{$json.recordType}}
|
|
98
124
|
{{$vars.lifeSpaceRecordType}}
|
|
99
125
|
```
|
|
100
126
|
|
|
101
|
-
Discovery-backed selectors such as **Space**, **
|
|
127
|
+
Discovery-backed selectors such as **Space**, **Filter Field**, **Sort Field** and **Action** support the normal n8n pattern: choose a value from the list, or switch the parameter to an expression and provide the corresponding stable ID/key. **Record Type** uses the adapter-local `recordType` selector so a LifeSpace Trigger can feed a Record node directly without a mapping step or an extra Discovery request.
|
|
102
128
|
|
|
103
129
|
The same applies to ordinary values such as Record ID, Search, Filter Value, Return All, Limit, Sort Direction, Cursor, explicit Version, API Method, API Path and JSON Body.
|
|
104
130
|
|
|
105
131
|
Two boundaries are intentional:
|
|
106
132
|
|
|
107
133
|
- **Resource** and **Operation** are structural node controls and do not accept expressions because they determine which parameter schema and execution path the node has.
|
|
108
|
-
- **Fields** and **Action Input** use n8n's `resourceMapper`. The mapper container is structural, but each generated field value inside it remains expression-capable. This includes relation-backed field values: the UI can offer authorized
|
|
134
|
+
- **Fields** and **Action Input** use n8n's `resourceMapper`. The mapper container is structural, but each generated field value inside it remains expression-capable. This includes relation-backed field values: the UI can offer authorized options while an expression can still supply a stable relation ID or ID list.
|
|
109
135
|
|
|
110
136
|
For **Filters** and **Sorts**, add the required rows in the node UI and use expressions inside each row's Field/Operator/Value or Field/Direction inputs. The number of rows is treated as workflow structure rather than per-item data. This avoids relying on whole-array expressions for n8n `fixedCollection` parameters.
|
|
111
137
|
|
|
@@ -132,9 +158,9 @@ Supported operations:
|
|
|
132
158
|
|
|
133
159
|
For Record operations:
|
|
134
160
|
|
|
135
|
-
1. choose a **Space** from
|
|
161
|
+
1. choose a **Space** from compact Runtime Discovery inventory;
|
|
136
162
|
2. choose a **Record Type** available in that Space;
|
|
137
|
-
3. configure the operation.
|
|
163
|
+
3. configure the operation; the selected model's semantic detail is loaded only when required.
|
|
138
164
|
|
|
139
165
|
You normally do not type Space IDs or model keys manually.
|
|
140
166
|
|
|
@@ -146,18 +172,22 @@ LifeSpace server defaults are authoritative. A field that is `required` but has
|
|
|
146
172
|
|
|
147
173
|
For example, lifecycle state such as Task status can remain server/Action-owned instead of being manually entered by the workflow author.
|
|
148
174
|
|
|
149
|
-
When Runtime Discovery advertises
|
|
175
|
+
When Runtime Discovery advertises relation semantics, supported `person`, `person_list`, `record` and `record_list` fields are rendered from the current authorized `{ id, label }` target projection instead of asking the workflow author to type raw identifiers. The displayed value is the canonical LifeSpace reference label, while the workflow payload still stores and submits the stable target ID.
|
|
150
176
|
|
|
151
|
-
Older compatible Discovery responses without relation lookup metadata retain the raw-ID field behavior.
|
|
177
|
+
Older compatible Discovery responses without relation lookup metadata retain the raw-ID field behavior. The adapter never guesses record labels from conventional fields such as `name`, `title` or `summary`.
|
|
152
178
|
|
|
153
179
|
The current n8n UI loads bounded relation options when the relevant field is configured. Very large target sets should use expressions with stable IDs until n8n exposes a searchable dynamic relation option surface that can consume LifeSpace's paginated/searchable lookup directly.
|
|
154
180
|
|
|
181
|
+
At execution time Create uses the already-configured Record Type selector and sends the canonical mutation directly. This avoids paying a current-principal inventory round trip merely to rediscover whether adapter-side semantic preflight would improve an error message. Core remains the final authority for schema, Capability, Policy and authorization checks.
|
|
182
|
+
|
|
155
183
|
### Update and Delete
|
|
156
184
|
|
|
157
185
|
LifeSpace uses optimistic concurrency.
|
|
158
186
|
|
|
159
187
|
By default the node reads the current Record version immediately before Update/Delete and sends that version with the mutation. This keeps the ordinary n8n UI free from mandatory internal `version` entry while preserving stale-write protection for the actual mutation race.
|
|
160
188
|
|
|
189
|
+
Update does not add a Runtime Discovery request before the mutation. When no explicit version is configured, the current-record read is for optimistic concurrency rather than semantic discovery. Core validates Calendar and other Capability semantics against the resulting mutation.
|
|
190
|
+
|
|
161
191
|
If a workflow intentionally needs to bind a known version, add **Concurrency Options → Version**.
|
|
162
192
|
|
|
163
193
|
### List / Query
|
|
@@ -165,7 +195,7 @@ If a workflow intentionally needs to bind a known version, add **Concurrency Opt
|
|
|
165
195
|
The normal UI supports:
|
|
166
196
|
|
|
167
197
|
- optional **Search**;
|
|
168
|
-
- one or more **Filters**;
|
|
198
|
+
- one or more typed **Filters**;
|
|
169
199
|
- **Return All** to follow `nextCursor` automatically;
|
|
170
200
|
- **Limit** when Return All is disabled.
|
|
171
201
|
|
|
@@ -181,6 +211,8 @@ Choose an Action from Runtime Discovery.
|
|
|
181
211
|
|
|
182
212
|
**Action Input** contains only semantic/domain inputs. LifeSpace concurrency metadata is not rendered as a business field. For the current `record-version` contract, the node reads the current Record version immediately before Action execution and sends it using the transport declared by Runtime Discovery.
|
|
183
213
|
|
|
214
|
+
Execution-time Action metadata is loaded directly from the selected model's static semantic-detail endpoint rather than first loading the broad current-principal inventory. The static detail is reused for repeated items of the same Space/Record Type during one node execution. It is semantic input only, not cached authority; Core rechecks current Action authority on every invocation.
|
|
215
|
+
|
|
184
216
|
This means actions such as `complete` / `reopen` no longer ask users to type an internal version value.
|
|
185
217
|
|
|
186
218
|
### Advanced API Request
|
|
@@ -190,7 +222,7 @@ The **API Request** resource is an escape hatch for LifeSpace routes that do not
|
|
|
190
222
|
Paths are relative to the configured API Base URL, for example:
|
|
191
223
|
|
|
192
224
|
```text
|
|
193
|
-
/me/_discovery
|
|
225
|
+
/me/_discovery/inventory
|
|
194
226
|
```
|
|
195
227
|
|
|
196
228
|
Use normal Record operations when possible because they benefit from Runtime Discovery metadata and n8n-specific UX.
|
|
@@ -204,7 +236,7 @@ LifeSpace Eventing separates:
|
|
|
204
236
|
- **Webhook Endpoint** — reusable callback URL, signing secret and delivery diagnostics for one Space;
|
|
205
237
|
- **Event Subscription** — one Record Type plus selected event types attached to that endpoint.
|
|
206
238
|
|
|
207
|
-
One Webhook Endpoint can therefore carry events for multiple Record Types through the same n8n callback.
|
|
239
|
+
One Webhook Endpoint can therefore carry events for multiple Record Types through the same n8n callback. In n8n this is represented as one Trigger selecting multiple Record Types; Integration/Eventing still keeps one Event Subscription filter per Record Type.
|
|
208
240
|
|
|
209
241
|
### Trigger setup
|
|
210
242
|
|
|
@@ -222,6 +254,8 @@ One Webhook Endpoint can therefore carry events for multiple Record Types throug
|
|
|
222
254
|
|
|
223
255
|
The Trigger verifies `X-LifeSpace-Timestamp` and `X-LifeSpace-Signature` with the LifeSpace HMAC-SHA256 contract before emitting workflow data. `endpoint.test` payloads are always accepted after signature verification.
|
|
224
256
|
|
|
257
|
+
For ordinary record events, the Trigger preserves the LifeSpace `modelKey` exactly as delivered and additionally emits the n8n adapter-local `recordType` selector for the matching configured Record Type. Pass `{{$json.recordType}}` and `{{$json.recordId}}` directly to a downstream LifeSpace Record node. The downstream node derives the REST route locally from that selector.
|
|
258
|
+
|
|
225
259
|
Webhook Endpoint / Event Subscription creation is intentionally not performed by the n8n Service API Token today because LifeSpace treats that configuration as a Space-management operation. The adapter does not bypass that authority boundary.
|
|
226
260
|
|
|
227
261
|
## What the package provides
|
|
@@ -230,7 +264,7 @@ Webhook Endpoint / Event Subscription creation is intentionally not performed by
|
|
|
230
264
|
- **LifeSpace Webhook Signing** credential for endpoint-scoped inbound HMAC verification;
|
|
231
265
|
- **LifeSpace** node with discovery-driven Record operations plus advanced API Request;
|
|
232
266
|
- **LifeSpace Trigger** with signed multi-Record-Type Domain Event filtering;
|
|
233
|
-
- dynamic Space, Record Type, field, relation target, query, Action and Action Input UI based on Runtime Discovery.
|
|
267
|
+
- dynamic Space, Record Type, field, relation target, query, Action and Action Input UI based on progressive Runtime Discovery.
|
|
234
268
|
|
|
235
269
|
LifeSpace remains authoritative for validation, authorization, defaults, Mutation Authority, Action semantics, relation semantics and event contracts. Runtime Discovery and Relation Target Lookup are current capability/reference projections, not execution-authorization proofs.
|
|
236
270
|
|
|
@@ -278,8 +312,8 @@ The package intentionally has no runtime `dependencies`. It must not read enviro
|
|
|
278
312
|
|
|
279
313
|
## Remaining upstream-dependent UX
|
|
280
314
|
|
|
281
|
-
The adapter
|
|
315
|
+
The adapter now consumes generic `person`, `person_list`, `record` and `record_list` reference labels/lookups when LifeSpace advertises them, and uses Calendar Capability bindings rather than model-specific field names. Remaining UX work should be driven by explicit future LifeSpace contract additions or n8n UI limitations; the adapter must not invent missing semantics locally.
|
|
282
316
|
|
|
283
317
|
## License
|
|
284
318
|
|
|
285
|
-
MIT
|
|
319
|
+
MIT
|