@voyantjs/action-ledger 0.52.2

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.
@@ -0,0 +1,739 @@
1
+ import { z } from "zod";
2
+ export declare const actionLedgerEntryListQuerySchema: z.ZodPipe<z.ZodObject<{
3
+ actionName: z.ZodOptional<z.ZodString>;
4
+ actionKind: z.ZodOptional<z.ZodEnum<{
5
+ execute: "execute";
6
+ reverse: "reverse";
7
+ update: "update";
8
+ delete: "delete";
9
+ read: "read";
10
+ create: "create";
11
+ approve: "approve";
12
+ reject: "reject";
13
+ compensate: "compensate";
14
+ duplicate: "duplicate";
15
+ }>>;
16
+ actorType: z.ZodOptional<z.ZodString>;
17
+ principalType: z.ZodOptional<z.ZodEnum<{
18
+ user: "user";
19
+ api_key: "api_key";
20
+ agent: "agent";
21
+ workflow: "workflow";
22
+ system: "system";
23
+ }>>;
24
+ principalId: z.ZodOptional<z.ZodString>;
25
+ apiTokenId: z.ZodOptional<z.ZodString>;
26
+ sessionId: z.ZodOptional<z.ZodString>;
27
+ callerType: z.ZodOptional<z.ZodString>;
28
+ organizationId: z.ZodOptional<z.ZodString>;
29
+ targetType: z.ZodOptional<z.ZodString>;
30
+ targetId: z.ZodOptional<z.ZodString>;
31
+ targetIds: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
32
+ routeOrToolName: z.ZodOptional<z.ZodString>;
33
+ workflowRunId: z.ZodOptional<z.ZodString>;
34
+ workflowStepId: z.ZodOptional<z.ZodString>;
35
+ correlationId: z.ZodOptional<z.ZodString>;
36
+ causationActionId: z.ZodOptional<z.ZodString>;
37
+ capabilityId: z.ZodOptional<z.ZodString>;
38
+ capabilityVersion: z.ZodOptional<z.ZodString>;
39
+ authorizationSource: z.ZodOptional<z.ZodString>;
40
+ approvalId: z.ZodOptional<z.ZodString>;
41
+ amendsActionId: z.ZodOptional<z.ZodString>;
42
+ idempotencyScope: z.ZodOptional<z.ZodString>;
43
+ idempotencyKey: z.ZodOptional<z.ZodString>;
44
+ evaluatedRisk: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
45
+ low: "low";
46
+ medium: "medium";
47
+ high: "high";
48
+ critical: "critical";
49
+ }>>>>;
50
+ status: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
51
+ requested: "requested";
52
+ awaiting_approval: "awaiting_approval";
53
+ approved: "approved";
54
+ denied: "denied";
55
+ succeeded: "succeeded";
56
+ failed: "failed";
57
+ reversed: "reversed";
58
+ compensated: "compensated";
59
+ expired: "expired";
60
+ cancelled: "cancelled";
61
+ superseded: "superseded";
62
+ }>>>>;
63
+ reversalKind: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
64
+ compensate: "compensate";
65
+ none: "none";
66
+ revert: "revert";
67
+ domain_command: "domain_command";
68
+ }>>>>;
69
+ reversalState: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
70
+ requested: "requested";
71
+ failed: "failed";
72
+ expired: "expired";
73
+ not_reversible: "not_reversible";
74
+ available: "available";
75
+ running: "running";
76
+ completed: "completed";
77
+ }>>>>;
78
+ reversalOutcome: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
79
+ full: "full";
80
+ partial: "partial";
81
+ failed: "failed";
82
+ }>>>>;
83
+ reversesActionId: z.ZodOptional<z.ZodString>;
84
+ reversedByActionId: z.ZodOptional<z.ZodString>;
85
+ sensitiveReasonCode: z.ZodOptional<z.ZodString>;
86
+ decisionPolicy: z.ZodOptional<z.ZodString>;
87
+ occurredAtFrom: z.ZodOptional<z.ZodString>;
88
+ occurredAtTo: z.ZodOptional<z.ZodString>;
89
+ cursorOccurredAt: z.ZodOptional<z.ZodString>;
90
+ cursorId: z.ZodOptional<z.ZodString>;
91
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
92
+ }, z.core.$strip>, z.ZodTransform<{
93
+ occurredAtFrom: Date | undefined;
94
+ occurredAtTo: Date | undefined;
95
+ cursor: {
96
+ occurredAt: string;
97
+ id: string;
98
+ } | undefined;
99
+ actionName?: string | undefined;
100
+ actionKind?: "execute" | "reverse" | "update" | "delete" | "read" | "create" | "approve" | "reject" | "compensate" | "duplicate" | undefined;
101
+ actorType?: string | undefined;
102
+ principalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
103
+ principalId?: string | undefined;
104
+ apiTokenId?: string | undefined;
105
+ sessionId?: string | undefined;
106
+ callerType?: string | undefined;
107
+ organizationId?: string | undefined;
108
+ targetType?: string | undefined;
109
+ targetId?: string | undefined;
110
+ targetIds?: string[] | undefined;
111
+ routeOrToolName?: string | undefined;
112
+ workflowRunId?: string | undefined;
113
+ workflowStepId?: string | undefined;
114
+ correlationId?: string | undefined;
115
+ causationActionId?: string | undefined;
116
+ capabilityId?: string | undefined;
117
+ capabilityVersion?: string | undefined;
118
+ authorizationSource?: string | undefined;
119
+ approvalId?: string | undefined;
120
+ amendsActionId?: string | undefined;
121
+ idempotencyScope?: string | undefined;
122
+ idempotencyKey?: string | undefined;
123
+ evaluatedRisk?: ("low" | "medium" | "high" | "critical")[] | undefined;
124
+ status?: ("requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "failed" | "reversed" | "compensated" | "expired" | "cancelled" | "superseded")[] | undefined;
125
+ reversalKind?: ("compensate" | "none" | "revert" | "domain_command")[] | undefined;
126
+ reversalState?: ("requested" | "failed" | "expired" | "not_reversible" | "available" | "running" | "completed")[] | undefined;
127
+ reversalOutcome?: ("full" | "partial" | "failed")[] | undefined;
128
+ reversesActionId?: string | undefined;
129
+ reversedByActionId?: string | undefined;
130
+ sensitiveReasonCode?: string | undefined;
131
+ decisionPolicy?: string | undefined;
132
+ limit?: number | undefined;
133
+ }, {
134
+ actionName?: string | undefined;
135
+ actionKind?: "execute" | "reverse" | "update" | "delete" | "read" | "create" | "approve" | "reject" | "compensate" | "duplicate" | undefined;
136
+ actorType?: string | undefined;
137
+ principalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
138
+ principalId?: string | undefined;
139
+ apiTokenId?: string | undefined;
140
+ sessionId?: string | undefined;
141
+ callerType?: string | undefined;
142
+ organizationId?: string | undefined;
143
+ targetType?: string | undefined;
144
+ targetId?: string | undefined;
145
+ targetIds?: string[] | undefined;
146
+ routeOrToolName?: string | undefined;
147
+ workflowRunId?: string | undefined;
148
+ workflowStepId?: string | undefined;
149
+ correlationId?: string | undefined;
150
+ causationActionId?: string | undefined;
151
+ capabilityId?: string | undefined;
152
+ capabilityVersion?: string | undefined;
153
+ authorizationSource?: string | undefined;
154
+ approvalId?: string | undefined;
155
+ amendsActionId?: string | undefined;
156
+ idempotencyScope?: string | undefined;
157
+ idempotencyKey?: string | undefined;
158
+ evaluatedRisk?: ("low" | "medium" | "high" | "critical")[] | undefined;
159
+ status?: ("requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "failed" | "reversed" | "compensated" | "expired" | "cancelled" | "superseded")[] | undefined;
160
+ reversalKind?: ("compensate" | "none" | "revert" | "domain_command")[] | undefined;
161
+ reversalState?: ("requested" | "failed" | "expired" | "not_reversible" | "available" | "running" | "completed")[] | undefined;
162
+ reversalOutcome?: ("full" | "partial" | "failed")[] | undefined;
163
+ reversesActionId?: string | undefined;
164
+ reversedByActionId?: string | undefined;
165
+ sensitiveReasonCode?: string | undefined;
166
+ decisionPolicy?: string | undefined;
167
+ occurredAtFrom?: string | undefined;
168
+ occurredAtTo?: string | undefined;
169
+ cursorOccurredAt?: string | undefined;
170
+ cursorId?: string | undefined;
171
+ limit?: number | undefined;
172
+ }>>;
173
+ export type ActionLedgerEntryListQuery = z.infer<typeof actionLedgerEntryListQuerySchema>;
174
+ export declare const actionLedgerRelayOutboxListQuerySchema: z.ZodPipe<z.ZodObject<{
175
+ actionId: z.ZodOptional<z.ZodString>;
176
+ organizationId: z.ZodOptional<z.ZodString>;
177
+ relayStatus: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
178
+ succeeded: "succeeded";
179
+ failed: "failed";
180
+ pending: "pending";
181
+ processing: "processing";
182
+ dead_letter: "dead_letter";
183
+ }>>>>;
184
+ dueBefore: z.ZodOptional<z.ZodString>;
185
+ createdAtFrom: z.ZodOptional<z.ZodString>;
186
+ createdAtTo: z.ZodOptional<z.ZodString>;
187
+ processedAtFrom: z.ZodOptional<z.ZodString>;
188
+ processedAtTo: z.ZodOptional<z.ZodString>;
189
+ cursorCreatedAt: z.ZodOptional<z.ZodString>;
190
+ cursorId: z.ZodOptional<z.ZodString>;
191
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
192
+ }, z.core.$strip>, z.ZodTransform<{
193
+ dueBefore: Date | undefined;
194
+ createdAtFrom: Date | undefined;
195
+ createdAtTo: Date | undefined;
196
+ processedAtFrom: Date | undefined;
197
+ processedAtTo: Date | undefined;
198
+ cursor: {
199
+ createdAt: string;
200
+ id: string;
201
+ } | undefined;
202
+ actionId?: string | undefined;
203
+ organizationId?: string | undefined;
204
+ relayStatus?: ("succeeded" | "failed" | "pending" | "processing" | "dead_letter")[] | undefined;
205
+ limit?: number | undefined;
206
+ }, {
207
+ actionId?: string | undefined;
208
+ organizationId?: string | undefined;
209
+ relayStatus?: ("succeeded" | "failed" | "pending" | "processing" | "dead_letter")[] | undefined;
210
+ dueBefore?: string | undefined;
211
+ createdAtFrom?: string | undefined;
212
+ createdAtTo?: string | undefined;
213
+ processedAtFrom?: string | undefined;
214
+ processedAtTo?: string | undefined;
215
+ cursorCreatedAt?: string | undefined;
216
+ cursorId?: string | undefined;
217
+ limit?: number | undefined;
218
+ }>>;
219
+ export type ActionLedgerRelayOutboxListQuery = z.infer<typeof actionLedgerRelayOutboxListQuerySchema>;
220
+ export declare const actionApprovalListQuerySchema: z.ZodPipe<z.ZodObject<{
221
+ requestedActionId: z.ZodOptional<z.ZodString>;
222
+ status: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
223
+ approved: "approved";
224
+ denied: "denied";
225
+ expired: "expired";
226
+ cancelled: "cancelled";
227
+ superseded: "superseded";
228
+ pending: "pending";
229
+ }>>>>;
230
+ requestedByPrincipalId: z.ZodOptional<z.ZodString>;
231
+ assignedToPrincipalId: z.ZodOptional<z.ZodString>;
232
+ decidedByPrincipalId: z.ZodOptional<z.ZodString>;
233
+ delegatedFromPrincipalId: z.ZodOptional<z.ZodString>;
234
+ policyName: z.ZodOptional<z.ZodString>;
235
+ policyVersion: z.ZodOptional<z.ZodString>;
236
+ riskSnapshot: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodEnum<{
237
+ low: "low";
238
+ medium: "medium";
239
+ high: "high";
240
+ critical: "critical";
241
+ }>>>>;
242
+ reasonCode: z.ZodOptional<z.ZodString>;
243
+ expiresAtFrom: z.ZodOptional<z.ZodString>;
244
+ expiresAtTo: z.ZodOptional<z.ZodString>;
245
+ decidedAtFrom: z.ZodOptional<z.ZodString>;
246
+ decidedAtTo: z.ZodOptional<z.ZodString>;
247
+ createdAtFrom: z.ZodOptional<z.ZodString>;
248
+ createdAtTo: z.ZodOptional<z.ZodString>;
249
+ cursorCreatedAt: z.ZodOptional<z.ZodString>;
250
+ cursorId: z.ZodOptional<z.ZodString>;
251
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
252
+ }, z.core.$strip>, z.ZodTransform<{
253
+ expiresAtFrom: Date | undefined;
254
+ expiresAtTo: Date | undefined;
255
+ decidedAtFrom: Date | undefined;
256
+ decidedAtTo: Date | undefined;
257
+ createdAtFrom: Date | undefined;
258
+ createdAtTo: Date | undefined;
259
+ cursor: {
260
+ createdAt: string;
261
+ id: string;
262
+ } | undefined;
263
+ requestedActionId?: string | undefined;
264
+ status?: ("approved" | "denied" | "expired" | "cancelled" | "superseded" | "pending")[] | undefined;
265
+ requestedByPrincipalId?: string | undefined;
266
+ assignedToPrincipalId?: string | undefined;
267
+ decidedByPrincipalId?: string | undefined;
268
+ delegatedFromPrincipalId?: string | undefined;
269
+ policyName?: string | undefined;
270
+ policyVersion?: string | undefined;
271
+ riskSnapshot?: ("low" | "medium" | "high" | "critical")[] | undefined;
272
+ reasonCode?: string | undefined;
273
+ limit?: number | undefined;
274
+ }, {
275
+ requestedActionId?: string | undefined;
276
+ status?: ("approved" | "denied" | "expired" | "cancelled" | "superseded" | "pending")[] | undefined;
277
+ requestedByPrincipalId?: string | undefined;
278
+ assignedToPrincipalId?: string | undefined;
279
+ decidedByPrincipalId?: string | undefined;
280
+ delegatedFromPrincipalId?: string | undefined;
281
+ policyName?: string | undefined;
282
+ policyVersion?: string | undefined;
283
+ riskSnapshot?: ("low" | "medium" | "high" | "critical")[] | undefined;
284
+ reasonCode?: string | undefined;
285
+ expiresAtFrom?: string | undefined;
286
+ expiresAtTo?: string | undefined;
287
+ decidedAtFrom?: string | undefined;
288
+ decidedAtTo?: string | undefined;
289
+ createdAtFrom?: string | undefined;
290
+ createdAtTo?: string | undefined;
291
+ cursorCreatedAt?: string | undefined;
292
+ cursorId?: string | undefined;
293
+ limit?: number | undefined;
294
+ }>>;
295
+ export type ActionApprovalListQuery = z.infer<typeof actionApprovalListQuerySchema>;
296
+ export declare const requestActionApprovalBodySchema: z.ZodPipe<z.ZodObject<{
297
+ requestedAction: z.ZodObject<{
298
+ actionName: z.ZodString;
299
+ actionVersion: z.ZodDefault<z.ZodString>;
300
+ actionKind: z.ZodEnum<{
301
+ execute: "execute";
302
+ reverse: "reverse";
303
+ update: "update";
304
+ delete: "delete";
305
+ read: "read";
306
+ create: "create";
307
+ approve: "approve";
308
+ reject: "reject";
309
+ compensate: "compensate";
310
+ duplicate: "duplicate";
311
+ }>;
312
+ evaluatedRisk: z.ZodEnum<{
313
+ low: "low";
314
+ medium: "medium";
315
+ high: "high";
316
+ critical: "critical";
317
+ }>;
318
+ actorType: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
319
+ principalType: z.ZodEnum<{
320
+ user: "user";
321
+ api_key: "api_key";
322
+ agent: "agent";
323
+ workflow: "workflow";
324
+ system: "system";
325
+ }>;
326
+ principalId: z.ZodString;
327
+ principalSubtype: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
328
+ sessionId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
329
+ apiTokenId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
330
+ internalRequest: z.ZodDefault<z.ZodBoolean>;
331
+ delegatedByPrincipalType: z.ZodOptional<z.ZodEnum<{
332
+ user: "user";
333
+ api_key: "api_key";
334
+ agent: "agent";
335
+ workflow: "workflow";
336
+ system: "system";
337
+ }>>;
338
+ delegatedByPrincipalId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
339
+ delegationId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
340
+ callerType: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
341
+ organizationId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
342
+ routeOrToolName: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
343
+ workflowRunId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
344
+ workflowStepId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
345
+ correlationId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
346
+ causationActionId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
347
+ idempotencyScope: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
348
+ idempotencyKey: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
349
+ idempotencyFingerprint: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
350
+ targetType: z.ZodString;
351
+ targetId: z.ZodString;
352
+ capabilityId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
353
+ capabilityVersion: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
354
+ authorizationSource: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
355
+ amendsActionId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
356
+ }, z.core.$strip>;
357
+ approval: z.ZodObject<{
358
+ requestedByPrincipalId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
359
+ assignedToPrincipalId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
360
+ delegatedFromPrincipalId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
361
+ policyName: z.ZodString;
362
+ policyVersion: z.ZodString;
363
+ targetSnapshotRef: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
364
+ riskSnapshot: z.ZodOptional<z.ZodEnum<{
365
+ low: "low";
366
+ medium: "medium";
367
+ high: "high";
368
+ critical: "critical";
369
+ }>>;
370
+ reasonCode: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
371
+ expiresAt: z.ZodOptional<z.ZodString>;
372
+ }, z.core.$strip>;
373
+ }, z.core.$strip>, z.ZodTransform<{
374
+ approval: {
375
+ riskSnapshot: "low" | "medium" | "high" | "critical" | null;
376
+ expiresAt: Date | null;
377
+ requestedByPrincipalId: string | null;
378
+ assignedToPrincipalId: string | null;
379
+ delegatedFromPrincipalId: string | null;
380
+ policyName: string;
381
+ policyVersion: string;
382
+ targetSnapshotRef: string | null;
383
+ reasonCode: string | null;
384
+ };
385
+ requestedAction: {
386
+ actionName: string;
387
+ actionVersion: string;
388
+ actionKind: "execute" | "reverse" | "update" | "delete" | "read" | "create" | "approve" | "reject" | "compensate" | "duplicate";
389
+ evaluatedRisk: "low" | "medium" | "high" | "critical";
390
+ actorType: string | null;
391
+ principalType: "user" | "api_key" | "agent" | "workflow" | "system";
392
+ principalId: string;
393
+ principalSubtype: string | null;
394
+ sessionId: string | null;
395
+ apiTokenId: string | null;
396
+ internalRequest: boolean;
397
+ delegatedByPrincipalId: string | null;
398
+ delegationId: string | null;
399
+ callerType: string | null;
400
+ organizationId: string | null;
401
+ routeOrToolName: string | null;
402
+ workflowRunId: string | null;
403
+ workflowStepId: string | null;
404
+ correlationId: string | null;
405
+ causationActionId: string | null;
406
+ idempotencyScope: string | null;
407
+ idempotencyKey: string | null;
408
+ idempotencyFingerprint: string | null;
409
+ targetType: string;
410
+ targetId: string;
411
+ capabilityId: string | null;
412
+ capabilityVersion: string | null;
413
+ authorizationSource: string | null;
414
+ amendsActionId: string | null;
415
+ delegatedByPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
416
+ };
417
+ }, {
418
+ requestedAction: {
419
+ actionName: string;
420
+ actionVersion: string;
421
+ actionKind: "execute" | "reverse" | "update" | "delete" | "read" | "create" | "approve" | "reject" | "compensate" | "duplicate";
422
+ evaluatedRisk: "low" | "medium" | "high" | "critical";
423
+ actorType: string | null;
424
+ principalType: "user" | "api_key" | "agent" | "workflow" | "system";
425
+ principalId: string;
426
+ principalSubtype: string | null;
427
+ sessionId: string | null;
428
+ apiTokenId: string | null;
429
+ internalRequest: boolean;
430
+ delegatedByPrincipalId: string | null;
431
+ delegationId: string | null;
432
+ callerType: string | null;
433
+ organizationId: string | null;
434
+ routeOrToolName: string | null;
435
+ workflowRunId: string | null;
436
+ workflowStepId: string | null;
437
+ correlationId: string | null;
438
+ causationActionId: string | null;
439
+ idempotencyScope: string | null;
440
+ idempotencyKey: string | null;
441
+ idempotencyFingerprint: string | null;
442
+ targetType: string;
443
+ targetId: string;
444
+ capabilityId: string | null;
445
+ capabilityVersion: string | null;
446
+ authorizationSource: string | null;
447
+ amendsActionId: string | null;
448
+ delegatedByPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
449
+ };
450
+ approval: {
451
+ requestedByPrincipalId: string | null;
452
+ assignedToPrincipalId: string | null;
453
+ delegatedFromPrincipalId: string | null;
454
+ policyName: string;
455
+ policyVersion: string;
456
+ targetSnapshotRef: string | null;
457
+ reasonCode: string | null;
458
+ riskSnapshot?: "low" | "medium" | "high" | "critical" | undefined;
459
+ expiresAt?: string | undefined;
460
+ };
461
+ }>>;
462
+ export type RequestActionApprovalBody = z.infer<typeof requestActionApprovalBodySchema>;
463
+ export declare const decideActionApprovalBodySchema: z.ZodPipe<z.ZodObject<{
464
+ status: z.ZodEnum<{
465
+ approved: "approved";
466
+ denied: "denied";
467
+ expired: "expired";
468
+ cancelled: "cancelled";
469
+ superseded: "superseded";
470
+ }>;
471
+ decidedByPrincipalId: z.ZodString;
472
+ decidedAt: z.ZodOptional<z.ZodString>;
473
+ decisionAction: z.ZodObject<{
474
+ actionName: z.ZodString;
475
+ actionVersion: z.ZodDefault<z.ZodString>;
476
+ actorType: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
477
+ principalType: z.ZodEnum<{
478
+ user: "user";
479
+ api_key: "api_key";
480
+ agent: "agent";
481
+ workflow: "workflow";
482
+ system: "system";
483
+ }>;
484
+ principalId: z.ZodString;
485
+ principalSubtype: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
486
+ sessionId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
487
+ apiTokenId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
488
+ internalRequest: z.ZodDefault<z.ZodBoolean>;
489
+ delegatedByPrincipalType: z.ZodOptional<z.ZodEnum<{
490
+ user: "user";
491
+ api_key: "api_key";
492
+ agent: "agent";
493
+ workflow: "workflow";
494
+ system: "system";
495
+ }>>;
496
+ delegatedByPrincipalId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
497
+ delegationId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
498
+ callerType: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
499
+ organizationId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
500
+ routeOrToolName: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
501
+ workflowRunId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
502
+ workflowStepId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
503
+ correlationId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
504
+ idempotencyScope: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
505
+ idempotencyKey: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
506
+ idempotencyFingerprint: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
507
+ capabilityId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
508
+ capabilityVersion: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
509
+ authorizationSource: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
510
+ amendsActionId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
511
+ }, z.core.$strip>;
512
+ }, z.core.$strip>, z.ZodTransform<{
513
+ decidedAt: Date | undefined;
514
+ status: "approved" | "denied" | "expired" | "cancelled" | "superseded";
515
+ decidedByPrincipalId: string;
516
+ decisionAction: {
517
+ actionName: string;
518
+ actionVersion: string;
519
+ actorType: string | null;
520
+ principalType: "user" | "api_key" | "agent" | "workflow" | "system";
521
+ principalId: string;
522
+ principalSubtype: string | null;
523
+ sessionId: string | null;
524
+ apiTokenId: string | null;
525
+ internalRequest: boolean;
526
+ delegatedByPrincipalId: string | null;
527
+ delegationId: string | null;
528
+ callerType: string | null;
529
+ organizationId: string | null;
530
+ routeOrToolName: string | null;
531
+ workflowRunId: string | null;
532
+ workflowStepId: string | null;
533
+ correlationId: string | null;
534
+ idempotencyScope: string | null;
535
+ idempotencyKey: string | null;
536
+ idempotencyFingerprint: string | null;
537
+ capabilityId: string | null;
538
+ capabilityVersion: string | null;
539
+ authorizationSource: string | null;
540
+ amendsActionId: string | null;
541
+ delegatedByPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
542
+ };
543
+ }, {
544
+ status: "approved" | "denied" | "expired" | "cancelled" | "superseded";
545
+ decidedByPrincipalId: string;
546
+ decisionAction: {
547
+ actionName: string;
548
+ actionVersion: string;
549
+ actorType: string | null;
550
+ principalType: "user" | "api_key" | "agent" | "workflow" | "system";
551
+ principalId: string;
552
+ principalSubtype: string | null;
553
+ sessionId: string | null;
554
+ apiTokenId: string | null;
555
+ internalRequest: boolean;
556
+ delegatedByPrincipalId: string | null;
557
+ delegationId: string | null;
558
+ callerType: string | null;
559
+ organizationId: string | null;
560
+ routeOrToolName: string | null;
561
+ workflowRunId: string | null;
562
+ workflowStepId: string | null;
563
+ correlationId: string | null;
564
+ idempotencyScope: string | null;
565
+ idempotencyKey: string | null;
566
+ idempotencyFingerprint: string | null;
567
+ capabilityId: string | null;
568
+ capabilityVersion: string | null;
569
+ authorizationSource: string | null;
570
+ amendsActionId: string | null;
571
+ delegatedByPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
572
+ };
573
+ decidedAt?: string | undefined;
574
+ }>>;
575
+ export type DecideActionApprovalBody = z.infer<typeof decideActionApprovalBodySchema>;
576
+ export declare const recordActionLedgerReversalBodySchema: z.ZodObject<{
577
+ reversalAction: z.ZodObject<{
578
+ actionName: z.ZodString;
579
+ actionVersion: z.ZodDefault<z.ZodString>;
580
+ actionKind: z.ZodEnum<{
581
+ reverse: "reverse";
582
+ compensate: "compensate";
583
+ }>;
584
+ status: z.ZodEnum<{
585
+ failed: "failed";
586
+ reversed: "reversed";
587
+ compensated: "compensated";
588
+ }>;
589
+ evaluatedRisk: z.ZodDefault<z.ZodEnum<{
590
+ low: "low";
591
+ medium: "medium";
592
+ high: "high";
593
+ critical: "critical";
594
+ }>>;
595
+ actorType: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
596
+ principalType: z.ZodEnum<{
597
+ user: "user";
598
+ api_key: "api_key";
599
+ agent: "agent";
600
+ workflow: "workflow";
601
+ system: "system";
602
+ }>;
603
+ principalId: z.ZodString;
604
+ principalSubtype: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
605
+ sessionId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
606
+ apiTokenId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
607
+ internalRequest: z.ZodDefault<z.ZodBoolean>;
608
+ delegatedByPrincipalType: z.ZodOptional<z.ZodEnum<{
609
+ user: "user";
610
+ api_key: "api_key";
611
+ agent: "agent";
612
+ workflow: "workflow";
613
+ system: "system";
614
+ }>>;
615
+ delegatedByPrincipalId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
616
+ delegationId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
617
+ callerType: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
618
+ organizationId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
619
+ routeOrToolName: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
620
+ workflowRunId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
621
+ workflowStepId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
622
+ correlationId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
623
+ idempotencyScope: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
624
+ idempotencyKey: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
625
+ idempotencyFingerprint: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
626
+ targetType: z.ZodString;
627
+ targetId: z.ZodString;
628
+ capabilityId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
629
+ capabilityVersion: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
630
+ authorizationSource: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
631
+ approvalId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
632
+ amendsActionId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
633
+ mutationDetail: z.ZodOptional<z.ZodObject<{
634
+ commandInputRef: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
635
+ commandResultRef: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
636
+ summary: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
637
+ reversalKind: z.ZodDefault<z.ZodEnum<{
638
+ compensate: "compensate";
639
+ none: "none";
640
+ revert: "revert";
641
+ domain_command: "domain_command";
642
+ }>>;
643
+ reversalCommandId: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
644
+ reversalCommandVersion: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
645
+ reversalArgsRef: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | null, string | undefined>>;
646
+ }, z.core.$strip>>;
647
+ }, z.core.$strip>;
648
+ projection: z.ZodOptional<z.ZodObject<{
649
+ reversalState: z.ZodOptional<z.ZodEnum<{
650
+ requested: "requested";
651
+ failed: "failed";
652
+ expired: "expired";
653
+ not_reversible: "not_reversible";
654
+ available: "available";
655
+ running: "running";
656
+ completed: "completed";
657
+ }>>;
658
+ reversalOutcome: z.ZodOptional<z.ZodEnum<{
659
+ full: "full";
660
+ partial: "partial";
661
+ failed: "failed";
662
+ }>>;
663
+ }, z.core.$strip>>;
664
+ }, z.core.$strip>;
665
+ export type RecordActionLedgerReversalBody = z.infer<typeof recordActionLedgerReversalBodySchema>;
666
+ export declare const actionDelegationListQuerySchema: z.ZodPipe<z.ZodObject<{
667
+ rootPrincipalType: z.ZodOptional<z.ZodEnum<{
668
+ user: "user";
669
+ api_key: "api_key";
670
+ agent: "agent";
671
+ workflow: "workflow";
672
+ system: "system";
673
+ }>>;
674
+ rootPrincipalId: z.ZodOptional<z.ZodString>;
675
+ parentPrincipalType: z.ZodOptional<z.ZodEnum<{
676
+ user: "user";
677
+ api_key: "api_key";
678
+ agent: "agent";
679
+ workflow: "workflow";
680
+ system: "system";
681
+ }>>;
682
+ parentPrincipalId: z.ZodOptional<z.ZodString>;
683
+ childPrincipalType: z.ZodOptional<z.ZodEnum<{
684
+ user: "user";
685
+ api_key: "api_key";
686
+ agent: "agent";
687
+ workflow: "workflow";
688
+ system: "system";
689
+ }>>;
690
+ childPrincipalId: z.ZodOptional<z.ZodString>;
691
+ grantSource: z.ZodOptional<z.ZodString>;
692
+ capabilityScopeRef: z.ZodOptional<z.ZodString>;
693
+ budgetScopeRef: z.ZodOptional<z.ZodString>;
694
+ expiresAtFrom: z.ZodOptional<z.ZodString>;
695
+ expiresAtTo: z.ZodOptional<z.ZodString>;
696
+ createdAtFrom: z.ZodOptional<z.ZodString>;
697
+ createdAtTo: z.ZodOptional<z.ZodString>;
698
+ cursorCreatedAt: z.ZodOptional<z.ZodString>;
699
+ cursorId: z.ZodOptional<z.ZodString>;
700
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
701
+ }, z.core.$strip>, z.ZodTransform<{
702
+ expiresAtFrom: Date | undefined;
703
+ expiresAtTo: Date | undefined;
704
+ createdAtFrom: Date | undefined;
705
+ createdAtTo: Date | undefined;
706
+ cursor: {
707
+ createdAt: string;
708
+ id: string;
709
+ } | undefined;
710
+ rootPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
711
+ rootPrincipalId?: string | undefined;
712
+ parentPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
713
+ parentPrincipalId?: string | undefined;
714
+ childPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
715
+ childPrincipalId?: string | undefined;
716
+ grantSource?: string | undefined;
717
+ capabilityScopeRef?: string | undefined;
718
+ budgetScopeRef?: string | undefined;
719
+ limit?: number | undefined;
720
+ }, {
721
+ rootPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
722
+ rootPrincipalId?: string | undefined;
723
+ parentPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
724
+ parentPrincipalId?: string | undefined;
725
+ childPrincipalType?: "user" | "api_key" | "agent" | "workflow" | "system" | undefined;
726
+ childPrincipalId?: string | undefined;
727
+ grantSource?: string | undefined;
728
+ capabilityScopeRef?: string | undefined;
729
+ budgetScopeRef?: string | undefined;
730
+ expiresAtFrom?: string | undefined;
731
+ expiresAtTo?: string | undefined;
732
+ createdAtFrom?: string | undefined;
733
+ createdAtTo?: string | undefined;
734
+ cursorCreatedAt?: string | undefined;
735
+ cursorId?: string | undefined;
736
+ limit?: number | undefined;
737
+ }>>;
738
+ export type ActionDelegationListQuery = z.infer<typeof actionDelegationListQuerySchema>;
739
+ //# sourceMappingURL=route-schemas.d.ts.map