Skip to content

Commit dfe89b5

Browse files
authored
feat!: add new endpoint for exporting bulk codes (#41)
BREAKING CHANGE: add new endpoint for exporting bulk codes
1 parent 5c60361 commit dfe89b5

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/endpoints/rule-promotions.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,10 @@ class RulePromotionsEndpoint extends CRUDExtend {
8282
}
8383
)
8484
}
85+
86+
GetCodeExportFile(promotionId, jobId) {
87+
return this.request.send(`${this.endpoint}/${promotionId}/jobs/${jobId}/file`, 'Get')
88+
}
89+
8590
}
8691
export default RulePromotionsEndpoint

src/types/rule-promotions.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,15 @@ export interface DeleteRulePromotionCodes extends ResourceList<any> {
130130

131131
export interface RulePromotionFilter {
132132
eq?: {
133+
job_type?: string
133134
code?: string
134135
}
135136
}
136137

138+
export interface CodeFileHref {
139+
href: string
140+
}
141+
137142
export interface RulePromotionsEndpoint
138143
extends CrudQueryableResource<
139144
RulePromotion,
@@ -167,4 +172,6 @@ export interface RulePromotionsEndpoint
167172
promotionId: string,
168173
codes: DeleteRulePromotionCodes[]
169174
): Promise<{}>
175+
176+
GetCodeExportFile(promotionId:string, jobId: string): Promise<CodeFileHref>
170177
}

0 commit comments

Comments
 (0)