@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.
@@ -67,22 +67,16 @@ var PreviewPriceRequest = z.object({
67
67
  z.xor([
68
68
  z.object({
69
69
  custom: z.never().optional(),
70
- duration: z.never().optional(),
71
- dateTime: z.never().optional(),
72
- participantRange: z.never().optional()
70
+ duration: z.never().optional()
73
71
  }),
74
72
  z.object({
75
73
  duration: z.never().optional(),
76
- dateTime: z.never().optional(),
77
- participantRange: z.never().optional(),
78
74
  custom: z.string().describe(
79
75
  "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."
80
76
  )
81
77
  }),
82
78
  z.object({
83
79
  custom: z.never().optional(),
84
- dateTime: z.never().optional(),
85
- participantRange: z.never().optional(),
86
80
  duration: z.object({
87
81
  minutes: z.number().int().describe(
88
82
  "Duration of the service in minutes.\nMin: 1 minute, Max: 30 days, 23 hours, and 59 minutes"
@@ -91,30 +85,6 @@ var PreviewPriceRequest = z.object({
91
85
  'Name of the duration option.\nDefaults to the formatted duration e.g. "1 hour, 30 minutes".'
92
86
  ).max(255).optional().nullable()
93
87
  })
94
- }),
95
- z.object({
96
- custom: z.never().optional(),
97
- duration: z.never().optional(),
98
- participantRange: z.never().optional(),
99
- dateTime: z.object({
100
- name: z.string().describe(
101
- 'Name of the date-time rule. For example, "Weekend mornings".'
102
- ).max(255).optional().nullable()
103
- }).describe(
104
- "The matched date-time pricing rule. Available only for `DATE_TIME` options."
105
- )
106
- }),
107
- z.object({
108
- custom: z.never().optional(),
109
- duration: z.never().optional(),
110
- dateTime: z.never().optional(),
111
- participantRange: z.object({
112
- name: z.string().describe(
113
- 'Name of the participants range. For example, "Large group".'
114
- ).max(255).optional().nullable()
115
- }).describe(
116
- "The matched participants pricing rule. Available only for `NUMBER_OF_PARTICIPANTS` options."
117
- )
118
88
  })
119
89
  ])
120
90
  )
@@ -141,22 +111,16 @@ var PreviewPriceRequest = z.object({
141
111
  z.xor([
142
112
  z.object({
143
113
  custom: z.never().optional(),
144
- duration: z.never().optional(),
145
- dateTime: z.never().optional(),
146
- participantRange: z.never().optional()
114
+ duration: z.never().optional()
147
115
  }),
148
116
  z.object({
149
117
  duration: z.never().optional(),
150
- dateTime: z.never().optional(),
151
- participantRange: z.never().optional(),
152
118
  custom: z.string().describe(
153
119
  "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."
154
120
  )
155
121
  }),
156
122
  z.object({
157
123
  custom: z.never().optional(),
158
- dateTime: z.never().optional(),
159
- participantRange: z.never().optional(),
160
124
  duration: z.object({
161
125
  minutes: z.number().int().describe(
162
126
  "Duration of the service in minutes.\nMin: 1 minute, Max: 30 days, 23 hours, and 59 minutes"
@@ -165,37 +129,22 @@ var PreviewPriceRequest = z.object({
165
129
  'Name of the duration option.\nDefaults to the formatted duration e.g. "1 hour, 30 minutes".'
166
130
  ).max(255).optional().nullable()
167
131
  })
168
- }),
169
- z.object({
170
- custom: z.never().optional(),
171
- duration: z.never().optional(),
172
- participantRange: z.never().optional(),
173
- dateTime: z.object({
174
- name: z.string().describe(
175
- 'Name of the date-time rule. For example, "Weekend mornings".'
176
- ).max(255).optional().nullable()
177
- }).describe(
178
- "The matched date-time pricing rule. Available only for `DATE_TIME` options."
179
- )
180
- }),
181
- z.object({
182
- custom: z.never().optional(),
183
- duration: z.never().optional(),
184
- dateTime: z.never().optional(),
185
- participantRange: z.object({
186
- name: z.string().describe(
187
- 'Name of the participants range. For example, "Large group".'
188
- ).max(255).optional().nullable()
189
- }).describe(
190
- "The matched participants pricing rule. Available only for `NUMBER_OF_PARTICIPANTS` options."
191
- )
192
132
  })
193
133
  ])
194
134
  )
195
135
  ).max(5).optional(),
196
136
  pricePerParticipant: z.number().describe("Price per participant for this service variant.").optional().nullable()
197
137
  })
198
- ).max(20).optional()
138
+ ).max(20).optional(),
139
+ localStartDate: z.string().describe(
140
+ '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.'
141
+ ).optional().nullable(),
142
+ localEndDate: z.string().describe(
143
+ '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.'
144
+ ).optional().nullable(),
145
+ timeZone: z.string().describe(
146
+ 'Time zone for `localStartDate` and `localEndDate` in IANA format. For example, `"America/New_York"`.\n\nRequired when `localStartDate` and `localEndDate` are provided.'
147
+ ).optional().nullable()
199
148
  })
