@voyant-travel/action-ledger 0.104.10

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