diff --git a/clients/customer-portal-client/CHANGELOG.md b/clients/customer-portal-client/CHANGELOG.md index e914fbd8..2ce541cd 100644 --- a/clients/customer-portal-client/CHANGELOG.md +++ b/clients/customer-portal-client/CHANGELOG.md @@ -1,5 +1,13 @@ # @epilot/customer-portal-client +## 0.53.0 + +### Minor Changes + +- `x-epilot-agent` annotations on the operations that change a portal's live configuration (`effect: config` on `upsertPortal`, `putPortalConfig`, `publishPortalRevision`, `createPortalRevision`, `clonePortalConfig`, the page and block writes, the email template and widget upserts and `putMobileConfig`; `effect: destructive` on `swapPortalConfig`), so agents ask a person before calling them +- Metering pass-throughs: `getContractMeters`, `getMeter`, `getMeterCounters`, `getMeterCounter`, `getAllowedMeterReading`, `createMeterReadings`, with `MeterCounter` and `PortalMeterReading` +- `cognito_details` and the page `is_system` flag are documented as server-managed + ## 0.52.1 ### Patch Changes diff --git a/clients/customer-portal-client/package.json b/clients/customer-portal-client/package.json index cd588ca2..9439be43 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.52.1", + "version": "0.53.0", "description": "API Client for epilot portal API", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/clients/customer-portal-client/src/openapi-runtime.json b/clients/customer-portal-client/src/openapi-runtime.json index f0655cb5..96bcedef 100644 --- a/clients/customer-portal-client/src/openapi-runtime.json +++ b/clients/customer-portal-client/src/openapi-runtime.json @@ -2112,6 +2112,95 @@ "responses": {} } }, + "/v2/portal/metering/meter/{meter_id}": { + "get": { + "operationId": "getMeter", + "parameters": [ + { + "in": "path", + "name": "meter_id", + "required": true + } + ], + "responses": {} + } + }, + "/v2/portal/metering/meter/{meter_id}/counters": { + "get": { + "operationId": "getMeterCounters", + "parameters": [ + { + "in": "path", + "name": "meter_id", + "required": true + } + ], + "responses": {} + } + }, + "/v2/portal/metering/meter/{meter_id}/readings": { + "post": { + "operationId": "createMeterReadings", + "parameters": [ + { + "in": "path", + "name": "meter_id", + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": {} + } + }, + "responses": {} + } + }, + "/v2/portal/metering/meter/{meter_id}/allowed-reading": { + "get": { + "operationId": "getAllowedMeterReading", + "parameters": [ + { + "in": "path", + "name": "meter_id", + "required": true + }, + { + "in": "query", + "name": "timestamp", + "required": false + } + ], + "responses": {} + } + }, + "/v2/portal/metering/counter/{counter_id}": { + "get": { + "operationId": "getMeterCounter", + "parameters": [ + { + "in": "path", + "name": "counter_id", + "required": true + } + ], + "responses": {} + } + }, + "/v2/portal/metering/contract/{contract_id}/meters": { + "get": { + "operationId": "getContractMeters", + "parameters": [ + { + "in": "path", + "name": "contract_id", + "required": true + } + ], + "responses": {} + } + }, "/v2/portal/public/sso/providers/{provider_slug}": { "get": { "operationId": "getSSOProvider", diff --git a/clients/customer-portal-client/src/openapi.d.ts b/clients/customer-portal-client/src/openapi.d.ts index 09df4152..9aa711c3 100644 --- a/clients/customer-portal-client/src/openapi.d.ts +++ b/clients/customer-portal-client/src/openapi.d.ts @@ -1168,7 +1168,7 @@ declare namespace Components { prevent_user_enumeration?: boolean; }; /** - * AWS Cognito Pool details for the portal + * AWS Cognito Pool details for the portal. Pool and client identifiers are server-managed and ignored on write. */ cognito_details?: { /** @@ -1748,7 +1748,7 @@ declare namespace Components { prevent_user_enumeration?: boolean; }; /** - * AWS Cognito Pool details for the portal + * AWS Cognito Pool details for the portal. Pool and client identifiers are server-managed and ignored on write. */ cognito_details?: { /** @@ -5519,6 +5519,61 @@ declare namespace Components { }; schema?: string; } + /** + * A counter (measurement channel) of a meter + */ + export interface MeterCounter { + _id: /** + * Entity ID + * example: + * 5da0a718-c822-403d-9f5d-20d4584e0528 + */ + EntityId /* uuid */; + /** + * Title of the entity + * example: + * Example Entity + */ + _title: string; + /** + * Organization ID the entity belongs to + * example: + * 123 + */ + _org: string; + /** + * Array of entity tags + * example: + * [ + * "example", + * "mock" + * ] + */ + _tags?: string[]; + /** + * Creation timestamp of the entity + * example: + * 2021-02-09T12:41:43.662Z + */ + _created_at: string; // date-time + /** + * Last update timestamp of the entity + * example: + * 2021-02-09T12:41:43.662Z + */ + _updated_at: string; // date-time + _schema: "meter_counter"; + obis_number?: string; + direction?: Direction; + transformer_ratio?: number; + unit?: string; + forecast_reading_value?: string; + forecast_as_of?: string; + current_consumption?: number; + last_reading?: string; + conversion_factor?: number; + tariff_type?: TariffType; + } export interface MeterReading { /** * The reading value of the meter @@ -6415,7 +6470,7 @@ declare namespace Components { */ order: number; /** - * Whether the page is a system page + * Whether the page is a system page. Server-managed on createPortalPage and updatePortalPage. * example: * false */ @@ -6581,7 +6636,7 @@ declare namespace Components { */ order: number; /** - * Whether the page is a system page + * Whether the page is a system page. Server-managed on createPortalPage and updatePortalPage. * example: * false */ @@ -6770,7 +6825,7 @@ declare namespace Components { prevent_user_enumeration?: boolean; }; /** - * AWS Cognito Pool details for the portal + * AWS Cognito Pool details for the portal. Pool and client identifiers are server-managed and ignored on write. */ cognito_details?: { /** @@ -7605,7 +7660,7 @@ declare namespace Components { prevent_user_enumeration?: boolean; }; /** - * AWS Cognito Pool details for the portal + * AWS Cognito Pool details for the portal. Pool and client identifiers are server-managed and ignored on write. */ cognito_details?: { /** @@ -8277,8 +8332,7 @@ declare namespace Components { * }, * "elements": { * "icon_actions": { - * "style": "ghost", - * "color": "primary" + * "variant": "icon" * } * } * } @@ -8300,8 +8354,7 @@ declare namespace Components { * }, * "elements": { * "icon_actions": { - * "style": "ghost", - * "color": "primary" + * "variant": "icon" * } * } * } @@ -8319,16 +8372,11 @@ declare namespace Components { }; elements?: { /** - * Icon buttons in the header bar + * Icon buttons in the header bar (inbox, profile, menu). They draw as the Button variant picked here, with that variant's look in the portal design; unset keeps the icon variant. + * */ icon_actions?: { - style?: "solid" | "soft" | "surface" | "outline" | "ghost"; - /** - * A button colour, or a custom colour of the portal's design by id - */ - color?: /* A button colour, or a custom colour of the portal's design by id */ ("primary" | "neutral" | "danger") | { - custom: string; // ^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$ - }; + variant?: "primary" | "secondary" | "tertiary" | "icon"; }; }; } | null; @@ -8338,6 +8386,40 @@ declare namespace Components { * 453ad7bf-86d5-46c8-8252-bcc868df5e3c */ export type PortalId = string; + /** + * A meter reading submitted by a portal user for a counter of the meter in the path. + */ + export interface PortalMeterReading { + value: number; + counter_id: /** + * Entity ID + * example: + * 5da0a718-c822-403d-9f5d-20d4584e0528 + */ + EntityId /* uuid */; + direction?: Direction; + timestamp?: string; + read_by?: /** + * The person who recorded the reading + * example: + * John Doe + */ + ReadBy; + reason?: /** + * The reason for recording the reading + * If no reason is specified or left empty, the Epilot UI will show 'Regular' as the default display text + * + * example: + * Storing the feed-in record + */ + Reason; + source?: Source; + status?: ReadingStatus; + remark?: string | null; + metadata?: { + [name: string]: string; + }; + } /** * Portal-facing overrides of a flow or stage title, configured per portal * audience in the Flows Hub. Served unresolved because this endpoint asks @@ -8796,7 +8878,7 @@ declare namespace Components { prevent_user_enumeration?: boolean; }; /** - * AWS Cognito Pool details for the portal + * AWS Cognito Pool details for the portal. Pool and client identifiers are server-managed and ignored on write. */ cognito_details?: { /** @@ -9353,7 +9435,9 @@ declare namespace Components { * ones otherwise), runs the contact lookup and the `registrationIdentifiersCheck` * hook on them, and refuses to issue tokens (403) unless there are at least two. * Entries without `name` or `schema` are ignored. A `validation_rule_id` on an - * identifier (own or inherited) is checked before the lookup. + * identifier (own or inherited) is checked before the lookup. An own identifier without + * a `validation_rule_id` uses the rule of the portal's registration identifier for the + * same field (`schema` and `name`), if that has one. * * example: * [ @@ -10515,7 +10599,7 @@ declare namespace Components { */ order: number; /** - * Whether the page is a system page + * Whether the page is a system page. Server-managed on createPortalPage and updatePortalPage. * example: * false */ @@ -11378,7 +11462,7 @@ declare namespace Components { prevent_user_enumeration?: boolean; }; /** - * AWS Cognito Pool details for the portal + * AWS Cognito Pool details for the portal. Pool and client identifiers are server-managed and ignored on write. */ cognito_details?: { /** @@ -12022,7 +12106,7 @@ declare namespace Components { prevent_user_enumeration?: boolean; }; /** - * AWS Cognito Pool details for the portal + * AWS Cognito Pool details for the portal. Pool and client identifiers are server-managed and ignored on write. */ cognito_details?: { /** @@ -13189,6 +13273,127 @@ declare namespace Paths { export type $500 = Components.Responses.InternalServerError; } } + namespace CreateMeterReadings { + namespace Parameters { + export type MeterId = string; + } + export interface PathParameters { + meter_id: Parameters.MeterId; + } + export interface RequestBody { + readings: [ + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading?, + /* A meter reading submitted by a portal user for a counter of the meter in the path. */ Components.Schemas.PortalMeterReading? + ]; + } + namespace Responses { + export interface $200 { + data?: Components.Schemas.MeterReading[]; + } + export type $400 = Components.Responses.InvalidRequest; + export type $401 = Components.Responses.Unauthorized; + export type $403 = Components.Responses.Forbidden; + export type $500 = Components.Responses.InternalServerError; + } + } namespace CreatePortalConfig { export type RequestBody = Components.Schemas.UpsertPortalConfigV3; namespace Responses { @@ -14082,6 +14287,40 @@ declare namespace Paths { export type $500 = Components.Responses.InternalServerError; } } + namespace GetAllowedMeterReading { + namespace Parameters { + export type MeterId = string; + /** + * example: + * 2022-10-01T10:10:00.000Z + */ + export type Timestamp = string; + } + export interface PathParameters { + meter_id: Parameters.MeterId; + } + export interface QueryParameters { + timestamp?: /** + * example: + * 2022-10-01T10:10:00.000Z + */ + Parameters.Timestamp; + } + namespace Responses { + export interface $200 { + data?: { + counter_id?: string; + min_value?: number; + max_value?: number; + last_reading?: string; // date-time + }[]; + } + export type $400 = Components.Responses.InvalidRequest; + export type $401 = Components.Responses.Unauthorized; + export type $403 = Components.Responses.Forbidden; + export type $500 = Components.Responses.InternalServerError; + } + } namespace GetAllowedMeterReadingRange { namespace Parameters { export type ContextEntities = /** @@ -14459,6 +14698,23 @@ declare namespace Paths { export type $500 = Components.Responses.InternalServerError; } } + namespace GetContractMeters { + namespace Parameters { + export type ContractId = string; + } + export interface PathParameters { + contract_id: Parameters.ContractId; + } + namespace Responses { + export interface $200 { + data?: /* The meter entity */ Components.Schemas.Meter[]; + } + export type $400 = Components.Responses.InvalidRequest; + export type $401 = Components.Responses.Unauthorized; + export type $403 = Components.Responses.Forbidden; + export type $500 = Components.Responses.InternalServerError; + } + } namespace GetContractWithTemplates { namespace Parameters { export type Id = /** @@ -15721,6 +15977,63 @@ declare namespace Paths { export type $500 = Components.Responses.InternalServerError; } } + namespace GetMeter { + namespace Parameters { + export type MeterId = string; + } + export interface PathParameters { + meter_id: Parameters.MeterId; + } + namespace Responses { + export interface $200 { + data?: { + entity?: /* The meter entity */ Components.Schemas.Meter; + journey_actions?: Components.Schemas.JourneyActions; + relations?: Components.Schemas.EntityItem[]; + }; + } + export type $400 = Components.Responses.InvalidRequest; + export type $401 = Components.Responses.Unauthorized; + export type $403 = Components.Responses.Forbidden; + export type $404 = Components.Responses.NotFound; + export type $500 = Components.Responses.InternalServerError; + } + } + namespace GetMeterCounter { + namespace Parameters { + export type CounterId = string; + } + export interface PathParameters { + counter_id: Parameters.CounterId; + } + namespace Responses { + export interface $200 { + data?: /* A counter (measurement channel) of a meter */ Components.Schemas.MeterCounter; + } + export type $400 = Components.Responses.InvalidRequest; + export type $401 = Components.Responses.Unauthorized; + export type $403 = Components.Responses.Forbidden; + export type $404 = Components.Responses.NotFound; + export type $500 = Components.Responses.InternalServerError; + } + } + namespace GetMeterCounters { + namespace Parameters { + export type MeterId = string; + } + export interface PathParameters { + meter_id: Parameters.MeterId; + } + namespace Responses { + export interface $200 { + data?: /* A counter (measurement channel) of a meter */ Components.Schemas.MeterCounter[]; + } + export type $400 = Components.Responses.InvalidRequest; + export type $401 = Components.Responses.Unauthorized; + export type $403 = Components.Responses.Forbidden; + export type $500 = Components.Responses.InternalServerError; + } + } namespace GetMeterReadings { export interface RequestBody { meter_id: string; @@ -15741,7 +16054,7 @@ declare namespace Paths { [name: string]: string; }; /** - * When true, the response includes `counter` with the counter's unit, OBIS number, direction and tariff type. Access is checked by metering-api on the counter's parent meter. + * When true, the response includes `counter` with the counter's unit, OBIS number, direction and tariff type, if the caller has access to the counter's meter. */ include_counter?: boolean; /** @@ -16100,7 +16413,7 @@ declare namespace Paths { prevent_user_enumeration?: boolean; }; /** - * AWS Cognito Pool details for the portal + * AWS Cognito Pool details for the portal. Pool and client identifiers are server-managed and ignored on write. */ cognito_details?: { /** @@ -16813,7 +17126,7 @@ declare namespace Paths { prevent_user_enumeration?: boolean; }; /** - * AWS Cognito Pool details for the portal + * AWS Cognito Pool details for the portal. Pool and client identifiers are server-managed and ignored on write. */ cognito_details?: { /** @@ -18098,7 +18411,7 @@ declare namespace Paths { prevent_user_enumeration?: boolean; }; /** - * AWS Cognito Pool details for the portal + * AWS Cognito Pool details for the portal. Pool and client identifiers are server-managed and ignored on write. */ cognito_details?: { /** @@ -22792,6 +23105,71 @@ export interface OperationMethods { data?: Paths.GetMeterReadings.RequestBody, config?: AxiosRequestConfig ): OperationResponse + /** + * getMeter - getMeter + * + * Retrieves a meter of the portal user, with its journey actions and related entities. + */ + 'getMeter'( + parameters?: Parameters | null, + data?: any, + config?: AxiosRequestConfig + ): OperationResponse + /** + * getMeterCounters - getMeterCounters + * + * Retrieves the counters of a meter of the portal user. + */ + 'getMeterCounters'( + parameters?: Parameters | null, + data?: any, + config?: AxiosRequestConfig + ): OperationResponse + /** + * createMeterReadings - createMeterReadings + * + * Inserts readings for several counters of a meter of the portal user at once, one reading per + * counter and at most 100 per request. Use `createMeterReading` instead when the portal has a + * meter reading plausibility check hook configured. + * + */ + 'createMeterReadings'( + parameters?: Parameters | null, + data?: Paths.CreateMeterReadings.RequestBody, + config?: AxiosRequestConfig + ): OperationResponse + /** + * getAllowedMeterReading - getAllowedMeterReading + * + * Returns the allowed min/max reading per counter of the meter, derived from its reading history. + * Unlike `getAllowedMeterReadingRange`, this needs no plausibility check hook. + * + */ + 'getAllowedMeterReading'( + parameters?: Parameters | null, + data?: any, + config?: AxiosRequestConfig + ): OperationResponse + /** + * getMeterCounter - getMeterCounter + * + * Retrieves a counter of a meter of the portal user, incl. its unit and last reading. + */ + 'getMeterCounter'( + parameters?: Parameters | null, + data?: any, + config?: AxiosRequestConfig + ): OperationResponse + /** + * getContractMeters - getContractMeters + * + * Retrieves the meters of a contract of the portal user. + */ + 'getContractMeters'( + parameters?: Parameters | null, + data?: any, + config?: AxiosRequestConfig + ): OperationResponse /** * getSSOProvider - getSSOProvider * @@ -25080,6 +25458,83 @@ export interface PathsDictionary { config?: AxiosRequestConfig ): OperationResponse } + ['/v2/portal/metering/meter/{meter_id}']: { + /** + * getMeter - getMeter + * + * Retrieves a meter of the portal user, with its journey actions and related entities. + */ + 'get'( + parameters?: Parameters | null, + data?: any, + config?: AxiosRequestConfig + ): OperationResponse + } + ['/v2/portal/metering/meter/{meter_id}/counters']: { + /** + * getMeterCounters - getMeterCounters + * + * Retrieves the counters of a meter of the portal user. + */ + 'get'( + parameters?: Parameters | null, + data?: any, + config?: AxiosRequestConfig + ): OperationResponse + } + ['/v2/portal/metering/meter/{meter_id}/readings']: { + /** + * createMeterReadings - createMeterReadings + * + * Inserts readings for several counters of a meter of the portal user at once, one reading per + * counter and at most 100 per request. Use `createMeterReading` instead when the portal has a + * meter reading plausibility check hook configured. + * + */ + 'post'( + parameters?: Parameters | null, + data?: Paths.CreateMeterReadings.RequestBody, + config?: AxiosRequestConfig + ): OperationResponse + } + ['/v2/portal/metering/meter/{meter_id}/allowed-reading']: { + /** + * getAllowedMeterReading - getAllowedMeterReading + * + * Returns the allowed min/max reading per counter of the meter, derived from its reading history. + * Unlike `getAllowedMeterReadingRange`, this needs no plausibility check hook. + * + */ + 'get'( + parameters?: Parameters | null, + data?: any, + config?: AxiosRequestConfig + ): OperationResponse + } + ['/v2/portal/metering/counter/{counter_id}']: { + /** + * getMeterCounter - getMeterCounter + * + * Retrieves a counter of a meter of the portal user, incl. its unit and last reading. + */ + 'get'( + parameters?: Parameters | null, + data?: any, + config?: AxiosRequestConfig + ): OperationResponse + } + ['/v2/portal/metering/contract/{contract_id}/meters']: { + /** + * getContractMeters - getContractMeters + * + * Retrieves the meters of a contract of the portal user. + */ + 'get'( + parameters?: Parameters | null, + data?: any, + config?: AxiosRequestConfig + ): OperationResponse + } ['/v2/portal/public/sso/providers/{provider_slug}']: { /** * getSSOProvider - getSSOProvider @@ -25935,6 +26390,7 @@ export type JourneyContextUsagesResponse = Components.Schemas.JourneyContextUsag export type JuiceSettings = Components.Schemas.JuiceSettings; export type Meter = Components.Schemas.Meter; export type MeterChartWidget = Components.Schemas.MeterChartWidget; +export type MeterCounter = Components.Schemas.MeterCounter; export type MeterReading = Components.Schemas.MeterReading; export type MeterReadingCounterDetails = Components.Schemas.MeterReadingCounterDetails; export type MeterReadingPhoto = Components.Schemas.MeterReadingPhoto; @@ -25971,6 +26427,7 @@ export type PortalFeatureSettings = Components.Schemas.PortalFeatureSettings; export type PortalHeader = Components.Schemas.PortalHeader; export type PortalHeaderDesignOverrides = Components.Schemas.PortalHeaderDesignOverrides; export type PortalId = Components.Schemas.PortalId; +export type PortalMeterReading = Components.Schemas.PortalMeterReading; export type PortalNameOverrides = Components.Schemas.PortalNameOverrides; export type PortalNotification = Components.Schemas.PortalNotification; export type PortalRevision = Components.Schemas.PortalRevision; diff --git a/clients/customer-portal-client/src/openapi.json b/clients/customer-portal-client/src/openapi.json index 5868d445..296b319f 100644 --- a/clients/customer-portal-client/src/openapi.json +++ b/clients/customer-portal-client/src/openapi.json @@ -55,6 +55,9 @@ "/v2/portal/portal": { "post": { "operationId": "upsertPortal", + "x-epilot-agent": { + "effect": "config" + }, "deprecated": true, "summary": "upsertPortal", "description": "Upserts the settings for a portal of an organization.", @@ -2341,6 +2344,9 @@ "/v2/portal/email-templates": { "post": { "operationId": "upsertEmailTemplates", + "x-epilot-agent": { + "effect": "config" + }, "deprecated": true, "summary": "upsertEmailTemplates", "description": "Upserts the email templates of a portal", @@ -2464,6 +2470,9 @@ "/v3/portal/email-templates:migrate-references": { "post": { "operationId": "migrateEmailTemplateReferences", + "x-epilot-agent": { + "effect": "config" + }, "summary": "migrateEmailTemplateReferences", "description": "Walk every email-template config row in the caller's org and re-point any\nfield on `email_templates` that currently references `source_template_id`\nat `destination_template_id`. Intended to be called from the email-template\nmigration flow when a duplicated template is refined.\n\nRows are keyed by portal id (`portal_sk_v3`); a row without one is skipped.\nReturns the portal IDs that were rewritten and any whose update failed.\n", "tags": [ @@ -2631,6 +2640,9 @@ "/v3/portal/email-templates/{portal_id}": { "post": { "operationId": "upsertEmailTemplatesByPortalId", + "x-epilot-agent": { + "effect": "config" + }, "summary": "upsertEmailTemplatesByPortalId", "description": "Upserts the email templates of a portal by portal ID. On a portal with versioning enabled, the change is stored as a revision (`Updated via API`) and published in the same call, so every change to the portal has a revision. A concurrent write is retried on the server; if it keeps conflicting the call fails with `409` and nothing is changed.\n", "tags": [ @@ -2868,6 +2880,9 @@ "/v2/portal/widgets": { "post": { "operationId": "upsertPortalWidget", + "x-epilot-agent": { + "effect": "config" + }, "summary": "upsertPortalWidget", "description": "Upsert widget for a portal of an organization.", "deprecated": true, @@ -3041,6 +3056,9 @@ }, "post": { "operationId": "upsertPortalWidgetV3", + "x-epilot-agent": { + "effect": "config" + }, "summary": "upsertPortalWidgetV3", "description": "Upsert widget for a portal by portal_id.", "security": [ @@ -8811,7 +8829,7 @@ "include_counter": { "type": "boolean", "default": false, - "description": "When true, the response includes `counter` with the counter's unit, OBIS number, direction and tariff type. Access is checked by metering-api on the counter's parent meter." + "description": "When true, the response includes `counter` with the counter's unit, OBIS number, direction and tariff type, if the caller has access to the counter's meter." }, "templates_ref": { "$ref": "#/components/schemas/TemplatesRef", @@ -8878,6 +8896,417 @@ } } }, + "/v2/portal/metering/meter/{meter_id}": { + "get": { + "operationId": "getMeter", + "summary": "getMeter", + "description": "Retrieves a meter of the portal user, with its journey actions and related entities.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "meter_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the meter." + } + ], + "responses": { + "200": { + "description": "The meter with its journey actions and relations.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/components/schemas/Meter" + }, + "journey_actions": { + "$ref": "#/components/schemas/JourneyActions" + }, + "relations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityItem" + } + } + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/metering/meter/{meter_id}/counters": { + "get": { + "operationId": "getMeterCounters", + "summary": "getMeterCounters", + "description": "Retrieves the counters of a meter of the portal user.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "meter_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the meter." + } + ], + "responses": { + "200": { + "description": "The counters of the meter.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MeterCounter" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/metering/meter/{meter_id}/readings": { + "post": { + "operationId": "createMeterReadings", + "summary": "createMeterReadings", + "description": "Inserts readings for several counters of a meter of the portal user at once, one reading per\ncounter and at most 100 per request. Use `createMeterReading` instead when the portal has a\nmeter reading plausibility check hook configured.\n", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "meter_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the meter." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "readings" + ], + "properties": { + "readings": { + "type": "array", + "minItems": 1, + "maxItems": 100, + "items": { + "$ref": "#/components/schemas/PortalMeterReading" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "The created meter readings.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MeterReading" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/metering/meter/{meter_id}/allowed-reading": { + "get": { + "operationId": "getAllowedMeterReading", + "summary": "getAllowedMeterReading", + "x-contact-identification-token": true, + "description": "Returns the allowed min/max reading per counter of the meter, derived from its reading history.\nUnlike `getAllowedMeterReadingRange`, this needs no plausibility check hook.\n", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "meter_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the meter." + }, + { + "in": "query", + "name": "timestamp", + "required": false, + "description": "If not provided, the system will default to now.", + "schema": { + "type": "string", + "example": "2022-10-01T10:10:00.000Z" + } + } + ], + "responses": { + "200": { + "description": "Allowed reading per counter of the meter.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "counter_id": { + "type": "string" + }, + "min_value": { + "type": "number" + }, + "max_value": { + "type": "number" + }, + "last_reading": { + "type": "string", + "format": "date-time" + } + } + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/metering/counter/{counter_id}": { + "get": { + "operationId": "getMeterCounter", + "summary": "getMeterCounter", + "description": "Retrieves a counter of a meter of the portal user, incl. its unit and last reading.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "counter_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the meter counter." + } + ], + "responses": { + "200": { + "description": "The meter counter.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MeterCounter" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v2/portal/metering/contract/{contract_id}/meters": { + "get": { + "operationId": "getContractMeters", + "summary": "getContractMeters", + "description": "Retrieves the meters of a contract of the portal user.", + "tags": [ + "ECP" + ], + "security": [ + { + "PortalAuth": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "contract_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the contract." + } + ], + "responses": { + "200": { + "description": "The meters of the contract.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Meter" + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, "/v2/portal/public/sso/providers/{provider_slug}": { "get": { "operationId": "getSSOProvider", @@ -9418,6 +9847,9 @@ }, "put": { "operationId": "updatePortalPage", + "x-epilot-agent": { + "effect": "config" + }, "summary": "updatePortalPage", "description": "Update a portal page by id. On a portal with versioning enabled, the change is stored as a revision (`Updated via API`) and published in the same call, so every change to the portal has a revision. A concurrent write is retried on the server; if it keeps conflicting the call fails with `409` and nothing is changed.\n", "tags": [ @@ -9516,6 +9948,9 @@ ], "post": { "operationId": "detachPortalPage", + "x-epilot-agent": { + "effect": "config" + }, "summary": "detachPortalPage", "description": "Detach a blueprint-managed page from its blueprint. The page and all of its blocks become local (editable, no longer updated by the blueprint) and the page's lineage is tombstoned on the portal so future syncs skip it. One-way. Idempotent for pages that are not managed.\n", "tags": [ @@ -9577,6 +10012,9 @@ ], "post": { "operationId": "detachPortalPageBlock", + "x-epilot-agent": { + "effect": "config" + }, "summary": "detachPortalPageBlock", "description": "Detach a blueprint-managed block. The block becomes the customer's and its lineage is tombstoned on the page so future syncs skip it. A managed page stays managed and keeps receiving blueprint updates for everything else. One-way. Idempotent for blocks that are not managed.\n", "tags": [ @@ -9708,6 +10146,9 @@ }, "post": { "operationId": "createPortalPage", + "x-epilot-agent": { + "effect": "config" + }, "summary": "createPortalPage", "description": "Create a new portal page. On a portal with versioning enabled, the change is stored as a revision (`Updated via API`) and published in the same call, so every change to the portal has a revision. A concurrent write is retried on the server; if it keeps conflicting the call fails with `409` and nothing is changed.\n", "tags": [ @@ -10038,6 +10479,9 @@ ], "post": { "operationId": "createPortalPageBlock", + "x-epilot-agent": { + "effect": "config" + }, "summary": "createPortalPageBlock", "description": "Create a new portal page block. On a portal with versioning enabled, the change is stored as a revision (`Updated via API`) and published in the same call, so every change to the portal has a revision. A concurrent write is retried on the server; if it keeps conflicting the call fails with `409` and nothing is changed.\n", "tags": [ @@ -10192,6 +10636,9 @@ }, "put": { "operationId": "updatePortalPageBlock", + "x-epilot-agent": { + "effect": "config" + }, "summary": "updatePortalPageBlock", "description": "Update a portal page block by id. On a portal with versioning enabled, the change is stored as a revision (`Updated via API`) and published in the same call, so every change to the portal has a revision. A concurrent write is retried on the server; if it keeps conflicting the call fails with `409` and nothing is changed.\n", "tags": [ @@ -11083,6 +11530,9 @@ }, "put": { "operationId": "putPortalConfig", + "x-epilot-agent": { + "effect": "config" + }, "summary": "putPortalConfig", "description": "Updates a specific portal configuration by ID. On a portal with versioning enabled, the change is stored as a revision (`Updated via API`) and published in the same call, so every change to the portal has a revision. A concurrent write is retried on the server; if it keeps conflicting the call fails with `409` and nothing is changed.\n", "tags": [ @@ -11222,6 +11672,9 @@ "/v3/portal/config/{portal_id}/revisions": { "post": { "operationId": "createPortalRevision", + "x-epilot-agent": { + "effect": "config" + }, "summary": "createPortalRevision", "description": "Creates a new revision — a complete, immutable snapshot of the portal's configuration, pages and email templates. Nothing about the live portal changes; the snapshot only becomes live when it is published.\n\nThe payload must be COMPLETE. This endpoint does not merge against live or against the previous revision: publishing a revision deletes every live page the revision does not contain. The server validates structure only — `pages` present, each page carrying `id`, `slug`, `order` and `blocks`, and no two pages sharing an `id` or a `slug`. Semantic completeness of the config is a promise the caller makes, and a partial payload is honoured rather than rejected.\n\n`email_templates` is optional, and absence means \"keep the portal's current templates\", never \"no templates\". A present but partial map is taken verbatim.\n\nWith `publish`, the revision is published in the same call: save and publish in one step.\n", "tags": [ @@ -11572,6 +12025,9 @@ "/v3/portal/config/{portal_id}/publish": { "post": { "operationId": "publishPortalRevision", + "x-epilot-agent": { + "effect": "config" + }, "summary": "publishPortalRevision", "description": "Makes one revision the portal's live configuration, atomically: either everything below takes effect or nothing does. Publish is a full-snapshot replace: it writes config, every page and email templates to match the revision exactly, and deletes every live page the revision does not contain.\n\nAccepts any valid `revision_id` for the portal, old or new. There is no separate rollback endpoint and none is needed.\n\nThe same atomic publish stamps `name`, `description` and `published_at` onto the revision being published — permanently, on that revision, and not on any later one that supersedes it as live. `name` is generated server-side when the request omits it, so every published revision carries one.\n\nPublish is rejected with `409` (`reason: PORTAL_CHANGED`) when the revision was built on a published revision that is no longer live: publishing it would revert every write published since. Reload, re-apply the change and save again, or send `force: true` to publish it anyway. A revision that was published before is a rollback and is never refused for this. Publish is also rejected with `409` when the live config changed after publish read it. Every write to a versioned portal publishes a revision, so these checks cover pages and email templates too. `409` is also returned when the revision's stored config or email templates cannot be read, or when two of its pages would resolve to the same slug. A domain the revision claims that another portal already owns is a `400`.\n", "tags": [ @@ -11732,6 +12188,9 @@ "/v3/portal/config/swap": { "post": { "operationId": "swapPortalConfig", + "x-epilot-agent": { + "effect": "destructive" + }, "summary": "swapPortalConfig", "description": "Swaps the portal configuration of two portals. Without `mode` both portals exchange pages and experience config live, as before. With `mode: copy` (portal versioning only) nothing live changes: the source's setup is saved as an unpublished revision on the target to review and publish. Domain and access/security settings never move.", "tags": [ @@ -11845,6 +12304,9 @@ "/v3/portal/config/clone": { "post": { "operationId": "clonePortalConfig", + "x-epilot-agent": { + "effect": "config" + }, "summary": "clonePortalConfig", "description": "Creates a new portal by cloning configuration and pages from an existing portal. The new portal gets its own domain, users, email templates, and authentication settings.", "tags": [ @@ -12492,6 +12954,9 @@ }, "put": { "operationId": "putMobileConfig", + "x-epilot-agent": { + "effect": "config" + }, "summary": "putMobileConfig", "description": "Merges the provided fields into the portal's mobile app configuration\n(deep merge). Only mobile_config is modified; all other portal settings\nare left untouched.\n\nWith portal versioning on, the change is published as a revision, like\nevery other write to a versioned portal. `409` when the portal kept\nchanging while the write was retried.\n", "tags": [ @@ -14023,7 +14488,7 @@ }, "cognito_details": { "type": "object", - "description": "AWS Cognito Pool details for the portal", + "description": "AWS Cognito Pool details for the portal. Pool and client identifiers are server-managed and ignored on write.", "properties": { "cognito_user_pool_client_id": { "type": "string", @@ -16704,7 +17169,7 @@ }, "identifiers": { "type": "array", - "description": "Identifier attributes a caller must supply on this surface to be identified. Only\nused with `authentication: registration_identifiers`.\n\nOmitted or empty means the surface uses the portal's `registration_identifiers`.\nWhen set, these replace the portal's `registration_identifiers` on this surface\nonly: `identifyContact` requires a value for each of them (400 listing the missing\nones otherwise), runs the contact lookup and the `registrationIdentifiersCheck`\nhook on them, and refuses to issue tokens (403) unless there are at least two.\nEntries without `name` or `schema` are ignored. A `validation_rule_id` on an\nidentifier (own or inherited) is checked before the lookup.\n", + "description": "Identifier attributes a caller must supply on this surface to be identified. Only\nused with `authentication: registration_identifiers`.\n\nOmitted or empty means the surface uses the portal's `registration_identifiers`.\nWhen set, these replace the portal's `registration_identifiers` on this surface\nonly: `identifyContact` requires a value for each of them (400 listing the missing\nones otherwise), runs the contact lookup and the `registrationIdentifiersCheck`\nhook on them, and refuses to issue tokens (403) unless there are at least two.\nEntries without `name` or `schema` are ignored. A `validation_rule_id` on an\nidentifier (own or inherited) is checked before the lookup. An own identifier without\na `validation_rule_id` uses the rule of the portal's registration identifier for the\nsame field (`schema` and `name`), if that has one.\n", "items": { "$ref": "#/components/schemas/RegistrationIdentifier" }, @@ -20309,6 +20774,102 @@ } } }, + "PortalMeterReading": { + "type": "object", + "description": "A meter reading submitted by a portal user for a counter of the meter in the path.", + "required": [ + "value", + "counter_id" + ], + "properties": { + "value": { + "type": "number" + }, + "counter_id": { + "$ref": "#/components/schemas/EntityId" + }, + "direction": { + "$ref": "#/components/schemas/Direction" + }, + "timestamp": { + "type": "string" + }, + "read_by": { + "$ref": "#/components/schemas/ReadBy" + }, + "reason": { + "$ref": "#/components/schemas/Reason" + }, + "source": { + "$ref": "#/components/schemas/Source" + }, + "status": { + "$ref": "#/components/schemas/ReadingStatus" + }, + "remark": { + "type": "string", + "nullable": true + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "MeterCounter": { + "description": "A counter (measurement channel) of a meter", + "allOf": [ + { + "$ref": "#/components/schemas/BaseEntity" + }, + { + "type": "object", + "required": [ + "_schema" + ], + "properties": { + "_schema": { + "type": "string", + "enum": [ + "meter_counter" + ] + }, + "obis_number": { + "type": "string" + }, + "direction": { + "$ref": "#/components/schemas/Direction" + }, + "transformer_ratio": { + "type": "number" + }, + "unit": { + "type": "string" + }, + "forecast_reading_value": { + "type": "string" + }, + "forecast_as_of": { + "type": "string" + }, + "current_consumption": { + "type": "number" + }, + "last_reading": { + "type": "string" + }, + "conversion_factor": { + "type": "number" + }, + "tariff_type": { + "$ref": "#/components/schemas/TariffType" + } + } + } + ] + }, "MeterReadingPhoto": { "type": "object", "required": [ @@ -21167,7 +21728,7 @@ }, "is_system": { "type": "boolean", - "description": "Whether the page is a system page", + "description": "Whether the page is a system page. Server-managed on createPortalPage and updatePortalPage.", "example": false }, "is_detail": { @@ -21335,42 +21896,15 @@ "icon_actions": { "type": "object", "additionalProperties": false, - "description": "Icon buttons in the header bar", + "description": "Icon buttons in the header bar (inbox, profile, menu). They draw as the Button variant picked here, with that variant's look in the portal design; unset keeps the icon variant.\n", "properties": { - "style": { + "variant": { "type": "string", "enum": [ - "solid", - "soft", - "surface", - "outline", - "ghost" - ] - }, - "color": { - "description": "A button colour, or a custom colour of the portal's design by id", - "oneOf": [ - { - "type": "string", - "enum": [ - "primary", - "neutral", - "danger" - ] - }, - { - "type": "object", - "additionalProperties": false, - "required": [ - "custom" - ], - "properties": { - "custom": { - "type": "string", - "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$" - } - } - } + "primary", + "secondary", + "tertiary", + "icon" ] } } @@ -21388,8 +21922,7 @@ }, "elements": { "icon_actions": { - "style": "ghost", - "color": "primary" + "variant": "icon" } } } @@ -21549,7 +22082,7 @@ }, "cognito_details": { "type": "object", - "description": "AWS Cognito Pool details for the portal", + "description": "AWS Cognito Pool details for the portal. Pool and client identifiers are server-managed and ignored on write.", "properties": { "cognito_user_pool_client_id": { "type": "string",