@wix/sdk-types 1.17.4 → 1.17.5

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.
@@ -73,7 +73,12 @@ interface HttpClient {
73
73
  request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
74
74
  fetchWithAuth: typeof fetch;
75
75
  wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
76
+ /** Returns the current access token synchronously, if available. */
76
77
  getActiveToken?: () => string | undefined;
78
+ /** Returns auth headers (may trigger token refresh). Prefer this over getActiveToken when making authenticated requests. */
79
+ getAuthHeaders?: () => Promise<{
80
+ headers: Record<string, string>;
81
+ }>;
77
82
  }
78
83
  type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
79
84
  type HttpResponse<T = any> = {
package/build/index.d.mts CHANGED
@@ -73,7 +73,12 @@ interface HttpClient {
73
73
  request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
74
74
  fetchWithAuth: typeof fetch;
75
75
  wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
76
+ /** Returns the current access token synchronously, if available. */
76
77
  getActiveToken?: () => string | undefined;
78
+ /** Returns auth headers (may trigger token refresh). Prefer this over getActiveToken when making authenticated requests. */
79
+ getAuthHeaders?: () => Promise<{
80
+ headers: Record<string, string>;
81
+ }>;
77
82
  }
78
83
  type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
79
84
  type HttpResponse<T = any> = {
package/build/index.d.ts CHANGED
@@ -73,7 +73,12 @@ interface HttpClient {
73
73
  request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
74
74
  fetchWithAuth: typeof fetch;
75
75
  wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
76
+ /** Returns the current access token synchronously, if available. */
76
77
  getActiveToken?: () => string | undefined;
78
+ /** Returns auth headers (may trigger token refresh). Prefer this over getActiveToken when making authenticated requests. */
79
+ getAuthHeaders?: () => Promise<{
80
+ headers: Record<string, string>;
81
+ }>;
77
82
  }
78
83
  type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
79
84
  type HttpResponse<T = any> = {
@@ -131,7 +131,12 @@ interface HttpClient {
131
131
  request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
132
132
  fetchWithAuth: typeof fetch;
133
133
  wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
134
+ /** Returns the current access token synchronously, if available. */
134
135
  getActiveToken?: () => string | undefined;
136
+ /** Returns auth headers (may trigger token refresh). Prefer this over getActiveToken when making authenticated requests. */
137
+ getAuthHeaders?: () => Promise<{
138
+ headers: Record<string, string>;
139
+ }>;
135
140
  }
136
141
  type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
137
142
  type HttpResponse<T = any> = {
@@ -131,7 +131,12 @@ interface HttpClient {
131
131
  request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
132
132
  fetchWithAuth: typeof fetch;
133
133
  wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
134
+ /** Returns the current access token synchronously, if available. */
134
135
  getActiveToken?: () => string | undefined;
136
+ /** Returns auth headers (may trigger token refresh). Prefer this over getActiveToken when making authenticated requests. */
137
+ getAuthHeaders?: () => Promise<{
138
+ headers: Record<string, string>;
139
+ }>;
135
140
  }
136
141
  type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
137
142
  type HttpResponse<T = any> = {
@@ -131,7 +131,12 @@ interface HttpClient {
131
131
  request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
132
132
  fetchWithAuth: typeof fetch;
133
133
  wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
134
+ /** Returns the current access token synchronously, if available. */
134
135
  getActiveToken?: () => string | undefined;
136
+ /** Returns auth headers (may trigger token refresh). Prefer this over getActiveToken when making authenticated requests. */
137
+ getAuthHeaders?: () => Promise<{
138
+ headers: Record<string, string>;
139
+ }>;
135
140
  }
136
141
  type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
137
142
  type HttpResponse<T = any> = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/sdk-types",
3
- "version": "1.17.4",
3
+ "version": "1.17.5",
4
4
  "author": {
5
5
  "name": "Ronny Ringel",
6
6
  "email": "ronnyr@wix.com"
@@ -62,5 +62,5 @@
62
62
  ]
63
63
  }
64
64
  },
65
- "falconPackageHash": "1d9bf5bab7590b3128ea9479165bc5243e09e387acd60b54b5fa1863"
65
+ "falconPackageHash": "db830ffd08e27bb7db1c480c3f9ec43b0988a139aafd5fd7da849047"
66
66
  }