@wix/sdk-types 1.10.0 → 1.12.0
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 +8 -0
- package/build/index.d.ts +8 -0
- package/package.json +2 -2
package/build/index.d.mts
CHANGED
|
@@ -31,6 +31,7 @@ interface HttpClient {
|
|
|
31
31
|
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
32
32
|
fetchWithAuth: typeof fetch;
|
|
33
33
|
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
34
|
+
getActiveToken?: () => string | undefined;
|
|
34
35
|
}
|
|
35
36
|
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
36
37
|
type HttpResponse<T = any> = {
|
|
@@ -65,6 +66,13 @@ type AuthenticationStrategy<Host = unknown> = {
|
|
|
65
66
|
};
|
|
66
67
|
valid: boolean;
|
|
67
68
|
}>;
|
|
69
|
+
/**
|
|
70
|
+
* This function is used to get the token that is currently active in the context of the strategy.
|
|
71
|
+
* This is useful when direct access to the access token is needed
|
|
72
|
+
* (such as getTokenInfo that requires the token in the body of the request).
|
|
73
|
+
* @returns the token that is currently active in the context of the strategy
|
|
74
|
+
*/
|
|
75
|
+
getActiveToken?: () => string | undefined;
|
|
68
76
|
};
|
|
69
77
|
type BoundAuthenticationStrategy = {
|
|
70
78
|
getAuthHeaders: () => Promise<{
|
package/build/index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ interface HttpClient {
|
|
|
31
31
|
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
32
32
|
fetchWithAuth: typeof fetch;
|
|
33
33
|
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
34
|
+
getActiveToken?: () => string | undefined;
|
|
34
35
|
}
|
|
35
36
|
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
36
37
|
type HttpResponse<T = any> = {
|
|
@@ -65,6 +66,13 @@ type AuthenticationStrategy<Host = unknown> = {
|
|
|
65
66
|
};
|
|
66
67
|
valid: boolean;
|
|
67
68
|
}>;
|
|
69
|
+
/**
|
|
70
|
+
* This function is used to get the token that is currently active in the context of the strategy.
|
|
71
|
+
* This is useful when direct access to the access token is needed
|
|
72
|
+
* (such as getTokenInfo that requires the token in the body of the request).
|
|
73
|
+
* @returns the token that is currently active in the context of the strategy
|
|
74
|
+
*/
|
|
75
|
+
getActiveToken?: () => string | undefined;
|
|
68
76
|
};
|
|
69
77
|
type BoundAuthenticationStrategy = {
|
|
70
78
|
getAuthHeaders: () => Promise<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/sdk-types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Ronny Ringel",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"wallaby": {
|
|
59
59
|
"autoDetect": true
|
|
60
60
|
},
|
|
61
|
-
"falconPackageHash": "
|
|
61
|
+
"falconPackageHash": "afea462af817d46a125dccc9e9329bc3c1cb8778bcfbda5664e09896"
|
|
62
62
|
}
|