feat: add event privacy settings validation (step two)#70
Merged
DioChuks merged 2 commits intoBuidlZone-Labs:mainfrom Mar 9, 2026
Merged
Conversation
Author
|
@DioChuks please approve workflow I had to do a fresh implementation Thank you |
DioChuks
approved these changes
Mar 9, 2026
Contributor
DioChuks
left a comment
There was a problem hiding this comment.
Still sort of the same PR u raised like the former. I'll approve this & work on removing the overload.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Implements Step 2 of the event creation request validation, focusing on comprehensive privacy settings and advanced event configuration.
Changes
Model Updates
privacyLevelenum (0=anonymous, 1=wallet-required, 2=verified-access)attendanceMode(auto-derived from privacy level)eventTypeenum (0=FREE, 1=PAID) with business rule enforcementlocationTypeenum (0=exact, 1=general)paymentPrivacyenum (0=anonymous, 1=public)offerReceipts,hasZkEmailUpdates,hasEventRemindersticketTypeto array of objects with detailed pricingisPublishedboolean flagValidation Layer
CreateEventStepTwoSchemawith ZodService Layer
createEventWithPrivacySettings()- Creates events with full privacy configupdateEventPrivacySettings()- Updates with ownership verificationgetEventById()- Retrieves complete event detailsAPI Endpoints
POST /api/event-tickets/create-step-two- Create event (auth required)PATCH /api/event-tickets/:eventId/update-step-two- Update privacy settings (auth required)GET /api/event-tickets/:eventId- Get event details (public)Business Rules Enforced
privacyLevel = 1(wallet-required)Testing Recommendations
Backward Compatibility
✅ All existing event endpoints remain functional
✅ No breaking changes to current API consumers
closes #46