@wix/sdk-react 0.5.1 → 0.5.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/browser/index.js +5 -0
- package/build/index.cjs +6 -0
- package/build/index.d.cts +6 -1
- package/build/index.d.ts +6 -1
- package/build/index.js +5 -0
- package/package.json +3 -3
package/build/browser/index.js
CHANGED
|
@@ -51,6 +51,10 @@ function useWixFetch() {
|
|
|
51
51
|
const sdk = useWix();
|
|
52
52
|
return sdk.fetch;
|
|
53
53
|
}
|
|
54
|
+
function useWixFetchWithAuth() {
|
|
55
|
+
const sdk = useWix();
|
|
56
|
+
return sdk.fetchWithAuth;
|
|
57
|
+
}
|
|
54
58
|
function useWixAuth() {
|
|
55
59
|
const sdk = useWix();
|
|
56
60
|
return sdk.auth;
|
|
@@ -74,5 +78,6 @@ export {
|
|
|
74
78
|
useWix,
|
|
75
79
|
useWixAuth,
|
|
76
80
|
useWixFetch,
|
|
81
|
+
useWixFetchWithAuth,
|
|
77
82
|
useWixModules
|
|
78
83
|
};
|
package/build/index.cjs
CHANGED
|
@@ -36,6 +36,7 @@ __export(src_exports, {
|
|
|
36
36
|
useWix: () => useWix,
|
|
37
37
|
useWixAuth: () => useWixAuth,
|
|
38
38
|
useWixFetch: () => useWixFetch,
|
|
39
|
+
useWixFetchWithAuth: () => useWixFetchWithAuth,
|
|
39
40
|
useWixModules: () => useWixModules
|
|
40
41
|
});
|
|
41
42
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -89,6 +90,10 @@ function useWixFetch() {
|
|
|
89
90
|
const sdk = useWix();
|
|
90
91
|
return sdk.fetch;
|
|
91
92
|
}
|
|
93
|
+
function useWixFetchWithAuth() {
|
|
94
|
+
const sdk = useWix();
|
|
95
|
+
return sdk.fetchWithAuth;
|
|
96
|
+
}
|
|
92
97
|
function useWixAuth() {
|
|
93
98
|
const sdk = useWix();
|
|
94
99
|
return sdk.auth;
|
|
@@ -113,6 +118,7 @@ function useEnvironment() {
|
|
|
113
118
|
useWix,
|
|
114
119
|
useWixAuth,
|
|
115
120
|
useWixFetch,
|
|
121
|
+
useWixFetchWithAuth,
|
|
116
122
|
useWixModules,
|
|
117
123
|
...require("@wix/sdk")
|
|
118
124
|
});
|
package/build/index.d.cts
CHANGED
|
@@ -8,9 +8,14 @@ declare function WixProvider<H extends Host<any> | undefined = undefined, T exte
|
|
|
8
8
|
host?: H;
|
|
9
9
|
}>): React.JSX.Element;
|
|
10
10
|
declare function useWix<T extends WixClient<Host<any> | undefined> = WixClient>(): T;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated please use `useWixFetchWithAuth()` instead
|
|
13
|
+
* @returns fetch
|
|
14
|
+
*/
|
|
11
15
|
declare function useWixFetch(): (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
16
|
+
declare function useWixFetchWithAuth(): typeof fetch;
|
|
12
17
|
declare function useWixAuth<T extends AuthenticationStrategy>(): Omit<T, "getAuthHeaders"> & BoundAuthenticationStrategy;
|
|
13
18
|
declare function useWixModules<T extends Descriptors>(modules: T): BuildDescriptors<T, Host<any>>;
|
|
14
19
|
declare function useEnvironment<T>(): T;
|
|
15
20
|
|
|
16
|
-
export { WixProvider, useEnvironment, useWix, useWixAuth, useWixFetch, useWixModules };
|
|
21
|
+
export { WixProvider, useEnvironment, useWix, useWixAuth, useWixFetch, useWixFetchWithAuth, useWixModules };
|
package/build/index.d.ts
CHANGED
|
@@ -8,9 +8,14 @@ declare function WixProvider<H extends Host<any> | undefined = undefined, T exte
|
|
|
8
8
|
host?: H;
|
|
9
9
|
}>): React.JSX.Element;
|
|
10
10
|
declare function useWix<T extends WixClient<Host<any> | undefined> = WixClient>(): T;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated please use `useWixFetchWithAuth()` instead
|
|
13
|
+
* @returns fetch
|
|
14
|
+
*/
|
|
11
15
|
declare function useWixFetch(): (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
16
|
+
declare function useWixFetchWithAuth(): typeof fetch;
|
|
12
17
|
declare function useWixAuth<T extends AuthenticationStrategy>(): Omit<T, "getAuthHeaders"> & BoundAuthenticationStrategy;
|
|
13
18
|
declare function useWixModules<T extends Descriptors>(modules: T): BuildDescriptors<T, Host<any>>;
|
|
14
19
|
declare function useEnvironment<T>(): T;
|
|
15
20
|
|
|
16
|
-
export { WixProvider, useEnvironment, useWix, useWixAuth, useWixFetch, useWixModules };
|
|
21
|
+
export { WixProvider, useEnvironment, useWix, useWixAuth, useWixFetch, useWixFetchWithAuth, useWixModules };
|
package/build/index.js
CHANGED
|
@@ -51,6 +51,10 @@ function useWixFetch() {
|
|
|
51
51
|
const sdk = useWix();
|
|
52
52
|
return sdk.fetch;
|
|
53
53
|
}
|
|
54
|
+
function useWixFetchWithAuth() {
|
|
55
|
+
const sdk = useWix();
|
|
56
|
+
return sdk.fetchWithAuth;
|
|
57
|
+
}
|
|
54
58
|
function useWixAuth() {
|
|
55
59
|
const sdk = useWix();
|
|
56
60
|
return sdk.auth;
|
|
@@ -74,5 +78,6 @@ export {
|
|
|
74
78
|
useWix,
|
|
75
79
|
useWixAuth,
|
|
76
80
|
useWixFetch,
|
|
81
|
+
useWixFetchWithAuth,
|
|
77
82
|
useWixModules
|
|
78
83
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/sdk-react",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"main": "build/index.cjs",
|
|
6
6
|
"module": "build/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"typecheck": "tsc --noEmit"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@wix/sdk": "^1.
|
|
33
|
+
"@wix/sdk": "^1.12.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0"
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"eslintConfig": {
|
|
70
70
|
"extends": "sdk"
|
|
71
71
|
},
|
|
72
|
-
"falconPackageHash": "
|
|
72
|
+
"falconPackageHash": "3177c39439340d85951f05fe8e0a5656980f1982c8291377f08baeb1"
|
|
73
73
|
}
|