Skip to content

Auth.Cluster ​

Overview ​

Available Operations ​

createInvite ​

Issue a one-shot invite that provisions a new org on acceptance. Email-bound invites can be accepted headless (passwordless + issueApiKey).

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.auth.cluster.createInvite({});

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authClusterCreateInvite } from "@meetkai/mka1/funcs/authClusterCreateInvite.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await authClusterCreateInvite(sdk, {});
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authClusterCreateInvite failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useAuthClusterCreateInviteMutation
} from "@meetkai/mka1/react-query/authClusterCreateInvite.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.CreateClusterInviteRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<operations.CreateClusterInviteResponseBody>

Errors ​

Error TypeStatus CodeContent Type
errors.CreateClusterInviteResponseBody400application/json
errors.CreateClusterInviteAuthClusterResponseBody401application/json
errors.CreateClusterInviteAuthClusterResponseResponseBody403application/json
errors.CreateClusterInviteAuthClusterResponse404ResponseBody404application/json
errors.CreateClusterInviteAuthClusterResponse409ResponseBody409application/json
errors.CreateClusterInviteAuthClusterResponse410ResponseBody410application/json
errors.CreateClusterInviteAuthClusterResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

listInvites ​

List cluster invitations

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.auth.cluster.listInvites({});

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authClusterListInvites } from "@meetkai/mka1/funcs/authClusterListInvites.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await authClusterListInvites(sdk, {});
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authClusterListInvites failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Query hooks for fetching data.
  useAuthClusterListInvites,
  useAuthClusterListInvitesSuspense,

  // Utility for prefetching data during server-side rendering and in React
  // Server Components that will be immediately available to client components
  // using the hooks.
  prefetchAuthClusterListInvites,
  
  // Utilities to invalidate the query cache for this query in response to
  // mutations and other user actions.
  invalidateAuthClusterListInvites,
  invalidateAllAuthClusterListInvites,
} from "@meetkai/mka1/react-query/authClusterListInvites.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.ListClusterInvitesRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<operations.ListClusterInvitesResponseBody>

Errors ​

Error TypeStatus CodeContent Type
errors.ListClusterInvitesResponseBody400application/json
errors.ListClusterInvitesAuthClusterResponseBody401application/json
errors.ListClusterInvitesAuthClusterResponseResponseBody403application/json
errors.ListClusterInvitesAuthClusterResponse404ResponseBody404application/json
errors.ListClusterInvitesAuthClusterResponse409ResponseBody409application/json
errors.ListClusterInvitesAuthClusterResponse410ResponseBody410application/json
errors.ListClusterInvitesAuthClusterResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

updateInvite ​

Extend the expiry or atomically replace the available-model, API-quota, or compute policy of an unclaimed, unexpired invitation. Omitted top-level fields are preserved.

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.auth.cluster.updateInvite({
    id: "<id>",
    requestBody: {},
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authClusterUpdateInvite } from "@meetkai/mka1/funcs/authClusterUpdateInvite.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await authClusterUpdateInvite(sdk, {
    id: "<id>",
    requestBody: {},
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authClusterUpdateInvite failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useAuthClusterUpdateInviteMutation
} from "@meetkai/mka1/react-query/authClusterUpdateInvite.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.UpdateClusterInviteRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<operations.UpdateClusterInviteResponseBody>

Errors ​

Error TypeStatus CodeContent Type
errors.UpdateClusterInviteResponseBody400application/json
errors.UpdateClusterInviteAuthClusterResponseBody401application/json
errors.UpdateClusterInviteAuthClusterResponseResponseBody403application/json
errors.UpdateClusterInviteAuthClusterResponse404ResponseBody404application/json
errors.UpdateClusterInviteAuthClusterResponse409ResponseBody409application/json
errors.UpdateClusterInviteAuthClusterResponse410ResponseBody410application/json
errors.UpdateClusterInviteAuthClusterResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

revokeInvite ​

Revoke a cluster invitation

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.auth.cluster.revokeInvite({
    id: "<id>",
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authClusterRevokeInvite } from "@meetkai/mka1/funcs/authClusterRevokeInvite.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await authClusterRevokeInvite(sdk, {
    id: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authClusterRevokeInvite failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useAuthClusterRevokeInviteMutation
} from "@meetkai/mka1/react-query/authClusterRevokeInvite.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.RevokeClusterInviteRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<operations.RevokeClusterInviteResponseBody>

Errors ​

