From c95181d190a09885cf7e06305726cc50da5f2b93 Mon Sep 17 00:00:00 2001 From: Ayesh Almeida Date: Wed, 9 Apr 2025 15:41:05 +0530 Subject: [PATCH 1/5] [Automated] Update the toml files --- ballerina/Ballerina.toml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index bcf565e..1353d3f 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,8 +1,8 @@ [package] -distribution = "2201.8.6" +distribution = "2201.12.2" org = "ballerinax" name = "guidewire.insnow" -version = "0.1.0" +version = "0.2.0" license = ["Apache-2.0"] authors = ["Ballerina"] keywords = ["Insurance", "Guidewire", "Cloud API"] @@ -11,6 +11,3 @@ repository = "https://github.com/ballerina-platform/module-ballerinax-guidewire. [build-options] observabilityIncluded = false - -[platform.java17] -graalvmCompatible = true From d5a52ac39d3b65a2f7d10f9134b19c3879b2e5d8 Mon Sep 17 00:00:00 2001 From: Ayesh Almeida Date: Wed, 9 Apr 2025 15:43:18 +0530 Subject: [PATCH 2/5] [Automated] Update the toml files --- ballerina/Dependencies.toml | 55 ++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 22c51d7..bbfc2e7 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,12 +5,12 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.8.6" +distribution-version = "2201.12.2" [[package]] org = "ballerina" name = "auth" -version = "2.10.0" +version = "2.14.0" dependencies = [ {org = "ballerina", name = "crypto"}, {org = "ballerina", name = "jballerina.java"}, @@ -22,7 +22,7 @@ dependencies = [ [[package]] org = "ballerina" name = "cache" -version = "3.7.1" +version = "3.10.0" dependencies = [ {org = "ballerina", name = "constraint"}, {org = "ballerina", name = "jballerina.java"}, @@ -33,7 +33,7 @@ dependencies = [ [[package]] org = "ballerina" name = "constraint" -version = "1.5.0" +version = "1.7.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -41,16 +41,28 @@ dependencies = [ [[package]] org = "ballerina" name = "crypto" -version = "2.6.2" +version = "2.9.0" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "time"} ] +[[package]] +org = "ballerina" +name = "data.jsondata" +version = "1.1.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.object"} +] +modules = [ + {org = "ballerina", packageName = "data.jsondata", moduleName = "data.jsondata"} +] + [[package]] org = "ballerina" name = "file" -version = "1.9.0" +version = "1.12.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, @@ -61,12 +73,13 @@ dependencies = [ [[package]] org = "ballerina" name = "http" -version = "2.10.12" +version = "2.14.0" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, {org = "ballerina", name = "constraint"}, {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "data.jsondata"}, {org = "ballerina", name = "file"}, {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, @@ -93,7 +106,7 @@ modules = [ [[package]] org = "ballerina" name = "io" -version = "1.6.0" +version = "1.8.0" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "lang.value"} @@ -107,10 +120,11 @@ version = "0.0.0" [[package]] org = "ballerina" name = "jwt" -version = "2.10.0" +version = "2.15.0" dependencies = [ {org = "ballerina", name = "cache"}, {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "lang.int"}, {org = "ballerina", name = "lang.string"}, @@ -204,7 +218,7 @@ dependencies = [ [[package]] org = "ballerina" name = "log" -version = "2.9.0" +version = "2.12.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, @@ -218,17 +232,18 @@ modules = [ [[package]] org = "ballerina" name = "mime" -version = "2.9.0" +version = "2.12.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "lang.int"} + {org = "ballerina", name = "lang.int"}, + {org = "ballerina", name = "log"} ] [[package]] org = "ballerina" name = "oauth2" -version = "2.10.0" +version = "2.14.0" dependencies = [ {org = "ballerina", name = "cache"}, {org = "ballerina", name = "crypto"}, @@ -241,7 +256,7 @@ dependencies = [ [[package]] org = "ballerina" name = "observe" -version = "1.2.2" +version = "1.5.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -249,7 +264,7 @@ dependencies = [ [[package]] org = "ballerina" name = "os" -version = "1.8.0" +version = "1.10.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"} @@ -261,7 +276,7 @@ modules = [ [[package]] org = "ballerina" name = "task" -version = "2.5.0" +version = "2.7.0" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "time"} @@ -274,6 +289,7 @@ version = "0.0.0" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.array"}, {org = "ballerina", name = "lang.error"} ] modules = [ @@ -283,7 +299,7 @@ modules = [ [[package]] org = "ballerina" name = "time" -version = "2.4.0" +version = "2.7.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -291,7 +307,7 @@ dependencies = [ [[package]] org = "ballerina" name = "url" -version = "2.4.0" +version = "2.6.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -302,8 +318,9 @@ modules = [ [[package]] org = "ballerinax" name = "guidewire.insnow" -version = "0.1.0" +version = "0.2.0" dependencies = [ + {org = "ballerina", name = "data.jsondata"}, {org = "ballerina", name = "http"}, {org = "ballerina", name = "log"}, {org = "ballerina", name = "os"}, From 7f1c7f679a939d9fed5bcc2f6fa8f84a80d5cded Mon Sep 17 00:00:00 2001 From: Ayesh Almeida Date: Wed, 9 Apr 2025 15:43:31 +0530 Subject: [PATCH 3/5] Fix build failures --- ballerina/tests/guidewire_insnow_mock_backend.bal | 10 +++++----- ballerina/tests/test.bal | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ballerina/tests/guidewire_insnow_mock_backend.bal b/ballerina/tests/guidewire_insnow_mock_backend.bal index d4c8866..851ebba 100644 --- a/ballerina/tests/guidewire_insnow_mock_backend.bal +++ b/ballerina/tests/guidewire_insnow_mock_backend.bal @@ -146,7 +146,7 @@ service / on ep0 { return http:OK; } - resource function get applications(string? applicationOrQuoteNumber, string? continuationId, string? createdSinceDate, string? customerId, boolean? includeClosed, boolean? includeDeleted, string? 'limit, string? optionalFields, string? policyId, string? providerId, boolean? recentlyViewed, string? status, string? transactionCd, string? transactionCdGroup, string? 'type) returns ListApplication { + resource function get applications(string? applicationOrQuoteNumber, string? continuationId, string? createdSinceDate, string? customerId, boolean? includeClosed, boolean? includeDeleted, string? 'limit, string? optionalFields, string? policyId, string? providerId, boolean? recentlyViewed, string? status, string? transactionCd, string? transactionCdGroup, string? 'type) returns json { return { applicationListItems: [ { @@ -300,7 +300,7 @@ service / on ep0 { return http:CREATED; } - resource function get applications/[string systemId]/documents() returns ListDocument { + resource function get applications/[string systemId]/documents() returns json { return { documentListItems: [ { @@ -357,7 +357,7 @@ service / on ep0 { return payload; } - resource function get claims/[string systemId]/documents() returns ListDocument { + resource function get claims/[string systemId]/documents() returns json { return { documentListItems: [ { @@ -418,7 +418,7 @@ service / on ep0 { return http:CREATED; } - resource function get policies(string? continuationId, string? createdSinceDate, string? customerId, string? expiredDateAfter, boolean? includePriorTerms, string? 'limit, string? optionalFields, string? policyNumber, string? providerRef, boolean? recentlyViewed, string? status) returns ListPolicy { + resource function get policies(string? continuationId, string? createdSinceDate, string? customerId, string? expiredDateAfter, boolean? includePriorTerms, string? 'limit, string? optionalFields, string? policyNumber, string? providerRef, boolean? recentlyViewed, string? status) returns json { return { continuationId: "cont123456789", policyListItems: [ @@ -547,7 +547,7 @@ service / on ep0 { }; } - resource function get policies/[string systemId](string? asOfDate) returns PolicyDetails { + resource function get policies/[string systemId](string? asOfDate) returns json { return { _links: [ { diff --git a/ballerina/tests/test.bal b/ballerina/tests/test.bal index 1d79461..32aab20 100644 --- a/ballerina/tests/test.bal +++ b/ballerina/tests/test.bal @@ -48,13 +48,13 @@ function testListApplications() returns error? { } function testCreateApplication() returns error? { Quote quote = { - _links: [ + links: [ { href: "/api/resource/123", rel: "self" } ], - _revision: "1", + revision: "1", applicationInfo: { correctedByTransactionNumber: 12345, correctionOfTransactionNumber: 12344, From 093c09b2066d18a3351b63c83b298fa3211fbad8 Mon Sep 17 00:00:00 2001 From: Ayesh Almeida Date: Wed, 9 Apr 2025 15:43:42 +0530 Subject: [PATCH 4/5] Update package details --- build-config/resources/Ballerina.toml | 5 +---- gradle.properties | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/build-config/resources/Ballerina.toml b/build-config/resources/Ballerina.toml index 8726f5d..91a8982 100644 --- a/build-config/resources/Ballerina.toml +++ b/build-config/resources/Ballerina.toml @@ -1,5 +1,5 @@ [package] -distribution = "2201.8.6" +distribution = "2201.12.2" org = "ballerinax" name = "guidewire.insnow" version = "@toml.version@" @@ -11,6 +11,3 @@ repository = "https://github.com/ballerina-platform/module-ballerinax-guidewire. [build-options] observabilityIncluded = false - -[platform.java17] -graalvmCompatible = true diff --git a/gradle.properties b/gradle.properties index f7775ef..a7134c2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ org.gradle.caching=true group=io.ballerina.lib -version=0.1.1-SNAPSHOT +version=0.2.0-SNAPSHOT checkstylePluginVersion=10.12.0 spotbugsPluginVersion=5.0.14 @@ -9,5 +9,5 @@ downloadPluginVersion=5.4.0 releasePluginVersion=2.8.0 testngVersion=7.6.1 eclipseLsp4jVersion=0.12.0 -ballerinaGradlePluginVersion=2.2.4 +ballerinaGradlePluginVersion=3.0.0 ballerinaLangVersion=2201.12.2 From e0178f092bf109f524f979c7c5003ee0ba96c276 Mon Sep 17 00:00:00 2001 From: Ayesh Almeida Date: Wed, 9 Apr 2025 15:49:04 +0530 Subject: [PATCH 5/5] Fix build failures --- examples/online-application-portal/service.bal | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/examples/online-application-portal/service.bal b/examples/online-application-portal/service.bal index 39671f0..1a1c08b 100644 --- a/examples/online-application-portal/service.bal +++ b/examples/online-application-portal/service.bal @@ -39,11 +39,12 @@ service ApplicationPortal /portal on new http:Listener(9090) { # + limit - The maximum number of results to return # + return - List of applications or an error resource function get applications(string? customerId = (), string? continuationId = (), string? 'limit = ()) returns insnow:ListApplication|error { - return self.insuranceNow->/applications( - customerId = customerId, - continuationId = continuationId, - 'limit = 'limit - ); + insnow:GetQuotesQueries queries = { + customerId, + continuationId, + 'limit + }; + return self.insuranceNow->/applications(queries = queries); } # Starts a new QuickQuote or Quote. @@ -52,7 +53,10 @@ service ApplicationPortal /portal on new http:Listener(9090) { # + requestedTypeCd - The type of the quote, QuickQuote or Quote # + return - An error or nil resource function post applications(insnow:Quote quote, string? requestedTypeCd = ()) returns error? { - _ = check self.insuranceNow->/applications.post(quote, requestedTypeCd); + insnow:CreateQuoteQueries queries = { + requestedTypeCd + }; + _ = check self.insuranceNow->/applications.post(quote, queries = queries); } # Adds an attachment to a quote or application.