200
149
  ).min(1).max(20)
201
150
  });
@@ -229,22 +178,16 @@ var PreviewPriceResponse = z.object({
229
178
  z.xor([
230
179
  z.object({
231
180
  custom: z.never().optional(),
232
- duration: z.never().optional(),
233
- dateTime: z.never().optional(),
234
- participantRange: z.never().optional()
181
+ duration: z.never().optional()
235
182
  }),
236
183
  z.object({
237
184
  duration: z.never().optional(),
238
- dateTime: z.never().optional(),
239
- participantRange: z.never().optional(),
240
185
  custom: z.string().describe(
241
186
  "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."
242
187
  )
243
188
  }),
244
189
  z.object({
245
190
  custom: z.never().optional(),
246
- dateTime: z.never().optional(),
247
- participantRange: z.never().optional(),
248
191
  duration: z.object({
249
192
  minutes: z.number().int().describe(
250
193
  "Duration of the service in minutes.\nMin: 1 minute, Max: 30 days, 23 hours, and 59 minutes"
@@ -253,30 +196,6 @@ var PreviewPriceResponse = z.object({
253
196
  'Name of the duration option.\nDefaults to the formatted duration e.g. "1 hour, 30 minutes".'
254
197
  ).max(255).optional().nullable()
255
198
  })
256
- }),
257
- z.object({
258
- custom: z.never().optional(),
259
- duration: z.never().optional(),
260
- participantRange: z.never().optional(),
261
- dateTime: z.object({
262
- name: z.string().describe(
263
- 'Name of the date-time rule. For example, "Weekend mornings".'
264
- ).max(255).optional().nullable()
265
- }).describe(
266
- "The matched date-time pricing rule. Available only for `DATE_TIME` options."
267
- )
268
- }),
269
- z.object({
270
- custom: z.never().optional(),
271
- duration: z.never().optional(),
272
- dateTime: z.never().optional(),
273
- participantRange: z.object({
274
- name: z.string().describe(
275
- 'Name of the participants range. For example, "Large group".'
276
- ).max(255).optional().nullable()
277
- }).describe(
278
- "The matched participants pricing rule. Available only for `NUMBER_OF_PARTICIPANTS` options."
279
- )
280
199
  })
281
200
  ])
282
201
  )
@@ -305,22 +224,16 @@ var PreviewPriceResponse = z.object({
305
224
  z.xor([
306
225
  z.object({
307
226
  custom: z.never().optional(),
308
- duration: z.never().optional(),
309
- dateTime: z.never().optional(),
310
- participantRange: z.never().optional()
227
+ duration: z.never().optional()
311
228
  }),
312
229
  z.object({
313
230
  duration: z.never().optional(),
314
- dateTime: z.never().optional(),
315
- participantRange: z.never().optional(),
316
231
  custom: z.string().describe(
317
232
  "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."
318
233
  )
319
234
  }),
320
235
  z.object({
321
236
  custom: z.never().optional(),
322
- dateTime: z.never().optional(),
323
- participantRange: z.never().optional(),
324
237
  duration: z.object({
325
238
  minutes: z.number().int().describe(
326
239
  "Duration of the service in minutes.\nMin: 1 minute, Max: 30 days, 23 hours, and 59 minutes"
@@ -329,30 +242,6 @@ var PreviewPriceResponse = z.object({
329
242
  'Name of the duration option.\nDefaults to the formatted duration e.g. "1 hour, 30 minutes".'
330
243
  ).max(255).optional().nullable()
331
244
  })
332
- }),
333
- z.object({
334
- custom: z.never().optional(),
335
- duration: z.never().optional(),
336
- participantRange: z.never().optional(),
337
- dateTime: z.object({
338
- name: z.string().describe(
339
- 'Name of the date-time rule. For example, "Weekend mornings".'
340
- ).max(255).optional().nullable()
341
- }).describe(
342
- "The matched date-time pricing rule. Available only for `DATE_TIME` options."
343
- )
344
- }),
345
- z.object({
346
- custom: z.never().optional(),
347
- duration: z.never().optional(),
348
- dateTime: z.never().optional(),
349
- participantRange: z.object({
350
- name: z.string().describe(
351
- 'Name of the participants range. For example, "Large group".'
352
- ).max(255).optional().nullable()
353
- }).describe(
354
- "The matched participants pricing rule. Available only for `NUMBER_OF_PARTICIPANTS` options."
355
- )
356
245
  })
357
246
  ])
358
247
  )
@@ -361,7 +250,16 @@ var PreviewPriceResponse = z.object({
361
250
  "Price per participant for this service variant."
362
251
  ).optional().nullable()
363
252
  })
364
- ).max(20).optional()
253
+ ).max(20).optional(),
254
+ localStartDate: z.string().describe(
255
+ '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.'
256
+ ).optional().nullable(),
257
+ localEndDate: z.string().describe(
258
+ '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.'
259
+ ).optional().nullable(),
260
+ timeZone: z.string().describe(
261
+ 'Time zone for `localStartDate` and `localEndDate` in IANA format. For example, `"America/New_York"`.\n\nRequired when `localStartDate` and `localEndDate` are provided.'
262
+ ).optional().nullable()
365
263
  })
366
264
  ).max(20).optional(),
