@wix/auto_sdk_bookings_pricing 1.0.95 → 1.0.97

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.
@@ -28,22 +28,16 @@ var PreviewPriceRequest = z.object({
28
28
  z.xor([
29
29
  z.object({
30
30
  custom: z.never().optional(),
31
- duration: z.never().optional(),
32
- dateTime: z.never().optional(),
33
- participantRange: z.never().optional()
31
+ duration: z.never().optional()
34
32
  }),
35
33
  z.object({
36
34
  duration: z.never().optional(),
37
- dateTime: z.never().optional(),
38
- participantRange: z.never().optional(),
39
35
  custom: z.string().describe(
40
36
  "Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.\nChoices are specific values for an option the customer can choose to book. For example,\nthe option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.\nEach choice may have a different price."
41
37
  )
42
38
  }),
43
39
  z.object({
44
40
  custom: z.never().optional(),
45
- dateTime: z.never().optional(),
46
- participantRange: z.never().optional(),
47
41
  duration: z.object({
48
42
  minutes: z.number().int().describe(
49
43
  "Duration of the service in minutes.\nMin: 1 minute, Max: 30 days, 23 hours, and 59 minutes"
@@ -52,30 +46,6 @@ var PreviewPriceRequest = z.object({
52
46
  'Name of the duration option.\nDefaults to the formatted duration e.g. "1 hour, 30 minutes".'
53
47
  ).max(255).optional().nullable()
54
48
  })
55
- }),
56
- z.object({
57
- custom: z.never().optional(),
58
- duration: z.never().optional(),
59
- participantRange: z.never().optional(),
60
- dateTime: z.object({
61
- name: z.string().describe(
62
- 'Name of the date-time rule. For example, "Weekend mornings".'
63
- ).max(255).optional().nullable()
64
- }).describe(
65
- "The matched date-time pricing rule. Available only for `DATE_TIME` options."
66
- )
67
- }),
68
- z.object({
69
- custom: z.never().optional(),
70
- duration: z.never().optional(),
71
- dateTime: z.never().optional(),
72
- participantRange: z.object({
73
- name: z.string().describe(
74
- 'Name of the participants range. For example, "Large group".'
75
- ).max(255).optional().nullable()
76
- }).describe(
77
- "The matched participants pricing rule. Available only for `NUMBER_OF_PARTICIPANTS` options."
78
- )
79
49
  })
80
50
  ])
81
51
  )
@@ -102,22 +72,16 @@ var PreviewPriceRequest = z.object({
102
72
  z.xor([
103
73
  z.object({
104
74
  custom: z.never().optional(),
105
- duration: z.never().optional(),
106
- dateTime: z.never().optional(),
107
- participantRange: z.never().optional()
75
+ duration: z.never().optional()
108
76
  }),
109
77
  z.object({
110
78
  duration: z.never().optional(),
111
- dateTime: z.never().optional(),
112
- participantRange: z.never().optional(),
113
79
  custom: z.string().describe(
114
80
  "Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.\nChoices are specific values for an option the customer can choose to book. For example,\nthe option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.\nEach choice may have a different price."
115
81
  )
116
82
  }),
117
83
  z.object({
118
84
  custom: z.never().optional(),
119
- dateTime: z.never().optional(),
120
- participantRange: z.never().optional(),
121
85
  duration: z.object({
122
86
  minutes: z.number().int().describe(
123
87
  "Duration of the service in minutes.\nMin: 1 minute, Max: 30 days, 23 hours, and 59 minutes"
@@ -126,37 +90,22 @@ var PreviewPriceRequest = z.object({
126
90
  'Name of the duration option.\nDefaults to the formatted duration e.g. "1 hour, 30 minutes".'
127
91
  ).max(255).optional().nullable()
128
92
  })
129
- }),
130
- z.object({
131
- custom: z.never().optional(),
132
- duration: z.never().optional(),
133
- participantRange: z.never().optional(),
134
- dateTime: z.object({
135
- name: z.string().describe(
136
- 'Name of the date-time rule. For example, "Weekend mornings".'
137
- ).max(255).optional().nullable()
138
- }).describe(
139
- "The matched date-time pricing rule. Available only for `DATE_TIME` options."
140
- )
141
- }),
142
- z.object({
143
- custom: z.never().optional(),
144
- duration: z.never().optional(),
145
- dateTime: z.never().optional(),
146
- participantRange: z.object({
147
- name: z.string().describe(
148
- 'Name of the participants range. For example, "Large group".'
149
- ).max(255).optional().nullable()
150
- }).describe(
151
- "The matched participants pricing rule. Available only for `NUMBER_OF_PARTICIPANTS` options."
152
- )
153
93
  })
154
94
  ])
155
95
  )
156
96
  ).max(5).optional(),
157
97
  pricePerParticipant: z.number().describe("Price per participant for this service variant.").optional().nullable()
158
98
  })
159
- ).max(20).optional()
99
+ ).max(20).optional(),
100
+ localStartDate: z.string().describe(
101
+ 'Local start date and time of the booking. For example, `"2024-01-30T13:30:00"`.\n\nUsed together with `localEndDate` and `timeZone` to calculate duration-based pricing for services with a duration range configured. If not provided, pricing is calculated based on the number of participants only.'
102
+ ).optional().nullable(),
103
+ localEndDate: z.string().describe(
104
+ 'Local end date and time of the booking. For example, `"2024-01-30T14:30:00"`.\n\nUsed together with `localStartDate` and `timeZone` to calculate duration-based pricing for services with a duration range configured. If not provided, pricing is calculated based on the number of participants only.'
105
+ ).optional().nullable(),
106
+ timeZone: z.string().describe(
107
+ 'Time zone for `localStartDate` and `localEndDate` in IANA format. For example, `"America/New_York"`.\n\nRequired when `localStartDate` and `localEndDate` are provided.'
108
+ ).optional().nullable()
160
109
  })
