@voyantjs/finance-react 0.52.1 → 0.52.3

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 (40) hide show
  1. package/dist/hooks/index.d.ts +1 -0
  2. package/dist/hooks/index.d.ts.map +1 -1
  3. package/dist/hooks/index.js +1 -0
  4. package/dist/hooks/use-admin-booking-payments.d.ts +1 -1
  5. package/dist/hooks/use-booking-guarantees.d.ts +6 -6
  6. package/dist/hooks/use-booking-payment-schedules.d.ts +3 -3
  7. package/dist/hooks/use-finance-action-ledger.d.ts +94 -0
  8. package/dist/hooks/use-finance-action-ledger.d.ts.map +1 -0
  9. package/dist/hooks/use-finance-action-ledger.js +20 -0
  10. package/dist/hooks/use-invoice-mutation.d.ts +72 -0
  11. package/dist/hooks/use-invoice-mutation.d.ts.map +1 -1
  12. package/dist/hooks/use-invoice-mutation.js +59 -1
  13. package/dist/hooks/use-public-booking-documents.d.ts +2 -2
  14. package/dist/hooks/use-public-booking-payment-options.d.ts +3 -3
  15. package/dist/hooks/use-public-booking-payments.d.ts +1 -1
  16. package/dist/hooks/use-public-finance-document-by-reference.d.ts +2 -2
  17. package/dist/hooks/use-public-payment-session-mutation.d.ts +2 -2
  18. package/dist/hooks/use-public-payment-session.d.ts +2 -2
  19. package/dist/hooks/use-voucher-mutation.d.ts +3 -3
  20. package/dist/hooks/use-voucher.d.ts +1 -1
  21. package/dist/hooks/use-vouchers.d.ts +1 -1
  22. package/dist/index.d.ts +3 -3
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +2 -2
  25. package/dist/operations.d.ts +112 -15
  26. package/dist/operations.d.ts.map +1 -1
  27. package/dist/operations.js +14 -1
  28. package/dist/query-keys.d.ts +11 -0
  29. package/dist/query-keys.d.ts.map +1 -1
  30. package/dist/query-keys.js +2 -0
  31. package/dist/query-options-action-ledger.d.ts +382 -0
  32. package/dist/query-options-action-ledger.d.ts.map +1 -0
  33. package/dist/query-options-action-ledger.js +36 -0
  34. package/dist/query-options.d.ts +65 -64
  35. package/dist/query-options.d.ts.map +1 -1
  36. package/dist/query-options.js +1 -0
  37. package/dist/schemas.d.ts +245 -41
  38. package/dist/schemas.d.ts.map +1 -1
  39. package/dist/schemas.js +83 -1
  40. package/package.json +5 -5
