chore: fixes to HTTP and request types for promotions (#13820)

This commit is contained in:
Shahed Nasser
2025-10-28 11:03:41 +02:00
committed by GitHub
parent 5b0c6e6a94
commit 24ff9d3382
12 changed files with 43 additions and 53 deletions

View File

@@ -4,22 +4,15 @@ export interface AdminCreateCampaign {
/**
* The campaign's name.
*/
name?: string
name: string
/**
* The campaign's description.
*/
description?: string
/**
* The campaign's currency code.
*
* @example
* usd
*/
currency?: string | null
description?: string | null
/**
* The campaign's identifier.
*/
campaign_identifier?: string
campaign_identifier: string
/**
* The date the campaign and its promotions start at.
*/
@@ -70,14 +63,7 @@ export interface AdminUpdateCampaign {
/**
* The campaign's description.
*/
description?: string
/**
* The campaign's currency code.
*
* @example
* usd
*/
currency?: string | null
description?: string | null
/**
* The campaign's identifier.
*/
@@ -94,21 +80,9 @@ export interface AdminUpdateCampaign {
* The campaign's budget.
*/
budget?: {
/**
* The budget's type. `spend` means the limit is set on the total amount discounted by the campaign's promotions;
* `usage` means the limit is set on the total number of times the campaign's promotions can be used.
*/
type?: CampaignBudgetTypeValues
/**
* The budget's currency code.
*
* @example
* usd
*/
currency_code?: string | null
/**
* The budget's limit.
*/
limit?: number | null
} | null
}
}

View File

@@ -78,7 +78,7 @@ export interface AdminGetPromotionRuleParams {
*/
application_method_type?: ApplicationMethodTypeValues
/**
* The type of application method to retrieve the attributes for.
* The target type of application method to retrieve the attributes for.
*/
application_method_target_type?: ApplicationMethodTargetTypeValues
}
@@ -92,6 +92,10 @@ export interface AdminGetPromotionRuleTypeParams extends SelectParams {
* The type of application method to retrieve the attributes for.
*/
application_method_type?: ApplicationMethodTypeValues
/**
* The target type of application method to retrieve the attributes for.
*/
application_method_target_type?: ApplicationMethodTargetTypeValues
}
export interface AdminGetPromotionsRuleValueParams extends FindParams {
@@ -103,5 +107,8 @@ export interface AdminGetPromotionsRuleValueParams extends FindParams {
* Filter by rule value.
*/
value?: string | string[]
/**
* The target type of application method to retrieve the attributes for.
*/
application_method_target_type?: ApplicationMethodTargetTypeValues
}