367
265
  deposit: z.number().describe(
@@ -501,7 +399,16 @@ var CalculatePriceRequest = z.object({
501
399
  "NO_SELECTION"
502
400
  ]).optional()
503
401
  })
504
- ).max(3).optional()
402
+ ).max(3).optional(),
403
+ allDay: z.boolean().describe(
404
+ "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`"
405
+ ).optional().nullable(),
406
+ durationUnitType: z.enum(["HOUR", "DAY"]).describe(
407
+ "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`."
408
+ ).optional(),
409
+ durationUnitCount: z.number().int().describe(
410
+ "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`."
411
+ ).min(1).max(1440).optional().nullable()
505
412
  }).describe(
506
413
  "[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`."
507
414
  )
@@ -827,22 +734,16 @@ var CalculatePriceRequest = z.object({
827
734
  z.xor([
828
735
  z.object({
829
736
  custom: z.never().optional(),
830
- duration: z.never().optional(),
831
- dateTime: z.never().optional(),
832
- participantRange: z.never().optional()
737
+ duration: z.never().optional()
833
738
  }),
834
739
  z.object({
835
740
  duration: z.never().optional(),
836
- dateTime: z.never().optional(),
837
- participantRange: z.never().optional(),
838
741
  custom: z.string().describe(
839
742
  "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."
840
743
  )
841
744
  }),
842
745
  z.object({
843
746
  custom: z.never().optional(),
844
- dateTime: z.never().optional(),
845
- participantRange: z.never().optional(),
846
747
  duration: z.object({
847
748
  minutes: z.number().int().describe(
848
749
  "Duration of the service in minutes.\nMin: 1 minute, Max: 30 days, 23 hours, and 59 minutes"
@@ -851,30 +752,6 @@ var CalculatePriceRequest = z.object({
851
752
  'Name of the duration option.\nDefaults to the formatted duration e.g. "1 hour, 30 minutes".'
852
753
  ).max(255).optional().nullable()
853
754
  })
854
- }),
855
- z.object({
856
- custom: z.never().optional(),
857
- duration: z.never().optional(),
858
- participantRange: z.never().optional(),
859
- dateTime: z.object({
860
- name: z.string().describe(
861
- 'Name of the date-time rule. For example, "Weekend mornings".'
862
- ).max(255).optional().nullable()
863
- }).describe(
864
- "The matched date-time pricing rule. Available only for `DATE_TIME` options."
865
- )
866
- }),
867
- z.object({
868
- custom: z.never().optional(),
869
- duration: z.never().optional(),
870
- dateTime: z.never().optional(),
871
- participantRange: z.object({
872
- name: z.string().describe(
873
- 'Name of the participants range. For example, "Large group".'
874
- ).max(255).optional().nullable()
875
- }).describe(
876
- "The matched participants pricing rule. Available only for `NUMBER_OF_PARTICIPANTS` options."
877
- )
878
755
  })
879
756
  ])
880
757
  )
@@ -920,22 +797,16 @@ var CalculatePriceResponse = z.object({
920
797
  z.xor([
921
798
  z.object({
922
799
  custom: z.never().optional(),
923
- duration: z.never().optional(),
924
- dateTime: z.never().optional(),
925
- participantRange: z.never().optional()
800
+ duration: z.never().optional()
926
801
  }),
927
802
  z.object({
928
803
  duration: z.never().optional(),
929
- dateTime: z.never().optional(),
930
- participantRange: z.never().optional(),
931
804
  custom: z.string().describe(
932
805
  "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."
933
806
  )
934
807
  }),
935
808
  z.object({
936
809
  custom: z.never().optional(),
937
- dateTime: z.never().optional(),
938
- participantRange: z.never().optional(),
939
810
  duration: z.object({
940
811
  minutes: z.number().int().describe(
941
812
  "Duration of the service in minutes.\nMin: 1 minute, Max: 30 days, 23 hours, and 59 minutes"
@@ -944,30 +815,6 @@ var CalculatePriceResponse = z.object({
944
815
  'Name of the duration option.\nDefaults to the formatted duration e.g. "1 hour, 30 minutes".'
945
816
  ).max(255).optional().nullable()
946
817
  })
947
- }),
948
- z.object({
949
- custom: z.never().optional(),
950
- duration: z.never().optional(),
951
- participantRange: z.never().optional(),
952
- dateTime: z.object({
953
- name: z.string().describe(
954
- 'Name of the date-time rule. For example, "Weekend mornings".'
955
- ).max(255).optional().nullable()
956
- }).describe(
957
- "The matched date-time pricing rule. Available only for `DATE_TIME` options."
958
- )
959
- }),
960
- z.object({
961
- custom: z.never().optional(),
962
- duration: z.never().optional(),
963
- dateTime: z.never().optional(),
964
- participantRange: z.object({
965
- name: z.string().describe(
966
- 'Name of the participants range. For example, "Large group".'
967
- ).max(255).optional().nullable()
968
- }).describe(
969
- "The matched participants pricing rule. Available only for `NUMBER_OF_PARTICIPANTS` options."
970
- )
971
818
  })
972
819
  ])
973
820
  )
@@ -996,22 +843,16 @@ var CalculatePriceResponse = z.object({
996
843
  z.xor([
997
844
  z.object({
998
845
  custom: z.never().optional(),
999
- duration: z.never().optional(),
1000
- dateTime: z.never().optional(),
1001
- participantRange: z.never().optional()
846
+ duration: z.never().optional()
1002
847
  }),
1003
848
  z.object({
1004
849
  duration: z.never().optional(),
1005
- dateTime: z.never().optional(),
1006
- participantRange: z.never().optional(),
1007
850
  custom: z.string().describe(
1008
851
  "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."
1009
852
  )
1010
853
  }),
1011
854
  z.object({
1012
855
  custom: z.never().optional(),
1013
- dateTime: z.never().optional(),
1014
- participantRange: z.never().optional(),
1015
856
  duration: z.object({
1016
857
  minutes: z.number().int().describe(
1017
858
  "Duration of the service in minutes.\nMin: 1 minute, Max: 30 days, 23 hours, and 59 minutes"
@@ -1020,30 +861,6 @@ var CalculatePriceResponse = z.object({
1020
861
  'Name of the duration option.\nDefaults to the formatted duration e.g. "1 hour, 30 minutes".'
1021
862
  ).max(255).optional().nullable()
1022
863
  })
1023
- }),
1024
- z.object({
1025
- custom: z.never().optional(),
1026
- duration: z.never().optional(),
1027
- participantRange: z.never().optional(),
1028
- dateTime: z.object({
1029
- name: z.string().describe(
1030
- 'Name of the date-time rule. For example, "Weekend mornings".'
1031
- ).max(255).optional().nullable()
1032
- }).describe(
1033
- "The matched date-time pricing rule. Available only for `DATE_TIME` options."
1034
- )
1035
- }),
1036
- z.object({
1037
- custom: z.never().optional(),
1038
- duration: z.never().optional(),
1039
- dateTime: z.never().optional(),
1040
- participantRange: z.object({
1041
- name: z.string().describe(
1042
- 'Name of the participants range. For example, "Large group".'
1043
- ).max(255).optional().nullable()
1044
- }).describe(
1045
- "The matched participants pricing rule. Available only for `NUMBER_OF_PARTICIPANTS` options."
1046
- )
1047
864
  })
1048
865
  ])
1049
866
  )
@@ -1052,7 +869,16 @@ var CalculatePriceResponse = z.object({
1052
869
  "Price per participant for this service variant."
1053
870
  ).optional().nullable()
1054
871
  })
1055
- ).max(20).optional()
872
+ ).max(20).optional(),
873
+ localStartDate: z.string().describe(
874
+ '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.'
875
+ ).optional().nullable(),
876
+ localEndDate: z.string().describe(
877
+ '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.'
878
+ ).optional().nullable(),
879
+ timeZone: z.string().describe(
880
+ 'Time zone for `localStartDate` and `localEndDate` in IANA format. For example, `"America/New_York"`.\n\nRequired when `localStartDate` and `localEndDate` are provided.'
881
+ ).optional().nullable()
1056
882
  })
1057
883
  ).max(20).optional(),
1058
884
  deposit: z.number().describe(