fix(campaigns): make budget and guardrails optional in CampaignPayload
PUT /campaigns/{id} is a partial update on the backend, applying only the
fields present in the body. Requiring budget and guardrails in the client
type forced callers to resend both just to change a name. `name` stays
required because the backend request model requires it on POST and PUT.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -54,8 +54,11 @@ export interface CampaignPayload {
|
||||
company_id?: string | null;
|
||||
objective?: string | null;
|
||||
ad_account_id?: string | null;
|
||||
budget: CampaignBudget;
|
||||
guardrails: CampaignGuardrails;
|
||||
// Optional because PUT /campaigns/{id} is a partial update: the backend
|
||||
// applies only the fields present in the body. `name` stays required
|
||||
// because the backend's request model requires it on both POST and PUT.
|
||||
budget?: CampaignBudget;
|
||||
guardrails?: CampaignGuardrails;
|
||||
targeting?: Record<string, unknown>;
|
||||
advanced?: Record<string, unknown>;
|
||||
channels?: string[];
|
||||
|
||||
Reference in New Issue
Block a user