diff --git a/ballerina/client.bal b/ballerina/client.bal index 3e4d625..fad160f 100644 --- a/ballerina/client.bal +++ b/ballerina/client.bal @@ -1,7 +1,7 @@ // 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). +// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). // // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -22,218 +22,199 @@ 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/marketing/v3/marketing-events") 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); } - # Disassociate a list from a marketing event + # Record Participants by ContactId with Marketing Event External Ids # - # + externalAccountId - The accountId that is associated with this marketing event in the external event application. - # + externalEventId - The id of the marketing event in the external event application. - # + listId - The ILS ID of the list. + # + externalEventId - The id of the marketing event in the external event application + # + subscriberState - The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel' # + headers - Headers to be sent with the request - # + return - No content - remote isolated function deleteAssociationsExternalaccountidExternaleventidListsListid_disassociatebyexternalaccountandeventids(string externalAccountId, string externalEventId, string listId, map headers = {}) returns http:Response|error { - string resourcePath = string `/associations/${getEncodedUri(externalAccountId)}/${getEncodedUri(externalEventId)}/lists/${getEncodedUri(listId)}`; + # + queries - Queries to be sent with the request + # + return - successful operation + resource isolated function post attendance/[string externalEventId]/[string subscriberState]/create(BatchInputMarketingEventSubscriber payload, map headers = {}, *PostAttendanceExternalEventIdSubscriberStateCreateRecordByContactIdsQueries queries) returns BatchResponseSubscriberVidResponse|error { + string resourcePath = string `/attendance/${getEncodedUri(externalEventId)}/${getEncodedUri(subscriberState)}/create`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - 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); } - # Disassociate a list from a marketing event + # Read participations breakdown by Marketing Event internal identifier # - # + marketingEventId - The internal id of the marketing event in HubSpot. - # + listId - The ILS ID of the list. + # + marketingEventId - The internal id of the marketing event in HubSpot # + headers - Headers to be sent with the request - # + return - No content - remote isolated function deleteAssociationsMarketingeventidListsListid_disassociatebymarketingeventid(string marketingEventId, string listId, map headers = {}) returns http:Response|error { - string resourcePath = string `/associations/${getEncodedUri(marketingEventId)}/lists/${getEncodedUri(listId)}`; + # + queries - Queries to be sent with the request + # + return - successful operation + resource isolated function get participations/[int marketingEventId]/breakdown(map headers = {}, *GetParticipationsMarketingEventIdBreakdownGetParticipationsBreakdownByMarketingEventIdQueries queries) returns CollectionResponseWithTotalParticipationBreakdownForwardPaging|error { + string resourcePath = string `/participations/${getEncodedUri(marketingEventId)}/breakdown`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - map httpHeaders = getMapForHeaders(headerValues); - return self.clientEp->delete(resourcePath, headers = httpHeaders); + resourcePath = resourcePath + check getPathForQueryParam(queries); + map httpHeaders = http:getHeaderMap(headerValues); + return self.clientEp->get(resourcePath, httpHeaders); } - # Delete Marketing Event by External Ids + # Record a subscriber state by contact ID # # + externalEventId - The id of the marketing event in the external event application + # + subscriberState - The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel' # + headers - Headers to be sent with the request # + queries - Queries to be sent with the request - # + return - No content - remote isolated function deleteEventsExternaleventid_archive(string externalEventId, map headers = {}, *DeleteEventsExternaleventid_archiveQueries queries) returns http:Response|error { - string resourcePath = string `/events/${getEncodedUri(externalEventId)}`; + # + return - An error occurred + resource isolated function post events/[string externalEventId]/[string subscriberState]/upsert(BatchInputMarketingEventSubscriber payload, map headers = {}, *PostEventsExternalEventIdSubscriberStateUpsertUpsertByContactIdQueries queries) returns http:Response|error { + string resourcePath = string `/events/${getEncodedUri(externalEventId)}/${getEncodedUri(subscriberState)}/upsert`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } resourcePath = resourcePath + check getPathForQueryParam(queries); - map httpHeaders = getMapForHeaders(headerValues); - return self.clientEp->delete(resourcePath, headers = httpHeaders); - } - - # Delete Marketing Event by objectId - # - # + objectId - The internal ID of the marketing event in HubSpot - # + headers - Headers to be sent with the request - # + return - No content - remote isolated function deleteObjectid(string objectId, map headers = {}) returns http:Response|error { - string resourcePath = string `/${getEncodedUri(objectId)}`; - map headerValues = {...headers}; - if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; - } - map httpHeaders = getMapForHeaders(headerValues); - return self.clientEp->delete(resourcePath, headers = httpHeaders); + 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); } - # Get all marketing event + # Get Marketing Event by External IDs # + # + externalEventId - The id of the marketing event in the external event application # + headers - Headers to be sent with the request # + queries - Queries to be sent with the request # + return - successful operation - remote isolated function get(map headers = {}, *GetQueries queries) returns CollectionResponseMarketingEventPublicReadResponseV2ForwardPaging|error { - string resourcePath = string `/`; + resource isolated function get events/[string externalEventId](map headers = {}, *GetEventsExternalEventIdGetDetailsQueries queries) returns MarketingEventPublicReadResponse|error { + string resourcePath = string `/events/${getEncodedUri(externalEventId)}`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } resourcePath = resourcePath + check getPathForQueryParam(queries); - map httpHeaders = getMapForHeaders(headerValues); + map httpHeaders = http:getHeaderMap(headerValues); return self.clientEp->get(resourcePath, httpHeaders); } - # Retrieve the application settings - # - # + appId - The id of the application to retrieve the settings for. - # + headers - Headers to be sent with the request - # + return - successful operation - remote isolated function getAppidSettings_getall(int:Signed32 appId, map headers = {}) returns EventDetailSettings|error { - string resourcePath = string `/${getEncodedUri(appId)}/settings`; - map queryParam = {}; - if self.apiKeyConfig is ApiKeysConfig { - queryParam["hapikey"] = self.apiKeyConfig?.hapikey; - } - resourcePath = resourcePath + check getPathForQueryParam(queryParam); - return self.clientEp->get(resourcePath, headers); - } - - # Get lists associated with a marketing event + # Create or update a marketing event # - # + externalAccountId - The accountId that is associated with this marketing event in the external event application - # + externalEventId - The id of the marketing event in the external event application. + # + externalEventId - The id of the marketing event in the external event application # + headers - Headers to be sent with the request # + return - successful operation - remote isolated function getAssociationsExternalaccountidExternaleventidLists_getallbyexternalaccountandeventids(string externalAccountId, string externalEventId, map headers = {}) returns CollectionResponseWithTotalPublicListNoPaging|error { - string resourcePath = string `/associations/${getEncodedUri(externalAccountId)}/${getEncodedUri(externalEventId)}/lists`; + resource isolated function put events/[string externalEventId](MarketingEventCreateRequestParams payload, map headers = {}) returns MarketingEventPublicDefaultResponse|error { + string resourcePath = string `/events/${getEncodedUri(externalEventId)}`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - map httpHeaders = getMapForHeaders(headerValues); - return self.clientEp->get(resourcePath, httpHeaders); + map httpHeaders = http:getHeaderMap(headerValues); + http:Request request = new; + json jsonBody = payload.toJson(); + request.setPayload(jsonBody, "application/json"); + return self.clientEp->put(resourcePath, request, httpHeaders); } - # Get lists associated with a marketing event + # Delete Marketing Event by External Ids # - # + marketingEventId - The internal id of the marketing event in HubSpot. + # + externalEventId - The id of the marketing event in the external event application # + headers - Headers to be sent with the request - # + return - successful operation - remote isolated function getAssociationsMarketingeventidLists_getallbymarketingeventid(string marketingEventId, map headers = {}) returns CollectionResponseWithTotalPublicListNoPaging|error { - string resourcePath = string `/associations/${getEncodedUri(marketingEventId)}/lists`; + # + queries - Queries to be sent with the request + # + return - No content + resource isolated function delete events/[string externalEventId](map headers = {}, *DeleteEventsExternalEventIdArchiveQueries queries) returns error? { + string resourcePath = string `/events/${getEncodedUri(externalEventId)}`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - map httpHeaders = getMapForHeaders(headerValues); - return self.clientEp->get(resourcePath, httpHeaders); + resourcePath = resourcePath + check getPathForQueryParam(queries); + map httpHeaders = http:getHeaderMap(headerValues); + return self.clientEp->delete(resourcePath, headers = httpHeaders); } - # Get Marketing Event by External IDs + # Update Marketing Event by External IDs # # + externalEventId - The id of the marketing event in the external event application # + headers - Headers to be sent with the request # + queries - Queries to be sent with the request # + return - successful operation - remote isolated function getEventsExternaleventid_getdetails(string externalEventId, map headers = {}, *GetEventsExternaleventid_getdetailsQueries queries) returns MarketingEventPublicReadResponse|error { + resource isolated function patch events/[string externalEventId](MarketingEventUpdateRequestParams payload, map headers = {}, *PatchEventsExternalEventIdUpdateQueries queries) returns MarketingEventPublicDefaultResponse|error { string resourcePath = string `/events/${getEncodedUri(externalEventId)}`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } resourcePath = resourcePath + check getPathForQueryParam(queries); - map httpHeaders = getMapForHeaders(headerValues); - return self.clientEp->get(resourcePath, httpHeaders); + 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); } - # Find App-Specific Marketing Events by External Event Id + # Create or Update Multiple Marketing Events # # + headers - Headers to be sent with the request - # + queries - Queries to be sent with the request # + return - successful operation - remote isolated function getEventsSearch_dosearch(map headers = {}, *GetEventsSearch_dosearchQueries queries) returns CollectionResponseSearchPublicResponseWrapperNoPaging|error { - string resourcePath = string `/events/search`; + resource isolated function post events/upsert(BatchInputMarketingEventCreateRequestParams payload, map headers = {}) returns BatchResponseMarketingEventPublicDefaultResponse|error { + string resourcePath = string `/events/upsert`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; + } + 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); + } + + resource isolated function post attendance/[string externalEventId]/[string subscriberState]/email\-create(BatchInputMarketingEventEmailSubscriber payload, map headers = {}, *PostAttendanceExternalEventIdSubscriberStateEmailCreateRecordByContactEmailsQueries queries) returns BatchResponseSubscriberEmailResponse|error { + string resourcePath = string `/attendance/${getEncodedUri(externalEventId)}/${getEncodedUri(subscriberState)}/email-create`; + map headerValues = {...headers}; + if self.apiKeyConfig is ApiKeysConfig { + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } resourcePath = resourcePath + check getPathForQueryParam(queries); - map httpHeaders = getMapForHeaders(headerValues); - return self.clientEp->get(resourcePath, httpHeaders); + 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); } - # Find Marketing Events by externalEventId + # Read participations breakdown by Marketing Event external identifier # - # + externalEventId - The id of the marketing event in the external event application. + # + externalAccountId - The accountId that is associated with this marketing event in the external event application + # + externalEventId - The id of the marketing event in the external event application # + headers - Headers to be sent with the request + # + queries - Queries to be sent with the request # + return - successful operation - remote isolated function getExternaleventidIdentifiers(string externalEventId, map headers = {}) returns CollectionResponseWithTotalMarketingEventIdentifiersResponseNoPaging|error { - string resourcePath = string `/${getEncodedUri(externalEventId)}/identifiers`; + resource isolated function get participations/[string externalAccountId]/[string externalEventId]/breakdown(map headers = {}, *GetParticipationsExternalAccountIdExternalEventIdBreakdownGetParticipationsBreakdownByExternalEventIdQueries queries) returns CollectionResponseWithTotalParticipationBreakdownForwardPaging|error { + string resourcePath = string `/participations/${getEncodedUri(externalAccountId)}/${getEncodedUri(externalEventId)}/breakdown`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - map httpHeaders = getMapForHeaders(headerValues); + resourcePath = resourcePath + check getPathForQueryParam(queries); + map httpHeaders = http:getHeaderMap(headerValues); return self.clientEp->get(resourcePath, httpHeaders); } @@ -242,250 +223,219 @@ public isolated client class Client { # + objectId - The internal ID of the marketing event in HubSpot # + headers - Headers to be sent with the request # + return - successful operation - remote isolated function getObjectid(string objectId, map headers = {}) returns MarketingEventPublicReadResponseV2|error { + resource isolated function get [string objectId](map headers = {}) returns MarketingEventPublicReadResponseV2|error { string resourcePath = string `/${getEncodedUri(objectId)}`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - map httpHeaders = getMapForHeaders(headerValues); + map httpHeaders = http:getHeaderMap(headerValues); return self.clientEp->get(resourcePath, httpHeaders); } - # Read participations breakdown by Contact identifier + # Delete Marketing Event by objectId # - # + contactIdentifier - The identifier of the Contact. It may be email or internal id. + # + objectId - The internal ID of the marketing event in HubSpot # + headers - Headers to be sent with the request - # + queries - Queries to be sent with the request - # + return - successful operation - remote isolated function getParticipationsContactsContactidentifierBreakdown_getparticipationsbreakdownbycontactid(string contactIdentifier, map headers = {}, *GetParticipationsContactsContactidentifierBreakdown_getparticipationsbreakdownbycontactidQueries queries) returns CollectionResponseWithTotalParticipationBreakdownForwardPaging|error { - string resourcePath = string `/participations/contacts/${getEncodedUri(contactIdentifier)}/breakdown`; + # + return - No content + resource isolated function delete [string objectId](map headers = {}) returns error? { + string resourcePath = string `/${getEncodedUri(objectId)}`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - resourcePath = resourcePath + check getPathForQueryParam(queries); - map httpHeaders = getMapForHeaders(headerValues); - return self.clientEp->get(resourcePath, httpHeaders); + map httpHeaders = http:getHeaderMap(headerValues); + return self.clientEp->delete(resourcePath, headers = httpHeaders); } - # Read participations breakdown by Marketing Event external identifier + # Update Marketing Event by objectId # - # + externalAccountId - The accountId that is associated with this marketing event in the external event application. - # + externalEventId - The id of the marketing event in the external event application. + # + objectId - The internal ID of the marketing event in HubSpot # + headers - Headers to be sent with the request - # + queries - Queries to be sent with the request # + return - successful operation - remote isolated function getParticipationsExternalaccountidExternaleventidBreakdown_getparticipationsbreakdownbyexternaleventid(string externalAccountId, string externalEventId, map headers = {}, *GetParticipationsExternalaccountidExternaleventidBreakdown_getparticipationsbreakdownbyexternaleventidQueries queries) returns CollectionResponseWithTotalParticipationBreakdownForwardPaging|error { - string resourcePath = string `/participations/${getEncodedUri(externalAccountId)}/${getEncodedUri(externalEventId)}/breakdown`; + resource isolated function patch [string objectId](MarketingEventPublicUpdateRequestV2 payload, map headers = {}) returns MarketingEventPublicDefaultResponseV2|error { + string resourcePath = string `/${getEncodedUri(objectId)}`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - resourcePath = resourcePath + check getPathForQueryParam(queries); - map httpHeaders = getMapForHeaders(headerValues); - return self.clientEp->get(resourcePath, httpHeaders); + 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); } - # Read participations counters by Marketing Event external identifier + # Get lists associated with a marketing event # - # + externalAccountId - The accountId that is associated with this marketing event in the external event application. - # + externalEventId - The id of the marketing event in the external event application. + # + externalAccountId - The accountId that is associated with this marketing event in the external event application + # + externalEventId - The id of the marketing event in the external event application # + headers - Headers to be sent with the request # + return - successful operation - remote isolated function getParticipationsExternalaccountidExternaleventid_getparticipationscountersbyeventexternalid(string externalAccountId, string externalEventId, map headers = {}) returns AttendanceCounters|error { - string resourcePath = string `/participations/${getEncodedUri(externalAccountId)}/${getEncodedUri(externalEventId)}`; + resource isolated function get associations/[string externalAccountId]/[string externalEventId]/lists(map headers = {}) returns CollectionResponseWithTotalPublicListNoPaging|error { + string resourcePath = string `/associations/${getEncodedUri(externalAccountId)}/${getEncodedUri(externalEventId)}/lists`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - map httpHeaders = getMapForHeaders(headerValues); + map httpHeaders = http:getHeaderMap(headerValues); return self.clientEp->get(resourcePath, httpHeaders); } - # Read participations breakdown by Marketing Event internal identifier + # Get lists associated with a marketing event # - # + marketingEventId - The internal id of the marketing event in HubSpot. + # + marketingEventId - The internal id of the marketing event in HubSpot # + headers - Headers to be sent with the request - # + queries - Queries to be sent with the request # + return - successful operation - remote isolated function getParticipationsMarketingeventidBreakdown_getparticipationsbreakdownbymarketingeventid(int marketingEventId, map headers = {}, *GetParticipationsMarketingeventidBreakdown_getparticipationsbreakdownbymarketingeventidQueries queries) returns CollectionResponseWithTotalParticipationBreakdownForwardPaging|error { - string resourcePath = string `/participations/${getEncodedUri(marketingEventId)}/breakdown`; + resource isolated function get associations/[string marketingEventId]/lists(map headers = {}) returns CollectionResponseWithTotalPublicListNoPaging|error { + string resourcePath = string `/associations/${getEncodedUri(marketingEventId)}/lists`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - resourcePath = resourcePath + check getPathForQueryParam(queries); - map httpHeaders = getMapForHeaders(headerValues); + map httpHeaders = http:getHeaderMap(headerValues); return self.clientEp->get(resourcePath, httpHeaders); } - # Read participations counters by Marketing Event internal identifier - # - # + marketingEventId - The internal id of the marketing event in HubSpot. - # + headers - Headers to be sent with the request - # + return - successful operation - remote isolated function getParticipationsMarketingeventid_getparticipationscountersbymarketingeventid(int marketingEventId, map headers = {}) returns AttendanceCounters|error { - string resourcePath = string `/participations/${getEncodedUri(marketingEventId)}`; + resource isolated function post [string objectId]/attendance/[string subscriberState]/email\-create(BatchInputMarketingEventEmailSubscriber payload, map headers = {}) returns BatchResponseSubscriberEmailResponse|error { + string resourcePath = string `/${getEncodedUri(objectId)}/attendance/${getEncodedUri(subscriberState)}/email-create`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - map httpHeaders = getMapForHeaders(headerValues); - return self.clientEp->get(resourcePath, httpHeaders); + 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 Marketing Event by External IDs + # Get all marketing event # - # + externalEventId - The id of the marketing event in the external event application - # + payload - Payload to update the marketing event # + headers - Headers to be sent with the request # + queries - Queries to be sent with the request # + return - successful operation - remote isolated function patchEventsExternaleventid_update(string externalEventId, MarketingEventUpdateRequestParams payload, map headers = {}, *PatchEventsExternaleventid_updateQueries queries) returns MarketingEventPublicDefaultResponse|error { - string resourcePath = string `/events/${getEncodedUri(externalEventId)}`; + resource isolated function get .(map headers = {}, *GetQueries queries) returns CollectionResponseMarketingEventPublicReadResponseV2ForwardPaging|error { + string resourcePath = string `/`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } resourcePath = resourcePath + check getPathForQueryParam(queries); - map httpHeaders = getMapForHeaders(headerValues); - http:Request request = new; - json jsonBody = payload.toJson(); - request.setPayload(jsonBody, "application/json"); - return self.clientEp->patch(resourcePath, request, httpHeaders); + map httpHeaders = http:getHeaderMap(headerValues); + return self.clientEp->get(resourcePath, httpHeaders); } - # Update Marketing Event by objectId + # Update Multiple Marketing Events by ObjectId # - # + objectId - The internal ID of the marketing event in HubSpot - # + payload - Payload to update the marketing event - # + headers - Headers to be sent with the request - # + return - successful operation - remote isolated function patchObjectid(string objectId, MarketingEventPublicUpdateRequestV2 payload, map headers = {}) returns MarketingEventPublicDefaultResponseV2|error { - string resourcePath = string `/${getEncodedUri(objectId)}`; + # + headers - Headers to be sent with the request + # + return - successful operation + resource isolated function post batch/update(BatchInputMarketingEventPublicUpdateRequestFullV2 payload, map headers = {}) returns BatchResponseMarketingEventPublicDefaultResponseV2|BatchResponseMarketingEventPublicDefaultResponseV2WithErrors|error { + string resourcePath = string `/batch/update`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - 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); + return self.clientEp->post(resourcePath, request, httpHeaders); } - # Update the application settings + # Record Participants by ContactId with Marketing Event Object Id # - # + appId - The id of the application to update the settings for. - # + payload - payload to update the settings - # + headers - Headers to be sent with the request - # + return - successful operation - remote isolated function postAppidSettings_update(int:Signed32 appId, EventDetailSettingsUrl payload, map headers = {}) returns EventDetailSettings|error { - string resourcePath = string `/${getEncodedUri(appId)}/settings`; - map queryParam = {}; + # + objectId - The internal id of the marketing event in HubSpot + # + subscriberState - The attendance state value. It may be 'register', 'attend' or 'cancel' + # + headers - Headers to be sent with the request + # + return - successful operation + resource isolated function post [string objectId]/attendance/[string subscriberState]/create(BatchInputMarketingEventSubscriber payload, map headers = {}) returns BatchResponseSubscriberVidResponse|error { + string resourcePath = string `/${getEncodedUri(objectId)}/attendance/${getEncodedUri(subscriberState)}/create`; + map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - queryParam["hapikey"] = self.apiKeyConfig?.hapikey; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - resourcePath = resourcePath + check getPathForQueryParam(queryParam); + map httpHeaders = http:getHeaderMap(headerValues); http:Request request = new; json jsonBody = payload.toJson(); request.setPayload(jsonBody, "application/json"); - return self.clientEp->post(resourcePath, request, headers); + return self.clientEp->post(resourcePath, request, httpHeaders); } - # Record Participants by ContactId with Marketing Event External Ids + # Delete Multiple Marketing Events by ObjectId # - # + externalEventId - The id of the marketing event in the external event application - # + subscriberState - The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'. - # + payload - Payload to record the subscriber state by contact id - # + headers - Headers to be sent with the request - # + queries - Queries to be sent with the request - # + return - successful operation - remote isolated function postAttendanceExternaleventidSubscriberstateCreate_recordbycontactids(string externalEventId, string subscriberState, BatchInputMarketingEventSubscriber payload, map headers = {}, *PostAttendanceExternaleventidSubscriberstateCreate_recordbycontactidsQueries queries) returns BatchResponseSubscriberVidResponse|error { - string resourcePath = string `/attendance/${getEncodedUri(externalEventId)}/${getEncodedUri(subscriberState)}/create`; + # + headers - Headers to be sent with the request + # + return - No content + resource isolated function post batch/archive(BatchInputMarketingEventPublicObjectIdDeleteRequest payload, map headers = {}) returns error? { + string resourcePath = string `/batch/archive`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - 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); } - # Record Participants by Email with Marketing Event External Ids + # Read participations counters by Marketing Event external identifier # - # + externalEventId - The id of the marketing event in the external event application - # + subscriberState - The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'. - # + payload - Payload to record the subscriber state by email - # + headers - Headers to be sent with the request - # + queries - Queries to be sent with the request - # + return - successful operation - remote isolated function postAttendanceExternaleventidSubscriberstateEmailCreate_recordbycontactemails(string externalEventId, string subscriberState, BatchInputMarketingEventEmailSubscriber payload, map headers = {}, *PostAttendanceExternaleventidSubscriberstateEmailCreate_recordbycontactemailsQueries queries) returns BatchResponseSubscriberEmailResponse|error { - string resourcePath = string `/attendance/${getEncodedUri(externalEventId)}/${getEncodedUri(subscriberState)}/email-create`; + # + externalAccountId - The accountId that is associated with this marketing event in the external event application + # + externalEventId - The id of the marketing event in the external event application + # + headers - Headers to be sent with the request + # + return - successful operation + resource isolated function get participations/[string externalAccountId]/[string externalEventId](map headers = {}) returns AttendanceCounters|error { + string resourcePath = string `/participations/${getEncodedUri(externalAccountId)}/${getEncodedUri(externalEventId)}`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - resourcePath = resourcePath + check getPathForQueryParam(queries); - 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 httpHeaders = http:getHeaderMap(headerValues); + return self.clientEp->get(resourcePath, httpHeaders); } - # Delete Multiple Marketing Events by ObjectId + # Find Marketing Events by externalEventId # - # + payload - Payload to delete multiple marketing events by object id - # + headers - Headers to be sent with the request - # + return - No content - remote isolated function postBatchArchive(BatchInputMarketingEventPublicObjectIdDeleteRequest payload, map headers = {}) returns http:Response|error { - string resourcePath = string `/batch/archive`; + # + externalEventId - The id of the marketing event in the external event application + # + headers - Headers to be sent with the request + # + return - successful operation + resource isolated function get [string externalEventId]/identifiers(map headers = {}) returns CollectionResponseWithTotalMarketingEventIdentifiersResponseNoPaging|error { + string resourcePath = string `/${getEncodedUri(externalEventId)}/identifiers`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - 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 httpHeaders = http:getHeaderMap(headerValues); + return self.clientEp->get(resourcePath, httpHeaders); } - # Update Multiple Marketing Events by ObjectId + # Read participations counters by Marketing Event internal identifier # - # + payload - Payload to update multiple marketing events by object id - # + headers - Headers to be sent with the request - # + return - successful operation - remote isolated function postBatchUpdate(BatchInputMarketingEventPublicUpdateRequestFullV2 payload, map headers = {}) returns BatchResponseMarketingEventPublicDefaultResponseV2|BatchResponseMarketingEventPublicDefaultResponseV2WithErrors|error { - string resourcePath = string `/batch/update`; + # + marketingEventId - The internal id of the marketing event in HubSpot + # + headers - Headers to be sent with the request + # + return - successful operation + resource isolated function get participations/[int marketingEventId](map headers = {}) returns AttendanceCounters|error { + string resourcePath = string `/participations/${getEncodedUri(marketingEventId)}`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - 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 httpHeaders = http:getHeaderMap(headerValues); + return self.clientEp->get(resourcePath, httpHeaders); } # Delete Multiple Marketing Events by External Ids # - # + payload - Payload to delete multiple marketing events by external id - # + headers - Headers to be sent with the request - # + return - An error occurred. - remote isolated function postEventsDelete_batcharchive(BatchInputMarketingEventExternalUniqueIdentifier payload, map headers = {}) returns http:Response|error { + # + headers - Headers to be sent with the request + # + return - An error occurred + resource isolated function post events/delete(BatchInputMarketingEventExternalUniqueIdentifier payload, map headers = {}) returns http:Response|error { string resourcePath = string `/events/delete`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - map httpHeaders = getMapForHeaders(headerValues); + map httpHeaders = http:getHeaderMap(headerValues); http:Request request = new; json jsonBody = payload.toJson(); request.setPayload(jsonBody, "application/json"); @@ -498,210 +448,200 @@ public isolated client class Client { # + headers - Headers to be sent with the request # + queries - Queries to be sent with the request # + return - successful operation - remote isolated function postEventsExternaleventidCancel_cancel(string externalEventId, map headers = {}, *PostEventsExternaleventidCancel_cancelQueries queries) returns MarketingEventDefaultResponse|error { + resource isolated function post events/[string externalEventId]/cancel(map headers = {}, *PostEventsExternalEventIdCancelCancelQueries queries) returns MarketingEventDefaultResponse|error { string resourcePath = string `/events/${getEncodedUri(externalEventId)}/cancel`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } resourcePath = resourcePath + check getPathForQueryParam(queries); - map httpHeaders = getMapForHeaders(headerValues); + map httpHeaders = http:getHeaderMap(headerValues); http:Request request = new; return self.clientEp->post(resourcePath, request, httpHeaders); } - # Mark a marketing event as completed + # Associate a list with a marketing event # - # + externalEventId - The id of the marketing event in the external event application. - # + payload - Payload to mark a marketing event as completed - # + headers - Headers to be sent with the request - # + queries - Queries to be sent with the request - # + return - successful operation - remote isolated function postEventsExternaleventidComplete_complete(string externalEventId, MarketingEventCompleteRequestParams payload, map headers = {}, *PostEventsExternaleventidComplete_completeQueries queries) returns MarketingEventDefaultResponse|error { - string resourcePath = string `/events/${getEncodedUri(externalEventId)}/complete`; + # + marketingEventId - The internal id of the marketing event in HubSpot + # + listId - The ILS ID of the list + # + headers - Headers to be sent with the request + # + return - No content + resource isolated function put associations/[string marketingEventId]/lists/[string listId](map headers = {}) returns error? { + string resourcePath = string `/associations/${getEncodedUri(marketingEventId)}/lists/${getEncodedUri(listId)}`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - 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); + return self.clientEp->put(resourcePath, request, httpHeaders); } - # Record a subscriber state by contact email + # Disassociate a list from a marketing event # - # + externalEventId - The id of the marketing event in the external event application - # + subscriberState - The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'. - # + payload - Payload to record the subscriber state by email - # + headers - Headers to be sent with the request - # + queries - Queries to be sent with the request - # + return - An error occurred. - remote isolated function postEventsExternaleventidSubscriberstateEmailUpsert_upsertbycontactemail(string externalEventId, string subscriberState, BatchInputMarketingEventEmailSubscriber payload, map headers = {}, *PostEventsExternaleventidSubscriberstateEmailUpsert_upsertbycontactemailQueries queries) returns http:Response|error { - string resourcePath = string `/events/${getEncodedUri(externalEventId)}/${getEncodedUri(subscriberState)}/email-upsert`; + # + marketingEventId - The internal id of the marketing event in HubSpot + # + listId - The ILS ID of the list + # + headers - Headers to be sent with the request + # + return - No content + resource isolated function delete associations/[string marketingEventId]/lists/[string listId](map headers = {}) returns error? { + string resourcePath = string `/associations/${getEncodedUri(marketingEventId)}/lists/${getEncodedUri(listId)}`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - resourcePath = resourcePath + check getPathForQueryParam(queries); - 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 httpHeaders = http:getHeaderMap(headerValues); + return self.clientEp->delete(resourcePath, headers = httpHeaders); } - # Record a subscriber state by contact ID - # - # + externalEventId - The id of the marketing event in the external event application - # + subscriberState - The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'. - # + payload - Payload to record the subscriber state by contact id - # + headers - Headers to be sent with the request - # + queries - Queries to be sent with the request - # + return - An error occurred. - remote isolated function postEventsExternaleventidSubscriberstateUpsert_upsertbycontactid(string externalEventId, string subscriberState, BatchInputMarketingEventSubscriber payload, map headers = {}, *PostEventsExternaleventidSubscriberstateUpsert_upsertbycontactidQueries queries) returns http:Response|error { - string resourcePath = string `/events/${getEncodedUri(externalEventId)}/${getEncodedUri(subscriberState)}/upsert`; + resource isolated function post events/[string externalEventId]/[string subscriberState]/email\-upsert(BatchInputMarketingEventEmailSubscriber payload, map headers = {}, *PostEventsExternalEventIdSubscriberStateEmailUpsertUpsertByContactEmailQueries queries) returns http:Response|error { + string resourcePath = string `/events/${getEncodedUri(externalEventId)}/${getEncodedUri(subscriberState)}/email-upsert`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } 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); } - # Create or Update Multiple Marketing Events + # Associate a list with a marketing event # - # + payload - Payload to create or update multiple marketing events - # + headers - Headers to be sent with the request - # + return - successful operation - remote isolated function postEventsUpsert_batchupsert(BatchInputMarketingEventCreateRequestParams payload, map headers = {}) returns BatchResponseMarketingEventPublicDefaultResponse|error { - string resourcePath = string `/events/upsert`; + # + externalAccountId - The accountId that is associated with this marketing event in the external event application + # + externalEventId - The id of the marketing event in the external event application + # + listId - The ILS ID of the list + # + headers - Headers to be sent with the request + # + return - No content + resource isolated function put associations/[string externalAccountId]/[string externalEventId]/lists/[string listId](map headers = {}) returns error? { + string resourcePath = string `/associations/${getEncodedUri(externalAccountId)}/${getEncodedUri(externalEventId)}/lists/${getEncodedUri(listId)}`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - 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); + return self.clientEp->put(resourcePath, request, httpHeaders); } - # Create a marketing event + # Disassociate a list from a marketing event # - # + payload - Payload to create a marketing event - # + headers - Headers to be sent with the request - # + return - successful operation - remote isolated function postEvents_create(MarketingEventCreateRequestParams payload, map headers = {}) returns MarketingEventDefaultResponse|error { - string resourcePath = string `/events`; + # + externalAccountId - The accountId that is associated with this marketing event in the external event application + # + externalEventId - The id of the marketing event in the external event application + # + listId - The ILS ID of the list + # + headers - Headers to be sent with the request + # + return - No content + resource isolated function delete associations/[string externalAccountId]/[string externalEventId]/lists/[string listId](map headers = {}) returns error? { + string resourcePath = string `/associations/${getEncodedUri(externalAccountId)}/${getEncodedUri(externalEventId)}/lists/${getEncodedUri(listId)}`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - 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 httpHeaders = http:getHeaderMap(headerValues); + return self.clientEp->delete(resourcePath, headers = httpHeaders); } - # Record Participants by ContactId with Marketing Event Object Id + # Mark a marketing event as completed # - # + objectId - The internal id of the marketing event in HubSpot - # + subscriberState - The attendance state value. It may be 'register', 'attend' or 'cancel' - # + payload - Payload to record the subscriber state by contact id - # + headers - Headers to be sent with the request - # + return - successful operation - remote isolated function postObjectidAttendanceSubscriberstateCreate(string objectId, string subscriberState, BatchInputMarketingEventSubscriber payload, map headers = {}) returns BatchResponseSubscriberVidResponse|error { - string resourcePath = string `/${getEncodedUri(objectId)}/attendance/${getEncodedUri(subscriberState)}/create`; + # + externalEventId - The id of the marketing event in the external event application + # + headers - Headers to be sent with the request + # + queries - Queries to be sent with the request + # + return - successful operation + resource isolated function post events/[string externalEventId]/complete(MarketingEventCompleteRequestParams payload, map headers = {}, *PostEventsExternalEventIdCompleteCompleteQueries queries) returns MarketingEventDefaultResponse|error { + string resourcePath = string `/events/${getEncodedUri(externalEventId)}/complete`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - map httpHeaders = getMapForHeaders(headerValues); + 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); } - # Record Participants by Email with Marketing Event Object Id + # Create a marketing event # - # + objectId - The internal ID of the marketing event in HubSpot - # + subscriberState - The attendance state value. It may be 'register', 'attend' or 'cancel' - # + payload - Payload to record the subscriber state by email - # + headers - Headers to be sent with the request - # + return - successful operation - remote isolated function postObjectidAttendanceSubscriberstateEmailCreate(string objectId, string subscriberState, BatchInputMarketingEventEmailSubscriber payload, map headers = {}) returns BatchResponseSubscriberEmailResponse|error { - string resourcePath = string `/${getEncodedUri(objectId)}/attendance/${getEncodedUri(subscriberState)}/email-create`; + # + headers - Headers to be sent with the request + # + return - successful operation + resource isolated function post events(MarketingEventCreateRequestParams payload, map headers = {}) returns MarketingEventDefaultResponse|error { + string resourcePath = string `/events`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - 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); } - # Associate a list with a marketing event + # Read participations breakdown by Contact identifier # - # + externalAccountId - The accountId that is associated with this marketing event in the external event application. - # + externalEventId - The id of the marketing event in the external event application. - # + listId - The ILS ID of the list. + # + contactIdentifier - The identifier of the Contact. It may be email or internal id # + headers - Headers to be sent with the request - # + return - No content - remote isolated function putAssociationsExternalaccountidExternaleventidListsListid_associatebyexternalaccountandeventids(string externalAccountId, string externalEventId, string listId, map headers = {}) returns http:Response|error { - string resourcePath = string `/associations/${getEncodedUri(externalAccountId)}/${getEncodedUri(externalEventId)}/lists/${getEncodedUri(listId)}`; + # + queries - Queries to be sent with the request + # + return - successful operation + resource isolated function get participations/contacts/[string contactIdentifier]/breakdown(map headers = {}, *GetParticipationsContactsContactIdentifierBreakdownGetParticipationsBreakdownByContactIdQueries queries) returns CollectionResponseWithTotalParticipationBreakdownForwardPaging|error { + string resourcePath = string `/participations/contacts/${getEncodedUri(contactIdentifier)}/breakdown`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - map httpHeaders = getMapForHeaders(headerValues); - http:Request request = new; - return self.clientEp->put(resourcePath, request, httpHeaders); + resourcePath = resourcePath + check getPathForQueryParam(queries); + map httpHeaders = http:getHeaderMap(headerValues); + return self.clientEp->get(resourcePath, httpHeaders); } - # Associate a list with a marketing event + # Retrieve the application settings # - # + marketingEventId - The internal id of the marketing event in HubSpot. - # + listId - The ILS ID of the list. + # + appId - The id of the application to retrieve the settings for # + headers - Headers to be sent with the request - # + return - No content - remote isolated function putAssociationsMarketingeventidListsListid_associatebymarketingeventid(string marketingEventId, string listId, map headers = {}) returns http:Response|error { - string resourcePath = string `/associations/${getEncodedUri(marketingEventId)}/lists/${getEncodedUri(listId)}`; - map headerValues = {...headers}; + # + return - successful operation + resource isolated function get [int:Signed32 appId]/settings(map headers = {}) returns EventDetailSettings|error { + string resourcePath = string `/${getEncodedUri(appId)}/settings`; + map queryParam = {}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + queryParam["hapikey"] = self.apiKeyConfig?.hapikey; } - map httpHeaders = getMapForHeaders(headerValues); - http:Request request = new; - return self.clientEp->put(resourcePath, request, httpHeaders); + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + return self.clientEp->get(resourcePath, headers); } - # Create or update a marketing event + # Update the application settings # - # + externalEventId - The id of the marketing event in the external event application - # + payload - Payload to create or update a marketing event - # + headers - Headers to be sent with the request - # + return - successful operation - remote isolated function putEventsExternaleventid_upsert(string externalEventId, MarketingEventCreateRequestParams payload, map headers = {}) returns MarketingEventPublicDefaultResponse|error { - string resourcePath = string `/events/${getEncodedUri(externalEventId)}`; - map headerValues = {...headers}; + # + appId - The id of the application to update the settings for + # + headers - Headers to be sent with the request + # + return - successful operation + resource isolated function post [int:Signed32 appId]/settings(EventDetailSettingsUrl payload, map headers = {}) returns EventDetailSettings|error { + string resourcePath = string `/${getEncodedUri(appId)}/settings`; + map queryParam = {}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + queryParam["hapikey"] = self.apiKeyConfig?.hapikey; } - map httpHeaders = getMapForHeaders(headerValues); + resourcePath = resourcePath + check getPathForQueryParam(queryParam); http:Request request = new; json jsonBody = payload.toJson(); request.setPayload(jsonBody, "application/json"); - return self.clientEp->put(resourcePath, request, httpHeaders); + return self.clientEp->post(resourcePath, request, headers); + } + + # Find App-Specific Marketing Events by External Event Id + # + # + headers - Headers to be sent with the request + # + queries - Queries to be sent with the request + # + return - successful operation + resource isolated function get events/search(map headers = {}, *GetEventsSearchDoSearchQueries queries) returns CollectionResponseSearchPublicResponseWrapperNoPaging|error { + string resourcePath = string `/events/search`; + map headerValues = {...headers}; + if self.apiKeyConfig is ApiKeysConfig { + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; + } + resourcePath = resourcePath + check getPathForQueryParam(queries); + map httpHeaders = http:getHeaderMap(headerValues); + return self.clientEp->get(resourcePath, httpHeaders); } } diff --git a/ballerina/types.bal b/ballerina/types.bal index b1e59c6..93783cc 100644 --- a/ballerina/types.bal +++ b/ballerina/types.bal @@ -1,7 +1,7 @@ // 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). +// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). // // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -19,148 +19,154 @@ import ballerina/http; -# Represents the Queries record for the operation: postAttendanceExternaleventidSubscriberstateCreate_recordbycontactids -public type PostAttendanceExternaleventidSubscriberstateCreate_recordbycontactidsQueries record { - # The accountId that is associated with this marketing event in the external event application - string externalAccountId?; +# Represents the Queries record for the operation: get-/participations/{externalAccountId}/{externalEventId}/breakdown_getParticipationsBreakdownByExternalEventId +public type GetParticipationsExternalAccountIdExternalEventIdBreakdownGetParticipationsBreakdownByExternalEventIdQueries record { + # The identifier of the Contact. It may be email or internal id + string contactIdentifier?; + # The limit for response size. The default value is 10, the max number is 100 + int:Signed32 'limit = 10; + # The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW + string state?; + # The cursor indicating the position of the last retrieved item + string after?; }; public type MarketingEventCompleteRequestParams record { - string? startDateTime; - string? endDateTime; + string startDateTime; + string endDateTime; }; public type ParticipationProperties record { - int? occurredAt; - string? attendancePercentage?; + int occurredAt; + string attendancePercentage?; "REGISTERED"|"ATTENDED"|"CANCELLED"|"EMPTY"|"NO_SHOW" attendanceState; - int:Signed32? attendanceDurationSeconds?; + int:Signed32 attendanceDurationSeconds?; }; public type SubscriberEmailResponse record { - int? vid; - string? email; + int vid; + string email; +}; + +# Represents the Queries record for the operation: post-/events/{externalEventId}/cancel_cancel +public type PostEventsExternalEventIdCancelCancelQueries record { + # The accountId that is associated with this marketing event in the external event application + string externalAccountId; }; public type MarketingEventPublicReadResponse record { - # The number of HubSpot contacts that registered for this marketing event. - int:Signed32? registrants; - # The name of the organizer of the marketing event. - string? eventOrganizer; - # A URL in the external event application where the marketing event can be managed. - string? eventUrl?; - # The number of HubSpot contacts that attended this marketing event. - int:Signed32? attendees; - # The type of the marketing event. - string? eventType?; - boolean? eventCompleted?; - # The end date and time of the marketing event. - string? endDateTime?; - # The number of HubSpot contacts that registered for this marketing event, but did not attend. This field only had a value when the event is over. - int:Signed32? noShows; - # The number of HubSpot contacts that registered for this marketing event, but later cancelled their registration. - int:Signed32? cancellations; - # - string? createdAt; - # The start date and time of the marketing event. - string? startDateTime?; + # The number of HubSpot contacts that registered for this marketing event + int:Signed32 registrants; + # The name of the organizer of the marketing event + string eventOrganizer; + # A URL in the external event application where the marketing event can be managed + string eventUrl?; + # The number of HubSpot contacts that attended this marketing event + int:Signed32 attendees; + # The type of the marketing event + string eventType?; + boolean eventCompleted?; + # The end date and time of the marketing event + string endDateTime?; + # The number of HubSpot contacts that registered for this marketing event, but did not attend. This field only had a value when the event is over + int:Signed32 noShows; + # The number of HubSpot contacts that registered for this marketing event, but later cancelled their registration + int:Signed32 cancellations; + # + string createdAt; + # The start date and time of the marketing event + string startDateTime?; # A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. - # In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts. - CrmPropertyWrapper[]? customProperties?; - # Indicates if the marketing event has been cancelled. - boolean? eventCancelled?; - # The id of the marketing event in the external event application. - string? externalEventId; - # The description of the marketing event. - string? eventDescription?; - # The name of the marketing event. - string? eventName; - # - string? id; - string? objectId?; - # - string? updatedAt; + # In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts + CrmPropertyWrapper[] customProperties?; + # Indicates if the marketing event has been cancelled + boolean eventCancelled?; + # The id of the marketing event in the external event application + string externalEventId; + # The description of the marketing event + string eventDescription?; + # The name of the marketing event + string eventName; + # + string id; + string objectId?; + # + string updatedAt; }; public type MarketingEventAssociation record { - string? externalAccountId?; - string? marketingEventId; - string? externalEventId?; - string? name; + string externalAccountId?; + string marketingEventId; + string externalEventId?; + string name; }; public type ErrorDetail record { # A specific category that contains more specific detail about the error - string? subCategory?; + 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. - string? 'in?; + string code?; + # The name of the field or parameter in which the error was found + string 'in?; # Context about the error condition - record {|string[]?...;|}? context?; + record {|string[]...;|} context?; # A human readable message describing the error along with remediation steps where appropriate - string? message; + string message; }; public type MarketingEventEmailSubscriber record { - record {|string?...;|}? contactProperties?; - record {|string?...;|}? properties?; - # The email address of the contact in HubSpot to associate with the event. - string? email; - # Timestamp in milliseconds at which the contact subscribed to the event. - int? interactionDateTime; + record {|string...;|} contactProperties?; + record {|string...;|} properties?; + # The email address of the contact in HubSpot to associate with the event + string email; + # Timestamp in milliseconds at which the contact subscribed to the event + int interactionDateTime; }; public type ForwardPaging record { - NextPage? next?; + NextPage next?; }; -public type PublicList record { - string? processingType; - string? objectTypeId; - string? updatedById?; - string? filtersUpdatedAt?; - string? listId; - string? createdAt?; - string? processingStatus; - string? deletedAt?; - int:Signed32? listVersion; - int? size?; - string? name; - string? createdById?; - string? updatedAt?; -}; - -# Represents the Queries record for the operation: getParticipationsExternalaccountidExternaleventidBreakdown_getparticipationsbreakdownbyexternaleventid -public type GetParticipationsExternalaccountidExternaleventidBreakdown_getparticipationsbreakdownbyexternaleventidQueries record { - # The identifier of the Contact. It may be email or internal id. - string contactIdentifier?; - # The limit for response size. The default value is 10, the max number is 100 - int:Signed32 'limit = 10; - # The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW - string state?; - # The cursor indicating the position of the last retrieved item. - string after?; +# Represents the Queries record for the operation: post-/events/{externalEventId}/complete_complete +public type PostEventsExternalEventIdCompleteCompleteQueries record { + # The accountId that is associated with this marketing event in the external event application + string externalAccountId; }; -# Represents the Queries record for the operation: patchEventsExternaleventid_update -public type PatchEventsExternaleventid_updateQueries record { +public type PublicList record { + string processingType; + string objectTypeId; + string updatedById?; + string filtersUpdatedAt?; + string listId; + string createdAt?; + string processingStatus; + string deletedAt?; + int:Signed32 listVersion; + int size?; + string name; + string createdById?; + string updatedAt?; +}; + +# Represents the Queries record for the operation: patch-/events/{externalEventId}_update +public type PatchEventsExternalEventIdUpdateQueries record { # The accountId that is associated with this marketing event in the external event application string externalAccountId; }; public type MarketingEventExternalUniqueIdentifier record { - # The accountId that is associated with this marketing event in the external event application. - string? externalAccountId; - # The id of the marketing event in the external event application. - string? externalEventId; - # The id of the application that created the marketing event in HubSpot. - int:Signed32? appId; + # The accountId that is associated with this marketing event in the external event application + string externalAccountId; + # The id of the marketing event in the external event application + string externalEventId; + # The id of the application that created the marketing event in HubSpot + int:Signed32 appId; }; public type CrmPropertyWrapper record { - string? name; - string? value; + string name; + string value; }; # Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint. @@ -171,344 +177,350 @@ 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 SearchPublicResponseWrapper record { - string? externalAccountId; - string? externalEventId; - int:Signed32? appId; - string? objectId; + string externalAccountId; + string externalEventId; + int:Signed32 appId; + string objectId; }; public type SubscriberVidResponse record { - int? vid; -}; - -# Represents the Queries record for the operation: deleteEventsExternaleventid_archive -public type DeleteEventsExternaleventid_archiveQueries record { - # The accountId that is associated with this marketing event in the external event application - string externalAccountId; + int vid; }; -# Represents the Queries record for the operation: getParticipationsContactsContactidentifierBreakdown_getparticipationsbreakdownbycontactid -public type GetParticipationsContactsContactidentifierBreakdown_getparticipationsbreakdownbycontactidQueries record { +# Represents the Queries record for the operation: get-/participations/{marketingEventId}/breakdown_getParticipationsBreakdownByMarketingEventId +public type GetParticipationsMarketingEventIdBreakdownGetParticipationsBreakdownByMarketingEventIdQueries record { + # The identifier of the Contact. It may be email or internal id + string contactIdentifier?; # The limit for response size. The default value is 10, the max number is 100 int:Signed32 'limit = 10; # The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW string state?; - # The cursor indicating the position of the last retrieved item. + # The cursor indicating the position of the last retrieved item string after?; }; public type MarketingEventPublicUpdateRequestV2 record { - string? startDateTime?; - CrmPropertyWrapper[]? customProperties; - boolean? eventCancelled?; - string? eventOrganizer?; - string? eventUrl?; - string? eventDescription?; - string? eventName?; - string? eventType?; - string? endDateTime?; + string startDateTime?; + CrmPropertyWrapper[] customProperties; + boolean eventCancelled?; + string eventOrganizer?; + string eventUrl?; + string eventDescription?; + string eventName?; + string eventType?; + string endDateTime?; }; public type MarketingEventIdentifiersResponse record { - string? externalAccountId?; - string? externalEventId; - AppInfo? appInfo?; - string? objectId; - string? marketingEventName; + string externalAccountId?; + string externalEventId; + AppInfo appInfo?; + string objectId; + string marketingEventName; }; public type BatchInputMarketingEventExternalUniqueIdentifier record { - MarketingEventExternalUniqueIdentifier[]? inputs; + MarketingEventExternalUniqueIdentifier[] inputs; }; public type MarketingEventUpdateRequestParams record { - # The start date and time of the marketing event. - string? startDateTime?; + # The start date and time of the marketing event + string startDateTime?; # A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. - # In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts. - CrmPropertyWrapper[]? customProperties?; + # In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts + CrmPropertyWrapper[] customProperties?; # Indicates if the marketing event has been cancelled. Defaults to `false` - boolean? eventCancelled?; - # The name of the organizer of the marketing event. - string? eventOrganizer?; - # A URL in the external event application where the marketing event can be managed. - string? eventUrl?; - # The description of the marketing event. - string? eventDescription?; - # The name of the marketing event. - string? eventName?; + boolean eventCancelled?; + # The name of the organizer of the marketing event + string eventOrganizer?; + # A URL in the external event application where the marketing event can be managed + string eventUrl?; + # The description of the marketing event + string eventDescription?; + # The name of the marketing event + string eventName?; # Describes what type of event this is. For example: `WEBINAR`, `CONFERENCE`, `WORKSHOP` - string? eventType?; - boolean? eventCompleted?; - # The end date and time of the marketing event. - string? endDateTime?; + string eventType?; + boolean eventCompleted?; + # The end date and time of the marketing event + string endDateTime?; }; public type AppInfo record { - string? name; - string? id; + string name; + string id; }; -# Represents the Queries record for the operation: postEventsExternaleventidCancel_cancel -public type PostEventsExternaleventidCancel_cancelQueries record { - # The accountId that is associated with this marketing event in the external event application - string externalAccountId; +public type CollectionResponseWithTotalPublicListNoPaging record { + int:Signed32 total; + PublicList[] results; }; -public type CollectionResponseWithTotalPublicListNoPaging record { - int:Signed32? total; - PublicList[]? results; +# Represents the Queries record for the operation: delete-/events/{externalEventId}_archive +public type DeleteEventsExternalEventIdArchiveQueries record { + # The accountId that is associated with this marketing event in the external event application + string externalAccountId; }; public type ContactAssociation record { - string? firstname?; - string? contactId; - string? email; - string? lastname?; + string firstname?; + string contactId; + string email; + string lastname?; }; public type ParticipationBreakdown record { - ParticipationAssociations? associations; - string? createdAt; - string? id; - ParticipationProperties? properties; + ParticipationAssociations associations; + string createdAt; + string id; + ParticipationProperties properties; }; -# Represents the Queries record for the operation: postEventsExternaleventidSubscriberstateUpsert_upsertbycontactid -public type PostEventsExternaleventidSubscriberstateUpsert_upsertbycontactidQueries record { - # The accountId that is associated with this marketing event in the external event application - string externalAccountId; +# Represents the Queries record for the operation: get-/events/search_doSearch +public type GetEventsSearchDoSearchQueries record { + # The id of the marketing event in the external event application (externalEventId) + string q; }; public type MarketingEventPublicDefaultResponse record { - # The name of the organizer of the marketing event. - string? eventOrganizer; - # A URL in the external event application where the marketing event can be managed. - string? eventUrl?; - # The type of the marketing event. - string? eventType?; - boolean? eventCompleted?; - # The end date and time of the marketing event. - string? endDateTime?; - # - string? createdAt; - # The start date and time of the marketing event. - string? startDateTime?; + # The name of the organizer of the marketing event + string eventOrganizer; + # A URL in the external event application where the marketing event can be managed + string eventUrl?; + # The type of the marketing event + string eventType?; + boolean eventCompleted?; + # The end date and time of the marketing event + string endDateTime?; + # + string createdAt; + # The start date and time of the marketing event + string startDateTime?; # A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. - # In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts. - CrmPropertyWrapper[]? customProperties?; - # Indicates if the marketing event has been cancelled. - boolean? eventCancelled?; - # The description of the marketing event. - string? eventDescription?; - # The name of the marketing event. - string? eventName; - # - string? id; - string? objectId?; - # - string? updatedAt; + # In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts + CrmPropertyWrapper[] customProperties?; + # Indicates if the marketing event has been cancelled + boolean eventCancelled?; + # The description of the marketing event + string eventDescription?; + # The name of the marketing event + string eventName; + # + string id; + string objectId?; + # + string updatedAt; }; public type BatchResponseSubscriberVidResponse record { - string? completedAt; - int:Signed32? numErrors?; - string? requestedAt?; - string? startedAt; - record {|string?...;|}? links?; - SubscriberVidResponse[]? results; - StandardError[]? errors?; + string completedAt; + int:Signed32 numErrors?; + string requestedAt?; + string startedAt; + record {|string...;|} links?; + SubscriberVidResponse[] results; + StandardError[] errors?; "PENDING"|"PROCESSING"|"CANCELED"|"COMPLETE" status; }; public type MarketingEventDefaultResponse record { - # The start date and time of the marketing event. - string? startDateTime?; + # The start date and time of the marketing event + string startDateTime?; # A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. - # In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts. - CrmPropertyWrapper[]? customProperties?; - # Indicates if the marketing event has been cancelled. - boolean? eventCancelled?; - # The name of the organizer of the marketing event. - string? eventOrganizer; - # The URL in the external event application where the marketing event can be managed. - string? eventUrl?; - # The description of the marketing event. - string? eventDescription?; - # The name of the marketing event. - string? eventName; - # The type of the marketing event. - string? eventType?; - boolean? eventCompleted?; - # The end date and time of the marketing event. - string? endDateTime?; - string? objectId?; + # In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts + CrmPropertyWrapper[] customProperties?; + # Indicates if the marketing event has been cancelled + boolean eventCancelled?; + # The name of the organizer of the marketing event + string eventOrganizer; + # The URL in the external event application where the marketing event can be managed + string eventUrl?; + # The description of the marketing event + string eventDescription?; + # The name of the marketing event + string eventName; + # The type of the marketing event + string eventType?; + boolean eventCompleted?; + # The end date and time of the marketing event + string endDateTime?; + string objectId?; }; public type ParticipationAssociations record { - MarketingEventAssociation? marketingEvent; - ContactAssociation? contact; + MarketingEventAssociation marketingEvent; + ContactAssociation contact; }; public type BatchInputMarketingEventSubscriber record { # List of HubSpot contacts to subscribe to the marketing event - MarketingEventSubscriber[]? inputs; + MarketingEventSubscriber[] inputs; }; # Provides API key configurations needed when communicating with a remote HTTP endpoint. -# -# + hapikey - HubSpot Developer API Key -# + private\-app\-legacy - Key for Legacy HubSpot APIs public type ApiKeysConfig record {| string hapikey; - string private\-app\-legacy; + string privateAppLegacy; |}; -# Represents the Queries record for the operation: postEventsExternaleventidComplete_complete -public type PostEventsExternaleventidComplete_completeQueries record { - # The accountId that is associated with this marketing event in the external event application. +# Represents the Queries record for the operation: get-/events/{externalEventId}_getDetails +public type GetEventsExternalEventIdGetDetailsQueries record { + # The accountId that is associated with this marketing event in the external event application string externalAccountId; }; public type StandardError record { - # - record {}? subCategory?; - # - record {|string[]?...;|}? context; - # - record {|string?...;|}? links; - # - string? id?; - # - string? category; - # - string? message; - # - ErrorDetail[]? errors; - # - string? status; -}; - -# Represents the Queries record for the operation: getEventsSearch_dosearch -public type GetEventsSearch_dosearchQueries record { - # The id of the marketing event in the external event application (externalEventId) - string q; + # + record {} subCategory?; + # + record {|string[]...;|} context; + # + record {|string...;|} links; + # + string id?; + # + string category; + # + string message; + # + ErrorDetail[] errors; + # + string status; }; public type MarketingEventCreateRequestParams record { - # The start date and time of the marketing event. - string? startDateTime?; + # The start date and time of the marketing event + string startDateTime?; # A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. - # In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts. - CrmPropertyWrapper[]? customProperties?; - # The accountId that is associated with this marketing event in the external event application. - string? externalAccountId; + # In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts + CrmPropertyWrapper[] customProperties?; + # The accountId that is associated with this marketing event in the external event application + string externalAccountId; # Indicates if the marketing event has been cancelled. Defaults to `false` - boolean? eventCancelled?; - # The name of the organizer of the marketing event. - string? eventOrganizer; - # A URL in the external event application where the marketing event can be managed. - string? eventUrl?; - # The id of the marketing event in the external event application. - string? externalEventId; - # The description of the marketing event. - string? eventDescription?; - # The name of the marketing event. - string? eventName; + boolean eventCancelled?; + # The name of the organizer of the marketing event + string eventOrganizer; + # A URL in the external event application where the marketing event can be managed + string eventUrl?; + # The id of the marketing event in the external event application + string externalEventId; + # The description of the marketing event + string eventDescription?; + # The name of the marketing event + string eventName; # Describes what type of event this is. For example: `WEBINAR`, `CONFERENCE`, `WORKSHOP` - string? eventType?; - boolean? eventCompleted?; - # The end date and time of the marketing event. - string? endDateTime?; + string eventType?; + boolean eventCompleted?; + # The end date and time of the marketing event + string endDateTime?; }; public type BatchInputMarketingEventPublicUpdateRequestFullV2 record { - MarketingEventPublicUpdateRequestFullV2[]? inputs; + MarketingEventPublicUpdateRequestFullV2[] inputs; }; public type CollectionResponseWithTotalMarketingEventIdentifiersResponseNoPaging record { - int:Signed32? total; - MarketingEventIdentifiersResponse[]? results; + int:Signed32 total; + MarketingEventIdentifiersResponse[] results; }; public type EventDetailSettings record { # The id of the application the settings are for - int:Signed32? appId; + int:Signed32 appId; # The url that will be used to fetch marketing event details by id - string? eventDetailsUrl; + string eventDetailsUrl; }; -# Represents the Queries record for the operation: postAttendanceExternaleventidSubscriberstateEmailCreate_recordbycontactemails -public type PostAttendanceExternaleventidSubscriberstateEmailCreate_recordbycontactemailsQueries record { - # The accountId that is associated with this marketing event in the external event application - string externalAccountId?; +public type MarketingEventSubscriber record { + int vid; + record {|string...;|} properties?; + # Timestamp in milliseconds at which the contact subscribed to the event + int interactionDateTime; }; -public type MarketingEventSubscriber record { - int? vid; - record {|string?...;|}? properties?; - # Timestamp in milliseconds at which the contact subscribed to the event. - int? interactionDateTime; +# Represents the Queries record for the operation: post-/attendance/{externalEventId}/{subscriberState}/create_recordByContactIds +public type PostAttendanceExternalEventIdSubscriberStateCreateRecordByContactIdsQueries record { + # The accountId that is associated with this marketing event in the external event application + string externalAccountId?; }; public type EventDetailSettingsUrl record { # The url that will be used to fetch marketing event details by id. Must contain a `%s` character sequence that will be substituted with the event id. For example: `https://my.event.app/events/%s` - string? eventDetailsUrl; + string eventDetailsUrl; }; -public type MarketingEventPublicDefaultResponseV2 record { - string? eventOrganizer?; - string? eventUrl?; - AppInfo? appInfo?; - string? eventType?; - boolean? eventCompleted?; - string? endDateTime?; - string? createdAt; - string? startDateTime?; - CrmPropertyWrapper[]? customProperties; - boolean? eventCancelled?; - string? eventDescription?; - string? eventName; - string? objectId; - string? updatedAt; +# Represents the Queries record for the operation: get-/participations/contacts/{contactIdentifier}/breakdown_getParticipationsBreakdownByContactId +public type GetParticipationsContactsContactIdentifierBreakdownGetParticipationsBreakdownByContactIdQueries record { + # The limit for response size. The default value is 10, the max number is 100 + int:Signed32 'limit = 10; + # The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW + string state?; + # The cursor indicating the position of the last retrieved item + string after?; }; public type BatchInputMarketingEventEmailSubscriber record { # List of marketing event details to create or update - MarketingEventEmailSubscriber[]? inputs; + MarketingEventEmailSubscriber[] inputs; +}; + +public type MarketingEventPublicDefaultResponseV2 record { + string eventOrganizer?; + string eventUrl?; + AppInfo appInfo?; + string eventType?; + boolean eventCompleted?; + string endDateTime?; + string createdAt; + string startDateTime?; + CrmPropertyWrapper[] customProperties; + boolean eventCancelled?; + string eventDescription?; + string eventName; + string objectId; + string updatedAt; }; public type CollectionResponseMarketingEventPublicReadResponseV2ForwardPaging record { - ForwardPaging? paging?; - MarketingEventPublicReadResponseV2[]? results; + ForwardPaging paging?; + MarketingEventPublicReadResponseV2[] results; }; # OAuth2 Refresh Token Grant Configs @@ -518,178 +530,149 @@ public type OAuth2RefreshTokenGrantConfig record {| string refreshUrl = "https://api.hubapi.com/oauth/v1/token"; |}; -public type MarketingEventPublicUpdateRequestFullV2 record { - string? startDateTime?; - CrmPropertyWrapper[]? customProperties; - boolean? eventCancelled?; - string? eventOrganizer?; - string? eventUrl?; - string? eventDescription?; - string? eventName?; - string? eventType?; - string? endDateTime?; - string? objectId; -}; - -# Represents the Queries record for the operation: getEventsExternaleventid_getdetails -public type GetEventsExternaleventid_getdetailsQueries record { +# Represents the Queries record for the operation: post-/events/{externalEventId}/{subscriberState}/upsert_upsertByContactId +public type PostEventsExternalEventIdSubscriberStateUpsertUpsertByContactIdQueries record { # The accountId that is associated with this marketing event in the external event application string externalAccountId; }; -public type MarketingEventPublicReadResponseV2 record { - int:Signed32? registrants?; - string? eventOrganizer?; - string? eventUrl?; - int:Signed32? attendees?; - AppInfo? appInfo?; - string? eventType?; - boolean? eventCompleted?; - string? endDateTime?; - int:Signed32? noShows?; - int:Signed32? cancellations?; - string? createdAt; - string? startDateTime?; - CrmPropertyWrapper[]? customProperties; - boolean? eventCancelled?; - string? externalEventId?; - string? eventStatus?; - string? eventDescription?; - string? eventName; - string? objectId; - string? updatedAt; +public type MarketingEventPublicUpdateRequestFullV2 record { + string startDateTime?; + CrmPropertyWrapper[] customProperties; + boolean eventCancelled?; + string eventOrganizer?; + string eventUrl?; + string eventDescription?; + string eventName?; + string eventType?; + string endDateTime?; + string objectId; }; -public type BatchResponseMarketingEventPublicDefaultResponseV2WithErrors record { - string? completedAt; - int:Signed32? numErrors?; - string? requestedAt?; - string? startedAt; - record {|string?...;|}? links?; - MarketingEventPublicDefaultResponseV2[]? results; - StandardError[]? errors?; - "PENDING"|"PROCESSING"|"CANCELED"|"COMPLETE" status; +public type MarketingEventPublicReadResponseV2 record { + int:Signed32 registrants?; + string eventOrganizer?; + string eventUrl?; + int:Signed32 attendees?; + AppInfo appInfo?; + string eventType?; + boolean eventCompleted?; + string endDateTime?; + int:Signed32 noShows?; + int:Signed32 cancellations?; + string createdAt; + string startDateTime?; + CrmPropertyWrapper[] customProperties; + boolean eventCancelled?; + string externalEventId?; + string eventStatus?; + string eventDescription?; + string eventName; + string objectId; + string updatedAt; }; public type BatchInputMarketingEventCreateRequestParams record { - # - MarketingEventCreateRequestParams[]? inputs; + # + MarketingEventCreateRequestParams[] inputs; +}; + +public type BatchResponseMarketingEventPublicDefaultResponseV2WithErrors record { + string completedAt; + int:Signed32 numErrors?; + string requestedAt?; + string startedAt; + record {|string...;|} links?; + MarketingEventPublicDefaultResponseV2[] results; + StandardError[] errors?; + "PENDING"|"PROCESSING"|"CANCELED"|"COMPLETE" status; }; public type BatchInputMarketingEventPublicObjectIdDeleteRequest record { - MarketingEventPublicObjectIdDeleteRequest[]? inputs; + MarketingEventPublicObjectIdDeleteRequest[] inputs; }; public type CollectionResponseSearchPublicResponseWrapperNoPaging record { - SearchPublicResponseWrapper[]? results; -}; - -# 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 AttendanceCounters record { - int:Signed32? attended; - int:Signed32? registered; - int:Signed32? cancelled; - int:Signed32? noShows; + SearchPublicResponseWrapper[] results; }; public type BatchResponseSubscriberEmailResponse record { - string? completedAt; - int:Signed32? numErrors?; - string? requestedAt?; - string? startedAt; - record {|string?...;|}? links?; - SubscriberEmailResponse[]? results; - StandardError[]? errors?; + string completedAt; + int:Signed32 numErrors?; + string requestedAt?; + string startedAt; + record {|string...;|} links?; + SubscriberEmailResponse[] results; + StandardError[] errors?; "PENDING"|"PROCESSING"|"CANCELED"|"COMPLETE" status; }; -public type MarketingEventPublicObjectIdDeleteRequest record { - string? objectId; +public type AttendanceCounters record { + int:Signed32 attended; + int:Signed32 registered; + int:Signed32 cancelled; + int:Signed32 noShows; }; -# Represents the Queries record for the operation: getParticipationsMarketingeventidBreakdown_getparticipationsbreakdownbymarketingeventid -public type GetParticipationsMarketingeventidBreakdown_getparticipationsbreakdownbymarketingeventidQueries record { - # The identifier of the Contact. It may be email or internal id. - string contactIdentifier?; - # The limit for response size. The default value is 10, the max number is 100 - int:Signed32 'limit = 10; - # The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW - string state?; - # The cursor indicating the position of the last retrieved item. - string after?; +# Represents the Queries record for the operation: post-/attendance/{externalEventId}/{subscriberState}/email-create_recordByContactEmails +public type PostAttendanceExternalEventIdSubscriberStateEmailCreateRecordByContactEmailsQueries record { + # The accountId that is associated with this marketing event in the external event application + string externalAccountId?; }; -# 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 MarketingEventPublicObjectIdDeleteRequest record { + string objectId; +}; public type CollectionResponseWithTotalParticipationBreakdownForwardPaging record { - int:Signed32? total; - ForwardPaging? paging?; - ParticipationBreakdown[]? results; + int:Signed32 total; + ForwardPaging paging?; + ParticipationBreakdown[] results; }; public type BatchResponseMarketingEventPublicDefaultResponseV2 record { - string? completedAt; - string? requestedAt?; - string? startedAt; - record {|string?...;|}? links?; - MarketingEventPublicDefaultResponseV2[]? results; + string completedAt; + string requestedAt?; + string startedAt; + record {|string...;|} links?; + MarketingEventPublicDefaultResponseV2[] results; "PENDING"|"PROCESSING"|"CANCELED"|"COMPLETE" status; }; -# Represents the Queries record for the operation: get +# Represents the Queries record for the operation: get-/ public type GetQueries record { # The limit for response size. The default value is 10, the max number is 100 int:Signed32 'limit = 10; - # The cursor indicating the position of the last retrieved item. + # The cursor indicating the position of the last retrieved item string after?; }; -# Represents the Queries record for the operation: postEventsExternaleventidSubscriberstateEmailUpsert_upsertbycontactemail -public type PostEventsExternaleventidSubscriberstateEmailUpsert_upsertbycontactemailQueries record { - # The accountId that is associated with this marketing event in the external event application - string externalAccountId; -}; - public type NextPage record { - string? link?; - string? after; + string link?; + string after; }; public type BatchResponseMarketingEventPublicDefaultResponse record { - # - string? completedAt; - # - int:Signed32? numErrors?; - # - string? requestedAt?; - # - string? startedAt; - # - record {|string?...;|}? links?; - # - MarketingEventPublicDefaultResponse[]? results; - # - StandardError[]? errors?; - # + # + string completedAt; + # + int:Signed32 numErrors?; + # + string requestedAt?; + # + string startedAt; + # + record {|string...;|} links?; + # + MarketingEventPublicDefaultResponse[] results; + # + StandardError[] errors?; + # "PENDING"|"PROCESSING"|"CANCELED"|"COMPLETE" status; }; + +# Represents the Queries record for the operation: post-/events/{externalEventId}/{subscriberState}/email-upsert_upsertByContactEmail +public type PostEventsExternalEventIdSubscriberStateEmailUpsertUpsertByContactEmailQueries record { + # The accountId that is associated with this marketing event in the external event application + string externalAccountId; +}; diff --git a/ballerina/utils.bal b/ballerina/utils.bal index 5d8e591..3cbf6df 100644 --- a/ballerina/utils.bal +++ b/ballerina/utils.bal @@ -1,7 +1,7 @@ // 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). +// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). // // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -17,6 +17,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 +187,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 +217,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/docs/spec/openapi.json b/docs/spec/openapi.json index 40ac191..578eb6f 100644 --- a/docs/spec/openapi.json +++ b/docs/spec/openapi.json @@ -57,7 +57,7 @@ }, { "name" : "subscriberState", "in" : "path", - "description" : "The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'.", + "description" : "The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'", "required" : true, "style" : "simple", "explode" : false, @@ -116,7 +116,7 @@ "parameters" : [ { "name" : "marketingEventId", "in" : "path", - "description" : "The internal id of the marketing event in HubSpot.", + "description" : "The internal id of the marketing event in HubSpot", "required" : true, "style" : "simple", "explode" : false, @@ -127,7 +127,7 @@ }, { "name" : "contactIdentifier", "in" : "query", - "description" : "The identifier of the Contact. It may be email or internal id.", + "description" : "The identifier of the Contact. It may be email or internal id", "required" : false, "style" : "form", "explode" : true, @@ -159,7 +159,7 @@ }, { "name" : "after", "in" : "query", - "description" : "The cursor indicating the position of the last retrieved item.", + "description" : "The cursor indicating the position of the last retrieved item", "required" : false, "style" : "form", "explode" : true, @@ -208,7 +208,7 @@ }, { "name" : "subscriberState", "in" : "path", - "description" : "The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'.", + "description" : "The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'", "required" : true, "style" : "simple", "explode" : false, @@ -500,7 +500,7 @@ }, { "name" : "subscriberState", "in" : "path", - "description" : "The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'.", + "description" : "The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'", "required" : true, "style" : "simple", "explode" : false, @@ -559,7 +559,7 @@ "parameters" : [ { "name" : "externalAccountId", "in" : "path", - "description" : "The accountId that is associated with this marketing event in the external event application.", + "description" : "The accountId that is associated with this marketing event in the external event application", "required" : true, "style" : "simple", "explode" : false, @@ -569,7 +569,7 @@ }, { "name" : "externalEventId", "in" : "path", - "description" : "The id of the marketing event in the external event application.", + "description" : "The id of the marketing event in the external event application", "required" : true, "style" : "simple", "explode" : false, @@ -579,7 +579,7 @@ }, { "name" : "contactIdentifier", "in" : "query", - "description" : "The identifier of the Contact. It may be email or internal id.", + "description" : "The identifier of the Contact. It may be email or internal id", "required" : false, "style" : "form", "explode" : true, @@ -611,7 +611,7 @@ }, { "name" : "after", "in" : "query", - "description" : "The cursor indicating the position of the last retrieved item.", + "description" : "The cursor indicating the position of the last retrieved item", "required" : false, "style" : "form", "explode" : true, @@ -777,7 +777,7 @@ }, { "name" : "externalEventId", "in" : "path", - "description" : "The id of the marketing event in the external event application.", + "description" : "The id of the marketing event in the external event application", "required" : true, "style" : "simple", "explode" : false, @@ -816,7 +816,7 @@ "parameters" : [ { "name" : "marketingEventId", "in" : "path", - "description" : "The internal id of the marketing event in HubSpot.", + "description" : "The internal id of the marketing event in HubSpot", "required" : true, "style" : "simple", "explode" : false, @@ -914,7 +914,7 @@ "parameters" : [ { "name" : "after", "in" : "query", - "description" : "The cursor indicating the position of the last retrieved item.", + "description" : "The cursor indicating the position of the last retrieved item", "required" : false, "style" : "form", "explode" : true, @@ -1106,7 +1106,7 @@ "parameters" : [ { "name" : "externalAccountId", "in" : "path", - "description" : "The accountId that is associated with this marketing event in the external event application.", + "description" : "The accountId that is associated with this marketing event in the external event application", "required" : true, "style" : "simple", "explode" : false, @@ -1116,7 +1116,7 @@ }, { "name" : "externalEventId", "in" : "path", - "description" : "The id of the marketing event in the external event application.", + "description" : "The id of the marketing event in the external event application", "required" : true, "style" : "simple", "explode" : false, @@ -1155,7 +1155,7 @@ "parameters" : [ { "name" : "externalEventId", "in" : "path", - "description" : "The id of the marketing event in the external event application.", + "description" : "The id of the marketing event in the external event application", "required" : true, "style" : "simple", "explode" : false, @@ -1194,7 +1194,7 @@ "parameters" : [ { "name" : "marketingEventId", "in" : "path", - "description" : "The internal id of the marketing event in HubSpot.", + "description" : "The internal id of the marketing event in HubSpot", "required" : true, "style" : "simple", "explode" : false, @@ -1312,7 +1312,7 @@ "parameters" : [ { "name" : "marketingEventId", "in" : "path", - "description" : "The internal id of the marketing event in HubSpot.", + "description" : "The internal id of the marketing event in HubSpot", "required" : true, "style" : "simple", "explode" : false, @@ -1322,7 +1322,7 @@ }, { "name" : "listId", "in" : "path", - "description" : "The ILS ID of the list.", + "description" : "The ILS ID of the list", "required" : true, "style" : "simple", "explode" : false, @@ -1353,7 +1353,7 @@ "parameters" : [ { "name" : "marketingEventId", "in" : "path", - "description" : "The internal id of the marketing event in HubSpot.", + "description" : "The internal id of the marketing event in HubSpot", "required" : true, "style" : "simple", "explode" : false, @@ -1363,7 +1363,7 @@ }, { "name" : "listId", "in" : "path", - "description" : "The ILS ID of the list.", + "description" : "The ILS ID of the list", "required" : true, "style" : "simple", "explode" : false, @@ -1406,7 +1406,7 @@ }, { "name" : "subscriberState", "in" : "path", - "description" : "The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'.", + "description" : "The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'", "required" : true, "style" : "simple", "explode" : false, @@ -1455,7 +1455,7 @@ "parameters" : [ { "name" : "externalAccountId", "in" : "path", - "description" : "The accountId that is associated with this marketing event in the external event application.", + "description" : "The accountId that is associated with this marketing event in the external event application", "required" : true, "style" : "simple", "explode" : false, @@ -1465,7 +1465,7 @@ }, { "name" : "externalEventId", "in" : "path", - "description" : "The id of the marketing event in the external event application.", + "description" : "The id of the marketing event in the external event application", "required" : true, "style" : "simple", "explode" : false, @@ -1475,7 +1475,7 @@ }, { "name" : "listId", "in" : "path", - "description" : "The ILS ID of the list.", + "description" : "The ILS ID of the list", "required" : true, "style" : "simple", "explode" : false, @@ -1506,7 +1506,7 @@ "parameters" : [ { "name" : "externalAccountId", "in" : "path", - "description" : "The accountId that is associated with this marketing event in the external event application.", + "description" : "The accountId that is associated with this marketing event in the external event application", "required" : true, "style" : "simple", "explode" : false, @@ -1516,7 +1516,7 @@ }, { "name" : "externalEventId", "in" : "path", - "description" : "The id of the marketing event in the external event application.", + "description" : "The id of the marketing event in the external event application", "required" : true, "style" : "simple", "explode" : false, @@ -1526,7 +1526,7 @@ }, { "name" : "listId", "in" : "path", - "description" : "The ILS ID of the list.", + "description" : "The ILS ID of the list", "required" : true, "style" : "simple", "explode" : false, @@ -1559,7 +1559,7 @@ "parameters" : [ { "name" : "externalEventId", "in" : "path", - "description" : "The id of the marketing event in the external event application.", + "description" : "The id of the marketing event in the external event application", "required" : true, "style" : "simple", "explode" : false, @@ -1569,7 +1569,7 @@ }, { "name" : "externalAccountId", "in" : "query", - "description" : "The accountId that is associated with this marketing event in the external event application.", + "description" : "The accountId that is associated with this marketing event in the external event application", "required" : true, "style" : "form", "explode" : true, @@ -1657,7 +1657,7 @@ "parameters" : [ { "name" : "contactIdentifier", "in" : "path", - "description" : "The identifier of the Contact. It may be email or internal id.", + "description" : "The identifier of the Contact. It may be email or internal id", "required" : true, "style" : "simple", "explode" : false, @@ -1689,7 +1689,7 @@ }, { "name" : "after", "in" : "query", - "description" : "The cursor indicating the position of the last retrieved item.", + "description" : "The cursor indicating the position of the last retrieved item", "required" : false, "style" : "form", "explode" : true, @@ -1728,7 +1728,7 @@ "parameters" : [ { "name" : "appId", "in" : "path", - "description" : "The id of the application to retrieve the settings for.", + "description" : "The id of the application to retrieve the settings for", "required" : true, "style" : "simple", "explode" : false, @@ -1764,7 +1764,7 @@ "parameters" : [ { "name" : "appId", "in" : "path", - "description" : "The id of the application to update the settings for.", + "description" : "The id of the application to update the settings for", "required" : true, "style" : "simple", "explode" : false, @@ -1898,42 +1898,42 @@ "properties" : { "registrants" : { "type" : "integer", - "description" : "The number of HubSpot contacts that registered for this marketing event.", + "description" : "The number of HubSpot contacts that registered for this marketing event", "format" : "int32" }, "eventOrganizer" : { "type" : "string", - "description" : "The name of the organizer of the marketing event." + "description" : "The name of the organizer of the marketing event" }, "eventUrl" : { "type" : "string", - "description" : "A URL in the external event application where the marketing event can be managed." + "description" : "A URL in the external event application where the marketing event can be managed" }, "attendees" : { "type" : "integer", - "description" : "The number of HubSpot contacts that attended this marketing event.", + "description" : "The number of HubSpot contacts that attended this marketing event", "format" : "int32" }, "eventType" : { "type" : "string", - "description" : "The type of the marketing event." + "description" : "The type of the marketing event" }, "eventCompleted" : { "type" : "boolean" }, "endDateTime" : { "type" : "string", - "description" : "The end date and time of the marketing event.", + "description" : "The end date and time of the marketing event", "format" : "datetime" }, "noShows" : { "type" : "integer", - "description" : "The number of HubSpot contacts that registered for this marketing event, but did not attend. This field only had a value when the event is over.", + "description" : "The number of HubSpot contacts that registered for this marketing event, but did not attend. This field only had a value when the event is over", "format" : "int32" }, "cancellations" : { "type" : "integer", - "description" : "The number of HubSpot contacts that registered for this marketing event, but later cancelled their registration.", + "description" : "The number of HubSpot contacts that registered for this marketing event, but later cancelled their registration", "format" : "int32" }, "createdAt" : { @@ -1943,31 +1943,31 @@ }, "startDateTime" : { "type" : "string", - "description" : "The start date and time of the marketing event.", + "description" : "The start date and time of the marketing event", "format" : "datetime" }, "customProperties" : { "type" : "array", - "description" : "A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set.\nIn order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts.\n", + "description" : "A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set.\nIn order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts\n", "items" : { "$ref" : "#/components/schemas/CrmPropertyWrapper" } }, "eventCancelled" : { "type" : "boolean", - "description" : "Indicates if the marketing event has been cancelled." + "description" : "Indicates if the marketing event has been cancelled" }, "externalEventId" : { "type" : "string", - "description" : "The id of the marketing event in the external event application." + "description" : "The id of the marketing event in the external event application" }, "eventDescription" : { "type" : "string", - "description" : "The description of the marketing event." + "description" : "The description of the marketing event" }, "eventName" : { "type" : "string", - "description" : "The name of the marketing event." + "description" : "The name of the marketing event" }, "id" : { "type" : "string", @@ -2015,7 +2015,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", @@ -2054,11 +2054,11 @@ }, "email" : { "type" : "string", - "description" : "The email address of the contact in HubSpot to associate with the event." + "description" : "The email address of the contact in HubSpot to associate with the event" }, "interactionDateTime" : { "type" : "integer", - "description" : "Timestamp in milliseconds at which the contact subscribed to the event.", + "description" : "Timestamp in milliseconds at which the contact subscribed to the event", "format" : "int64" } } @@ -2128,15 +2128,15 @@ "properties" : { "externalAccountId" : { "type" : "string", - "description" : "The accountId that is associated with this marketing event in the external event application." + "description" : "The accountId that is associated with this marketing event in the external event application" }, "externalEventId" : { "type" : "string", - "description" : "The id of the marketing event in the external event application." + "description" : "The id of the marketing event in the external event application" }, "appId" : { "type" : "integer", - "description" : "The id of the application that created the marketing event in HubSpot.", + "description" : "The id of the application that created the marketing event in HubSpot", "format" : "int32" } } @@ -2338,12 +2338,12 @@ "properties" : { "startDateTime" : { "type" : "string", - "description" : "The start date and time of the marketing event.", + "description" : "The start date and time of the marketing event", "format" : "datetime" }, "customProperties" : { "type" : "array", - "description" : "A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set.\nIn order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts.\n", + "description" : "A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set.\nIn order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts\n", "items" : { "$ref" : "#/components/schemas/CrmPropertyWrapper" } @@ -2354,19 +2354,19 @@ }, "eventOrganizer" : { "type" : "string", - "description" : "The name of the organizer of the marketing event." + "description" : "The name of the organizer of the marketing event" }, "eventUrl" : { "type" : "string", - "description" : "A URL in the external event application where the marketing event can be managed." + "description" : "A URL in the external event application where the marketing event can be managed" }, "eventDescription" : { "type" : "string", - "description" : "The description of the marketing event." + "description" : "The description of the marketing event" }, "eventName" : { "type" : "string", - "description" : "The name of the marketing event." + "description" : "The name of the marketing event" }, "eventType" : { "type" : "string", @@ -2377,7 +2377,7 @@ }, "endDateTime" : { "type" : "string", - "description" : "The end date and time of the marketing event.", + "description" : "The end date and time of the marketing event", "format" : "datetime" } } @@ -2453,22 +2453,22 @@ "properties" : { "eventOrganizer" : { "type" : "string", - "description" : "The name of the organizer of the marketing event." + "description" : "The name of the organizer of the marketing event" }, "eventUrl" : { "type" : "string", - "description" : "A URL in the external event application where the marketing event can be managed." + "description" : "A URL in the external event application where the marketing event can be managed" }, "eventType" : { "type" : "string", - "description" : "The type of the marketing event." + "description" : "The type of the marketing event" }, "eventCompleted" : { "type" : "boolean" }, "endDateTime" : { "type" : "string", - "description" : "The end date and time of the marketing event.", + "description" : "The end date and time of the marketing event", "format" : "datetime" }, "createdAt" : { @@ -2478,27 +2478,27 @@ }, "startDateTime" : { "type" : "string", - "description" : "The start date and time of the marketing event.", + "description" : "The start date and time of the marketing event", "format" : "datetime" }, "customProperties" : { "type" : "array", - "description" : "A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set.\nIn order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts.\n", + "description" : "A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set.\nIn order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts\n", "items" : { "$ref" : "#/components/schemas/CrmPropertyWrapper" } }, "eventCancelled" : { "type" : "boolean", - "description" : "Indicates if the marketing event has been cancelled." + "description" : "Indicates if the marketing event has been cancelled" }, "eventDescription" : { "type" : "string", - "description" : "The description of the marketing event." + "description" : "The description of the marketing event" }, "eventName" : { "type" : "string", - "description" : "The name of the marketing event." + "description" : "The name of the marketing event" }, "id" : { "type" : "string", @@ -2564,46 +2564,46 @@ "properties" : { "startDateTime" : { "type" : "string", - "description" : "The start date and time of the marketing event.", + "description" : "The start date and time of the marketing event", "format" : "datetime" }, "customProperties" : { "type" : "array", - "description" : "A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set.\nIn order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts.\n", + "description" : "A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set.\nIn order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts\n", "items" : { "$ref" : "#/components/schemas/CrmPropertyWrapper" } }, "eventCancelled" : { "type" : "boolean", - "description" : "Indicates if the marketing event has been cancelled." + "description" : "Indicates if the marketing event has been cancelled" }, "eventOrganizer" : { "type" : "string", - "description" : "The name of the organizer of the marketing event." + "description" : "The name of the organizer of the marketing event" }, "eventUrl" : { "type" : "string", - "description" : "The URL in the external event application where the marketing event can be managed." + "description" : "The URL in the external event application where the marketing event can be managed" }, "eventDescription" : { "type" : "string", - "description" : "The description of the marketing event." + "description" : "The description of the marketing event" }, "eventName" : { "type" : "string", - "description" : "The name of the marketing event." + "description" : "The name of the marketing event" }, "eventType" : { "type" : "string", - "description" : "The type of the marketing event." + "description" : "The type of the marketing event" }, "eventCompleted" : { "type" : "boolean" }, "endDateTime" : { "type" : "string", - "description" : "The end date and time of the marketing event.", + "description" : "The end date and time of the marketing event", "format" : "datetime" }, "objectId" : { @@ -2693,19 +2693,19 @@ "properties" : { "startDateTime" : { "type" : "string", - "description" : "The start date and time of the marketing event.", + "description" : "The start date and time of the marketing event", "format" : "datetime" }, "customProperties" : { "type" : "array", - "description" : "A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set.\nIn order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts.\n", + "description" : "A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set.\nIn order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts\n", "items" : { "$ref" : "#/components/schemas/CrmPropertyWrapper" } }, "externalAccountId" : { "type" : "string", - "description" : "The accountId that is associated with this marketing event in the external event application." + "description" : "The accountId that is associated with this marketing event in the external event application" }, "eventCancelled" : { "type" : "boolean", @@ -2713,23 +2713,23 @@ }, "eventOrganizer" : { "type" : "string", - "description" : "The name of the organizer of the marketing event." + "description" : "The name of the organizer of the marketing event" }, "eventUrl" : { "type" : "string", - "description" : "A URL in the external event application where the marketing event can be managed." + "description" : "A URL in the external event application where the marketing event can be managed" }, "externalEventId" : { "type" : "string", - "description" : "The id of the marketing event in the external event application." + "description" : "The id of the marketing event in the external event application" }, "eventDescription" : { "type" : "string", - "description" : "The description of the marketing event." + "description" : "The description of the marketing event" }, "eventName" : { "type" : "string", - "description" : "The name of the marketing event." + "description" : "The name of the marketing event" }, "eventType" : { "type" : "string", @@ -2740,7 +2740,7 @@ }, "endDateTime" : { "type" : "string", - "description" : "The end date and time of the marketing event.", + "description" : "The end date and time of the marketing event", "format" : "datetime" } } @@ -2803,7 +2803,7 @@ }, "interactionDateTime" : { "type" : "integer", - "description" : "Timestamp in milliseconds at which the contact subscribed to the event.", + "description" : "Timestamp in milliseconds at which the contact subscribed to the event", "format" : "int64" } } @@ -3360,7 +3360,7 @@ }, "responses" : { "Error" : { - "description" : "An error occurred.", + "description" : "An error occurred", "content" : { "*/*" : { "schema" : { @@ -3392,7 +3392,8 @@ "private_apps_legacy" : { "type" : "apiKey", "name" : "private-app-legacy", - "in" : "header" + "in" : "header", + "x-ballerina-name" : "privateAppLegacy" } } }, @@ -3402,4 +3403,4 @@ "cms" : "STARTER" }, "x-hubspot-documentation-banner" : "PUBLIC_BETA" -} +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index aa1aa84..f7dd3ee 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,4 +4,4 @@ version=0.1.1-SNAPSHOT releasePluginVersion=2.8.0 ballerinaGradlePluginVersion=2.2.4 -ballerinaLangVersion=2201.10.0 +ballerinaLangVersion=2201.12.2