From f5e414787fc852c900456f632a0162a740d37bfa Mon Sep 17 00:00:00 2001 From: robertlangner-fin Date: Fri, 28 Aug 2026 10:06:07 +0100 Subject: [PATCH 1/4] Add transform_code_block to Data Connector (Detail) schema Companion to intercom/intercom#565820. --- descriptions/0/api.intercom.io.yaml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/descriptions/0/api.intercom.io.yaml b/descriptions/0/api.intercom.io.yaml index 3ad3e2e..6b20d04 100644 --- a/descriptions/0/api.intercom.io.yaml +++ b/descriptions/0/api.intercom.io.yaml @@ -17246,7 +17246,12 @@ paths: - leads execution_type: server_side configuration_response_type: test_response_type - data_transformation_type: + data_transformation_type: code_block_transformation + transform_code_block: + code: | + def transform(response): + return {"status": response["order_status"]} + language: python client_function_name: client_function_timeout_ms: data_inputs: @@ -17461,6 +17466,7 @@ paths: execution_type: server_side configuration_response_type: test_response_type data_transformation_type: + transform_code_block: client_function_name: client_function_timeout_ms: data_inputs: @@ -35295,6 +35301,25 @@ components: - full_access - redacted_access - code_block_transformation + transform_code_block: + type: object + nullable: true + description: | + The code block used to transform the connector's response when `data_transformation_type` is + `code_block_transformation`. Omitted if the connector has no transform code block configured. + properties: + code: + type: string + description: The source code of the transform code block. + example: | + def transform(response): + return {"status": response["order_status"]} + language: + type: string + description: The programming language of the transform code block. + enum: + - python + example: python client_function_name: type: string nullable: true From 6f73a261e229ee3844851ee6020d2c7484d202bd Mon Sep 17 00:00:00 2001 From: robertlangner-fin Date: Fri, 28 Aug 2026 12:52:43 +0100 Subject: [PATCH 2/4] Drop single-value enum on transform code block language A one-member enum generates a closed union type in the SDKs, making a future language addition breaking. Document the current value instead. --- descriptions/0/api.intercom.io.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/descriptions/0/api.intercom.io.yaml b/descriptions/0/api.intercom.io.yaml index 6b20d04..7b6e94d 100644 --- a/descriptions/0/api.intercom.io.yaml +++ b/descriptions/0/api.intercom.io.yaml @@ -35316,9 +35316,7 @@ components: return {"status": response["order_status"]} language: type: string - description: The programming language of the transform code block. - enum: - - python + description: The programming language of the transform code block. Currently always `python`. example: python client_function_name: type: string From 5e47f18aeea898e2fe2eb1d191e12e53f7686eb5 Mon Sep 17 00:00:00 2001 From: robertlangner-fin Date: Fri, 28 Aug 2026 13:24:23 +0100 Subject: [PATCH 3/4] Omit transform_code_block from the update response example The detail presenter compacts nil values, so the field is absent rather than null when no code block applies. --- descriptions/0/api.intercom.io.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/descriptions/0/api.intercom.io.yaml b/descriptions/0/api.intercom.io.yaml index 7b6e94d..da99a4d 100644 --- a/descriptions/0/api.intercom.io.yaml +++ b/descriptions/0/api.intercom.io.yaml @@ -17466,7 +17466,6 @@ paths: execution_type: server_side configuration_response_type: test_response_type data_transformation_type: - transform_code_block: client_function_name: client_function_timeout_ms: data_inputs: From 754cab418f642c47827e43de3d1098aef554af68 Mon Sep 17 00:00:00 2001 From: robertlangner-fin Date: Fri, 28 Aug 2026 13:56:12 +0100 Subject: [PATCH 4/4] Add property-level example to transform_code_block Keeps the schema identical to the developer-docs copy, whose conventions guide requires an example on every property. --- descriptions/0/api.intercom.io.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/descriptions/0/api.intercom.io.yaml b/descriptions/0/api.intercom.io.yaml index da99a4d..ad45343 100644 --- a/descriptions/0/api.intercom.io.yaml +++ b/descriptions/0/api.intercom.io.yaml @@ -35306,6 +35306,11 @@ components: description: | The code block used to transform the connector's response when `data_transformation_type` is `code_block_transformation`. Omitted if the connector has no transform code block configured. + example: + code: | + def transform(response): + return {"status": response["order_status"]} + language: python properties: code: type: string