feat(core-flows): support ad hoc returns (#13598)

* feat(core-flows): support ad hoc returns

* fix: missing transform

* handle edge case

* refactor

* replace gte for gt

* cleanup

* weird bug fix

* add test

* Create quick-nails-kick.md

* stop sending empty strings

* add code to refund reason

* fix build

* fix tests

* handle code in dashboard

* fix tests

* more tests failing

* add reference and reference id to credit lieng

* rework create refund form
This commit is contained in:
William Bouchard
2025-09-30 07:38:50 -04:00
committed by GitHub
parent bd9ecd5e66
commit 087887fefb
24 changed files with 278 additions and 255 deletions
@@ -12,6 +12,7 @@ export const defaultAdminPaymentFields = [
"refunds.note",
"refunds.payment_id",
"refunds.refund_reason.label",
"refunds.refund_reason.code",
]
export const listTransformQueryConfig = {
@@ -1,6 +1,7 @@
export const defaultAdminRefundReasonFields = [
"id",
"label",
"code",
"description",
"created_at",
"updated_at",
@@ -7,6 +7,7 @@ export type AdminCreatePaymentRefundReasonType = z.infer<
export const AdminCreatePaymentRefundReason = z
.object({
label: z.string(),
code: z.string(),
description: z.string().nullish(),
})
.strict()
@@ -17,6 +18,7 @@ export type AdminUpdatePaymentRefundReasonType = z.infer<
export const AdminUpdatePaymentRefundReason = z
.object({
label: z.string().optional(),
code: z.string().optional(),
description: z.string().nullish(),
})
.strict()