@epilot/customer-portal-client 0.38.7 → 0.38.9

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.
@@ -927,6 +927,30 @@
927
927
  "responses": {}
928
928
  }
929
929
  },
930
+ "/v3/portal/public/account/exists": {
931
+ "post": {
932
+ "operationId": "checkAccountExists",
933
+ "parameters": [
934
+ {
935
+ "in": "query",
936
+ "name": "portal_id",
937
+ "required": false
938
+ },
939
+ {
940
+ "in": "query",
941
+ "name": "domain",
942
+ "required": false
943
+ }
944
+ ],
945
+ "requestBody": {
946
+ "required": true,
947
+ "content": {
948
+ "application/json": {}
949
+ }
950
+ },
951
+ "responses": {}
952
+ }
953
+ },
930
954
  "/v2/portal/contact/valid/secondary/attributes": {
931
955
  "get": {
932
956
  "operationId": "getValidSecondaryAttributes",
@@ -2386,6 +2410,31 @@
2386
2410
  ],
2387
2411
  "responses": {}
2388
2412
  }
2413
+ },
2414
+ "/v3/portal/verify-dns": {
2415
+ "post": {
2416
+ "operationId": "verifyDns",
2417
+ "parameters": [
2418
+ {
2419
+ "in": "query",
2420
+ "name": "portal_id",
2421
+ "required": true
2422
+ }
2423
+ ],
2424
+ "responses": {}
2425
+ }
2426
+ },
2427
+ "/v2/portal/proxy/execute": {
2428
+ "post": {
2429
+ "operationId": "portalProxyExecute",
2430
+ "requestBody": {
2431
+ "required": true,
2432
+ "content": {
2433
+ "application/json": {}
2434
+ }
2435
+ },
2436
+ "responses": {}
2437
+ }
2389
2438
  }
2390
2439
  },
