@epilot/customer-portal-client 0.36.0 → 0.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/openapi.json CHANGED
@@ -137,6 +137,7 @@
137
137
  "operationId": "createUser",
138
138
  "summary": "createUser",
139
139
  "description": "Registers a portal user",
140
+ "deprecated": true,
140
141
  "security": [],
141
142
  "tags": [
142
143
  "Public"
@@ -814,7 +815,19 @@
814
815
  },
815
816
  "type": {
816
817
  "type": "string",
817
- "description": "Optional type of the consumption, such as 'nt' (night time) or 'ht' (high time). Can be any string."
818
+ "description": "Optional type of the consumption, such as 'nt' (night time) and 'ht' (high time) or 'feed-in' and 'feed-out'. Can be any string.",
819
+ "example": "nt"
820
+ },
821
+ "aggregation_method": {
822
+ "type": "string",
823
+ "description": "The method used to aggregate the consumption data. Assumed default is 'sum'.",
824
+ "enum": [
825
+ "sum",
826
+ "average",
827
+ "max",
828
+ "min"
829
+ ],
830
+ "example": "sum"
818
831
  }
819
832
  },
820
833
  "required": [
@@ -2169,6 +2182,68 @@
2169
2182
  }
2170
2183
  }
2171
2184
  },
2185
+ "/v3/portal/public/widgets": {
2186
+ "get": {
2187
+ "operationId": "getPublicPortalWidgetsV3",
2188
+ "summary": "getPublicPortalWidgetsV3",
2189
+ "description": "Retrieves the public widgets of a portal.\nSupports two identification methods:\n1. Using org_id + portal_id\n2. Using domain\n",
2190
+ "tags": [
2191
+ "Public"
2192
+ ],
2193
+ "security": [],
2194
+ "parameters": [
2195
+ {
2196
+ "in": "query",
2197
+ "name": "org_id",
2198
+ "required": false,
2199
+ "schema": {
2200
+ "type": "string",
2201
+ "example": 12324
2202
+ },
2203
+ "description": "Organization ID (required if domain is not provided)"
2204
+ },
2205
+ {
2206
+ "in": "query",
2207
+ "name": "portal_id",
2208
+ "required": false,
2209
+ "schema": {
2210
+ "$ref": "#/components/schemas/PortalId"
2211
+ },
2212
+ "description": "Portal ID (required if domain is not provided)"
2213
+ },
2214
+ {
2215
+ "in": "query",
2216
+ "name": "domain",
2217
+ "required": false,
2218
+ "schema": {
2219
+ "type": "string"
2220
+ },
2221
+ "description": "Portal domain for identification (alternative to org_id + portal_id)"
2222
+ }
2223
+ ],
2224
+ "responses": {
2225
+ "200": {
2226
+ "description": "Retrieved the portal public widgets successfully.",
2227
+ "content": {
2228
+ "application/json": {
2229
+ "schema": {
2230
+ "$ref": "#/components/schemas/UpsertPortalWidget"
2231
+ }
2232
+ }
2233
+ }
2234
+ },
2235
+ "401": {
2236
+ "$ref": "#/components/responses/Unauthorized"
2237
+ },
2238
+ "403": {
2239
+ "$ref": "#/components/responses/Forbidden"
2240
+ },
2241
+ "500": {
2242
+ "$ref": "#/components/responses/InternalServerError"
2243
+ }
2244
+ }
2245
+ }
2246
+ },
2172
2247
  "/v2/portal/widgets": {
2173
2248
  "post": {
2174
2249
  "operationId": "upsertPortalWidget",
@@ -2748,6 +2823,76 @@
2748
2823
  }
2749
2824
  }
2750
2825
  },
