@voyantjs/transactions-react 0.2.0

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,524 @@
1
+ import { type FetchWithValidationOptions } from "./client.js";
2
+ import type { UseOffersOptions } from "./hooks/use-offers.js";
3
+ import type { UseOrdersOptions } from "./hooks/use-orders.js";
4
+ export declare function getOffersQueryOptions(client: FetchWithValidationOptions, options?: UseOffersOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
5
+ data: {
6
+ offerNumber: string;
7
+ title: string;
8
+ status: "draft" | "published" | "sent" | "accepted" | "expired" | "withdrawn" | "converted";
9
+ currency: string;
10
+ id: string;
11
+ personId: string | null;
12
+ organizationId: string | null;
13
+ opportunityId: string | null;
14
+ quoteId: string | null;
15
+ marketId: string | null;
16
+ sourceChannelId: string | null;
17
+ baseCurrency: string | null;
18
+ fxRateSetId: string | null;
19
+ subtotalAmountCents: number;
20
+ taxAmountCents: number;
21
+ feeAmountCents: number;
22
+ totalAmountCents: number;
23
+ costAmountCents: number;
24
+ validFrom: string | null;
25
+ validUntil: string | null;
26
+ sentAt: string | null;
27
+ acceptedAt: string | null;
28
+ convertedAt: string | null;
29
+ notes: string | null;
30
+ createdAt: string;
31
+ updatedAt: string;
32
+ metadata?: Record<string, unknown> | null | undefined;
33
+ }[];
34
+ total: number;
35
+ limit: number;
36
+ offset: number;
37
+ }, Error, {
38
+ data: {
39
+ offerNumber: string;
40
+ title: string;
41
+ status: "draft" | "published" | "sent" | "accepted" | "expired" | "withdrawn" | "converted";
42
+ currency: string;
43
+ id: string;
44
+ personId: string | null;
45
+ organizationId: string | null;
46
+ opportunityId: string | null;
47
+ quoteId: string | null;
48
+ marketId: string | null;
49
+ sourceChannelId: string | null;
50
+ baseCurrency: string | null;
51
+ fxRateSetId: string | null;
52
+ subtotalAmountCents: number;
53
+ taxAmountCents: number;
54
+ feeAmountCents: number;
55
+ totalAmountCents: number;
56
+ costAmountCents: number;
57
+ validFrom: string | null;
58
+ validUntil: string | null;
59
+ sentAt: string | null;
60
+ acceptedAt: string | null;
61
+ convertedAt: string | null;
62
+ notes: string | null;
63
+ createdAt: string;
64
+ updatedAt: string;
65
+ metadata?: Record<string, unknown> | null | undefined;
66
+ }[];
67
+ total: number;
68
+ limit: number;
69
+ offset: number;
70
+ }, readonly ["transactions", "offers", import("./query-keys.js").OffersListFilters]>, "queryFn"> & {
71
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
72
+ data: {
73
+ offerNumber: string;
74
+ title: string;
75
+ status: "draft" | "published" | "sent" | "accepted" | "expired" | "withdrawn" | "converted";
76
+ currency: string;
77
+ id: string;
78
+ personId: string | null;
79
+ organizationId: string | null;
80
+ opportunityId: string | null;
81
+ quoteId: string | null;
82
+ marketId: string | null;
83
+ sourceChannelId: string | null;
84
+ baseCurrency: string | null;
85
+ fxRateSetId: string | null;
86
+ subtotalAmountCents: number;
87
+ taxAmountCents: number;
88
+ feeAmountCents: number;
89
+ totalAmountCents: number;
90
+ costAmountCents: number;
91
+ validFrom: string | null;
92
+ validUntil: string | null;
93
+ sentAt: string | null;
94
+ acceptedAt: string | null;
95
+ convertedAt: string | null;
96
+ notes: string | null;
97
+ createdAt: string;
98
+ updatedAt: string;
99
+ metadata?: Record<string, unknown> | null | undefined;
100
+ }[];
101
+ total: number;
102
+ limit: number;
103
+ offset: number;
104
+ }, readonly ["transactions", "offers", import("./query-keys.js").OffersListFilters], never> | undefined;
105
+ } & {
106
+ queryKey: readonly ["transactions", "offers", import("./query-keys.js").OffersListFilters] & {
107
+ [dataTagSymbol]: {
108
+ data: {
109
+ offerNumber: string;
110
+ title: string;
111
+ status: "draft" | "published" | "sent" | "accepted" | "expired" | "withdrawn" | "converted";
112
+ currency: string;
113
+ id: string;
114
+ personId: string | null;
115
+ organizationId: string | null;
116
+ opportunityId: string | null;
117
+ quoteId: string | null;
118
+ marketId: string | null;
119
+ sourceChannelId: string | null;
120
+ baseCurrency: string | null;
121
+ fxRateSetId: string | null;
122
+ subtotalAmountCents: number;
123
+ taxAmountCents: number;
124
+ feeAmountCents: number;
125
+ totalAmountCents: number;
126
+ costAmountCents: number;
127
+ validFrom: string | null;
128
+ validUntil: string | null;
129
+ sentAt: string | null;
130
+ acceptedAt: string | null;
131
+ convertedAt: string | null;
132
+ notes: string | null;
133
+ createdAt: string;
134
+ updatedAt: string;
135
+ metadata?: Record<string, unknown> | null | undefined;
136
+ }[];
137
+ total: number;
138
+ limit: number;
139
+ offset: number;
140
+ };
141
+ [dataTagErrorSymbol]: Error;
142
+ };
143
+ };
144
+ export declare function getOfferQueryOptions(client: FetchWithValidationOptions, id: string): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
145
+ offerNumber: string;
146
+ title: string;
147
+ status: "draft" | "published" | "sent" | "accepted" | "expired" | "withdrawn" | "converted";
148
+ currency: string;
149
+ id: string;
150
+ personId: string | null;
151
+ organizationId: string | null;
152
+ opportunityId: string | null;
153
+ quoteId: string | null;
154
+ marketId: string | null;
155
+ sourceChannelId: string | null;
156
+ baseCurrency: string | null;
157
+ fxRateSetId: string | null;
158
+ subtotalAmountCents: number;
159
+ taxAmountCents: number;
160
+ feeAmountCents: number;
161
+ totalAmountCents: number;
162
+ costAmountCents: number;
163
+ validFrom: string | null;
164
+ validUntil: string | null;
165
+ sentAt: string | null;
166
+ acceptedAt: string | null;
167
+ convertedAt: string | null;
168
+ notes: string | null;
169
+ createdAt: string;
170
+ updatedAt: string;
171
+ metadata?: Record<string, unknown> | null | undefined;
172
+ }, Error, {
173
+ offerNumber: string;
174
+ title: string;
175
+ status: "draft" | "published" | "sent" | "accepted" | "expired" | "withdrawn" | "converted";
176
+ currency: string;
177
+ id: string;
178
+ personId: string | null;
179
+ organizationId: string | null;
180
+ opportunityId: string | null;
181
+ quoteId: string | null;
182
+ marketId: string | null;
183
+ sourceChannelId: string | null;
184
+ baseCurrency: string | null;
185
+ fxRateSetId: string | null;
186
+ subtotalAmountCents: number;
187
+ taxAmountCents: number;
188
+ feeAmountCents: number;
189
+ totalAmountCents: number;
190
+ costAmountCents: number;
191
+ validFrom: string | null;
192
+ validUntil: string | null;
193
+ sentAt: string | null;
194
+ acceptedAt: string | null;
195
+ convertedAt: string | null;
196
+ notes: string | null;
197
+ createdAt: string;
198
+ updatedAt: string;
199
+ metadata?: Record<string, unknown> | null | undefined;
200
+ }, readonly ["transactions", "offers", string]>, "queryFn"> & {
201
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
202
+ offerNumber: string;
203
+ title: string;
204
+ status: "draft" | "published" | "sent" | "accepted" | "expired" | "withdrawn" | "converted";
205
+ currency: string;
206
+ id: string;
207
+ personId: string | null;
208
+ organizationId: string | null;
209
+ opportunityId: string | null;
210
+ quoteId: string | null;
211
+ marketId: string | null;
212
+ sourceChannelId: string | null;
213
+ baseCurrency: string | null;
214
+ fxRateSetId: string | null;
215
+ subtotalAmountCents: number;
216
+ taxAmountCents: number;
217
+ feeAmountCents: number;
218
+ totalAmountCents: number;
219
+ costAmountCents: number;
220
+ validFrom: string | null;
221
+ validUntil: string | null;
222
+ sentAt: string | null;
223
+ acceptedAt: string | null;
224
+ convertedAt: string | null;
225
+ notes: string | null;
226
+ createdAt: string;
227
+ updatedAt: string;
228
+ metadata?: Record<string, unknown> | null | undefined;
229
+ }, readonly ["transactions", "offers", string], never> | undefined;
230
+ } & {
231
+ queryKey: readonly ["transactions", "offers", string] & {
232
+ [dataTagSymbol]: {
233
+ offerNumber: string;
234
+ title: string;
235
+ status: "draft" | "published" | "sent" | "accepted" | "expired" | "withdrawn" | "converted";
236
+ currency: string;
237
+ id: string;
238
+ personId: string | null;
239
+ organizationId: string | null;
240
+ opportunityId: string | null;
241
+ quoteId: string | null;
242
+ marketId: string | null;
243
+ sourceChannelId: string | null;
244
+ baseCurrency: string | null;
245
+ fxRateSetId: string | null;
246
+ subtotalAmountCents: number;
247
+ taxAmountCents: number;
248
+ feeAmountCents: number;
249
+ totalAmountCents: number;
250
+ costAmountCents: number;
251
+ validFrom: string | null;
252
+ validUntil: string | null;
253
+ sentAt: string | null;
254
+ acceptedAt: string | null;
255
+ convertedAt: string | null;
256
+ notes: string | null;
257
+ createdAt: string;
258
+ updatedAt: string;
259
+ metadata?: Record<string, unknown> | null | undefined;
260
+ };
261
+ [dataTagErrorSymbol]: Error;
262
+ };
263
+ };
264
+ export declare function getOrdersQueryOptions(client: FetchWithValidationOptions, options?: UseOrdersOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
265
+ data: {
266
+ orderNumber: string;
267
+ title: string;
268
+ status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
269
+ currency: string;
270
+ id: string;
271
+ offerId: string | null;
272
+ personId: string | null;
273
+ organizationId: string | null;
274
+ opportunityId: string | null;
275
+ quoteId: string | null;
276
+ marketId: string | null;
277
+ sourceChannelId: string | null;
278
+ baseCurrency: string | null;
279
+ fxRateSetId: string | null;
280
+ subtotalAmountCents: number;
281
+ taxAmountCents: number;
282
+ feeAmountCents: number;
283
+ totalAmountCents: number;
284
+ costAmountCents: number;
285
+ orderedAt: string | null;
286
+ confirmedAt: string | null;
287
+ cancelledAt: string | null;
288
+ expiresAt: string | null;
289
+ notes: string | null;
290
+ createdAt: string;
291
+ updatedAt: string;
292
+ metadata?: Record<string, unknown> | null | undefined;
293
+ }[];
294
+ total: number;
295
+ limit: number;
296
+ offset: number;
297
+ }, Error, {
298
+ data: {
299
+ orderNumber: string;
300
+ title: string;
301
+ status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
302
+ currency: string;
303
+ id: string;
304
+ offerId: string | null;
305
+ personId: string | null;
306
+ organizationId: string | null;
307
+ opportunityId: string | null;
308
+ quoteId: string | null;
309
+ marketId: string | null;
310
+ sourceChannelId: string | null;
311
+ baseCurrency: string | null;
312
+ fxRateSetId: string | null;
313
+ subtotalAmountCents: number;
314
+ taxAmountCents: number;
315
+ feeAmountCents: number;
316
+ totalAmountCents: number;
317
+ costAmountCents: number;
318
+ orderedAt: string | null;
319
+ confirmedAt: string | null;
320
+ cancelledAt: string | null;
321
+ expiresAt: string | null;
322
+ notes: string | null;
323
+ createdAt: string;
324
+ updatedAt: string;
325
+ metadata?: Record<string, unknown> | null | undefined;
326
+ }[];
327
+ total: number;
328
+ limit: number;
329
+ offset: number;
330
+ }, readonly ["transactions", "orders", import("./query-keys.js").OrdersListFilters]>, "queryFn"> & {
331
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
332
+ data: {
333
+ orderNumber: string;
334
+ title: string;
335
+ status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
336
+ currency: string;
337
+ id: string;
338
+ offerId: string | null;
339
+ personId: string | null;
340
+ organizationId: string | null;
341
+ opportunityId: string | null;
342
+ quoteId: string | null;
343
+ marketId: string | null;
344
+ sourceChannelId: string | null;
345
+ baseCurrency: string | null;
346
+ fxRateSetId: string | null;
347
+ subtotalAmountCents: number;
348
+ taxAmountCents: number;
349
+ feeAmountCents: number;
350
+ totalAmountCents: number;
351
+ costAmountCents: number;
352
+ orderedAt: string | null;
353
+ confirmedAt: string | null;
354
+ cancelledAt: string | null;
355
+ expiresAt: string | null;
356
+ notes: string | null;
357
+ createdAt: string;
358
+ updatedAt: string;
359
+ metadata?: Record<string, unknown> | null | undefined;
360
+ }[];
361
+ total: number;
362
+ limit: number;
363
+ offset: number;
364
+ }, readonly ["transactions", "orders", import("./query-keys.js").OrdersListFilters], never> | undefined;
365
+ } & {
366
+ queryKey: readonly ["transactions", "orders", import("./query-keys.js").OrdersListFilters] & {
367
+ [dataTagSymbol]: {
368
+ data: {
369
+ orderNumber: string;
370
+ title: string;
371
+ status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
372
+ currency: string;
373
+ id: string;
374
+ offerId: string | null;
375
+ personId: string | null;
376
+ organizationId: string | null;
377
+ opportunityId: string | null;
378
+ quoteId: string | null;
379
+ marketId: string | null;
380
+ sourceChannelId: string | null;
381
+ baseCurrency: string | null;
382
+ fxRateSetId: string | null;
383
+ subtotalAmountCents: number;
384
+ taxAmountCents: number;
385
+ feeAmountCents: number;
386
+ totalAmountCents: number;
387
+ costAmountCents: number;
388
+ orderedAt: string | null;
389
+ confirmedAt: string | null;
390
+ cancelledAt: string | null;
391
+ expiresAt: string | null;
392
+ notes: string | null;
393
+ createdAt: string;
394
+ updatedAt: string;
395
+ metadata?: Record<string, unknown> | null | undefined;
396
+ }[];
397
+ total: number;
398
+ limit: number;
399
+ offset: number;
400
+ };
401
+ [dataTagErrorSymbol]: Error;
402
+ };
403
+ };
404
+ export declare function getOrderQueryOptions(client: FetchWithValidationOptions, id: string): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
405
+ orderNumber: string;
406
+ title: string;
407
+ status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
408
+ currency: string;
409
+ id: string;
410
+ offerId: string | null;
411
+ personId: string | null;
412
+ organizationId: string | null;
413
+ opportunityId: string | null;
414
+ quoteId: string | null;
415
+ marketId: string | null;
416
+ sourceChannelId: string | null;
417
+ baseCurrency: string | null;
418
+ fxRateSetId: string | null;
419
+ subtotalAmountCents: number;
420
+ taxAmountCents: number;
421
+ feeAmountCents: number;
422
+ totalAmountCents: number;
423
+ costAmountCents: number;
424
+ orderedAt: string | null;
425
+ confirmedAt: string | null;
426
+ cancelledAt: string | null;
427
+ expiresAt: string | null;
428
+ notes: string | null;
429
+ createdAt: string;
430
+ updatedAt: string;
431
+ metadata?: Record<string, unknown> | null | undefined;
432
+ }, Error, {
433
+ orderNumber: string;
434
+ title: string;
435
+ status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
436
+ currency: string;
437
+ id: string;
438
+ offerId: string | null;
439
+ personId: string | null;
440
+ organizationId: string | null;
441
+ opportunityId: string | null;
442
+ quoteId: string | null;
443
+ marketId: string | null;
444
+ sourceChannelId: string | null;
445
+ baseCurrency: string | null;
446
+ fxRateSetId: string | null;
447
+ subtotalAmountCents: number;
448
+ taxAmountCents: number;
449
+ feeAmountCents: number;
450
+ totalAmountCents: number;
451
+ costAmountCents: number;
452
+ orderedAt: string | null;
453
+ confirmedAt: string | null;
454
+ cancelledAt: string | null;
455
+ expiresAt: string | null;
456
+ notes: string | null;
457
+ createdAt: string;
458
+ updatedAt: string;
459
+ metadata?: Record<string, unknown> | null | undefined;
460
+ }, readonly ["transactions", "orders", string]>, "queryFn"> & {
461
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
462
+ orderNumber: string;
463
+ title: string;
464
+ status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
465
+ currency: string;
466
+ id: string;
467
+ offerId: string | null;
468
+ personId: string | null;
469
+ organizationId: string | null;
470
+ opportunityId: string | null;
471
+ quoteId: string | null;
472
+ marketId: string | null;
473
+ sourceChannelId: string | null;
474
+ baseCurrency: string | null;
475
+ fxRateSetId: string | null;
476
+ subtotalAmountCents: number;
477
+ taxAmountCents: number;
478
+ feeAmountCents: number;
479
+ totalAmountCents: number;
480
+ costAmountCents: number;
481
+ orderedAt: string | null;
482
+ confirmedAt: string | null;
483
+ cancelledAt: string | null;
484
+ expiresAt: string | null;
485
+ notes: string | null;
486
+ createdAt: string;
487
+ updatedAt: string;
488
+ metadata?: Record<string, unknown> | null | undefined;
489
+ }, readonly ["transactions", "orders", string], never> | undefined;
490
+ } & {
491
+ queryKey: readonly ["transactions", "orders", string] & {
492
+ [dataTagSymbol]: {
493
+ orderNumber: string;
494
+ title: string;
495
+ status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
496
+ currency: string;
497
+ id: string;
498
+ offerId: string | null;
499
+ personId: string | null;
500
+ organizationId: string | null;
501
+ opportunityId: string | null;
502
+ quoteId: string | null;
503
+ marketId: string | null;
504
+ sourceChannelId: string | null;
505
+ baseCurrency: string | null;
506
+ fxRateSetId: string | null;
507
+ subtotalAmountCents: number;
508
+ taxAmountCents: number;
509
+ feeAmountCents: number;
510
+ totalAmountCents: number;
511
+ costAmountCents: number;
512
+ orderedAt: string | null;
513
+ confirmedAt: string | null;
514
+ cancelledAt: string | null;
515
+ expiresAt: string | null;
516
+ notes: string | null;
517
+ createdAt: string;
518
+ updatedAt: string;
519
+ metadata?: Record<string, unknown> | null | undefined;
520
+ };
521
+ [dataTagErrorSymbol]: Error;
522
+ };
523
+ };
524
+ //# sourceMappingURL=query-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../src/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAuB,MAAM,aAAa,CAAA;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAmB7D,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,gBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY/B;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,0BAA0B,EAAE,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYlF;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,gBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY/B;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,0BAA0B,EAAE,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYlF"}
@@ -0,0 +1,47 @@
1
+ "use client";
2
+ import { queryOptions } from "@tanstack/react-query";
3
+ import { fetchWithValidation } from "./client.js";
4
+ import { transactionsQueryKeys } from "./query-keys.js";
5
+ import { offerListResponse, offerSingleResponse, orderListResponse, orderSingleResponse, } from "./schemas.js";
6
+ function toQueryString(filters) {
7
+ const params = new URLSearchParams();
8
+ for (const [key, value] of Object.entries(filters)) {
9
+ if (value === undefined || value === null || value === "")
10
+ continue;
11
+ params.set(key, String(value));
12
+ }
13
+ const qs = params.toString();
14
+ return qs ? `?${qs}` : "";
15
+ }
16
+ export function getOffersQueryOptions(client, options = {}) {
17
+ const { enabled: _enabled = true, ...filters } = options;
18
+ return queryOptions({
19
+ queryKey: transactionsQueryKeys.offersList(filters),
20
+ queryFn: () => fetchWithValidation(`/v1/transactions/offers${toQueryString(filters)}`, offerListResponse, client),
21
+ });
22
+ }
23
+ export function getOfferQueryOptions(client, id) {
24
+ return queryOptions({
25
+ queryKey: transactionsQueryKeys.offer(id),
26
+ queryFn: async () => {
27
+ const { data } = await fetchWithValidation(`/v1/transactions/offers/${id}`, offerSingleResponse, client);
28
+ return data;
29
+ },
30
+ });
31
+ }
32
+ export function getOrdersQueryOptions(client, options = {}) {
33
+ const { enabled: _enabled = true, ...filters } = options;
34
+ return queryOptions({
35
+ queryKey: transactionsQueryKeys.ordersList(filters),
36
+ queryFn: () => fetchWithValidation(`/v1/transactions/orders${toQueryString(filters)}`, orderListResponse, client),
37
+ });
38
+ }
39
+ export function getOrderQueryOptions(client, id) {
40
+ return queryOptions({
41
+ queryKey: transactionsQueryKeys.order(id),
42
+ queryFn: async () => {
43
+ const { data } = await fetchWithValidation(`/v1/transactions/orders/${id}`, orderSingleResponse, client);
44
+ return data;
45
+ },
46
+ });
47
+ }