From 0b6254fa8a8f47952dd7696751ed6814cbf837d2 Mon Sep 17 00:00:00 2001 From: acuiuli Date: Mon, 2 Oct 2023 15:24:18 +0200 Subject: [PATCH 1/7] new category field in ThirdPartyAttachment --- openapi/definitions.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openapi/definitions.yaml b/openapi/definitions.yaml index 1fcd0104..77cdc316 100644 --- a/openapi/definitions.yaml +++ b/openapi/definitions.yaml @@ -1502,6 +1502,12 @@ ThirdPartyAttachment: url: type: string minLength: 1 + category: + type: string + default: DOCUMENT + x-extensible-enum: + - DOCUMENT + - F24 required: - id - url From 25952e901cd8cda2acc75c4cd4a3750100f317ab Mon Sep 17 00:00:00 2001 From: acuiuli Date: Mon, 2 Oct 2023 15:33:24 +0200 Subject: [PATCH 2/7] test fix --- openapi/__tests__/definitions.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openapi/__tests__/definitions.test.ts b/openapi/__tests__/definitions.test.ts index 32ed13db..17ba9878 100644 --- a/openapi/__tests__/definitions.test.ts +++ b/openapi/__tests__/definitions.test.ts @@ -948,8 +948,8 @@ describe("ThirdPartyMessage", () => { it("should decode a ThirdPartyMessage with attachments", async () => { const aThirdPartyMessage = { attachments: [ - { id: "anId", url: "an/Url" }, - { id: "anotherId", url: "another/Url", name: "anotherName" } + { id: "anId", url: "an/Url", category: "DOCUMENT" }, + { id: "anotherId", url: "another/Url", name: "anotherName", category: "DOCUMENT" } ] }; From 2904fe2f6ffcd6df2fbe682ed6d5a16c82a6e175 Mon Sep 17 00:00:00 2001 From: acuiuli Date: Mon, 2 Oct 2023 15:50:21 +0200 Subject: [PATCH 3/7] modified category field type in ThirdPartyAttachment --- openapi/definitions.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/openapi/definitions.yaml b/openapi/definitions.yaml index 77cdc316..eba07a2d 100644 --- a/openapi/definitions.yaml +++ b/openapi/definitions.yaml @@ -1505,9 +1505,6 @@ ThirdPartyAttachment: category: type: string default: DOCUMENT - x-extensible-enum: - - DOCUMENT - - F24 required: - id - url From 92f1f4a26e58173777f2c08c750625dae9c7dcbd Mon Sep 17 00:00:00 2001 From: acuiuli Date: Mon, 2 Oct 2023 15:57:00 +0200 Subject: [PATCH 4/7] test commit for pipeline bug From 204e71edcee68f73ea7a09f7d5202b88e2fbd549 Mon Sep 17 00:00:00 2001 From: acuiuli Date: Tue, 3 Oct 2023 17:28:56 +0200 Subject: [PATCH 5/7] added new flag require_secure_channels for messages --- openapi/__tests__/definitions.test.ts | 3 ++- openapi/definitions.yaml | 10 ++++++++++ src/models/__tests__/message.test.ts | 3 ++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/openapi/__tests__/definitions.test.ts b/openapi/__tests__/definitions.test.ts index 17ba9878..8dea9a2d 100644 --- a/openapi/__tests__/definitions.test.ts +++ b/openapi/__tests__/definitions.test.ts @@ -200,7 +200,8 @@ const aContentWithoutPaymentData = { subject: "A Subject of more than 80 characters. Try to reach this value with stupid words, and I will leave here because I like it", markdown: - "A markdown of more than 80 characters. Try to reach this value with stupid words, and I will leave here because I like it" + "A markdown of more than 80 characters. Try to reach this value with stupid words, and I will leave here because I like it", + require_secure_channels: false }; const aPaymentDataWithoutPayee: PaymentData = { diff --git a/openapi/definitions.yaml b/openapi/definitions.yaml index eba07a2d..70d997c3 100644 --- a/openapi/definitions.yaml +++ b/openapi/definitions.yaml @@ -97,6 +97,11 @@ MessageContentBase: $ref: "#/MessageSubject" markdown: $ref: "#/MessageBodyMarkdown" + require_secure_channels: + type: boolean + default: false + description: |- + When true, messages won't trigger email notifications (only push). required: - subject - markdown @@ -134,6 +139,11 @@ NewMessageContent: $ref: "#/ThirdPartyData" legal_data: $ref: '#/LegalData' + require_secure_channels: + type: boolean + default: false + description: |- + When true, messages won't trigger email notifications (only push). NewMessage: type: object properties: diff --git a/src/models/__tests__/message.test.ts b/src/models/__tests__/message.test.ts index a476b177..33375fba 100644 --- a/src/models/__tests__/message.test.ts +++ b/src/models/__tests__/message.test.ts @@ -51,7 +51,8 @@ const MESSAGE_CONTAINER_NAME = "message-content" as NonEmptyString; const aMessageBodyMarkdown = "test".repeat(80) as MessageBodyMarkdown; const aGeneralMessageContent = { markdown: aMessageBodyMarkdown, - subject: "test".repeat(10) as MessageSubject + subject: "test".repeat(10) as MessageSubject, + require_secure_channels: false }; const aMessageContent = { From d1d3a4d48b02f2782565bc74960b43fa5acd77c5 Mon Sep 17 00:00:00 2001 From: acuiuli Date: Tue, 3 Oct 2023 17:39:28 +0200 Subject: [PATCH 6/7] removed default for flag require_secure_channels in message --- openapi/__tests__/definitions.test.ts | 3 +-- openapi/definitions.yaml | 1 - src/models/__tests__/message.test.ts | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/openapi/__tests__/definitions.test.ts b/openapi/__tests__/definitions.test.ts index 8dea9a2d..17ba9878 100644 --- a/openapi/__tests__/definitions.test.ts +++ b/openapi/__tests__/definitions.test.ts @@ -200,8 +200,7 @@ const aContentWithoutPaymentData = { subject: "A Subject of more than 80 characters. Try to reach this value with stupid words, and I will leave here because I like it", markdown: - "A markdown of more than 80 characters. Try to reach this value with stupid words, and I will leave here because I like it", - require_secure_channels: false + "A markdown of more than 80 characters. Try to reach this value with stupid words, and I will leave here because I like it" }; const aPaymentDataWithoutPayee: PaymentData = { diff --git a/openapi/definitions.yaml b/openapi/definitions.yaml index 70d997c3..249e21c0 100644 --- a/openapi/definitions.yaml +++ b/openapi/definitions.yaml @@ -141,7 +141,6 @@ NewMessageContent: $ref: '#/LegalData' require_secure_channels: type: boolean - default: false description: |- When true, messages won't trigger email notifications (only push). NewMessage: diff --git a/src/models/__tests__/message.test.ts b/src/models/__tests__/message.test.ts index 33375fba..a476b177 100644 --- a/src/models/__tests__/message.test.ts +++ b/src/models/__tests__/message.test.ts @@ -51,8 +51,7 @@ const MESSAGE_CONTAINER_NAME = "message-content" as NonEmptyString; const aMessageBodyMarkdown = "test".repeat(80) as MessageBodyMarkdown; const aGeneralMessageContent = { markdown: aMessageBodyMarkdown, - subject: "test".repeat(10) as MessageSubject, - require_secure_channels: false + subject: "test".repeat(10) as MessageSubject }; const aMessageContent = { From e652664f7135f665a3e2f925c9a3614a1404ad71 Mon Sep 17 00:00:00 2001 From: acuiuli Date: Tue, 3 Oct 2023 17:49:13 +0200 Subject: [PATCH 7/7] removed default for require_secure_channels flag in message --- openapi/definitions.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/openapi/definitions.yaml b/openapi/definitions.yaml index 249e21c0..536b585d 100644 --- a/openapi/definitions.yaml +++ b/openapi/definitions.yaml @@ -99,7 +99,6 @@ MessageContentBase: $ref: "#/MessageBodyMarkdown" require_secure_channels: type: boolean - default: false description: |- When true, messages won't trigger email notifications (only push). required: @@ -139,10 +138,6 @@ NewMessageContent: $ref: "#/ThirdPartyData" legal_data: $ref: '#/LegalData' - require_secure_channels: - type: boolean - description: |- - When true, messages won't trigger email notifications (only push). NewMessage: type: object properties: