began impl. of no_notification
This commit is contained in:
@@ -31,9 +31,6 @@ import { MedusaError, Validator } from "medusa-core-utils"
|
||||
* option_id:
|
||||
* type: string
|
||||
* description: The id of the Shipping Option to create the Shipping Method from.
|
||||
* no_notification:
|
||||
* description: If set to true no notification will be send
|
||||
* type: boolean
|
||||
*
|
||||
* tags:
|
||||
* - Return
|
||||
@@ -62,8 +59,7 @@ export default async (req, res) => {
|
||||
.keys({
|
||||
option_id: Validator.string().optional(),
|
||||
})
|
||||
.optional(),
|
||||
no_notification: Validator.boolean().optional()
|
||||
.optional()
|
||||
})
|
||||
|
||||
const { value, error } = schema.validate(req.body)
|
||||
@@ -136,8 +132,7 @@ export default async (req, res) => {
|
||||
.withTransaction(manager)
|
||||
.emit("order.return_requested", {
|
||||
id: value.order_id,
|
||||
return_id: createdReturn.id,
|
||||
no_notification: no_notification
|
||||
return_id: createdReturn.id
|
||||
})
|
||||
|
||||
return {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import {MigrationInterface, QueryRunner} from "typeorm";
|
||||
|
||||
export class noNotification1622713782458 implements MigrationInterface {
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -134,6 +134,9 @@ export class ClaimOrder {
|
||||
@DeleteDateColumn({ type: "timestamptz" })
|
||||
deleted_at: Date
|
||||
|
||||
@Column({ type: "boolean"})
|
||||
no_notification: Boolean
|
||||
|
||||
@Column({ type: "jsonb", nullable: true })
|
||||
metadata: any
|
||||
|
||||
|
||||
@@ -245,6 +245,9 @@ export class Order {
|
||||
@Column({ type: "jsonb", nullable: true })
|
||||
metadata: any
|
||||
|
||||
@Column({ type: "boolean"})
|
||||
no_notification: Boolean
|
||||
|
||||
@Column({ nullable: true })
|
||||
idempotency_key: string
|
||||
|
||||
|
||||
@@ -99,6 +99,9 @@ export class Return {
|
||||
@UpdateDateColumn({ type: "timestamptz" })
|
||||
updated_at: Date
|
||||
|
||||
@Column({ type: "boolean"})
|
||||
no_notification: Boolean
|
||||
|
||||
@Column({ type: "jsonb", nullable: true })
|
||||
metadata: any
|
||||
|
||||
|
||||
@@ -130,6 +130,9 @@ export class Swap {
|
||||
@DeleteDateColumn({ type: "timestamptz" })
|
||||
deleted_at: Date
|
||||
|
||||
@Column({ type: "boolean"})
|
||||
no_notification: Boolean
|
||||
|
||||
@Column({ type: "jsonb", nullable: true })
|
||||
metadata: any
|
||||
|
||||
|
||||
Reference in New Issue
Block a user