From c470fd004a5b15e462f7638a8661f7c0a00623a1 Mon Sep 17 00:00:00 2001 From: ballerina-bot Date: Wed, 9 Apr 2025 07:42:41 +0000 Subject: [PATCH 1/5] [AUTOMATED] Update OpenAPI spec --- docs/spec/openapi.json | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/docs/spec/openapi.json b/docs/spec/openapi.json index e98319d..6ac69a7 100644 --- a/docs/spec/openapi.json +++ b/docs/spec/openapi.json @@ -41,7 +41,7 @@ "parameters" : [ { "name" : "archived", "in" : "query", - "description" : "Whether to return only results that have been archived.", + "description" : "Whether to return only results that have been archived", "required" : false, "style" : "form", "explode" : true, @@ -110,7 +110,7 @@ }, { "name" : "properties", "in" : "query", - "description" : "A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored.", + "description" : "A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored", "required" : false, "style" : "form", "explode" : true, @@ -123,7 +123,7 @@ }, { "name" : "propertiesWithHistory", "in" : "query", - "description" : "A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored.", + "description" : "A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored", "required" : false, "style" : "form", "explode" : true, @@ -136,7 +136,7 @@ }, { "name" : "associations", "in" : "query", - "description" : "A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored.", + "description" : "A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored", "required" : false, "style" : "form", "explode" : true, @@ -149,7 +149,7 @@ }, { "name" : "archived", "in" : "query", - "description" : "Whether to return only results that have been archived.", + "description" : "Whether to return only results that have been archived", "required" : false, "style" : "form", "explode" : true, @@ -464,7 +464,7 @@ "parameters" : [ { "name" : "limit", "in" : "query", - "description" : "The maximum number of results to display per page.", + "description" : "The maximum number of results to display per page", "required" : false, "style" : "form", "explode" : true, @@ -476,7 +476,7 @@ }, { "name" : "after", "in" : "query", - "description" : "The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results.", + "description" : "The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results", "required" : false, "style" : "form", "explode" : true, @@ -486,7 +486,7 @@ }, { "name" : "properties", "in" : "query", - "description" : "A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored.", + "description" : "A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored", "required" : false, "style" : "form", "explode" : true, @@ -499,7 +499,7 @@ }, { "name" : "propertiesWithHistory", "in" : "query", - "description" : "A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request.", + "description" : "A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request", "required" : false, "style" : "form", "explode" : true, @@ -512,7 +512,7 @@ }, { "name" : "associations", "in" : "query", - "description" : "A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored.", + "description" : "A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored", "required" : false, "style" : "form", "explode" : true, @@ -525,7 +525,7 @@ }, { "name" : "archived", "in" : "query", - "description" : "Whether to return only results that have been archived.", + "description" : "Whether to return only results that have been archived", "required" : false, "style" : "form", "explode" : true, @@ -815,7 +815,7 @@ }, "in" : { "type" : "string", - "description" : "The name of the field or parameter in which the error was found." + "description" : "The name of the field or parameter in which the error was found" }, "context" : { "type" : "object", @@ -1696,12 +1696,14 @@ "private_apps_legacy" : { "type" : "apiKey", "name" : "private-app-legacy", - "in" : "header" + "in" : "header", + "x-ballerina-name" : "privateAppLegacy" }, "private_apps" : { "type" : "apiKey", "name" : "private-app", - "in" : "header" + "in" : "header", + "x-ballerina-name" : "privateApp" } } }, From 376c536785cf2d88da604eb56dd82ee519f3e3d2 Mon Sep 17 00:00:00 2001 From: ballerina-bot Date: Wed, 9 Apr 2025 07:42:41 +0000 Subject: [PATCH 2/5] [AUTOMATED] Client Regeneration --- ballerina/client.bal | 167 +++++++++------------ ballerina/types.bal | 350 ++++++++++++++++++------------------------- ballerina/utils.bal | 28 +--- gradle.properties | 2 +- 4 files changed, 225 insertions(+), 322 deletions(-) diff --git a/ballerina/client.bal b/ballerina/client.bal index 0153af3..478a8a0 100644 --- a/ballerina/client.bal +++ b/ballerina/client.bal @@ -1,6 +1,3 @@ -// AUTO-GENERATED FILE. DO NOT MODIFY. -// This file is auto-generated by the Ballerina OpenAPI tool. - // Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // // WSO2 LLC. licenses this file to you under the Apache License, @@ -22,92 +19,70 @@ import ballerina/http; public isolated client class Client { final http:Client clientEp; final readonly & ApiKeysConfig? apiKeyConfig; - # Gets invoked to initialize the `connector`. # # + config - The configurations to be used when initializing the `connector` # + serviceUrl - URL of the target service # + return - An error if connector initialization failed public isolated function init(ConnectionConfig config, string serviceUrl = "https://api.hubapi.com/crm/v3/objects/contacts") returns error? { - http:ClientConfiguration httpClientConfig = {httpVersion: config.httpVersion, timeout: config.timeout, forwarded: config.forwarded, poolConfig: config.poolConfig, compression: config.compression, circuitBreaker: config.circuitBreaker, retryConfig: config.retryConfig, validation: config.validation}; - do { - if config.http1Settings is ClientHttp1Settings { - ClientHttp1Settings settings = check config.http1Settings.ensureType(ClientHttp1Settings); - httpClientConfig.http1Settings = {...settings}; - } - if config.http2Settings is http:ClientHttp2Settings { - httpClientConfig.http2Settings = check config.http2Settings.ensureType(http:ClientHttp2Settings); - } - if config.cache is http:CacheConfig { - httpClientConfig.cache = check config.cache.ensureType(http:CacheConfig); - } - if config.responseLimits is http:ResponseLimitConfigs { - httpClientConfig.responseLimits = check config.responseLimits.ensureType(http:ResponseLimitConfigs); - } - if config.secureSocket is http:ClientSecureSocket { - httpClientConfig.secureSocket = check config.secureSocket.ensureType(http:ClientSecureSocket); - } - if config.proxy is http:ProxyConfig { - httpClientConfig.proxy = check config.proxy.ensureType(http:ProxyConfig); - } - } + http:ClientConfiguration httpClientConfig = {httpVersion: config.httpVersion, http1Settings: config.http1Settings, http2Settings: config.http2Settings, timeout: config.timeout, forwarded: config.forwarded, followRedirects: config.followRedirects, poolConfig: config.poolConfig, cache: config.cache, compression: config.compression, circuitBreaker: config.circuitBreaker, retryConfig: config.retryConfig, cookieConfig: config.cookieConfig, responseLimits: config.responseLimits, secureSocket: config.secureSocket, proxy: config.proxy, socketConfig: config.socketConfig, validation: config.validation, laxDataBinding: config.laxDataBinding}; if config.auth is ApiKeysConfig { self.apiKeyConfig = (config.auth).cloneReadOnly(); } else { httpClientConfig.auth = config.auth; self.apiKeyConfig = (); } - http:Client httpEp = check new (serviceUrl, httpClientConfig); - self.clientEp = httpEp; - return; + self.clientEp = check new (serviceUrl, httpClientConfig); } - # Archive + # Read a batch of contacts by internal ID, or unique property values # # + headers - Headers to be sent with the request - # + return - No content - resource isolated function delete [string contactId](map headers = {}) returns http:Response|error { - string resourcePath = string `/${getEncodedUri(contactId)}`; + # + queries - Queries to be sent with the request + # + return - successful operation + resource isolated function post batch/read(BatchReadInputSimplePublicObjectId payload, map headers = {}, *PostCrmV3ObjectsContactsBatchReadReadQueries queries) returns BatchResponseSimplePublicObject|BatchResponseSimplePublicObjectWithErrors|error { + string resourcePath = string `/batch/read`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app"] = self.apiKeyConfig?.private\-app; + headerValues["private-app"] = self.apiKeyConfig?.privateApp; } - map httpHeaders = getMapForHeaders(headerValues); - return self.clientEp->delete(resourcePath, headers = httpHeaders); + resourcePath = resourcePath + check getPathForQueryParam(queries); + map httpHeaders = http:getHeaderMap(headerValues); + http:Request request = new; + json jsonBody = payload.toJson(); + request.setPayload(jsonBody, "application/json"); + return self.clientEp->post(resourcePath, request, httpHeaders); } - # List + # Read # # + headers - Headers to be sent with the request # + queries - Queries to be sent with the request # + return - successful operation - resource isolated function get .(map headers = {}, *ReadPageOfContactsQueries queries) returns CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|error { - string resourcePath = string `/`; + resource isolated function get [string contactId](map headers = {}, *GetCrmV3ObjectsContactsContactIdGetByIdQueries queries) returns SimplePublicObjectWithAssociations|error { + string resourcePath = string `/${getEncodedUri(contactId)}`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app"] = self.apiKeyConfig?.private\-app; + headerValues["private-app"] = self.apiKeyConfig?.privateApp; } map queryParamEncoding = {"properties": {style: FORM, explode: true}, "propertiesWithHistory": {style: FORM, explode: true}, "associations": {style: FORM, explode: true}}; resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding); - map httpHeaders = getMapForHeaders(headerValues); + map httpHeaders = http:getHeaderMap(headerValues); return self.clientEp->get(resourcePath, httpHeaders); } - # Read + # Archive # # + headers - Headers to be sent with the request - # + queries - Queries to be sent with the request - # + return - successful operation - resource isolated function get [string contactId](map headers = {}, *ReadContactByIdQueries queries) returns SimplePublicObjectWithAssociations|error { + # + return - No content + resource isolated function delete [string contactId](map headers = {}) returns error? { string resourcePath = string `/${getEncodedUri(contactId)}`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app"] = self.apiKeyConfig?.private\-app; + headerValues["private-app"] = self.apiKeyConfig?.privateApp; } - map queryParamEncoding = {"properties": {style: FORM, explode: true}, "propertiesWithHistory": {style: FORM, explode: true}, "associations": {style: FORM, explode: true}}; - resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding); - map httpHeaders = getMapForHeaders(headerValues); - return self.clientEp->get(resourcePath, httpHeaders); + map httpHeaders = http:getHeaderMap(headerValues); + return self.clientEp->delete(resourcePath, headers = httpHeaders); } # Update @@ -118,26 +93,26 @@ public isolated client class Client { string resourcePath = string `/${getEncodedUri(contactId)}`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app"] = self.apiKeyConfig?.private\-app; + headerValues["private-app"] = self.apiKeyConfig?.privateApp; } - map httpHeaders = getMapForHeaders(headerValues); + map httpHeaders = http:getHeaderMap(headerValues); http:Request request = new; json jsonBody = payload.toJson(); request.setPayload(jsonBody, "application/json"); return self.clientEp->patch(resourcePath, request, httpHeaders); } - # Create + # Merge two contacts with same type # # + headers - Headers to be sent with the request # + return - successful operation - resource isolated function post .(SimplePublicObjectInputForCreate payload, map headers = {}) returns SimplePublicObject|error { - string resourcePath = string `/`; + resource isolated function post merge(PublicMergeInput payload, map headers = {}) returns SimplePublicObject|error { + string resourcePath = string `/merge`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app"] = self.apiKeyConfig?.private\-app; + headerValues["private-app"] = self.apiKeyConfig?.privateApp; } - map httpHeaders = getMapForHeaders(headerValues); + map httpHeaders = http:getHeaderMap(headerValues); http:Request request = new; json jsonBody = payload.toJson(); request.setPayload(jsonBody, "application/json"); @@ -148,13 +123,13 @@ public isolated client class Client { # # + headers - Headers to be sent with the request # + return - No content - resource isolated function post batch/archive(BatchInputSimplePublicObjectId payload, map headers = {}) returns http:Response|error { + resource isolated function post batch/archive(BatchInputSimplePublicObjectId payload, map headers = {}) returns error? { string resourcePath = string `/batch/archive`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app"] = self.apiKeyConfig?.private\-app; + headerValues["private-app"] = self.apiKeyConfig?.privateApp; } - map httpHeaders = getMapForHeaders(headerValues); + map httpHeaders = http:getHeaderMap(headerValues); http:Request request = new; json jsonBody = payload.toJson(); request.setPayload(jsonBody, "application/json"); @@ -169,92 +144,90 @@ public isolated client class Client { string resourcePath = string `/batch/create`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app"] = self.apiKeyConfig?.private\-app; + headerValues["private-app"] = self.apiKeyConfig?.privateApp; } - map httpHeaders = getMapForHeaders(headerValues); + map httpHeaders = http:getHeaderMap(headerValues); http:Request request = new; json jsonBody = payload.toJson(); request.setPayload(jsonBody, "application/json"); return self.clientEp->post(resourcePath, request, httpHeaders); } - # Read a batch of contacts by internal ID, or unique property values + # Update a batch of contacts by internal ID, or unique property values # # + headers - Headers to be sent with the request - # + queries - Queries to be sent with the request # + return - successful operation - resource isolated function post batch/read(BatchReadInputSimplePublicObjectId payload, map headers = {}, *ReadBatchOfContactsByInternalIdOrUniquePropertyValuesQueries queries) returns BatchResponseSimplePublicObject|BatchResponseSimplePublicObjectWithErrors|error { - string resourcePath = string `/batch/read`; + resource isolated function post batch/update(BatchInputSimplePublicObjectBatchInput payload, map headers = {}) returns BatchResponseSimplePublicObject|BatchResponseSimplePublicObjectWithErrors|error { + string resourcePath = string `/batch/update`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app"] = self.apiKeyConfig?.private\-app; + headerValues["private-app"] = self.apiKeyConfig?.privateApp; } - resourcePath = resourcePath + check getPathForQueryParam(queries); - map httpHeaders = getMapForHeaders(headerValues); + map httpHeaders = http:getHeaderMap(headerValues); http:Request request = new; json jsonBody = payload.toJson(); request.setPayload(jsonBody, "application/json"); return self.clientEp->post(resourcePath, request, httpHeaders); } - # Update a batch of contacts by internal ID, or unique property values - # - # + headers - Headers to be sent with the request - # + return - successful operation - resource isolated function post batch/update(BatchInputSimplePublicObjectBatchInput payload, map headers = {}) returns BatchResponseSimplePublicObject|BatchResponseSimplePublicObjectWithErrors|error { - string resourcePath = string `/batch/update`; + resource isolated function post gdpr\-delete(PublicGdprDeleteInput payload, map headers = {}) returns error? { + string resourcePath = string `/gdpr-delete`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app"] = self.apiKeyConfig?.private\-app; + headerValues["private-app"] = self.apiKeyConfig?.privateApp; } - map httpHeaders = getMapForHeaders(headerValues); + map httpHeaders = http:getHeaderMap(headerValues); http:Request request = new; json jsonBody = payload.toJson(); request.setPayload(jsonBody, "application/json"); return self.clientEp->post(resourcePath, request, httpHeaders); } - # Create or update a batch of contacts by unique property values + # List # # + headers - Headers to be sent with the request + # + queries - Queries to be sent with the request # + return - successful operation - resource isolated function post batch/upsert(BatchInputSimplePublicObjectBatchInputUpsert payload, map headers = {}) returns BatchResponseSimplePublicUpsertObject|BatchResponseSimplePublicUpsertObjectWithErrors|error { - string resourcePath = string `/batch/upsert`; + resource isolated function get .(map headers = {}, *GetCrmV3ObjectsContactsGetPageQueries queries) returns CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|error { + string resourcePath = string `/`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app"] = self.apiKeyConfig?.private\-app; + headerValues["private-app"] = self.apiKeyConfig?.privateApp; } - map httpHeaders = getMapForHeaders(headerValues); - http:Request request = new; - json jsonBody = payload.toJson(); - request.setPayload(jsonBody, "application/json"); - return self.clientEp->post(resourcePath, request, httpHeaders); + map queryParamEncoding = {"properties": {style: FORM, explode: true}, "propertiesWithHistory": {style: FORM, explode: true}, "associations": {style: FORM, explode: true}}; + resourcePath = resourcePath + check getPathForQueryParam(queries, queryParamEncoding); + map httpHeaders = http:getHeaderMap(headerValues); + return self.clientEp->get(resourcePath, httpHeaders); } - resource isolated function post gdpr\-delete(PublicGdprDeleteInput payload, map headers = {}) returns http:Response|error { - string resourcePath = string `/gdpr-delete`; + # Create + # + # + headers - Headers to be sent with the request + # + return - successful operation + resource isolated function post .(SimplePublicObjectInputForCreate payload, map headers = {}) returns SimplePublicObject|error { + string resourcePath = string `/`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app"] = self.apiKeyConfig?.private\-app; + headerValues["private-app"] = self.apiKeyConfig?.privateApp; } - map httpHeaders = getMapForHeaders(headerValues); + map httpHeaders = http:getHeaderMap(headerValues); http:Request request = new; json jsonBody = payload.toJson(); request.setPayload(jsonBody, "application/json"); return self.clientEp->post(resourcePath, request, httpHeaders); } - # Merge two contacts with same type + # Create or update a batch of contacts by unique property values # # + headers - Headers to be sent with the request # + return - successful operation - resource isolated function post merge(PublicMergeInput payload, map headers = {}) returns SimplePublicObject|error { - string resourcePath = string `/merge`; + resource isolated function post batch/upsert(BatchInputSimplePublicObjectBatchInputUpsert payload, map headers = {}) returns BatchResponseSimplePublicUpsertObject|BatchResponseSimplePublicUpsertObjectWithErrors|error { + string resourcePath = string `/batch/upsert`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app"] = self.apiKeyConfig?.private\-app; + headerValues["private-app"] = self.apiKeyConfig?.privateApp; } - map httpHeaders = getMapForHeaders(headerValues); + map httpHeaders = http:getHeaderMap(headerValues); http:Request request = new; json jsonBody = payload.toJson(); request.setPayload(jsonBody, "application/json"); @@ -267,9 +240,9 @@ public isolated client class Client { string resourcePath = string `/search`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app"] = self.apiKeyConfig?.private\-app; + headerValues["private-app"] = self.apiKeyConfig?.privateApp; } - map httpHeaders = getMapForHeaders(headerValues); + map httpHeaders = http:getHeaderMap(headerValues); http:Request request = new; json jsonBody = payload.toJson(); request.setPayload(jsonBody, "application/json"); diff --git a/ballerina/types.bal b/ballerina/types.bal index fc99f4e..832f3d1 100644 --- a/ballerina/types.bal +++ b/ballerina/types.bal @@ -1,6 +1,3 @@ -// AUTO-GENERATED FILE. DO NOT MODIFY. -// This file is auto-generated by the Ballerina OpenAPI tool. - // Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // // WSO2 LLC. licenses this file to you under the Apache License, @@ -19,10 +16,26 @@ import ballerina/http; -public type CollectionResponseWithTotalSimplePublicObjectForwardPagingOk record {| - *http:Ok; - CollectionResponseWithTotalSimplePublicObjectForwardPaging body; -|}; +public type StandardError record { + record {} subCategory?; + record {|string[]...;|} context; + record {|string...;|} links; + string id?; + string category; + string message; + ErrorDetail[] errors; + string status; +}; + +public type CollectionResponseAssociatedId record { + Paging paging?; + AssociatedId[] results; +}; + +public type PublicAssociationsForObject record { + AssociationSpec[] types?; + PublicObjectId to?; +}; public type BatchResponseSimplePublicObject record { string completedAt; @@ -33,12 +46,16 @@ public type BatchResponseSimplePublicObject record { "PENDING"|"PROCESSING"|"CANCELED"|"COMPLETE" status; }; +public type FilterGroup record { + Filter[] filters; +}; + public type ErrorDetail record { # A specific category that contains more specific detail about the error string subCategory?; # The status code associated with the error detail string code?; - # The name of the field or parameter in which the error was found. + # The name of the field or parameter in which the error was found string 'in?; # Context about the error condition record {|string[]...;|} context?; @@ -46,15 +63,14 @@ public type ErrorDetail record { string message; }; -public type SimplePublicObjectOk record {| - *http:Ok; - SimplePublicObject body; -|}; - public type ForwardPaging record { NextPage next?; }; +public type SimplePublicObjectId record { + string id; +}; + public type BatchResponseSimplePublicUpsertObjectWithErrors record { string completedAt; int:Signed32 numErrors?; @@ -82,26 +98,62 @@ public type BatchResponseSimplePublicUpsertObject record { "PENDING"|"PROCESSING"|"CANCELED"|"COMPLETE" status; }; -# Represents the Queries record for the operation: readPageOfContacts -public type ReadPageOfContactsQueries record { - # A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. +# Represents the Queries record for the operation: get-/crm/v3/objects/contacts_getPage +public type GetCrmV3ObjectsContactsGetPageQueries record { + # A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored string[] associations?; - # Whether to return only results that have been archived. + # Whether to return only results that have been archived boolean archived = false; - # A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. + # A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request string[] propertiesWithHistory?; - # The maximum number of results to display per page. + # The maximum number of results to display per page int:Signed32 'limit = 10; - # The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. + # The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results string after?; - # A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. + # A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored string[] properties?; }; +public type ValueWithTimestamp record { + string sourceId?; + string sourceType; + string sourceLabel?; + int:Signed32 updatedByUserId?; + string value; + string timestamp; +}; + public type BatchInputSimplePublicObjectId record { SimplePublicObjectId[] inputs; }; +# OAuth2 Refresh Token Grant Configs +public type OAuth2RefreshTokenGrantConfig record {| + *http:OAuth2RefreshTokenGrantConfig; + # Refresh URL + string refreshUrl = "https://api.hubapi.com/oauth/v1/token"; +|}; + +public type BatchInputSimplePublicObjectBatchInputUpsert record { + SimplePublicObjectBatchInputUpsert[] inputs; +}; + +public type CollectionResponseWithTotalSimplePublicObjectForwardPaging record { + int:Signed32 total; + ForwardPaging paging?; + SimplePublicObject[] results; +}; + +public type SimplePublicObject record { + string createdAt; + boolean archived?; + string archivedAt?; + record {|ValueWithTimestamp[]...;|} propertiesWithHistory?; + string id; + record {|string?...;|} properties; + string updatedAt; +}; + # Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint. @display {label: "Connection Config"} public type ConnectionConfig record {| @@ -110,38 +162,60 @@ public type ConnectionConfig record {| # The HTTP version understood by the client http:HttpVersion httpVersion = http:HTTP_2_0; # Configurations related to HTTP/1.x protocol - ClientHttp1Settings http1Settings?; + http:ClientHttp1Settings http1Settings = {}; # Configurations related to HTTP/2 protocol - http:ClientHttp2Settings http2Settings?; + http:ClientHttp2Settings http2Settings = {}; # The maximum time to wait (in seconds) for a response before closing the connection - decimal timeout = 60; + decimal timeout = 30; # The choice of setting `forwarded`/`x-forwarded` header string forwarded = "disable"; + # Configurations associated with Redirection + http:FollowRedirects followRedirects?; # Configurations associated with request pooling http:PoolConfiguration poolConfig?; # HTTP caching related configurations - http:CacheConfig cache?; + http:CacheConfig cache = {}; # Specifies the way of handling compression (`accept-encoding`) header http:Compression compression = http:COMPRESSION_AUTO; # Configurations associated with the behaviour of the Circuit Breaker http:CircuitBreakerConfig circuitBreaker?; # Configurations associated with retrying http:RetryConfig retryConfig?; + # Configurations associated with cookies + http:CookieConfig cookieConfig?; # Configurations associated with inbound response size limits - http:ResponseLimitConfigs responseLimits?; + http:ResponseLimitConfigs responseLimits = {}; # SSL/TLS-related options http:ClientSecureSocket secureSocket?; # Proxy server related options http:ProxyConfig proxy?; + # Provides settings related to client socket configuration + http:ClientSocketConfig socketConfig = {}; # Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default boolean validation = true; + # Enables relaxed data binding on the client side. When enabled, `nil` values are treated as optional, + # and absent fields are handled as `nilable` types. Enabled by default. + boolean laxDataBinding = true; |}; +public type PublicObjectId record { + string id?; +}; + public type Paging record { NextPage next?; PreviousPage prev?; }; +public type PublicObjectSearchRequest record { + string query?; + int:Signed32 'limit?; + string after?; + string[] sorts?; + string[] properties?; + FilterGroup[] filterGroups?; +}; + public type SimplePublicObjectBatchInputUpsert record { string idProperty?; string objectWriteTraceId?; @@ -165,22 +239,32 @@ public type PublicGdprDeleteInput record { string objectId; }; -# Represents the Queries record for the operation: readBatchOfContactsByInternalIdOrUniquePropertyValues -public type ReadBatchOfContactsByInternalIdOrUniquePropertyValuesQueries record { - # Whether to return only results that have been archived. +public type SimplePublicObjectInput record { + string objectWriteTraceId?; + record {|string...;|} properties; +}; + +# Represents the Queries record for the operation: post-/crm/v3/objects/contacts/batch/read_read +public type PostCrmV3ObjectsContactsBatchReadReadQueries record { + # Whether to return only results that have been archived boolean archived = false; }; -public type BatchResponseSimplePublicObjectWithErrorsMultiStatus record {| - *http:MultiStatus; - BatchResponseSimplePublicObjectWithErrors body; -|}; +public type CollectionResponseSimplePublicObjectWithAssociationsForwardPaging record { + ForwardPaging paging?; + SimplePublicObjectWithAssociations[] results; +}; public type PublicMergeInput record { string objectIdToMerge; string primaryObjectId; }; +public type AssociationSpec record { + "HUBSPOT_DEFINED"|"USER_DEFINED"|"INTEGRATOR_DEFINED" associationCategory?; + int:Signed32 associationTypeId?; +}; + public type SimplePublicObjectWithAssociations record { record {|CollectionResponseAssociatedId...;|} associations?; string createdAt; @@ -192,15 +276,28 @@ public type SimplePublicObjectWithAssociations record { string updatedAt; }; -public type AnydataDefault record {| - *http:DefaultStatusCodeResponse; - anydata body; -|}; +public type Filter record { + string highValue?; + string propertyName; + string[] values?; + string value?; + # null + "EQ"|"NEQ"|"LT"|"LTE"|"GT"|"GTE"|"BETWEEN"|"IN"|"NOT_IN"|"HAS_PROPERTY"|"NOT_HAS_PROPERTY"|"CONTAINS_TOKEN"|"NOT_CONTAINS_TOKEN" operator; +}; + +public type PreviousPage record { + string before; + string link?; +}; public type BatchInputSimplePublicObjectInputForCreate record { SimplePublicObjectInputForCreate[] inputs; }; +public type BatchInputSimplePublicObjectBatchInput record { + SimplePublicObjectBatchInput[] inputs; +}; + public type SimplePublicUpsertObject record { string createdAt; boolean archived?; @@ -212,180 +309,25 @@ public type SimplePublicUpsertObject record { string updatedAt; }; -public type BatchResponseSimplePublicUpsertObjectOk record {| - *http:Ok; - BatchResponseSimplePublicUpsertObject body; -|}; - -public type SimplePublicObjectBatchInput record { - string idProperty?; - string objectWriteTraceId?; - string id; - record {|string...;|} properties; -}; - -# Provides API key configurations needed when communicating with a remote HTTP endpoint. -public type ApiKeysConfig record {| - string private\-app\-legacy; - string private\-app; -|}; - -public type StandardError record { - record {} subCategory?; - record {|string[]...;|} context; - record {|string...;|} links; - string id?; - string category; - string message; - ErrorDetail[] errors; - string status; -}; - -public type CollectionResponseAssociatedId record { - Paging paging?; - AssociatedId[] results; -}; - -public type PublicAssociationsForObject record { - AssociationSpec[] types?; - PublicObjectId to?; -}; - -public type FilterGroup record { - Filter[] filters; -}; - -# Represents the Queries record for the operation: readContactById -public type ReadContactByIdQueries record { - # A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. +# Represents the Queries record for the operation: get-/crm/v3/objects/contacts/{contactId}_getById +public type GetCrmV3ObjectsContactsContactIdGetByIdQueries record { + # A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored string[] associations?; - # Whether to return only results that have been archived. + # Whether to return only results that have been archived boolean archived = false; - # A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. + # A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored string[] propertiesWithHistory?; - # A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. + # A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored string[] properties?; }; -public type SimplePublicObjectId record { - string id; -}; - -public type ValueWithTimestamp record { - string sourceId?; - string sourceType; - string sourceLabel?; - int:Signed32 updatedByUserId?; - string value; - string timestamp; -}; - -# OAuth2 Refresh Token Grant Configs -public type OAuth2RefreshTokenGrantConfig record {| - *http:OAuth2RefreshTokenGrantConfig; - # Refresh URL - string refreshUrl = "https://api.hubapi.com/oauth/v1/token"; -|}; - -public type BatchInputSimplePublicObjectBatchInputUpsert record { - SimplePublicObjectBatchInputUpsert[] inputs; -}; - -public type CollectionResponseWithTotalSimplePublicObjectForwardPaging record { - int:Signed32 total; - ForwardPaging paging?; - SimplePublicObject[] results; -}; - -public type SimplePublicObject record { - string createdAt; - boolean archived?; - string archivedAt?; - record {|ValueWithTimestamp[]...;|} propertiesWithHistory?; - string id; - record {|string?...;|} properties; - string updatedAt; -}; - -public type PublicObjectId record { - string id?; -}; - -public type PublicObjectSearchRequest record { - string query?; - int:Signed32 'limit?; - string after?; - string[] sorts?; - string[] properties?; - FilterGroup[] filterGroups?; -}; - -# Proxy server configurations to be used with the HTTP client endpoint. -public type ProxyConfig record {| - # Host name of the proxy server - string host = ""; - # Proxy server port - int port = 0; - # Proxy server username - string userName = ""; - # Proxy server password - @display {label: "", kind: "password"} - string password = ""; -|}; - -public type SimplePublicObjectInput record { +public type SimplePublicObjectBatchInput record { + string idProperty?; string objectWriteTraceId?; + string id; record {|string...;|} properties; }; -public type BatchResponseSimplePublicObjectOk record {| - *http:Ok; - BatchResponseSimplePublicObject body; -|}; - -public type CollectionResponseSimplePublicObjectWithAssociationsForwardPaging record { - ForwardPaging paging?; - SimplePublicObjectWithAssociations[] results; -}; - -public type AssociationSpec record { - "HUBSPOT_DEFINED"|"USER_DEFINED"|"INTEGRATOR_DEFINED" associationCategory?; - int:Signed32 associationTypeId?; -}; - -public type Filter record { - string highValue?; - string propertyName; - string[] values?; - string value?; - # null - "EQ"|"NEQ"|"LT"|"LTE"|"GT"|"GTE"|"BETWEEN"|"IN"|"NOT_IN"|"HAS_PROPERTY"|"NOT_HAS_PROPERTY"|"CONTAINS_TOKEN"|"NOT_CONTAINS_TOKEN" operator; -}; - -# Provides settings related to HTTP/1.x protocol. -public type ClientHttp1Settings record {| - # Specifies whether to reuse a connection for multiple requests - http:KeepAlive keepAlive = http:KEEPALIVE_AUTO; - # The chunking behaviour of the request - http:Chunking chunking = http:CHUNKING_AUTO; - # Proxy server related options - ProxyConfig proxy?; -|}; - -public type BatchInputSimplePublicObjectBatchInput record { - SimplePublicObjectBatchInput[] inputs; -}; - -public type PreviousPage record { - string before; - string link?; -}; - -public type BatchResponseSimplePublicUpsertObjectWithErrorsMultiStatus record {| - *http:MultiStatus; - BatchResponseSimplePublicUpsertObjectWithErrors body; -|}; - public type NextPage record { string link?; string after; @@ -396,6 +338,12 @@ public type AssociatedId record { string 'type; }; +# Provides API key configurations needed when communicating with a remote HTTP endpoint. +public type ApiKeysConfig record {| + string privateAppLegacy; + string privateApp; +|}; + public type SimplePublicObjectInputForCreate record { PublicAssociationsForObject[] associations?; string objectWriteTraceId?; diff --git a/ballerina/utils.bal b/ballerina/utils.bal index 5d8e591..727b67c 100644 --- a/ballerina/utils.bal +++ b/ballerina/utils.bal @@ -1,6 +1,3 @@ -// AUTO-GENERATED FILE. DO NOT MODIFY. -// This file is auto-generated by the Ballerina OpenAPI tool. - // Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // // WSO2 LLC. licenses this file to you under the Apache License, @@ -17,6 +14,7 @@ // specific language governing permissions and limitations // under the License. +import ballerina/http; import ballerina/url; type SimpleBasicType string|boolean|int|float|decimal; @@ -186,12 +184,13 @@ isolated function getEncodedUri(anydata value) returns string { # + encodingMap - Details on serialization mechanism # + return - Returns generated Path or error at failure of client initialization isolated function getPathForQueryParam(map queryParam, map encodingMap = {}) returns string|error { + map queriesMap = http:getQueryMap(queryParam); string[] param = []; - if queryParam.length() > 0 { + if queriesMap.length() > 0 { param.push("?"); - foreach var [key, value] in queryParam.entries() { + foreach var [key, value] in queriesMap.entries() { if value is () { - _ = queryParam.remove(key); + _ = queriesMap.remove(key); continue; } Encoding encodingData = encodingMap.hasKey(key) ? encodingMap.get(key) : defaultEncoding; @@ -215,20 +214,3 @@ isolated function getPathForQueryParam(map queryParam, map en string restOfPath = string:'join("", ...param); return restOfPath; } - -# Generate header map for given header values. -# -# + headerParam - Headers map -# + return - Returns generated map or error at failure of client initialization -isolated function getMapForHeaders(map headerParam) returns map { - map headerMap = {}; - foreach var [key, value] in headerParam.entries() { - if value is SimpleBasicType[] { - headerMap[key] = from SimpleBasicType data in value - select data.toString(); - } else { - headerMap[key] = value.toString(); - } - } - return headerMap; -} diff --git a/gradle.properties b/gradle.properties index 5ed08cb..0763da3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,4 +4,4 @@ version=0.1.0-SNAPSHOT releasePluginVersion=2.8.0 ballerinaGradlePluginVersion=2.2.4 -ballerinaLangVersion=2201.10.0 +ballerinaLangVersion=2201.12.2 From 526a3d2857dd3262185700c9de0f86e4a57a60c4 Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Wed, 9 Apr 2025 17:02:58 +0530 Subject: [PATCH 3/5] [Automated] Update the toml files --- ballerina/Dependencies.toml | 44 +++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index dbeddbb..21e3996 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,12 +5,12 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.10.0" +distribution-version = "2201.12.2" [[package]] org = "ballerina" name = "auth" -version = "2.12.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.8.0" +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,25 @@ dependencies = [ [[package]] org = "ballerina" name = "crypto" -version = "2.7.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"} +] + [[package]] org = "ballerina" name = "file" -version = "1.10.0" +version = "1.12.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, @@ -61,12 +70,13 @@ dependencies = [ [[package]] org = "ballerina" name = "http" -version = "2.12.4" +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 +103,7 @@ modules = [ [[package]] org = "ballerina" name = "io" -version = "1.6.3" +version = "1.8.0" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "lang.value"} @@ -107,7 +117,7 @@ version = "0.0.0" [[package]] org = "ballerina" name = "jwt" -version = "2.13.0" +version = "2.15.0" dependencies = [ {org = "ballerina", name = "cache"}, {org = "ballerina", name = "crypto"}, @@ -205,7 +215,7 @@ dependencies = [ [[package]] org = "ballerina" name = "log" -version = "2.10.0" +version = "2.12.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, @@ -216,7 +226,7 @@ dependencies = [ [[package]] org = "ballerina" name = "mime" -version = "2.10.1" +version = "2.12.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, @@ -227,7 +237,7 @@ dependencies = [ [[package]] org = "ballerina" name = "oauth2" -version = "2.12.0" +version = "2.14.0" dependencies = [ {org = "ballerina", name = "cache"}, {org = "ballerina", name = "crypto"}, @@ -243,7 +253,7 @@ modules = [ [[package]] org = "ballerina" name = "observe" -version = "1.3.0" +version = "1.5.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -251,7 +261,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"} @@ -263,7 +273,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"} @@ -286,7 +296,7 @@ modules = [ [[package]] org = "ballerina" name = "time" -version = "2.5.0" +version = "2.7.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -294,7 +304,7 @@ dependencies = [ [[package]] org = "ballerina" name = "url" -version = "2.4.0" +version = "2.6.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] From b659484913945766caa314d818c71b2824d8bc35 Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Wed, 9 Apr 2025 17:04:16 +0530 Subject: [PATCH 4/5] [Automated] Update the toml files --- ballerina/Ballerina.toml | 7 ++----- ballerina/Dependencies.toml | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 12d811a..26b79f6 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,8 +1,8 @@ [package] -distribution = "2201.10.0" +distribution = "2201.12.0" org = "ballerinax" name = "hubspot.crm.obj.contacts" -version = "0.1.0" +version = "1.0.0" license = ["Apache-2.0"] authors = ["Ballerina"] keywords = ["hubspot", "customer", "management", "connector", "crm"] @@ -10,6 +10,3 @@ repository = "https://github.com/ballerina-platform/module-ballerinax-hubspot.cr [build-options] observabilityIncluded = true - -[platform.java17] -graalvmCompatible = true diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 21e3996..30adaf5 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -327,7 +327,7 @@ modules = [ [[package]] org = "ballerinax" name = "hubspot.crm.obj.contacts" -version = "0.1.0" +version = "1.0.0" dependencies = [ {org = "ballerina", name = "http"}, {org = "ballerina", name = "oauth2"}, From e0ab8350265a1c8e17f41057937a958240f3689f Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Wed, 9 Apr 2025 17:09:03 +0530 Subject: [PATCH 5/5] fix the build failure --- ballerina/tests/test.bal | 14 ++--- build-config/resources/Ballerina.toml | 5 +- examples/Email-Advertising/Dependencies.toml | 57 ++++++++++--------- examples/Email-Advertising/main.bal | 3 +- examples/Event-Registration/Dependencies.toml | 52 ++++++++++------- gradle.properties | 4 +- 6 files changed, 70 insertions(+), 65 deletions(-) diff --git a/ballerina/tests/test.bal b/ballerina/tests/test.bal index c414d5e..0b1e230 100644 --- a/ballerina/tests/test.bal +++ b/ballerina/tests/test.bal @@ -14,7 +14,6 @@ // specific language governing permissions and limitations // under the License. -import ballerina/http; import ballerina/oauth2; import ballerina/os; import ballerina/test; @@ -82,15 +81,14 @@ function testMergeTwoContactsWithSameType() returns error? { } function testArchiveBatchOfContactsById() returns error? { string contactId = "4243242"; - http:Response response = check hubSpotCrmContact->/batch/archive.post({ + _ = check hubSpotCrmContact->/batch/archive.post({ inputs: [ { id: contactId } ] }); - - test:assertEquals(response.statusCode, 204); + test:assertTrue(true); } @test:Config { @@ -173,8 +171,8 @@ function testPartialUpdateOfContactByContactId() returns error? { groups: ["mock_tests", "live_tests"] } function testDeleteContactById() returns error? { - http:Response response = check hubSpotCrmContact->/[testContactId].delete(); - test:assertEquals(response.statusCode, 204); + _ = check hubSpotCrmContact->/[testContactId].delete(); + test:assertTrue(true); } @test:Config { @@ -217,10 +215,10 @@ function testSearch() returns error? { groups: ["mock_tests", "live_tests"] } function testGDPRDelete() returns error? { - http:Response response = check hubSpotCrmContact->/gdpr\-delete.post({ + _ = check hubSpotCrmContact->/gdpr\-delete.post({ objectId: testContactId }); - test:assertEquals(response.statusCode, 204); + test:assertTrue(true); } @test:Config { diff --git a/build-config/resources/Ballerina.toml b/build-config/resources/Ballerina.toml index a852b1b..62a810f 100644 --- a/build-config/resources/Ballerina.toml +++ b/build-config/resources/Ballerina.toml @@ -1,5 +1,5 @@ [package] -distribution = "2201.10.0" +distribution = "2201.12.0" org = "ballerinax" name = "hubspot.crm.obj.contacts" version = "@toml.version@" @@ -10,6 +10,3 @@ repository = "https://github.com/ballerina-platform/module-ballerinax-hubspot.cr [build-options] observabilityIncluded = true - -[platform.java17] -graalvmCompatible = true diff --git a/examples/Email-Advertising/Dependencies.toml b/examples/Email-Advertising/Dependencies.toml index e4bc092..c61b295 100644 --- a/examples/Email-Advertising/Dependencies.toml +++ b/examples/Email-Advertising/Dependencies.toml @@ -5,12 +5,12 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.10.3" +distribution-version = "2201.12.2" [[package]] org = "ballerina" name = "auth" -version = "2.12.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.8.0" +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,35 +41,42 @@ dependencies = [ [[package]] org = "ballerina" name = "crypto" -version = "2.7.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"} +] + [[package]] org = "ballerina" name = "file" -version = "1.10.0" +version = "1.12.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "os"}, {org = "ballerina", name = "time"} ] -modules = [ - {org = "ballerina", packageName = "file", moduleName = "file"} -] [[package]] org = "ballerina" name = "http" -version = "2.12.4" +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"}, @@ -88,15 +95,11 @@ dependencies = [ {org = "ballerina", name = "time"}, {org = "ballerina", name = "url"} ] -modules = [ - {org = "ballerina", packageName = "http", moduleName = "http"}, - {org = "ballerina", packageName = "http", moduleName = "http.httpscerr"} -] [[package]] org = "ballerina" name = "io" -version = "1.6.3" +version = "1.8.0" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "lang.value"} @@ -113,7 +116,7 @@ version = "0.0.0" [[package]] org = "ballerina" name = "jwt" -version = "2.13.0" +version = "2.15.0" dependencies = [ {org = "ballerina", name = "cache"}, {org = "ballerina", name = "crypto"}, @@ -202,7 +205,7 @@ dependencies = [ [[package]] org = "ballerina" name = "log" -version = "2.10.0" +version = "2.12.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, @@ -213,7 +216,7 @@ dependencies = [ [[package]] org = "ballerina" name = "mime" -version = "2.10.1" +version = "2.12.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, @@ -224,7 +227,7 @@ dependencies = [ [[package]] org = "ballerina" name = "oauth2" -version = "2.12.0" +version = "2.14.0" dependencies = [ {org = "ballerina", name = "cache"}, {org = "ballerina", name = "crypto"}, @@ -237,7 +240,7 @@ dependencies = [ [[package]] org = "ballerina" name = "observe" -version = "1.3.0" +version = "1.5.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -245,7 +248,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"} @@ -254,7 +257,7 @@ dependencies = [ [[package]] org = "ballerina" name = "task" -version = "2.5.0" +version = "2.7.0" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "time"} @@ -263,7 +266,7 @@ dependencies = [ [[package]] org = "ballerina" name = "time" -version = "2.5.0" +version = "2.7.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -271,7 +274,7 @@ dependencies = [ [[package]] org = "ballerina" name = "url" -version = "2.4.0" +version = "2.6.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -291,9 +294,11 @@ modules = [ [[package]] org = "ballerinax" name = "hubspot.crm.obj.contacts" -version = "0.1.0" +version = "1.0.0" dependencies = [ {org = "ballerina", name = "http"}, + {org = "ballerina", name = "oauth2"}, + {org = "ballerina", name = "os"}, {org = "ballerina", name = "url"}, {org = "ballerinai", name = "observe"} ] @@ -306,8 +311,6 @@ org = "wso2" name = "Email_Advertising" version = "0.1.0" dependencies = [ - {org = "ballerina", name = "file"}, - {org = "ballerina", name = "http"}, {org = "ballerina", name = "io"}, {org = "ballerinai", name = "observe"}, {org = "ballerinax", name = "hubspot.crm.obj.contacts"} diff --git a/examples/Email-Advertising/main.bal b/examples/Email-Advertising/main.bal index 9812ee1..4a40ec1 100644 --- a/examples/Email-Advertising/main.bal +++ b/examples/Email-Advertising/main.bal @@ -14,7 +14,6 @@ // specific language governing permissions and limitations // under the License. -import ballerina/http; import ballerina/io; import ballerinax/hubspot.crm.obj.contacts; @@ -89,6 +88,6 @@ public function deleteCustomer(string email, map contactsWithEmail) retu // get the id of the contact with given email string? id = contactsWithEmail[email]; // delete the contact with customer with given id - http:Response response = check contactClient->/[id.toString()].delete(); + _ = check contactClient->/[id.toString()].delete(); } } diff --git a/examples/Event-Registration/Dependencies.toml b/examples/Event-Registration/Dependencies.toml index 32668e4..66232b6 100644 --- a/examples/Event-Registration/Dependencies.toml +++ b/examples/Event-Registration/Dependencies.toml @@ -5,12 +5,12 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.10.3" +distribution-version = "2201.12.2" [[package]] org = "ballerina" name = "auth" -version = "2.12.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.8.0" +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,35 +41,42 @@ dependencies = [ [[package]] org = "ballerina" name = "crypto" -version = "2.7.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"} +] + [[package]] org = "ballerina" name = "file" -version = "1.10.0" +version = "1.12.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "os"}, {org = "ballerina", name = "time"} ] -modules = [ - {org = "ballerina", packageName = "file", moduleName = "file"} -] [[package]] org = "ballerina" name = "http" -version = "2.12.4" +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"}, @@ -92,7 +99,7 @@ dependencies = [ [[package]] org = "ballerina" name = "io" -version = "1.6.3" +version = "1.8.0" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "lang.value"} @@ -109,7 +116,7 @@ version = "0.0.0" [[package]] org = "ballerina" name = "jwt" -version = "2.13.0" +version = "2.15.0" dependencies = [ {org = "ballerina", name = "cache"}, {org = "ballerina", name = "crypto"}, @@ -198,7 +205,7 @@ dependencies = [ [[package]] org = "ballerina" name = "log" -version = "2.10.0" +version = "2.12.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, @@ -209,7 +216,7 @@ dependencies = [ [[package]] org = "ballerina" name = "mime" -version = "2.10.1" +version = "2.12.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, @@ -220,7 +227,7 @@ dependencies = [ [[package]] org = "ballerina" name = "oauth2" -version = "2.12.0" +version = "2.14.0" dependencies = [ {org = "ballerina", name = "cache"}, {org = "ballerina", name = "crypto"}, @@ -233,7 +240,7 @@ dependencies = [ [[package]] org = "ballerina" name = "observe" -version = "1.3.0" +version = "1.5.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -241,7 +248,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"} @@ -250,7 +257,7 @@ dependencies = [ [[package]] org = "ballerina" name = "task" -version = "2.5.0" +version = "2.7.0" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "time"} @@ -259,7 +266,7 @@ dependencies = [ [[package]] org = "ballerina" name = "time" -version = "2.5.0" +version = "2.7.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -267,7 +274,7 @@ dependencies = [ [[package]] org = "ballerina" name = "url" -version = "2.4.0" +version = "2.6.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -287,9 +294,11 @@ modules = [ [[package]] org = "ballerinax" name = "hubspot.crm.obj.contacts" -version = "0.1.0" +version = "1.0.0" dependencies = [ {org = "ballerina", name = "http"}, + {org = "ballerina", name = "oauth2"}, + {org = "ballerina", name = "os"}, {org = "ballerina", name = "url"}, {org = "ballerinai", name = "observe"} ] @@ -302,7 +311,6 @@ org = "wso2" name = "Event_Registration" version = "0.1.0" dependencies = [ - {org = "ballerina", name = "file"}, {org = "ballerina", name = "io"}, {org = "ballerinai", name = "observe"}, {org = "ballerinax", name = "hubspot.crm.obj.contacts"} diff --git a/gradle.properties b/gradle.properties index 0763da3..550f16d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.caching=true group=io.ballerina.lib -version=0.1.0-SNAPSHOT +version=1.0.0-SNAPSHOT releasePluginVersion=2.8.0 -ballerinaGradlePluginVersion=2.2.4 +ballerinaGradlePluginVersion=2.3.0 ballerinaLangVersion=2201.12.2