-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add booking and user creation source #18768
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
Graphite Automations"Add foundation team as reviewer" took an action on this PR • (01/21/25)1 reviewer was added to this PR based on Keith Williams's automation. |
@@ -366,6 +372,7 @@ model User { | |||
updatedTranslations EventTypeTranslation[] @relation("UpdatedEventTypeTranslations") | |||
createdWatchlists Watchlist[] @relation("CreatedWatchlists") | |||
updatedWatchlists Watchlist[] @relation("UpdatedWatchlists") | |||
creationSource CreationSource? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't provide a default here to ensure we have all our bases covered. Any null value here for new users should tell us that we might have missed a route.
@@ -668,6 +675,7 @@ model Booking { | |||
// Ah, made a typo here. Should have been routedFromRoutingFormRe"s"ponse. Live with it :( | |||
routedFromRoutingFormReponse App_RoutingForms_FormResponse? | |||
assignmentReason AssignmentReason[] | |||
creationSource CreationSource? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't provide a default here to ensure we have all our bases covered. Any null value here for new users should tell us that we might have missed a route.
@@ -0,0 +1,8 @@ | |||
-- CreateEnum | |||
CREATE TYPE "CreationSource" AS ENUM ('api_v1', 'api_v2', 'webapp'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have Platform as enum here because that inherently uses API V2, and after discussion with @ThyMinimalDev it felt unnecessary to have platform here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think uppercase is the most used one
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried inviting a user to org by email and "copy invite link" but creationSource field was null
New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@formkit/[email protected], npm/[email protected] |
What does this PR do?
Add booking and user creation source to be able to identify where a booking or a user creation was requested from (API V1, API V2, Webapp)
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Follow-up
I noticed that we're not running any tests in
apps/api/v1/test/lib/bookings/_post.test.ts
and I'll take care of that as a follow up, including test for the changes here. I have manually confirmed that v1 is working for this, so it should be okay as a follow up, gives me more time to fix that entire suite properly.