began impl. of no_notification
This commit is contained in:
1 parent
86d91da31f
commit
b8833055b2
6 files changed
+25
-7
No files matched your search
@@ -31,9 +31,6 @@ import { MedusaError, Validator } from "medusa-core-utils"
|
|||||||
* option_id:
|
* option_id:
|
||||||
* type: string
|
* type: string
|
||||||
* description: The id of the Shipping Option to create the Shipping Method from.
|
* 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:
|
* tags:
|
||||||
* - Return
|
* - Return
|
||||||
@@ -62,8 +59,7 @@ export default async (req, res) => {
|
|||||||
.keys({
|
.keys({
|
||||||
option_id: Validator.string().optional(),
|
option_id: Validator.string().optional(),
|
||||||
})
|
})
|
||||||
.optional(),
|
.optional()
|
||||||
no_notification: Validator.boolean().optional()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const { value, error } = schema.validate(req.body)
|
const { value, error } = schema.validate(req.body)
|
||||||
@@ -136,8 +132,7 @@ export default async (req, res) => {
|
|||||||
.withTransaction(manager)
|
.withTransaction(manager)
|
||||||
.emit("order.return_requested", {
|
.emit("order.return_requested", {
|
||||||
id: value.order_id,
|
id: value.order_id,
|
||||||
return_id: createdReturn.id,
|
return_id: createdReturn.id
|
||||||
no_notification: no_notification
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return {
|
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> {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -226,6 +226,9 @@ export class ClaimOrder {
|
|||||||
* deleted_at:
|
* deleted_at:
|
||||||
* type: string
|
* type: string
|
||||||
* format: date-time
|
* format: date-time
|
||||||
|
* no_notification:
|
||||||
|
* description: "Flag for describing whether or not notifications related to this should be send."
|
||||||
|
* type: boolean
|
||||||
* metadata:
|
* metadata:
|
||||||
* type: object
|
* type: object
|
||||||
*/
|
*/
|
||||||
@@ -417,4 +417,7 @@ export class Order {
|
|||||||
* type: integer
|
* type: integer
|
||||||
* paid_total:
|
* paid_total:
|
||||||
* type: integer
|
* type: integer
|
||||||
|
* no_notification:
|
||||||
|
* description: "Flag for describing whether or not notifications related to this should be send."
|
||||||
|
* type: boolean
|
||||||
*/
|
*/
|
||||||
@@ -168,6 +168,9 @@ export class Return {
|
|||||||
* description: "The date with timezone at which the resource was last updated."
|
* description: "The date with timezone at which the resource was last updated."
|
||||||
* type: string
|
* type: string
|
||||||
* format: date-time
|
* format: date-time
|
||||||
|
* no_notification:
|
||||||
|
* description: "Flag for describing whether or not notifications related to this should be send."
|
||||||
|
* type: boolean
|
||||||
* metadata:
|
* metadata:
|
||||||
* description: "An optional key-value map with additional information."
|
* description: "An optional key-value map with additional information."
|
||||||
* type: object
|
* type: object
|
||||||
|
|||||||
@@ -227,6 +227,9 @@ export class Swap {
|
|||||||
* description: "The date with timezone at which the resource was last updated."
|
* description: "The date with timezone at which the resource was last updated."
|
||||||
* type: string
|
* type: string
|
||||||
* format: date-time
|
* format: date-time
|
||||||
|
* no_notification:
|
||||||
|
* description: "Flag for describing whether or not notifications related to this should be send."
|
||||||
|
* type: boolean
|
||||||
* metadata:
|
* metadata:
|
||||||
* description: "An optional key-value map with additional information."
|
* description: "An optional key-value map with additional information."
|
||||||
* type: object
|
* type: object
|
||||||
|
|||||||
Reference in new issue
Block a user