2391
2440
  "components": {
package/src/openapi.json CHANGED
@@ -3561,6 +3561,84 @@
3561
3561
  "contactId": {
3562
3562
  "$ref": "#/components/schemas/EntityId",
3563
3563
  "description": "ID of the contact if exists"
3564
+ },
3565
+ "accountId": {
3566
+ "$ref": "#/components/schemas/EntityId",
3567
+ "description": "ID of the resolved account when the portal is configured for account-based registration"
3568
+ }
3569
+ }
3570
+ }
3571
+ }
3572
+ }
3573
+ },
3574
+ "400": {
3575
+ "$ref": "#/components/responses/InvalidRequest"
3576
+ },
3577
+ "404": {
3578
+ "$ref": "#/components/responses/NotFound"
3579
+ },
3580
+ "500": {
3581
+ "$ref": "#/components/responses/InternalServerError"
3582
+ }
3583
+ }
3584
+ }
3585
+ },
3586
+ "/v3/portal/public/account/exists": {
3587
+ "post": {
3588
+ "operationId": "checkAccountExists",
3589
+ "summary": "checkAccountExists",
3590
+ "description": "True if account with given identifiers exists.\nSupports two identification methods:\n1. Using portal_id\n2. Using domain\n",
3591
+ "security": [],
3592
+ "tags": [
3593
+ "Public"
3594
+ ],
3595
+ "parameters": [
3596
+ {
3597
+ "in": "query",
3598
+ "name": "portal_id",
3599
+ "required": false,
3600
+ "schema": {
3601
+ "$ref": "#/components/schemas/PortalId"
3602
+ },
3603
+ "description": "PortalId of the portal (required if domain is not provided)"
3604
+ },
3605
+ {
3606
+ "in": "query",
3607
+ "name": "domain",
3608
+ "required": false,
3609
+ "schema": {
3610
+ "type": "string"
3611
+ },
3612
+ "description": "Portal domain for identification (alternative to portal_id)"
3613
+ }
3614
+ ],
3615
+ "requestBody": {
3616
+ "description": "Request payload",
3617
+ "required": true,
3618
+ "content": {
3619
+ "application/json": {
3620
+ "schema": {
3621
+ "$ref": "#/components/schemas/AccountExistsRequest"
3622
+ }
3623
+ }
3624
+ }
3625
+ },
3626
+ "responses": {
3627
+ "200": {
3628
+ "description": "Return result true|false if the account with given identifiers exists.",
3629
+ "content": {
3630
+ "application/json": {
3631
+ "schema": {
3632
+ "type": "object",
3633
+ "properties": {
3634
+ "exists": {
3635
+ "type": "boolean",
3636
+ "description": "Whether the account exists with the given identifier values",
3637
+ "example": true
3638
+ },
3639
+ "accountId": {
3640
+ "$ref": "#/components/schemas/EntityId",
3641
+ "description": "ID of the account if exists"
3564
3642
  }
3565
3643
  }
3566
3644
  }
@@ -9718,6 +9796,149 @@
9718
9796
  }
9719
9797
  }
9720
9798
  }
9799
+ },
9800
+ "/v3/portal/verify-dns": {
9801
+ "post": {
9802
+ "operationId": "verifyDns",
9803
+ "summary": "verifyDns",
9804
+ "description": "Manually triggers DNS verification for a portal's domain setup. Runs the same verification logic as the scheduled processAllPendingNetworks lambda.",
9805
+ "tags": [
9806
+ "ECP Admin"
9807
+ ],
9808
+ "security": [
9809
+ {
9810
+ "EpilotAuth": []
9811
+ }
9812
+ ],
9813
+ "parameters": [
9814
+ {
9815
+ "in": "query",
9816
+ "name": "portal_id",
9817
+ "required": true,
9818
+ "schema": {
9819
+ "$ref": "#/components/schemas/PortalId"
9820
+ },
9821
+ "description": "PortalId of the portal"
9822
+ }
9823
+ ],
9824
+ "responses": {
9825
+ "200": {
9826
+ "description": "DNS verification result",
9827
+ "content": {
9828
+ "application/json": {
9829
+ "schema": {
9830
+ "type": "object",
9831
+ "properties": {
9832
+ "domain_status": {
9833
+ "type": "string",
9834
+ "description": "The status of the custom domain verification",
9835
+ "enum": [
9836
+ "PENDING",
9837
+ "SUCCEED"
9838
+ ]
9839
+ },
9840
+ "message": {
9841
+ "type": "string",
9842
+ "description": "A message describing the result"
9843
+ }
9844
+ }
9845
+ }
9846
+ }
9847
+ }
9848
+ },
9849
+ "401": {
9850
+ "$ref": "#/components/responses/Unauthorized"
9851
+ },
9852
+ "403": {
9853
+ "$ref": "#/components/responses/Forbidden"
9854
+ },
9855
+ "500": {
9856
+ "$ref": "#/components/responses/InternalServerError"
9857
+ }
9858
+ }
9859
+ }
9860
+ },
9861
+ "/v2/portal/proxy/execute": {
9862
+ "post": {
9863
+ "operationId": "portalProxyExecute",
9864
+ "summary": "portalProxyExecute",
9865
+ "description": "Execute an Integration Hub managed-call use case on behalf of a portal user.\nBridges PortalAuth to the Integration API by generating an internal token.\n",
9866
+ "security": [
9867
+ {
9868
+ "PortalAuth": []
9869
+ }
9870
+ ],
9871
+ "tags": [
9872
+ "ECP"
9873
+ ],
9874
+ "requestBody": {
9875
+ "required": true,
9876
+ "content": {
9877
+ "application/json": {
9878
+ "schema": {
9879
+ "type": "object",
9880
+ "required": [
9881
+ "integration_id",
9882
+ "use_case_slug"
9883
+ ],
9884
+ "properties": {
9885
+ "integration_id": {
9886
+ "type": "string",
9887
+ "format": "uuid",
9888
+ "description": "Integration ID containing the managed-call use case"
9889
+ },
9890
+ "use_case_slug": {
9891
+ "type": "string",
9892
+ "description": "Use case slug (acts as the RPC method name)"
9893
+ },
9894
+ "payload": {
9895
+ "type": "object",
9896
+ "description": "Input data for the managed-call operation",
9897
+ "additionalProperties": true
9898
+ }
9899
+ }
9900
+ }
9901
+ }
9902
+ }
9903
+ },
9904
+ "responses": {
9905
+ "200": {
9906
+ "description": "Managed-call execution result envelope.",
9907
+ "content": {
9908
+ "application/json": {
9909
+ "schema": {
9910
+ "type": "object",
9911
+ "required": [
9912
+ "success"
9913
+ ],
9914
+ "properties": {
9915
+ "success": {
9916
+ "type": "boolean"
9917
+ },
9918
+ "data": {
9919
+ "type": "object",
9920
+ "additionalProperties": true,
9921
+ "description": "Managed-call response payload. Shape is defined by the use\ncase's JSONata response_mapping; if no mapping is\nconfigured the raw external API response is returned.\n"
9922
+ }
9923
+ }
9924
+ }
9925
+ }
9926
+ }
9927
+ },
9928
+ "400": {
9929
+ "$ref": "#/components/responses/InvalidRequest"
9930
+ },
9931
+ "401": {
9932
+ "$ref": "#/components/responses/Unauthorized"
9933
+ },
9934
+ "403": {
9935
+ "$ref": "#/components/responses/Forbidden"
9936
+ },
9937
+ "500": {
9938
+ "$ref": "#/components/responses/InternalServerError"
9939
+ }
9940
+ }
9941
+ }
9721
9942
  }
9722
9943
  },
9723
9944
  "components": {
@@ -10430,6 +10651,14 @@
10430
10651
  "type": "boolean",
10431
10652
  "description": "Mark true if the domain is an Epilot domain"
10432
10653
  },
10654
+ "epilot_domain": {
10655
+ "type": "string",
10656
+ "description": "The URL on which the portal is accessible",
10657
+ "example": "example-portal-12345.ecp.epilot.cloud"
10658
+ },
10659
+ "domain_settings": {
10660
+ "$ref": "#/components/schemas/DomainSettings"
10661
+ },
10433
10662
  "design_id": {
10434
10663
  "$ref": "#/components/schemas/EntityId",
10435
10664
  "description": "ID of the design used to build the portal"
@@ -10456,6 +10685,24 @@
10456
10685
  "BLOCK_IF_PORTAL_USER_EXISTS"
10457
10686
  ]
10458
10687
  },