Error TypeStatus CodeContent Type
errors.RevokeClusterInviteResponseBody400application/json
errors.RevokeClusterInviteAuthClusterResponseBody401application/json
errors.RevokeClusterInviteAuthClusterResponseResponseBody403application/json
errors.RevokeClusterInviteAuthClusterResponse404ResponseBody404application/json
errors.RevokeClusterInviteAuthClusterResponse409ResponseBody409application/json
errors.RevokeClusterInviteAuthClusterResponse410ResponseBody410application/json
errors.RevokeClusterInviteAuthClusterResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

listOrgs ​

List all organizations

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.auth.cluster.listOrgs({});

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authClusterListOrgs } from "@meetkai/mka1/funcs/authClusterListOrgs.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await authClusterListOrgs(sdk, {});
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authClusterListOrgs failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Query hooks for fetching data.
  useAuthClusterListOrgs,
  useAuthClusterListOrgsSuspense,

  // Utility for prefetching data during server-side rendering and in React
  // Server Components that will be immediately available to client components
  // using the hooks.
  prefetchAuthClusterListOrgs,
  
  // Utilities to invalidate the query cache for this query in response to
  // mutations and other user actions.
  invalidateAuthClusterListOrgs,
  invalidateAllAuthClusterListOrgs,
} from "@meetkai/mka1/react-query/authClusterListOrgs.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.ListClusterOrgsRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<operations.ListClusterOrgsResponseBody>

Errors ​

Error TypeStatus CodeContent Type
errors.ListClusterOrgsResponseBody400application/json
errors.ListClusterOrgsAuthClusterResponseBody401application/json
errors.ListClusterOrgsAuthClusterResponseResponseBody403application/json
errors.ListClusterOrgsAuthClusterResponse404ResponseBody404application/json
errors.ListClusterOrgsAuthClusterResponse409ResponseBody409application/json
errors.ListClusterOrgsAuthClusterResponse410ResponseBody410application/json
errors.ListClusterOrgsAuthClusterResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

getOrg ​

Get an organization

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.auth.cluster.getOrg({
    id: "<id>",
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authClusterGetOrg } from "@meetkai/mka1/funcs/authClusterGetOrg.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await authClusterGetOrg(sdk, {
    id: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authClusterGetOrg failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Query hooks for fetching data.
  useAuthClusterGetOrg,
  useAuthClusterGetOrgSuspense,

  // Utility for prefetching data during server-side rendering and in React
  // Server Components that will be immediately available to client components
  // using the hooks.
  prefetchAuthClusterGetOrg,
  
  // Utilities to invalidate the query cache for this query in response to
  // mutations and other user actions.
  invalidateAuthClusterGetOrg,
  invalidateAllAuthClusterGetOrg,
} from "@meetkai/mka1/react-query/authClusterGetOrg.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.GetClusterOrgRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<operations.GetClusterOrgResponseBody>

Errors ​

Error TypeStatus CodeContent Type
errors.GetClusterOrgResponseBody400application/json
errors.GetClusterOrgAuthClusterResponseBody401application/json
errors.GetClusterOrgAuthClusterResponseResponseBody403application/json
errors.GetClusterOrgAuthClusterResponse404ResponseBody404application/json
errors.GetClusterOrgAuthClusterResponse409ResponseBody409application/json
errors.GetClusterOrgAuthClusterResponse410ResponseBody410application/json
errors.GetClusterOrgAuthClusterResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

deleteOrg ​

Soft-delete an organization

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.auth.cluster.deleteOrg({
    id: "<id>",
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authClusterDeleteOrg } from "@meetkai/mka1/funcs/authClusterDeleteOrg.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await authClusterDeleteOrg(sdk, {
    id: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authClusterDeleteOrg failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useAuthClusterDeleteOrgMutation
} from "@meetkai/mka1/react-query/authClusterDeleteOrg.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.DeleteClusterOrgRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<operations.DeleteClusterOrgResponseBody>

Errors ​

Error TypeStatus CodeContent Type
errors.DeleteClusterOrgResponseBody400application/json
errors.DeleteClusterOrgAuthClusterResponseBody401application/json
errors.DeleteClusterOrgAuthClusterResponseResponseBody403application/json
errors.DeleteClusterOrgAuthClusterResponse404ResponseBody404application/json
errors.DeleteClusterOrgAuthClusterResponse409ResponseBody409application/json
errors.DeleteClusterOrgAuthClusterResponse410ResponseBody410application/json
errors.DeleteClusterOrgAuthClusterResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

inviteOrgMembers ​