161
110
  ).min(1).max(20)
162
111
  });
@@ -190,22 +139,16 @@ var PreviewPriceResponse = z.object({
190
139
  z.xor([
191
140
  z.object({
192
141
  custom: z.never().optional(),
193
- duration: z.never().optional(),
194
- dateTime: z.never().optional(),
195
- participantRange: z.never().optional()
142
+ duration: z.never().optional()
196
143
  }),
197
144
  z.object({
198
145
  duration: z.never().optional(),
199
- dateTime: z.never().optional(),
200
- participantRange: z.never().optional(),
201
146
  custom: z.string().describe(
202
147
  "Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.\nChoices are specific values for an option the customer can choose to book. For example,\nthe option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.\nEach choice may have a different price."
203
148
  )
204
149
  }),
205
150
  z.object({
206
151
  custom: z.never().optional(),
207
- dateTime: z.never().optional(),
208
- participantRange: z.never().optional(),
209
152
  duration: z.object({
210
153
  minutes: z.number().int().describe(
211
154
  "Duration of the service in minutes.\nMin: 1 minute, Max: 30 days, 23 hours, and 59 minutes"
@@ -214,30 +157,6 @@ var PreviewPriceResponse = z.object({
214
157
  'Name of the duration option.\nDefaults to the formatted duration e.g. "1 hour, 30 minutes".'
215
158
  ).max(255).optional().nullable()
216
159
  })
217
- }),
218
- z.object({
219
- custom: z.never().optional(),
220
- duration: z.never().optional(),
221
- participantRange: z.never().optional(),
222
- dateTime: z.object({
223
- name: z.string().describe(
224
- 'Name of the date-time rule. For example, "Weekend mornings".'
225
- ).max(255).optional().nullable()
226
- }).describe(
227
- "The matched date-time pricing rule. Available only for `DATE_TIME` options."
228
- )
229
- }),
230
- z.object({
231
- custom: z.never().optional(),
232
- duration: z.never().optional(),
233
- dateTime: z.never().optional(),
234
- participantRange: z.object({
235
- name: z.string().describe(
236
- 'Name of the participants range. For example, "Large group".'
237
- ).max(255).optional().nullable()
238
- }).describe(
239
- "The matched participants pricing rule. Available only for `NUMBER_OF_PARTICIPANTS` options."
240
- )
241
160
  })
242
161
  ])
243
162
  )
@@ -266,22 +185,16 @@ var PreviewPriceResponse = z.object({
266
185
  z.xor([
267
186
  z.object({
268
187
  custom: z.never().optional(),
269
- duration: z.never().optional(),
270
- dateTime: z.never().optional(),
271
- participantRange: z.never().optional()
188
+ duration: z.never().optional()
272
189
  }),
273
190
  z.object({
274
191
  duration: z.never().optional(),
275
- dateTime: z.never().optional(),
276
- participantRange: z.never().optional(),
277
192
  custom: z.string().describe(
278
193
  "Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.\nChoices are specific values for an option the customer can choose to book. For example,\nthe option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.\nEach choice may have a different price."
279
194
  )
280
195
  }),
281
196
  z.object({
282
197
  custom: z.never().optional(),
283
- dateTime: z.never().optional(),
284
- participantRange: z.never().optional(),
285
198
  duration: z.object({
286
199
  minutes: z.number().int().describe(
287
200
  "Duration of the service in minutes.\nMin: 1 minute, Max: 30 days, 23 hours, and 59 minutes"
@@ -290,30 +203,6 @@ var PreviewPriceResponse = z.object({
290
203
  'Name of the duration option.\nDefaults to the formatted duration e.g. "1 hour, 30 minutes".'
291
204
  ).max(255).optional().nullable()
292
205
  })
293
- }),
294
- z.object({
295
- custom: z.never().optional(),
296
- duration: z.never().optional(),
297
- participantRange: z.never().optional(),
298
- dateTime: z.object({
299
- name: z.string().describe(
300
- 'Name of the date-time rule. For example, "Weekend mornings".'
301
- ).max(255).optional().nullable()
302
- }).describe(
303
- "The matched date-time pricing rule. Available only for `DATE_TIME` options."
304
- )
305
- }),
306
- z.object({
307
- custom: z.never().optional(),
308
- duration: z.never().optional(),
309
- dateTime: z.never().optional(),
310
- participantRange: z.object({
311
- name: z.string().describe(
312
- 'Name of the participants range. For example, "Large group".'
313
- ).max(255).optional().nullable()
314
- }).describe(
315
- "The matched participants pricing rule. Available only for `NUMBER_OF_PARTICIPANTS` options."
316
- )
317
206
  })
318
207
  ])
319
208
  )
@@ -322,7 +211,16 @@ var PreviewPriceResponse = z.object({
322
211
  "Price per participant for this service variant."
323
212
  ).optional().nullable()
324
213
  })
325
- ).max(20).optional()
214
+ ).max(20).optional(),
215
+ localStartDate: z.string().describe(
216
+ 'Local start date and time of the booking. For example, `"2024-01-30T13:30:00"`.\n\nUsed together with `localEndDate` and `timeZone` to calculate duration-based pricing for services with a duration range configured. If not provided, pricing is calculated based on the number of participants only.'
217
+ ).optional().nullable(),
218
+ localEndDate: z.string().describe(
219
+ 'Local end date and time of the booking. For example, `"2024-01-30T14:30:00"`.\n\nUsed together with `localStartDate` and `timeZone` to calculate duration-based pricing for services with a duration range configured. If not provided, pricing is calculated based on the number of participants only.'
220
+ ).optional().nullable(),
221
+ timeZone: z.string().describe(
222
+ 'Time zone for `localStartDate` and `localEndDate` in IANA format. For example, `"America/New_York"`.\n\nRequired when `localStartDate` and `localEndDate` are provided.'
223
+ ).optional().nullable()
326
224
  })
327
225
  ).max(20).optional(),
