From 628708d74e16d48d10ef4aeda38dd094cad5a632 Mon Sep 17 00:00:00 2001 From: ballerina-bot Date: Wed, 9 Apr 2025 07:42:17 +0000 Subject: [PATCH 1/5] [AUTOMATED] Update OpenAPI spec --- docs/spec/openapi.json | 213 ++++++++++++++++++++--------------------- 1 file changed, 106 insertions(+), 107 deletions(-) diff --git a/docs/spec/openapi.json b/docs/spec/openapi.json index bd50a59..32ebd1e 100644 --- a/docs/spec/openapi.json +++ b/docs/spec/openapi.json @@ -38,7 +38,7 @@ "parameters" : [ { "name" : "eventTemplateId", "in" : "path", - "description" : "The event template ID.", + "description" : "The event template ID", "required" : true, "style" : "simple", "explode" : false, @@ -48,7 +48,7 @@ }, { "name" : "eventId", "in" : "path", - "description" : "The event ID.", + "description" : "The event ID", "required" : true, "style" : "simple", "explode" : false, @@ -123,7 +123,7 @@ "operationId" : "post-/events_create", "parameters" : [ ], "requestBody" : { - "description" : "The timeline event definition.", + "description" : "The timeline event definition", "content" : { "application/json" : { "schema" : { @@ -230,7 +230,7 @@ "parameters" : [ { "name" : "eventTemplateId", "in" : "path", - "description" : "The event template ID.", + "description" : "The event template ID", "required" : true, "style" : "simple", "explode" : false, @@ -240,7 +240,7 @@ }, { "name" : "tokenName", "in" : "path", - "description" : "The token name.", + "description" : "The token name", "required" : true, "style" : "simple", "explode" : false, @@ -250,7 +250,7 @@ }, { "name" : "appId", "in" : "path", - "description" : "The ID of the target app.", + "description" : "The ID of the target app", "required" : true, "style" : "simple", "explode" : false, @@ -260,7 +260,7 @@ } } ], "requestBody" : { - "description" : "The updated token definition.", + "description" : "The updated token definition", "content" : { "application/json" : { "schema" : { @@ -321,7 +321,7 @@ "parameters" : [ { "name" : "eventTemplateId", "in" : "path", - "description" : "The event template ID.", + "description" : "The event template ID", "required" : true, "style" : "simple", "explode" : false, @@ -331,7 +331,7 @@ }, { "name" : "tokenName", "in" : "path", - "description" : "The token name.", + "description" : "The token name", "required" : true, "style" : "simple", "explode" : false, @@ -341,7 +341,7 @@ }, { "name" : "appId", "in" : "path", - "description" : "The ID of the target app.", + "description" : "The ID of the target app", "required" : true, "style" : "simple", "explode" : false, @@ -380,7 +380,7 @@ "parameters" : [ { "name" : "eventTemplateId", "in" : "path", - "description" : "The event template ID.", + "description" : "The event template ID", "required" : true, "style" : "simple", "explode" : false, @@ -390,7 +390,7 @@ }, { "name" : "eventId", "in" : "path", - "description" : "The event ID.", + "description" : "The event ID", "required" : true, "style" : "simple", "explode" : false, @@ -465,7 +465,7 @@ "operationId" : "post-/events/batch/create_createBatch", "parameters" : [ ], "requestBody" : { - "description" : "The timeline event definition.", + "description" : "The timeline event definition", "content" : { "application/json" : { "schema" : { @@ -622,7 +622,7 @@ "parameters" : [ { "name" : "eventTemplateId", "in" : "path", - "description" : "The event template ID.", + "description" : "The event template ID", "required" : true, "style" : "simple", "explode" : false, @@ -632,7 +632,7 @@ }, { "name" : "eventId", "in" : "path", - "description" : "The event ID.", + "description" : "The event ID", "required" : true, "style" : "simple", "explode" : false, @@ -642,7 +642,7 @@ }, { "name" : "detail", "in" : "query", - "description" : "Set to 'true', we want to render the `detailTemplate` instead of the `headerTemplate`.", + "description" : "Set to 'true', we want to render the `detailTemplate` instead of the `headerTemplate`", "required" : false, "style" : "form", "explode" : true, @@ -718,7 +718,7 @@ "parameters" : [ { "name" : "appId", "in" : "path", - "description" : "The ID of the target app.", + "description" : "The ID of the target app", "required" : true, "style" : "simple", "explode" : false, @@ -832,7 +832,7 @@ "parameters" : [ { "name" : "appId", "in" : "path", - "description" : "The ID of the target app.", + "description" : "The ID of the target app", "required" : true, "style" : "simple", "explode" : false, @@ -842,7 +842,7 @@ } } ], "requestBody" : { - "description" : "The new event template definition.", + "description" : "The new event template definition", "content" : { "application/json" : { "schema" : { @@ -931,7 +931,7 @@ "parameters" : [ { "name" : "eventTemplateId", "in" : "path", - "description" : "The event template ID.", + "description" : "The event template ID", "required" : true, "style" : "simple", "explode" : false, @@ -941,7 +941,7 @@ }, { "name" : "appId", "in" : "path", - "description" : "The ID of the target app.", + "description" : "The ID of the target app", "required" : true, "style" : "simple", "explode" : false, @@ -1030,7 +1030,7 @@ "parameters" : [ { "name" : "eventTemplateId", "in" : "path", - "description" : "The event template ID.", + "description" : "The event template ID", "required" : true, "style" : "simple", "explode" : false, @@ -1040,7 +1040,7 @@ }, { "name" : "appId", "in" : "path", - "description" : "The ID of the target app.", + "description" : "The ID of the target app", "required" : true, "style" : "simple", "explode" : false, @@ -1050,7 +1050,7 @@ } } ], "requestBody" : { - "description" : "The updated event template definition.", + "description" : "The updated event template definition", "content" : { "application/json" : { "schema" : { @@ -1141,7 +1141,7 @@ "parameters" : [ { "name" : "eventTemplateId", "in" : "path", - "description" : "The event template ID.", + "description" : "The event template ID", "required" : true, "style" : "simple", "explode" : false, @@ -1151,7 +1151,7 @@ }, { "name" : "appId", "in" : "path", - "description" : "The ID of the target app.", + "description" : "The ID of the target app", "required" : true, "style" : "simple", "explode" : false, @@ -1190,7 +1190,7 @@ "parameters" : [ { "name" : "eventTemplateId", "in" : "path", - "description" : "The event template ID.", + "description" : "The event template ID", "required" : true, "style" : "simple", "explode" : false, @@ -1200,7 +1200,7 @@ }, { "name" : "appId", "in" : "path", - "description" : "The ID of the target app.", + "description" : "The ID of the target app", "required" : true, "style" : "simple", "explode" : false, @@ -1210,7 +1210,7 @@ } } ], "requestBody" : { - "description" : "The new token definition.", + "description" : "The new token definition", "content" : { "application/json" : { "schema" : { @@ -1270,13 +1270,13 @@ "properties" : { "eventTemplateId" : { "type" : "string", - "description" : "The event template ID.", + "description" : "The event template ID", "example" : "1001298" }, "extraData" : { "type" : "object", "properties" : { }, - "description" : "Additional event-specific data that can be interpreted by the template's markdown.", + "description" : "Additional event-specific data that can be interpreted by the template's markdown", "example" : { "questions" : [ { "answer" : "Bark!", @@ -1292,14 +1292,14 @@ }, "domain" : { "type" : "string", - "description" : "The event domain (often paired with utk)." + "description" : "The event domain (often paired with utk)" }, "tokens" : { "type" : "object", "additionalProperties" : { "type" : "string" }, - "description" : "A collection of token keys and values associated with the template tokens.", + "description" : "A collection of token keys and values associated with the template tokens", "example" : { "petAge" : 3, "petName" : "Art3mis", @@ -1308,28 +1308,28 @@ }, "id" : { "type" : "string", - "description" : "Identifier for the event. This is optional, and we recommend you do not pass this in. We will create one for you if you omit this. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness." + "description" : "Identifier for the event. This is optional, and we recommend you do not pass this in. We will create one for you if you omit this. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness" }, "utk" : { "type" : "string", - "description" : "Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie." + "description" : "Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie" }, "email" : { "type" : "string", - "description" : "The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`).", + "description" : "The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`)", "example" : "art3mis-pup@petspot.com" }, "objectId" : { "type" : "string", - "description" : "The CRM object identifier. This is required for every event other than contacts (where utk or email can be used)." + "description" : "The CRM object identifier. This is required for every event other than contacts (where utk or email can be used)" }, "timestamp" : { "type" : "string", - "description" : "The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline.", + "description" : "The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline", "format" : "datetime" } }, - "description" : "The state of the timeline event.", + "description" : "The state of the timeline event", "example" : { "eventTemplateId" : "1001298", "email" : "art3mis-pup@petspot.com", @@ -1362,28 +1362,28 @@ "properties" : { "linkLabel" : { "type" : "string", - "description" : "The text displaying the link that will display the iframe.", + "description" : "The text displaying the link that will display the iframe", "example" : "View Art3mis" }, "headerLabel" : { "type" : "string", - "description" : "The label of the modal window that displays the iframe contents.", + "description" : "The label of the modal window that displays the iframe contents", "example" : "Art3mis dog" }, "width" : { "type" : "integer", - "description" : "The width of the modal window in pixels.", + "description" : "The width of the modal window in pixels", "format" : "int32", "example" : 600 }, "url" : { "type" : "string", - "description" : "The URI of the iframe contents.", + "description" : "The URI of the iframe contents", "example" : "https://my.petspot.com/pets/Art3mis" }, "height" : { "type" : "integer", - "description" : "The height of the modal window in pixels.", + "description" : "The height of the modal window in pixels", "format" : "int32", "example" : 400 } @@ -1510,11 +1510,11 @@ "properties" : { "details" : { "type" : "string", - "description" : "The details Markdown rendered as HTML.", + "description" : "The details Markdown rendered as HTML", "example" : "

Registration occurred at Jan 30, 2020, 1:13:25 PM

Questions

Who's a good kitty?: Purr...

Will you stop playing with that?: Meow!

EDIT

" } }, - "description" : "The details Markdown rendered as HTML.", + "description" : "The details Markdown rendered as HTML", "example" : { "details" : "

Registration occurred at Jan 30, 2020, 1:13:25 PM

Questions

Who's a good kitty?: Purr...

Will you stop playing with that?: Meow!

EDIT

" } @@ -1525,17 +1525,17 @@ "properties" : { "detailTemplate" : { "type" : "string", - "description" : "This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details.", + "description" : "This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details", "example" : "Registration occurred at {{#formatDate timestamp}}{{/formatDate}}\n\n#### Questions\n{{#each extraData.questions}}\n **{{question}}**: {{answer}}\n{{/each}}" }, "name" : { "type" : "string", - "description" : "The template name.", + "description" : "The template name", "example" : "PetSpot Registration" }, "tokens" : { "type" : "array", - "description" : "A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects.", + "description" : "A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects", "example" : [ { "name" : "petName", "type" : "string", @@ -1568,16 +1568,16 @@ }, "headerTemplate" : { "type" : "string", - "description" : "This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header.", + "description" : "This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header", "example" : "Registered for [{{petName}}](https://my.petspot.com/pets/{{petName}})" }, "objectType" : { "type" : "string", - "description" : "The type of CRM object this template is for. [Contacts, companies, tickets, and deals] are supported.", + "description" : "The type of CRM object this template is for. [Contacts, companies, tickets, and deals] are supported", "example" : "contacts" } }, - "description" : "State of the template definition being created.", + "description" : "State of the template definition being created", "example" : { "name" : "PetSpot Registration", "objectType" : "contacts", @@ -1617,17 +1617,17 @@ "properties" : { "detailTemplate" : { "type" : "string", - "description" : "This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details.", + "description" : "This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details", "example" : "Registration occurred at {{#formatDate timestamp}}{{/formatDate}}\n\n#### Questions\n{{#each extraData.questions}}\n **{{question}}**: {{answer}}\n{{/each}}\n\nEDIT" }, "name" : { "type" : "string", - "description" : "The template name.", + "description" : "The template name", "example" : "PetSpot Registration" }, "tokens" : { "type" : "array", - "description" : "A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects.", + "description" : "A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects", "example" : [ { "name" : "petName", "type" : "string", @@ -1664,16 +1664,16 @@ }, "id" : { "type" : "string", - "description" : "The template ID.", + "description" : "The template ID", "example" : "1001298" }, "headerTemplate" : { "type" : "string", - "description" : "This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header.", + "description" : "This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header", "example" : "Registered for [{{petName}}](https://my.petspot.com/pets/{{petName}})" } }, - "description" : "State of the template definition being updated.", + "description" : "State of the template definition being updated", "example" : { "id" : "1001298", "name" : "PetSpot Registration", @@ -1737,7 +1737,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", @@ -1764,18 +1764,18 @@ "properties" : { "completedAt" : { "type" : "string", - "description" : "The time the request was completed.", + "description" : "The time the request was completed", "format" : "datetime", "example" : "2020-01-30T18:13:26.227+00:00" }, "requestedAt" : { "type" : "string", - "description" : "The time the request occurred.", + "description" : "The time the request occurred", "format" : "datetime" }, "startedAt" : { "type" : "string", - "description" : "The time the request began processing.", + "description" : "The time the request began processing", "format" : "datetime", "example" : "2020-01-30T18:13:24.974+00:00" }, @@ -1787,7 +1787,7 @@ }, "results" : { "type" : "array", - "description" : "Successfully created events.", + "description" : "Successfully created events", "example" : [ { "id" : "petspot:1001298:art3mis-pup@petspot.com-6edaa73d-d734-404d-908f-74774d58ac2b", "email" : "art3mis-pup@petspot.com", @@ -1851,12 +1851,12 @@ }, "status" : { "type" : "string", - "description" : "The status of the batch response. Should always be COMPLETED if processed.", + "description" : "The status of the batch response. Should always be COMPLETED if processed", "example" : "COMPLETE", "enum" : [ "PENDING", "PROCESSING", "CANCELED", "COMPLETE" ] } }, - "description" : "The state of the batch event request.", + "description" : "The state of the batch event request", "example" : { "results" : [ { "objectType" : "contacts", @@ -1926,7 +1926,7 @@ "properties" : { "inputs" : { "type" : "array", - "description" : "A collection of timeline events we want to create.", + "description" : "A collection of timeline events we want to create", "example" : [ { "email" : "art3mis-pup@petspot.com", "tokens" : { @@ -1981,7 +1981,7 @@ } } }, - "description" : "Used to create timeline events in batches.", + "description" : "Used to create timeline events in batches", "example" : { "inputs" : [ { "eventTemplateId" : "1001298", @@ -2040,45 +2040,44 @@ "properties" : { "createdAt" : { "type" : "string", - "description" : "The date and time that the Event Template was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020.", + "description" : "The date and time that the Event Template was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020", "format" : "datetime", "nullable" : true - }, "detailTemplate" : { "type" : "string", - "description" : "This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details." + "description" : "This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details" }, "name" : { "type" : "string", - "description" : "The template name." + "description" : "The template name" }, "tokens" : { "type" : "array", - "description" : "A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects.", + "description" : "A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects", "items" : { "$ref" : "#/components/schemas/TimelineEventTemplateToken" } }, "id" : { "type" : "string", - "description" : "The template ID." + "description" : "The template ID" }, "headerTemplate" : { "type" : "string", - "description" : "This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header." + "description" : "This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header" }, "objectType" : { "type" : "string", - "description" : "The type of CRM object this template is for. [Contacts, companies, tickets, and deals] are supported." + "description" : "The type of CRM object this template is for. [Contacts, companies, tickets, and deals] are supported" }, "updatedAt" : { "type" : "string", - "description" : "The date and time that the Event Template was last updated, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020.", + "description" : "The date and time that the Event Template was last updated, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020", "format" : "datetime" } }, - "description" : "The current state of the template definition." + "description" : "The current state of the template definition" }, "TimelineEventTemplateTokenOption" : { "required" : [ "label", "value" ], @@ -2098,13 +2097,13 @@ "properties" : { "createdAt" : { "type" : "string", - "description" : "The date and time that the Event Template Token was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020.", + "description" : "The date and time that the Event Template Token was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020", "format" : "datetime", "example" : "2020-02-12T20:58:26.000+00:00" }, "options" : { "type" : "array", - "description" : "If type is `enumeration`, we should have a list of options to choose from.", + "description" : "If type is `enumeration`, we should have a list of options to choose from", "example" : [ { "label" : "Dog", "value" : "dog" @@ -2118,34 +2117,34 @@ }, "name" : { "type" : "string", - "description" : "The name of the token referenced in the templates. This must be unique for the specific template. It may only contain alphanumeric characters, periods, dashes, or underscores (. - _).", + "description" : "The name of the token referenced in the templates. This must be unique for the specific template. It may only contain alphanumeric characters, periods, dashes, or underscores (. - _)", "example" : "petType" }, "label" : { "type" : "string", - "description" : "Used for list segmentation and reporting.", + "description" : "Used for list segmentation and reporting", "example" : "Pet Type" }, "objectPropertyName" : { "type" : "string", - "description" : "The name of the CRM object property. This will populate the CRM object property associated with the event. With enough of these, you can fully build CRM objects via the Timeline API.", - "example" : "customPropertyPetType", - "nullable" : true + "description" : "The name of the CRM object property. This will populate the CRM object property associated with the event. With enough of these, you can fully build CRM objects via the Timeline API", + "nullable" : true, + "example" : "customPropertyPetType" }, "type" : { "type" : "string", - "description" : "The data type of the token. You can currently choose from [string, number, date, enumeration].", + "description" : "The data type of the token. You can currently choose from [string, number, date, enumeration]", "example" : "enumeration", "enum" : [ "date", "enumeration", "number", "string" ] }, "updatedAt" : { "type" : "string", - "description" : "The date and time that the Event Template Token was last updated, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020.", + "description" : "The date and time that the Event Template Token was last updated, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020", "format" : "datetime", "example" : "2020-02-12T20:58:26.000+00:00" } }, - "description" : "State of the token definition.", + "description" : "State of the token definition", "example" : { "name" : "petType", "label" : "Pet Type", @@ -2168,19 +2167,18 @@ "properties" : { "eventTemplateId" : { "type" : "string", - "description" : "The event template ID.", + "description" : "The event template ID", "example" : "1001298" - }, "createdAt" : { "type" : "string", "format" : "datetime", - "nullable": true + "nullable" : true }, "extraData" : { "type" : "object", "properties" : { }, - "description" : "Additional event-specific data that can be interpreted by the template's markdown.", + "description" : "Additional event-specific data that can be interpreted by the template's markdown", "example" : { "questions" : [ { "answer" : "Bark!", @@ -2196,14 +2194,14 @@ }, "domain" : { "type" : "string", - "description" : "The event domain (often paired with utk)." + "description" : "The event domain (often paired with utk)" }, "tokens" : { "type" : "object", "additionalProperties" : { "type" : "string" }, - "description" : "A collection of token keys and values associated with the template tokens.", + "description" : "A collection of token keys and values associated with the template tokens", "example" : { "petAge" : "3", "petName" : "Art3mis", @@ -2212,36 +2210,36 @@ }, "id" : { "type" : "string", - "description" : "Identifier for the event. This should be unique to the app and event template. If you use the same ID for different CRM objects, the last to be processed will win and the first will not have a record. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness.", + "description" : "Identifier for the event. This should be unique to the app and event template. If you use the same ID for different CRM objects, the last to be processed will win and the first will not have a record. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness", "example" : "petspot:1001298:art3mis-pup@petspot.com-004-invalid" }, "utk" : { "type" : "string", - "description" : "Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie." + "description" : "Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie" }, "email" : { "type" : "string", - "description" : "The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`).", + "description" : "The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`)", "example" : "art3mis-pup@petspot.com" }, "objectId" : { "type" : "string", - "description" : "The CRM object identifier. This is required for every event other than contacts (where utk or email can be used).", + "description" : "The CRM object identifier. This is required for every event other than contacts (where utk or email can be used)", "example" : "28001" }, "timestamp" : { "type" : "string", - "description" : "The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline.", + "description" : "The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline", "format" : "datetime", "example" : "2020-01-30T18:37:15.569+00:00" }, "objectType" : { "type" : "string", - "description" : "The ObjectType associated with the EventTemplate.", + "description" : "The ObjectType associated with the EventTemplate", "example" : "contacts" } }, - "description" : "The current state of the timeline event.", + "description" : "The current state of the timeline event", "example" : { "objectType" : "contacts", "id" : "petspot:1001298:art3mis-pup@petspot.com-004-invalid", @@ -2278,7 +2276,7 @@ "properties" : { "options" : { "type" : "array", - "description" : "If type is `enumeration`, we should have a list of options to choose from.", + "description" : "If type is `enumeration`, we should have a list of options to choose from", "example" : [ { "label" : "Dog", "value" : "dog" @@ -2295,15 +2293,15 @@ }, "label" : { "type" : "string", - "description" : "Used for list segmentation and reporting.", + "description" : "Used for list segmentation and reporting", "example" : "petType edit" }, "objectPropertyName" : { "type" : "string", - "description" : "The name of the CRM object property. This will populate the CRM object property associated with the event. With enough of these, you can fully build CRM objects via the Timeline API." + "description" : "The name of the CRM object property. This will populate the CRM object property associated with the event. With enough of these, you can fully build CRM objects via the Timeline API" } }, - "description" : "State of the token definition for update requests.", + "description" : "State of the token definition for update requests", "example" : { "label" : "petType edit", "options" : [ { @@ -2420,13 +2418,14 @@ "private_apps_legacy" : { "type" : "apiKey", "name" : "private-app-legacy", - "in" : "header" + "in" : "header", + "x-ballerina-name" : "privateAppLegacy" }, "private_apps" : { "type" : "apiKey", "name" : "private-app", - "in" : "header" - + "in" : "header", + "x-ballerina-name" : "privateApp" } } }, From dd5d1871b8bb7acc4fd47b51538245a65667552b Mon Sep 17 00:00:00 2001 From: ballerina-bot Date: Wed, 9 Apr 2025 07:42:18 +0000 Subject: [PATCH 2/5] [AUTOMATED] Client Regeneration --- ballerina/client.bal | 234 ++++++++++++++++++------------------------- ballerina/types.bal | 211 ++++++++++++++++++-------------------- gradle.properties | 2 +- 3 files changed, 198 insertions(+), 249 deletions(-) diff --git a/ballerina/client.bal b/ballerina/client.bal index 73f698f..6836ad5 100644 --- a/ballerina/client.bal +++ b/ballerina/client.bal @@ -29,141 +29,130 @@ public isolated client class Client { # + 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/integrators/timeline/v3") 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); } - # Deletes an event template for the app + # Gets the detailTemplate as rendered # - # + eventTemplateId - The event template ID. - # + appId - The ID of the target app. + # + eventTemplateId - The event template ID + # + eventId - The event ID # + headers - Headers to be sent with the request - # + return - No content - resource isolated function delete [int:Signed32 appId]/event\-templates/[string eventTemplateId](map headers = {}) returns http:Response|error { - string resourcePath = string `/${getEncodedUri(appId)}/event-templates/${getEncodedUri(eventTemplateId)}`; - map queryParam = {}; + # + return - successful operation + resource isolated function get events/[string eventTemplateId]/[string eventId]/detail(map headers = {}) returns EventDetail|error { + string resourcePath = string `/events/${getEncodedUri(eventTemplateId)}/${getEncodedUri(eventId)}/detail`; + map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - queryParam["hapikey"] = self.apiKeyConfig?.hapikey; + headerValues["private-app"] = self.apiKeyConfig?.privateApp; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } - resourcePath = resourcePath + check getPathForQueryParam(queryParam); - return self.clientEp->delete(resourcePath, headers = headers); + map httpHeaders = http:getHeaderMap(headerValues); + return self.clientEp->get(resourcePath, httpHeaders); } - # Removes a token from the event template + # Create a single event # - # + eventTemplateId - The event template ID. - # + tokenName - The token name. - # + appId - The ID of the target app. # + headers - Headers to be sent with the request - # + return - No content - resource isolated function delete [int:Signed32 appId]/event\-templates/[string eventTemplateId]/tokens/[string tokenName](map headers = {}) returns http:Response|error { - string resourcePath = string `/${getEncodedUri(appId)}/event-templates/${getEncodedUri(eventTemplateId)}/tokens/${getEncodedUri(tokenName)}`; - map queryParam = {}; + # + payload - The timeline event definition + # + return - successful operation + resource isolated function post events(TimelineEvent payload, map headers = {}) returns TimelineEventResponse|error { + string resourcePath = string `/events`; + map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - queryParam["hapikey"] = self.apiKeyConfig?.hapikey; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; + headerValues["private-app"] = self.apiKeyConfig?.privateApp; } - resourcePath = resourcePath + check getPathForQueryParam(queryParam); - return self.clientEp->delete(resourcePath, headers = headers); + map httpHeaders = http:getHeaderMap(headerValues); + http:Request request = new; + json jsonBody = payload.toJson(); + request.setPayload(jsonBody, "application/json"); + return self.clientEp->post(resourcePath, request, httpHeaders); } - # List all event templates for your app - # - # + appId - The ID of the target app. + # Updates an existing token on an event template + # + # + eventTemplateId - The event template ID + # + tokenName - The token name + # + appId - The ID of the target app # + headers - Headers to be sent with the request + # + payload - The updated token definition # + return - successful operation - resource isolated function get [int:Signed32 appId]/event\-templates(map headers = {}) returns CollectionResponseTimelineEventTemplateNoPaging|error { - string resourcePath = string `/${getEncodedUri(appId)}/event-templates`; + resource isolated function put [int:Signed32 appId]/event\-templates/[string eventTemplateId]/tokens/[string tokenName](TimelineEventTemplateTokenUpdateRequest payload, map headers = {}) returns TimelineEventTemplateToken|error { + string resourcePath = string `/${getEncodedUri(appId)}/event-templates/${getEncodedUri(eventTemplateId)}/tokens/${getEncodedUri(tokenName)}`; map queryParam = {}; if self.apiKeyConfig is ApiKeysConfig { queryParam["hapikey"] = self.apiKeyConfig?.hapikey; } resourcePath = resourcePath + check getPathForQueryParam(queryParam); - return self.clientEp->get(resourcePath, headers); + http:Request request = new; + json jsonBody = payload.toJson(); + request.setPayload(jsonBody, "application/json"); + return self.clientEp->put(resourcePath, request, headers); } - # Gets a specific event template for your app + # Removes a token from the event template # - # + eventTemplateId - The event template ID. - # + appId - The ID of the target app. + # + eventTemplateId - The event template ID + # + tokenName - The token name + # + appId - The ID of the target app # + headers - Headers to be sent with the request - # + return - successful operation - resource isolated function get [int:Signed32 appId]/event\-templates/[string eventTemplateId](map headers = {}) returns TimelineEventTemplate|error { - string resourcePath = string `/${getEncodedUri(appId)}/event-templates/${getEncodedUri(eventTemplateId)}`; + # + return - No content + resource isolated function delete [int:Signed32 appId]/event\-templates/[string eventTemplateId]/tokens/[string tokenName](map headers = {}) returns error? { + string resourcePath = string `/${getEncodedUri(appId)}/event-templates/${getEncodedUri(eventTemplateId)}/tokens/${getEncodedUri(tokenName)}`; map queryParam = {}; if self.apiKeyConfig is ApiKeysConfig { queryParam["hapikey"] = self.apiKeyConfig?.hapikey; } resourcePath = resourcePath + check getPathForQueryParam(queryParam); - return self.clientEp->get(resourcePath, headers); + return self.clientEp->delete(resourcePath, headers = headers); } # Gets the event # - # + eventTemplateId - The event template ID. - # + eventId - The event ID. + # + eventTemplateId - The event template ID + # + eventId - The event ID # + headers - Headers to be sent with the request # + return - successful operation resource isolated function get events/[string eventTemplateId]/[string eventId](map headers = {}) returns TimelineEventResponse|error { string resourcePath = string `/events/${getEncodedUri(eventTemplateId)}/${getEncodedUri(eventId)}`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app"] = self.apiKeyConfig?.private\-app; - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app"] = self.apiKeyConfig?.privateApp; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } map httpHeaders = http:getHeaderMap(headerValues); return self.clientEp->get(resourcePath, httpHeaders); } - # Gets the detailTemplate as rendered + # Creates multiple events # - # + eventTemplateId - The event template ID. - # + eventId - The event ID. # + headers - Headers to be sent with the request + # + payload - The timeline event definition # + return - successful operation - resource isolated function get events/[string eventTemplateId]/[string eventId]/detail(map headers = {}) returns EventDetail|error { - string resourcePath = string `/events/${getEncodedUri(eventTemplateId)}/${getEncodedUri(eventId)}/detail`; + resource isolated function post events/batch/create(BatchInputTimelineEvent payload, map headers = {}) returns BatchResponseTimelineEventResponse|BatchResponseTimelineEventResponseWithErrors|json|error { + string resourcePath = string `/events/batch/create`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app"] = self.apiKeyConfig?.private\-app; - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; + headerValues["private-app"] = self.apiKeyConfig?.privateApp; } map httpHeaders = http:getHeaderMap(headerValues); - return self.clientEp->get(resourcePath, httpHeaders); + http:Request request = new; + json jsonBody = payload.toJson(); + request.setPayload(jsonBody, "application/json"); + return self.clientEp->post(resourcePath, request, httpHeaders); } # Renders the header or detail as HTML # - # + eventTemplateId - The event template ID. - # + eventId - The event ID. + # + eventTemplateId - The event template ID + # + eventId - The event ID # + headers - Headers to be sent with the request # + queries - Queries to be sent with the request # + return - successful operation @@ -171,42 +160,26 @@ public isolated client class Client { string resourcePath = string `/events/${getEncodedUri(eventTemplateId)}/${getEncodedUri(eventId)}/render`; map headerValues = {...headers}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app"] = self.apiKeyConfig?.private\-app; - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; + headerValues["private-app"] = self.apiKeyConfig?.privateApp; + headerValues["private-app-legacy"] = self.apiKeyConfig?.privateAppLegacy; } resourcePath = resourcePath + check getPathForQueryParam(queries); map httpHeaders = http:getHeaderMap(headerValues); return self.clientEp->get(resourcePath, httpHeaders); } - # Create an event template for your app - # - # + appId - The ID of the target app. - # + headers - Headers to be sent with the request - # + payload - The updated event template definition. - # + return - successful operation - resource isolated function post [int:Signed32 appId]/event\-templates(TimelineEventTemplateCreateRequest payload, map headers = {}) returns TimelineEventTemplate|error { + resource isolated function get [int:Signed32 appId]/event\-templates(map headers = {}) returns CollectionResponseTimelineEventTemplateNoPaging|error { string resourcePath = string `/${getEncodedUri(appId)}/event-templates`; map queryParam = {}; if self.apiKeyConfig is ApiKeysConfig { queryParam["hapikey"] = self.apiKeyConfig?.hapikey; } resourcePath = resourcePath + check getPathForQueryParam(queryParam); - http:Request request = new; - json jsonBody = payload.toJson(); - request.setPayload(jsonBody, "application/json"); - return self.clientEp->post(resourcePath, request, headers); + return self.clientEp->get(resourcePath, headers); } - # Adds a token to an existing event template - # - # + eventTemplateId - The event template ID. - # + appId - The ID of the target app. - # + headers - Headers to be sent with the request - # + payload - The new token definition. - # + return - successful operation - resource isolated function post [int:Signed32 appId]/event\-templates/[string eventTemplateId]/tokens(TimelineEventTemplateToken payload, map headers = {}) returns TimelineEventTemplateToken|error { - string resourcePath = string `/${getEncodedUri(appId)}/event-templates/${getEncodedUri(eventTemplateId)}/tokens`; + resource isolated function post [int:Signed32 appId]/event\-templates(TimelineEventTemplateCreateRequest payload, map headers = {}) returns TimelineEventTemplate|error { + string resourcePath = string `/${getEncodedUri(appId)}/event-templates`; map queryParam = {}; if self.apiKeyConfig is ApiKeysConfig { queryParam["hapikey"] = self.apiKeyConfig?.hapikey; @@ -218,74 +191,67 @@ public isolated client class Client { return self.clientEp->post(resourcePath, request, headers); } - # Create a single event + # Gets a specific event template for your app # + # + eventTemplateId - The event template ID + # + appId - The ID of the target app # + headers - Headers to be sent with the request - # + payload - The timeline event definition. # + return - successful operation - resource isolated function post events(TimelineEvent payload, map headers = {}) returns TimelineEventResponse|error { - string resourcePath = string `/events`; - map headerValues = {...headers}; + resource isolated function get [int:Signed32 appId]/event\-templates/[string eventTemplateId](map headers = {}) returns TimelineEventTemplate|error { + string resourcePath = string `/${getEncodedUri(appId)}/event-templates/${getEncodedUri(eventTemplateId)}`; + map queryParam = {}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; - headerValues["private-app"] = self.apiKeyConfig?.private\-app; + queryParam["hapikey"] = self.apiKeyConfig?.hapikey; } - 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); + resourcePath = resourcePath + check getPathForQueryParam(queryParam); + return self.clientEp->get(resourcePath, headers); } - # Creates multiple events + # Update an existing event template # + # + eventTemplateId - The event template ID + # + appId - The ID of the target app # + headers - Headers to be sent with the request - # + payload - The timeline event definition. + # + payload - The updated event template definition # + return - successful operation - resource isolated function post events/batch/create(BatchInputTimelineEvent payload, map headers = {}) returns BatchResponseTimelineEventResponse|BatchResponseTimelineEventResponseWithErrors|json|error { - string resourcePath = string `/events/batch/create`; - map headerValues = {...headers}; + resource isolated function put [int:Signed32 appId]/event\-templates/[string eventTemplateId](TimelineEventTemplateUpdateRequest payload, map headers = {}) returns TimelineEventTemplate|error { + string resourcePath = string `/${getEncodedUri(appId)}/event-templates/${getEncodedUri(eventTemplateId)}`; + map queryParam = {}; if self.apiKeyConfig is ApiKeysConfig { - headerValues["private-app-legacy"] = self.apiKeyConfig?.private\-app\-legacy; - headerValues["private-app"] = self.apiKeyConfig?.private\-app; + queryParam["hapikey"] = self.apiKeyConfig?.hapikey; } - map httpHeaders = http:getHeaderMap(headerValues); + resourcePath = resourcePath + check getPathForQueryParam(queryParam); 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, headers); } - # Update an existing event template + # Deletes an event template for the app # - # + eventTemplateId - The event template ID. - # + appId - The ID of the target app. + # + eventTemplateId - The event template ID + # + appId - The ID of the target app # + headers - Headers to be sent with the request - # + payload - The updated event template definition. - # + return - successful operation - resource isolated function put [int:Signed32 appId]/event\-templates/[string eventTemplateId](TimelineEventTemplateUpdateRequest payload, map headers = {}) returns TimelineEventTemplate|error { + # + return - No content + resource isolated function delete [int:Signed32 appId]/event\-templates/[string eventTemplateId](map headers = {}) returns error? { string resourcePath = string `/${getEncodedUri(appId)}/event-templates/${getEncodedUri(eventTemplateId)}`; map queryParam = {}; if self.apiKeyConfig is ApiKeysConfig { queryParam["hapikey"] = self.apiKeyConfig?.hapikey; } resourcePath = resourcePath + check getPathForQueryParam(queryParam); - http:Request request = new; - json jsonBody = payload.toJson(); - request.setPayload(jsonBody, "application/json"); - return self.clientEp->put(resourcePath, request, headers); + return self.clientEp->delete(resourcePath, headers = headers); } - # Updates an existing token on an event template + # Adds a token to an existing event template # - # + eventTemplateId - The event template ID. - # + tokenName - The token name. - # + appId - The ID of the target app. + # + eventTemplateId - The event template ID + # + appId - The ID of the target app # + headers - Headers to be sent with the request - # + payload - The updated token definition. + # + payload - The new token definition # + return - successful operation - resource isolated function put [int:Signed32 appId]/event\-templates/[string eventTemplateId]/tokens/[string tokenName](TimelineEventTemplateTokenUpdateRequest payload, map headers = {}) returns TimelineEventTemplateToken|error { - string resourcePath = string `/${getEncodedUri(appId)}/event-templates/${getEncodedUri(eventTemplateId)}/tokens/${getEncodedUri(tokenName)}`; + resource isolated function post [int:Signed32 appId]/event\-templates/[string eventTemplateId]/tokens(TimelineEventTemplateToken payload, map headers = {}) returns TimelineEventTemplateToken|error { + string resourcePath = string `/${getEncodedUri(appId)}/event-templates/${getEncodedUri(eventTemplateId)}/tokens`; map queryParam = {}; if self.apiKeyConfig is ApiKeysConfig { queryParam["hapikey"] = self.apiKeyConfig?.hapikey; @@ -294,6 +260,6 @@ public isolated client class Client { http:Request request = new; json jsonBody = payload.toJson(); request.setPayload(jsonBody, "application/json"); - return self.clientEp->put(resourcePath, request, headers); + return self.clientEp->post(resourcePath, request, headers); } } diff --git a/ballerina/types.bal b/ballerina/types.bal index f5b69fd..15ee3c8 100644 --- a/ballerina/types.bal +++ b/ballerina/types.bal @@ -20,38 +20,38 @@ import ballerina/http; public type TimelineEventIFrame record { - # The text displaying the link that will display the iframe. + # The text displaying the link that will display the iframe string linkLabel; - # The label of the modal window that displays the iframe contents. + # The label of the modal window that displays the iframe contents string headerLabel; - # The width of the modal window in pixels. + # The width of the modal window in pixels int:Signed32 width; - # The URI of the iframe contents. + # The URI of the iframe contents string url; - # The height of the modal window in pixels. + # The height of the modal window in pixels int:Signed32 height; }; -# The state of the timeline event. +# The state of the timeline event public type TimelineEvent record { - # The event template ID. + # The event template ID string eventTemplateId; - # Additional event-specific data that can be interpreted by the template's markdown. + # Additional event-specific data that can be interpreted by the template's markdown record {} extraData?; TimelineEventIFrame timelineIFrame?; - # The event domain (often paired with utk). + # The event domain (often paired with utk) string domain?; - # A collection of token keys and values associated with the template tokens. + # A collection of token keys and values associated with the template tokens record {|string...;|} tokens; - # Identifier for the event. This is optional, and we recommend you do not pass this in. We will create one for you if you omit this. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness. + # Identifier for the event. This is optional, and we recommend you do not pass this in. We will create one for you if you omit this. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness string id?; - # Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie. + # Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie string utk?; - # The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`). + # The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`) string email?; - # The CRM object identifier. This is required for every event other than contacts (where utk or email can be used). + # The CRM object identifier. This is required for every event other than contacts (where utk or email can be used) string objectId?; - # The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline. + # The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline string timestamp?; }; @@ -66,69 +66,50 @@ public type StandardError record { string status; }; -# State of the template definition being updated. -public type TimelineEventTemplateUpdateRequest record { - # This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details. - string detailTemplate?; - # The template name. - string name; - # A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects. - TimelineEventTemplateToken[] tokens; - # The template ID. - string id; - # This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. - string headerTemplate?; -}; - -# The details Markdown rendered as HTML. +# The details Markdown rendered as HTML public type EventDetail record { - # The details Markdown rendered as HTML. + # The details Markdown rendered as HTML string details; }; -# State of the template definition being created. +# State of the template definition being created public type TimelineEventTemplateCreateRequest record { - # This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details. + # This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details string detailTemplate?; - # The template name. + # The template name string name; - # A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects. + # A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects TimelineEventTemplateToken[] tokens; - # This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. + # This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header string headerTemplate?; - # The type of CRM object this template is for. [Contacts, companies, tickets, and deals] are supported. + # The type of CRM object this template is for. [Contacts, companies, tickets, and deals] are supported string objectType; }; -# 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 = ""; -|}; +# State of the template definition being updated +public type TimelineEventTemplateUpdateRequest record { + # This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details + string detailTemplate?; + # The template name + string name; + # A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects + TimelineEventTemplateToken[] tokens; + # The template ID + string id; + # This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header + string headerTemplate?; +}; public type CollectionResponseTimelineEventTemplateNoPaging record { TimelineEventTemplate[] results; }; -# Represents the Queries record for the operation: get-/events/{eventTemplateId}/{eventId}/render_getRenderById -public type GetEventsEventTemplateIdEventIdRenderGetRenderByIdQueries record { - # Set to 'true', we want to render the `detailTemplate` instead of the `headerTemplate`. - boolean detail?; -}; - public type ErrorDetail record { # A specific category that contains more specific detail about the error string subCategory?; # The status code associated with the error detail string code?; - # The name of the field or parameter in which the error was found. + # The name of the field or parameter in which the error was found string 'in?; # Context about the error condition record {|string[]...;|} context?; @@ -136,59 +117,55 @@ public type ErrorDetail record { string message; }; -# The state of the batch event request. +# Represents the Queries record for the operation: get-/events/{eventTemplateId}/{eventId}/render_getRenderById +public type GetEventsEventTemplateIdEventIdRenderGetRenderByIdQueries record { + # Set to 'true', we want to render the `detailTemplate` instead of the `headerTemplate` + boolean detail?; +}; + +# The state of the batch event request public type BatchResponseTimelineEventResponse record { - # The time the request was completed. + # The time the request was completed string completedAt; - # The time the request occurred. + # The time the request occurred string requestedAt?; - # The time the request began processing. + # The time the request began processing string startedAt; record {|string...;|} links?; - # Successfully created events. + # Successfully created events TimelineEventResponse[] results; - # The status of the batch response. Should always be COMPLETED if processed. + # The status of the batch response. Should always be COMPLETED if processed "PENDING"|"PROCESSING"|"CANCELED"|"COMPLETE" status; }; -# Used to create timeline events in batches. +# Used to create timeline events in batches public type BatchInputTimelineEvent record { - # A collection of timeline events we want to create. + # A collection of timeline events we want to create TimelineEvent[] inputs; }; -# 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 TimelineEventTemplateTokenOption record { string label; string value; }; -# The current state of the template definition. +# The current state of the template definition public type TimelineEventTemplate record { - # The date and time that the Event Template was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020. - string createdAt?; - # This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details. + # The date and time that the Event Template was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020 + string? createdAt?; + # This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details string detailTemplate?; - # The template name. + # The template name string name; - # A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects. + # A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects TimelineEventTemplateToken[] tokens; - # The template ID. + # The template ID string id; - # This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header. + # This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header string headerTemplate?; - # The type of CRM object this template is for. [Contacts, companies, tickets, and deals] are supported. + # The type of CRM object this template is for. [Contacts, companies, tickets, and deals] are supported string objectType; - # The date and time that the Event Template was last updated, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020. + # The date and time that the Event Template was last updated, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020 string updatedAt?; }; @@ -199,65 +176,65 @@ public type OAuth2RefreshTokenGrantConfig record {| string refreshUrl = "https://api.hubapi.com/oauth/v1/token"; |}; -# State of the token definition. +# State of the token definition public type TimelineEventTemplateToken record { - # The date and time that the Event Template Token was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020. + # The date and time that the Event Template Token was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020 string createdAt?; - # If type is `enumeration`, we should have a list of options to choose from. + # If type is `enumeration`, we should have a list of options to choose from TimelineEventTemplateTokenOption[] options?; - # The name of the token referenced in the templates. This must be unique for the specific template. It may only contain alphanumeric characters, periods, dashes, or underscores (. - _). + # The name of the token referenced in the templates. This must be unique for the specific template. It may only contain alphanumeric characters, periods, dashes, or underscores (. - _) string name; - # Used for list segmentation and reporting. + # Used for list segmentation and reporting string label; - # The name of the CRM object property. This will populate the CRM object property associated with the event. With enough of these, you can fully build CRM objects via the Timeline API. + # The name of the CRM object property. This will populate the CRM object property associated with the event. With enough of these, you can fully build CRM objects via the Timeline API string? objectPropertyName?; - # The data type of the token. You can currently choose from [string, number, date, enumeration]. + # The data type of the token. You can currently choose from [string, number, date, enumeration] "date"|"enumeration"|"number"|"string" 'type; - # The date and time that the Event Template Token was last updated, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020. + # The date and time that the Event Template Token was last updated, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020 string updatedAt?; }; -# The current state of the timeline event. +# The current state of the timeline event public type TimelineEventResponse record { - # The event template ID. + # The event template ID string eventTemplateId; string? createdAt?; - # Additional event-specific data that can be interpreted by the template's markdown. + # Additional event-specific data that can be interpreted by the template's markdown record {} extraData?; TimelineEventIFrame timelineIFrame?; - # The event domain (often paired with utk). + # The event domain (often paired with utk) string domain?; - # A collection of token keys and values associated with the template tokens. + # A collection of token keys and values associated with the template tokens record {|string...;|} tokens; - # Identifier for the event. This should be unique to the app and event template. If you use the same ID for different CRM objects, the last to be processed will win and the first will not have a record. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness. + # Identifier for the event. This should be unique to the app and event template. If you use the same ID for different CRM objects, the last to be processed will win and the first will not have a record. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness string id; - # Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie. + # Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie string utk?; - # The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`). + # The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`) string email?; - # The CRM object identifier. This is required for every event other than contacts (where utk or email can be used). + # The CRM object identifier. This is required for every event other than contacts (where utk or email can be used) string objectId?; - # The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline. + # The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline string timestamp?; - # The ObjectType associated with the EventTemplate. + # The ObjectType associated with the EventTemplate string objectType; }; -# State of the token definition for update requests. +# State of the token definition for update requests public type TimelineEventTemplateTokenUpdateRequest record { - # If type is `enumeration`, we should have a list of options to choose from. + # If type is `enumeration`, we should have a list of options to choose from TimelineEventTemplateTokenOption[] options?; - # Used for list segmentation and reporting. + # Used for list segmentation and reporting string label; - # The name of the CRM object property. This will populate the CRM object property associated with the event. With enough of these, you can fully build CRM objects via the Timeline API. + # The name of the CRM object property. This will populate the CRM object property associated with the event. With enough of these, you can fully build CRM objects via the Timeline API string objectPropertyName?; }; # Provides API key configurations needed when communicating with a remote HTTP endpoint. public type ApiKeysConfig record {| string hapikey; - string? private\-app\-legacy; - string? private\-app; + string privateAppLegacy; + string privateApp; |}; # Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint. @@ -268,29 +245,35 @@ 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, diff --git a/gradle.properties b/gradle.properties index c6e641c..389daaf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,4 +4,4 @@ version=1.0.1-SNAPSHOT releasePluginVersion=2.8.0 ballerinaGradlePluginVersion=2.3.0 -ballerinaLangVersion=2201.11.0 +ballerinaLangVersion=2201.12.2 From 5e503a74f397871a7be28d0beac5e837c0288444 Mon Sep 17 00:00:00 2001 From: Nuvindu Date: Wed, 9 Apr 2025 16:33:38 +0530 Subject: [PATCH 3/5] Update versions to be compatible with 2201.12.0 --- ballerina/Dependencies.toml | 342 -------------------------- ballerina/tests/tests.bal | 2 +- build-config/resources/Ballerina.toml | 3 - gradle.properties | 4 +- 4 files changed, 3 insertions(+), 348 deletions(-) delete mode 100644 ballerina/Dependencies.toml diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml deleted file mode 100644 index 17e1100..0000000 --- a/ballerina/Dependencies.toml +++ /dev/null @@ -1,342 +0,0 @@ -# AUTO-GENERATED FILE. DO NOT MODIFY. - -# This file is auto-generated by Ballerina for managing dependency versions. -# It should not be modified by hand. - -[ballerina] -dependencies-toml-version = "2" -distribution-version = "2201.11.0" - -[[package]] -org = "ballerina" -name = "auth" -version = "2.13.0" -dependencies = [ - {org = "ballerina", name = "crypto"}, - {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "lang.array"}, - {org = "ballerina", name = "lang.string"}, - {org = "ballerina", name = "log"} -] - -[[package]] -org = "ballerina" -name = "cache" -version = "3.9.0" -dependencies = [ - {org = "ballerina", name = "constraint"}, - {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "task"}, - {org = "ballerina", name = "time"} -] - -[[package]] -org = "ballerina" -name = "constraint" -version = "1.6.0" -dependencies = [ - {org = "ballerina", name = "jballerina.java"} -] - -[[package]] -org = "ballerina" -name = "crypto" -version = "2.8.0" -dependencies = [ - {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "time"} -] - -[[package]] -org = "ballerina" -name = "data.jsondata" -version = "1.0.0" -dependencies = [ - {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "lang.object"} -] - -[[package]] -org = "ballerina" -name = "file" -version = "1.11.0" -dependencies = [ - {org = "ballerina", name = "io"}, - {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "os"}, - {org = "ballerina", name = "time"} -] - -[[package]] -org = "ballerina" -name = "http" -version = "2.13.3" -dependencies = [ - {org = "ballerina", name = "auth"}, - {org = "ballerina", name = "cache"}, - {org = "ballerina", name = "constraint"}, - {org = "ballerina", name = "crypto"}, - {org = "ballerina", name = "data.jsondata"}, - {org = "ballerina", name = "file"}, - {org = "ballerina", name = "io"}, - {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "jwt"}, - {org = "ballerina", name = "lang.array"}, - {org = "ballerina", name = "lang.decimal"}, - {org = "ballerina", name = "lang.int"}, - {org = "ballerina", name = "lang.regexp"}, - {org = "ballerina", name = "lang.runtime"}, - {org = "ballerina", name = "lang.string"}, - {org = "ballerina", name = "lang.value"}, - {org = "ballerina", name = "log"}, - {org = "ballerina", name = "mime"}, - {org = "ballerina", name = "oauth2"}, - {org = "ballerina", name = "observe"}, - {org = "ballerina", name = "time"}, - {org = "ballerina", name = "url"} -] -modules = [ - {org = "ballerina", packageName = "http", moduleName = "http"}, - {org = "ballerina", packageName = "http", moduleName = "http.httpscerr"} -] - -[[package]] -org = "ballerina" -name = "io" -version = "1.7.0" -dependencies = [ - {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "lang.value"} -] - -[[package]] -org = "ballerina" -name = "jballerina.java" -version = "0.0.0" - -[[package]] -org = "ballerina" -name = "jwt" -version = "2.14.0" -dependencies = [ - {org = "ballerina", name = "cache"}, - {org = "ballerina", name = "crypto"}, - {org = "ballerina", name = "io"}, - {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "lang.int"}, - {org = "ballerina", name = "lang.string"}, - {org = "ballerina", name = "log"}, - {org = "ballerina", name = "time"} -] - -[[package]] -org = "ballerina" -name = "lang.__internal" -version = "0.0.0" -dependencies = [ - {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "lang.object"} -] - -[[package]] -org = "ballerina" -name = "lang.array" -version = "0.0.0" -dependencies = [ - {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "lang.__internal"} -] - -[[package]] -org = "ballerina" -name = "lang.decimal" -version = "0.0.0" -dependencies = [ - {org = "ballerina", name = "jballerina.java"} -] - -[[package]] -org = "ballerina" -name = "lang.error" -version = "0.0.0" -scope = "testOnly" -dependencies = [ - {org = "ballerina", name = "jballerina.java"} -] - -[[package]] -org = "ballerina" -name = "lang.int" -version = "0.0.0" -dependencies = [ - {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "lang.__internal"}, - {org = "ballerina", name = "lang.object"} -] - -[[package]] -org = "ballerina" -name = "lang.object" -version = "0.0.0" - -[[package]] -org = "ballerina" -name = "lang.regexp" -version = "0.0.0" -dependencies = [ - {org = "ballerina", name = "jballerina.java"} -] - -[[package]] -org = "ballerina" -name = "lang.runtime" -version = "0.0.0" -dependencies = [ - {org = "ballerina", name = "jballerina.java"} -] -modules = [ - {org = "ballerina", packageName = "lang.runtime", moduleName = "lang.runtime"} -] - -[[package]] -org = "ballerina" -name = "lang.string" -version = "0.0.0" -dependencies = [ - {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "lang.regexp"} -] - -[[package]] -org = "ballerina" -name = "lang.value" -version = "0.0.0" -dependencies = [ - {org = "ballerina", name = "jballerina.java"} -] - -[[package]] -org = "ballerina" -name = "log" -version = "2.11.0" -dependencies = [ - {org = "ballerina", name = "io"}, - {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "lang.value"}, - {org = "ballerina", name = "observe"} -] - -[[package]] -org = "ballerina" -name = "mime" -version = "2.11.0" -dependencies = [ - {org = "ballerina", name = "io"}, - {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "lang.int"}, - {org = "ballerina", name = "log"} -] - -[[package]] -org = "ballerina" -name = "oauth2" -version = "2.13.0" -dependencies = [ - {org = "ballerina", name = "cache"}, - {org = "ballerina", name = "crypto"}, - {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "log"}, - {org = "ballerina", name = "time"}, - {org = "ballerina", name = "url"} -] -modules = [ - {org = "ballerina", packageName = "oauth2", moduleName = "oauth2"} -] - -[[package]] -org = "ballerina" -name = "observe" -version = "1.4.0" -dependencies = [ - {org = "ballerina", name = "jballerina.java"} -] - -[[package]] -org = "ballerina" -name = "os" -version = "1.9.0" -dependencies = [ - {org = "ballerina", name = "io"}, - {org = "ballerina", name = "jballerina.java"} -] - -[[package]] -org = "ballerina" -name = "task" -version = "2.6.0" -dependencies = [ - {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "time"} -] - -[[package]] -org = "ballerina" -name = "test" -version = "0.0.0" -scope = "testOnly" -dependencies = [ - {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "lang.array"}, - {org = "ballerina", name = "lang.error"} -] -modules = [ - {org = "ballerina", packageName = "test", moduleName = "test"} -] - -[[package]] -org = "ballerina" -name = "time" -version = "2.6.0" -dependencies = [ - {org = "ballerina", name = "jballerina.java"} -] - -[[package]] -org = "ballerina" -name = "url" -version = "2.5.0" -dependencies = [ - {org = "ballerina", name = "jballerina.java"} -] -modules = [ - {org = "ballerina", packageName = "url", moduleName = "url"} -] - -[[package]] -org = "ballerinai" -name = "observe" -version = "0.0.0" -dependencies = [ - {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "observe"} -] -modules = [ - {org = "ballerinai", packageName = "observe", moduleName = "observe"} -] - -[[package]] -org = "ballerinax" -name = "hubspot.crm.extensions.timelines" -version = "1.0.0" -dependencies = [ - {org = "ballerina", name = "http"}, - {org = "ballerina", name = "lang.runtime"}, - {org = "ballerina", name = "oauth2"}, - {org = "ballerina", name = "test"}, - {org = "ballerina", name = "url"}, - {org = "ballerinai", name = "observe"} -] -modules = [ - {org = "ballerinax", packageName = "hubspot.crm.extensions.timelines", moduleName = "hubspot.crm.extensions.timelines"} -] - diff --git a/ballerina/tests/tests.bal b/ballerina/tests/tests.bal index 7715707..763a972 100644 --- a/ballerina/tests/tests.bal +++ b/ballerina/tests/tests.bal @@ -59,7 +59,7 @@ isolated function initApiKeyClient() returns Client|error { isolated function initOAuth2Client() returns Client|error { if isLiveServer { - if (clientId == "" || clientSecret == "" || refreshToken == "") { + if clientId == "" || clientSecret == "" || refreshToken == "" { return error("OAuth2 credentials are not available"); } OAuth2RefreshTokenGrantConfig oauthConfig = { diff --git a/build-config/resources/Ballerina.toml b/build-config/resources/Ballerina.toml index 83f2bb6..2d0bb5c 100644 --- a/build-config/resources/Ballerina.toml +++ b/build-config/resources/Ballerina.toml @@ -10,6 +10,3 @@ repository = "https://github.com/ballerina-platform/module-ballerinax-hubspot.cr [build-options] observabilityIncluded = true - -[platform.java21] -graalvmCompatible = true diff --git a/gradle.properties b/gradle.properties index 389daaf..5b88d03 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.caching=true group=io.ballerina.lib -version=1.0.1-SNAPSHOT +version=2.0.0-SNAPSHOT releasePluginVersion=2.8.0 -ballerinaGradlePluginVersion=2.3.0 +ballerinaGradlePluginVersion=3.0.0 ballerinaLangVersion=2201.12.2 From 972620e35da5be112b01bded0d623a7342a81e3a Mon Sep 17 00:00:00 2001 From: Nuvindu Date: Wed, 9 Apr 2025 16:39:15 +0530 Subject: [PATCH 4/5] Apply necessary according to the generated files --- ballerina/tests/tests.bal | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/ballerina/tests/tests.bal b/ballerina/tests/tests.bal index 763a972..d18cd0a 100644 --- a/ballerina/tests/tests.bal +++ b/ballerina/tests/tests.bal @@ -16,7 +16,6 @@ import ballerina/oauth2; import ballerina/test; -import ballerina/http; import ballerina/lang.runtime; final string serviceUrl = isLiveServer? "https://api.hubapi.com/integrators/timeline/v3": "http://localhost:9090"; @@ -42,17 +41,17 @@ isolated function initApiKeyClient() returns Client|error { return error("API Key is missing."); } ApiKeysConfig apiKeyConfig = { - hapikey: hapikey, - private\-app: "", - private\-app\-legacy: "" + hapikey, + privateApp: "", + privateAppLegacy: "" }; return check new ({auth: apiKeyConfig}, serviceUrl); } return check new ({ auth: { hapikey: "abc-def-ghi", - private\-app: "", - private\-app\-legacy: "" + privateApp: "", + privateAppLegacy: "" } }, serviceUrl); }; @@ -211,8 +210,8 @@ function testUpdateToken() returns error? { } function testDeleteToken() returns error? { string tokenName = "petType"; - http:Response response = check hubSpotTimelineApiKey->/[appIdSigned32]/event\-templates/[eventTemplateId]/tokens/[tokenName].delete(); - test:assertEquals(response.statusCode, 204, msg = "Expected status code to be 204"); + error? response = check hubSpotTimelineApiKey->/[appIdSigned32]/event\-templates/[eventTemplateId]/tokens/[tokenName].delete(); + test:assertEquals(response, ()); }; @test:Config { @@ -299,6 +298,6 @@ function testPostEvents() returns error? { groups: ["live_tests", "mock_tests"], dependsOn: [testUpdateToken] } function testDeleteEventTemplate() returns error? { - http:Response response = check hubSpotTimelineApiKey->/[appIdSigned32]/event\-templates/[eventTemplateId].delete(); - test:assertEquals(response.statusCode, 204, msg = "Expected status code to be 204"); + error? response = check hubSpotTimelineApiKey->/[appIdSigned32]/event\-templates/[eventTemplateId].delete(); + test:assertEquals(response, ()); }; From 0d7bf67729e47cc940e87b2c89ff4d0b0f674c99 Mon Sep 17 00:00:00 2001 From: Nuvindu Date: Wed, 9 Apr 2025 16:39:27 +0530 Subject: [PATCH 5/5] Update toml files --- ballerina/Ballerina.toml | 5 +- .../Dependencies.toml | 88 +++++++++++-------- examples/create-event/Ballerina.toml | 6 ++ 3 files changed, 57 insertions(+), 42 deletions(-) rename {examples/create-event => ballerina}/Dependencies.toml (87%) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 9b3481c..e8ea18f 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -2,7 +2,7 @@ distribution = "2201.11.0" org = "ballerinax" name = "hubspot.crm.extensions.timelines" -version = "1.0.0" +version = "2.0.0" license = ["Apache-2.0"] authors = ["Ballerina"] keywords = ["hubspot", "crm", "timelines", "events"] @@ -10,6 +10,3 @@ repository = "https://github.com/ballerina-platform/module-ballerinax-hubspot.cr [build-options] observabilityIncluded = true - -[platform.java21] -graalvmCompatible = true diff --git a/examples/create-event/Dependencies.toml b/ballerina/Dependencies.toml similarity index 87% rename from examples/create-event/Dependencies.toml rename to ballerina/Dependencies.toml index 9beef1a..f96269e 100644 --- a/examples/create-event/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,12 +5,12 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.11.0" +distribution-version = "2201.12.2" [[package]] org = "ballerina" name = "auth" -version = "2.13.0" +version = "2.14.0" dependencies = [ {org = "ballerina", name = "crypto"}, {org = "ballerina", name = "jballerina.java"}, @@ -22,7 +22,7 @@ dependencies = [ [[package]] org = "ballerina" name = "cache" -version = "3.9.0" +version = "3.10.0" dependencies = [ {org = "ballerina", name = "constraint"}, {org = "ballerina", name = "jballerina.java"}, @@ -33,7 +33,7 @@ dependencies = [ [[package]] org = "ballerina" name = "constraint" -version = "1.6.0" +version = "1.7.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -41,7 +41,7 @@ dependencies = [ [[package]] org = "ballerina" name = "crypto" -version = "2.8.0" +version = "2.9.0" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "time"} @@ -50,7 +50,7 @@ dependencies = [ [[package]] org = "ballerina" name = "data.jsondata" -version = "1.0.0" +version = "1.1.0" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "lang.object"} @@ -59,7 +59,7 @@ dependencies = [ [[package]] org = "ballerina" name = "file" -version = "1.11.0" +version = "1.12.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, @@ -70,7 +70,7 @@ dependencies = [ [[package]] org = "ballerina" name = "http" -version = "2.13.3" +version = "2.14.0" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, @@ -95,18 +95,19 @@ dependencies = [ {org = "ballerina", name = "time"}, {org = "ballerina", name = "url"} ] +modules = [ + {org = "ballerina", packageName = "http", moduleName = "http"}, + {org = "ballerina", packageName = "http", moduleName = "http.httpscerr"} +] [[package]] org = "ballerina" name = "io" -version = "1.7.0" +version = "1.8.0" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "lang.value"} ] -modules = [ - {org = "ballerina", packageName = "io", moduleName = "io"} -] [[package]] org = "ballerina" @@ -116,7 +117,7 @@ version = "0.0.0" [[package]] org = "ballerina" name = "jwt" -version = "2.14.0" +version = "2.15.0" dependencies = [ {org = "ballerina", name = "cache"}, {org = "ballerina", name = "crypto"}, @@ -154,6 +155,15 @@ dependencies = [ {org = "ballerina", name = "jballerina.java"} ] +[[package]] +org = "ballerina" +name = "lang.error" +version = "0.0.0" +scope = "testOnly" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + [[package]] org = "ballerina" name = "lang.int" @@ -208,7 +218,7 @@ dependencies = [ [[package]] org = "ballerina" name = "log" -version = "2.11.0" +version = "2.12.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, @@ -219,7 +229,7 @@ dependencies = [ [[package]] org = "ballerina" name = "mime" -version = "2.11.0" +version = "2.12.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, @@ -230,7 +240,7 @@ dependencies = [ [[package]] org = "ballerina" name = "oauth2" -version = "2.13.0" +version = "2.14.0" dependencies = [ {org = "ballerina", name = "cache"}, {org = "ballerina", name = "crypto"}, @@ -246,7 +256,7 @@ modules = [ [[package]] org = "ballerina" name = "observe" -version = "1.4.0" +version = "1.5.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -254,7 +264,7 @@ dependencies = [ [[package]] org = "ballerina" name = "os" -version = "1.9.0" +version = "1.10.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"} @@ -263,16 +273,30 @@ dependencies = [ [[package]] org = "ballerina" name = "task" -version = "2.6.0" +version = "2.7.0" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "time"} ] +[[package]] +org = "ballerina" +name = "test" +version = "0.0.0" +scope = "testOnly" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.array"}, + {org = "ballerina", name = "lang.error"} +] +modules = [ + {org = "ballerina", packageName = "test", moduleName = "test"} +] + [[package]] org = "ballerina" name = "time" -version = "2.6.0" +version = "2.7.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -280,10 +304,13 @@ dependencies = [ [[package]] org = "ballerina" name = "url" -version = "2.5.0" +version = "2.6.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] +modules = [ + {org = "ballerina", packageName = "url", moduleName = "url"} +] [[package]] org = "ballerinai" @@ -300,12 +327,12 @@ modules = [ [[package]] org = "ballerinax" name = "hubspot.crm.extensions.timelines" -version = "1.0.0" +version = "2.0.0" dependencies = [ {org = "ballerina", name = "http"}, {org = "ballerina", name = "lang.runtime"}, {org = "ballerina", name = "oauth2"}, - {org = "ballerina", name = "os"}, + {org = "ballerina", name = "test"}, {org = "ballerina", name = "url"}, {org = "ballerinai", name = "observe"} ] @@ -313,18 +340,3 @@ modules = [ {org = "ballerinax", packageName = "hubspot.crm.extensions.timelines", moduleName = "hubspot.crm.extensions.timelines"} ] -[[package]] -org = "thinuri" -name = "create_evenTemplates" -version = "0.1.0" -dependencies = [ - {org = "ballerina", name = "io"}, - {org = "ballerina", name = "lang.runtime"}, - {org = "ballerina", name = "oauth2"}, - {org = "ballerinai", name = "observe"}, - {org = "ballerinax", name = "hubspot.crm.extensions.timelines"} -] -modules = [ - {org = "thinuri", packageName = "create_evenTemplates", moduleName = "create_evenTemplates"} -] - diff --git a/examples/create-event/Ballerina.toml b/examples/create-event/Ballerina.toml index ea64b87..c64e699 100644 --- a/examples/create-event/Ballerina.toml +++ b/examples/create-event/Ballerina.toml @@ -4,5 +4,11 @@ name = "create_evenTemplates" version = "0.1.0" distribution = "2201.11.0" +[[dependency]] +org = "ballerinax" +name = "hubspot.crm.extensions.timelines" +version = "0.1.0" +repository="local" + [build-options] observabilityIncluded = true