@@ -0,0 +1,382 @@
1
+ import type { FetchWithValidationOptions } from "./client.js";
2
+ import { type FinanceActionLedgerListInput } from "./operations.js";
3
+ export interface UseFinanceActionLedgerOptions extends FinanceActionLedgerListInput {
4
+ enabled?: boolean;
5
+ }
6
+ export declare function getInvoiceActionLedgerQueryOptions(client: FetchWithValidationOptions, invoiceId: string | null | undefined, options?: UseFinanceActionLedgerOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
7
+ data: {
8
+ id: string;
9
+ occurredAt: string;
10
+ actionName: string;
11
+ actionVersion: string;
12
+ actionKind: "reverse" | "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "compensate" | "duplicate";
13
+ status: "failed" | "cancelled" | "expired" | "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "reversed" | "compensated" | "superseded";
14
+ evaluatedRisk: "high" | "low" | "medium" | "critical";
15
+ actorType: string | null;
16
+ principalType: "agent" | "user" | "api_key" | "workflow" | "system";
17
+ principalId: string;
18
+ principalSubtype: string | null;
19
+ sessionId: string | null;
20
+ apiTokenId: string | null;
21
+ internalRequest: boolean;
22
+ delegatedByPrincipalType: "agent" | "user" | "api_key" | "workflow" | "system" | null;
23
+ delegatedByPrincipalId: string | null;
24
+ delegationId: string | null;
25
+ callerType: string | null;
26
+ organizationId: string | null;
27
+ routeOrToolName: string | null;
28
+ workflowRunId: string | null;
29
+ workflowStepId: string | null;
30
+ correlationId: string | null;
31
+ causationActionId: string | null;
32
+ idempotencyScope: string | null;
33
+ idempotencyKey: string | null;
34
+ idempotencyFingerprint: string | null;
35
+ targetType: string;
36
+ targetId: string;
37
+ capabilityId: string | null;
38
+ capabilityVersion: string | null;
39
+ authorizationSource: string | null;
40
+ approvalId: string | null;
41
+ amendsActionId: string | null;
42
+ createdAt: string;
43
+ mutationSummary: string | null;
44
+ }[];
45
+ pageInfo: {
46
+ nextCursor: {
47
+ occurredAt: string;
48
+ id: string;
49
+ } | null;
50
+ };
51
+ }, Error, {
52
+ data: {
53
+ id: string;
54
+ occurredAt: string;
55
+ actionName: string;
56
+ actionVersion: string;
57
+ actionKind: "reverse" | "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "compensate" | "duplicate";
58
+ status: "failed" | "cancelled" | "expired" | "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "reversed" | "compensated" | "superseded";
59
+ evaluatedRisk: "high" | "low" | "medium" | "critical";
60
+ actorType: string | null;
61
+ principalType: "agent" | "user" | "api_key" | "workflow" | "system";
62
+ principalId: string;
63
+ principalSubtype: string | null;
64
+ sessionId: string | null;
65
+ apiTokenId: string | null;
66
+ internalRequest: boolean;
67
+ delegatedByPrincipalType: "agent" | "user" | "api_key" | "workflow" | "system" | null;
68
+ delegatedByPrincipalId: string | null;
69
+ delegationId: string | null;
70
+ callerType: string | null;
71
+ organizationId: string | null;
72
+ routeOrToolName: string | null;
73
+ workflowRunId: string | null;
74
+ workflowStepId: string | null;
75
+ correlationId: string | null;
76
+ causationActionId: string | null;
77
+ idempotencyScope: string | null;
78
+ idempotencyKey: string | null;
79
+ idempotencyFingerprint: string | null;
80
+ targetType: string;
81
+ targetId: string;
82
+ capabilityId: string | null;
83
+ capabilityVersion: string | null;
84
+ authorizationSource: string | null;
85
+ approvalId: string | null;
86
+ amendsActionId: string | null;
87
+ createdAt: string;
88
+ mutationSummary: string | null;
89
+ }[];
90
+ pageInfo: {
91
+ nextCursor: {
92
+ occurredAt: string;
93
+ id: string;
94
+ } | null;
95
+ };
96
+ }, readonly ["voyant", "finance", "invoices", "detail", string, "action-ledger", import("./query-keys.js").FinanceActionLedgerListFilters]>, "queryFn"> & {
97
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
98
+ data: {
99
+ id: string;
100
+ occurredAt: string;
101
+ actionName: string;
102
+ actionVersion: string;
103
+ actionKind: "reverse" | "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "compensate" | "duplicate";
104
+ status: "failed" | "cancelled" | "expired" | "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "reversed" | "compensated" | "superseded";
105
+ evaluatedRisk: "high" | "low" | "medium" | "critical";
106
+ actorType: string | null;
107
+ principalType: "agent" | "user" | "api_key" | "workflow" | "system";
108
+ principalId: string;
109
+ principalSubtype: string | null;
110
+ sessionId: string | null;
111
+ apiTokenId: string | null;
112
+ internalRequest: boolean;
113
+ delegatedByPrincipalType: "agent" | "user" | "api_key" | "workflow" | "system" | null;
114
+ delegatedByPrincipalId: string | null;
115
+ delegationId: string | null;
116
+ callerType: string | null;
117
+ organizationId: string | null;
118
+ routeOrToolName: string | null;
119
+ workflowRunId: string | null;
120
+ workflowStepId: string | null;
121
+ correlationId: string | null;
122
+ causationActionId: string | null;
123
+ idempotencyScope: string | null;
124
+ idempotencyKey: string | null;
125
+ idempotencyFingerprint: string | null;
126
+ targetType: string;
127
+ targetId: string;
128
+ capabilityId: string | null;
129
+ capabilityVersion: string | null;
130
+ authorizationSource: string | null;
131
+ approvalId: string | null;
132
+ amendsActionId: string | null;
133
+ createdAt: string;
134
+ mutationSummary: string | null;
135
+ }[];
136
+ pageInfo: {
137
+ nextCursor: {
138
+ occurredAt: string;
139
+ id: string;
140
+ } | null;
141
+ };
142
+ }, readonly ["voyant", "finance", "invoices", "detail", string, "action-ledger", import("./query-keys.js").FinanceActionLedgerListFilters], never> | undefined;
143
+ } & {
144
+ queryKey: readonly ["voyant", "finance", "invoices", "detail", string, "action-ledger", import("./query-keys.js").FinanceActionLedgerListFilters] & {
145
+ [dataTagSymbol]: {
146
+ data: {
147
+ id: string;
148
+ occurredAt: string;
149
+ actionName: string;
150
+ actionVersion: string;
151
+ actionKind: "reverse" | "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "compensate" | "duplicate";
152
+ status: "failed" | "cancelled" | "expired" | "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "reversed" | "compensated" | "superseded";
153
+ evaluatedRisk: "high" | "low" | "medium" | "critical";
154
+ actorType: string | null;
155
+ principalType: "agent" | "user" | "api_key" | "workflow" | "system";
156
+ principalId: string;
157
+ principalSubtype: string | null;
158
+ sessionId: string | null;
159
+ apiTokenId: string | null;
160
+ internalRequest: boolean;
161
+ delegatedByPrincipalType: "agent" | "user" | "api_key" | "workflow" | "system" | null;
162
+ delegatedByPrincipalId: string | null;
163
+ delegationId: string | null;
164
+ callerType: string | null;
165
+ organizationId: string | null;
166
+ routeOrToolName: string | null;
167
+ workflowRunId: string | null;
168
+ workflowStepId: string | null;
169
+ correlationId: string | null;
170
+ causationActionId: string | null;
171
+ idempotencyScope: string | null;
172
+ idempotencyKey: string | null;
173
+ idempotencyFingerprint: string | null;
174
+ targetType: string;
175
+ targetId: string;
176
+ capabilityId: string | null;
177
+ capabilityVersion: string | null;
178
+ authorizationSource: string | null;
179
+ approvalId: string | null;
180
+ amendsActionId: string | null;
181
+ createdAt: string;
182
+ mutationSummary: string | null;
183
+ }[];
184
+ pageInfo: {
185
+ nextCursor: {
186
+ occurredAt: string;
187
+ id: string;
188
+ } | null;
189
+ };
190
+ };
191
+ [dataTagErrorSymbol]: Error;
192
+ };
193
+ };
194
+ export declare function getPaymentSessionActionLedgerQueryOptions(client: FetchWithValidationOptions, paymentSessionId: string | null | undefined, options?: UseFinanceActionLedgerOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
195
+ data: {
196
+ id: string;
197
+ occurredAt: string;
198
+ actionName: string;
199
+ actionVersion: string;
200
+ actionKind: "reverse" | "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "compensate" | "duplicate";
201
+ status: "failed" | "cancelled" | "expired" | "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "reversed" | "compensated" | "superseded";
202
+ evaluatedRisk: "high" | "low" | "medium" | "critical";
203
+ actorType: string | null;
204
+ principalType: "agent" | "user" | "api_key" | "workflow" | "system";
205
+ principalId: string;
206
+ principalSubtype: string | null;
207
+ sessionId: string | null;
208
+ apiTokenId: string | null;
209
+ internalRequest: boolean;
210
+ delegatedByPrincipalType: "agent" | "user" | "api_key" | "workflow" | "system" | null;
211
+ delegatedByPrincipalId: string | null;
212
+ delegationId: string | null;
213
+ callerType: string | null;
214
+ organizationId: string | null;
215
+ routeOrToolName: string | null;
216
+ workflowRunId: string | null;
217
+ workflowStepId: string | null;
218
+ correlationId: string | null;
219
+ causationActionId: string | null;
220
+ idempotencyScope: string | null;
221
+ idempotencyKey: string | null;
222
+ idempotencyFingerprint: string | null;
223
+ targetType: string;
224
+ targetId: string;
225
+ capabilityId: string | null;
226
+ capabilityVersion: string | null;
227
+ authorizationSource: string | null;
228
+ approvalId: string | null;
229
+ amendsActionId: string | null;
230
+ createdAt: string;
231
+ mutationSummary: string | null;
232
+ }[];
233
+ pageInfo: {
234
+ nextCursor: {
235
+ occurredAt: string;
236
+ id: string;
237
+ } | null;
238
+ };
239
+ }, Error, {
240
+ data: {
241
+ id: string;
242
+ occurredAt: string;
243
+ actionName: string;
244
+ actionVersion: string;
245
+ actionKind: "reverse" | "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "compensate" | "duplicate";
246
+ status: "failed" | "cancelled" | "expired" | "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "reversed" | "compensated" | "superseded";
247
+ evaluatedRisk: "high" | "low" | "medium" | "critical";
248
+ actorType: string | null;
249
+ principalType: "agent" | "user" | "api_key" | "workflow" | "system";
250
+ principalId: string;
251
+ principalSubtype: string | null;
252
+ sessionId: string | null;
253
+ apiTokenId: string | null;
254
+ internalRequest: boolean;
255
+ delegatedByPrincipalType: "agent" | "user" | "api_key" | "workflow" | "system" | null;
256
+ delegatedByPrincipalId: string | null;
257
+ delegationId: string | null;
258
+ callerType: string | null;
259
+ organizationId: string | null;
260
+ routeOrToolName: string | null;
261
+ workflowRunId: string | null;
262
+ workflowStepId: string | null;
263
+ correlationId: string | null;
264
+ causationActionId: string | null;
265
+ idempotencyScope: string | null;
266
+ idempotencyKey: string | null;
267
+ idempotencyFingerprint: string | null;
268
+ targetType: string;
269
+ targetId: string;
270
+ capabilityId: string | null;
271
+ capabilityVersion: string | null;
272
+ authorizationSource: string | null;
273
+ approvalId: string | null;
274
+ amendsActionId: string | null;
275
+ createdAt: string;
276
+ mutationSummary: string | null;
277
+ }[];
278
+ pageInfo: {
279
+ nextCursor: {
280
+ occurredAt: string;
281
+ id: string;
282
+ } | null;
283
+ };
284
+ }, readonly ["voyant", "finance", "payment-sessions", string, "action-ledger", import("./query-keys.js").FinanceActionLedgerListFilters]>, "queryFn"> & {
285
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
286
+ data: {
287
+ id: string;
288
+ occurredAt: string;
289
+ actionName: string;
290
+ actionVersion: string;
291
+ actionKind: "reverse" | "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "compensate" | "duplicate";
292
+ status: "failed" | "cancelled" | "expired" | "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "reversed" | "compensated" | "superseded";
293
+ evaluatedRisk: "high" | "low" | "medium" | "critical";
294
+ actorType: string | null;
295
+ principalType: "agent" | "user" | "api_key" | "workflow" | "system";
296
+ principalId: string;
297
+ principalSubtype: string | null;
298
+ sessionId: string | null;
299
+ apiTokenId: string | null;
300
+ internalRequest: boolean;
301
+ delegatedByPrincipalType: "agent" | "user" | "api_key" | "workflow" | "system" | null;
302
+ delegatedByPrincipalId: string | null;
303
+ delegationId: string | null;
304
+ callerType: string | null;
305
+ organizationId: string | null;
306
+ routeOrToolName: string | null;
307
+ workflowRunId: string | null;
308
+ workflowStepId: string | null;
309
+ correlationId: string | null;
310
+ causationActionId: string | null;
311
+ idempotencyScope: string | null;
312
+ idempotencyKey: string | null;
313
+ idempotencyFingerprint: string | null;
314
+ targetType: string;
315
+ targetId: string;
316
+ capabilityId: string | null;
317
+ capabilityVersion: string | null;
318
+ authorizationSource: string | null;
319
+ approvalId: string | null;
320
+ amendsActionId: string | null;
321
+ createdAt: string;
322
+ mutationSummary: string | null;
323
+ }[];
324
+ pageInfo: {
325
+ nextCursor: {
326
+ occurredAt: string;
327
+ id: string;
328
+ } | null;
329
+ };
330
+ }, readonly ["voyant", "finance", "payment-sessions", string, "action-ledger", import("./query-keys.js").FinanceActionLedgerListFilters], never> | undefined;
331
+ } & {
332
+ queryKey: readonly ["voyant", "finance", "payment-sessions", string, "action-ledger", import("./query-keys.js").FinanceActionLedgerListFilters] & {
333
+ [dataTagSymbol]: {
334
+ data: {
335
+ id: string;
336
+ occurredAt: string;
337
+ actionName: string;
338
+ actionVersion: string;
339
+ actionKind: "reverse" | "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "compensate" | "duplicate";
340
+ status: "failed" | "cancelled" | "expired" | "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "reversed" | "compensated" | "superseded";
341
+ evaluatedRisk: "high" | "low" | "medium" | "critical";
342
+ actorType: string | null;
343
+ principalType: "agent" | "user" | "api_key" | "workflow" | "system";
344
+ principalId: string;
345
+ principalSubtype: string | null;
346
+ sessionId: string | null;
347
+ apiTokenId: string | null;
348
+ internalRequest: boolean;
349
+ delegatedByPrincipalType: "agent" | "user" | "api_key" | "workflow" | "system" | null;
350
+ delegatedByPrincipalId: string | null;
351
+ delegationId: string | null;
352
+ callerType: string | null;
353
+ organizationId: string | null;
354
+ routeOrToolName: string | null;
355
+ workflowRunId: string | null;
356
+ workflowStepId: string | null;
357
+ correlationId: string | null;
358
+ causationActionId: string | null;
359
+ idempotencyScope: string | null;
360
+ idempotencyKey: string | null;
361
+ idempotencyFingerprint: string | null;
362
+ targetType: string;
363
+ targetId: string;
364
+ capabilityId: string | null;
365
+ capabilityVersion: string | null;
366
+ authorizationSource: string | null;
367
+ approvalId: string | null;
368
+ amendsActionId: string | null;
369
+ createdAt: string;
370
+ mutationSummary: string | null;
371
+ }[];
372
+ pageInfo: {
373
+ nextCursor: {
374
+ occurredAt: string;
375
+ id: string;
376
+ } | null;
377
+ };
378
+ };
379
+ [dataTagErrorSymbol]: Error;
380
+ };
381
+ };
382
+ //# sourceMappingURL=query-options-action-ledger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-options-action-ledger.d.ts","sourceRoot":"","sources":["../src/query-options-action-ledger.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAC7D,OAAO,EACL,KAAK,4BAA4B,EAGlC,MAAM,iBAAiB,CAAA;AAGxB,MAAM,WAAW,6BAA8B,SAAQ,4BAA4B;IACjF,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,6BAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkB5C;AAED,wBAAgB,yCAAyC,CACvD,MAAM,EAAE,0BAA0B,EAClC,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC3C,OAAO,GAAE,6BAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkB5C"}
@@ -0,0 +1,36 @@
1
+ "use client";
2
+ import { queryOptions } from "@tanstack/react-query";
3
+ import { listInvoiceActionLedger, listPaymentSessionActionLedger, } from "./operations.js";
4
+ import { financeQueryKeys } from "./query-keys.js";
5
+ export function getInvoiceActionLedgerQueryOptions(client, invoiceId, options = {}) {
6
+ const { enabled: _enabled = true, ...ledgerOptions } = options;
7
+ return queryOptions({
8
+ queryKey: financeQueryKeys.invoiceActionLedger(invoiceId ?? "", {
9
+ cursorOccurredAt: ledgerOptions.cursor?.occurredAt,
10
+ cursorId: ledgerOptions.cursor?.id,
11
+ limit: ledgerOptions.limit,
12
+ }),
13
+ queryFn: async () => {
14
+ if (!invoiceId) {
15
+ throw new Error("getInvoiceActionLedgerQueryOptions requires an invoiceId");
16
+ }
17
+ return listInvoiceActionLedger(client, invoiceId, ledgerOptions);
18
+ },
19
+ });
20
+ }
21
+ export function getPaymentSessionActionLedgerQueryOptions(client, paymentSessionId, options = {}) {
22
+ const { enabled: _enabled = true, ...ledgerOptions } = options;
23
+ return queryOptions({
24
+ queryKey: financeQueryKeys.paymentSessionActionLedger(paymentSessionId ?? "", {
25
+ cursorOccurredAt: ledgerOptions.cursor?.occurredAt,
26
+ cursorId: ledgerOptions.cursor?.id,
27
+ limit: ledgerOptions.limit,
28
+ }),
29
+ queryFn: async () => {
30
+ if (!paymentSessionId) {
31
+ throw new Error("getPaymentSessionActionLedgerQueryOptions requires a paymentSessionId");
32
+ }
33
+ return listPaymentSessionActionLedger(client, paymentSessionId, ledgerOptions);
34
+ },
35
+ });
36
+ }