@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.mjs CHANGED
@@ -611,7 +611,7 @@ function useOrg() {
611
611
  if (usePublicEndpoint) {
612
612
  return client.get(`/content/public/${orgId}/org`);
613
613
  } else {
614
- return client.get(`/${stage}/api/organizations/${orgId}`);
614
+ return client.get(`/orgs/api/organizations/${orgId}`);
615
615
  }
616
616
  },
617
617
  staleTime: 1e3 * 60 * 10
@@ -795,7 +795,7 @@ function useMySection(options = {}) {
795
795
  throw new Error("User is not assigned to a section");
796
796
  }
797
797
  const section = await client.get(
798
- `/${stage}/api/sections/${sectionId}`,
798
+ `/orgs/api/organizations/${orgId}/sections/${sectionId}`,
799
799
  { includeMembers: includeMembers ? "true" : void 0 }
800
800
  );
801
801
  return section;
@@ -824,7 +824,7 @@ function useSections() {
824
824
  const query = useQuery({
825
825
  queryKey: ["axcloud", "sections", orgId, stage],
826
826
  queryFn: async () => {
827
- return client.get(`/${stage}/api/organizations/${orgId}/sections`);
827
+ return client.get(`/orgs/api/organizations/${orgId}/sections`);
828
828
  },
829
829
  staleTime: 1e3 * 60 * 10
830
830
  // 10 minutes
@@ -908,7 +908,7 @@ function useLinkedAccounts() {
908
908
  const query = useQuery({
909
909
  queryKey: [...LINKED_ACCOUNTS_QUERY_KEY, stage],
910
910
  queryFn: async () => {
911
- return client.get(`/${stage}/api/users/me/identities`);
911
+ return client.get(`/identities/api/users/me/identities`);
912
912
  },
913
913
  enabled: isAuthenticated,
914
914
  staleTime: 1e3 * 60 * 5
@@ -917,7 +917,7 @@ function useLinkedAccounts() {
917
917
  const linkMutation = useMutation({
918
918
  mutationFn: async (provider) => {
919
919
  const response = await client.post(
920
- `/${stage}/api/users/me/identities/${provider}/link`,
920
+ `/identities/api/users/me/identities/${provider}/link`,
921
921
  {}
922
922
  );
923
923
  if (response.authorization_url) {
@@ -932,7 +932,7 @@ function useLinkedAccounts() {
932
932
  const unlinkMutation = useMutation({
933
933
  mutationFn: async (provider) => {
934
934
  return client.delete(
935
- `/${stage}/api/users/me/identities/${provider}`
935
+ `/identities/api/users/me/identities/${provider}`
936
936
  );
937
937
  },
938
938
  onSuccess: () => {