328
226
  deposit: z.number().describe(
@@ -462,7 +360,16 @@ var CalculatePriceRequest = z.object({
462
360
  "NO_SELECTION"
463
361
  ]).optional()
464
362
  })
465
- ).max(3).optional()
363
+ ).max(3).optional(),
364
+ allDay: z.boolean().describe(
365
+ "Whether the booked slot spans one or more full days.\nFor class bookings, this value is synced from the linked calendar event.\nFor appointment bookings, this value is derived from the availability slot at booking creation or reschedule time.\n\nWhen `true`, `startDate` is set to `00:00:00` of the first day and `endDate` is set to `00:00:00` of the day after the last day (exclusive). Midnight boundaries are interpreted in the slot's `timezone`.\n\nDefault: `false`"
366
+ ).optional().nullable(),
367
+ durationUnitType: z.enum(["HOUR", "DAY"]).describe(
368
+ "Duration unit type for the booking. Populated only for bookings of [services](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/service-object) configured with a duration range, such as hourly or daily duration-range services. Use together with `durationUnitCount` to determine the booked duration.\n\nReturned only when the service has a `schedule.availabilityConstraints.durationRange`."
369
+ ).optional(),
370
+ durationUnitCount: z.number().int().describe(
371
+ "Number of booked duration units. Populated only for bookings of [services](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/service-object) configured with a duration range.\nThe meaning depends on `durationUnitType`:\n- `HOUR`: Duration in minutes. For example, `120` for a 2-hour booking.\n- `DAY`: Duration in days. For example, `3` for a 3-day booking.\n\nReturned only when the service has a `schedule.availabilityConstraints.durationRange`."
372
+ ).min(1).max(1440).optional().nullable()
466
373
  }).describe(
467
374
  "[Booked slot](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings-and-time-slots/time-slots/availability-calendar/query-availability).\n\nSpecify `slot` when creating bookings for:\n- __Appointment-based services__: Individual sessions with service providers (consultations, treatments).\nWix Bookings creates a new session when the booking is confirmed.\n- __Class services__: Group sessions at specific times (fitness classes, workshops).\nWix Bookings links the booking to an existing scheduled session.\n\nFor course services, specify `schedule` instead of `slot`."
468
375
  )
