File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,20 @@ namespace ShopAPIRoute {
168168 */
169169 export const refundAllItemsInOrder = ( data : { order_id : string } ) =>
170170 shopAPIClient . delete < void > ( `v1/orders/${ data . order_id } /` ) ;
171+
172+ /**
173+ * 결제 완료된 주문의 사용자 정의 응답용 상품 옵션을 수정합니다.
174+ * @param data.order_id - 수정할 주문 내역의 UUID
175+ * @param data.order_product_relation_id - 수정할 주문 내역 내 상품의 UUID
176+ * @param data.options - 수정할 상품 옵션 정보
177+ * @param data.options[].order_product_option_relation - 수정할 상품 옵션의 UUID
178+ * @param data.options[].custom_response - 수정할 상품 옵션에 대한 사용자 정의 응답
179+ */
180+ export const patchOrderOptions = async ( data : ShopAPISchema . OrderOptionsPatchRequest ) =>
181+ shopAPIClient . patch < ShopAPISchema . Order , ShopAPISchema . OrderOptionsPatchRequest [ 'options' ] > (
182+ `v1/orders/${ data . order_id } /products/${ data . order_product_relation_id } /options/` ,
183+ data . options
184+ ) ;
171185}
172186
173187export default ShopAPIRoute ;
Original file line number Diff line number Diff line change @@ -140,6 +140,13 @@ namespace ShopAPIHook {
140140 mutationFn : ShopAPIRoute . refundAllItemsInOrder ,
141141 meta : { invalidates : [ QUERY_KEYS . ORDER_LIST ] } ,
142142 } ) ;
143+
144+ export const useOptionsOfOneItemInOrderPatchMutation = ( ) =>
145+ useMutation ( {
146+ mutationKey : MUTATION_KEYS . CART_ITEM_APPEND ,
147+ mutationFn : ShopAPIRoute . patchOrderOptions ,
148+ meta : { invalidates : [ QUERY_KEYS . ORDER_LIST ] } ,
149+ } ) ;
143150}
144151
145152export default ShopAPIHook ;
You can’t perform that action at this time.
0 commit comments