@epilot/app-client 0.13.3 → 0.13.4

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/dist/openapi.d.ts CHANGED
@@ -1595,7 +1595,32 @@ declare namespace Components {
1595
1595
  * The portal looks up this hook implicitly per extension (one `visualizationMetadata` hook per extension) — there is no need for a data-retrieval hook to reference it explicitly.
1596
1596
  *
1597
1597
  */
1598
- PortalExtensionHookVisualizationMetadata)[];
1598
+ PortalExtensionHookVisualizationMetadata | /**
1599
+ * Hook that replaces the built-in change email functionality for portal users. When configured, the portal does not change the user's login email itself. Instead, this hook makes an HTTP call to the third-party system, which is expected to handle the email change (most likely by sending the user instructions to confirm the new email address).
1600
+ * The expected response http status code to the call is:
1601
+ * - 2xx if the request was accepted
1602
+ * - non-2xx if the request failed (optionally with a human-readable message resolved via `resolved.error_message_path`)
1603
+ *
1604
+ */
1605
+ PortalExtensionHookChangeEmail | /**
1606
+ * Hook that replaces the built-in change password functionality for portal users. When configured, the portal does not change the user's password itself. Instead, this hook makes an HTTP call to the third-party system, which is expected to handle the password change (most likely by sending the user instructions to complete the process).
1607
+ * The expected response http status code to the call is:
1608
+ * - 2xx if the request was accepted
1609
+ * - non-2xx if the request failed (optionally with a human-readable message resolved via `resolved.error_message_path`)
1610
+ *
1611
+ */
1612
+ PortalExtensionHookChangePassword | /**
1613
+ * Hook that replaces the built-in delete account functionality for portal users. When configured, the portal does not delete the user itself. Instead, this hook makes an HTTP call to the third-party system, which is expected to handle the deletion.
1614
+ * The `deletion_mode` controls what the portal does after the call:
1615
+ * - `synchronous`: The third-party system deletes the user immediately. The portal waits for a successful (2xx) response and then also deletes the corresponding epilot Cognito user.
1616
+ * - `asynchronous`: The third-party system handles deletion out-of-band. The portal does not delete anything immediately; cleanup is expected to happen later (e.g. via the user deletion API or webhooks).
1617
+ *
1618
+ * The expected response http status code to the call is:
1619
+ * - 2xx if the request was accepted
1620
+ * - non-2xx if the request failed (optionally with a human-readable message resolved via `resolved.error_message_path`)
1621
+ *
1622
+ */
1623
+ PortalExtensionHookDeleteAccount)[];
1599
1624
  links?: {
1600
1625
  /**
1601
1626
  * Identifier of the link. Should not change between updates.
@@ -1625,6 +1650,150 @@ declare namespace Components {
1625
1650
  };
1626
1651
  }[];
1627
1652
  }
1653
+ /**
1654
+ * Hook that replaces the built-in change email functionality for portal users. When configured, the portal does not change the user's login email itself. Instead, this hook makes an HTTP call to the third-party system, which is expected to handle the email change (most likely by sending the user instructions to confirm the new email address).
1655
+ * The expected response http status code to the call is:
1656
+ * - 2xx if the request was accepted
1657
+ * - non-2xx if the request failed (optionally with a human-readable message resolved via `resolved.error_message_path`)
1658
+ *
1659
+ */
1660
+ export interface PortalExtensionHookChangeEmail {
1661
+ /**
1662
+ * Identifier of the hook. Should not change between updates.
1663
+ */
1664
+ id: string; // ^[a-zA-Z0-9_-]+$
1665
+ name?: TranslatedString;
1666
+ type: "changeEmail";
1667
+ /**
1668
+ * Whether the portal user must confirm their current password before the change email request is handed over to the third-party system. When true, the portal collects and verifies the current password before calling the hook.
1669
+ *
1670
+ */
1671
+ require_password_confirmation?: boolean;
1672
+ /**
1673
+ * Optional explanation shown to the user in the change email confirmation dialog.
1674
+ */
1675
+ explanation?: {
1676
+ [name: string]: string;
1677
+ /**
1678
+ * Explanation of the functionality shown to the end user.
1679
+ * example:
1680
+ * You will receive an email with instructions to confirm your new email address.
1681
+ */
1682
+ en: string;
1683
+ };
1684
+ auth?: PortalExtensionAuthBlock;
1685
+ call: {
1686
+ /**
1687
+ * HTTP method to use for the call
1688
+ */
1689
+ method?: string;
1690
+ /**
1691
+ * URL to call. Supports variable interpolation.
1692
+ */
1693
+ url: string;
1694
+ /**
1695
+ * Parameters to append to the URL. Supports variable interpolation.
1696
+ */
1697
+ params?: {
1698
+ [name: string]: string;
1699
+ };
1700
+ /**
1701
+ * Headers to use. Supports variable interpolation.
1702
+ */
1703
+ headers: {
1704
+ [name: string]: string;
1705
+ };
1706
+ /**
1707
+ * Optional JSON body to use for the call. Defaults to an object with the requested new email and portal user context, e.g. `{"new_email": "...", "old_email": "...", "portal_user_id": "..."}`. The requested new email is available as `{{Input.new_email}}` and the current account email as `{{Input.old_email}}`. Supports variable interpolation.
1708
+ */
1709
+ body?: {
1710
+ [key: string]: any;
1711
+ };
1712
+ };
1713
+ resolved?: {
1714
+ /**
1715
+ * Optional path to a human-readable error message in the third-party response body, used when the call fails (non-2xx status).
1716
+ * If specified and the path resolves to a string, that message is forwarded to the end user instead of a generic error.
1717
+ *
1718
+ * example:
1719
+ * error.message
1720
+ */
1721
+ error_message_path?: string;
1722
+ };
1723
+ secure_proxy?: /* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips. */ PortalExtensionSecureProxy;
1724
+ }
1725
+ /**
1726
+ * Hook that replaces the built-in change password functionality for portal users. When configured, the portal does not change the user's password itself. Instead, this hook makes an HTTP call to the third-party system, which is expected to handle the password change (most likely by sending the user instructions to complete the process).
1727
+ * The expected response http status code to the call is:
1728
+ * - 2xx if the request was accepted
1729
+ * - non-2xx if the request failed (optionally with a human-readable message resolved via `resolved.error_message_path`)
1730
+ *
1731
+ */
1732
+ export interface PortalExtensionHookChangePassword {
1733
+ /**
1734
+ * Identifier of the hook. Should not change between updates.
1735
+ */
1736
+ id: string; // ^[a-zA-Z0-9_-]+$
1737
+ name?: TranslatedString;
1738
+ type: "changePassword";
1739
+ /**
1740
+ * Whether the portal user must provide a new password. When false, the portal only asks the user to confirm (showing the configured explanation) and no new password is collected; the third-party system is expected to handle the password change. When true, the portal collects a new password and passes it to the third-party system as `{{Input.new_password}}`.
1741
+ *
1742
+ */
1743
+ require_new_password?: boolean;
1744
+ /**
1745
+ * Optional explanation shown to the user in the change password confirmation dialog.
1746
+ */
1747
+ explanation?: {
1748
+ [name: string]: string;
1749
+ /**
1750
+ * Explanation of the functionality shown to the end user.
1751
+ * example:
1752
+ * You will receive an email with instructions to reset your password.
1753
+ */
1754
+ en: string;
1755
+ };
1756
+ auth?: PortalExtensionAuthBlock;
1757
+ call: {
1758
+ /**
1759
+ * HTTP method to use for the call
1760
+ */
1761
+ method?: string;
1762
+ /**
1763
+ * URL to call. Supports variable interpolation.
1764
+ */
1765
+ url: string;
1766
+ /**
1767
+ * Parameters to append to the URL. Supports variable interpolation.
1768
+ */
1769
+ params?: {
1770
+ [name: string]: string;
1771
+ };
1772
+ /**
1773
+ * Headers to use. Supports variable interpolation.
1774
+ */
1775
+ headers: {
1776
+ [name: string]: string;
1777
+ };
1778
+ /**
1779
+ * Optional JSON body to use for the call. Defaults to an object with portal user context (and the new password as `{{Input.new_password}}` when `require_new_password` is true). Supports variable interpolation.
1780
+ */
1781
+ body?: {
1782
+ [key: string]: any;
1783
+ };
1784
+ };
1785
+ resolved?: {
1786
+ /**
1787
+ * Optional path to a human-readable error message in the third-party response body, used when the call fails (non-2xx status).
1788
+ * If specified and the path resolves to a string, that message is forwarded to the end user instead of a generic error.
1789
+ *
1790
+ * example:
1791
+ * error.message
1792
+ */
1793
+ error_message_path?: string;
1794
+ };
1795
+ secure_proxy?: /* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips. */ PortalExtensionSecureProxy;
1796
+ }
1628
1797
  /**
1629
1798
  * Hook that will allow using the specified source as data for consumption visualizations. This hook is triggered to fetch the data. Format of the request and response has to follow the following specification: TBD. The expected response to the call is:
1630
1799
  * - 200 with the time series data
@@ -1936,6 +2105,82 @@ declare namespace Components {
1936
2105
  use_static_ips?: boolean;
1937
2106
  secure_proxy?: /* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips. */ PortalExtensionSecureProxy;
1938
2107
  }
