Skip to content

Conversation

@kirilatanasoskihubby
Copy link
Contributor

@kirilatanasoskihubby kirilatanasoskihubby commented Dec 23, 2025

…false


Note

Introduces a new flag to identify sales agents in partner platform settings.

  • Adds is_sales_agent: boolean | null (default false) to agent_signup_settings in platformSettingsSchema
  • Updates generated outputs (dist/base/index.cjs, index.d.cts, and source maps) to reflect the new field and types

Written by Cursor Bugbot for commit 0717c62. This will update automatically on new commits. Configure here.

@kirilatanasoskihubby kirilatanasoskihubby merged commit 8eda493 into main Dec 23, 2025
4 of 5 checks passed
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

partner_type: zod.z.enum(["wholesale", "reseller", "platform", "agent"]).nullable().optional(),
enable_complimentary_booking: zod.z.boolean().default(true),
complimentary_booking_partner_id: zod.z.string().nullable().optional(),
is_sales_agent: zod.z.boolean().nullable().optional().default(false),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default value doesn't apply when null is provided

The is_sales_agent field uses .boolean().nullable().optional().default(false), but in Zod the .default() only applies when the value is undefined, not when it's null. This means passing null will result in null output (not false), producing an output type of boolean | null. This is inconsistent with other boolean fields in the same schema (like enable_complimentary_booking) that use .boolean().default() without nullable/optional, ensuring a pure boolean output. If the intent is to always have a true/false value with a default of false, the .nullable() modifier is unnecessary and causes unexpected behavior.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants