-
Notifications
You must be signed in to change notification settings - Fork 0
fix: address review feedback from #170 #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| 'scope3': patch | ||
| --- | ||
|
|
||
| Remove placeholder test stubs for deleted resources, reject storefront persona at runtime, remove unsafe index signatures from campaign input types, add response validation to campaign create/update, and type campaign sub-endpoint responses. |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -247,7 +247,6 @@ export interface CreateCampaignInput { | |
| brief?: string; | ||
| constraints?: CampaignConstraints; | ||
| performanceConfig?: PerformanceConfig; | ||
| [key: string]: unknown; | ||
| } | ||
|
|
||
| export interface UpdateCampaignInput { | ||
|
|
@@ -258,7 +257,6 @@ export interface UpdateCampaignInput { | |
| brief?: string; | ||
| constraints?: CampaignConstraints; | ||
| performanceConfig?: PerformanceConfig; | ||
| [key: string]: unknown; | ||
| } | ||
|
|
||
| export interface ListCampaignsParams extends PaginationParams { | ||
|
|
@@ -267,6 +265,95 @@ export interface ListCampaignsParams extends PaginationParams { | |
| status?: CampaignStatus; | ||
| } | ||
|
|
||
| export type RefinementItem = | ||
| | { scope: 'request'; ask: string } | ||
| | { scope: 'product'; id: string; action: 'include' | 'omit' | 'moreLikeThis'; ask?: string }; | ||
|
|
||
| export interface AutoSelectProductsResult { | ||
| campaignId: string; | ||
| discoveryId: string; | ||
| selectedProducts: Array<{ | ||
| productId: string; | ||
| name: string; | ||
| salesAgentId: string; | ||
| groupId: string; | ||
| groupName: string; | ||
| cpm?: number; | ||
| budget: number; | ||
| pricingOptionId?: string; | ||
| }>; | ||
| budgetContext: { | ||
| campaignBudget: number; | ||
| totalAllocated: number; | ||
| remainingBudget: number; | ||
| currency: string; | ||
| }; | ||
| productCount: number; | ||
| previouslySelectedCount?: number; | ||
| } | ||
|
|
||
| export interface CampaignProductEntry { | ||
| productId: string; | ||
| productName?: string; | ||
| salesAgentId: string; | ||
| salesAgentName?: string; | ||
| publisherDomain?: string; | ||
| publisherName?: string; | ||
| bidPrice?: number; | ||
| budget?: number; | ||
| pricingOptionId?: string; | ||
| pricingModel?: string; | ||
| selectedAt: string; | ||
| searchContext?: { id: string; brief: string }; | ||
| mediaBuys: Array<{ MediaBuyId: string; Status: string; name: string }>; | ||
| } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing fields vs |
||
|
|
||
| export interface CampaignProductsResult { | ||
| campaignId: string; | ||
| discoveryId: string | null; | ||
| products: CampaignProductEntry[]; | ||
| searchContexts: Array<{ | ||
| id: string; | ||
| brief: string; | ||
| channels: string[]; | ||
| countries: string[]; | ||
| createdAt: string; | ||
| productCount: number; | ||
| }>; | ||
| summary: { | ||
| totalProducts: number; | ||
| productsOnMediaBuys: number; | ||
| productsPending: number; | ||
| }; | ||
| } | ||
|
|
||
| export type MediaBuyStatusValue = | ||
| | 'DRAFT' | ||
| | 'PENDING_APPROVAL' | ||
| | 'INPUT_REQUIRED' | ||
| | 'ACTIVE' | ||
| | 'PAUSED' | ||
| | 'COMPLETED' | ||
| | 'CANCELED' | ||
| | 'FAILED' | ||
| | 'REJECTED' | ||
| | 'ARCHIVED'; | ||
|
|
||
| export interface CampaignMediaBuyStatus { | ||
| campaign_id: string; | ||
| media_buys: Array<{ | ||
| media_buy_id: string; | ||
| adcp_media_buy_id: string; | ||
| internal_status: string; | ||
| adcp_status: string | null; | ||
| previous_internal_status: string; | ||
| previous_adcp_status: string | null; | ||
| updated: boolean; | ||
| }>; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no corresponding exported schema for this in |
||
| agents_queried: number; | ||
| errors: Array<{ media_buy_id: string; error: string }>; | ||
| } | ||
|
|
||
| // ============================================================================ | ||
| // Test Cohort Types (Buyer Persona) | ||
| // ============================================================================ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this type is missing fields from
AutoSelectProductsResponseinbuyer.ts.selectedProductsitems needbudget: number(required) andpricingOptionId?: string. top level is also missingbudgetContext: { campaignBudget, totalAllocated, remainingBudget, currency },productCount: number, andpreviouslySelectedCount?: number