File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import type {
1212 CampaignResponse ,
1313 UpdateRequest ,
1414 ListResponse ,
15- SearchOptions ,
15+ SearchOptions , DuplicateOptions ,
1616} from './types' ;
1717
1818export type Client = ReturnType < typeof createClient > ;
@@ -48,8 +48,8 @@ export function createClient(api: DeferredJobsApiClient) {
4848 return api . get < CampaignResponse > ( `${ routing . campaignsUrl } /${ id } ` ) ;
4949 }
5050
51- async function duplicate ( id : Campaign [ 'id' ] ) : Promise < CampaignResponse > {
52- return api . post < CampaignResponse > ( `${ routing . campaignsUrl } /${ id } /duplicate` ) ;
51+ async function duplicate ( id : Campaign [ 'id' ] , options ?: DuplicateOptions ) : Promise < CampaignResponse > {
52+ return api . post < CampaignResponse > ( `${ routing . campaignsUrl } /${ id } /duplicate` , { payload : options } ) ;
5353 }
5454
5555 async function doDelete ( id : Campaign [ 'id' ] ) : Promise < void > {
Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ export interface UpdateRequest {
3535 is_click_tracking_enabled ?: boolean ;
3636}
3737
38+ export interface DuplicateOptions {
39+ with_recipients ?: boolean ;
40+ }
41+
3842export interface RecipientsOperationResponse {
3943 campaign : Campaign ;
4044 warnings : Warning [ ] ;
You can’t perform that action at this time.
0 commit comments