@voyantjs/transactions-react 0.3.1 → 0.4.1

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.
@@ -30,7 +30,26 @@ export declare function useOfferMutation(): {
30
30
  notes: string | null;
31
31
  createdAt: string;
32
32
  updatedAt: string;
33
- metadata?: Record<string, unknown> | null | undefined;
33
+ metadata?: {
34
+ [x: string]: unknown;
35
+ storefrontPromotionalOffer?: {
36
+ enabled: boolean;
37
+ discountType: "percentage" | "fixed_amount";
38
+ discountValue: string;
39
+ applicableProductIds: string[];
40
+ applicableDepartureIds: string[];
41
+ stackable: boolean;
42
+ locale?: string | null | undefined;
43
+ slug?: string | null | undefined;
44
+ description?: string | null | undefined;
45
+ currency?: string | null | undefined;
46
+ validFrom?: string | null | undefined;
47
+ validTo?: string | null | undefined;
48
+ minPassengers?: number | null | undefined;
49
+ imageMobileUrl?: string | null | undefined;
50
+ imageDesktopUrl?: string | null | undefined;
51
+ } | undefined;
52
+ } | null | undefined;
34
53
  }, Error, {
35
54
  offerNumber: string;
36
55
  title: string;
@@ -55,7 +74,26 @@ export declare function useOfferMutation(): {
55
74
  acceptedAt?: string | null | undefined;
56
75
  convertedAt?: string | null | undefined;
57
76
  notes?: string | null | undefined;
58
- metadata?: Record<string, unknown> | null | undefined;
77
+ metadata?: {
78
+ [x: string]: unknown;
79
+ storefrontPromotionalOffer?: {
80
+ discountType: "percentage" | "fixed_amount";
81
+ discountValue: string;
82
+ enabled?: boolean | undefined;
83
+ locale?: string | null | undefined;
84
+ slug?: string | null | undefined;
85
+ description?: string | null | undefined;
86
+ currency?: string | null | undefined;
87
+ applicableProductIds?: string[] | undefined;
88
+ applicableDepartureIds?: string[] | undefined;
89
+ validFrom?: string | null | undefined;
90
+ validTo?: string | null | undefined;
91
+ minPassengers?: number | null | undefined;
92
+ imageMobileUrl?: string | null | undefined;
93
+ imageDesktopUrl?: string | null | undefined;
94
+ stackable?: boolean | undefined;
95
+ } | undefined;
96
+ } | null | undefined;
59
97
  }, unknown>;
60
98
  update: import("@tanstack/react-query").UseMutationResult<{
61
99
  offerNumber: string;
@@ -84,7 +122,26 @@ export declare function useOfferMutation(): {
84
122
  notes: string | null;
85
123
  createdAt: string;
86
124
  updatedAt: string;
87
- metadata?: Record<string, unknown> | null | undefined;
125
+ metadata?: {
126
+ [x: string]: unknown;
127
+ storefrontPromotionalOffer?: {
128
+ enabled: boolean;
129
+ discountType: "percentage" | "fixed_amount";
130
+ discountValue: string;
131
+ applicableProductIds: string[];
132
+ applicableDepartureIds: string[];
133
+ stackable: boolean;
134
+ locale?: string | null | undefined;
135
+ slug?: string | null | undefined;
136
+ description?: string | null | undefined;
137
+ currency?: string | null | undefined;
138
+ validFrom?: string | null | undefined;
139
+ validTo?: string | null | undefined;
140
+ minPassengers?: number | null | undefined;
141
+ imageMobileUrl?: string | null | undefined;
142
+ imageDesktopUrl?: string | null | undefined;
143
+ } | undefined;
144
+ } | null | undefined;
88
145
  }, Error, {
89
146
  id: string;
90
147
  input: UpdateOfferInput;
@@ -1 +1 @@
1
- {"version":3,"file":"use-offer-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-offer-mutation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAClF,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAO5B,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAChE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEhE,wBAAgB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAqBY,MAAM;eAAS,gBAAgB;;;;;EAgC1E"}
1
+ {"version":3,"file":"use-offer-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-offer-mutation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAClF,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAO5B,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAChE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEhE,wBAAgB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAqBY,MAAM;eAAS,gBAAgB;;;;;EAgC1E"}
@@ -30,7 +30,26 @@ export declare function useOffers(options?: UseOffersOptions): import("@tanstack
30
30
  notes: string | null;
31
31
  createdAt: string;
32
32
  updatedAt: string;
33
- metadata?: Record<string, unknown> | null | undefined;
33
+ metadata?: {
34
+ [x: string]: unknown;
35
+ storefrontPromotionalOffer?: {
36
+ enabled: boolean;
37
+ discountType: "percentage" | "fixed_amount";
38
+ discountValue: string;
39
+ applicableProductIds: string[];
40
+ applicableDepartureIds: string[];
41
+ stackable: boolean;
42
+ locale?: string | null | undefined;
43
+ slug?: string | null | undefined;
44
+ description?: string | null | undefined;
45
+ currency?: string | null | undefined;
46
+ validFrom?: string | null | undefined;
47
+ validTo?: string | null | undefined;
48
+ minPassengers?: number | null | undefined;
49
+ imageMobileUrl?: string | null | undefined;
50
+ imageDesktopUrl?: string | null | undefined;
51
+ } | undefined;
52
+ } | null | undefined;
34
53
  }[];
35
54
  total: number;
36
55
  limit: number;
@@ -1 +1 @@
1
- {"version":3,"file":"use-offers.d.ts","sourceRoot":"","sources":["../../src/hooks/use-offers.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAGzD,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAQvD"}
1
+ {"version":3,"file":"use-offers.d.ts","sourceRoot":"","sources":["../../src/hooks/use-offers.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAGzD,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAQvD"}
@@ -6,7 +6,7 @@ export declare function useOrderMutation(): {
6
6
  create: import("@tanstack/react-query").UseMutationResult<{
7
7
  orderNumber: string;
8
8
  title: string;
9
- status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
9
+ status: "pending" | "draft" | "expired" | "confirmed" | "fulfilled" | "cancelled";
10
10
  currency: string;
11
11
  id: string;
12
12
  offerId: string | null;
@@ -36,7 +36,7 @@ export declare function useOrderMutation(): {
36
36
  title: string;
37
37
  currency: string;
38
38
  offerId?: string | null | undefined;
39
- status?: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled" | undefined;
39
+ status?: "pending" | "draft" | "expired" | "confirmed" | "fulfilled" | "cancelled" | undefined;
40
40
  personId?: string | null | undefined;
41
41
  organizationId?: string | null | undefined;
42
42
  opportunityId?: string | null | undefined;
@@ -60,7 +60,7 @@ export declare function useOrderMutation(): {
60
60
  update: import("@tanstack/react-query").UseMutationResult<{
61
61
  orderNumber: string;
62
62
  title: string;
63
- status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
63
+ status: "pending" | "draft" | "expired" | "confirmed" | "fulfilled" | "cancelled";
64
64
  currency: string;
65
65
  id: string;
66
66
  offerId: string | null;
@@ -6,7 +6,7 @@ export declare function useOrders(options?: UseOrdersOptions): import("@tanstack
6
6
  data: {
7
7
  orderNumber: string;
8
8
  title: string;
9
- status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
9
+ status: "pending" | "draft" | "expired" | "confirmed" | "fulfilled" | "cancelled";
10
10
  currency: string;
11
11
  id: string;
12
12
  offerId: string | null;
@@ -29,7 +29,26 @@ export declare function getOffersQueryOptions(client: FetchWithValidationOptions
29
29
  notes: string | null;
30
30
  createdAt: string;
31
31
  updatedAt: string;
32
- metadata?: Record<string, unknown> | null | undefined;
32
+ metadata?: {
33
+ [x: string]: unknown;
34
+ storefrontPromotionalOffer?: {
35
+ enabled: boolean;
36
+ discountType: "percentage" | "fixed_amount";
37
+ discountValue: string;
38
+ applicableProductIds: string[];
39
+ applicableDepartureIds: string[];
40
+ stackable: boolean;
41
+ locale?: string | null | undefined;
42
+ slug?: string | null | undefined;
43
+ description?: string | null | undefined;
44
+ currency?: string | null | undefined;
45
+ validFrom?: string | null | undefined;
46
+ validTo?: string | null | undefined;
47
+ minPassengers?: number | null | undefined;
48
+ imageMobileUrl?: string | null | undefined;
49
+ imageDesktopUrl?: string | null | undefined;
50
+ } | undefined;
51
+ } | null | undefined;
33
52
  }[];
34
53
  total: number;
35
54
  limit: number;
@@ -62,7 +81,26 @@ export declare function getOffersQueryOptions(client: FetchWithValidationOptions
62
81
  notes: string | null;
63
82
  createdAt: string;
64
83
  updatedAt: string;
65
- metadata?: Record<string, unknown> | null | undefined;
84
+ metadata?: {
85
+ [x: string]: unknown;
86
+ storefrontPromotionalOffer?: {
87
+ enabled: boolean;
88
+ discountType: "percentage" | "fixed_amount";
89
+ discountValue: string;
90
+ applicableProductIds: string[];
91
+ applicableDepartureIds: string[];
92
+ stackable: boolean;
93
+ locale?: string | null | undefined;
94
+ slug?: string | null | undefined;
95
+ description?: string | null | undefined;
96
+ currency?: string | null | undefined;
97
+ validFrom?: string | null | undefined;
98
+ validTo?: string | null | undefined;
99
+ minPassengers?: number | null | undefined;
100
+ imageMobileUrl?: string | null | undefined;
101
+ imageDesktopUrl?: string | null | undefined;
102
+ } | undefined;
103
+ } | null | undefined;
66
104
  }[];
67
105
  total: number;
68
106
  limit: number;
@@ -96,7 +134,26 @@ export declare function getOffersQueryOptions(client: FetchWithValidationOptions
96
134
  notes: string | null;
97
135
  createdAt: string;
98
136
  updatedAt: string;
99
- metadata?: Record<string, unknown> | null | undefined;
137
+ metadata?: {
138
+ [x: string]: unknown;
139
+ storefrontPromotionalOffer?: {
140
+ enabled: boolean;
141
+ discountType: "percentage" | "fixed_amount";
142
+ discountValue: string;
143
+ applicableProductIds: string[];
144
+ applicableDepartureIds: string[];
145
+ stackable: boolean;
146
+ locale?: string | null | undefined;
147
+ slug?: string | null | undefined;
148
+ description?: string | null | undefined;
149
+ currency?: string | null | undefined;
150
+ validFrom?: string | null | undefined;
151
+ validTo?: string | null | undefined;
152
+ minPassengers?: number | null | undefined;
153
+ imageMobileUrl?: string | null | undefined;
154
+ imageDesktopUrl?: string | null | undefined;
155
+ } | undefined;
156
+ } | null | undefined;
100
157
  }[];
101
158
  total: number;
102
159
  limit: number;
@@ -132,7 +189,26 @@ export declare function getOffersQueryOptions(client: FetchWithValidationOptions
132
189
  notes: string | null;
133
190
  createdAt: string;
134
191
  updatedAt: string;
135
- metadata?: Record<string, unknown> | null | undefined;
192
+ metadata?: {
193
+ [x: string]: unknown;
194
+ storefrontPromotionalOffer?: {
195
+ enabled: boolean;
196
+ discountType: "percentage" | "fixed_amount";
197
+ discountValue: string;
198
+ applicableProductIds: string[];
199
+ applicableDepartureIds: string[];
200
+ stackable: boolean;
201
+ locale?: string | null | undefined;
202
+ slug?: string | null | undefined;
203
+ description?: string | null | undefined;
204
+ currency?: string | null | undefined;
205
+ validFrom?: string | null | undefined;
206
+ validTo?: string | null | undefined;
207
+ minPassengers?: number | null | undefined;
208
+ imageMobileUrl?: string | null | undefined;
209
+ imageDesktopUrl?: string | null | undefined;
210
+ } | undefined;
211
+ } | null | undefined;
136
212
  }[];
137
213
  total: number;
138
214
  limit: number;
@@ -168,7 +244,26 @@ export declare function getOfferQueryOptions(client: FetchWithValidationOptions,
168
244
  notes: string | null;
169
245
  createdAt: string;
170
246
  updatedAt: string;
171
- metadata?: Record<string, unknown> | null | undefined;
247
+ metadata?: {
248
+ [x: string]: unknown;
249
+ storefrontPromotionalOffer?: {
250
+ enabled: boolean;
251
+ discountType: "percentage" | "fixed_amount";
252
+ discountValue: string;
253
+ applicableProductIds: string[];
254
+ applicableDepartureIds: string[];
255
+ stackable: boolean;
256
+ locale?: string | null | undefined;
257
+ slug?: string | null | undefined;
258
+ description?: string | null | undefined;
259
+ currency?: string | null | undefined;
260
+ validFrom?: string | null | undefined;
261
+ validTo?: string | null | undefined;
262
+ minPassengers?: number | null | undefined;
263
+ imageMobileUrl?: string | null | undefined;
264
+ imageDesktopUrl?: string | null | undefined;
265
+ } | undefined;
266
+ } | null | undefined;
172
267
  }, Error, {
173
268
  offerNumber: string;
174
269
  title: string;
@@ -196,7 +291,26 @@ export declare function getOfferQueryOptions(client: FetchWithValidationOptions,
196
291
  notes: string | null;
197
292
  createdAt: string;
198
293
  updatedAt: string;
199
- metadata?: Record<string, unknown> | null | undefined;
294
+ metadata?: {
295
+ [x: string]: unknown;
296
+ storefrontPromotionalOffer?: {
297
+ enabled: boolean;
298
+ discountType: "percentage" | "fixed_amount";
299
+ discountValue: string;
300
+ applicableProductIds: string[];
301
+ applicableDepartureIds: string[];
302
+ stackable: boolean;
303
+ locale?: string | null | undefined;
304
+ slug?: string | null | undefined;
305
+ description?: string | null | undefined;
306
+ currency?: string | null | undefined;
307
+ validFrom?: string | null | undefined;
308
+ validTo?: string | null | undefined;
309
+ minPassengers?: number | null | undefined;
310
+ imageMobileUrl?: string | null | undefined;
311
+ imageDesktopUrl?: string | null | undefined;
312
+ } | undefined;
313
+ } | null | undefined;
200
314
  }, readonly ["transactions", "offers", string]>, "queryFn"> & {
201
315
  queryFn?: import("@tanstack/react-query").QueryFunction<{
202
316
  offerNumber: string;
@@ -225,7 +339,26 @@ export declare function getOfferQueryOptions(client: FetchWithValidationOptions,
225
339
  notes: string | null;
226
340
  createdAt: string;
227
341
  updatedAt: string;
228
- metadata?: Record<string, unknown> | null | undefined;
342
+ metadata?: {
343
+ [x: string]: unknown;
344
+ storefrontPromotionalOffer?: {
345
+ enabled: boolean;
346
+ discountType: "percentage" | "fixed_amount";
347
+ discountValue: string;
348
+ applicableProductIds: string[];
349
+ applicableDepartureIds: string[];
350
+ stackable: boolean;
351
+ locale?: string | null | undefined;
352
+ slug?: string | null | undefined;
353
+ description?: string | null | undefined;
354
+ currency?: string | null | undefined;
355
+ validFrom?: string | null | undefined;
356
+ validTo?: string | null | undefined;
357
+ minPassengers?: number | null | undefined;
358
+ imageMobileUrl?: string | null | undefined;
359
+ imageDesktopUrl?: string | null | undefined;
360
+ } | undefined;
361
+ } | null | undefined;
229
362
  }, readonly ["transactions", "offers", string], never> | undefined;
230
363
  } & {
231
364
  queryKey: readonly ["transactions", "offers", string] & {
@@ -256,7 +389,26 @@ export declare function getOfferQueryOptions(client: FetchWithValidationOptions,
256
389
  notes: string | null;
257
390
  createdAt: string;
258
391
  updatedAt: string;
259
- metadata?: Record<string, unknown> | null | undefined;
392
+ metadata?: {
393
+ [x: string]: unknown;
394
+ storefrontPromotionalOffer?: {
395
+ enabled: boolean;
396
+ discountType: "percentage" | "fixed_amount";
397
+ discountValue: string;
398
+ applicableProductIds: string[];
399
+ applicableDepartureIds: string[];
400
+ stackable: boolean;
401
+ locale?: string | null | undefined;
402
+ slug?: string | null | undefined;
403
+ description?: string | null | undefined;
404
+ currency?: string | null | undefined;
405
+ validFrom?: string | null | undefined;
406
+ validTo?: string | null | undefined;
407
+ minPassengers?: number | null | undefined;
408
+ imageMobileUrl?: string | null | undefined;
409
+ imageDesktopUrl?: string | null | undefined;
410
+ } | undefined;
411
+ } | null | undefined;
260
412
  };
261
413
  [dataTagErrorSymbol]: Error;
262
414
  };
@@ -265,7 +417,7 @@ export declare function getOrdersQueryOptions(client: FetchWithValidationOptions
265
417
  data: {
266
418
  orderNumber: string;
267
419
  title: string;
268
- status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
420
+ status: "pending" | "draft" | "expired" | "confirmed" | "fulfilled" | "cancelled";
269
421
  currency: string;
270
422
  id: string;
271
423
  offerId: string | null;
@@ -298,7 +450,7 @@ export declare function getOrdersQueryOptions(client: FetchWithValidationOptions
298
450
  data: {
299
451
  orderNumber: string;
300
452
  title: string;
301
- status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
453
+ status: "pending" | "draft" | "expired" | "confirmed" | "fulfilled" | "cancelled";
302
454
  currency: string;
303
455
  id: string;
304
456
  offerId: string | null;
@@ -332,7 +484,7 @@ export declare function getOrdersQueryOptions(client: FetchWithValidationOptions
332
484
  data: {
333
485
  orderNumber: string;
334
486
  title: string;
335
- status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
487
+ status: "pending" | "draft" | "expired" | "confirmed" | "fulfilled" | "cancelled";
336
488
  currency: string;
337
489
  id: string;
338
490
  offerId: string | null;
@@ -368,7 +520,7 @@ export declare function getOrdersQueryOptions(client: FetchWithValidationOptions
368
520
  data: {
369
521
  orderNumber: string;
370
522
  title: string;
371
- status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
523
+ status: "pending" | "draft" | "expired" | "confirmed" | "fulfilled" | "cancelled";
372
524
  currency: string;
373
525
  id: string;
374
526
  offerId: string | null;
@@ -404,7 +556,7 @@ export declare function getOrdersQueryOptions(client: FetchWithValidationOptions
404
556
  export declare function getOrderQueryOptions(client: FetchWithValidationOptions, id: string): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
405
557
  orderNumber: string;
406
558
  title: string;
407
- status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
559
+ status: "pending" | "draft" | "expired" | "confirmed" | "fulfilled" | "cancelled";
408
560
  currency: string;
409
561
  id: string;
410
562
  offerId: string | null;
@@ -432,7 +584,7 @@ export declare function getOrderQueryOptions(client: FetchWithValidationOptions,
432
584
  }, Error, {
433
585
  orderNumber: string;
434
586
  title: string;
435
- status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
587
+ status: "pending" | "draft" | "expired" | "confirmed" | "fulfilled" | "cancelled";
436
588
  currency: string;
437
589
  id: string;
438
590
  offerId: string | null;
@@ -461,7 +613,7 @@ export declare function getOrderQueryOptions(client: FetchWithValidationOptions,
461
613
  queryFn?: import("@tanstack/react-query").QueryFunction<{
462
614
  orderNumber: string;
463
615
  title: string;
464
- status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
616
+ status: "pending" | "draft" | "expired" | "confirmed" | "fulfilled" | "cancelled";
465
617
  currency: string;
466
618
  id: string;
467
619
  offerId: string | null;
@@ -492,7 +644,7 @@ export declare function getOrderQueryOptions(client: FetchWithValidationOptions,
492
644
  [dataTagSymbol]: {
493
645
  orderNumber: string;
494
646
  title: string;
495
- status: "draft" | "expired" | "pending" | "confirmed" | "fulfilled" | "cancelled";
647
+ status: "pending" | "draft" | "expired" | "confirmed" | "fulfilled" | "cancelled";
496
648
  currency: string;
497
649
  id: string;
498
650
  offerId: string | null;
@@ -1 +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,CAA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AAE,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"}
package/dist/schemas.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { offerMetadataSchema } from "@voyantjs/transactions";
1
2
  import { z } from "zod";
2
3
  export declare const paginatedEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
3
4
  data: z.ZodArray<T>;
@@ -44,18 +45,40 @@ export declare const offerRecordSchema: z.ZodObject<{
44
45
  acceptedAt: z.ZodNullable<z.ZodString>;
45
46
  convertedAt: z.ZodNullable<z.ZodString>;
46
47
  notes: z.ZodNullable<z.ZodString>;
47
- metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
48
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{
49
+ storefrontPromotionalOffer: z.ZodOptional<z.ZodObject<{
50
+ enabled: z.ZodDefault<z.ZodBoolean>;
51
+ locale: z.ZodNullable<z.ZodOptional<z.ZodString>>;
52
+ slug: z.ZodNullable<z.ZodOptional<z.ZodString>>;
53
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
54
+ discountType: z.ZodEnum<{
55
+ percentage: "percentage";
56
+ fixed_amount: "fixed_amount";
57
+ }>;
58
+ discountValue: z.ZodString;
59
+ currency: z.ZodNullable<z.ZodOptional<z.ZodString>>;
60
+ applicableProductIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
61
+ applicableDepartureIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
62
+ validFrom: z.ZodNullable<z.ZodOptional<z.ZodString>>;
63
+ validTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
64
+ minPassengers: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
65
+ imageMobileUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
66
+ imageDesktopUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
67
+ stackable: z.ZodDefault<z.ZodBoolean>;
68
+ }, z.core.$strip>>;
69
+ }, z.core.$catchall<z.ZodUnknown>>>>;
48
70
  createdAt: z.ZodString;
49
71
  updatedAt: z.ZodString;
50
72
  }, z.core.$strip>;
51
73
  export type OfferRecord = z.infer<typeof offerRecordSchema>;
74
+ export type OfferMetadataRecord = z.infer<typeof offerMetadataSchema>;
52
75
  export declare const orderRecordSchema: z.ZodObject<{
53
76
  orderNumber: z.ZodString;
54
77
  title: z.ZodString;
55
78
  status: z.ZodDefault<z.ZodEnum<{
79
+ pending: "pending";
56
80
  draft: "draft";
57
81
  expired: "expired";
58
- pending: "pending";
59
82
  confirmed: "confirmed";
60
83
  fulfilled: "fulfilled";
61
84
  cancelled: "cancelled";
@@ -120,7 +143,28 @@ export declare const offerListResponse: z.ZodObject<{
120
143
  acceptedAt: z.ZodNullable<z.ZodString>;
121
144
  convertedAt: z.ZodNullable<z.ZodString>;
122
145
  notes: z.ZodNullable<z.ZodString>;
123
- metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
146
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{
147
+ storefrontPromotionalOffer: z.ZodOptional<z.ZodObject<{
148
+ enabled: z.ZodDefault<z.ZodBoolean>;
149
+ locale: z.ZodNullable<z.ZodOptional<z.ZodString>>;
150
+ slug: z.ZodNullable<z.ZodOptional<z.ZodString>>;
151
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
152
+ discountType: z.ZodEnum<{
153
+ percentage: "percentage";
154
+ fixed_amount: "fixed_amount";
155
+ }>;
156
+ discountValue: z.ZodString;
157
+ currency: z.ZodNullable<z.ZodOptional<z.ZodString>>;
158
+ applicableProductIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
159
+ applicableDepartureIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
160
+ validFrom: z.ZodNullable<z.ZodOptional<z.ZodString>>;
161
+ validTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
162
+ minPassengers: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
163
+ imageMobileUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
164
+ imageDesktopUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
165
+ stackable: z.ZodDefault<z.ZodBoolean>;
166
+ }, z.core.$strip>>;
167
+ }, z.core.$catchall<z.ZodUnknown>>>>;
124
168
  createdAt: z.ZodString;
125
169
  updatedAt: z.ZodString;
126
170
  }, z.core.$strip>>;
@@ -162,7 +206,28 @@ export declare const offerSingleResponse: z.ZodObject<{
162
206
  acceptedAt: z.ZodNullable<z.ZodString>;
163
207
  convertedAt: z.ZodNullable<z.ZodString>;
164
208
  notes: z.ZodNullable<z.ZodString>;
165
- metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
209
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{
210
+ storefrontPromotionalOffer: z.ZodOptional<z.ZodObject<{
211
+ enabled: z.ZodDefault<z.ZodBoolean>;
212
+ locale: z.ZodNullable<z.ZodOptional<z.ZodString>>;
213
+ slug: z.ZodNullable<z.ZodOptional<z.ZodString>>;
214
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
215
+ discountType: z.ZodEnum<{
216
+ percentage: "percentage";
217
+ fixed_amount: "fixed_amount";
218
+ }>;
219
+ discountValue: z.ZodString;
220
+ currency: z.ZodNullable<z.ZodOptional<z.ZodString>>;
221
+ applicableProductIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
222
+ applicableDepartureIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
223
+ validFrom: z.ZodNullable<z.ZodOptional<z.ZodString>>;
224
+ validTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
225
+ minPassengers: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
226
+ imageMobileUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
227
+ imageDesktopUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
228
+ stackable: z.ZodDefault<z.ZodBoolean>;
229
+ }, z.core.$strip>>;
230
+ }, z.core.$catchall<z.ZodUnknown>>>>;
166
231
  createdAt: z.ZodString;
167
232
  updatedAt: z.ZodString;
168
233
  }, z.core.$strip>;
@@ -172,9 +237,9 @@ export declare const orderListResponse: z.ZodObject<{
172
237
  orderNumber: z.ZodString;
173
238
  title: z.ZodString;
174
239
  status: z.ZodDefault<z.ZodEnum<{
240
+ pending: "pending";
175
241
  draft: "draft";
176
242
  expired: "expired";
177
- pending: "pending";
178
243
  confirmed: "confirmed";
179
244
  fulfilled: "fulfilled";
180
245
  cancelled: "cancelled";
@@ -213,9 +278,9 @@ export declare const orderSingleResponse: z.ZodObject<{
213
278
  orderNumber: z.ZodString;
214
279
  title: z.ZodString;
215
280
  status: z.ZodDefault<z.ZodEnum<{
281
+ pending: "pending";
216
282
  draft: "draft";
217
283
  expired: "expired";
218
- pending: "pending";
219
284
  confirmed: "confirmed";
220
285
  fulfilled: "fulfilled";
221
286
  cancelled: "cancelled";
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;;;;iBAM7D,CAAA;AAEJ,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;iBAA6B,CAAA;AAC3F,eAAO,MAAM,eAAe;;iBAAqC,CAAA;AAEjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwB5B,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwB5B,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAuC,CAAA;AACrE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAoC,CAAA;AACpE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAuC,CAAA;AACrE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAoC,CAAA"}
package/dist/schemas.js CHANGED
@@ -1,4 +1,4 @@
1
- import { insertOfferSchema, insertOrderSchema } from "@voyantjs/transactions";
1
+ import { insertOfferSchema, insertOrderSchema, offerMetadataSchema } from "@voyantjs/transactions";
2
2
  import { z } from "zod";
3
3
  export const paginatedEnvelope = (item) => z.object({
4
4
  data: z.array(item),
@@ -29,7 +29,7 @@ export const offerRecordSchema = insertOfferSchema.extend({
29
29
  acceptedAt: z.string().nullable(),
30
30
  convertedAt: z.string().nullable(),
31
31
  notes: z.string().nullable(),
32
- metadata: z.record(z.string(), z.unknown()).nullable().optional(),
32
+ metadata: offerMetadataSchema.nullable().optional(),
33
33
  createdAt: z.string(),
34
34
  updatedAt: z.string(),
35
35
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/transactions-react",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "license": "FSL-1.1-Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,7 +35,7 @@
35
35
  "react": "^19.0.0",
36
36
  "react-dom": "^19.0.0",
37
37
  "zod": "^4.0.0",
38
- "@voyantjs/transactions": "0.3.1"
38
+ "@voyantjs/transactions": "0.4.1"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@tanstack/react-query": "^5.96.2",
@@ -46,12 +46,12 @@
46
46
  "typescript": "^6.0.2",
47
47
  "vitest": "^4.1.2",
48
48
  "zod": "^4.3.6",
49
- "@voyantjs/react": "0.3.1",
50
- "@voyantjs/transactions": "0.3.1",
49
+ "@voyantjs/react": "0.4.1",
50
+ "@voyantjs/transactions": "0.4.1",
51
51
  "@voyantjs/voyant-typescript-config": "0.1.0"
52
52
  },
53
53
  "dependencies": {
54
- "@voyantjs/react": "0.3.1"
54
+ "@voyantjs/react": "0.4.1"
55
55
  },
56
56
  "files": [
57
57
  "dist"