2108
+ /**
2109
+ * Hook that replaces the built-in delete account functionality for portal users. When configured, the portal does not delete the user itself. Instead, this hook makes an HTTP call to the third-party system, which is expected to handle the deletion.
2110
+ * The `deletion_mode` controls what the portal does after the call:
2111
+ * - `synchronous`: The third-party system deletes the user immediately. The portal waits for a successful (2xx) response and then also deletes the corresponding epilot Cognito user.
2112
+ * - `asynchronous`: The third-party system handles deletion out-of-band. The portal does not delete anything immediately; cleanup is expected to happen later (e.g. via the user deletion API or webhooks).
2113
+ *
2114
+ * The expected response http status code to the call is:
2115
+ * - 2xx if the request was accepted
2116
+ * - non-2xx if the request failed (optionally with a human-readable message resolved via `resolved.error_message_path`)
2117
+ *
2118
+ */
2119
+ export interface PortalExtensionHookDeleteAccount {
2120
+ /**
2121
+ * Identifier of the hook. Should not change between updates.
2122
+ */
2123
+ id: string; // ^[a-zA-Z0-9_-]+$
2124
+ name?: TranslatedString;
2125
+ type: "deleteAccount";
2126
+ /**
2127
+ * Controls how the account deletion is handled. `synchronous` waits for the third-party system to respond and then also deletes the epilot user. `asynchronous` hands the deletion over entirely to the third-party system and the portal does not delete anything immediately.
2128
+ *
2129
+ */
2130
+ deletion_mode?: "synchronous" | "asynchronous";
2131
+ /**
2132
+ * Optional explanation shown to the user in the delete account confirmation dialog.
2133
+ */
2134
+ explanation?: {
2135
+ [name: string]: string;
2136
+ /**
2137
+ * Explanation of the functionality shown to the end user.
2138
+ * example:
2139
+ * Your account deletion will be processed by our system. This may take a few days.
2140
+ */
2141
+ en: string;
2142
+ };
2143
+ auth?: PortalExtensionAuthBlock;
2144
+ call: {
2145
+ /**
2146
+ * HTTP method to use for the call
2147
+ */
2148
+ method?: string;
2149
+ /**
2150
+ * URL to call. Supports variable interpolation.
2151
+ */
2152
+ url: string;
2153
+ /**
2154
+ * Parameters to append to the URL. Supports variable interpolation.
2155
+ */
2156
+ params?: {
2157
+ [name: string]: string;
2158
+ };
2159
+ /**
2160
+ * Headers to use. Supports variable interpolation.
2161
+ */
2162
+ headers: {
2163
+ [name: string]: string;
2164
+ };
2165
+ /**
2166
+ * Optional JSON body to use for the call. Defaults to an object with portal user context, e.g. `{"portal_user_id": "...", "email": "..."}`. Supports variable interpolation.
2167
+ */
2168
+ body?: {
2169
+ [key: string]: any;
2170
+ };
2171
+ };
2172
+ resolved?: {
2173
+ /**
2174
+ * Optional path to a human-readable error message in the third-party response body, used when the call fails (non-2xx status).
2175
+ * If specified and the path resolves to a string, that message is forwarded to the end user instead of a generic error.
2176
+ *
2177
+ * example:
2178
+ * error.message
2179
+ */
2180
+ error_message_path?: string;
2181
+ };
2182
+ secure_proxy?: /* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips. */ PortalExtensionSecureProxy;
2183
+ }
1939
2184
  /**
1940
2185
  * Hook that checks the plausibility of meter readings before they are saved. This hook makes a POST call whenever a user is trying to save a meter reading. The expected response to the call is:
1941
2186
  * - 200:
@@ -3837,10 +4082,13 @@ export type PortalBlockSurfaceConfig = Components.Schemas.PortalBlockSurfaceConf
3837
4082
  export type PortalExtensionAuthBlock = Components.Schemas.PortalExtensionAuthBlock;
3838
4083
  export type PortalExtensionComponent = Components.Schemas.PortalExtensionComponent;
3839
4084
  export type PortalExtensionConfig = Components.Schemas.PortalExtensionConfig;
4085
+ export type PortalExtensionHookChangeEmail = Components.Schemas.PortalExtensionHookChangeEmail;
4086
+ export type PortalExtensionHookChangePassword = Components.Schemas.PortalExtensionHookChangePassword;
3840
4087
  export type PortalExtensionHookConsumptionDataRetrieval = Components.Schemas.PortalExtensionHookConsumptionDataRetrieval;
3841
4088
  export type PortalExtensionHookContractIdentification = Components.Schemas.PortalExtensionHookContractIdentification;
3842
4089
  export type PortalExtensionHookCostDataRetrieval = Components.Schemas.PortalExtensionHookCostDataRetrieval;
3843
4090
  export type PortalExtensionHookDataExport = Components.Schemas.PortalExtensionHookDataExport;
4091
+ export type PortalExtensionHookDeleteAccount = Components.Schemas.PortalExtensionHookDeleteAccount;
3844
4092
  export type PortalExtensionHookMeterReadingPlausibilityCheck = Components.Schemas.PortalExtensionHookMeterReadingPlausibilityCheck;
3845
4093
  export type PortalExtensionHookPriceDataRetrieval = Components.Schemas.PortalExtensionHookPriceDataRetrieval;
3846
4094
  export type PortalExtensionHookRegistrationIdentifiersCheck = Components.Schemas.PortalExtensionHookRegistrationIdentifiersCheck;
package/dist/openapi.json CHANGED
@@ -2651,7 +2651,10 @@
2651
2651
  "dataExport": "#/components/schemas/PortalExtensionHookDataExport",
2652
2652
  "costDataRetrieval": "#/components/schemas/PortalExtensionHookCostDataRetrieval",
2653
2653
  "meterReadingPlausibilityCheck": "#/components/schemas/PortalExtensionHookMeterReadingPlausibilityCheck",
2654
- "visualizationMetadata": "#/components/schemas/PortalExtensionHookVisualizationMetadata"
2654
+ "visualizationMetadata": "#/components/schemas/PortalExtensionHookVisualizationMetadata",
2655
+ "changeEmail": "#/components/schemas/PortalExtensionHookChangeEmail",
2656
+ "changePassword": "#/components/schemas/PortalExtensionHookChangePassword",
2657
+ "deleteAccount": "#/components/schemas/PortalExtensionHookDeleteAccount"
2655
2658
  }
2656
2659
  },
2657
2660
  "oneOf": [
@@ -2678,6 +2681,15 @@
2678
2681
  },
2679
2682
  {
2680
2683
  "$ref": "#/components/schemas/PortalExtensionHookVisualizationMetadata"
2684
+ },
2685
+ {
2686
+ "$ref": "#/components/schemas/PortalExtensionHookChangeEmail"
2687
+ },
2688
+ {
2689
+ "$ref": "#/components/schemas/PortalExtensionHookChangePassword"
2690
+ },
2691
+ {
2692
+ "$ref": "#/components/schemas/PortalExtensionHookDeleteAccount"
2681
2693
  }
2682
2694
  ]
2683
2695
  }
@@ -3571,6 +3583,325 @@
3571
3583
  ],
3572
3584
  "additionalProperties": false
3573
3585
  },
3586
+ "PortalExtensionHookChangeEmail": {
3587
+ "description": "Hook that replaces the built-in change email functionality for portal users. When configured, the portal does not change the user's login email itself. Instead, this hook makes an HTTP call to the third-party system, which is expected to handle the email change (most likely by sending the user instructions to confirm the new email address).\nThe expected response http status code to the call is:\n - 2xx if the request was accepted\n - non-2xx if the request failed (optionally with a human-readable message resolved via `resolved.error_message_path`)\n",
3588
+ "type": "object",
3589
+ "properties": {
3590
+ "id": {
3591
+ "type": "string",
3592
+ "pattern": "^[a-zA-Z0-9_-]+$",
3593
+ "description": "Identifier of the hook. Should not change between updates."
3594
+ },
3595
+ "name": {
3596
+ "$ref": "#/components/schemas/TranslatedString"
3597
+ },
3598
+ "type": {
3599
+ "type": "string",
3600
+ "enum": [
3601
+ "changeEmail"
3602
+ ]
3603
+ },
3604
+ "require_password_confirmation": {
3605
+ "type": "boolean",
3606
+ "description": "Whether the portal user must confirm their current password before the change email request is handed over to the third-party system. When true, the portal collects and verifies the current password before calling the hook.\n",
3607
+ "default": true
3608
+ },
3609
+ "explanation": {
3610
+ "type": "object",
3611
+ "properties": {
3612
+ "en": {
3613
+ "type": "string",
3614
+ "description": "Explanation of the functionality shown to the end user.",
3615
+ "example": "You will receive an email with instructions to confirm your new email address."
3616
+ }
3617
+ },
3618
+ "additionalProperties": {
3619
+ "type": "string",
3620
+ "description": "Explanation of the functionality in language denoted by ISO 3166-1 alpha-2 code."
3621
+ },
3622
+ "required": [
3623
+ "en"
3624
+ ],
3625
+ "description": "Optional explanation shown to the user in the change email confirmation dialog."
3626
+ },
3627
+ "auth": {
3628
+ "$ref": "#/components/schemas/PortalExtensionAuthBlock"
3629
+ },
3630
+ "call": {
3631
+ "type": "object",
3632
+ "properties": {
3633
+ "method": {
3634
+ "type": "string",
3635
+ "description": "HTTP method to use for the call",
3636
+ "default": "POST"
3637
+ },
3638
+ "url": {
3639
+ "type": "string",
3640
+ "description": "URL to call. Supports variable interpolation."
3641
+ },
3642
+ "params": {
3643
+ "type": "object",
3644
+ "description": "Parameters to append to the URL. Supports variable interpolation.",
3645
+ "additionalProperties": {
3646
+ "type": "string"
3647
+ },
3648
+ "default": {}
3649
+ },
3650
+ "headers": {
3651
+ "type": "object",
3652
+ "description": "Headers to use. Supports variable interpolation.",
3653
+ "additionalProperties": {
3654
+ "type": "string"
3655
+ },
3656
+ "default": {}
3657
+ },
3658
+ "body": {
3659
+ "type": "object",
3660
+ "description": "Optional JSON body to use for the call. Defaults to an object with the requested new email and portal user context, e.g. `{\"new_email\": \"...\", \"old_email\": \"...\", \"portal_user_id\": \"...\"}`. The requested new email is available as `{{Input.new_email}}` and the current account email as `{{Input.old_email}}`. Supports variable interpolation."
3661
+ }
3662
+ },
3663
+ "required": [
3664
+ "url",
3665
+ "headers"
3666
+ ],
3667
+ "additionalProperties": false
3668
+ },
3669
+ "resolved": {
3670
+ "type": "object",
3671
+ "properties": {
3672
+ "error_message_path": {
3673
+ "type": "string",
3674
+ "description": "Optional path to a human-readable error message in the third-party response body, used when the call fails (non-2xx status).\nIf specified and the path resolves to a string, that message is forwarded to the end user instead of a generic error.\n",
3675
+ "example": "error.message"
3676
+ }
3677
+ },
3678
+ "additionalProperties": false
3679
+ },
3680
+ "secure_proxy": {
3681
+ "$ref": "#/components/schemas/PortalExtensionSecureProxy"
3682
+ }
3683
+ },
3684
+ "required": [
3685
+ "id",
3686
+ "type",
3687
+ "call"
3688
+ ],
3689
+ "additionalProperties": false
3690
+ },
3691
+ "PortalExtensionHookChangePassword": {
3692
+ "description": "Hook that replaces the built-in change password functionality for portal users. When configured, the portal does not change the user's password itself. Instead, this hook makes an HTTP call to the third-party system, which is expected to handle the password change (most likely by sending the user instructions to complete the process).\nThe expected response http status code to the call is:\n - 2xx if the request was accepted\n - non-2xx if the request failed (optionally with a human-readable message resolved via `resolved.error_message_path`)\n",
3693
+ "type": "object",
3694
+ "properties": {
3695
+ "id": {
3696
+ "type": "string",
3697
+ "pattern": "^[a-zA-Z0-9_-]+$",
3698
+ "description": "Identifier of the hook. Should not change between updates."
3699
+ },
3700
+ "name": {
3701
+ "$ref": "#/components/schemas/TranslatedString"
3702
+ },
3703
+ "type": {
3704
+ "type": "string",
3705
+ "enum": [
3706
+ "changePassword"
3707
+ ]
3708
+ },
3709
+ "require_new_password": {
3710
+ "type": "boolean",
3711
+ "description": "Whether the portal user must provide a new password. When false, the portal only asks the user to confirm (showing the configured explanation) and no new password is collected; the third-party system is expected to handle the password change. When true, the portal collects a new password and passes it to the third-party system as `{{Input.new_password}}`.\n",
3712
+ "default": false
3713
+ },
3714
+ "explanation": {
3715
+ "type": "object",
3716
+ "properties": {
3717
+ "en": {
3718
+ "type": "string",
3719
+ "description": "Explanation of the functionality shown to the end user.",
3720
+ "example": "You will receive an email with instructions to reset your password."
3721
+ }
3722
+ },
3723
+ "additionalProperties": {
3724
+ "type": "string",
3725
+ "description": "Explanation of the functionality in language denoted by ISO 3166-1 alpha-2 code."
3726
+ },
3727
+ "required": [
3728
+ "en"
3729
+ ],
3730
+ "description": "Optional explanation shown to the user in the change password confirmation dialog."
3731
+ },
3732
+ "auth": {
3733
+ "$ref": "#/components/schemas/PortalExtensionAuthBlock"
3734
+ },
3735
+ "call": {
3736
+ "type": "object",
3737
+ "properties": {
3738
+ "method": {
3739
+ "type": "string",
3740
+ "description": "HTTP method to use for the call",
3741
+ "default": "POST"
3742
+ },
3743
+ "url": {
3744
+ "type": "string",
3745
+ "description": "URL to call. Supports variable interpolation."
3746
+ },
3747
+ "params": {
3748
+ "type": "object",
3749
+ "description": "Parameters to append to the URL. Supports variable interpolation.",
3750
+ "additionalProperties": {
3751
+ "type": "string"
3752
+ },
3753
+ "default": {}
3754
+ },
3755
+ "headers": {
3756
+ "type": "object",
3757
+ "description": "Headers to use. Supports variable interpolation.",
3758
+ "additionalProperties": {
3759
+ "type": "string"
3760
+ },
3761
+ "default": {}
3762
+ },
3763
+ "body": {
3764
+ "type": "object",
3765
+ "description": "Optional JSON body to use for the call. Defaults to an object with portal user context (and the new password as `{{Input.new_password}}` when `require_new_password` is true). Supports variable interpolation."
3766
+ }
3767
+ },
3768
+ "required": [
3769
+ "url",
3770
+ "headers"
3771
+ ],
3772
+ "additionalProperties": false
3773
+ },
3774
+ "resolved": {
3775
+ "type": "object",
3776
+ "properties": {
3777
+ "error_message_path": {
3778
+ "type": "string",
3779
+ "description": "Optional path to a human-readable error message in the third-party response body, used when the call fails (non-2xx status).\nIf specified and the path resolves to a string, that message is forwarded to the end user instead of a generic error.\n",
3780
+ "example": "error.message"
3781
+ }
3782
+ },
3783
+ "additionalProperties": false
3784
+ },
3785
+ "secure_proxy": {
3786
+ "$ref": "#/components/schemas/PortalExtensionSecureProxy"
3787
+ }
3788
+ },
3789
+ "required": [
3790
+ "id",
3791
+ "type",
3792
+ "call"
3793
+ ],
3794
+ "additionalProperties": false
3795
+ },
3796
+ "PortalExtensionHookDeleteAccount": {
3797
+ "description": "Hook that replaces the built-in delete account functionality for portal users. When configured, the portal does not delete the user itself. Instead, this hook makes an HTTP call to the third-party system, which is expected to handle the deletion.\nThe `deletion_mode` controls what the portal does after the call:\n - `synchronous`: The third-party system deletes the user immediately. The portal waits for a successful (2xx) response and then also deletes the corresponding epilot Cognito user.\n - `asynchronous`: The third-party system handles deletion out-of-band. The portal does not delete anything immediately; cleanup is expected to happen later (e.g. via the user deletion API or webhooks).\n\nThe expected response http status code to the call is:\n - 2xx if the request was accepted\n - non-2xx if the request failed (optionally with a human-readable message resolved via `resolved.error_message_path`)\n",
3798
+ "type": "object",
3799
+ "properties": {
3800
+ "id": {
3801
+ "type": "string",
3802
+ "pattern": "^[a-zA-Z0-9_-]+$",
3803
+ "description": "Identifier of the hook. Should not change between updates."
3804
+ },
3805
+ "name": {
3806
+ "$ref": "#/components/schemas/TranslatedString"
3807
+ },
3808
+ "type": {
3809
+ "type": "string",
3810
+ "enum": [
3811
+ "deleteAccount"
3812
+ ]
3813
+ },
3814
+ "deletion_mode": {
3815
+ "type": "string",
3816
+ "enum": [
3817
+ "synchronous",
3818
+ "asynchronous"
3819
+ ],
3820
+ "description": "Controls how the account deletion is handled. `synchronous` waits for the third-party system to respond and then also deletes the epilot user. `asynchronous` hands the deletion over entirely to the third-party system and the portal does not delete anything immediately.\n",
3821
+ "default": "synchronous"
3822
+ },
3823
+ "explanation": {
3824
+ "type": "object",
3825
+ "properties": {
3826
+ "en": {
3827
+ "type": "string",
3828
+ "description": "Explanation of the functionality shown to the end user.",
3829
+ "example": "Your account deletion will be processed by our system. This may take a few days."
3830
+ }
3831
+ },
3832
+ "additionalProperties": {
3833
+ "type": "string",
3834
+ "description": "Explanation of the functionality in language denoted by ISO 3166-1 alpha-2 code."
3835
+ },
3836
+ "required": [
3837
+ "en"
3838
+ ],
3839
+ "description": "Optional explanation shown to the user in the delete account confirmation dialog."
3840
+ },
3841
+ "auth": {
3842
+ "$ref": "#/components/schemas/PortalExtensionAuthBlock"
3843
+ },
3844
+ "call": {
3845
+ "type": "object",
3846
+ "properties": {
3847
+ "method": {
3848
+ "type": "string",
3849
+ "description": "HTTP method to use for the call",
3850
+ "default": "POST"
3851
+ },
3852
+ "url": {
3853
+ "type": "string",
3854
+ "description": "URL to call. Supports variable interpolation."
3855
+ },
3856
+ "params": {
3857
+ "type": "object",
3858
+ "description": "Parameters to append to the URL. Supports variable interpolation.",
3859
+ "additionalProperties": {
3860
+ "type": "string"
3861
+ },
3862
+ "default": {}
3863
+ },
3864
+ "headers": {
3865
+ "type": "object",
3866
+ "description": "Headers to use. Supports variable interpolation.",
3867
+ "additionalProperties": {
3868
+ "type": "string"
3869
+ },
3870
+ "default": {}
3871
+ },
3872
+ "body": {
3873
+ "type": "object",
3874
+ "description": "Optional JSON body to use for the call. Defaults to an object with portal user context, e.g. `{\"portal_user_id\": \"...\", \"email\": \"...\"}`. Supports variable interpolation."
3875
+ }
3876
+ },
3877
+ "required": [
3878
+ "url",
3879
+ "headers"
3880
+ ],
3881
+ "additionalProperties": false
3882
+ },
3883
+ "resolved": {
3884
+ "type": "object",
3885
+ "properties": {
3886
+ "error_message_path": {
3887
+ "type": "string",
3888
+ "description": "Optional path to a human-readable error message in the third-party response body, used when the call fails (non-2xx status).\nIf specified and the path resolves to a string, that message is forwarded to the end user instead of a generic error.\n",
3889
+ "example": "error.message"
3890
+ }
3891
+ },
3892
+ "additionalProperties": false
3893
+ },
3894
+ "secure_proxy": {
3895
+ "$ref": "#/components/schemas/PortalExtensionSecureProxy"
3896
+ }
3897
+ },
3898
+ "required": [
3899
+ "id",
3900
+ "type",
3901
+ "call"
3902
+ ],
3903
+ "additionalProperties": false
3904
+ },
3574
3905
  "PortalExtensionSeamlessLink": {
3575
3906
  "type": "object",
3576
3907
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.13.3",
3
+ "version": "0.13.4",
4
4
  "description": "JavaScript client library for the epilot App API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",