@wix/sdk-types 1.4.0 → 1.5.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/build/index.d.mts CHANGED
@@ -40,9 +40,14 @@ type APIMetadata = {
40
40
  type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
41
41
 
42
42
  type AuthenticationStrategy<Host = unknown> = {
43
- getAuthHeaders: (host?: Host) => Promise<{
43
+ getAuthHeaders: (host: Host) => Promise<{
44
+ headers: Record<string, string>;
45
+ }>;
46
+ };
47
+ type BoundAuthenticationStrategy = {
48
+ getAuthHeaders: () => Promise<{
44
49
  headers: Record<string, string>;
45
50
  }>;
46
51
  };
47
52
 
48
- export { APIMetadata, AuthenticationStrategy, BuildRESTFunction, Host, HostModule, HostModuleAPI, HttpClient, HttpResponse, RESTFunctionDescriptor, RequestOptions, RequestOptionsFactory };
53
+ export { APIMetadata, AuthenticationStrategy, BoundAuthenticationStrategy, BuildRESTFunction, Host, HostModule, HostModuleAPI, HttpClient, HttpResponse, RESTFunctionDescriptor, RequestOptions, RequestOptionsFactory };
package/build/index.d.ts CHANGED
@@ -40,9 +40,14 @@ type APIMetadata = {
40
40
  type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
41
41
 
42
42
  type AuthenticationStrategy<Host = unknown> = {
43
- getAuthHeaders: (host?: Host) => Promise<{
43
+ getAuthHeaders: (host: Host) => Promise<{
44
+ headers: Record<string, string>;
45
+ }>;
46
+ };
47
+ type BoundAuthenticationStrategy = {
48
+ getAuthHeaders: () => Promise<{
44
49
  headers: Record<string, string>;
45
50
  }>;
46
51
  };
47
52
 
48
- export { APIMetadata, AuthenticationStrategy, BuildRESTFunction, Host, HostModule, HostModuleAPI, HttpClient, HttpResponse, RESTFunctionDescriptor, RequestOptions, RequestOptionsFactory };
53
+ export { APIMetadata, AuthenticationStrategy, BoundAuthenticationStrategy, BuildRESTFunction, Host, 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.4.0",
3
+ "version": "1.5.1",
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
  "devDependencies": {
31
- "@types/node": "^16.18.50",
31
+ "@types/node": "^16.18.58",
32
32
  "eslint": "^7.32.0",
33
33
  "eslint-config-sdk": "0.0.0",
34
34
  "tsup": "^7.2.0",
@@ -57,5 +57,5 @@
57
57
  "wallaby": {
58
58
  "autoDetect": true
59
59
  },
60
- "falconPackageHash": "018177b69554a3229ce062de7208776cee730a488afd8987aeef36fd"
60
+ "falconPackageHash": "f3f90ccd6aba6ca46b26f099be213698c7a84cc4f72aff7806a12ac0"
61
61
  }