@wix/sdk-types 1.2.1 → 1.2.3

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/build/index.d.mts CHANGED
@@ -1,18 +1,8 @@
1
- type HostModule<T, H extends Host> = {
1
+ type HostModule<T, Host> = {
2
2
  __type: 'host';
3
- create(host: H): T;
3
+ create(host: Host): T;
4
4
  };
5
5
  type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
6
- type Host<Environment = unknown> = {
7
- channel: {
8
- observeEnvironment(callback: (environment: Environment) => unknown): {
9
- disconnect: () => void;
10
- } | Promise<{
11
- disconnect: () => void;
12
- }>;
13
- };
14
- environment?: Environment;
15
- };
16
6
 
17
7
  type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
18
8
  interface HttpClient {
@@ -45,4 +35,4 @@ type AuthenticationStrategy<Host = unknown> = {
45
35
  }>;
46
36
  };
47
37
 
48
- export { APIMetadata, AuthenticationStrategy, BuildRESTFunction, Host, HostModule, HostModuleAPI, HttpClient, HttpResponse, RESTFunctionDescriptor, RequestOptions, RequestOptionsFactory };
38
+ export { APIMetadata, AuthenticationStrategy, BuildRESTFunction, HostModule, HostModuleAPI, HttpClient, HttpResponse, RESTFunctionDescriptor, RequestOptions, RequestOptionsFactory };
package/build/index.d.ts CHANGED
@@ -1,18 +1,8 @@
1
- type HostModule<T, H extends Host> = {
1
+ type HostModule<T, Host> = {
2
2
  __type: 'host';
3
- create(host: H): T;
3
+ create(host: Host): T;
4
4
  };
5
5
  type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
6
- type Host<Environment = unknown> = {
7
- channel: {
8
- observeEnvironment(callback: (environment: Environment) => unknown): {
9
- disconnect: () => void;
10
- } | Promise<{
11
- disconnect: () => void;
12
- }>;
13
- };
14
- environment?: Environment;
15
- };
16
6
 
17
7
  type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
18
8
  interface HttpClient {
@@ -45,4 +35,4 @@ type AuthenticationStrategy<Host = unknown> = {
45
35
  }>;
46
36
  };
47
37
 
48
- export { APIMetadata, AuthenticationStrategy, BuildRESTFunction, Host, HostModule, HostModuleAPI, HttpClient, HttpResponse, RESTFunctionDescriptor, RequestOptions, RequestOptionsFactory };
38
+ export { APIMetadata, AuthenticationStrategy, BuildRESTFunction, HostModule, HostModuleAPI, HttpClient, HttpResponse, RESTFunctionDescriptor, RequestOptions, RequestOptionsFactory };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/sdk-types",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "license": "UNLICENSED",
5
5
  "author": {
6
6
  "name": "Ronny Ringel",
@@ -28,7 +28,7 @@
28
28
  "*.{js,ts}": "yarn lint"
29
29
  },
30
30
  "dependencies": {
31
- "@babel/runtime": "^7.22.5"
31
+ "@babel/runtime": "^7.22.6"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/node": "^16.18.38",
@@ -60,5 +60,5 @@
60
60
  "wallaby": {
61
61
  "autoDetect": true
62
62
  },
63
- "falconPackageHash": "d62b5f610622923bfac9e9aa4549371823e6d777ecd3cf02a3263610"
63
+ "falconPackageHash": "8ea0320b2888cd72b852723e943a71978440a9104bdf2f2791253c9a"
64
64
  }