2826
+ "/v3/portal/public/schemas": {
2827
+ "get": {
2828
+ "operationId": "getPublicSchemasV3",
2829
+ "summary": "getPublicSchemasV3",
2830
+ "description": "Retrieves schemas by portal. Only schemas and attributes used on public pages are returned.\nSupports two identification methods:\n1. Using org_id + portal_id\n2. Using domain\n",
2831
+ "tags": [
2832
+ "Public"
2833
+ ],
2834
+ "security": [],
2835
+ "parameters": [
2836
+ {
2837
+ "in": "query",
2838
+ "name": "org_id",
2839
+ "required": false,
2840
+ "schema": {
2841
+ "type": "string",
2842
+ "example": 12324
2843
+ },
2844
+ "description": "Organization ID (required if domain is not provided)"
2845
+ },
2846
+ {
2847
+ "in": "query",
2848
+ "name": "portal_id",
2849
+ "required": false,
2850
+ "schema": {
2851
+ "$ref": "#/components/schemas/PortalId"
2852
+ },
2853
+ "description": "Portal ID (required if domain is not provided)"
2854
+ },
2855
+ {
2856
+ "in": "query",
2857
+ "name": "domain",
2858
+ "required": false,
2859
+ "schema": {
2860
+ "type": "string"
2861
+ },
2862
+ "description": "Portal domain for identification (alternative to org_id + portal_id)"
2863
+ }
2864
+ ],
2865
+ "responses": {
2866
+ "200": {
2867
+ "description": "Retrieved schemas for an organization successfully.",
2868
+ "content": {
2869
+ "application/json": {
2870
+ "schema": {
2871
+ "type": "object",
2872
+ "properties": {
2873
+ "schemas": {
2874
+ "type": "array",
2875
+ "items": {
2876
+ "$ref": "#/components/schemas/Schema"
2877
+ }
2878
+ }
2879
+ }
2880
+ }
2881
+ }
2882
+ }
2883
+ },
2884
+ "401": {
2885
+ "$ref": "#/components/responses/Unauthorized"
2886
+ },
2887
+ "403": {
2888
+ "$ref": "#/components/responses/Forbidden"
2889
+ },
2890
+ "500": {
2891
+ "$ref": "#/components/responses/InternalServerError"
2892
+ }
2893
+ }
2894
+ }
2895
+ },
2751
2896
  "/v2/portal/public/org/settings": {
2752
2897
  "get": {
2753
2898
  "operationId": "getOrganizationSettingsByDomain",
@@ -7000,7 +7145,7 @@
7000
7145
  "/v2/portal/metering/reading/allowed-range/{meter_id}": {
7001
7146
  "get": {
7002
7147
  "operationId": "getAllowedMeterReadingRange",
7003
- "description": "Get allowed reading range for all counters of a meter from the configured \nthird-party plausibility check hook using 'range' mode. This endpoint requires \na plausibility check hook to be configured for the portal.\n",
7148
+ "description": "Get allowed reading range for all counters of a meter from the configured\nthird-party plausibility check hook using 'range' mode. This endpoint requires\na plausibility check hook to be configured for the portal.\n",
7004
7149
  "tags": [
7005
7150
  "ECP"
7006
7151
  ],
@@ -7098,6 +7243,124 @@
7098
7243
  }
7099
7244
  }
7100
7245
  },
7246
+ "/v2/portal/metering/readings": {
7247
+ "post": {
7248
+ "operationId": "getMeterReadings",
7249
+ "summary": "Get meter readings with optional template resolution",
7250
+ "description": "Fetches meter readings for a counter and optionally resolves Handlebars\ntemplate strings against each reading object using @epilot/variables.\n",
7251
+ "tags": [
7252
+ "ECP"
7253
+ ],
7254
+ "security": [
7255
+ {
7256
+ "PortalAuth": []
7257
+ }
7258
+ ],
7259
+ "requestBody": {
7260
+ "required": true,
7261
+ "content": {
7262
+ "application/json": {
7263
+ "schema": {
7264
+ "type": "object",
7265
+ "required": [
7266
+ "meter_id",
7267
+ "counter_id"
7268
+ ],
7269
+ "properties": {
7270
+ "meter_id": {
7271
+ "type": "string"
7272
+ },
7273
+ "counter_id": {
7274
+ "type": "string"
7275
+ },
7276
+ "sort": {
7277
+ "type": "string",
7278
+ "enum": [
7279
+ "asc",
7280
+ "desc"
7281
+ ],
7282
+ "default": "desc"
7283
+ },
7284
+ "from": {
7285
+ "type": "integer",
7286
+ "default": 0
7287
+ },
7288
+ "size": {
7289
+ "type": "integer",
7290
+ "default": 10
7291
+ },
7292
+ "templates": {
7293
+ "type": "object",
7294
+ "additionalProperties": {
7295
+ "type": "string"
7296
+ },
7297
+ "description": "Template map (key to Handlebars template string). Each template is resolved per reading."
7298
+ },
7299
+ "counter_templates": {
7300
+ "type": "object",
7301
+ "additionalProperties": {
7302
+ "type": "string"
7303
+ },
7304
+ "description": "Template map resolved against the counter entity."
7305
+ }
7306
+ }
7307
+ }
7308
+ }
7309
+ }
7310
+ },
7311
+ "responses": {
7312
+ "200": {
7313
+ "description": "Meter readings with resolved templates",
7314
+ "content": {
7315
+ "application/json": {
7316
+ "schema": {
7317
+ "type": "object",
7318
+ "properties": {
7319
+ "results": {
7320
+ "type": "array",
7321
+ "items": {
7322
+ "type": "object",
7323
+ "additionalProperties": true,
7324
+ "properties": {
7325
+ "templates_output": {
7326
+ "type": "object",
7327
+ "additionalProperties": {
7328
+ "type": "string"
7329
+ }
7330
+ }
7331
+ }
7332
+ }
7333
+ },
7334
+ "hits": {
7335
+ "type": "integer"
7336
+ },
7337
+ "counter_templates_output": {
7338
+ "type": "object",
7339
+ "additionalProperties": {
7340
+ "type": "string"
7341
+ },
7342
+ "description": "Resolved counter templates."
7343
+ }
7344
+ }
7345
+ }
7346
+ }
7347
+ }
7348
+ },
7349
+ "400": {
7350
+ "$ref": "#/components/responses/InvalidRequest"
7351
+ },
7352
+ "401": {
7353
+ "$ref": "#/components/responses/Unauthorized"
7354
+ },
7355
+ "403": {
7356
+ "$ref": "#/components/responses/Forbidden"
7357
+ },
7358
+ "500": {
7359
+ "$ref": "#/components/responses/InternalServerError"
7360
+ }
7361
+ }
7362
+ }
7363
+ },
7101
7364
  "/v2/portal/public/sso/login": {
7102
7365
  "post": {
7103
7366
  "operationId": "ssoLogin",
@@ -8836,6 +9099,71 @@
8836
9099
  }
8837
9100
  }
8838
9101
  },
