@axcode/axcloud-sdk 0.1.1 → 0.1.2
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/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -613,7 +613,7 @@ function useOrg() {
|
|
|
613
613
|
if (usePublicEndpoint) {
|
|
614
614
|
return client.get(`/content/public/${orgId}/org`);
|
|
615
615
|
} else {
|
|
616
|
-
return client.get(
|
|
616
|
+
return client.get(`/orgs/api/organizations/${orgId}`);
|
|
617
617
|
}
|
|
618
618
|
},
|
|
619
619
|
staleTime: 1e3 * 60 * 10
|
|
@@ -797,7 +797,7 @@ function useMySection(options = {}) {
|
|
|
797
797
|
throw new Error("User is not assigned to a section");
|
|
798
798
|
}
|
|
799
799
|
const section = await client.get(
|
|
800
|
-
|
|
800
|
+
`/orgs/api/organizations/${orgId}/sections/${sectionId}`,
|
|
801
801
|
{ includeMembers: includeMembers ? "true" : void 0 }
|
|
802
802
|
);
|
|
803
803
|
return section;
|
|
@@ -826,7 +826,7 @@ function useSections() {
|
|
|
826
826
|
const query = reactQuery.useQuery({
|
|
827
827
|
queryKey: ["axcloud", "sections", orgId, stage],
|
|
828
828
|
queryFn: async () => {
|
|
829
|
-
return client.get(
|
|
829
|
+
return client.get(`/orgs/api/organizations/${orgId}/sections`);
|
|
830
830
|
},
|
|
831
831
|
staleTime: 1e3 * 60 * 10
|
|
832
832
|
// 10 minutes
|
|
@@ -910,7 +910,7 @@ function useLinkedAccounts() {
|
|
|
910
910
|
const query = reactQuery.useQuery({
|
|
911
911
|
queryKey: [...LINKED_ACCOUNTS_QUERY_KEY, stage],
|
|
912
912
|
queryFn: async () => {
|
|
913
|
-
return client.get(
|
|
913
|
+
return client.get(`/identities/api/users/me/identities`);
|
|
914
914
|
},
|
|
915
915
|
enabled: isAuthenticated,
|
|
916
916
|
staleTime: 1e3 * 60 * 5
|
|
@@ -919,7 +919,7 @@ function useLinkedAccounts() {
|
|
|
919
919
|
const linkMutation = reactQuery.useMutation({
|
|
920
920
|
mutationFn: async (provider) => {
|
|
921
921
|
const response = await client.post(
|
|
922
|
-
|
|
922
|
+
`/identities/api/users/me/identities/${provider}/link`,
|
|
923
923
|
{}
|
|
924
924
|
);
|
|
925
925
|
if (response.authorization_url) {
|
|
@@ -934,7 +934,7 @@ function useLinkedAccounts() {
|
|
|
934
934
|
const unlinkMutation = reactQuery.useMutation({
|
|
935
935
|
mutationFn: async (provider) => {
|
|
936
936
|
return client.delete(
|
|
937
|
-
|
|
937
|
+
`/identities/api/users/me/identities/${provider}`
|
|
938
938
|
);
|
|
939
939
|
},
|
|
940
940
|
onSuccess: () => {
|