{"version":3,"sources":["../../src/bookings-policy-snapshots-v1-booking-policy-snapshot-booking-policy-snapshots.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const ListPolicySnapshotsByBookingIdsRequest = z.object({\n  bookingIds: z.array(z.string()).min(1).max(100),\n});\nexport const ListPolicySnapshotsByBookingIdsResponse = z.object({\n  bookingPolicySnapshots: z\n    .array(\n      z.object({\n        _id: z\n          .string()\n          .describe('Booking policy snapshot ID.')\n          .regex(\n            /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n            'Must be a valid GUID'\n          )\n          .optional()\n          .nullable(),\n        bookingId: z\n          .string()\n          .describe(\n            \"ID of the booking that's associated with this policy snapshot.\"\n          )\n          .regex(\n            /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n            'Must be a valid GUID'\n          )\n          .optional()\n          .nullable(),\n        policy: z\n          .object({\n            _id: z\n              .string()\n              .describe('Booking policy ID.')\n              .regex(\n                /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n                'Must be a valid GUID'\n              )\n              .optional()\n              .nullable(),\n            revision: z\n              .string()\n              .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n              .describe(\n                'Revision number, which increments by 1 each time the booking policy is updated. To prevent conflicting changes, the current `revision` must be passed when updating the booking policy.'\n              )\n              .optional()\n              .nullable(),\n            _createdDate: z\n              .date()\n              .describe('Date and time the booking policy was created.')\n              .optional()\n              .nullable(),\n            _updatedDate: z\n              .date()\n              .describe('Date and time the booking policy was updated.')\n              .optional()\n              .nullable(),\n            name: z\n              .string()\n              .describe('Name of the booking policy.')\n              .max(400)\n              .optional()\n              .nullable(),\n            customPolicyDescription: z\n              .object({\n                enabled: z\n                  .boolean()\n                  .describe(\n                    'Whether the description is displayed to the participant. `true` means the\\ndescription is displayed.\\n\\nDefault: `false`'\n                  )\n                  .optional(),\n                description: z\n                  .string()\n                  .describe(\n                    'Description of the booking policy.\\n\\nDefault: Empty\\nMax length: 2500 characters'\n                  )\n                  .max(2500)\n                  .optional(),\n                descriptionTranslated: z\n                  .string()\n                  .describe(\n                    'Description of the translated booking policy.\\n\\nDefault: Empty\\nMax length: 2500 characters'\n                  )\n                  .max(2500)\n                  .optional()\n                  .nullable(),\n              })\n              .describe(\n                'Custom description for the booking policy and whether the booking policy is displayed to the participant.'\n              )\n              .optional(),\n            default: z\n              .boolean()\n              .describe('Whether the booking policy is the default.')\n              .optional()\n              .nullable(),\n            cancellationPolicy: z\n              .object({\n                enabled: z\n                  .boolean()\n                  .describe(\n                    'Whether customers can cancel the booking. `true` means customers can cancel\\nthe booking.\\n\\nDefault: `false`'\n                  )\n                  .optional(),\n                limitLatestCancellation: z\n                  .boolean()\n                  .describe(\n                    \"Whether there's a limit on the latest cancellation time. `false` means\\ncustomers can cancel the booking until the last minute before the course or\\nsession starts.\\n\\nDefault: `false`\"\n                  )\n                  .optional(),\n                latestCancellationInMinutes: z\n                  .number()\n                  .int()\n                  .describe(\n                    'Minimum number of minutes before the start of the session customers can cancel.\\nFor courses, this refers to the start of the first course session.\\n\\nDefault: `1440` minutes (1 day)\\nMin: `1` minute'\n                  )\n                  .min(1)\n                  .optional(),\n              })\n              .describe('Rule for canceling a booking.')\n              .optional(),\n            reschedulePolicy: z\n              .object({\n                enabled: z\n                  .boolean()\n                  .describe(\n                    'Whether customers can reschedule a booking for an appointment-based service.\\n`true` means customers can reschedule.\\n\\nDefault: `false`'\n                  )\n                  .optional(),\n                limitLatestReschedule: z\n                  .boolean()\n                  .describe(\n                    \"Whether there's a limit on the latest supported rescheduling time. `false`\\nmeans customers can reschedule until the last minute before the session start.\\n\\nDefault: `false`\"\n                  )\n                  .optional(),\n                latestRescheduleInMinutes: z\n                  .number()\n                  .int()\n                  .describe(\n                    'Minimum number of minutes before the session start session customers can\\nreschedule their booking.\\n\\nDefault: `1440` minutes (1 day)\\nMin: `1` minute'\n                  )\n                  .min(1)\n                  .optional(),\n              })\n              .describe('Rule for rescheduling a booking.')\n              .optional(),\n            cancellationFeePolicy: z\n              .object({\n                enabled: z\n                  .boolean()\n                  .describe(\n                    'Whether customers must pay a cancellation fee when canceling a booking.\\n\\nDefault: `false`'\n                  )\n                  .optional(),\n                cancellationWindows: z\n                  .array(\n                    z.intersection(\n                      z.object({\n                        startInMinutes: z\n                          .number()\n                          .int()\n                          .describe(\n                            'Start of the cancellation window in minutes before the session start. For\\ncourses, this refers to the start of the first course session.'\n                          )\n                          .min(1)\n                          .optional()\n                          .nullable(),\n                      }),\n                      z.xor([\n                        z.object({\n                          amount: z.never().optional(),\n                          percentage: z.never().optional(),\n                        }),\n                        z.object({\n                          percentage: z.never().optional(),\n                          amount: z\n                            .object({\n                              value: z\n                                .string()\n                                .describe(\n                                  'Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative.'\n                                )\n                                .optional(),\n                              currency: z\n                                .string()\n                                .describe(\n                                  'Currency code. Must be valid ISO 4217 currency code (e.g., USD).'\n                                )\n                                .optional(),\n                              formattedValue: z\n                                .string()\n                                .describe(\n                                  'Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative.'\n                                )\n                                .max(50)\n                                .optional()\n                                .nullable(),\n                            })\n                            .describe(\n                              'Fixed amount customers must pay when canceling the booking within this window.'\n                            ),\n                        }),\n                        z.object({\n                          amount: z.never().optional(),\n                          percentage: z\n                            .string()\n                            .describe(\n                              'Percentage of the booking price customers must pay when canceling within this window.\\n\\nMin: `0.01` percent\\nMax: `100` percent'\n                            ),\n                        }),\n                      ])\n                    )\n                  )\n                  .max(2)\n                  .optional(),\n                autoCollectFeeEnabled: z\n                  .boolean()\n                  .describe(\n                    'Whether Wix automatically charges the cancellation fee from the customer once\\nthey cancel their booking.\\n\\nDefault: `true`'\n                  )\n                  .optional()\n                  .nullable(),\n              })\n              .describe('Rules for cancellation fees.')\n              .optional(),\n            saveCreditCardPolicy: z\n              .object({\n                enabled: z\n                  .boolean()\n                  .describe(\n                    'Whether Wix stores credit card details of the customer. Storing the details\\nallows Wix to prefill the checkout and thus increases the likelihood that the\\ncustomer completes the booking process.\\n\\nDefault: `false`'\n                  )\n                  .optional(),\n              })\n              .describe('Rule for saving credit card details.')\n              .optional(),\n          })\n          .describe(\n            'Snapshot of the [booking policy](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction).\\nat the time the corresponding booking was created.'\n          )\n          .optional(),\n        _createdDate: z\n          .date()\n          .describe(\n            'Date and time the booking policy snapshot was created in `YYYY-MM-DDThh:mm:ssZ` format.'\n          )\n          .optional()\n          .nullable(),\n      })\n    )\n    .optional(),\n});\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IAAM,yCAA2C,SAAO;AAAA,EAC7D,YAAc,QAAQ,SAAO,CAAC,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAChD,CAAC;AACM,IAAM,0CAA4C,SAAO;AAAA,EAC9D,wBACG;AAAA,IACG,SAAO;AAAA,MACP,KACG,SAAO,EACP,SAAS,6BAA6B,EACtC;AAAA,QACC;AAAA,QACA;AAAA,MACF,EACC,SAAS,EACT,SAAS;AAAA,MACZ,WACG,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC;AAAA,QACC;AAAA,QACA;AAAA,MACF,EACC,SAAS,EACT,SAAS;AAAA,MACZ,QACG,SAAO;AAAA,QACN,KACG,SAAO,EACP,SAAS,oBAAoB,EAC7B;AAAA,UACC;AAAA,UACA;AAAA,QACF,EACC,SAAS,EACT,SAAS;AAAA,QACZ,UACG,SAAO,EACP,MAAM,WAAW,8BAA8B,EAC/C;AAAA,UACC;AAAA,QACF,EACC,SAAS,EACT,SAAS;AAAA,QACZ,cACG,OAAK,EACL,SAAS,+CAA+C,E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