From 8d2b7a435c20077a3cc557fb1769caa242cb882a Mon Sep 17 00:00:00 2001 From: chaks03 Date: Sun, 18 Jul 2021 12:25:21 +0530 Subject: [PATCH 01/55] Fix: Add DeviceID and Device Type to User spec --- .../messagerosa/core/model/DeviceType.java | 22 +++++++++++++++++++ .../core/model/SenderReceiverInfo.java | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 src/main/java/messagerosa/core/model/DeviceType.java diff --git a/src/main/java/messagerosa/core/model/DeviceType.java b/src/main/java/messagerosa/core/model/DeviceType.java new file mode 100644 index 0000000..0832a69 --- /dev/null +++ b/src/main/java/messagerosa/core/model/DeviceType.java @@ -0,0 +1,22 @@ +package messagerosa.core.model; + +public enum DeviceType { + PHONE("phone"); + + private String name; + + DeviceType(String deviceType) { + name=deviceType; + } + + public String toString(){ + return name; + } + + public static String getEnumByString(String code){ + for(DeviceType e : DeviceType.values()){ + if(e.name.equals(code)) return e.name(); + } + return null; + } +} diff --git a/src/main/java/messagerosa/core/model/SenderReceiverInfo.java b/src/main/java/messagerosa/core/model/SenderReceiverInfo.java index 5b9315b..92ee556 100644 --- a/src/main/java/messagerosa/core/model/SenderReceiverInfo.java +++ b/src/main/java/messagerosa/core/model/SenderReceiverInfo.java @@ -19,12 +19,12 @@ public class SenderReceiverInfo { // persist private String userID; - private ArrayList groups; - private String campaignID; private String formID; private boolean bot; private boolean broadcast; private Map meta; + private DeviceType deviceType; + private String deviceID; } From f6c183d37c0aa349a2ea599020cad2d7da4107c7 Mon Sep 17 00:00:00 2001 From: chaks03 Date: Mon, 9 Aug 2021 07:46:59 +0530 Subject: [PATCH 02/55] Docs: xMessage fields --- src/main/java/messagerosa/core/model/SenderReceiverInfo.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/messagerosa/core/model/SenderReceiverInfo.java b/src/main/java/messagerosa/core/model/SenderReceiverInfo.java index 92ee556..82d0248 100644 --- a/src/main/java/messagerosa/core/model/SenderReceiverInfo.java +++ b/src/main/java/messagerosa/core/model/SenderReceiverInfo.java @@ -18,7 +18,7 @@ public class SenderReceiverInfo { // persist - private String userID; + private String userID; //PhoneNo private ArrayList groups; private String campaignID; private String formID; @@ -26,5 +26,5 @@ public class SenderReceiverInfo { private boolean broadcast; private Map meta; private DeviceType deviceType; - private String deviceID; + private String deviceID; //EncryptedDeviceID } From 67a2a6572b05178ea6026d879f643011f444164d Mon Sep 17 00:00:00 2001 From: ChakshuGautam Date: Mon, 22 Nov 2021 18:30:07 +0530 Subject: [PATCH 03/55] Fix: Update spring version --- message-rosa.iml | 2 -- pom.xml | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) delete mode 100644 message-rosa.iml diff --git a/message-rosa.iml b/message-rosa.iml deleted file mode 100644 index 74f3f13..0000000 --- a/message-rosa.iml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index dbfa784..2b03f14 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 2.3.0.RELEASE + 2.5.7 com.uci @@ -18,6 +18,10 @@ + + org.springframework.boot + spring-boot-starter-validation + org.projectlombok lombok From e0de8ef3e6558e1744cd7c34a5a3acfed34d127a Mon Sep 17 00:00:00 2001 From: ChakshuGautam Date: Fri, 26 Nov 2021 12:24:53 +0530 Subject: [PATCH 04/55] Fix: Validation dependency --- pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pom.xml b/pom.xml index 2b03f14..c82c674 100644 --- a/pom.xml +++ b/pom.xml @@ -67,6 +67,12 @@ org.apache.httpcomponents httpclient + + org.jetbrains + annotations + RELEASE + compile + From 86c8bd3e9b04247bbb6085c8a6111a7dca565518 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Fri, 17 Dec 2021 12:58:59 +0530 Subject: [PATCH 05/55] update shade plugin version to 3.2.4 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2b03f14..0352068 100644 --- a/pom.xml +++ b/pom.xml @@ -74,7 +74,7 @@ org.apache.maven.plugins maven-shade-plugin - 2.3 + 3.2.4 From 2bc8370cf533828cb39024ae7550f23fadc898f0 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Tue, 28 Dec 2021 12:16:34 +0530 Subject: [PATCH 06/55] changes for go back & main menu button & LOC --- src/main/java/messagerosa/core/model/ButtonChoice.java | 1 + src/main/java/messagerosa/core/model/XMessage.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/main/java/messagerosa/core/model/ButtonChoice.java b/src/main/java/messagerosa/core/model/ButtonChoice.java index f87dec2..e8ed955 100644 --- a/src/main/java/messagerosa/core/model/ButtonChoice.java +++ b/src/main/java/messagerosa/core/model/ButtonChoice.java @@ -10,4 +10,5 @@ public class ButtonChoice { private String key; private String text; + private Boolean backmenu; } diff --git a/src/main/java/messagerosa/core/model/XMessage.java b/src/main/java/messagerosa/core/model/XMessage.java index 284d63e..6a25567 100644 --- a/src/main/java/messagerosa/core/model/XMessage.java +++ b/src/main/java/messagerosa/core/model/XMessage.java @@ -80,6 +80,8 @@ public enum MessageType { private ConversationStage conversationStage; + private String levelOfConversation; + @NotNull private ArrayList transformers; // -1 no transfer like ms3 transforms msg to next msg From dbddc5698a2b59d6e0590efa4505c7c017a6dea2 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Mon, 3 Jan 2022 14:41:10 +0530 Subject: [PATCH 07/55] maven shade plugin version issue changes --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c82c674..8850ac1 100644 --- a/pom.xml +++ b/pom.xml @@ -80,7 +80,7 @@ org.apache.maven.plugins maven-shade-plugin - 2.3 + 3.2.4 From 47caa3b939666c4edfc5788b9472c19afa3043cf Mon Sep 17 00:00:00 2001 From: Surabhi Date: Wed, 5 Jan 2022 17:53:56 +0530 Subject: [PATCH 08/55] conversationLevel in xMsg --- src/main/java/messagerosa/core/model/XMessage.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/messagerosa/core/model/XMessage.java b/src/main/java/messagerosa/core/model/XMessage.java index 6a25567..91509f7 100644 --- a/src/main/java/messagerosa/core/model/XMessage.java +++ b/src/main/java/messagerosa/core/model/XMessage.java @@ -4,6 +4,7 @@ import java.io.StringWriter; import java.time.Instant; import java.util.ArrayList; +import java.util.Map; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; @@ -80,7 +81,7 @@ public enum MessageType { private ConversationStage conversationStage; - private String levelOfConversation; + private ArrayList conversationLevel; @NotNull private ArrayList transformers; // -1 no transfer like ms3 transforms msg to next msg From ba4efa74ffbfa7674c8db04cde0393ccdb84b833 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Fri, 4 Feb 2022 15:57:25 +0530 Subject: [PATCH 09/55] xmsg payload - styling tag --- src/main/java/messagerosa/core/model/XMessagePayload.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/messagerosa/core/model/XMessagePayload.java b/src/main/java/messagerosa/core/model/XMessagePayload.java index 163822b..127fb86 100644 --- a/src/main/java/messagerosa/core/model/XMessagePayload.java +++ b/src/main/java/messagerosa/core/model/XMessagePayload.java @@ -19,4 +19,5 @@ public class XMessagePayload { private LocationParams location; private ContactCard contactCard; private ArrayList buttonChoices; + private String stylingTag; } From 2a33348216082b0a6c86ef1c62be917e32c82cd4 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Thu, 10 Feb 2022 17:07:57 +0530 Subject: [PATCH 10/55] payload changes --- src/main/java/messagerosa/core/model/XMessagePayload.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/messagerosa/core/model/XMessagePayload.java b/src/main/java/messagerosa/core/model/XMessagePayload.java index 127fb86..b8cf317 100644 --- a/src/main/java/messagerosa/core/model/XMessagePayload.java +++ b/src/main/java/messagerosa/core/model/XMessagePayload.java @@ -20,4 +20,6 @@ public class XMessagePayload { private ContactCard contactCard; private ArrayList buttonChoices; private String stylingTag; + private String flow; + private Integer questionIndex; } From e93eb2bdacc77f8981745032a9b5dc6b74e0b8ca Mon Sep 17 00:00:00 2001 From: Surabhi Date: Tue, 15 Feb 2022 17:22:00 +0530 Subject: [PATCH 11/55] xmsg senderrecieverinfo encryptedDeviceID property --- src/main/java/messagerosa/core/model/SenderReceiverInfo.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/messagerosa/core/model/SenderReceiverInfo.java b/src/main/java/messagerosa/core/model/SenderReceiverInfo.java index 82d0248..aa97151 100644 --- a/src/main/java/messagerosa/core/model/SenderReceiverInfo.java +++ b/src/main/java/messagerosa/core/model/SenderReceiverInfo.java @@ -26,5 +26,6 @@ public class SenderReceiverInfo { private boolean broadcast; private Map meta; private DeviceType deviceType; - private String deviceID; //EncryptedDeviceID + private String deviceID; //UUID + private String encryptedDeviceID; //Encrypted Device String } From d4c3296650ef5e1bad2ff1637798a87dc999b247 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Wed, 16 Feb 2022 18:32:07 +0530 Subject: [PATCH 12/55] device type for pwa --- src/main/java/messagerosa/core/model/DeviceType.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/messagerosa/core/model/DeviceType.java b/src/main/java/messagerosa/core/model/DeviceType.java index 0832a69..fd020b3 100644 --- a/src/main/java/messagerosa/core/model/DeviceType.java +++ b/src/main/java/messagerosa/core/model/DeviceType.java @@ -1,7 +1,8 @@ package messagerosa.core.model; public enum DeviceType { - PHONE("phone"); + PHONE("phone"), + PHONE_PWA("ucipwa"); private String name; From bd0a0b9ad52642ba4f190d7cbd0b92b404513133 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Thu, 17 Feb 2022 10:13:34 +0530 Subject: [PATCH 13/55] removed code from pwa --- src/main/java/messagerosa/core/model/DeviceType.java | 3 +-- src/main/java/messagerosa/core/model/SenderReceiverInfo.java | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/messagerosa/core/model/DeviceType.java b/src/main/java/messagerosa/core/model/DeviceType.java index fd020b3..0832a69 100644 --- a/src/main/java/messagerosa/core/model/DeviceType.java +++ b/src/main/java/messagerosa/core/model/DeviceType.java @@ -1,8 +1,7 @@ package messagerosa.core.model; public enum DeviceType { - PHONE("phone"), - PHONE_PWA("ucipwa"); + PHONE("phone"); private String name; diff --git a/src/main/java/messagerosa/core/model/SenderReceiverInfo.java b/src/main/java/messagerosa/core/model/SenderReceiverInfo.java index aa97151..17652bb 100644 --- a/src/main/java/messagerosa/core/model/SenderReceiverInfo.java +++ b/src/main/java/messagerosa/core/model/SenderReceiverInfo.java @@ -27,5 +27,4 @@ public class SenderReceiverInfo { private Map meta; private DeviceType deviceType; private String deviceID; //UUID - private String encryptedDeviceID; //Encrypted Device String } From 77c6a8be4022835c95927845700751df31dca167 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Thu, 17 Feb 2022 10:20:35 +0530 Subject: [PATCH 14/55] changes for pwa --- src/main/java/messagerosa/core/model/DeviceType.java | 3 ++- src/main/java/messagerosa/core/model/SenderReceiverInfo.java | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/messagerosa/core/model/DeviceType.java b/src/main/java/messagerosa/core/model/DeviceType.java index 0832a69..fd020b3 100644 --- a/src/main/java/messagerosa/core/model/DeviceType.java +++ b/src/main/java/messagerosa/core/model/DeviceType.java @@ -1,7 +1,8 @@ package messagerosa.core.model; public enum DeviceType { - PHONE("phone"); + PHONE("phone"), + PHONE_PWA("ucipwa"); private String name; diff --git a/src/main/java/messagerosa/core/model/SenderReceiverInfo.java b/src/main/java/messagerosa/core/model/SenderReceiverInfo.java index 17652bb..aa97151 100644 --- a/src/main/java/messagerosa/core/model/SenderReceiverInfo.java +++ b/src/main/java/messagerosa/core/model/SenderReceiverInfo.java @@ -27,4 +27,5 @@ public class SenderReceiverInfo { private Map meta; private DeviceType deviceType; private String deviceID; //UUID + private String encryptedDeviceID; //Encrypted Device String } From 0e46f8c95a9fbe05691fa48700191c1bc1ecd937 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Thu, 17 Feb 2022 17:17:01 +0530 Subject: [PATCH 15/55] properties for new bind tags --- .../messagerosa/core/model/StylingTag.java | 27 +++++++++++++++++++ .../core/model/XMessagePayload.java | 5 +++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/main/java/messagerosa/core/model/StylingTag.java diff --git a/src/main/java/messagerosa/core/model/StylingTag.java b/src/main/java/messagerosa/core/model/StylingTag.java new file mode 100644 index 0000000..2eefb0c --- /dev/null +++ b/src/main/java/messagerosa/core/model/StylingTag.java @@ -0,0 +1,27 @@ +package messagerosa.core.model; + +public enum StylingTag { + LIST("list"), + QUICKREPLYBTN("buttonsForListItems"), + IMAGE("image"), + AUDIO("audio"), + VIDEO("video"); + + private String name; + + StylingTag(String stylingTag) { + name=stylingTag; + } + + public String toString() { + return name; + } + + public static StylingTag getEnumByText(String code) { + for (StylingTag e : StylingTag.values()) { + if (e.name.equals(code)) + return e; + } + return null; + } +} \ No newline at end of file diff --git a/src/main/java/messagerosa/core/model/XMessagePayload.java b/src/main/java/messagerosa/core/model/XMessagePayload.java index 127fb86..7d3c4e3 100644 --- a/src/main/java/messagerosa/core/model/XMessagePayload.java +++ b/src/main/java/messagerosa/core/model/XMessagePayload.java @@ -19,5 +19,8 @@ public class XMessagePayload { private LocationParams location; private ContactCard contactCard; private ArrayList buttonChoices; - private String stylingTag; + private StylingTag stylingTag; + private String flow; + private Integer index; + private String mediaCaption; } From b39a988b3473397991e575f1a4456b63a42bef2d Mon Sep 17 00:00:00 2001 From: Surabhi Date: Thu, 17 Feb 2022 18:53:44 +0530 Subject: [PATCH 16/55] minor fix --- src/main/java/messagerosa/core/model/XMessagePayload.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/messagerosa/core/model/XMessagePayload.java b/src/main/java/messagerosa/core/model/XMessagePayload.java index 7d3c4e3..0798712 100644 --- a/src/main/java/messagerosa/core/model/XMessagePayload.java +++ b/src/main/java/messagerosa/core/model/XMessagePayload.java @@ -21,6 +21,6 @@ public class XMessagePayload { private ArrayList buttonChoices; private StylingTag stylingTag; private String flow; - private Integer index; + private Integer questionIndex; private String mediaCaption; } From 1bd8e8ea4e62e13e42fe77589bba63b8930cc243 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Tue, 15 Mar 2022 14:43:49 +0530 Subject: [PATCH 17/55] XMsg payload for location & media --- .../core/model/LocationParams.java | 3 +++ .../messagerosa/core/model/MediaCategory.java | 26 +++++++++++++++++++ .../messagerosa/core/model/MessageMedia.java | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 src/main/java/messagerosa/core/model/MediaCategory.java diff --git a/src/main/java/messagerosa/core/model/LocationParams.java b/src/main/java/messagerosa/core/model/LocationParams.java index cd8eec7..a4b9a61 100644 --- a/src/main/java/messagerosa/core/model/LocationParams.java +++ b/src/main/java/messagerosa/core/model/LocationParams.java @@ -12,4 +12,7 @@ public class LocationParams { private double longitude; private double latitude; + private String address; + private String url; + private String name; } diff --git a/src/main/java/messagerosa/core/model/MediaCategory.java b/src/main/java/messagerosa/core/model/MediaCategory.java new file mode 100644 index 0000000..b54e17a --- /dev/null +++ b/src/main/java/messagerosa/core/model/MediaCategory.java @@ -0,0 +1,26 @@ +package messagerosa.core.model; + +public enum MediaCategory { + IMAGE("image"), + AUDIO("audio"), + VIDEO("video"), + VOICE("voice"), + DOCUMENT("document"); + + private String name; + + MediaCategory(String mediaCategory) { + name=mediaCategory; + } + + public String toString(){ + return name; + } + + public static String getEnumByString(String code){ + for(MediaCategory e : MediaCategory.values()){ + if(e.name.equals(code)) return e.name(); + } + return null; + } +} diff --git a/src/main/java/messagerosa/core/model/MessageMedia.java b/src/main/java/messagerosa/core/model/MessageMedia.java index c4b8616..e57e812 100644 --- a/src/main/java/messagerosa/core/model/MessageMedia.java +++ b/src/main/java/messagerosa/core/model/MessageMedia.java @@ -10,7 +10,7 @@ @NoArgsConstructor @AllArgsConstructor public class MessageMedia { - private String category; //category list {image, audio, document, video} + private MediaCategory category; //category list {image, audio, document, video} private String text; //caption, if applicable private String url; } From 143d7f64d82bca7dd9b00fccc718cffa2f1d4034 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Wed, 16 Mar 2022 10:43:37 +0530 Subject: [PATCH 18/55] media category for file --- src/main/java/messagerosa/core/model/MediaCategory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/messagerosa/core/model/MediaCategory.java b/src/main/java/messagerosa/core/model/MediaCategory.java index b54e17a..22726ca 100644 --- a/src/main/java/messagerosa/core/model/MediaCategory.java +++ b/src/main/java/messagerosa/core/model/MediaCategory.java @@ -5,7 +5,7 @@ public enum MediaCategory { AUDIO("audio"), VIDEO("video"), VOICE("voice"), - DOCUMENT("document"); + FILE("file"); private String name; From bf2959ed73f665f2f4b6a767d5be2b29f048dd5a Mon Sep 17 00:00:00 2001 From: Surabhi Date: Tue, 22 Mar 2022 17:46:52 +0530 Subject: [PATCH 19/55] outbound - doc --- src/main/java/messagerosa/core/model/StylingTag.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/messagerosa/core/model/StylingTag.java b/src/main/java/messagerosa/core/model/StylingTag.java index 2eefb0c..f5eb54d 100644 --- a/src/main/java/messagerosa/core/model/StylingTag.java +++ b/src/main/java/messagerosa/core/model/StylingTag.java @@ -5,7 +5,8 @@ public enum StylingTag { QUICKREPLYBTN("buttonsForListItems"), IMAGE("image"), AUDIO("audio"), - VIDEO("video"); + VIDEO("video"), + DOCUMENT("document"); private String name; From fa6f1a01d448b4646c6138c4ccefa7c23577ae39 Mon Sep 17 00:00:00 2001 From: Yashwant Date: Thu, 31 Mar 2022 18:07:34 +0530 Subject: [PATCH 20/55] fixes : QuickReplyBtn File Greater than 5MB --- .../messagerosa/core/model/MessageMedia.java | 2 ++ .../core/model/MessageMediaError.java | 23 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 src/main/java/messagerosa/core/model/MessageMediaError.java diff --git a/src/main/java/messagerosa/core/model/MessageMedia.java b/src/main/java/messagerosa/core/model/MessageMedia.java index e57e812..15c02de 100644 --- a/src/main/java/messagerosa/core/model/MessageMedia.java +++ b/src/main/java/messagerosa/core/model/MessageMedia.java @@ -13,4 +13,6 @@ public class MessageMedia { private MediaCategory category; //category list {image, audio, document, video} private String text; //caption, if applicable private String url; + private MessageMediaError messageMediaError; + private Double size; } diff --git a/src/main/java/messagerosa/core/model/MessageMediaError.java b/src/main/java/messagerosa/core/model/MessageMediaError.java new file mode 100644 index 0000000..0803329 --- /dev/null +++ b/src/main/java/messagerosa/core/model/MessageMediaError.java @@ -0,0 +1,23 @@ +package messagerosa.core.model; + +public enum MessageMediaError { + PAYLOAD_TO_LARGE("payloadTooLarge"), + EMPTY_RESPONSE("emptyResponse"); + private String name; + + MessageMediaError(String name) { + this.name = name; + } + + @Override + public String toString() {return name;} + + public static MessageMediaError getErrorByText(String text){ + for (MessageMediaError e : MessageMediaError.values()){ + if(e.name.equals(text)) + return e; + } + return null; + } +} + From e0fb1b7139de2cf8a79e082920bf0b5af6aae956 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Tue, 12 Apr 2022 11:21:54 +0530 Subject: [PATCH 21/55] github workflow --- .github/workflows/build-deploy.yml | 60 ++++++++++++++++++++++++++++++ pom.xml | 19 +++++++++- 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-deploy.yml diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml new file mode 100644 index 0000000..77fde16 --- /dev/null +++ b/.github/workflows/build-deploy.yml @@ -0,0 +1,60 @@ +name: Build +on: + push: + branches: [main, master, ghworkflow] +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + distribution: 'temurin' + - name: Cache SonarCloud packages + uses: actions/cache@v1 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache Maven packages + uses: actions/cache@v1 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build and analyze + run: mvn -B verify -DskipTests + + + deploy-github: + name: Deploy to GitHub + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: 11 + distribution: 'temurin' + server-id: github + server-username: GITHUB_USERNAME + server-password: GITHUB_TOKEN + + - name: Cache Maven packages + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2- + + - name: Deploy + run: mvn clean -DskipTests -Pgithub deploy + env: + GITHUB_USERNAME: ${{ secrets.USERNAME }} + GITHUB_TOKEN: ${{ secrets.TOKEN }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 0352068..7b2796d 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,24 @@ 11 - + + + github + + + useGitHubPackages + true + + + + + github + GitHub Packages + https://maven.pkg.github.com/samagra-comms/utils + + + + org.springframework.boot From 317a8dd7ba8ae7836649eebb6a96746071529c94 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Tue, 12 Apr 2022 11:27:08 +0530 Subject: [PATCH 22/55] version change --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7b2796d..7972328 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.uci message-rosa - 0.0.1-SNAPSHOT + 0.0.1 message-rosa message-rosa for messages From 535cb2b7ab01ba7e28629554991fb447e5077e68 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Tue, 12 Apr 2022 11:42:47 +0530 Subject: [PATCH 23/55] pom changes --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7972328..891a640 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ github GitHub Packages - https://maven.pkg.github.com/samagra-comms/utils + https://maven.pkg.github.com/samagra-comms/message-rosa From be49c71532fcd24a6a312d0c6275a50530bc92c9 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Mon, 18 Apr 2022 11:57:06 +0530 Subject: [PATCH 24/55] build & deploy workflosw --- .github/workflows/build-deploy.yml | 18 ++++++++++-------- .github/workflows/build.yml | 24 ++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 77fde16..cff86eb 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -1,7 +1,8 @@ -name: Build +name: Build & Deploy on Tag on: push: - branches: [main, master, ghworkflow] + tags: + - 'v*.*.*' jobs: build: name: Build @@ -15,12 +16,6 @@ jobs: with: java-version: 11 distribution: 'temurin' - - name: Cache SonarCloud packages - uses: actions/cache@v1 - with: - path: ~/.sonar/cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - name: Cache Maven packages uses: actions/cache@v1 with: @@ -53,6 +48,13 @@ jobs: key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2- + # - name: Delete previous build if present + # uses: actions/delete-package-versions@v3 + # with: + # min-versions-to-keep: 0 + # package-name: 'com.uci.message-rosa' + # token: ${{ secrets.TOKEN }} + - name: Deploy run: mvn clean -DskipTests -Pgithub deploy env: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d16ccd4 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,24 @@ +name: Build on Push & Pull Request +on: [push, pull_request] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + distribution: 'temurin' + - name: Cache Maven packages + uses: actions/cache@v1 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build and analyze + run: mvn -B verify -DskipTests \ No newline at end of file From 941c3b88c7e3424ca32137a7d3e3b4a25dd212f6 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Thu, 21 Apr 2022 12:47:12 +0530 Subject: [PATCH 25/55] Delete specified version on push to github packages --- .github/workflows/build-deploy.yml | 14 ++++++++------ pom.xml | 1 + 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index cff86eb..19e7efe 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -48,12 +48,14 @@ jobs: key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2- - # - name: Delete previous build if present - # uses: actions/delete-package-versions@v3 - # with: - # min-versions-to-keep: 0 - # package-name: 'com.uci.message-rosa' - # token: ${{ secrets.TOKEN }} + - name: Delete package specific version + uses: smartsquaregmbh/delete-old-packages@v0.4.0 + with: + version: 0.0.1 # This should be same as in the pom.xml file, + # to delete only the pom specified version, not the other older versions + names: | + com.uci.message-rosa + token: ${{ secrets.TOKEN }} - name: Deploy run: mvn clean -DskipTests -Pgithub deploy diff --git a/pom.xml b/pom.xml index 891a640..0f25254 100644 --- a/pom.xml +++ b/pom.xml @@ -11,6 +11,7 @@ com.uci message-rosa 0.0.1 + message-rosa message-rosa for messages From 2f9c2f1a4adf41cc63c6f6252d83181c5f780755 Mon Sep 17 00:00:00 2001 From: Yashwant Date: Mon, 25 Apr 2022 13:41:59 +0530 Subject: [PATCH 26/55] New test case added for unit testing. --- pom.xml | 1 - .../messagerosa/xml/XMessageParserTest.java | 22 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 src/test/java/messagerosa/xml/XMessageParserTest.java diff --git a/pom.xml b/pom.xml index 0352068..111cef4 100644 --- a/pom.xml +++ b/pom.xml @@ -55,7 +55,6 @@ org.junit.jupiter junit-jupiter-api - 5.6.2 test diff --git a/src/test/java/messagerosa/xml/XMessageParserTest.java b/src/test/java/messagerosa/xml/XMessageParserTest.java new file mode 100644 index 0000000..7133273 --- /dev/null +++ b/src/test/java/messagerosa/xml/XMessageParserTest.java @@ -0,0 +1,22 @@ +package messagerosa.xml; + +import messagerosa.core.model.XMessage; +import org.junit.jupiter.api.Test; + +import javax.xml.bind.JAXBException; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.InputStream; + +import static org.junit.jupiter.api.Assertions.*; + +class XMessageParserTest { + + @Test + void parse() throws FileNotFoundException, JAXBException { + InputStream inputStream = new FileInputStream("~/message-rosa/src/test/java/messagerosa/xml/" + "testMessage.xml"); + XMessage message = XMessageParser.parse(inputStream); + System.out.println(message.toXML()); + assertEquals(1, 1); + } +} \ No newline at end of file From d95e13ef1e75a1e41fbd8355999ea3fb668ee4d0 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Tue, 26 Apr 2022 11:27:54 +0530 Subject: [PATCH 27/55] DeviceType for PWA --- src/main/java/messagerosa/core/model/DeviceType.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/messagerosa/core/model/DeviceType.java b/src/main/java/messagerosa/core/model/DeviceType.java index 0832a69..2c8e46f 100644 --- a/src/main/java/messagerosa/core/model/DeviceType.java +++ b/src/main/java/messagerosa/core/model/DeviceType.java @@ -1,7 +1,8 @@ package messagerosa.core.model; public enum DeviceType { - PHONE("phone"); + PHONE("phone"), + PHONE_PWA("ucipwa"); private String name; From 8b1fce439694b9a4343c1acc0a53422e060f931f Mon Sep 17 00:00:00 2001 From: Surabhi Date: Tue, 26 Apr 2022 11:34:48 +0530 Subject: [PATCH 28/55] Build & Deploy on Push & tag --- .github/workflows/build-deploy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 19e7efe..610db7a 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -1,8 +1,11 @@ -name: Build & Deploy on Tag +name: Build & Deploy on Tag & Push on: push: tags: - 'v*.*.*' + branches: + - '*' + jobs: build: name: Build From 68580aec7d7e1c89eaa0cd4c99fcbba973240bdb Mon Sep 17 00:00:00 2001 From: Surabhi Date: Tue, 26 Apr 2022 11:46:11 +0530 Subject: [PATCH 29/55] changes --- src/main/java/messagerosa/core/model/DeviceType.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/messagerosa/core/model/DeviceType.java b/src/main/java/messagerosa/core/model/DeviceType.java index 2c8e46f..6fee28e 100644 --- a/src/main/java/messagerosa/core/model/DeviceType.java +++ b/src/main/java/messagerosa/core/model/DeviceType.java @@ -3,6 +3,7 @@ public enum DeviceType { PHONE("phone"), PHONE_PWA("ucipwa"); + private String name; From 59c36b5e0823e200967a7acb01b3a5f54c8ee071 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Tue, 26 Apr 2022 11:57:59 +0530 Subject: [PATCH 30/55] changes --- .github/workflows/build-deploy.yml | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 610db7a..075c243 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -7,32 +7,9 @@ on: - '*' jobs: - build: - name: Build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - distribution: 'temurin' - - name: Cache Maven packages - uses: actions/cache@v1 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Build and analyze - run: mvn -B verify -DskipTests - - - deploy-github: + build-deploy-github: name: Deploy to GitHub runs-on: ubuntu-latest - needs: build steps: - uses: actions/checkout@v2 - name: Set up JDK 11 @@ -61,7 +38,7 @@ jobs: token: ${{ secrets.TOKEN }} - name: Deploy - run: mvn clean -DskipTests -Pgithub deploy + run: mvn clean install -DskipTests -Pgithub deploy env: GITHUB_USERNAME: ${{ secrets.USERNAME }} GITHUB_TOKEN: ${{ secrets.TOKEN }} \ No newline at end of file From 1d47d32812131e917e3c6bce9a6a4987b6278b06 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Tue, 26 Apr 2022 12:07:57 +0530 Subject: [PATCH 31/55] final changes for build & deploy actions --- .github/workflows/build-deploy.yml | 4 ++-- .github/workflows/build.yml | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 075c243..258ef35 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -8,7 +8,7 @@ on: jobs: build-deploy-github: - name: Deploy to GitHub + name: Build & Deploy to GitHub runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -38,7 +38,7 @@ jobs: token: ${{ secrets.TOKEN }} - name: Deploy - run: mvn clean install -DskipTests -Pgithub deploy + run: mvn clean install -Pgithub deploy -DskipTests env: GITHUB_USERNAME: ${{ secrets.USERNAME }} GITHUB_TOKEN: ${{ secrets.TOKEN }} \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d16ccd4..1d2d222 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,19 +6,19 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - uses: actions/checkout@v2 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: java-version: 11 distribution: 'temurin' + - name: Cache Maven packages uses: actions/cache@v1 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 + - name: Build and analyze - run: mvn -B verify -DskipTests \ No newline at end of file + run: mvn clean install -DskipTests \ No newline at end of file From 25d1d7ee1349c22251a2d85d16bbacfd308071c9 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Thu, 28 Apr 2022 14:45:23 +0530 Subject: [PATCH 32/55] Build & Deploy on release-4.9.0 --- .github/workflows/build-deploy.yml | 7 +++++-- .github/workflows/build.yml | 8 +++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 258ef35..5ba5e3b 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -3,8 +3,11 @@ on: push: tags: - 'v*.*.*' - branches: - - '*' + branches: + ["release-4.9.0"] + pull_request: + branches: + ["release-4.9.0"] jobs: build-deploy-github: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d2d222..e6ede94 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,11 @@ name: Build on Push & Pull Request -on: [push, pull_request] +on: + push: + branches: + ["release-4.9.0"] + pull_request: + branches: + ["release-4.9.0"] jobs: build: From 79079ecc1f1f207e90f81ea851bfde82aae43580 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Fri, 13 May 2022 14:47:26 +0530 Subject: [PATCH 33/55] version updated to 0.0.4 --- .github/workflows/build-deploy.yml | 6 +++--- dependency-reduced-pom.xml | 21 ++++++++++++++++----- pom.xml | 2 +- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 5ba5e3b..f6ca53b 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -4,10 +4,10 @@ on: tags: - 'v*.*.*' branches: - ["release-4.9.0"] + ["release-4.9.0", "merged"] pull_request: branches: - ["release-4.9.0"] + ["release-4.9.0", "merged"] jobs: build-deploy-github: @@ -34,7 +34,7 @@ jobs: - name: Delete package specific version uses: smartsquaregmbh/delete-old-packages@v0.4.0 with: - version: 0.0.1 # This should be same as in the pom.xml file, + version: 0.0.4 # This should be same as in the pom.xml file, # to delete only the pom specified version, not the other older versions names: | com.uci.message-rosa diff --git a/dependency-reduced-pom.xml b/dependency-reduced-pom.xml index b3c9829..577b428 100644 --- a/dependency-reduced-pom.xml +++ b/dependency-reduced-pom.xml @@ -3,7 +3,7 @@ spring-boot-starter-parent org.springframework.boot - 2.3.0.RELEASE + 2.5.7 pom.xml 4.0.0 @@ -16,7 +16,7 @@ maven-shade-plugin - 2.3 + 3.2.4 package @@ -29,6 +29,12 @@ + + org.springframework.boot + spring-boot-starter-validation + 2.5.7 + provided + org.projectlombok lombok @@ -62,7 +68,7 @@ junit junit - 4.13 + 4.13.2 test @@ -100,7 +106,7 @@ org.apache.httpcomponents httpclient - 4.5.12 + 4.5.13 provided @@ -109,9 +115,14 @@ + + org.jetbrains + annotations + RELEASE + provided + 11 - diff --git a/pom.xml b/pom.xml index 411d0bb..5657205 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.uci message-rosa - 0.0.1 + 0.0.4 message-rosa message-rosa for messages From c9ff19dad1e4ac0c399db0d31560bca9ed9196b9 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Fri, 13 May 2022 15:05:38 +0530 Subject: [PATCH 34/55] minor change --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e6ede94..94d476f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,10 +2,10 @@ name: Build on Push & Pull Request on: push: branches: - ["release-4.9.0"] + ["release-4.9.0", "merged"] pull_request: branches: - ["release-4.9.0"] + ["release-4.9.0", "merged"] jobs: build: From e0d6966469d8708628ff59035de8b9e9c0ab9093 Mon Sep 17 00:00:00 2001 From: pankaj Date: Tue, 24 May 2022 16:01:38 +0530 Subject: [PATCH 35/55] Add new styling tags --- src/main/java/messagerosa/core/model/StylingTag.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/messagerosa/core/model/StylingTag.java b/src/main/java/messagerosa/core/model/StylingTag.java index f5eb54d..40b06a0 100644 --- a/src/main/java/messagerosa/core/model/StylingTag.java +++ b/src/main/java/messagerosa/core/model/StylingTag.java @@ -6,7 +6,12 @@ public enum StylingTag { IMAGE("image"), AUDIO("audio"), VIDEO("video"), - DOCUMENT("document"); + DOCUMENT("document"), + IMAGE_URL("image_url"), + AUDIO_URL("audio_url"), + DOCUMENT_URL("document_url"), + VIDEO_URL("video_url"), + TEXT("text"); private String name; From 0cc82c9ce3057ac76c6ca05777c8455cbe9faef5 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Wed, 1 Jun 2022 12:23:16 +0530 Subject: [PATCH 36/55] include tests in build --- .github/workflows/build-deploy.yml | 2 +- .github/workflows/build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index f6ca53b..b1fc289 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -41,7 +41,7 @@ jobs: token: ${{ secrets.TOKEN }} - name: Deploy - run: mvn clean install -Pgithub deploy -DskipTests + run: mvn clean install -Pgithub deploy env: GITHUB_USERNAME: ${{ secrets.USERNAME }} GITHUB_TOKEN: ${{ secrets.TOKEN }} \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 94d476f..b8499a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,4 +27,4 @@ jobs: restore-keys: ${{ runner.os }}-m2 - name: Build and analyze - run: mvn clean install -DskipTests \ No newline at end of file + run: mvn clean install \ No newline at end of file From 9d577381fa6c6e1c405606358a12dddf757a1f1b Mon Sep 17 00:00:00 2001 From: Surabhi Date: Thu, 2 Jun 2022 18:26:25 +0530 Subject: [PATCH 37/55] device type - fcm --- src/main/java/messagerosa/core/model/DeviceType.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/messagerosa/core/model/DeviceType.java b/src/main/java/messagerosa/core/model/DeviceType.java index 6fee28e..3a13c0c 100644 --- a/src/main/java/messagerosa/core/model/DeviceType.java +++ b/src/main/java/messagerosa/core/model/DeviceType.java @@ -2,6 +2,7 @@ public enum DeviceType { PHONE("phone"), + FCM("fcm"), PHONE_PWA("ucipwa"); From 7878ea98baf0b68e08f115c3756defc1bf1c6aac Mon Sep 17 00:00:00 2001 From: Surabhi Date: Wed, 8 Jun 2022 10:20:16 +0530 Subject: [PATCH 38/55] workflow chane --- .github/workflows/build-deploy.yml | 4 ++-- .github/workflows/build.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index b1fc289..c18d800 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -4,10 +4,10 @@ on: tags: - 'v*.*.*' branches: - ["release-4.9.0", "merged"] + ["release-4.9.0", "release-4.10.0", "merged"] pull_request: branches: - ["release-4.9.0", "merged"] + ["release-4.9.0", "release-4.10.0", "merged"] jobs: build-deploy-github: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8499a3..5ecf85e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,10 +2,10 @@ name: Build on Push & Pull Request on: push: branches: - ["release-4.9.0", "merged"] + ["release-4.9.0", "release-4.10.0", "merged"] pull_request: branches: - ["release-4.9.0", "merged"] + ["release-4.9.0", "release-4.10.0", "merged"] jobs: build: From 6c6c755aa624e28237a55d65a69962146a51e2dc Mon Sep 17 00:00:00 2001 From: Surabhi Date: Wed, 15 Jun 2022 12:39:00 +0530 Subject: [PATCH 39/55] package version - 4.9.0 --- .github/workflows/build-deploy.yml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index c18d800..d4091e9 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -34,7 +34,7 @@ jobs: - name: Delete package specific version uses: smartsquaregmbh/delete-old-packages@v0.4.0 with: - version: 0.0.4 # This should be same as in the pom.xml file, + version: 4.9.0 # This should be same as in the pom.xml file, # to delete only the pom specified version, not the other older versions names: | com.uci.message-rosa diff --git a/pom.xml b/pom.xml index ca2cc5a..d1a210b 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.uci message-rosa - 0.0.4 + 4.9.0 message-rosa message-rosa for messages From 6a4058c0a171a56fa49032323b59b944f4dfbbb0 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Wed, 15 Jun 2022 14:19:38 +0530 Subject: [PATCH 40/55] package version - 4.10.0 --- .github/workflows/build-deploy.yml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index d4091e9..8960900 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -34,7 +34,7 @@ jobs: - name: Delete package specific version uses: smartsquaregmbh/delete-old-packages@v0.4.0 with: - version: 4.9.0 # This should be same as in the pom.xml file, + version: 4.10.0 # This should be same as in the pom.xml file, # to delete only the pom specified version, not the other older versions names: | com.uci.message-rosa diff --git a/pom.xml b/pom.xml index d1a210b..060d440 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.uci message-rosa - 4.9.0 + 4.10.0 message-rosa message-rosa for messages From 04c0290d3efe4e98582cff75ec232fbe83180c75 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Wed, 29 Jun 2022 17:56:21 +0530 Subject: [PATCH 41/55] Device type --- src/main/java/messagerosa/core/model/DeviceType.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/messagerosa/core/model/DeviceType.java b/src/main/java/messagerosa/core/model/DeviceType.java index 3a13c0c..630c7e2 100644 --- a/src/main/java/messagerosa/core/model/DeviceType.java +++ b/src/main/java/messagerosa/core/model/DeviceType.java @@ -3,7 +3,8 @@ public enum DeviceType { PHONE("phone"), FCM("fcm"), - PHONE_PWA("ucipwa"); + PHONE_PWA("ucipwa"), + PHONE_FCM("phonefcm"); private String name; From 22726603667f7bbee8eed43b72a95632c1b90586 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Fri, 1 Jul 2022 18:14:47 +0530 Subject: [PATCH 42/55] Session id, owner id, owner org id in xMessage --- src/main/java/messagerosa/core/model/XMessage.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/messagerosa/core/model/XMessage.java b/src/main/java/messagerosa/core/model/XMessage.java index 91509f7..68d7e7a 100644 --- a/src/main/java/messagerosa/core/model/XMessage.java +++ b/src/main/java/messagerosa/core/model/XMessage.java @@ -5,6 +5,7 @@ import java.time.Instant; import java.util.ArrayList; import java.util.Map; +import java.util.UUID; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; @@ -45,6 +46,12 @@ public enum MessageType { BROADCAST_TEXT } + private UUID sessionId; + + private String ownerOrgId; + + private UUID ownerId; + //Persist private String app; From 8da5f90a3061d6692b1dedbfb6da2f80ef7e44fb Mon Sep 17 00:00:00 2001 From: Surabhi Date: Mon, 4 Jul 2022 15:47:30 +0530 Subject: [PATCH 43/55] minor chane --- src/main/java/messagerosa/core/model/XMessage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/messagerosa/core/model/XMessage.java b/src/main/java/messagerosa/core/model/XMessage.java index 68d7e7a..3f36388 100644 --- a/src/main/java/messagerosa/core/model/XMessage.java +++ b/src/main/java/messagerosa/core/model/XMessage.java @@ -50,7 +50,7 @@ public enum MessageType { private String ownerOrgId; - private UUID ownerId; + private String ownerId; //Persist private String app; From f9470ee28ba634eff3676b6d719049cfa324a51a Mon Sep 17 00:00:00 2001 From: Surabhi Date: Fri, 8 Jul 2022 16:59:54 +0530 Subject: [PATCH 44/55] version change - 2.0.0 --- .github/workflows/build-deploy.yml | 6 +++--- .github/workflows/build.yml | 4 ++-- pom.xml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index d4091e9..ac1571c 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -4,10 +4,10 @@ on: tags: - 'v*.*.*' branches: - ["release-4.9.0", "release-4.10.0", "merged"] + ["release-4.9.0", "release-4.10.0", "v2-integration"] pull_request: branches: - ["release-4.9.0", "release-4.10.0", "merged"] + ["release-4.9.0", "release-4.10.0", "v2-integration"] jobs: build-deploy-github: @@ -34,7 +34,7 @@ jobs: - name: Delete package specific version uses: smartsquaregmbh/delete-old-packages@v0.4.0 with: - version: 4.9.0 # This should be same as in the pom.xml file, + version: 2.0.0 # This should be same as in the pom.xml file, # to delete only the pom specified version, not the other older versions names: | com.uci.message-rosa diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5ecf85e..74d9ca0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,10 +2,10 @@ name: Build on Push & Pull Request on: push: branches: - ["release-4.9.0", "release-4.10.0", "merged"] + ["release-4.9.0", "release-4.10.0", "v2-integration"] pull_request: branches: - ["release-4.9.0", "release-4.10.0", "merged"] + ["release-4.9.0", "release-4.10.0", "v2-integration"] jobs: build: diff --git a/pom.xml b/pom.xml index d1a210b..25df41b 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.uci message-rosa - 4.9.0 + 2.0.0 message-rosa message-rosa for messages From 2ea323ca094511d7b68e7cde0a4d7cd5b104bb46 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Tue, 12 Jul 2022 15:02:53 +0530 Subject: [PATCH 45/55] readme --- .github/workflows/build-deploy.yml | 2 +- .github/workflows/build.yml | 2 +- README.md | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 README.md diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index d4091e9..e87b698 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -1,4 +1,4 @@ -name: Build & Deploy on Tag & Push +name: Github Package on: push: tags: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5ecf85e..778c501 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build on Push & Pull Request +name: Maven Build on: push: branches: diff --git a/README.md b/README.md new file mode 100644 index 0000000..b022330 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +![Maven Build](https://github.com/samagra-comms/message-rosa/actions/workflows/build.yml/badge.svg) +![Github Package](https://github.com/samagra-comms/message-rosa/actions/workflows/build-deploy.yml/badge.svg) + +# Overview +Message Rosa holds all the core models for XMessage & its property fields. \ No newline at end of file From 67f7a0003039da3e8ec34f6300f8aae2de1ba13f Mon Sep 17 00:00:00 2001 From: Surabhi Date: Tue, 12 Jul 2022 15:10:38 +0530 Subject: [PATCH 46/55] comments --- .github/workflows/build-deploy.yml | 1 + .github/workflows/build.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index e87b698..1bb19b4 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -1,3 +1,4 @@ +# Build & Deploy on Tag & Push name: Github Package on: push: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 778c501..8c937f7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,3 +1,4 @@ +# Build on Push & Pull Request name: Maven Build on: push: From 87a7cf8235b639108e2a5d6dbc503074c6c72799 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Fri, 15 Jul 2022 15:40:28 +0530 Subject: [PATCH 47/55] media category addition --- src/main/java/messagerosa/core/model/MediaCategory.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/messagerosa/core/model/MediaCategory.java b/src/main/java/messagerosa/core/model/MediaCategory.java index 22726ca..c96ecb5 100644 --- a/src/main/java/messagerosa/core/model/MediaCategory.java +++ b/src/main/java/messagerosa/core/model/MediaCategory.java @@ -5,7 +5,12 @@ public enum MediaCategory { AUDIO("audio"), VIDEO("video"), VOICE("voice"), - FILE("file"); + IMAGE_URL("image_url"), + AUDIO_URL("audio_url"), + VIDEO_URL("video_url"), + VOICE_URL("voice_url"), + FILE("file"), + FILE_URL("file_url"); private String name; From ce67ef0094985001506b87537de6c75904d13c97 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Tue, 19 Jul 2022 12:23:49 +0530 Subject: [PATCH 48/55] bot id --- src/main/java/messagerosa/core/model/XMessage.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/messagerosa/core/model/XMessage.java b/src/main/java/messagerosa/core/model/XMessage.java index 3f36388..af83d9a 100644 --- a/src/main/java/messagerosa/core/model/XMessage.java +++ b/src/main/java/messagerosa/core/model/XMessage.java @@ -52,6 +52,8 @@ public enum MessageType { private String ownerId; + private UUID botId; + //Persist private String app; From 685a74100638a3d38fd74ebac062ac90b6353d42 Mon Sep 17 00:00:00 2001 From: Surabhi Date: Thu, 21 Jul 2022 17:26:38 +0530 Subject: [PATCH 49/55] remove un-necessary categories --- src/main/java/messagerosa/core/model/MediaCategory.java | 7 +------ src/main/java/messagerosa/core/model/StylingTag.java | 6 +----- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/main/java/messagerosa/core/model/MediaCategory.java b/src/main/java/messagerosa/core/model/MediaCategory.java index c96ecb5..22726ca 100644 --- a/src/main/java/messagerosa/core/model/MediaCategory.java +++ b/src/main/java/messagerosa/core/model/MediaCategory.java @@ -5,12 +5,7 @@ public enum MediaCategory { AUDIO("audio"), VIDEO("video"), VOICE("voice"), - IMAGE_URL("image_url"), - AUDIO_URL("audio_url"), - VIDEO_URL("video_url"), - VOICE_URL("voice_url"), - FILE("file"), - FILE_URL("file_url"); + FILE("file"); private String name; diff --git a/src/main/java/messagerosa/core/model/StylingTag.java b/src/main/java/messagerosa/core/model/StylingTag.java index 40b06a0..0633348 100644 --- a/src/main/java/messagerosa/core/model/StylingTag.java +++ b/src/main/java/messagerosa/core/model/StylingTag.java @@ -6,11 +6,7 @@ public enum StylingTag { IMAGE("image"), AUDIO("audio"), VIDEO("video"), - DOCUMENT("document"), - IMAGE_URL("image_url"), - AUDIO_URL("audio_url"), - DOCUMENT_URL("document_url"), - VIDEO_URL("video_url"), + FILE("file"), TEXT("text"); private String name; From 7f3497a45c48e8d972705720e1e03b1f3fbeae5f Mon Sep 17 00:00:00 2001 From: Surabhi Date: Tue, 2 Aug 2022 12:27:17 +0530 Subject: [PATCH 50/55] Read me update --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b022330..4438692 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,21 @@ ![Github Package](https://github.com/samagra-comms/message-rosa/actions/workflows/build-deploy.yml/badge.svg) # Overview -Message Rosa holds all the core models for XMessage & its property fields. \ No newline at end of file +Message Rosa holds all the core models for XMessage & its property fields. + +# Getting Started + +## Prerequisites + +* java 11 or above +* docker +* kafka +* lombok plugin for IDE +* maven + +## Build +* build with tests run using command **mvn clean install -U** +* or build without tests run using command **mvn clean install -DskipTests** + +# Detailed Documentation +[Click here](https://uci.sunbird.org/use/developer/uci-basics) \ No newline at end of file From 9b7847c82980661462ca48d0c0aa93b421cdea3e Mon Sep 17 00:00:00 2001 From: Surabhi Date: Wed, 17 Aug 2022 14:48:22 +0530 Subject: [PATCH 51/55] v - 5.0.0 --- .github/workflows/build-deploy.yml | 6 +++--- .github/workflows/build.yml | 4 ++-- pom.xml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 98816c9..1cf44a3 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -5,10 +5,10 @@ on: tags: - 'v*.*.*' branches: - ["release-4.9.0", "release-4.10.0", "merged"] + ["release-4.9.0", "release-4.10.0", "release-5.0.0"] pull_request: branches: - ["release-4.9.0", "release-4.10.0", "merged"] + ["release-4.9.0", "release-4.10.0", "release-5.0.0"] jobs: build-deploy-github: @@ -35,7 +35,7 @@ jobs: - name: Delete package specific version uses: smartsquaregmbh/delete-old-packages@v0.4.0 with: - version: 4.10.0 # This should be same as in the pom.xml file, + version: 5.0.0 # This should be same as in the pom.xml file, # to delete only the pom specified version, not the other older versions names: | com.uci.message-rosa diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c937f7..7024698 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,10 +3,10 @@ name: Maven Build on: push: branches: - ["release-4.9.0", "release-4.10.0", "merged"] + ["release-4.9.0", "release-4.10.0", "release-5.0.0"] pull_request: branches: - ["release-4.9.0", "release-4.10.0", "merged"] + ["release-4.9.0", "release-4.10.0", "release-5.0.0"] jobs: build: diff --git a/pom.xml b/pom.xml index 060d440..b83a99b 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.uci message-rosa - 4.10.0 + 5.0.0 message-rosa message-rosa for messages From dfb3dea6ff2ae13c45eff32278fc9972e4ff408a Mon Sep 17 00:00:00 2001 From: Surabhi Date: Tue, 30 Aug 2022 11:04:30 +0530 Subject: [PATCH 52/55] tags in xMessage --- src/main/java/messagerosa/core/model/XMessage.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/messagerosa/core/model/XMessage.java b/src/main/java/messagerosa/core/model/XMessage.java index af83d9a..e3a187d 100644 --- a/src/main/java/messagerosa/core/model/XMessage.java +++ b/src/main/java/messagerosa/core/model/XMessage.java @@ -4,6 +4,7 @@ import java.io.StringWriter; import java.time.Instant; import java.util.ArrayList; +import java.util.List; import java.util.Map; import java.util.UUID; @@ -81,6 +82,8 @@ public enum MessageType { @NotNull private Long timestamp; + private List tags; + private String userState; private String encryptionProtocol; From 27493a50b008750013877ab8b5f5e2f5f763cc9b Mon Sep 17 00:00:00 2001 From: Surabhi Mahawar Date: Fri, 24 Feb 2023 15:31:05 +0530 Subject: [PATCH 53/55] new branch version added in github flow --- .github/workflows/build-deploy.yml | 6 +++--- .github/workflows/build.yml | 4 ++-- pom.xml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 1cf44a3..fa848c6 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -5,10 +5,10 @@ on: tags: - 'v*.*.*' branches: - ["release-4.9.0", "release-4.10.0", "release-5.0.0"] + ["release-4.*.*", "release-5.*.*"] pull_request: branches: - ["release-4.9.0", "release-4.10.0", "release-5.0.0"] + ["release-4.*.*", "release-5.*.*"] jobs: build-deploy-github: @@ -35,7 +35,7 @@ jobs: - name: Delete package specific version uses: smartsquaregmbh/delete-old-packages@v0.4.0 with: - version: 5.0.0 # This should be same as in the pom.xml file, + version: 5.1.0 # This should be same as in the pom.xml file, # to delete only the pom specified version, not the other older versions names: | com.uci.message-rosa diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7024698..fa1f410 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,10 +3,10 @@ name: Maven Build on: push: branches: - ["release-4.9.0", "release-4.10.0", "release-5.0.0"] + ["release-4.*.*", "release-5.*.*"] pull_request: branches: - ["release-4.9.0", "release-4.10.0", "release-5.0.0"] + ["release-4.*.*", "release-5.*.*"] jobs: build: diff --git a/pom.xml b/pom.xml index b83a99b..3584e76 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.uci message-rosa - 5.0.0 + 5.1.0 message-rosa message-rosa for messages From c2bd4df2cd575c814207f222961e6302293d09e2 Mon Sep 17 00:00:00 2001 From: pankajjangid05 Date: Tue, 14 Mar 2023 14:59:19 +0530 Subject: [PATCH 54/55] NL App - Added title and data for FCM Notification --- src/main/java/messagerosa/core/model/Data.java | 14 ++++++++++++++ .../messagerosa/core/model/XMessagePayload.java | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 src/main/java/messagerosa/core/model/Data.java diff --git a/src/main/java/messagerosa/core/model/Data.java b/src/main/java/messagerosa/core/model/Data.java new file mode 100644 index 0000000..3e9ab88 --- /dev/null +++ b/src/main/java/messagerosa/core/model/Data.java @@ -0,0 +1,14 @@ +package messagerosa.core.model; + + +import lombok.*; + +@Getter +@Setter +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class Data { + private String key; + private String value; +} diff --git a/src/main/java/messagerosa/core/model/XMessagePayload.java b/src/main/java/messagerosa/core/model/XMessagePayload.java index 0798712..b674fc5 100644 --- a/src/main/java/messagerosa/core/model/XMessagePayload.java +++ b/src/main/java/messagerosa/core/model/XMessagePayload.java @@ -23,4 +23,6 @@ public class XMessagePayload { private String flow; private Integer questionIndex; private String mediaCaption; + private String title; + private ArrayList data; } From 4b59411bdedac41274d4955cba5bc724486e318e Mon Sep 17 00:00:00 2001 From: Surabhi Mahawar Date: Fri, 17 Mar 2023 22:47:13 +0530 Subject: [PATCH 55/55] changes - release-v2.0.0 --- .github/workflows/build-deploy.yml | 6 +++--- .github/workflows/build.yml | 4 ++-- pom.xml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 8185669..5372706 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -5,10 +5,10 @@ on: tags: - 'v*.*.*' branches: - ["release-4.*.*", "release-5.*.*", "v2-integration"] + ["release-4.*.*", "release-5.*.*", "release-v2.*.*"] pull_request: branches: - ["release-4.*.*", "release-5.*.*", "v2-integration"] + ["release-4.*.*", "release-5.*.*", "release-v2.*.*"] jobs: build-deploy-github: @@ -35,7 +35,7 @@ jobs: - name: Delete package specific version uses: smartsquaregmbh/delete-old-packages@v0.4.0 with: - version: 2.0.1 # This should be same as in the pom.xml file, + version: 2.1.0 # This should be same as in the pom.xml file, # to delete only the pom specified version, not the other older versions names: | com.uci.message-rosa diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e998bb..34fe9d6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,10 +3,10 @@ name: Maven Build on: push: branches: - ["release-4.*.*", "release-5.*.*", "v2-integration"] + ["release-4.*.*", "release-5.*.*", "release-v2.*.*"] pull_request: branches: - ["release-4.*.*", "release-5.*.*", "v2-integration"] + ["release-4.*.*", "release-5.*.*", "release-v2.*.*"] jobs: build: diff --git a/pom.xml b/pom.xml index f489f6a..71bf827 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.uci message-rosa - 2.0.1 + 2.1.0 message-rosa message-rosa for messages