10688
+ "self_registration_account_setting": {
10689
+ "type": "string",
10690
+ "description": "Controls behavior of self-registration when account is used as the registration entity",
10691
+ "enum": [
10692
+ "ALLOW_WITH_CONTACT_CREATION",
10693
+ "DENY",
10694
+ "ALWAYS_CREATE_CONTACT",
10695
+ "DISALLOW_COMPLETELY"
10696
+ ]
10697
+ },
10698
+ "self_registration_entity": {
10699
+ "type": "string",
10700
+ "description": "Entity type used as the primary identifier for self-registration",
10701
+ "enum": [
10702
+ "contact",
10703
+ "account"
10704
+ ]
10705
+ },
10459
10706
  "user_account_self_management": {
10460
10707
  "type": "boolean",
10461
10708
  "description": "Enable or disable user account self management",
@@ -10880,6 +11127,13 @@
10880
11127
  "additionalProperties": {
10881
11128
  "$ref": "#/components/schemas/Page"
10882
11129
  }
11130
+ },
11131
+ "global_blocks": {
11132
+ "type": "object",
11133
+ "description": "Portal-level blocks shared across all pages (e.g. footer). Keyed by block id.",
11134
+ "additionalProperties": {
11135
+ "$ref": "#/components/schemas/Block"
11136
+ }
10883
11137
  }
10884
11138
  }
10885
11139
  },
@@ -10986,6 +11240,24 @@
10986
11240
  }
10987
11241
  }
10988
11242
  },
11243
+ "DomainSettings": {
11244
+ "type": "object",
11245
+ "description": "Domain settings for the portal",
11246
+ "properties": {
11247
+ "is_custom_domain_enabled": {
11248
+ "type": "boolean",
11249
+ "description": "Whether the custom domain is enabled"
11250
+ },
11251
+ "is_epilot_domain_enabled": {
11252
+ "type": "boolean",
11253
+ "description": "Whether the Epilot domain is enabled"
11254
+ },
11255
+ "is_redirection_enabled": {
11256
+ "type": "boolean",
11257
+ "description": "Whether the redirection is enabled"
11258
+ }
11259
+ }
11260
+ },
10989
11261
  "WidgetBase": {
10990
11262
  "type": "object",
10991
11263
  "required": [
@@ -11342,6 +11614,38 @@
11342
11614
  }
11343
11615
  }
11344
11616
  },
11617
+ "AccountExistsRequest": {
11618
+ "type": "object",
11619
+ "required": [
11620
+ "registration_identifiers",
11621
+ "org_id"
11622
+ ],
11623
+ "properties": {
11624
+ "org_id": {
11625
+ "type": "string",
11626
+ "example": 728,
11627
+ "description": "ID of the organization"
11628
+ },
11629
+ "registration_identifiers": {
11630
+ "type": "object",
11631
+ "description": "Identifier-value pairs per schema to identify an account during portal user registration",
11632
+ "additionalProperties": {
11633
+ "type": "object",
11634
+ "additionalProperties": {
11635
+ "type": "string"
11636
+ }
11637
+ },
11638
+ "example": {
11639
+ "account": {
11640
+ "customer_number": "ACC-123456"
11641
+ },
11642
+ "contract": {
11643
+ "contract_number": "123456"
11644
+ }
11645
+ }
11646
+ }
11647
+ }
11648
+ },
11345
11649
  "UserRequest": {
11346
11650
  "type": "object",
11347
11651
  "properties": {
@@ -13856,17 +14160,30 @@
13856
14160
  ],
13857
14161
  "description": "Statistical method already applied to this type's data. Determines the chart shape used to render the type's values: `sum` is shown as a bar chart; `min`, `average`, and `max` are shown as a line chart. Each type advertises its own method, so a single visualization can mix bar-shaped types with line-shaped types. Defaults to `sum` when omitted.\n"
13858
14162
  },
