@frontera-sdk/blueprint 1.50.64 → 1.50.66

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontera-sdk/blueprint",
3
- "version": "1.50.64",
3
+ "version": "1.50.66",
4
4
  "description": "React hooks for reading Blueprint data and invoking governed Actions from inside a Frontera app.",
5
5
  "keywords": [
6
6
  "frontera",
@@ -56,7 +56,7 @@
56
56
  "smoke": "bun run scripts/smoke.ts"
57
57
  },
58
58
  "dependencies": {
59
- "@frontera-sdk/core": "1.50.64"
59
+ "@frontera-sdk/core": "1.50.66"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "@tanstack/react-query": "^5.90.21",
@@ -138,6 +138,54 @@ export interface ActionDescriptor {
138
138
  inputSchema: Record<string, unknown>
139
139
  }
140
140
 
141
+ /**
142
+ * What raised a request, in the only terms a reader can act on.
143
+ *
144
+ * `person` is someone acting for themselves. `agent` is an Agent acting under
145
+ * a person's authority — `agentName` says which Agent, `userId` says whose
146
+ * authority. `automation` is an unattended caller that is not an Agent, so
147
+ * there is no Agent name to show; `userId` still names the person it ran for.
148
+ *
149
+ * The split matters when you build an approval screen. "Raised by Alia" and
150
+ * "raised by the Collections Agent, under Alia's authority" are different
151
+ * things to approve, and flattening them into one line hides the one an
152
+ * approver most needs to see.
153
+ */
154
+ export interface ActionRequestRequester {
155
+ kind: 'agent' | 'person' | 'automation'
156
+ agentId: string | null
157
+ agentName: string | null
158
+ userId: string | null
159
+ }
160
+
161
+ /**
162
+ * What a request is asking for, ready to render.
163
+ *
164
+ * A queue row on its own says a request exists and what state it is in. This
165
+ * says what would happen if it were approved: which Action, with which
166
+ * parameter values, for what stated reason, raised by whom. Read-only — none
167
+ * of it is sent back on a decision, so editing it locally changes nothing
168
+ * about what the platform would run.
169
+ *
170
+ * `input` is keyed by the Action's parameter API names, the same names
171
+ * `submit` takes — so a form that collects a value and a screen that reviews
172
+ * it agree on what to call it.
173
+ *
174
+ * A parameter the Action declares as confidential or restricted arrives as the
175
+ * literal string `'[redacted]'`. Show it as withheld rather than as an empty
176
+ * value: the parameter WAS supplied, and the approver is simply not the
177
+ * audience for it.
178
+ */
179
+ export interface ActionRequestIntent {
180
+ actionApiName: string
181
+ actionDisplayName: string
182
+ /** Submitted values, keyed by parameter API name. */
183
+ input: Record<string, unknown>
184
+ reason: string | null
185
+ correlationId: string | null
186
+ requester: ActionRequestRequester
187
+ }
188
+
141
189
  export interface ActionRequest {
142
190
  id: string
143
191
  actionDefinitionId: string
@@ -146,6 +194,20 @@ export interface ActionRequest {
146
194
  effectCertainty?: ActionEffectCertainty
147
195
  createdAt?: string
148
196
  updatedAt?: string
197
+ /**
198
+ * What the request is asking for. Present on reads of a single request and
199
+ * on listed requests; absent on the reply to a write, where the caller
200
+ * already holds what it just sent.
201
+ *
202
+ * `null` is a real state, not a failure to handle with a retry or an error
203
+ * banner: the platform can still say what state the request is in but cannot
204
+ * honestly say what it asks for — usually because the Action's published
205
+ * definition has moved on and there is no longer a name or a parameter list
206
+ * to show it against. Render the row with its lifecycle, say the details are
207
+ * unavailable, and keep the decision controls governed as they already are.
208
+ * Never fall back to a guess.
209
+ */
210
+ intent?: ActionRequestIntent | null
149
211
  }
150
212
 
151
213
  /**