@wix/sdk-types 1.13.38 → 1.13.39

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.
@@ -1,6 +1,7 @@
1
1
  import { MonitoringClient } from '@wix/monitoring-types';
2
- import { ConditionalExcept, EmptyObject, Simplify, Paths, SetRequiredDeep, JsonObject } from 'type-fest';
2
+ import { PlatformShowError } from '@wix/error-handler-types/v2';
3
3
  export { ErrorCodesMap, ErrorHandlerPublicAPI as ErrorHandler, ResolvedError, ShowErrorMapFunction, ShowErrorProps, StatusCodeMap } from '@wix/error-handler-types/v2';
4
+ import { ConditionalExcept, EmptyObject, Simplify, Paths, SetRequiredDeep, JsonObject } from 'type-fest';
4
5
  export { ErrorHandlerInternalAPI as WixClientErrorHandler } from '@wix/error-handler-types';
5
6
 
6
7
  type HostModule<T, H extends Host> = {
@@ -29,6 +30,12 @@ type Host<Environment = unknown> = {
29
30
  * Optional function to get a monitoring client
30
31
  */
31
32
  getMonitoringClient?: () => MonitoringClient;
33
+ /**
34
+ * Optional function to display an error notification to the user.
35
+ * Can be used to show a toast, modal, or any other UI element
36
+ * that informs the user about an error that occurred.
37
+ */
38
+ showError?: PlatformShowError;
32
39
  /**
33
40
  * Possible data to be provided by every host, for cross cutting concerns
34
41
  * like internationalization, billing, etc.
package/build/index.d.mts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { MonitoringClient } from '@wix/monitoring-types';
2
- import { ConditionalExcept, EmptyObject, Simplify, Paths, SetRequiredDeep, JsonObject } from 'type-fest';
2
+ import { PlatformShowError } from '@wix/error-handler-types/v2';
3
3
  export { ErrorCodesMap, ErrorHandlerPublicAPI as ErrorHandler, ResolvedError, ShowErrorMapFunction, ShowErrorProps, StatusCodeMap } from '@wix/error-handler-types/v2';
4
+ import { ConditionalExcept, EmptyObject, Simplify, Paths, SetRequiredDeep, JsonObject } from 'type-fest';
4
5
  export { ErrorHandlerInternalAPI as WixClientErrorHandler } from '@wix/error-handler-types';
5
6
 
6
7
  type HostModule<T, H extends Host> = {
@@ -29,6 +30,12 @@ type Host<Environment = unknown> = {
29
30
  * Optional function to get a monitoring client
30
31
  */
31
32
  getMonitoringClient?: () => MonitoringClient;
33
+ /**
34
+ * Optional function to display an error notification to the user.
35
+ * Can be used to show a toast, modal, or any other UI element
36
+ * that informs the user about an error that occurred.
37
+ */
38
+ showError?: PlatformShowError;
32
39
  /**
33
40
  * Possible data to be provided by every host, for cross cutting concerns
34
41
  * like internationalization, billing, etc.
package/build/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { MonitoringClient } from '@wix/monitoring-types';
2
- import { ConditionalExcept, EmptyObject, Simplify, Paths, SetRequiredDeep, JsonObject } from 'type-fest';
2
+ import { PlatformShowError } from '@wix/error-handler-types/v2';
3
3
  export { ErrorCodesMap, ErrorHandlerPublicAPI as ErrorHandler, ResolvedError, ShowErrorMapFunction, ShowErrorProps, StatusCodeMap } from '@wix/error-handler-types/v2';
4
+ import { ConditionalExcept, EmptyObject, Simplify, Paths, SetRequiredDeep, JsonObject } from 'type-fest';
4
5
  export { ErrorHandlerInternalAPI as WixClientErrorHandler } from '@wix/error-handler-types';
5
6
 
6
7
  type HostModule<T, H extends Host> = {
@@ -29,6 +30,12 @@ type Host<Environment = unknown> = {
29
30
  * Optional function to get a monitoring client
30
31
  */
31
32
  getMonitoringClient?: () => MonitoringClient;
33
+ /**
34
+ * Optional function to display an error notification to the user.
35
+ * Can be used to show a toast, modal, or any other UI element
36
+ * that informs the user about an error that occurred.
37
+ */
38
+ showError?: PlatformShowError;
32
39
  /**
33
40
  * Possible data to be provided by every host, for cross cutting concerns
34
41
  * like internationalization, billing, etc.
@@ -1,5 +1,5 @@
1
1
  import { MonitoringClient } from '@wix/monitoring-types';
2
- import { ErrorHandlerAPI } from '@wix/error-handler-types/v2';
2
+ import { ErrorHandlerAPI, PlatformShowError } from '@wix/error-handler-types/v2';
3
3
  export { ErrorCodesMap, ErrorHandlerPublicAPI as ErrorHandler, ResolvedError, ShowErrorMapFunction, ShowErrorProps, StatusCodeMap } from '@wix/error-handler-types/v2';
4
4
  import { ConditionalExcept, EmptyObject, Simplify, Paths, SetRequiredDeep, JsonObject } from 'type-fest';
5
5
  export { ErrorHandlerInternalAPI as WixClientErrorHandler } from '@wix/error-handler-types';
@@ -88,6 +88,12 @@ type Host<Environment = unknown> = {
88
88
  * @internal
89
89
  */
90
90
  getErrorHandler?: () => ErrorHandlerAPI;
91
+ /**
92
+ * Optional function to display an error notification to the user.
93
+ * Can be used to show a toast, modal, or any other UI element
94
+ * that informs the user about an error that occurred.
95
+ */
96
+ showError?: PlatformShowError;
91
97
  /**
92
98
  * Possible data to be provided by every host, for cross cutting concerns
93
99
  * like internationalization, billing, etc.
@@ -1,5 +1,5 @@
1
1
  import { MonitoringClient } from '@wix/monitoring-types';
2
- import { ErrorHandlerAPI } from '@wix/error-handler-types/v2';
2
+ import { ErrorHandlerAPI, PlatformShowError } from '@wix/error-handler-types/v2';
3
3
  export { ErrorCodesMap, ErrorHandlerPublicAPI as ErrorHandler, ResolvedError, ShowErrorMapFunction, ShowErrorProps, StatusCodeMap } from '@wix/error-handler-types/v2';
4
4
  import { ConditionalExcept, EmptyObject, Simplify, Paths, SetRequiredDeep, JsonObject } from 'type-fest';
5
5
  export { ErrorHandlerInternalAPI as WixClientErrorHandler } from '@wix/error-handler-types';
@@ -88,6 +88,12 @@ type Host<Environment = unknown> = {
88
88
  * @internal
89
89
  */
90
90
  getErrorHandler?: () => ErrorHandlerAPI;
91
+ /**
92
+ * Optional function to display an error notification to the user.
93
+ * Can be used to show a toast, modal, or any other UI element
94
+ * that informs the user about an error that occurred.
95
+ */
96
+ showError?: PlatformShowError;
91
97
  /**
92
98
  * Possible data to be provided by every host, for cross cutting concerns
93
99
  * like internationalization, billing, etc.
@@ -1,5 +1,5 @@
1
1
  import { MonitoringClient } from '@wix/monitoring-types';
2
- import { ErrorHandlerAPI } from '@wix/error-handler-types/v2';
2
+ import { ErrorHandlerAPI, PlatformShowError } from '@wix/error-handler-types/v2';
3
3
  export { ErrorCodesMap, ErrorHandlerPublicAPI as ErrorHandler, ResolvedError, ShowErrorMapFunction, ShowErrorProps, StatusCodeMap } from '@wix/error-handler-types/v2';
4
4
  import { ConditionalExcept, EmptyObject, Simplify, Paths, SetRequiredDeep, JsonObject } from 'type-fest';
5
5
  export { ErrorHandlerInternalAPI as WixClientErrorHandler } from '@wix/error-handler-types';
@@ -88,6 +88,12 @@ type Host<Environment = unknown> = {
88
88
  * @internal
89
89
  */
90
90
  getErrorHandler?: () => ErrorHandlerAPI;
91
+ /**
92
+ * Optional function to display an error notification to the user.
93
+ * Can be used to show a toast, modal, or any other UI element
94
+ * that informs the user about an error that occurred.
95
+ */
96
+ showError?: PlatformShowError;
91
97
  /**
92
98
  * Possible data to be provided by every host, for cross cutting concerns
93
99
  * like internationalization, billing, etc.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/sdk-types",
3
- "version": "1.13.38",
3
+ "version": "1.13.39",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Ronny Ringel",
@@ -30,7 +30,7 @@
30
30
  "*.{js,ts}": "yarn lint"
31
31
  },
32
32
  "dependencies": {
33
- "@wix/error-handler-types": "^1.16.0",
33
+ "@wix/error-handler-types": "^1.17.0",
34
34
  "@wix/monitoring-types": "^0.12.0",
35
35
  "type-fest": "^4.41.0"
36
36
  },
@@ -39,7 +39,7 @@
39
39
  "eslint": "^8.57.1",
40
40
  "eslint-config-sdk": "0.0.0",
41
41
  "tsup": "^7.3.0",
42
- "typescript": "^5.8.3",
42
+ "typescript": "^5.9.2",
43
43
  "vitest": "^1.6.1"
44
44
  },
45
45
  "eslintConfig": {
@@ -62,5 +62,5 @@
62
62
  "wallaby": {
63
63
  "autoDetect": true
64
64
  },
65
- "falconPackageHash": "cb8fd377a95d124637ca561819bdfc88f2490ed6e78a5587bced85c6"
65
+ "falconPackageHash": "b13517279eef2041529c87b7815399c774586e149a450ce4e2cca22a"
66
66
  }