13859
- "direction": {
14163
+ "unit": {
14164
+ "type": "string",
14165
+ "description": "Unit shared by all values of this type (e.g. \"kWh\")."
14166
+ },
14167
+ "color": {
13860
14168
  "type": "string",
13861
14169
  "enum": [
13862
- "in",
13863
- "out"
14170
+ "primary",
14171
+ "slate",
14172
+ "mauve",
14173
+ "orange",
14174
+ "red",
14175
+ "tomato",
14176
+ "amber",
14177
+ "green",
14178
+ "blue"
13864
14179
  ],
13865
- "description": "Direction of energy flow at the meter for this type:\n - `out`: outflow from the grid to the consumer (e.g. household consumption,\n grid import). Adds to the total consumption shown for the period.\n - `in`: inflow to the grid from the consumer (e.g. PV export, feed-in).\n Subtracts from the total consumption.\nWith both directions present in a prosumer setup, the chart computes a *net* consumption per period — when production exceeds consumption the period total is negative and the chart can flip its label to \"Total production\" instead. Defaults to `out` when omitted (the legacy assumption that all values are consumption from the grid).\n"
14180
+ "description": "Optional Spark color token used to render this type in the visualization. Maps onto the portal's Spark palette (`primary` is the org's primary brand color). When omitted the consumer falls back to its own per-type default.\n"
13866
14181
  },
13867
- "unit": {
13868
- "type": "string",
13869
- "description": "Unit shared by all values of this type (e.g. \"kWh\")."
14182
+ "precision": {
14183
+ "type": "integer",
14184
+ "minimum": 0,
14185
+ "maximum": 10,
14186
+ "description": "Optional number of decimal places to show when rendering values of this type in the visualization (axis labels, tooltips, summaries). When omitted the consumer falls back to its own default precision.\n"
13870
14187
  }
13871
14188
  },
13872
14189
  "required": [
@@ -15911,6 +16228,14 @@
15911
16228
  "type": "boolean",
15912
16229
  "description": "Mark true if the domain is an Epilot domain"
15913
16230
  },
16231
+ "epilot_domain": {
16232
+ "type": "string",
16233
+ "description": "The Epilot domain on which the portal is accessible",
16234
+ "example": "example-portal-1.ecp.epilot.io"
16235
+ },
16236
+ "domain_settings": {
16237
+ "$ref": "#/components/schemas/DomainSettings"
16238
+ },
15914
16239
  "design_id": {
15915
16240
  "$ref": "#/components/schemas/EntityId",
15916
16241
  "description": "ID of the design used to build the portal"
@@ -15937,6 +16262,24 @@
15937
16262
  "BLOCK_IF_PORTAL_USER_EXISTS"
15938
16263
  ]
15939
16264
  },
16265
+ "self_registration_account_setting": {
16266
+ "type": "string",
16267
+ "description": "Controls behavior of self-registration when account is used as the registration entity",
16268
+ "enum": [
16269
+ "ALLOW_WITH_CONTACT_CREATION",
16270
+ "DENY",
16271
+ "ALWAYS_CREATE_CONTACT",
16272
+ "DISALLOW_COMPLETELY"
16273
+ ]
16274
+ },
16275
+ "self_registration_entity": {
16276
+ "type": "string",
16277
+ "description": "Entity type used as the primary identifier for self-registration",
16278
+ "enum": [
16279
+ "contact",
16280
+ "account"
16281
+ ]
16282
+ },
15940
16283
  "user_account_self_management": {
15941
16284
  "type": "boolean",
15942
16285
  "description": "Enable or disable user account self management",
@@ -16355,6 +16698,13 @@
16355
16698
  },
16356
16699
  "origin": {
16357
16700
  "$ref": "#/components/schemas/Origin"
16701
+ },
16702
+ "global_blocks": {
16703
+ "type": "object",
16704
+ "description": "Portal-level blocks shared across all pages (e.g. footer). Keyed by block id.",
16705
+ "additionalProperties": {
16706
+ "$ref": "#/components/schemas/Block"
16707
+ }
16358
16708
  }
16359
16709
  }
16360
16710
  },
@@ -16467,6 +16817,11 @@
16467
16817
  "is_canary": {
16468
16818
  "type": "boolean",
16469
16819
  "description": "Whether the org is in canary mode"
16820
+ },
16821
+ "redirect_to": {
16822
+ "type": "string",
16823
+ "description": "The URL to redirect to",
16824
+ "example": "https://example.com"
16470
16825
  }
16471
16826
  }
16472
16827
  },