@@ -788,22 +695,16 @@ var CalculatePriceRequest = z.object({
788
695
  z.xor([
789
696
  z.object({
790
697
  custom: z.never().optional(),
791
- duration: z.never().optional(),
792
- dateTime: z.never().optional(),
793
- participantRange: z.never().optional()
698
+ duration: z.never().optional()
794
699
  }),
795
700
  z.object({
796
701
  duration: z.never().optional(),
797
- dateTime: z.never().optional(),
798
- participantRange: z.never().optional(),
799
702
  custom: z.string().describe(
800
703
  "Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.\nChoices are specific values for an option the customer can choose to book. For example,\nthe option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.\nEach choice may have a different price."
801
704
  )
802
705
  }),
803
706
  z.object({
804
707
  custom: z.never().optional(),
805
- dateTime: z.never().optional(),
806
- participantRange: z.never().optional(),
807
708
  duration: z.object({
808
709
  minutes: z.number().int().describe(
809
710
  "Duration of the service in minutes.\nMin: 1 minute, Max: 30 days, 23 hours, and 59 minutes"
@@ -812,30 +713,6 @@ var CalculatePriceRequest = z.object({
812
713
  'Name of the duration option.\nDefaults to the formatted duration e.g. "1 hour, 30 minutes".'
813
714
  ).max(255).optional().nullable()
814
715
  })
815
- }),
816
- z.object({
817
- custom: z.never().optional(),
818
- duration: z.never().optional(),
819
- participantRange: z.never().optional(),
820
- dateTime: z.object({
821
- name: z.string().describe(
822
- 'Name of the date-time rule. For example, "Weekend mornings".'
823
- ).max(255).optional().nullable()
824
- }).describe(
825
- "The matched date-time pricing rule. Available only for `DATE_TIME` options."
826
- )
827
- }),
828
- z.object({
829
- custom: z.never().optional(),
830
- duration: z.never().optional(),
831
- dateTime: z.never().optional(),
832
- participantRange: z.object({
833
- name: z.string().describe(
834
- 'Name of the participants range. For example, "Large group".'
835
- ).max(255).optional().nullable()
836
- }).describe(
837
- "The matched participants pricing rule. Available only for `NUMBER_OF_PARTICIPANTS` options."
838
- )
839
716
  })
840
717
  ])
841
718
  )
@@ -881,22 +758,16 @@ var CalculatePriceResponse = z.object({
881
758
  z.xor([
882
759
  z.object({
883
760
  custom: z.never().optional(),
884
- duration: z.never().optional(),
885
- dateTime: z.never().optional(),
886
- participantRange: z.never().optional()
761
+ duration: z.never().optional()
887
762
  }),
888
763
  z.object({
889
764
  duration: z.never().optional(),
890
- dateTime: z.never().optional(),
891
- participantRange: z.never().optional(),
892
765
  custom: z.string().describe(
893
766
  "Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.\nChoices are specific values for an option the customer can choose to book. For example,\nthe option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.\nEach choice may have a different price."
894
767
  )
895
768
  }),
896
769
  z.object({
897
770
  custom: z.never().optional(),
898
- dateTime: z.never().optional(),
899
- participantRange: z.never().optional(),
900
771
  duration: z.object({
901
772
  minutes: z.number().int().describe(
902
773
  "Duration of the service in minutes.\nMin: 1 minute, Max: 30 days, 23 hours, and 59 minutes"
@@ -905,30 +776,6 @@ var CalculatePriceResponse = z.object({
905
776
  'Name of the duration option.\nDefaults to the formatted duration e.g. "1 hour, 30 minutes".'
906
777
  ).max(255).optional().nullable()
907
778
  })
908
- }),
909
- z.object({
910
- custom: z.never().optional(),
911
- duration: z.never().optional(),
912
- participantRange: z.never().optional(),
913
- dateTime: z.object({
914
- name: z.string().describe(
915
- 'Name of the date-time rule. For example, "Weekend mornings".'
916
- ).max(255).optional().nullable()
917
- }).describe(
918
- "The matched date-time pricing rule. Available only for `DATE_TIME` options."
919
- )
920
- }),
921
- z.object({
922
- custom: z.never().optional(),
923
- duration: z.never().optional(),
924
- dateTime: z.never().optional(),
925
- participantRange: z.object({
926
- name: z.string().describe(
927
- 'Name of the participants range. For example, "Large group".'
928
- ).max(255).optional().nullable()
929
- }).describe(
930
- "The matched participants pricing rule. Available only for `NUMBER_OF_PARTICIPANTS` options."
931
- )
932
779
  })
933
780
  ])
934
781
  )
@@ -957,22 +804,16 @@ var CalculatePriceResponse = z.object({
957
804
  z.xor([
958
805
  z.object({
959
806
  custom: z.never().optional(),
960
- duration: z.never().optional(),
961
- dateTime: z.never().optional(),
962
- participantRange: z.never().optional()
807
+ duration: z.never().optional()
963
808
  }),
964
809
  z.object({
965
810
  duration: z.never().optional(),
966
- dateTime: z.never().optional(),
967
- participantRange: z.never().optional(),
968
811
  custom: z.string().describe(
969
812
  "Value for one of the choices in the [`CustomServiceOption.choices`](https://example.com) list.\nChoices are specific values for an option the customer can choose to book. For example,\nthe option `ageGroup` may have these choices: `child`, `student`, `adult`, and `senior`.\nEach choice may have a different price."
970
813
  )
971
814
  }),
972
815
  z.object({
973
816
  custom: z.never().optional(),
974
- dateTime: z.never().optional(),
975
- participantRange: z.never().optional(),
976
817
  duration: z.object({
977
818
  minutes: z.number().int().describe(
978
819
  "Duration of the service in minutes.\nMin: 1 minute, Max: 30 days, 23 hours, and 59 minutes"
@@ -981,30 +822,6 @@ var CalculatePriceResponse = z.object({
981
822
  'Name of the duration option.\nDefaults to the formatted duration e.g. "1 hour, 30 minutes".'
982
823
  ).max(255).optional().nullable()
983
824
  })
984
- }),
985
- z.object({
986
- custom: z.never().optional(),
987
- duration: z.never().optional(),
988
- participantRange: z.never().optional(),
989
- dateTime: z.object({
990
- name: z.string().describe(
991
- 'Name of the date-time rule. For example, "Weekend mornings".'
992
- ).max(255).optional().nullable()
993
- }).describe(
994
- "The matched date-time pricing rule. Available only for `DATE_TIME` options."
995
- )
996
- }),
997
- z.object({
998
- custom: z.never().optional(),
999
- duration: z.never().optional(),
1000
- dateTime: z.never().optional(),
1001
- participantRange: z.object({
1002
- name: z.string().describe(
1003
- 'Name of the participants range. For example, "Large group".'
1004
- ).max(255).optional().nullable()
1005
- }).describe(
1006
- "The matched participants pricing rule. Available only for `NUMBER_OF_PARTICIPANTS` options."
1007
- )
1008
825
  })
1009
826
  ])
1010
827
  )
@@ -1013,7 +830,16 @@ var CalculatePriceResponse = z.object({
1013
830
  "Price per participant for this service variant."
1014
831
  ).optional().nullable()
1015
832
  })
1016
- ).max(20).optional()
833
+ ).max(20).optional(),
834
+ localStartDate: z.string().describe(
835
+ 'Local start date and time of the booking. For example, `"2024-01-30T13:30:00"`.\n\nUsed together with `localEndDate` and `timeZone` to calculate duration-based pricing for services with a duration range configured. If not provided, pricing is calculated based on the number of participants only.'
836
+ ).optional().nullable(),
837
+ localEndDate: z.string().describe(
838
+ 'Local end date and time of the booking. For example, `"2024-01-30T14:30:00"`.\n\nUsed together with `localStartDate` and `timeZone` to calculate duration-based pricing for services with a duration range configured. If not provided, pricing is calculated based on the number of participants only.'
839
+ ).optional().nullable(),
840
+ timeZone: z.string().describe(
841
+ 'Time zone for `localStartDate` and `localEndDate` in IANA format. For example, `"America/New_York"`.\n\nRequired when `localStartDate` and `localEndDate` are provided.'
842
+ ).optional().nullable()
1017
843
  })
1018
844
  ).max(20).optional(),
1019
845
  deposit: z.number().describe(