From 60b9d8733eb12170c70a286562d5bbf1b7666143 Mon Sep 17 00:00:00 2001 From: Jakub Duras Date: Wed, 26 Aug 2026 09:42:41 +0000 Subject: [PATCH 1/4] feat(customer-portal-client): add P1Y visualization interval Mirrors the customer-portal-api contract change; types regenerated. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Ud4GPLxfL8mSWG7FGNibzp --- .changeset/customer-portal-client-p1y-interval.md | 7 +++++++ clients/customer-portal-client/src/openapi.d.ts | 8 ++++---- clients/customer-portal-client/src/openapi.json | 12 ++++++++---- 3 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 .changeset/customer-portal-client-p1y-interval.md diff --git a/.changeset/customer-portal-client-p1y-interval.md b/.changeset/customer-portal-client-p1y-interval.md new file mode 100644 index 00000000..dc568b2b --- /dev/null +++ b/.changeset/customer-portal-client-p1y-interval.md @@ -0,0 +1,7 @@ +--- +"@epilot/customer-portal-client": minor +--- + +Add `P1Y` to the visualization interval enums + +`getConsumption` / `getCosts` / `getPrices` `interval` params and `VisualizationMetadata.intervals` accept `P1Y`, so integrations can advertise and serve yearly data points (e.g. user-reported meter readings covering roughly a year each). diff --git a/clients/customer-portal-client/src/openapi.d.ts b/clients/customer-portal-client/src/openapi.d.ts index 63202e80..9e293aa8 100644 --- a/clients/customer-portal-client/src/openapi.d.ts +++ b/clients/customer-portal-client/src/openapi.d.ts @@ -9667,7 +9667,7 @@ declare namespace Components { /** * Intervals supported for the current context. If omitted, all intervals are assumed supported. */ - intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M")[]; + intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y")[]; data_range?: /* Earliest / latest timestamps for which data is available in the current context. */ VisualizationDataRange; } export interface VisualizationTypeOption { @@ -11358,7 +11358,7 @@ declare namespace Paths { export type ExtensionId = string; export type From = string; // date-time export type HookId = string; - export type Interval = "PT15M" | "PT1H" | "P1D" | "P1M"; + export type Interval = "PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y"; export type MeterId = string; export type To = string; // date-time } @@ -11715,7 +11715,7 @@ declare namespace Paths { export type ExtensionId = string; export type From = string; // date-time export type HookId = string; - export type Interval = "PT15M" | "PT1H" | "P1D" | "P1M"; + export type Interval = "PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y"; export type MeterId = string; export type To = string; // date-time } @@ -14583,7 +14583,7 @@ declare namespace Paths { export type ExtensionId = string; export type From = string; // date-time export type HookId = string; - export type Interval = "PT15M" | "PT1H" | "P1D" | "P1M"; + export type Interval = "PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y"; export type MeterId = string; export type To = string; // date-time } diff --git a/clients/customer-portal-client/src/openapi.json b/clients/customer-portal-client/src/openapi.json index 99149a27..81708761 100644 --- a/clients/customer-portal-client/src/openapi.json +++ b/clients/customer-portal-client/src/openapi.json @@ -961,7 +961,8 @@ "PT15M", "PT1H", "P1D", - "P1M" + "P1M", + "P1Y" ] }, "required": true, @@ -1299,7 +1300,8 @@ "PT15M", "PT1H", "P1D", - "P1M" + "P1M", + "P1Y" ] }, "required": true, @@ -1473,7 +1475,8 @@ "PT15M", "PT1H", "P1D", - "P1M" + "P1M", + "P1Y" ] }, "required": true, @@ -16578,7 +16581,8 @@ "PT15M", "PT1H", "P1D", - "P1M" + "P1M", + "P1Y" ] } }, From e64823c36b8d4ec6262ba419057154e758f853e7 Mon Sep 17 00:00:00 2001 From: Jakub Duras Date: Thu, 27 Aug 2026 06:38:10 +0000 Subject: [PATCH 2/4] chore(customer-portal-client): regenerate from merged customer-portal-api main Picks up drift merged since the P1Y commit: engagement_center_enabled, page_id/config_id/global_search_config_id, and description tweaks. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Ud4GPLxfL8mSWG7FGNibzp --- .../customer-portal-client/src/openapi.d.ts | 51 +++++++++++++++++-- .../customer-portal-client/src/openapi.json | 30 +++++++++-- 2 files changed, 73 insertions(+), 8 deletions(-) diff --git a/clients/customer-portal-client/src/openapi.d.ts b/clients/customer-portal-client/src/openapi.d.ts index 9e293aa8..b3f6a7cb 100644 --- a/clients/customer-portal-client/src/openapi.d.ts +++ b/clients/customer-portal-client/src/openapi.d.ts @@ -1463,6 +1463,10 @@ declare namespace Components { * Configures which 360 events generate an in-app notification for the portal user. Each enabled trigger renders the referenced notification template and creates a notification addressed to the portal user. Admin/builder-only — never exposed via the public portal config. */ notification_triggers?: NotificationTriggerConfig[]; + /** + * Master toggle for the portal's engagement center (in-app notifications including the notification triggers above). Off when absent — portal users only see the engagement center and receive trigger notifications after an admin enables it. + */ + engagement_center_enabled?: boolean; } export interface CommonConfigAttributesV3 { /** @@ -3293,7 +3297,27 @@ declare namespace Components { templates?: { [name: string]: string; }; - templates_ref?: /* Reference to admin-authored portal configuration (a page block or a global search configuration item) from which the API derives Handlebars templates server-side. This replaces client-supplied template strings so portal users can never submit arbitrary templates for resolution. When both a reference and raw `templates` are provided, the reference wins and the raw templates are ignored. */ TemplatesRef; + /** + * Reference to admin-authored portal configuration (a page block or a global search configuration item) from which the API derives Handlebars templates server-side. This replaces client-supplied template strings so portal users can never submit arbitrary templates for resolution. When both a reference and raw `templates` are provided, the reference wins and the raw templates are ignored. + */ + templates_ref?: { + /** + * ID of the portal page to derive templates from. When given without `block_id`, templates are derived from every block of the page and returned resolved as a nested map keyed by block id (the entity detail page contract). + */ + page_id?: string; + /** + * ID of a block within the page. Templates are derived from the block's content according to its block type (e.g. meter_selector, meter_reading, entity_list). + */ + block_id?: string; + /** + * For blocks carrying a per-schema configuration array (entity_list), the id of the configuration item to derive templates from. Requires `page_id` and `block_id`. + */ + config_id?: string; + /** + * ID of the portal's `global_search` configuration item to derive search result templates and the group title template from. Mutually exclusive with `page_id`. + */ + global_search_config_id?: string; + }; } export interface EntityTemplates { /** @@ -6613,6 +6637,10 @@ declare namespace Components { * Configures which 360 events generate an in-app notification for the portal user. Each enabled trigger renders the referenced notification template and creates a notification addressed to the portal user. Admin/builder-only — never exposed via the public portal config. */ notification_triggers?: NotificationTriggerConfig[]; + /** + * Master toggle for the portal's engagement center (in-app notifications including the notification triggers above). Off when absent — portal users only see the engagement center and receive trigger notifications after an admin enables it. + */ + engagement_center_enabled?: boolean; /** * ID of the organization * example: @@ -8106,11 +8134,14 @@ declare namespace Components { */ code: string; /** - * The redirect uri + * The redirect uri used in the authorization request. Optional: when omitted it is + * resolved server-side from the provider's configured `redirect_uri`, falling back to + * the portal's own callback route (`https:///sso`). + * * example: - * https://customer-portal.com/login + * https://customer-portal.com/sso */ - redirect_uri: string; + redirect_uri?: string; /** * The client id * example: @@ -9014,6 +9045,10 @@ declare namespace Components { * Configures which 360 events generate an in-app notification for the portal user. Each enabled trigger renders the referenced notification template and creates a notification addressed to the portal user. Admin/builder-only — never exposed via the public portal config. */ notification_triggers?: NotificationTriggerConfig[]; + /** + * Master toggle for the portal's engagement center (in-app notifications including the notification triggers above). Off when absent — portal users only see the engagement center and receive trigger notifications after an admin enables it. + */ + engagement_center_enabled?: boolean; } export interface UpsertPortalConfigV3 { /** @@ -13561,6 +13596,10 @@ declare namespace Paths { * Configures which 360 events generate an in-app notification for the portal user. Each enabled trigger renders the referenced notification template and creates a notification addressed to the portal user. Admin/builder-only — never exposed via the public portal config. */ notification_triggers?: Components.Schemas.NotificationTriggerConfig[]; + /** + * Master toggle for the portal's engagement center (in-app notifications including the notification triggers above). Off when absent — portal users only see the engagement center and receive trigger notifications after an admin enables it. + */ + engagement_center_enabled?: boolean; /** * ID of the organization * example: @@ -14183,6 +14222,10 @@ declare namespace Paths { * Configures which 360 events generate an in-app notification for the portal user. Each enabled trigger renders the referenced notification template and creates a notification addressed to the portal user. Admin/builder-only — never exposed via the public portal config. */ notification_triggers?: Components.Schemas.NotificationTriggerConfig[]; + /** + * Master toggle for the portal's engagement center (in-app notifications including the notification triggers above). Off when absent — portal users only see the engagement center and receive trigger notifications after an admin enables it. + */ + engagement_center_enabled?: boolean; /** * ID of the organization * example: diff --git a/clients/customer-portal-client/src/openapi.json b/clients/customer-portal-client/src/openapi.json index 81708761..b4b46ae1 100644 --- a/clients/customer-portal-client/src/openapi.json +++ b/clients/customer-portal-client/src/openapi.json @@ -13045,6 +13045,10 @@ "items": { "$ref": "#/components/schemas/NotificationTriggerConfig" } + }, + "engagement_center_enabled": { + "type": "boolean", + "description": "Master toggle for the portal's engagement center (in-app notifications including the notification triggers above). Off when absent — portal users only see the engagement center and receive trigger notifications after an admin enables it." } } }, @@ -13950,7 +13954,26 @@ } }, "templates_ref": { - "$ref": "#/components/schemas/TemplatesRef" + "type": "object", + "description": "Reference to admin-authored portal configuration (a page block or a global search configuration item) from which the API derives Handlebars templates server-side. This replaces client-supplied template strings so portal users can never submit arbitrary templates for resolution. When both a reference and raw `templates` are provided, the reference wins and the raw templates are ignored.", + "properties": { + "page_id": { + "type": "string", + "description": "ID of the portal page to derive templates from. When given without `block_id`, templates are derived from every block of the page and returned resolved as a nested map keyed by block id (the entity detail page contract)." + }, + "block_id": { + "type": "string", + "description": "ID of a block within the page. Templates are derived from the block's content according to its block type (e.g. meter_selector, meter_reading, entity_list)." + }, + "config_id": { + "type": "string", + "description": "For blocks carrying a per-schema configuration array (entity_list), the id of the configuration item to derive templates from. Requires `page_id` and `block_id`." + }, + "global_search_config_id": { + "type": "string", + "description": "ID of the portal's `global_search` configuration item to derive search result templates and the group title template from. Mutually exclusive with `page_id`." + } + } } } }, @@ -18687,7 +18710,6 @@ "token_endpoint", "grant_type", "code", - "redirect_uri", "client_id", "code_verifier" ], @@ -18713,8 +18735,8 @@ }, "redirect_uri": { "type": "string", - "description": "The redirect uri", - "example": "https://customer-portal.com/login" + "description": "The redirect uri used in the authorization request. Optional: when omitted it is\nresolved server-side from the provider's configured `redirect_uri`, falling back to\nthe portal's own callback route (`https:///sso`).\n", + "example": "https://customer-portal.com/sso" }, "client_id": { "type": "string", From deb1d8335b0fc7f45a41df661253d816b7f5c86b Mon Sep 17 00:00:00 2001 From: Jakub Duras Date: Thu, 27 Aug 2026 12:55:38 +0200 Subject: [PATCH 3/4] chore: remove unwanted changeset --- .changeset/customer-portal-client-p1y-interval.md | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 .changeset/customer-portal-client-p1y-interval.md diff --git a/.changeset/customer-portal-client-p1y-interval.md b/.changeset/customer-portal-client-p1y-interval.md deleted file mode 100644 index dc568b2b..00000000 --- a/.changeset/customer-portal-client-p1y-interval.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@epilot/customer-portal-client": minor ---- - -Add `P1Y` to the visualization interval enums - -`getConsumption` / `getCosts` / `getPrices` `interval` params and `VisualizationMetadata.intervals` accept `P1Y`, so integrations can advertise and serve yearly data points (e.g. user-reported meter readings covering roughly a year each). From 3b03dc6abc06a06b07b2c4f7e3f87e387af35481 Mon Sep 17 00:00:00 2001 From: Jakub Duras Date: Thu, 27 Aug 2026 17:33:20 +0200 Subject: [PATCH 4/4] chore(customer-portal-client): bump version --- clients/customer-portal-client/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/customer-portal-client/package.json b/clients/customer-portal-client/package.json index fa05d455..d78abe83 100644 --- a/clients/customer-portal-client/package.json +++ b/clients/customer-portal-client/package.json @@ -1,6 +1,6 @@ { "name": "@epilot/customer-portal-client", - "version": "0.43.0", + "version": "0.44.0", "description": "API Client for epilot portal API", "main": "dist/index.js", "types": "dist/index.d.ts",