/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ /** * Request serializer for ProgramLicenseAssignmentView POST endpoint. * * This serializer validates the request data for creating or updating a program license assignment. * Either user_id or email must be provided to identify the user to assign the license to. * * Fields: * license_id: The ID of the program license to assign * user_id: The user ID to assign the license to (required if email not provided) * username: The username to assign the license to (alternative to user_id) * email: The email to assign the license to (required if user_id not provided) * platform_key: The unique identifier for the platform (for permission validation) * platform_org: The organization identifier for the platform (for permission validation) * active: Whether the assignment should be active * fulfilled: Whether the assignment should be marked as fulfilled * direct: Whether the assignment is being directly assigned to the user * redirect_to: URL to redirect to after fulfillment * metadata: Additional metadata for the assignment * * Notes: * - If both user_id and email are provided, user_id takes precedence * - If the user doesn't exist but email is provided, an email-only assignment will be created * - The license must have available seats for the assignment to succeed */ export type ProgramLicenseAssignmentCreate = { /** * The ID of the program license to assign */ license_id: number; /** * The user ID to assign the license to (required if email not provided) */ user_id?: number; /** * The username to assign the license to (alternative to user_id) */ username?: string; /** * The email to assign the license to (required if user_id not provided) */ email?: string; /** * The unique identifier for the platform (for permission validation) */ platform_key?: string; /** * The organization identifier for the platform (for permission validation) */ platform_org?: string; /** * Whether the assignment should be active */ active?: boolean; /** * Whether the assignment should be marked as fulfilled */ fulfilled?: boolean; /** * Whether the assignment is being directly assigned to the user */ direct?: boolean; /** * URL to redirect to after fulfillment */ redirect_to?: string | null; /** * Additional metadata for the assignment */ metadata?: Record; };