From fc16dbe7408235e8995d056b748bb54f7697922c Mon Sep 17 00:00:00 2001 From: ballerina-bot Date: Fri, 16 May 2025 06:17:59 +0000 Subject: [PATCH] [AUTOMATED] Client Regeneration --- ballerina/client.bal | 24 ++++++++++++++++++------ gradle.properties | 2 +- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/ballerina/client.bal b/ballerina/client.bal index 6836ad5..c778a37 100644 --- a/ballerina/client.bal +++ b/ballerina/client.bal @@ -17,6 +17,7 @@ // specific language governing permissions and limitations // under the License. +import ballerina/data.jsondata; import ballerina/http; # This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below. @@ -70,7 +71,7 @@ public isolated client class Client { } map httpHeaders = http:getHeaderMap(headerValues); http:Request request = new; - json jsonBody = payload.toJson(); + json jsonBody = jsondata:toJson(payload); request.setPayload(jsonBody, "application/json"); return self.clientEp->post(resourcePath, request, httpHeaders); } @@ -91,7 +92,7 @@ public isolated client class Client { } resourcePath = resourcePath + check getPathForQueryParam(queryParam); http:Request request = new; - json jsonBody = payload.toJson(); + json jsonBody = jsondata:toJson(payload); request.setPayload(jsonBody, "application/json"); return self.clientEp->put(resourcePath, request, headers); } @@ -144,7 +145,7 @@ public isolated client class Client { } map httpHeaders = http:getHeaderMap(headerValues); http:Request request = new; - json jsonBody = payload.toJson(); + json jsonBody = jsondata:toJson(payload); request.setPayload(jsonBody, "application/json"); return self.clientEp->post(resourcePath, request, httpHeaders); } @@ -168,6 +169,11 @@ public isolated client class Client { return self.clientEp->get(resourcePath, httpHeaders); } + # List all event templates for your app + # + # + appId - The ID of the target app + # + headers - Headers to be sent with the request + # + return - successful operation resource isolated function get [int:Signed32 appId]/event\-templates(map headers = {}) returns CollectionResponseTimelineEventTemplateNoPaging|error { string resourcePath = string `/${getEncodedUri(appId)}/event-templates`; map queryParam = {}; @@ -178,6 +184,12 @@ public isolated client class Client { return self.clientEp->get(resourcePath, headers); } + # Create an event template for the app + # + # + appId - The ID of the target app + # + headers - Headers to be sent with the request + # + payload - The new event template definition + # + return - successful operation resource isolated function post [int:Signed32 appId]/event\-templates(TimelineEventTemplateCreateRequest payload, map headers = {}) returns TimelineEventTemplate|error { string resourcePath = string `/${getEncodedUri(appId)}/event-templates`; map queryParam = {}; @@ -186,7 +198,7 @@ public isolated client class Client { } resourcePath = resourcePath + check getPathForQueryParam(queryParam); http:Request request = new; - json jsonBody = payload.toJson(); + json jsonBody = jsondata:toJson(payload); request.setPayload(jsonBody, "application/json"); return self.clientEp->post(resourcePath, request, headers); } @@ -222,7 +234,7 @@ public isolated client class Client { } resourcePath = resourcePath + check getPathForQueryParam(queryParam); http:Request request = new; - json jsonBody = payload.toJson(); + json jsonBody = jsondata:toJson(payload); request.setPayload(jsonBody, "application/json"); return self.clientEp->put(resourcePath, request, headers); } @@ -258,7 +270,7 @@ public isolated client class Client { } resourcePath = resourcePath + check getPathForQueryParam(queryParam); http:Request request = new; - json jsonBody = payload.toJson(); + json jsonBody = jsondata:toJson(payload); request.setPayload(jsonBody, "application/json"); return self.clientEp->post(resourcePath, request, headers); } diff --git a/gradle.properties b/gradle.properties index 6fa8439..6076ac4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,4 +4,4 @@ version=2.0.0-SNAPSHOT releasePluginVersion=2.8.0 ballerinaGradlePluginVersion=2.3.0 -ballerinaLangVersion=2201.12.2 +ballerinaLangVersion=2201.12.3