feat(dashboard, order, medusa, types, js-sdk): Request return e2e flow (#7848)

This commit is contained in:
Frane Polić
2024-07-24 19:19:00 +02:00
committed by GitHub
parent 0a482e972f
commit f7d1cd259e
36 changed files with 2251 additions and 146 deletions

View File

@@ -129,15 +129,17 @@ export class Migration20240604100512 extends Migration {
exchange_id
)
WHERE exchange_id IS NOT NULL AND deleted_at IS NULL;
CREATE TYPE return_status_enum AS ENUM (
'requested',
'received',
'partially_received',
'canceled'
);
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'return_status_enum') THEN
CREATE TYPE return_status_enum AS ENUM (
'requested',
'received',
'partially_received',
'canceled');
END IF;
END$$;
CREATE TABLE IF NOT EXISTS "return" (
"id" TEXT NOT NULL,
@@ -265,12 +267,15 @@ export class Migration20240604100512 extends Migration {
CREATE INDEX IF NOT EXISTS "IDX_order_exchange_item_item_id" ON "order_exchange_item" ("item_id")
WHERE deleted_at IS NULL;
CREATE TYPE order_claim_type_enum AS ENUM (
'refund',
'replace'
);
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'order_claim_type_enum') THEN
CREATE TYPE order_claim_type_enum AS ENUM (
'refund',
'replace'
);
END IF;
END$$;
CREATE TABLE IF NOT EXISTS "order_claim" (
"id" TEXT NOT NULL,
@@ -302,14 +307,17 @@ export class Migration20240604100512 extends Migration {
CREATE INDEX IF NOT EXISTS "IDX_order_claim_return_id" ON "order_claim" ("return_id")
WHERE return_id IS NOT NULL AND deleted_at IS NULL;
CREATE TYPE claim_reason_enum AS ENUM (
'missing_item',
'wrong_item',
'production_failure',
'other'
);
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'claim_reason_enum') THEN
CREATE TYPE claim_reason_enum AS ENUM (
'missing_item',
'wrong_item',
'production_failure',
'other'
);
END IF;
END$$;
CREATE TABLE IF NOT EXISTS "order_claim_item" (
"id" TEXT NOT NULL,
@@ -337,7 +345,6 @@ export class Migration20240604100512 extends Migration {
WHERE deleted_at IS NULL;
CREATE TABLE IF NOT EXISTS "order_claim_item_image" (
"id" TEXT NOT NULL,
"claim_item_id" TEXT NOT NULL,