Unified · Split
| @@ -15,12 +15,7 @@ const workosMembershipEventDataSchema = z.object({ · 14 unmodified lines | ||
| 15 | 15 | organizationId: trimmedStringSchema.optional(), |
| 16 | 16 | }); |
| 17 | 17 | |
| 18 | −type WorkosMembershipEventData = { | |
| 19 | − user_id?: string; | |
| 20 | − userId?: string; | |
| 21 | − organization_id?: string; | |
| 22 | − organizationId?: string; | |
| 23 | −}; | |
| 18 | +type WorkosMembershipEventData = z.infer<typeof workosMembershipEventDataSchema>; | |
| 24 | 19 | |
| 25 | 20 | function stableSerialize(value: unknown): string { |
| 26 | 21 | if (value === null || value === undefined) { |
| @@ -85,12 +80,7 @@ function parseMembershipEventData(value: unknown): WorkosMembershipEventData | n · 58 unmodified lines | ||
| 85 | 80 | return null; |
| 86 | 81 | } |
| 87 | 82 | |
| 88 | − return { | |
| 89 | − user_id: parsed.data.user_id, | |
| 90 | − userId: parsed.data.userId, | |
| 91 | − organization_id: parsed.data.organization_id, | |
| 92 | − organizationId: parsed.data.organizationId, | |
| 93 | − }; | |
| 83 | + return parsed.data; | |
| 94 | 84 | } |
| 95 | 85 | |
| 96 | 86 | async function applyInviteHintFromMembershipEvent( |