Auth.Cluster
Overview
Available Operations
- createInvite - Create a cluster invitation
- listInvites - List cluster invitations
- revokeInvite - Revoke a cluster invitation
- listOrgs - List all organizations
- getOrg - Get an organization
- deleteOrg - Soft-delete an organization
- suspendOrg - Suspend an organization
- unsuspendOrg - Unsuspend an organization
- reissueOwnerKey - Re-issue an org owner key (recovery)
- inviteInfo - Read cluster-invite info (public)
- acceptInvite - Accept a cluster invitation (public)
createInvite
Issue a one-shot invite that provisions a new org on acceptance. Email-bound invites can be accepted headless (passwordless + issueApiKey).
Example Usage
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:
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.
import {
// Mutation hook for triggering the API call.
useAuthClusterCreateInviteMutation
} from "@meetkai/mka1/react-query/authClusterCreateInvite.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.CreateClusterInviteRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | 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.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.CreateClusterInviteResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.CreateClusterInviteResponseBody | 400 | application/json |
| errors.CreateClusterInviteAuthClusterResponseBody | 401 | application/json |
| errors.CreateClusterInviteAuthClusterResponseResponseBody | 403 | application/json |
| errors.CreateClusterInviteAuthClusterResponse404ResponseBody | 404 | application/json |
| errors.CreateClusterInviteAuthClusterResponse409ResponseBody | 409 | application/json |
| errors.CreateClusterInviteAuthClusterResponse429ResponseBody | 429 | application/json |
| errors.APIError | 4XX, 5XX | */* |
listInvites
List cluster invitations
Example Usage
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:
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.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ListClusterInvitesRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | 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.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.ListClusterInvitesResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ListClusterInvitesResponseBody | 400 | application/json |
| errors.ListClusterInvitesAuthClusterResponseBody | 401 | application/json |
| errors.ListClusterInvitesAuthClusterResponseResponseBody | 403 | application/json |
| errors.ListClusterInvitesAuthClusterResponse404ResponseBody | 404 | application/json |
| errors.ListClusterInvitesAuthClusterResponse409ResponseBody | 409 | application/json |
| errors.ListClusterInvitesAuthClusterResponse429ResponseBody | 429 | application/json |
| errors.APIError | 4XX, 5XX | */* |
revokeInvite
Revoke a cluster invitation
Example Usage
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:
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.
import {
// Mutation hook for triggering the API call.
useAuthClusterRevokeInviteMutation
} from "@meetkai/mka1/react-query/authClusterRevokeInvite.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.RevokeClusterInviteRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | 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.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.RevokeClusterInviteResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.RevokeClusterInviteResponseBody | 400 | application/json |
| errors.RevokeClusterInviteAuthClusterResponseBody | 401 | application/json |
| errors.RevokeClusterInviteAuthClusterResponseResponseBody | 403 | application/json |
| errors.RevokeClusterInviteAuthClusterResponse404ResponseBody | 404 | application/json |
| errors.RevokeClusterInviteAuthClusterResponse409ResponseBody | 409 | application/json |
| errors.RevokeClusterInviteAuthClusterResponse429ResponseBody | 429 | application/json |
| errors.APIError | 4XX, 5XX | */* |
listOrgs
List all organizations
Example Usage
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:
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.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ListClusterOrgsRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | 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.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.ListClusterOrgsResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ListClusterOrgsResponseBody | 400 | application/json |
| errors.ListClusterOrgsAuthClusterResponseBody | 401 | application/json |
| errors.ListClusterOrgsAuthClusterResponseResponseBody | 403 | application/json |
| errors.ListClusterOrgsAuthClusterResponse404ResponseBody | 404 | application/json |
| errors.ListClusterOrgsAuthClusterResponse409ResponseBody | 409 | application/json |
| errors.ListClusterOrgsAuthClusterResponse429ResponseBody | 429 | application/json |
| errors.APIError | 4XX, 5XX | */* |
getOrg
Get an organization
Example Usage
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:
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.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.GetClusterOrgRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | 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.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.GetClusterOrgResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.GetClusterOrgResponseBody | 400 | application/json |
| errors.GetClusterOrgAuthClusterResponseBody | 401 | application/json |
| errors.GetClusterOrgAuthClusterResponseResponseBody | 403 | application/json |
| errors.GetClusterOrgAuthClusterResponse404ResponseBody | 404 | application/json |
| errors.GetClusterOrgAuthClusterResponse409ResponseBody | 409 | application/json |
| errors.GetClusterOrgAuthClusterResponse429ResponseBody | 429 | application/json |
| errors.APIError | 4XX, 5XX | */* |
deleteOrg
Soft-delete an organization
Example Usage
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:
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.
import {
// Mutation hook for triggering the API call.
useAuthClusterDeleteOrgMutation
} from "@meetkai/mka1/react-query/authClusterDeleteOrg.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.DeleteClusterOrgRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | 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.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.DeleteClusterOrgResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.DeleteClusterOrgResponseBody | 400 | application/json |
| errors.DeleteClusterOrgAuthClusterResponseBody | 401 | application/json |
| errors.DeleteClusterOrgAuthClusterResponseResponseBody | 403 | application/json |
| errors.DeleteClusterOrgAuthClusterResponse404ResponseBody | 404 | application/json |
| errors.DeleteClusterOrgAuthClusterResponse409ResponseBody | 409 | application/json |
| errors.DeleteClusterOrgAuthClusterResponse429ResponseBody | 429 | application/json |
| errors.APIError | 4XX, 5XX | */* |
suspendOrg
Suspend an organization
Example Usage
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:
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.
import {
// Mutation hook for triggering the API call.
useAuthClusterSuspendOrgMutation
} from "@meetkai/mka1/react-query/authClusterSuspendOrg.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.SuspendClusterOrgRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | 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.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.SuspendClusterOrgResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SuspendClusterOrgResponseBody | 400 | application/json |
| errors.SuspendClusterOrgAuthClusterResponseBody | 401 | application/json |
| errors.SuspendClusterOrgAuthClusterResponseResponseBody | 403 | application/json |
| errors.SuspendClusterOrgAuthClusterResponse404ResponseBody | 404 | application/json |
| errors.SuspendClusterOrgAuthClusterResponse409ResponseBody | 409 | application/json |
| errors.SuspendClusterOrgAuthClusterResponse429ResponseBody | 429 | application/json |
| errors.APIError | 4XX, 5XX | */* |
unsuspendOrg
Unsuspend an organization
Example Usage
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:
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.
import {
// Mutation hook for triggering the API call.
useAuthClusterUnsuspendOrgMutation
} from "@meetkai/mka1/react-query/authClusterUnsuspendOrg.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.UnsuspendClusterOrgRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | 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.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.UnsuspendClusterOrgResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.UnsuspendClusterOrgResponseBody | 400 | application/json |
| errors.UnsuspendClusterOrgAuthClusterResponseBody | 401 | application/json |
| errors.UnsuspendClusterOrgAuthClusterResponseResponseBody | 403 | application/json |
| errors.UnsuspendClusterOrgAuthClusterResponse404ResponseBody | 404 | application/json |
| errors.UnsuspendClusterOrgAuthClusterResponse409ResponseBody | 409 | application/json |
| errors.UnsuspendClusterOrgAuthClusterResponse429ResponseBody | 429 | application/json |
| errors.APIError | 4XX, 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
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:
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.
import {
// Mutation hook for triggering the API call.
useAuthClusterReissueOwnerKeyMutation
} from "@meetkai/mka1/react-query/authClusterReissueOwnerKey.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ReissueOwnerKeyRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | 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.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.ReissueOwnerKeyResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ReissueOwnerKeyResponseBody | 400 | application/json |
| errors.ReissueOwnerKeyAuthClusterResponseBody | 401 | application/json |
| errors.ReissueOwnerKeyAuthClusterResponseResponseBody | 403 | application/json |
| errors.ReissueOwnerKeyAuthClusterResponse404ResponseBody | 404 | application/json |
| errors.ReissueOwnerKeyAuthClusterResponse409ResponseBody | 409 | application/json |
| errors.ReissueOwnerKeyAuthClusterResponse429ResponseBody | 429 | application/json |
| errors.APIError | 4XX, 5XX | */* |
inviteInfo
Read cluster-invite info (public)
Example Usage
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:
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.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.GetClusterInviteInfoRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | 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.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.GetClusterInviteInfoResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.GetClusterInviteInfoResponseBody | 400 | application/json |
| errors.GetClusterInviteInfoAuthClusterResponseBody | 401 | application/json |
| errors.GetClusterInviteInfoAuthClusterResponseResponseBody | 403 | application/json |
| errors.GetClusterInviteInfoAuthClusterResponse404ResponseBody | 404 | application/json |
| errors.GetClusterInviteInfoAuthClusterResponse409ResponseBody | 409 | application/json |
| errors.GetClusterInviteInfoAuthClusterResponse429ResponseBody | 429 | application/json |
| errors.APIError | 4XX, 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
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:
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.
import {
// Mutation hook for triggering the API call.
useAuthClusterAcceptInviteMutation
} from "@meetkai/mka1/react-query/authClusterAcceptInvite.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.AcceptClusterInviteRequest | ✔️ | The request object to use for the request. |
options | RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | ➖ | 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.retries | RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.AcceptClusterInviteResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.AcceptClusterInviteResponseBody | 400 | application/json |
| errors.AcceptClusterInviteAuthClusterResponseBody | 401 | application/json |
| errors.AcceptClusterInviteAuthClusterResponseResponseBody | 403 | application/json |
| errors.AcceptClusterInviteAuthClusterResponse404ResponseBody | 404 | application/json |
| errors.AcceptClusterInviteAuthClusterResponse409ResponseBody | 409 | application/json |
| errors.AcceptClusterInviteAuthClusterResponse429ResponseBody | 429 | application/json |
| errors.APIError | 4XX, 5XX | */* |