9102
+ "/v3/portal/config/clone": {
9103
+ "post": {
9104
+ "operationId": "clonePortalConfig",
9105
+ "summary": "clonePortalConfig",
9106
+ "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.",
9107
+ "tags": [
9108
+ "ECP Admin"
9109
+ ],
9110
+ "security": [
9111
+ {
9112
+ "EpilotAuth": []
9113
+ }
9114
+ ],
9115
+ "requestBody": {
9116
+ "description": "Source portal ID and optional name for the cloned portal",
9117
+ "required": true,
9118
+ "content": {
9119
+ "application/json": {
9120
+ "schema": {
9121
+ "type": "object",
9122
+ "required": [
9123
+ "source_portal_id"
9124
+ ],
9125
+ "properties": {
9126
+ "source_portal_id": {
9127
+ "$ref": "#/components/schemas/PortalId"
9128
+ },
9129
+ "name": {
9130
+ "type": "string",
9131
+ "description": "Name for the cloned portal. Defaults to \"Copy of <source portal name>\"."
9132
+ }
9133
+ }
9134
+ }
9135
+ }
9136
+ }
9137
+ },
9138
+ "responses": {
9139
+ "201": {
9140
+ "description": "Portal cloned successfully.",
9141
+ "content": {
9142
+ "application/json": {
9143
+ "schema": {
9144
+ "$ref": "#/components/schemas/PortalConfigV3"
9145
+ }
9146
+ }
9147
+ }
9148
+ },
9149
+ "400": {
9150
+ "$ref": "#/components/responses/InvalidRequest"
9151
+ },
9152
+ "401": {
9153
+ "$ref": "#/components/responses/Unauthorized"
9154
+ },
9155
+ "403": {
9156
+ "$ref": "#/components/responses/Forbidden"
9157
+ },
9158
+ "404": {
9159
+ "$ref": "#/components/responses/NotFound"
9160
+ },
9161
+ "500": {
9162
+ "$ref": "#/components/responses/InternalServerError"
9163
+ }
9164
+ }
9165
+ }
9166
+ },
8839
9167
  "/v3/portal/partner/invite": {
8840
9168
  "post": {
8841
9169
  "operationId": "invitePartner",
@@ -11245,8 +11573,45 @@
11245
11573
  },
11246
11574
  "Entity": {
11247
11575
  "type": "object",
11248
- "properties": {},
11249
- "additionalProperties": true
11576
+ "additionalProperties": true,
11577
+ "properties": {
11578
+ "templates_output_highlighted": {
11579
+ "type": "object",
11580
+ "readOnly": true,
11581
+ "description": "Template outputs with search highlight <em> tags merged in. Only present when highlight is requested and matches exist.",
11582
+ "additionalProperties": {
11583
+ "oneOf": [
11584
+ {
11585
+ "type": "string"
11586
+ },
11587
+ {
11588
+ "type": "object",
11589
+ "additionalProperties": {
11590
+ "type": "string"
11591
+ }
11592
+ }
11593
+ ]
11594
+ }
11595
+ },
11596
+ "search_snippets": {
11597
+ "type": "array",
11598
+ "readOnly": true,
11599
+ "description": "Highlighted fragments for search matches on fields not shown in template content. Max 1 entry.",
11600
+ "items": {
11601
+ "type": "object",
11602
+ "properties": {
11603
+ "field": {
11604
+ "type": "string",
11605
+ "description": "Human-readable field label"
11606
+ },
11607
+ "fragment": {
11608
+ "type": "string",
11609
+ "description": "Highlighted text fragment with <em> tags"
11610
+ }
11611
+ }
11612
+ }
11613
+ }
11614
+ }
11250
11615
  },
11251
11616
  "EntityTemplates": {
11252
11617
  "type": "object",
@@ -12949,6 +13314,10 @@
12949
13314
  "example": [
12950
13315
  "active_workflow"
12951
13316
  ]
13317
+ },
13318
+ "highlight": {
13319
+ "type": "object",
13320
+ "description": "Elasticsearch highlight configuration passed through to the Entity API. When provided, matching results include a `highlight` object with field names as keys and arrays of highlighted fragments as values."
12952
13321
  }
12953
13322
  },
12954
13323
  "required": [