"use strict";
const z = require("zod");
const index = require("./orgDomains-W_rFTMBa.cjs");
const client = require("@prisma/client");
function _interopNamespaceDefault(e) {
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
  if (e) {
    for (const k in e) {
      if (k !== "default") {
        const d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: () => e[k]
        });
      }
    }
  }
  n.default = e;
  return Object.freeze(n);
}
const z__namespace = /* @__PURE__ */ _interopNamespaceDefault(z);
const _HostModel = z__namespace.object({
  userId: z__namespace.number().int(),
  eventTypeId: z__namespace.number().int(),
  isFixed: z__namespace.boolean(),
  priority: z__namespace.number().int().nullish(),
  weight: z__namespace.number().int().nullish(),
  weightAdjustment: z__namespace.number().int().nullish(),
  scheduleId: z__namespace.number().int().nullish(),
  createdAt: z__namespace.date()
});
const HostModel = z__namespace.lazy(() => _HostModel.extend({
  user: UserModel,
  eventType: EventTypeModel,
  schedule: ScheduleModel.nullish()
}));
const _CalVideoSettingsModel = z__namespace.object({
  eventTypeId: z__namespace.number().int(),
  disableRecordingForOrganizer: z__namespace.boolean(),
  disableRecordingForGuests: z__namespace.boolean(),
  enableAutomaticTranscription: z__namespace.boolean(),
  enableAutomaticRecordingForOrganizer: z__namespace.boolean(),
  redirectUrlOnExit: z__namespace.string().nullish(),
  disableTranscriptionForGuests: z__namespace.boolean(),
  disableTranscriptionForOrganizer: z__namespace.boolean(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date()
});
const CalVideoSettingsModel = z__namespace.lazy(() => _CalVideoSettingsModel.extend({
  eventType: EventTypeModel
}));
const literalSchema$k = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$k = z__namespace.lazy(() => z__namespace.union([literalSchema$k, z__namespace.array(jsonSchema$k), z__namespace.record(jsonSchema$k)]));
const _EventTypeModel = z__namespace.object({
  id: z__namespace.number().int(),
  title: z__namespace.string().min(1),
  slug: index.eventTypeSlug,
  description: z__namespace.string().nullish(),
  interfaceLanguage: z__namespace.string().nullish(),
  position: z__namespace.number().int(),
  locations: index.eventTypeLocations,
  length: z__namespace.number().int().min(1),
  offsetStart: z__namespace.number().int(),
  hidden: z__namespace.boolean(),
  userId: z__namespace.number().int().nullish(),
  profileId: z__namespace.number().int().nullish(),
  teamId: z__namespace.number().int().nullish(),
  useEventLevelSelectedCalendars: z__namespace.boolean(),
  eventName: z__namespace.string().nullish(),
  parentId: z__namespace.number().int().nullish(),
  bookingFields: index.eventTypeBookingFields,
  timeZone: z__namespace.string().nullish(),
  periodType: z__namespace.nativeEnum(client.PeriodType),
  periodStartDate: index.coerceToDate.nullish(),
  periodEndDate: index.coerceToDate.nullish(),
  periodDays: z__namespace.number().int().nullish(),
  periodCountCalendarDays: z__namespace.boolean().nullish(),
  lockTimeZoneToggleOnBookingPage: z__namespace.boolean(),
  lockedTimeZone: z__namespace.string().nullish(),
  requiresConfirmation: z__namespace.boolean(),
  requiresConfirmationWillBlockSlot: z__namespace.boolean(),
  requiresConfirmationForFreeEmail: z__namespace.boolean(),
  requiresBookerEmailVerification: z__namespace.boolean(),
  canSendCalVideoTranscriptionEmails: z__namespace.boolean(),
  autoTranslateDescriptionEnabled: z__namespace.boolean(),
  recurringEvent: index.recurringEventType,
  disableGuests: z__namespace.boolean(),
  hideCalendarNotes: z__namespace.boolean(),
  hideCalendarEventDetails: z__namespace.boolean(),
  minimumBookingNotice: z__namespace.number().int().min(0),
  beforeEventBuffer: z__namespace.number().int(),
  afterEventBuffer: z__namespace.number().int(),
  seatsPerTimeSlot: z__namespace.number().int().nullish(),
  onlyShowFirstAvailableSlot: z__namespace.boolean(),
  disableCancelling: z__namespace.boolean().nullish(),
  disableRescheduling: z__namespace.boolean().nullish(),
  seatsShowAttendees: z__namespace.boolean().nullish(),
  seatsShowAvailabilityCount: z__namespace.boolean().nullish(),
  schedulingType: z__namespace.nativeEnum(client.SchedulingType).nullish(),
  scheduleId: z__namespace.number().int().nullish(),
  allowReschedulingCancelledBookings: z__namespace.boolean().nullish(),
  price: z__namespace.number().int(),
  currency: z__namespace.string(),
  slotInterval: z__namespace.number().int().nullish(),
  metadata: index.EventTypeMetaDataSchema,
  successRedirectUrl: index.successRedirectUrl.nullish(),
  forwardParamsSuccessRedirect: z__namespace.boolean().nullish(),
  bookingLimits: index.intervalLimitsType,
  durationLimits: index.intervalLimitsType,
  isInstantEvent: z__namespace.boolean(),
  instantMeetingExpiryTimeOffsetInSeconds: z__namespace.number().int(),
  instantMeetingScheduleId: z__namespace.number().int().nullish(),
  instantMeetingParameters: z__namespace.string().array(),
  assignAllTeamMembers: z__namespace.boolean(),
  assignRRMembersUsingSegment: z__namespace.boolean(),
  rrSegmentQueryValue: index.rrSegmentQueryValueSchema,
  useEventTypeDestinationCalendarEmail: z__namespace.boolean(),
  isRRWeightsEnabled: z__namespace.boolean(),
  maxLeadThreshold: z__namespace.number().int().nullish(),
  includeNoShowInRRCalculation: z__namespace.boolean(),
  allowReschedulingPastBookings: z__namespace.boolean(),
  hideOrganizerEmail: z__namespace.boolean(),
  maxActiveBookingsPerBooker: z__namespace.number().int().nullish(),
  maxActiveBookingPerBookerOfferReschedule: z__namespace.boolean(),
  customReplyToEmail: index.emailSchema$1.nullish(),
  eventTypeColor: index.eventTypeColor,
  rescheduleWithSameRoundRobinHost: z__namespace.boolean(),
  secondaryEmailId: z__namespace.number().int().nullish(),
  useBookerTimezone: z__namespace.boolean(),
  restrictionScheduleId: z__namespace.number().int().nullish()
});
const EventTypeModel = z__namespace.lazy(() => _EventTypeModel.extend({
  hosts: HostModel.array(),
  users: UserModel.array(),
  owner: UserModel.nullish(),
  profile: ProfileModel.nullish(),
  team: TeamModel.nullish(),
  hashedLink: HashedLinkModel.array(),
  bookings: BookingModel.array(),
  availability: AvailabilityModel.array(),
  webhooks: WebhookModel.array(),
  destinationCalendar: DestinationCalendarModel.nullish(),
  customInputs: EventTypeCustomInputModel.array(),
  parent: EventTypeModel.nullish(),
  children: EventTypeModel.array(),
  schedule: ScheduleModel.nullish(),
  workflows: WorkflowsOnEventTypesModel.array(),
  instantMeetingSchedule: ScheduleModel.nullish(),
  aiPhoneCallConfig: AIPhoneCallConfigurationModel.nullish(),
  fieldTranslations: EventTypeTranslationModel.array(),
  selectedCalendars: SelectedCalendarModel.array(),
  calVideoSettings: CalVideoSettingsModel.nullish(),
  secondaryEmail: SecondaryEmailModel.nullish(),
  restrictionSchedule: ScheduleModel.nullish()
}));
const literalSchema$j = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$j = z__namespace.lazy(() => z__namespace.union([literalSchema$j, z__namespace.array(jsonSchema$j), z__namespace.record(jsonSchema$j)]));
const _CredentialModel = z__namespace.object({
  id: z__namespace.number().int(),
  type: z__namespace.string(),
  key: jsonSchema$j,
  userId: z__namespace.number().int().nullish(),
  teamId: z__namespace.number().int().nullish(),
  appId: z__namespace.string().nullish(),
  subscriptionId: z__namespace.string().nullish(),
  paymentStatus: z__namespace.string().nullish(),
  billingCycleStart: z__namespace.number().int().nullish(),
  invalid: z__namespace.boolean().nullish(),
  delegationCredentialId: z__namespace.string().nullish()
});
const CredentialModel = z__namespace.lazy(() => _CredentialModel.extend({
  user: UserModel.nullish(),
  team: TeamModel.nullish(),
  app: AppModel.nullish(),
  destinationCalendars: DestinationCalendarModel.array(),
  selectedCalendars: SelectedCalendarModel.array(),
  CalendarCache: CalendarCacheModel.array(),
  references: BookingReferenceModel.array(),
  delegationCredential: DelegationCredentialModel.nullish()
}));
const _DestinationCalendarModel = z__namespace.object({
  id: z__namespace.number().int(),
  integration: z__namespace.string(),
  externalId: z__namespace.string(),
  primaryEmail: index.emailSchema$1.nullish(),
  userId: z__namespace.number().int().nullish(),
  eventTypeId: z__namespace.number().int().nullish(),
  credentialId: z__namespace.number().int().nullish(),
  createdAt: z__namespace.date().nullish(),
  updatedAt: z__namespace.date().nullish(),
  delegationCredentialId: z__namespace.string().nullish(),
  domainWideDelegationCredentialId: z__namespace.string().nullish()
});
const DestinationCalendarModel = z__namespace.lazy(() => _DestinationCalendarModel.extend({
  user: UserModel.nullish(),
  booking: BookingModel.array(),
  eventType: EventTypeModel.nullish(),
  credential: CredentialModel.nullish(),
  delegationCredential: DelegationCredentialModel.nullish(),
  domainWideDelegation: DomainWideDelegationModel.nullish()
}));
const _UserPasswordModel = z__namespace.object({
  hash: z__namespace.string(),
  userId: z__namespace.number().int()
});
const UserPasswordModel = z__namespace.lazy(() => _UserPasswordModel.extend({
  user: UserModel
}));
const _TravelScheduleModel = z__namespace.object({
  id: z__namespace.number().int(),
  userId: z__namespace.number().int(),
  timeZone: z__namespace.string(),
  startDate: z__namespace.date(),
  endDate: z__namespace.date().nullish(),
  prevTimeZone: z__namespace.string().nullish()
});
const TravelScheduleModel = z__namespace.lazy(() => _TravelScheduleModel.extend({
  user: UserModel
}));
const literalSchema$i = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$i = z__namespace.lazy(() => z__namespace.union([literalSchema$i, z__namespace.array(jsonSchema$i), z__namespace.record(jsonSchema$i)]));
const _UserModel = z__namespace.object({
  id: z__namespace.number().int(),
  username: z__namespace.string().nullish(),
  name: z__namespace.string().nullish(),
  email: index.emailSchema$1,
  emailVerified: z__namespace.date().nullish(),
  bio: z__namespace.string().nullish(),
  avatarUrl: z__namespace.string().nullish(),
  timeZone: z__namespace.string(),
  weekStart: z__namespace.string(),
  startTime: z__namespace.number().int(),
  endTime: z__namespace.number().int(),
  bufferTime: z__namespace.number().int(),
  hideBranding: z__namespace.boolean(),
  theme: z__namespace.string().nullish(),
  appTheme: z__namespace.string().nullish(),
  createdDate: z__namespace.date(),
  trialEndsAt: z__namespace.date().nullish(),
  lastActiveAt: z__namespace.date().nullish(),
  defaultScheduleId: z__namespace.number().int().nullish(),
  completedOnboarding: z__namespace.boolean(),
  locale: z__namespace.string().nullish(),
  timeFormat: z__namespace.number().int().nullish(),
  twoFactorSecret: z__namespace.string().nullish(),
  twoFactorEnabled: z__namespace.boolean(),
  backupCodes: z__namespace.string().nullish(),
  identityProvider: z__namespace.nativeEnum(client.IdentityProvider),
  identityProviderId: z__namespace.string().nullish(),
  invitedTo: z__namespace.number().int().nullish(),
  brandColor: z__namespace.string().nullish(),
  darkBrandColor: z__namespace.string().nullish(),
  allowDynamicBooking: z__namespace.boolean().nullish(),
  allowSEOIndexing: z__namespace.boolean().nullish(),
  receiveMonthlyDigestEmail: z__namespace.boolean().nullish(),
  metadata: index.userMetadata,
  verified: z__namespace.boolean().nullish(),
  role: z__namespace.nativeEnum(client.UserPermissionRole),
  disableImpersonation: z__namespace.boolean(),
  organizationId: z__namespace.number().int().nullish(),
  locked: z__namespace.boolean(),
  movedToProfileId: z__namespace.number().int().nullish(),
  isPlatformManaged: z__namespace.boolean(),
  smsLockState: z__namespace.nativeEnum(client.SMSLockState),
  smsLockReviewedByAdmin: z__namespace.boolean(),
  referralLinkId: z__namespace.string().nullish(),
  creationSource: z__namespace.nativeEnum(client.CreationSource).nullish(),
  whitelistWorkflows: z__namespace.boolean()
});
const UserModel = z__namespace.lazy(() => _UserModel.extend({
  password: UserPasswordModel.nullish(),
  travelSchedules: TravelScheduleModel.array(),
  eventTypes: EventTypeModel.array(),
  credentials: CredentialModel.array(),
  teams: MembershipModel.array(),
  bookings: BookingModel.array(),
  schedules: ScheduleModel.array(),
  selectedCalendars: SelectedCalendarModel.array(),
  availability: AvailabilityModel.array(),
  webhooks: WebhookModel.array(),
  destinationCalendar: DestinationCalendarModel.nullish(),
  impersonatedUsers: ImpersonationsModel.array(),
  impersonatedBy: ImpersonationsModel.array(),
  apiKeys: ApiKeyModel.array(),
  accounts: AccountModel.array(),
  sessions: SessionModel.array(),
  Feedback: FeedbackModel.array(),
  ownedEventTypes: EventTypeModel.array(),
  workflows: WorkflowModel.array(),
  routingForms: App_RoutingForms_FormModel.array(),
  updatedRoutingForms: App_RoutingForms_FormModel.array(),
  verifiedNumbers: VerifiedNumberModel.array(),
  verifiedEmails: VerifiedEmailModel.array(),
  hosts: HostModel.array(),
  organization: TeamModel.nullish(),
  accessCodes: AccessCodeModel.array(),
  bookingRedirects: OutOfOfficeEntryModel.array(),
  bookingRedirectsTo: OutOfOfficeEntryModel.array(),
  platformOAuthClients: PlatformOAuthClientModel.array(),
  AccessToken: AccessTokenModel.array(),
  RefreshToken: RefreshTokenModel.array(),
  PlatformAuthorizationToken: PlatformAuthorizationTokenModel.array(),
  profiles: ProfileModel.array(),
  movedToProfile: ProfileModel.nullish(),
  secondaryEmails: SecondaryEmailModel.array(),
  OutOfOfficeReasons: OutOfOfficeReasonModel.array(),
  NotificationsSubscriptions: NotificationsSubscriptionsModel.array(),
  features: UserFeaturesModel.array(),
  reassignedBookings: BookingModel.array(),
  createdAttributeToUsers: AttributeToUserModel.array(),
  updatedAttributeToUsers: AttributeToUserModel.array(),
  createdTranslations: EventTypeTranslationModel.array(),
  updatedTranslations: EventTypeTranslationModel.array(),
  createdWatchlists: WatchlistModel.array(),
  updatedWatchlists: WatchlistModel.array(),
  BookingInternalNote: BookingInternalNoteModel.array(),
  createdOrganizationOnboardings: OrganizationOnboardingModel.array(),
  filterSegments: FilterSegmentModel.array(),
  filterSegmentPreferences: UserFilterSegmentPreferenceModel.array(),
  creditBalance: CreditBalanceModel.nullish()
}));
const _NotificationsSubscriptionsModel = z__namespace.object({
  id: z__namespace.number().int(),
  userId: z__namespace.number().int(),
  subscription: z__namespace.string()
});
const NotificationsSubscriptionsModel = z__namespace.lazy(() => _NotificationsSubscriptionsModel.extend({
  user: UserModel
}));
const _ProfileModel = z__namespace.object({
  id: z__namespace.number().int(),
  uid: z__namespace.string(),
  userId: z__namespace.number().int(),
  organizationId: z__namespace.number().int(),
  username: z__namespace.string(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date()
});
const ProfileModel = z__namespace.lazy(() => _ProfileModel.extend({
  user: UserModel,
  organization: TeamModel,
  eventTypes: EventTypeModel.array(),
  movedFromUser: UserModel.nullish()
}));
const literalSchema$h = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$h = z__namespace.lazy(() => z__namespace.union([literalSchema$h, z__namespace.array(jsonSchema$h), z__namespace.record(jsonSchema$h)]));
const _TeamModel = z__namespace.object({
  id: z__namespace.number().int(),
  name: z__namespace.string().min(1),
  slug: z__namespace.string().min(1).nullish(),
  logoUrl: z__namespace.string().nullish(),
  calVideoLogo: z__namespace.string().nullish(),
  appLogo: z__namespace.string().nullish(),
  appIconLogo: z__namespace.string().nullish(),
  bio: z__namespace.string().nullish(),
  hideBranding: z__namespace.boolean(),
  hideTeamProfileLink: z__namespace.boolean(),
  isPrivate: z__namespace.boolean(),
  hideBookATeamMember: z__namespace.boolean(),
  createdAt: z__namespace.date(),
  metadata: index.teamMetadataSchema,
  theme: z__namespace.string().nullish(),
  rrResetInterval: z__namespace.nativeEnum(client.RRResetInterval).nullish(),
  rrTimestampBasis: z__namespace.nativeEnum(client.RRTimestampBasis),
  brandColor: z__namespace.string().nullish(),
  darkBrandColor: z__namespace.string().nullish(),
  bannerUrl: z__namespace.string().nullish(),
  parentId: z__namespace.number().int().nullish(),
  timeFormat: z__namespace.number().int().nullish(),
  timeZone: z__namespace.string(),
  weekStart: z__namespace.string(),
  isOrganization: z__namespace.boolean(),
  pendingPayment: z__namespace.boolean(),
  isPlatform: z__namespace.boolean(),
  createdByOAuthClientId: z__namespace.string().nullish(),
  smsLockState: z__namespace.nativeEnum(client.SMSLockState),
  smsLockReviewedByAdmin: z__namespace.boolean(),
  bookingLimits: index.intervalLimitsType,
  includeManagedEventsInLimits: z__namespace.boolean()
});
const TeamModel = z__namespace.lazy(() => _TeamModel.extend({
  members: MembershipModel.array(),
  eventTypes: EventTypeModel.array(),
  workflows: WorkflowModel.array(),
  verifiedNumbers: VerifiedNumberModel.array(),
  verifiedEmails: VerifiedEmailModel.array(),
  parent: TeamModel.nullish(),
  children: TeamModel.array(),
  orgUsers: UserModel.array(),
  inviteTokens: VerificationTokenModel.array(),
  webhooks: WebhookModel.array(),
  routingForms: App_RoutingForms_FormModel.array(),
  apiKeys: ApiKeyModel.array(),
  credentials: CredentialModel.array(),
  accessCodes: AccessCodeModel.array(),
  organizationSettings: OrganizationSettingsModel.nullish(),
  instantMeetingTokens: InstantMeetingTokenModel.array(),
  orgProfiles: ProfileModel.array(),
  dsyncTeamGroupMapping: DSyncTeamGroupMappingModel.array(),
  platformOAuthClient: PlatformOAuthClientModel.array(),
  createdByOAuthClient: PlatformOAuthClientModel.nullish(),
  platformBilling: PlatformBillingModel.nullish(),
  activeOrgWorkflows: WorkflowsOnTeamsModel.array(),
  attributes: AttributeModel.array(),
  delegationCredentials: DelegationCredentialModel.array(),
  domainWideDelegations: DomainWideDelegationModel.array(),
  roles: RoleModel.array(),
  features: TeamFeaturesModel.array(),
  internalNotePresets: InternalNotePresetModel.array(),
  creditBalance: CreditBalanceModel.nullish(),
  organizationOnboarding: OrganizationOnboardingModel.nullish(),
  managedOrganization: ManagedOrganizationModel.nullish(),
  managedOrganizations: ManagedOrganizationModel.array(),
  filterSegments: FilterSegmentModel.array()
}));
const _CreditBalanceModel = z__namespace.object({
  id: z__namespace.string(),
  teamId: z__namespace.number().int().nullish(),
  userId: z__namespace.number().int().nullish(),
  additionalCredits: z__namespace.number().int(),
  limitReachedAt: z__namespace.date().nullish(),
  warningSentAt: z__namespace.date().nullish()
});
const CreditBalanceModel = z__namespace.lazy(() => _CreditBalanceModel.extend({
  team: TeamModel.nullish(),
  user: UserModel.nullish(),
  expenseLogs: CreditExpenseLogModel.array(),
  purchaseLogs: CreditPurchaseLogModel.array()
}));
const _CreditPurchaseLogModel = z__namespace.object({
  id: z__namespace.string(),
  creditBalanceId: z__namespace.string(),
  credits: z__namespace.number().int(),
  createdAt: z__namespace.date()
});
const CreditPurchaseLogModel = z__namespace.lazy(() => _CreditPurchaseLogModel.extend({
  creditBalance: CreditBalanceModel
}));
const _CreditExpenseLogModel = z__namespace.object({
  id: z__namespace.string(),
  creditBalanceId: z__namespace.string(),
  bookingUid: z__namespace.string().nullish(),
  credits: z__namespace.number().int().nullish(),
  creditType: z__namespace.nativeEnum(client.CreditType),
  date: z__namespace.date(),
  smsSid: z__namespace.string().nullish(),
  smsSegments: z__namespace.number().int().nullish()
});
const CreditExpenseLogModel = z__namespace.lazy(() => _CreditExpenseLogModel.extend({
  creditBalance: CreditBalanceModel,
  booking: BookingModel.nullish()
}));
const _OrganizationSettingsModel = z__namespace.object({
  id: z__namespace.number().int(),
  organizationId: z__namespace.number().int(),
  isOrganizationConfigured: z__namespace.boolean(),
  isOrganizationVerified: z__namespace.boolean(),
  orgAutoAcceptEmail: z__namespace.string(),
  lockEventTypeCreationForUsers: z__namespace.boolean(),
  adminGetsNoSlotsNotification: z__namespace.boolean(),
  isAdminReviewed: z__namespace.boolean(),
  isAdminAPIEnabled: z__namespace.boolean(),
  allowSEOIndexing: z__namespace.boolean(),
  orgProfileRedirectsToVerifiedDomain: z__namespace.boolean(),
  disablePhoneOnlySMSNotifications: z__namespace.boolean()
});
const OrganizationSettingsModel = z__namespace.lazy(() => _OrganizationSettingsModel.extend({
  organization: TeamModel,
  dSyncData: DSyncDataModel.nullish()
}));
const _MembershipModel = z__namespace.object({
  id: z__namespace.number().int(),
  teamId: z__namespace.number().int(),
  userId: z__namespace.number().int(),
  accepted: z__namespace.boolean(),
  role: z__namespace.nativeEnum(client.MembershipRole),
  customRoleId: z__namespace.string().nullish(),
  disableImpersonation: z__namespace.boolean(),
  createdAt: z__namespace.date().nullish(),
  updatedAt: z__namespace.date().nullish()
});
const MembershipModel = z__namespace.lazy(() => _MembershipModel.extend({
  customRole: RoleModel.nullish(),
  team: TeamModel,
  user: UserModel,
  AttributeToUser: AttributeToUserModel.array()
}));
const _VerificationTokenModel = z__namespace.object({
  id: z__namespace.number().int(),
  identifier: z__namespace.string(),
  token: z__namespace.string(),
  expires: z__namespace.date(),
  expiresInDays: z__namespace.number().int().nullish(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date(),
  teamId: z__namespace.number().int().nullish(),
  secondaryEmailId: z__namespace.number().int().nullish()
});
const VerificationTokenModel = z__namespace.lazy(() => _VerificationTokenModel.extend({
  team: TeamModel.nullish(),
  secondaryEmail: SecondaryEmailModel.nullish()
}));
const _InstantMeetingTokenModel = z__namespace.object({
  id: z__namespace.number().int(),
  token: z__namespace.string(),
  expires: z__namespace.date(),
  teamId: z__namespace.number().int(),
  bookingId: z__namespace.number().int().nullish(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date()
});
const InstantMeetingTokenModel = z__namespace.lazy(() => _InstantMeetingTokenModel.extend({
  team: TeamModel,
  booking: BookingModel.nullish()
}));
const _BookingReferenceModel = z__namespace.object({
  id: z__namespace.number().int(),
  type: z__namespace.string().min(1),
  uid: z__namespace.string().min(1),
  meetingId: z__namespace.string().nullish(),
  thirdPartyRecurringEventId: z__namespace.string().nullish(),
  meetingPassword: z__namespace.string().nullish(),
  meetingUrl: z__namespace.string().nullish(),
  bookingId: z__namespace.number().int().nullish(),
  externalCalendarId: z__namespace.string().nullish(),
  deleted: z__namespace.boolean().nullish(),
  credentialId: z__namespace.number().int().nullish(),
  delegationCredentialId: z__namespace.string().nullish(),
  domainWideDelegationCredentialId: z__namespace.string().nullish()
});
const BookingReferenceModel = z__namespace.lazy(() => _BookingReferenceModel.extend({
  booking: BookingModel.nullish(),
  credential: CredentialModel.nullish(),
  delegationCredential: DelegationCredentialModel.nullish(),
  domainWideDelegation: DomainWideDelegationModel.nullish()
}));
const _AttendeeModel = z__namespace.object({
  id: z__namespace.number().int(),
  email: z__namespace.string(),
  name: z__namespace.string(),
  timeZone: z__namespace.string(),
  phoneNumber: z__namespace.string().nullish(),
  locale: z__namespace.string().nullish(),
  bookingId: z__namespace.number().int().nullish(),
  noShow: z__namespace.boolean().nullish()
});
const AttendeeModel = z__namespace.lazy(() => _AttendeeModel.extend({
  booking: BookingModel.nullish(),
  bookingSeat: BookingSeatModel.nullish()
}));
const literalSchema$g = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$g = z__namespace.lazy(() => z__namespace.union([literalSchema$g, z__namespace.array(jsonSchema$g), z__namespace.record(jsonSchema$g)]));
const _BookingModel = z__namespace.object({
  id: z__namespace.number().int(),
  uid: z__namespace.string(),
  idempotencyKey: z__namespace.string().nullish(),
  userId: z__namespace.number().int().nullish(),
  userPrimaryEmail: index.emailSchema$1.nullish(),
  eventTypeId: z__namespace.number().int().nullish(),
  title: z__namespace.string(),
  description: z__namespace.string().nullish(),
  customInputs: jsonSchema$g,
  responses: index.bookingResponses,
  startTime: z__namespace.date(),
  endTime: z__namespace.date(),
  location: z__namespace.string().nullish(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date().nullish(),
  status: z__namespace.nativeEnum(client.BookingStatus),
  paid: z__namespace.boolean(),
  destinationCalendarId: z__namespace.number().int().nullish(),
  cancellationReason: z__namespace.string().nullish(),
  rejectionReason: z__namespace.string().nullish(),
  reassignReason: z__namespace.string().nullish(),
  reassignById: z__namespace.number().int().nullish(),
  dynamicEventSlugRef: z__namespace.string().nullish(),
  dynamicGroupSlugRef: z__namespace.string().nullish(),
  rescheduled: z__namespace.boolean().nullish(),
  fromReschedule: z__namespace.string().nullish(),
  recurringEventId: z__namespace.string().nullish(),
  smsReminderNumber: z__namespace.string().nullish(),
  scheduledJobs: z__namespace.string().array(),
  metadata: index.bookingMetadataSchema,
  isRecorded: z__namespace.boolean(),
  iCalUID: z__namespace.string().nullish(),
  iCalSequence: z__namespace.number().int(),
  rating: z__namespace.number().int().nullish(),
  ratingFeedback: z__namespace.string().nullish(),
  noShowHost: z__namespace.boolean().nullish(),
  oneTimePassword: z__namespace.string().nullish(),
  cancelledBy: z__namespace.string().email().nullish(),
  rescheduledBy: z__namespace.string().email().nullish(),
  creationSource: z__namespace.nativeEnum(client.CreationSource).nullish()
});
const BookingModel = z__namespace.lazy(() => _BookingModel.extend({
  user: UserModel.nullish(),
  references: BookingReferenceModel.array(),
  eventType: EventTypeModel.nullish(),
  attendees: AttendeeModel.array(),
  payment: PaymentModel.array(),
  destinationCalendar: DestinationCalendarModel.nullish(),
  reassignBy: UserModel.nullish(),
  workflowReminders: WorkflowReminderModel.array(),
  seatsReferences: BookingSeatModel.array(),
  instantMeetingToken: InstantMeetingTokenModel.nullish(),
  scheduledTriggers: WebhookScheduledTriggersModel.array(),
  routedFromRoutingFormReponse: App_RoutingForms_FormResponseModel.nullish(),
  assignmentReason: AssignmentReasonModel.array(),
  internalNote: BookingInternalNoteModel.array(),
  tracking: TrackingModel.nullish(),
  routingFormResponses: RoutingFormResponseDenormalizedModel.array(),
  expenseLogs: CreditExpenseLogModel.array()
}));
const _TrackingModel = z__namespace.object({
  id: z__namespace.number().int(),
  bookingId: z__namespace.number().int(),
  utm_source: z__namespace.string().nullish(),
  utm_medium: z__namespace.string().nullish(),
  utm_campaign: z__namespace.string().nullish(),
  utm_term: z__namespace.string().nullish(),
  utm_content: z__namespace.string().nullish()
});
const TrackingModel = z__namespace.lazy(() => _TrackingModel.extend({
  booking: BookingModel
}));
const _ScheduleModel = z__namespace.object({
  id: z__namespace.number().int(),
  userId: z__namespace.number().int(),
  name: z__namespace.string(),
  timeZone: z__namespace.string().nullish()
});
const ScheduleModel = z__namespace.lazy(() => _ScheduleModel.extend({
  user: UserModel,
  eventType: EventTypeModel.array(),
  instantMeetingEvents: EventTypeModel.array(),
  restrictionSchedule: EventTypeModel.array(),
  availability: AvailabilityModel.array(),
  Host: HostModel.array()
}));
const _AvailabilityModel = z__namespace.object({
  id: z__namespace.number().int(),
  userId: z__namespace.number().int().nullish(),
  eventTypeId: z__namespace.number().int().nullish(),
  days: z__namespace.number().int().array(),
  startTime: z__namespace.date(),
  endTime: z__namespace.date(),
  date: z__namespace.date().nullish(),
  scheduleId: z__namespace.number().int().nullish()
});
const AvailabilityModel = z__namespace.lazy(() => _AvailabilityModel.extend({
  user: UserModel.nullish(),
  eventType: EventTypeModel.nullish(),
  Schedule: ScheduleModel.nullish()
}));
const _SelectedCalendarModel = z__namespace.object({
  id: z__namespace.string(),
  userId: z__namespace.number().int(),
  integration: z__namespace.string(),
  externalId: z__namespace.string(),
  credentialId: z__namespace.number().int().nullish(),
  createdAt: z__namespace.date().nullish(),
  updatedAt: z__namespace.date().nullish(),
  googleChannelId: z__namespace.string().nullish(),
  googleChannelKind: z__namespace.string().nullish(),
  googleChannelResourceId: z__namespace.string().nullish(),
  googleChannelResourceUri: z__namespace.string().nullish(),
  googleChannelExpiration: z__namespace.string().nullish(),
  delegationCredentialId: z__namespace.string().nullish(),
  domainWideDelegationCredentialId: z__namespace.string().nullish(),
  error: z__namespace.string().nullish(),
  lastErrorAt: z__namespace.date().nullish(),
  watchAttempts: z__namespace.number().int(),
  unwatchAttempts: z__namespace.number().int(),
  maxAttempts: z__namespace.number().int(),
  eventTypeId: z__namespace.number().int().nullish()
});
const SelectedCalendarModel = z__namespace.lazy(() => _SelectedCalendarModel.extend({
  user: UserModel,
  credential: CredentialModel.nullish(),
  delegationCredential: DelegationCredentialModel.nullish(),
  domainWideDelegationCredential: DomainWideDelegationModel.nullish(),
  eventType: EventTypeModel.nullish()
}));
const literalSchema$f = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$f = z__namespace.lazy(() => z__namespace.union([literalSchema$f, z__namespace.array(jsonSchema$f), z__namespace.record(jsonSchema$f)]));
const _EventTypeCustomInputModel = z__namespace.object({
  id: z__namespace.number().int(),
  eventTypeId: z__namespace.number().int(),
  label: z__namespace.string(),
  type: z__namespace.nativeEnum(client.EventTypeCustomInputType),
  options: index.customInputOptionSchema,
  required: z__namespace.boolean(),
  placeholder: z__namespace.string()
});
const EventTypeCustomInputModel = z__namespace.lazy(() => _EventTypeCustomInputModel.extend({
  eventType: EventTypeModel
}));
z__namespace.object({
  id: z__namespace.string(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date(),
  email: z__namespace.string(),
  expires: z__namespace.date()
});
z__namespace.object({
  id: z__namespace.number().int(),
  referenceId: z__namespace.number().int(),
  reminderType: z__namespace.nativeEnum(client.ReminderType),
  elapsedMinutes: z__namespace.number().int(),
  createdAt: z__namespace.date()
});
const literalSchema$e = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$e = z__namespace.lazy(() => z__namespace.union([literalSchema$e, z__namespace.array(jsonSchema$e), z__namespace.record(jsonSchema$e)]));
const _PaymentModel = z__namespace.object({
  id: z__namespace.number().int(),
  uid: z__namespace.string(),
  appId: z__namespace.string().nullish(),
  bookingId: z__namespace.number().int(),
  amount: z__namespace.number().int(),
  fee: z__namespace.number().int(),
  currency: z__namespace.string(),
  success: z__namespace.boolean(),
  refunded: z__namespace.boolean(),
  data: jsonSchema$e,
  externalId: z__namespace.string(),
  paymentOption: z__namespace.nativeEnum(client.PaymentOption).nullish()
});
const PaymentModel = z__namespace.lazy(() => _PaymentModel.extend({
  app: AppModel.nullish(),
  booking: BookingModel.nullish()
}));
const _WebhookModel = z__namespace.object({
  id: z__namespace.string(),
  userId: z__namespace.number().int().nullish(),
  teamId: z__namespace.number().int().nullish(),
  eventTypeId: z__namespace.number().int().nullish(),
  platformOAuthClientId: z__namespace.string().nullish(),
  subscriberUrl: z__namespace.string().url(),
  payloadTemplate: z__namespace.string().nullish(),
  createdAt: z__namespace.date(),
  active: z__namespace.boolean(),
  eventTriggers: z__namespace.nativeEnum(client.WebhookTriggerEvents).array(),
  appId: z__namespace.string().nullish(),
  secret: z__namespace.string().nullish(),
  platform: z__namespace.boolean(),
  time: z__namespace.number().int().nullish(),
  timeUnit: z__namespace.nativeEnum(client.TimeUnit).nullish()
});
const WebhookModel = z__namespace.lazy(() => _WebhookModel.extend({
  user: UserModel.nullish(),
  team: TeamModel.nullish(),
  eventType: EventTypeModel.nullish(),
  platformOAuthClient: PlatformOAuthClientModel.nullish(),
  app: AppModel.nullish(),
  scheduledTriggers: WebhookScheduledTriggersModel.array()
}));
const _ImpersonationsModel = z__namespace.object({
  id: z__namespace.number().int(),
  createdAt: z__namespace.date(),
  impersonatedUserId: z__namespace.number().int(),
  impersonatedById: z__namespace.number().int()
});
const ImpersonationsModel = z__namespace.lazy(() => _ImpersonationsModel.extend({
  impersonatedUser: UserModel,
  impersonatedBy: UserModel
}));
const _ApiKeyModel = z__namespace.object({
  id: z__namespace.string(),
  userId: z__namespace.number().int(),
  teamId: z__namespace.number().int().nullish(),
  note: z__namespace.string().nullish(),
  createdAt: z__namespace.date(),
  expiresAt: z__namespace.date().nullish(),
  lastUsedAt: z__namespace.date().nullish(),
  hashedKey: z__namespace.string(),
  appId: z__namespace.string().nullish()
});
const ApiKeyModel = z__namespace.lazy(() => _ApiKeyModel.extend({
  user: UserModel.nullish(),
  team: TeamModel.nullish(),
  app: AppModel.nullish(),
  rateLimits: RateLimitModel.array()
}));
const _RateLimitModel = z__namespace.object({
  id: z__namespace.string(),
  name: z__namespace.string(),
  apiKeyId: z__namespace.string(),
  ttl: z__namespace.number().int(),
  limit: z__namespace.number().int(),
  blockDuration: z__namespace.number().int(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date()
});
const RateLimitModel = z__namespace.lazy(() => _RateLimitModel.extend({
  apiKey: ApiKeyModel
}));
const _HashedLinkModel = z__namespace.object({
  id: z__namespace.number().int(),
  link: z__namespace.string(),
  eventTypeId: z__namespace.number().int(),
  expiresAt: z__namespace.date().nullish(),
  maxUsageCount: z__namespace.number().int(),
  usageCount: z__namespace.number().int()
});
const HashedLinkModel = z__namespace.lazy(() => _HashedLinkModel.extend({
  eventType: EventTypeModel
}));
const _AccountModel = z__namespace.object({
  id: z__namespace.string(),
  userId: z__namespace.number().int(),
  type: z__namespace.string(),
  provider: z__namespace.string(),
  providerAccountId: z__namespace.string(),
  providerEmail: z__namespace.string().nullish(),
  refresh_token: z__namespace.string().nullish(),
  access_token: z__namespace.string().nullish(),
  expires_at: z__namespace.number().int().nullish(),
  token_type: z__namespace.string().nullish(),
  scope: z__namespace.string().nullish(),
  id_token: z__namespace.string().nullish(),
  session_state: z__namespace.string().nullish()
});
const AccountModel = z__namespace.lazy(() => _AccountModel.extend({
  user: UserModel.nullish()
}));
const _SessionModel = z__namespace.object({
  id: z__namespace.string(),
  sessionToken: z__namespace.string(),
  userId: z__namespace.number().int(),
  expires: z__namespace.date()
});
const SessionModel = z__namespace.lazy(() => _SessionModel.extend({
  user: UserModel.nullish()
}));
const literalSchema$d = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$d = z__namespace.lazy(() => z__namespace.union([literalSchema$d, z__namespace.array(jsonSchema$d), z__namespace.record(jsonSchema$d)]));
const _AppModel = z__namespace.object({
  slug: z__namespace.string(),
  dirName: z__namespace.string(),
  keys: jsonSchema$d,
  categories: z__namespace.nativeEnum(client.AppCategories).array(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date(),
  enabled: z__namespace.boolean()
});
const AppModel = z__namespace.lazy(() => _AppModel.extend({
  credentials: CredentialModel.array(),
  payments: PaymentModel.array(),
  Webhook: WebhookModel.array(),
  ApiKey: ApiKeyModel.array()
}));
const literalSchema$c = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$c = z__namespace.lazy(() => z__namespace.union([literalSchema$c, z__namespace.array(jsonSchema$c), z__namespace.record(jsonSchema$c)]));
const _App_RoutingForms_FormModel = z__namespace.object({
  id: z__namespace.string(),
  description: z__namespace.string().nullish(),
  position: z__namespace.number().int(),
  routes: jsonSchema$c,
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date(),
  name: z__namespace.string(),
  fields: jsonSchema$c,
  updatedById: z__namespace.number().int().nullish(),
  userId: z__namespace.number().int(),
  teamId: z__namespace.number().int().nullish(),
  disabled: z__namespace.boolean(),
  settings: index.RoutingFormSettings
});
const App_RoutingForms_FormModel = z__namespace.lazy(() => _App_RoutingForms_FormModel.extend({
  user: UserModel,
  updatedBy: UserModel.nullish(),
  team: TeamModel.nullish(),
  responses: App_RoutingForms_FormResponseModel.array(),
  queuedResponses: App_RoutingForms_QueuedFormResponseModel.array(),
  incompleteBookingActions: App_RoutingForms_IncompleteBookingActionsModel.array()
}));
const literalSchema$b = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$b = z__namespace.lazy(() => z__namespace.union([literalSchema$b, z__namespace.array(jsonSchema$b), z__namespace.record(jsonSchema$b)]));
const _App_RoutingForms_FormResponseModel = z__namespace.object({
  id: z__namespace.number().int(),
  uuid: z__namespace.string().nullish(),
  formFillerId: z__namespace.string(),
  formId: z__namespace.string(),
  response: jsonSchema$b,
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date().nullish(),
  routedToBookingUid: z__namespace.string().nullish(),
  chosenRouteId: z__namespace.string().nullish()
});
const App_RoutingForms_FormResponseModel = z__namespace.lazy(() => _App_RoutingForms_FormResponseModel.extend({
  form: App_RoutingForms_FormModel,
  routedToBooking: BookingModel.nullish(),
  routingFormResponseFields: RoutingFormResponseFieldModel.array(),
  routingFormResponses: RoutingFormResponseDenormalizedModel.array(),
  queuedFormResponse: App_RoutingForms_QueuedFormResponseModel.nullish()
}));
const literalSchema$a = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$a = z__namespace.lazy(() => z__namespace.union([literalSchema$a, z__namespace.array(jsonSchema$a), z__namespace.record(jsonSchema$a)]));
const _App_RoutingForms_QueuedFormResponseModel = z__namespace.object({
  id: z__namespace.string(),
  formId: z__namespace.string(),
  response: jsonSchema$a,
  chosenRouteId: z__namespace.string().nullish(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date().nullish(),
  actualResponseId: z__namespace.number().int().nullish()
});
const App_RoutingForms_QueuedFormResponseModel = z__namespace.lazy(() => _App_RoutingForms_QueuedFormResponseModel.extend({
  form: App_RoutingForms_FormModel,
  actualResponse: App_RoutingForms_FormResponseModel.nullish()
}));
const _RoutingFormResponseFieldModel = z__namespace.object({
  id: z__namespace.number().int(),
  responseId: z__namespace.number().int(),
  fieldId: z__namespace.string(),
  valueString: z__namespace.string().nullish(),
  valueNumber: z__namespace.number().nullish(),
  valueStringArray: z__namespace.string().array()
});
const RoutingFormResponseFieldModel = z__namespace.lazy(() => _RoutingFormResponseFieldModel.extend({
  response: App_RoutingForms_FormResponseModel,
  denormalized: RoutingFormResponseDenormalizedModel
}));
const _RoutingFormResponseDenormalizedModel = z__namespace.object({
  id: z__namespace.number().int(),
  uuid: z__namespace.string().nullish(),
  formId: z__namespace.string(),
  formName: z__namespace.string(),
  formTeamId: z__namespace.number().int().nullish(),
  formUserId: z__namespace.number().int(),
  bookingUid: z__namespace.string().nullish(),
  bookingId: z__namespace.number().int().nullish(),
  bookingStatus: z__namespace.nativeEnum(client.BookingStatus).nullish(),
  bookingStatusOrder: z__namespace.number().int().nullish(),
  bookingCreatedAt: z__namespace.date().nullish(),
  bookingStartTime: z__namespace.date().nullish(),
  bookingEndTime: z__namespace.date().nullish(),
  bookingUserId: z__namespace.number().int().nullish(),
  bookingUserName: z__namespace.string().nullish(),
  bookingUserEmail: z__namespace.string().nullish(),
  bookingUserAvatarUrl: z__namespace.string().nullish(),
  bookingAssignmentReason: z__namespace.string().nullish(),
  eventTypeId: z__namespace.number().int().nullish(),
  eventTypeParentId: z__namespace.number().int().nullish(),
  eventTypeSchedulingType: z__namespace.string().nullish(),
  createdAt: z__namespace.date(),
  utm_source: z__namespace.string().nullish(),
  utm_medium: z__namespace.string().nullish(),
  utm_campaign: z__namespace.string().nullish(),
  utm_term: z__namespace.string().nullish(),
  utm_content: z__namespace.string().nullish()
});
const RoutingFormResponseDenormalizedModel = z__namespace.lazy(() => _RoutingFormResponseDenormalizedModel.extend({
  booking: BookingModel.nullish(),
  response: App_RoutingForms_FormResponseModel,
  fields: RoutingFormResponseFieldModel.array()
}));
const _FeedbackModel = z__namespace.object({
  id: z__namespace.number().int(),
  date: z__namespace.date(),
  userId: z__namespace.number().int(),
  rating: z__namespace.string(),
  comment: z__namespace.string().nullish()
});
const FeedbackModel = z__namespace.lazy(() => _FeedbackModel.extend({
  user: UserModel
}));
const _WorkflowStepModel = z__namespace.object({
  id: z__namespace.number().int(),
  stepNumber: z__namespace.number().int(),
  action: z__namespace.nativeEnum(client.WorkflowActions),
  workflowId: z__namespace.number().int(),
  sendTo: z__namespace.string().nullish(),
  reminderBody: z__namespace.string().nullish(),
  emailSubject: z__namespace.string().nullish(),
  template: z__namespace.nativeEnum(client.WorkflowTemplates),
  numberRequired: z__namespace.boolean().nullish(),
  sender: z__namespace.string().nullish(),
  numberVerificationPending: z__namespace.boolean(),
  includeCalendarEvent: z__namespace.boolean(),
  verifiedAt: z__namespace.date().nullish()
});
const WorkflowStepModel = z__namespace.lazy(() => _WorkflowStepModel.extend({
  workflow: WorkflowModel,
  workflowReminders: WorkflowReminderModel.array()
}));
const _WorkflowModel = z__namespace.object({
  id: z__namespace.number().int(),
  position: z__namespace.number().int(),
  name: z__namespace.string(),
  userId: z__namespace.number().int().nullish(),
  teamId: z__namespace.number().int().nullish(),
  isActiveOnAll: z__namespace.boolean(),
  trigger: z__namespace.nativeEnum(client.WorkflowTriggerEvents),
  time: z__namespace.number().int().nullish(),
  timeUnit: z__namespace.nativeEnum(client.TimeUnit).nullish()
});
const WorkflowModel = z__namespace.lazy(() => _WorkflowModel.extend({
  user: UserModel.nullish(),
  team: TeamModel.nullish(),
  activeOn: WorkflowsOnEventTypesModel.array(),
  activeOnTeams: WorkflowsOnTeamsModel.array(),
  steps: WorkflowStepModel.array()
}));
const _AIPhoneCallConfigurationModel = z__namespace.object({
  id: z__namespace.number().int(),
  eventTypeId: z__namespace.number().int(),
  templateType: z__namespace.string(),
  schedulerName: z__namespace.string().nullish(),
  generalPrompt: z__namespace.string().nullish(),
  yourPhoneNumber: z__namespace.string(),
  numberToCall: z__namespace.string(),
  guestName: z__namespace.string().nullish(),
  guestEmail: z__namespace.string().nullish(),
  guestCompany: z__namespace.string().nullish(),
  enabled: z__namespace.boolean(),
  beginMessage: z__namespace.string().nullish(),
  llmId: z__namespace.string().nullish()
});
const AIPhoneCallConfigurationModel = z__namespace.lazy(() => _AIPhoneCallConfigurationModel.extend({
  eventType: EventTypeModel
}));
const _WorkflowsOnEventTypesModel = z__namespace.object({
  id: z__namespace.number().int(),
  workflowId: z__namespace.number().int(),
  eventTypeId: z__namespace.number().int()
});
const WorkflowsOnEventTypesModel = z__namespace.lazy(() => _WorkflowsOnEventTypesModel.extend({
  workflow: WorkflowModel,
  eventType: EventTypeModel
}));
const _WorkflowsOnTeamsModel = z__namespace.object({
  id: z__namespace.number().int(),
  workflowId: z__namespace.number().int(),
  teamId: z__namespace.number().int()
});
const WorkflowsOnTeamsModel = z__namespace.lazy(() => _WorkflowsOnTeamsModel.extend({
  workflow: WorkflowModel,
  team: TeamModel
}));
const literalSchema$9 = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$9 = z__namespace.lazy(() => z__namespace.union([literalSchema$9, z__namespace.array(jsonSchema$9), z__namespace.record(jsonSchema$9)]));
z__namespace.object({
  /**
   * This is a single row table, so we use a fixed id
   */
  id: z__namespace.number().int(),
  logo: z__namespace.string().nullish(),
  theme: index.DeploymentTheme,
  licenseKey: z__namespace.string().nullish(),
  signatureTokenEncrypted: z__namespace.string().nullish(),
  agreedLicenseAt: z__namespace.date().nullish()
});
const _WorkflowReminderModel = z__namespace.object({
  id: z__namespace.number().int(),
  uuid: z__namespace.string().nullish(),
  bookingUid: z__namespace.string().nullish(),
  method: z__namespace.nativeEnum(client.WorkflowMethods),
  scheduledDate: z__namespace.date(),
  referenceId: z__namespace.string().nullish(),
  scheduled: z__namespace.boolean(),
  workflowStepId: z__namespace.number().int().nullish(),
  cancelled: z__namespace.boolean().nullish(),
  seatReferenceId: z__namespace.string().nullish(),
  isMandatoryReminder: z__namespace.boolean().nullish(),
  retryCount: z__namespace.number().int()
});
const WorkflowReminderModel = z__namespace.lazy(() => _WorkflowReminderModel.extend({
  booking: BookingModel.nullish(),
  workflowStep: WorkflowStepModel.nullish()
}));
const _WebhookScheduledTriggersModel = z__namespace.object({
  id: z__namespace.number().int(),
  jobName: z__namespace.string().nullish(),
  subscriberUrl: z__namespace.string(),
  payload: z__namespace.string(),
  startAfter: z__namespace.date(),
  retryCount: z__namespace.number().int(),
  createdAt: z__namespace.date().nullish(),
  appId: z__namespace.string().nullish(),
  webhookId: z__namespace.string().nullish(),
  bookingId: z__namespace.number().int().nullish()
});
const WebhookScheduledTriggersModel = z__namespace.lazy(() => _WebhookScheduledTriggersModel.extend({
  webhook: WebhookModel.nullish(),
  booking: BookingModel.nullish()
}));
const literalSchema$8 = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$8 = z__namespace.lazy(() => z__namespace.union([literalSchema$8, z__namespace.array(jsonSchema$8), z__namespace.record(jsonSchema$8)]));
const _BookingSeatModel = z__namespace.object({
  id: z__namespace.number().int(),
  referenceUid: z__namespace.string(),
  bookingId: z__namespace.number().int(),
  attendeeId: z__namespace.number().int(),
  data: index.bookingSeatDataSchema,
  metadata: jsonSchema$8
});
const BookingSeatModel = z__namespace.lazy(() => _BookingSeatModel.extend({
  booking: BookingModel,
  attendee: AttendeeModel
}));
const _VerifiedNumberModel = z__namespace.object({
  id: z__namespace.number().int(),
  userId: z__namespace.number().int().nullish(),
  teamId: z__namespace.number().int().nullish(),
  phoneNumber: z__namespace.string()
});
const VerifiedNumberModel = z__namespace.lazy(() => _VerifiedNumberModel.extend({
  user: UserModel.nullish(),
  team: TeamModel.nullish()
}));
const _VerifiedEmailModel = z__namespace.object({
  id: z__namespace.number().int(),
  userId: z__namespace.number().int().nullish(),
  teamId: z__namespace.number().int().nullish(),
  email: z__namespace.string()
});
const VerifiedEmailModel = z__namespace.lazy(() => _VerifiedEmailModel.extend({
  user: UserModel.nullish(),
  team: TeamModel.nullish()
}));
const _FeatureModel = z__namespace.object({
  slug: z__namespace.string(),
  enabled: z__namespace.boolean(),
  description: z__namespace.string().nullish(),
  type: z__namespace.nativeEnum(client.FeatureType).nullish(),
  stale: z__namespace.boolean().nullish(),
  lastUsedAt: z__namespace.date().nullish(),
  createdAt: z__namespace.date().nullish(),
  updatedAt: z__namespace.date().nullish(),
  updatedBy: z__namespace.number().int().nullish()
});
const FeatureModel = z__namespace.lazy(() => _FeatureModel.extend({
  users: UserFeaturesModel.array(),
  teams: TeamFeaturesModel.array()
}));
const _UserFeaturesModel = z__namespace.object({
  userId: z__namespace.number().int(),
  featureId: z__namespace.string(),
  assignedAt: z__namespace.date(),
  assignedBy: z__namespace.string(),
  updatedAt: z__namespace.date()
});
const UserFeaturesModel = z__namespace.lazy(() => _UserFeaturesModel.extend({
  user: UserModel,
  feature: FeatureModel
}));
const _TeamFeaturesModel = z__namespace.object({
  teamId: z__namespace.number().int(),
  featureId: z__namespace.string(),
  assignedAt: z__namespace.date(),
  assignedBy: z__namespace.string(),
  updatedAt: z__namespace.date()
});
const TeamFeaturesModel = z__namespace.lazy(() => _TeamFeaturesModel.extend({
  team: TeamModel,
  feature: FeatureModel
}));
z__namespace.object({
  id: z__namespace.number().int(),
  eventTypeId: z__namespace.number().int(),
  userId: z__namespace.number().int(),
  slotUtcStartDate: z__namespace.date(),
  slotUtcEndDate: z__namespace.date(),
  uid: z__namespace.string(),
  releaseAt: z__namespace.date(),
  isSeat: z__namespace.boolean()
});
const _OAuthClientModel = z__namespace.object({
  clientId: z__namespace.string(),
  redirectUri: z__namespace.string(),
  clientSecret: z__namespace.string(),
  name: z__namespace.string(),
  logo: z__namespace.string().nullish()
});
const OAuthClientModel = z__namespace.lazy(() => _OAuthClientModel.extend({
  accessCodes: AccessCodeModel.array()
}));
const _AccessCodeModel = z__namespace.object({
  id: z__namespace.number().int(),
  code: z__namespace.string(),
  clientId: z__namespace.string().nullish(),
  expiresAt: z__namespace.date(),
  scopes: z__namespace.nativeEnum(client.AccessScope).array(),
  userId: z__namespace.number().int().nullish(),
  teamId: z__namespace.number().int().nullish()
});
const AccessCodeModel = z__namespace.lazy(() => _AccessCodeModel.extend({
  client: OAuthClientModel.nullish(),
  user: UserModel.nullish(),
  team: TeamModel.nullish()
}));
z__namespace.object({
  id: z__namespace.number().int(),
  uid: z__namespace.string(),
  eventTypeId: z__namespace.number().int().nullish(),
  title: z__namespace.string(),
  description: z__namespace.string().nullish(),
  startTime: z__namespace.date(),
  endTime: z__namespace.date(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date().nullish(),
  location: z__namespace.string().nullish(),
  paid: z__namespace.boolean(),
  status: z__namespace.nativeEnum(client.BookingStatus),
  rescheduled: z__namespace.boolean().nullish(),
  userId: z__namespace.number().int().nullish(),
  teamId: z__namespace.number().int().nullish(),
  eventLength: z__namespace.number().int().nullish(),
  eventParentId: z__namespace.number().int().nullish(),
  userEmail: z__namespace.string().nullish(),
  userName: z__namespace.string().nullish(),
  userUsername: z__namespace.string().nullish(),
  ratingFeedback: z__namespace.string().nullish(),
  rating: z__namespace.number().int().nullish(),
  noShowHost: z__namespace.boolean().nullish(),
  isTeamBooking: z__namespace.boolean()
});
const literalSchema$7 = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$7 = z__namespace.lazy(() => z__namespace.union([literalSchema$7, z__namespace.array(jsonSchema$7), z__namespace.record(jsonSchema$7)]));
const _CalendarCacheModel = z__namespace.object({
  id: z__namespace.string().nullish(),
  key: z__namespace.string(),
  value: jsonSchema$7,
  expiresAt: z__namespace.date(),
  updatedAt: z__namespace.date(),
  credentialId: z__namespace.number().int(),
  userId: z__namespace.number().int().nullish()
});
const CalendarCacheModel = z__namespace.lazy(() => _CalendarCacheModel.extend({
  credential: CredentialModel.nullish()
}));
z__namespace.object({
  id: z__namespace.number().int(),
  from: z__namespace.string(),
  fromOrgId: z__namespace.number().int(),
  type: z__namespace.nativeEnum(client.RedirectType),
  toUrl: z__namespace.string(),
  enabled: z__namespace.boolean(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date()
});
z__namespace.object({
  teamId: z__namespace.number().int(),
  userId: z__namespace.number().int(),
  data: z__namespace.string(),
  objectKey: z__namespace.string(),
  isBanner: z__namespace.boolean()
});
const _OutOfOfficeEntryModel = z__namespace.object({
  id: z__namespace.number().int(),
  uuid: z__namespace.string(),
  start: z__namespace.date(),
  end: z__namespace.date(),
  notes: z__namespace.string().nullish(),
  userId: z__namespace.number().int(),
  toUserId: z__namespace.number().int().nullish(),
  reasonId: z__namespace.number().int().nullish(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date()
});
const OutOfOfficeEntryModel = z__namespace.lazy(() => _OutOfOfficeEntryModel.extend({
  user: UserModel,
  toUser: UserModel.nullish(),
  reason: OutOfOfficeReasonModel.nullish()
}));
const _OutOfOfficeReasonModel = z__namespace.object({
  id: z__namespace.number().int(),
  emoji: z__namespace.string(),
  reason: z__namespace.string(),
  enabled: z__namespace.boolean(),
  userId: z__namespace.number().int().nullish()
});
const OutOfOfficeReasonModel = z__namespace.lazy(() => _OutOfOfficeReasonModel.extend({
  user: UserModel.nullish(),
  entries: OutOfOfficeEntryModel.array()
}));
const _PlatformOAuthClientModel = z__namespace.object({
  id: z__namespace.string(),
  name: z__namespace.string(),
  secret: z__namespace.string(),
  permissions: z__namespace.number().int(),
  logo: z__namespace.string().nullish(),
  redirectUris: z__namespace.string().array(),
  organizationId: z__namespace.number().int(),
  bookingRedirectUri: z__namespace.string().nullish(),
  bookingCancelRedirectUri: z__namespace.string().nullish(),
  bookingRescheduleRedirectUri: z__namespace.string().nullish(),
  areEmailsEnabled: z__namespace.boolean(),
  areDefaultEventTypesEnabled: z__namespace.boolean(),
  areCalendarEventsEnabled: z__namespace.boolean(),
  createdAt: z__namespace.date()
});
const PlatformOAuthClientModel = z__namespace.lazy(() => _PlatformOAuthClientModel.extend({
  users: UserModel.array(),
  organization: TeamModel,
  teams: TeamModel.array(),
  accessTokens: AccessTokenModel.array(),
  refreshToken: RefreshTokenModel.array(),
  authorizationTokens: PlatformAuthorizationTokenModel.array(),
  webhook: WebhookModel.array()
}));
const _PlatformAuthorizationTokenModel = z__namespace.object({
  id: z__namespace.string(),
  platformOAuthClientId: z__namespace.string(),
  userId: z__namespace.number().int(),
  createdAt: z__namespace.date()
});
const PlatformAuthorizationTokenModel = z__namespace.lazy(() => _PlatformAuthorizationTokenModel.extend({
  owner: UserModel,
  client: PlatformOAuthClientModel
}));
const _AccessTokenModel = z__namespace.object({
  id: z__namespace.number().int(),
  secret: z__namespace.string(),
  createdAt: z__namespace.date(),
  expiresAt: z__namespace.date(),
  platformOAuthClientId: z__namespace.string(),
  userId: z__namespace.number().int()
});
const AccessTokenModel = z__namespace.lazy(() => _AccessTokenModel.extend({
  owner: UserModel,
  client: PlatformOAuthClientModel
}));
const _RefreshTokenModel = z__namespace.object({
  id: z__namespace.number().int(),
  secret: z__namespace.string(),
  createdAt: z__namespace.date(),
  expiresAt: z__namespace.date(),
  platformOAuthClientId: z__namespace.string(),
  userId: z__namespace.number().int()
});
const RefreshTokenModel = z__namespace.lazy(() => _RefreshTokenModel.extend({
  owner: UserModel,
  client: PlatformOAuthClientModel
}));
const _DSyncDataModel = z__namespace.object({
  id: z__namespace.number().int(),
  directoryId: z__namespace.string(),
  tenant: z__namespace.string(),
  organizationId: z__namespace.number().int().nullish()
});
const DSyncDataModel = z__namespace.lazy(() => _DSyncDataModel.extend({
  org: OrganizationSettingsModel.nullish(),
  teamGroupMapping: DSyncTeamGroupMappingModel.array(),
  createdAttributeToUsers: AttributeToUserModel.array(),
  updatedAttributeToUsers: AttributeToUserModel.array()
}));
const _DSyncTeamGroupMappingModel = z__namespace.object({
  id: z__namespace.number().int(),
  organizationId: z__namespace.number().int(),
  teamId: z__namespace.number().int(),
  directoryId: z__namespace.string(),
  groupName: z__namespace.string()
});
const DSyncTeamGroupMappingModel = z__namespace.lazy(() => _DSyncTeamGroupMappingModel.extend({
  team: TeamModel,
  directory: DSyncDataModel
}));
const _SecondaryEmailModel = z__namespace.object({
  id: z__namespace.number().int(),
  userId: z__namespace.number().int(),
  email: z__namespace.string(),
  emailVerified: z__namespace.date().nullish()
});
const SecondaryEmailModel = z__namespace.lazy(() => _SecondaryEmailModel.extend({
  user: UserModel,
  verificationTokens: VerificationTokenModel.array(),
  eventTypes: EventTypeModel.array()
}));
z__namespace.object({
  id: z__namespace.string(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date(),
  scheduledAt: z__namespace.date(),
  succeededAt: z__namespace.date().nullish(),
  type: z__namespace.string(),
  payload: z__namespace.string(),
  attempts: z__namespace.number().int(),
  maxAttempts: z__namespace.number().int(),
  lastError: z__namespace.string().nullish(),
  lastFailedAttemptAt: z__namespace.date().nullish(),
  referenceUid: z__namespace.string().nullish()
});
const _ManagedOrganizationModel = z__namespace.object({
  managedOrganizationId: z__namespace.number().int(),
  managerOrganizationId: z__namespace.number().int(),
  createdAt: z__namespace.date()
});
const ManagedOrganizationModel = z__namespace.lazy(() => _ManagedOrganizationModel.extend({
  managedOrganization: TeamModel,
  managerOrganization: TeamModel
}));
const _PlatformBillingModel = z__namespace.object({
  id: z__namespace.number().int(),
  customerId: z__namespace.string(),
  subscriptionId: z__namespace.string().nullish(),
  priceId: z__namespace.string().nullish(),
  plan: z__namespace.string(),
  billingCycleStart: z__namespace.number().int().nullish(),
  billingCycleEnd: z__namespace.number().int().nullish(),
  overdue: z__namespace.boolean().nullish(),
  managerBillingId: z__namespace.number().int().nullish()
});
const PlatformBillingModel = z__namespace.lazy(() => _PlatformBillingModel.extend({
  managerBilling: PlatformBillingModel.nullish(),
  managedBillings: PlatformBillingModel.array(),
  team: TeamModel
}));
const _AttributeOptionModel = z__namespace.object({
  id: z__namespace.string(),
  attributeId: z__namespace.string(),
  value: z__namespace.string(),
  slug: z__namespace.string(),
  isGroup: z__namespace.boolean(),
  contains: z__namespace.string().array()
});
const AttributeOptionModel = z__namespace.lazy(() => _AttributeOptionModel.extend({
  attribute: AttributeModel,
  assignedUsers: AttributeToUserModel.array()
}));
const _AttributeModel = z__namespace.object({
  id: z__namespace.string(),
  teamId: z__namespace.number().int(),
  type: z__namespace.nativeEnum(client.AttributeType),
  name: z__namespace.string(),
  slug: z__namespace.string(),
  enabled: z__namespace.boolean(),
  usersCanEditRelation: z__namespace.boolean(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date(),
  isWeightsEnabled: z__namespace.boolean(),
  isLocked: z__namespace.boolean()
});
const AttributeModel = z__namespace.lazy(() => _AttributeModel.extend({
  team: TeamModel,
  options: AttributeOptionModel.array()
}));
const _AttributeToUserModel = z__namespace.object({
  id: z__namespace.string(),
  memberId: z__namespace.number().int(),
  attributeOptionId: z__namespace.string(),
  weight: z__namespace.number().int().nullish(),
  createdAt: z__namespace.date(),
  createdById: z__namespace.number().int().nullish(),
  createdByDSyncId: z__namespace.string().nullish(),
  updatedAt: z__namespace.date().nullish(),
  updatedById: z__namespace.number().int().nullish(),
  updatedByDSyncId: z__namespace.string().nullish()
});
const AttributeToUserModel = z__namespace.lazy(() => _AttributeToUserModel.extend({
  member: MembershipModel,
  attributeOption: AttributeOptionModel,
  createdBy: UserModel.nullish(),
  createdByDSync: DSyncDataModel.nullish(),
  updatedBy: UserModel.nullish(),
  updatedByDSync: DSyncDataModel.nullish()
}));
const _AssignmentReasonModel = z__namespace.object({
  id: z__namespace.number().int(),
  createdAt: z__namespace.date(),
  bookingId: z__namespace.number().int(),
  reasonEnum: z__namespace.nativeEnum(client.AssignmentReasonEnum),
  reasonString: z__namespace.string()
});
const AssignmentReasonModel = z__namespace.lazy(() => _AssignmentReasonModel.extend({
  booking: BookingModel
}));
const literalSchema$6 = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$6 = z__namespace.lazy(() => z__namespace.union([literalSchema$6, z__namespace.array(jsonSchema$6), z__namespace.record(jsonSchema$6)]));
const _DelegationCredentialModel = z__namespace.object({
  id: z__namespace.string(),
  workspacePlatformId: z__namespace.number().int(),
  serviceAccountKey: index.serviceAccountKeySchema,
  enabled: z__namespace.boolean(),
  lastEnabledAt: z__namespace.date().nullish(),
  lastDisabledAt: z__namespace.date().nullish(),
  organizationId: z__namespace.number().int(),
  domain: z__namespace.string(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date()
});
const DelegationCredentialModel = z__namespace.lazy(() => _DelegationCredentialModel.extend({
  workspacePlatform: WorkspacePlatformModel,
  organization: TeamModel,
  selectedCalendars: SelectedCalendarModel.array(),
  destinationCalendar: DestinationCalendarModel.array(),
  bookingReferences: BookingReferenceModel.array(),
  credentials: CredentialModel.array()
}));
const literalSchema$5 = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$5 = z__namespace.lazy(() => z__namespace.union([literalSchema$5, z__namespace.array(jsonSchema$5), z__namespace.record(jsonSchema$5)]));
const _DomainWideDelegationModel = z__namespace.object({
  id: z__namespace.string(),
  workspacePlatformId: z__namespace.number().int(),
  serviceAccountKey: index.serviceAccountKeySchema,
  enabled: z__namespace.boolean(),
  organizationId: z__namespace.number().int(),
  domain: z__namespace.string(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date()
});
const DomainWideDelegationModel = z__namespace.lazy(() => _DomainWideDelegationModel.extend({
  workspacePlatform: WorkspacePlatformModel,
  organization: TeamModel,
  selectedCalendars: SelectedCalendarModel.array(),
  destinationCalendar: DestinationCalendarModel.array(),
  bookingReferences: BookingReferenceModel.array()
}));
const literalSchema$4 = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$4 = z__namespace.lazy(() => z__namespace.union([literalSchema$4, z__namespace.array(jsonSchema$4), z__namespace.record(jsonSchema$4)]));
const _WorkspacePlatformModel = z__namespace.object({
  id: z__namespace.number().int(),
  slug: z__namespace.string().min(1),
  name: z__namespace.string().min(1),
  description: z__namespace.string(),
  defaultServiceAccountKey: index.serviceAccountKeySchema,
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date(),
  enabled: z__namespace.boolean()
});
const WorkspacePlatformModel = z__namespace.lazy(() => _WorkspacePlatformModel.extend({
  delegationCredentials: DelegationCredentialModel.array(),
  domainWideDelegations: DomainWideDelegationModel.array()
}));
const _EventTypeTranslationModel = z__namespace.object({
  uid: z__namespace.string(),
  eventTypeId: z__namespace.number().int(),
  field: z__namespace.nativeEnum(client.EventTypeAutoTranslatedField),
  sourceLocale: z__namespace.string(),
  targetLocale: z__namespace.string(),
  translatedText: z__namespace.string(),
  createdAt: z__namespace.date(),
  createdBy: z__namespace.number().int(),
  updatedAt: z__namespace.date(),
  updatedBy: z__namespace.number().int().nullish()
});
const EventTypeTranslationModel = z__namespace.lazy(() => _EventTypeTranslationModel.extend({
  eventType: EventTypeModel,
  creator: UserModel,
  updater: UserModel.nullish()
}));
const _WatchlistModel = z__namespace.object({
  id: z__namespace.string(),
  type: z__namespace.nativeEnum(client.WatchlistType),
  value: z__namespace.string(),
  description: z__namespace.string().nullish(),
  createdAt: z__namespace.date(),
  createdById: z__namespace.number().int(),
  updatedAt: z__namespace.date(),
  updatedById: z__namespace.number().int().nullish(),
  severity: z__namespace.nativeEnum(client.WatchlistSeverity)
});
const WatchlistModel = z__namespace.lazy(() => _WatchlistModel.extend({
  createdBy: UserModel,
  updatedBy: UserModel.nullish()
}));
const literalSchema$3 = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$3 = z__namespace.lazy(() => z__namespace.union([literalSchema$3, z__namespace.array(jsonSchema$3), z__namespace.record(jsonSchema$3)]));
const _OrganizationOnboardingModel = z__namespace.object({
  id: z__namespace.string(),
  createdById: z__namespace.number().int(),
  createdAt: z__namespace.date(),
  orgOwnerEmail: z__namespace.string(),
  error: z__namespace.string().nullish(),
  updatedAt: z__namespace.date(),
  organizationId: z__namespace.number().int().nullish(),
  billingPeriod: z__namespace.nativeEnum(client.BillingPeriod),
  pricePerSeat: z__namespace.number(),
  seats: z__namespace.number().int(),
  isPlatform: z__namespace.boolean(),
  name: z__namespace.string(),
  slug: z__namespace.string(),
  logo: z__namespace.string().nullish(),
  bio: z__namespace.string().nullish(),
  isDomainConfigured: z__namespace.boolean(),
  stripeCustomerId: z__namespace.string().nullish(),
  stripeSubscriptionId: z__namespace.string().nullish(),
  stripeSubscriptionItemId: z__namespace.string().nullish(),
  invitedMembers: index.orgOnboardingInvitedMembersSchema,
  teams: index.orgOnboardingTeamsSchema,
  isComplete: z__namespace.boolean()
});
const OrganizationOnboardingModel = z__namespace.lazy(() => _OrganizationOnboardingModel.extend({
  createdBy: UserModel,
  organization: TeamModel.nullish()
}));
const literalSchema$2 = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$2 = z__namespace.lazy(() => z__namespace.union([literalSchema$2, z__namespace.array(jsonSchema$2), z__namespace.record(jsonSchema$2)]));
const _App_RoutingForms_IncompleteBookingActionsModel = z__namespace.object({
  id: z__namespace.number().int(),
  formId: z__namespace.string(),
  actionType: z__namespace.nativeEnum(client.IncompleteBookingActionType),
  data: jsonSchema$2,
  enabled: z__namespace.boolean(),
  credentialId: z__namespace.number().int().nullish()
});
const App_RoutingForms_IncompleteBookingActionsModel = z__namespace.lazy(() => _App_RoutingForms_IncompleteBookingActionsModel.extend({
  form: App_RoutingForms_FormModel
}));
const _InternalNotePresetModel = z__namespace.object({
  id: z__namespace.number().int(),
  name: z__namespace.string(),
  cancellationReason: z__namespace.string().nullish(),
  teamId: z__namespace.number().int(),
  createdAt: z__namespace.date()
});
const InternalNotePresetModel = z__namespace.lazy(() => _InternalNotePresetModel.extend({
  team: TeamModel,
  BookingInternalNote: BookingInternalNoteModel.array()
}));
const literalSchema$1 = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema$1 = z__namespace.lazy(() => z__namespace.union([literalSchema$1, z__namespace.array(jsonSchema$1), z__namespace.record(jsonSchema$1)]));
const _FilterSegmentModel = z__namespace.object({
  id: z__namespace.number().int(),
  name: z__namespace.string(),
  tableIdentifier: z__namespace.string(),
  scope: z__namespace.nativeEnum(client.FilterSegmentScope),
  activeFilters: jsonSchema$1,
  sorting: jsonSchema$1,
  columnVisibility: jsonSchema$1,
  columnSizing: jsonSchema$1,
  perPage: z__namespace.number().int(),
  searchTerm: z__namespace.string().nullish(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date(),
  userId: z__namespace.number().int(),
  teamId: z__namespace.number().int().nullish()
});
const FilterSegmentModel = z__namespace.lazy(() => _FilterSegmentModel.extend({
  user: UserModel,
  team: TeamModel.nullish(),
  userPreferences: UserFilterSegmentPreferenceModel.array()
}));
const _UserFilterSegmentPreferenceModel = z__namespace.object({
  id: z__namespace.number().int(),
  userId: z__namespace.number().int(),
  tableIdentifier: z__namespace.string(),
  segmentId: z__namespace.number().int(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date()
});
const UserFilterSegmentPreferenceModel = z__namespace.lazy(() => _UserFilterSegmentPreferenceModel.extend({
  user: UserModel,
  segment: FilterSegmentModel
}));
const _BookingInternalNoteModel = z__namespace.object({
  id: z__namespace.number().int(),
  notePresetId: z__namespace.number().int().nullish(),
  text: z__namespace.string().nullish(),
  bookingId: z__namespace.number().int(),
  createdById: z__namespace.number().int(),
  createdAt: z__namespace.date()
});
const BookingInternalNoteModel = z__namespace.lazy(() => _BookingInternalNoteModel.extend({
  notePreset: InternalNotePresetModel.nullish(),
  booking: BookingModel,
  createdBy: UserModel
}));
z__namespace.object({
  id: z__namespace.number().int(),
  type: z__namespace.nativeEnum(client.WorkflowContactType),
  value: z__namespace.string(),
  optedOut: z__namespace.boolean(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date()
});
const _RoleModel = z__namespace.object({
  id: z__namespace.string(),
  name: z__namespace.string(),
  color: z__namespace.string().nullish(),
  description: z__namespace.string().nullish(),
  teamId: z__namespace.number().int().nullish(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date(),
  type: z__namespace.nativeEnum(client.RoleType)
});
const RoleModel = z__namespace.lazy(() => _RoleModel.extend({
  team: TeamModel.nullish(),
  permissions: RolePermissionModel.array(),
  memberships: MembershipModel.array()
}));
const _RolePermissionModel = z__namespace.object({
  id: z__namespace.string(),
  roleId: z__namespace.string(),
  resource: z__namespace.string(),
  action: z__namespace.string(),
  createdAt: z__namespace.date()
});
const RolePermissionModel = z__namespace.lazy(() => _RolePermissionModel.extend({
  role: RoleModel
}));
const literalSchema = z__namespace.union([z__namespace.string(), z__namespace.number(), z__namespace.boolean()]);
const jsonSchema = z__namespace.lazy(() => z__namespace.union([literalSchema, z__namespace.array(jsonSchema), z__namespace.record(jsonSchema)]));
z__namespace.object({
  id: z__namespace.number().int(),
  response: jsonSchema,
  responseLowercase: jsonSchema,
  formId: z__namespace.string(),
  formName: z__namespace.string(),
  formTeamId: z__namespace.number().int().nullish(),
  formUserId: z__namespace.number().int().nullish(),
  bookingUid: z__namespace.string().nullish(),
  bookingStatus: z__namespace.nativeEnum(client.BookingStatus).nullish(),
  bookingStatusOrder: z__namespace.number().int().nullish(),
  bookingCreatedAt: z__namespace.date().nullish(),
  bookingAttendees: jsonSchema,
  bookingUserId: z__namespace.number().int().nullish(),
  bookingUserName: z__namespace.string().nullish(),
  bookingUserEmail: z__namespace.string().nullish(),
  bookingUserAvatarUrl: z__namespace.string().nullish(),
  bookingAssignmentReason: z__namespace.string().nullish(),
  bookingAssignmentReasonLowercase: z__namespace.string().nullish(),
  bookingStartTime: z__namespace.date().nullish(),
  bookingEndTime: z__namespace.date().nullish(),
  createdAt: z__namespace.date(),
  utm_source: z__namespace.string().nullish(),
  utm_medium: z__namespace.string().nullish(),
  utm_campaign: z__namespace.string().nullish(),
  utm_term: z__namespace.string().nullish(),
  utm_content: z__namespace.string().nullish()
});
z__namespace.object({
  id: z__namespace.number().int(),
  uid: z__namespace.string().nullish(),
  eventTypeId: z__namespace.number().int().nullish(),
  title: z__namespace.string().nullish(),
  description: z__namespace.string().nullish(),
  startTime: z__namespace.date().nullish(),
  endTime: z__namespace.date().nullish(),
  createdAt: z__namespace.date().nullish(),
  location: z__namespace.string().nullish(),
  paid: z__namespace.boolean().nullish(),
  status: z__namespace.nativeEnum(client.BookingStatus).nullish(),
  rescheduled: z__namespace.boolean().nullish(),
  userId: z__namespace.number().int().nullish(),
  teamId: z__namespace.number().int().nullish(),
  eventLength: z__namespace.number().int().nullish(),
  timeStatus: z__namespace.string().nullish(),
  eventParentId: z__namespace.number().int().nullish(),
  userEmail: z__namespace.string().nullish(),
  username: z__namespace.string().nullish(),
  ratingFeedback: z__namespace.string().nullish(),
  rating: z__namespace.number().int().nullish(),
  noShowHost: z__namespace.boolean().nullish(),
  isTeamBooking: z__namespace.boolean()
});
z__namespace.object({
  id: z__namespace.number().int(),
  uid: z__namespace.string(),
  eventTypeId: z__namespace.number().int().nullish(),
  title: z__namespace.string(),
  description: z__namespace.string().nullish(),
  startTime: z__namespace.date(),
  endTime: z__namespace.date(),
  createdAt: z__namespace.date(),
  updatedAt: z__namespace.date().nullish(),
  location: z__namespace.string().nullish(),
  paid: z__namespace.boolean(),
  status: z__namespace.nativeEnum(client.BookingStatus),
  rescheduled: z__namespace.boolean().nullish(),
  userId: z__namespace.number().int().nullish(),
  teamId: z__namespace.number().int().nullish(),
  eventLength: z__namespace.number().int().nullish(),
  eventParentId: z__namespace.number().int().nullish(),
  userEmail: z__namespace.string().nullish(),
  userName: z__namespace.string().nullish(),
  userUsername: z__namespace.string().nullish(),
  ratingFeedback: z__namespace.string().nullish(),
  rating: z__namespace.number().int().nullish(),
  noShowHost: z__namespace.boolean().nullish(),
  isTeamBooking: z__namespace.boolean(),
  timeStatus: z__namespace.string().nullish()
});
exports._EventTypeModel = _EventTypeModel;