Requires a cluster-admin session with Cluster as its active organization. The target must be active and cannot be Cluster. Sends up to 20 organization invitations without switching the admin's session or joining the target organization. Each row accepts role member or admin, defaulting to member; owner and custom roles are not supported. New invitations include the target's oldest team when one exists. Results follow input order; invalid emails, duplicates, existing members, pending invitations, and delivery failures are reported per row. An existing pending invitation must match the requested role, including when resend is false. An explicit resend reuses a matching pending invitation with no team or the target's oldest team, preserving its inviter, role, and team. Invitation expiry is 48 hours; at most 100 unexpired pending invitations are allowed per organization. API keys are not supported.

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK();

async function run() {
  const result = await sdk.auth.cluster.inviteOrgMembers({
    sessionCookie: "<YOUR_API_KEY_HERE>",
  }, {
    id: "<id>",
    requestBody: {
      invitations: [
        {
          email: "Aurelio1@yahoo.com",
        },
      ],
    },
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authClusterInviteOrgMembers } from "@meetkai/mka1/funcs/authClusterInviteOrgMembers.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore();

async function run() {
  const res = await authClusterInviteOrgMembers(sdk, {
    sessionCookie: "<YOUR_API_KEY_HERE>",
  }, {
    id: "<id>",
    requestBody: {
      invitations: [
        {
          email: "Aurelio1@yahoo.com",
        },
      ],
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authClusterInviteOrgMembers failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useAuthClusterInviteOrgMembersMutation
} from "@meetkai/mka1/react-query/authClusterInviteOrgMembers.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.InviteClusterOrgMembersRequest✔️The request object to use for the request.
securityoperations.InviteClusterOrgMembersSecurity✔️The security requirements to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<operations.InviteClusterOrgMembersResponseBody>

Errors ​

Error TypeStatus CodeContent Type
errors.InviteClusterOrgMembersResponseBody400application/json
errors.InviteClusterOrgMembersAuthClusterResponseBody401application/json
errors.InviteClusterOrgMembersAuthClusterResponseResponseBody403application/json
errors.InviteClusterOrgMembersAuthClusterResponse404ResponseBody404application/json
errors.InviteClusterOrgMembersAuthClusterResponse409ResponseBody409application/json
errors.InviteClusterOrgMembersAuthClusterResponse410ResponseBody410application/json
errors.InviteClusterOrgMembersAuthClusterResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

suspendOrg ​

Suspend an organization

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.auth.cluster.suspendOrg({
    id: "<id>",
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authClusterSuspendOrg } from "@meetkai/mka1/funcs/authClusterSuspendOrg.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await authClusterSuspendOrg(sdk, {
    id: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authClusterSuspendOrg failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useAuthClusterSuspendOrgMutation
} from "@meetkai/mka1/react-query/authClusterSuspendOrg.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.SuspendClusterOrgRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<operations.SuspendClusterOrgResponseBody>

Errors ​

Error TypeStatus CodeContent Type
errors.SuspendClusterOrgResponseBody400application/json
errors.SuspendClusterOrgAuthClusterResponseBody401application/json
errors.SuspendClusterOrgAuthClusterResponseResponseBody403application/json
errors.SuspendClusterOrgAuthClusterResponse404ResponseBody404application/json
errors.SuspendClusterOrgAuthClusterResponse409ResponseBody409application/json
errors.SuspendClusterOrgAuthClusterResponse410ResponseBody410application/json
errors.SuspendClusterOrgAuthClusterResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

unsuspendOrg ​

Unsuspend an organization

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.auth.cluster.unsuspendOrg({
    id: "<id>",
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authClusterUnsuspendOrg } from "@meetkai/mka1/funcs/authClusterUnsuspendOrg.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await authClusterUnsuspendOrg(sdk, {
    id: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authClusterUnsuspendOrg failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useAuthClusterUnsuspendOrgMutation
} from "@meetkai/mka1/react-query/authClusterUnsuspendOrg.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.UnsuspendClusterOrgRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<operations.UnsuspendClusterOrgResponseBody>

Errors ​

Error TypeStatus CodeContent Type
errors.UnsuspendClusterOrgResponseBody400application/json
errors.UnsuspendClusterOrgAuthClusterResponseBody401application/json
errors.UnsuspendClusterOrgAuthClusterResponseResponseBody403application/json
errors.UnsuspendClusterOrgAuthClusterResponse404ResponseBody404application/json
errors.UnsuspendClusterOrgAuthClusterResponse409ResponseBody409application/json
errors.UnsuspendClusterOrgAuthClusterResponse410ResponseBody410application/json
errors.UnsuspendClusterOrgAuthClusterResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

reissueOwnerKey ​

Mint a fresh owner-bound key for an org whose credential was lost. Cluster-admin only (write:cluster). Defaults to the org's oldest human owner and oldest team; userId / teamId override.

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.auth.cluster.reissueOwnerKey({
    id: "<id>",
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authClusterReissueOwnerKey } from "@meetkai/mka1/funcs/authClusterReissueOwnerKey.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await authClusterReissueOwnerKey(sdk, {
    id: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authClusterReissueOwnerKey failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useAuthClusterReissueOwnerKeyMutation
} from "@meetkai/mka1/react-query/authClusterReissueOwnerKey.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.ReissueOwnerKeyRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<operations.ReissueOwnerKeyResponseBody>

Errors ​

Error TypeStatus CodeContent Type
errors.ReissueOwnerKeyResponseBody400application/json
errors.ReissueOwnerKeyAuthClusterResponseBody401application/json
errors.ReissueOwnerKeyAuthClusterResponseResponseBody403application/json
errors.ReissueOwnerKeyAuthClusterResponse404ResponseBody404application/json
errors.ReissueOwnerKeyAuthClusterResponse409ResponseBody409application/json
errors.ReissueOwnerKeyAuthClusterResponse410ResponseBody410application/json
errors.ReissueOwnerKeyAuthClusterResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

inviteInfo ​

Read cluster-invite info (public)

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.auth.cluster.inviteInfo({
    token: "<value>",
  });

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authClusterInviteInfo } from "@meetkai/mka1/funcs/authClusterInviteInfo.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await authClusterInviteInfo(sdk, {
    token: "<value>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authClusterInviteInfo failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Query hooks for fetching data.
  useAuthClusterInviteInfo,
  useAuthClusterInviteInfoSuspense,

  // Utility for prefetching data during server-side rendering and in React
  // Server Components that will be immediately available to client components
  // using the hooks.
  prefetchAuthClusterInviteInfo,
  
  // Utilities to invalidate the query cache for this query in response to
  // mutations and other user actions.
  invalidateAuthClusterInviteInfo,
  invalidateAllAuthClusterInviteInfo,
} from "@meetkai/mka1/react-query/authClusterInviteInfo.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.GetClusterInviteInfoRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<operations.GetClusterInviteInfoResponseBody>

Errors ​

Error TypeStatus CodeContent Type
errors.GetClusterInviteInfoResponseBody400application/json
errors.GetClusterInviteInfoAuthClusterResponseBody401application/json
errors.GetClusterInviteInfoAuthClusterResponseResponseBody403application/json
errors.GetClusterInviteInfoAuthClusterResponse404ResponseBody404application/json
errors.GetClusterInviteInfoAuthClusterResponse409ResponseBody409application/json
errors.GetClusterInviteInfoAuthClusterResponse410ResponseBody410application/json
errors.GetClusterInviteInfoAuthClusterResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

acceptInvite ​

Accept an invite and create the org. Existing signed-in user, new email/password owner, or (email-bound) headless machine owner with passwordless: true, issueApiKey: true. A reserved slug (api, whether supplied as orgSlug or derived from orgName) is refused with 400 reserved_org_slug; a slug another org already holds is refused with 409. Note POST /organization/check-slug does not know about reserved slugs and will report api as available.

Example Usage ​

typescript
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.auth.cluster.acceptInvite({});

  console.log(result);
}

run();

Standalone function ​

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authClusterAcceptInvite } from "@meetkai/mka1/funcs/authClusterAcceptInvite.js";

// Use `SDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const sdk = new SDKCore({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await authClusterAcceptInvite(sdk, {});
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authClusterAcceptInvite failed:", res.error);
  }
}

run();

React hooks and utilities ​

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

tsx
import {
  // Mutation hook for triggering the API call.
  useAuthClusterAcceptInviteMutation
} from "@meetkai/mka1/react-query/authClusterAcceptInvite.js";

Parameters ​

ParameterTypeRequiredDescription
requestoperations.AcceptClusterInviteRequest✔️The request object to use for the request.
optionsRequestOptions➖Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit➖Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig➖Enables retrying HTTP requests under certain failure conditions.

Response ​

Promise<operations.AcceptClusterInviteResponseBody>

Errors ​

Error TypeStatus CodeContent Type
errors.AcceptClusterInviteResponseBody400application/json
errors.AcceptClusterInviteAuthClusterResponseBody401application/json
errors.AcceptClusterInviteAuthClusterResponseResponseBody403application/json
errors.AcceptClusterInviteAuthClusterResponse404ResponseBody404application/json
errors.AcceptClusterInviteAuthClusterResponse409ResponseBody409application/json
errors.AcceptClusterInviteAuthClusterResponse410ResponseBody410application/json
errors.AcceptClusterInviteAuthClusterResponse429ResponseBody429application/json
errors.AcceptClusterInviteAuthClusterResponse503ResponseBody503application/json
errors.APIError4XX, 5XX*/*