fixed merge conflicts

This commit is contained in:
--list
2021-06-17 08:37:54 +02:00
14 changed files with 15371 additions and 2 deletions

6541
docs/api/admin-spec3.yaml Normal file

File diff suppressed because it is too large Load Diff

4959
docs/api/store-spec3.json Normal file

File diff suppressed because it is too large Load Diff

3822
docs/api/store-spec3.yaml Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -149,7 +149,11 @@ export default async (req, res) => {
.withTransaction(manager)
.retrieve(id)
<<<<<<< HEAD
const evaluatedNoNotification = value.no_notification !== undefined && value.no_notification !== null ? value.no_notification : order.no_notification
=======
const evaluatedNoNotification = value.no_notification !== undefined ? value.no_notification : order.no_notification
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
returnObj.no_notification = evaluatedNoNotification
const createdReturn = await returnService

View File

@@ -8,16 +8,25 @@ export class noNotification1623231564533 implements MigrationInterface {
await queryRunner.query(`ALTER TABLE "claim_order" ADD "no_notification" boolean`);
await queryRunner.query(`ALTER TABLE "swap" ADD "no_notification" boolean`);
await queryRunner.query(`ALTER TABLE "order" ADD "no_notification" boolean`);
<<<<<<< HEAD
await queryRunner.query(`ALTER TABLE "draft_order" ADD "no_notification_order" boolean`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "draft_order" DROP COLUMN "no_notification_order"`);
=======
}
public async down(queryRunner: QueryRunner): Promise<void> {
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
await queryRunner.query(`ALTER TABLE "order" DROP COLUMN "no_notification"`);
await queryRunner.query(`ALTER TABLE "swap" DROP COLUMN "no_notification"`);
await queryRunner.query(`ALTER TABLE "claim_order" DROP COLUMN "no_notification"`);
await queryRunner.query(`ALTER TABLE "return" DROP COLUMN "no_notification"`);
<<<<<<< HEAD
=======
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
}
}

View File

@@ -169,7 +169,7 @@ export class Return {
* type: string
* format: date-time
* no_notification:
* description: "Flag for describing whether or not notifications related to this should be send."
* description: "When set to true, no notification will be sent related to this return."
* type: boolean
* metadata:
* description: "An optional key-value map with additional information."

View File

@@ -228,7 +228,7 @@ export class Swap {
* type: string
* format: date-time
* no_notification:
* description: "Flag for describing whether or not notifications related to this should be send."
* description: "If set to true, no notification will be sent related to this swap"
* type: boolean
* metadata:
* description: "An optional key-value map with additional information."

View File

@@ -215,10 +215,16 @@ describe("ClaimService", () => {
it.each(
[
[false, false],
<<<<<<< HEAD
[undefined, true],
[null, true],
])
("passes correct no_notification status to event bus, with '%s'", async (input, expected) => {
=======
[undefined, true]
],
"passes correct no_notification status to event bus", async (input, expected) => {
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
await claimService.create({
...testClaim,
no_notification: input,
@@ -228,6 +234,10 @@ describe("ClaimService", () => {
id: expect.any(String),
no_notification: expected
})
<<<<<<< HEAD
=======
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
})
})

View File

@@ -1134,8 +1134,12 @@ describe("OrderService", () => {
it.each([
[false, false],
[undefined, true],
<<<<<<< HEAD
[null, true],
])("emits correct no_notification option with '%s'", async (input, expected) => {
=======
],"emits correct no_notification option", async (input, expected) => {
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
await orderService.createRefund(
IdMap.getId("order_123"),
100,

View File

@@ -345,8 +345,12 @@ describe("SwapService", () => {
[true, true],
[false, false],
[undefined, true],
<<<<<<< HEAD
[null, true],
])( "passes correct no_notification to eventBus with '%s'", async (input, expected) => {
=======
])( "passes correct no_notification to eventBus with %s", async (input, expected) => {
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
await swapService.create(
testOrder,

View File

@@ -241,7 +241,11 @@ class ClaimService extends BaseService {
)
)
<<<<<<< HEAD
const evaluatedNoNotification = no_notification !== undefined && no_notification !== null ? no_notification : order.no_notification
=======
const evaluatedNoNotification = no_notification !== undefined ? no_notification : order.no_notification
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
const created = claimRepo.create({
shipping_address_id: addressId,

View File

@@ -164,6 +164,9 @@ class NotificationService extends BaseService {
if (!subs) {
return
}
if(data['no_notification'] === true) {
return
}
if(data['no_notification'] === true) {
return

View File

@@ -987,6 +987,7 @@ class OrderService extends BaseService {
"tax_total",
"gift_card_total",
"total",
"no_notification"
],
relations: [
"discounts",
@@ -1135,7 +1136,11 @@ class OrderService extends BaseService {
const result = await this.retrieve(orderId)
<<<<<<< HEAD
const evaluatedNoNotification = noNotification !== undefined && noNotification !== null ? noNotification : order.no_notification
=======
const evaluatedNoNotification = noNotification !== undefined ? noNotification : order.no_notification
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
this.eventBus_.emit(OrderService.Events.REFUND_CREATED, {
id: result.id,

View File

@@ -238,7 +238,11 @@ class SwapService extends BaseService {
})
)
<<<<<<< HEAD
const evaluatedNoNotification = noNotification !== undefined && noNotification !== null ? noNotification : order.no_notification
=======
const evaluatedNoNotification = noNotification !== undefined ? noNotification : order.no_notification
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
const swapRepo = manager.getCustomRepository(this.swapRepository_)
const created = swapRepo.create({