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