Skip to content

Auth.Teams

Overview

Available Operations

create

Create a team

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.teams.create({
    orgId: "<id>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authTeamsCreate } from "@meetkai/mka1/funcs/authTeamsCreate.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 authTeamsCreate(sdk, {
    orgId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authTeamsCreate 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.
  useAuthTeamsCreateMutation
} from "@meetkai/mka1/react-query/authTeamsCreate.js";

Parameters

ParameterTypeRequiredDescription
requestoperations.CreateTeamRequest✔️The request object to use for the request.
optionsRequestOptionsUsed to set various options for making HTTP requests.
options.fetchOptionsRequestInitOptions 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.retriesRetryConfigEnables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.CreateTeamResponseBody>

Errors

Error TypeStatus CodeContent Type
errors.CreateTeamResponseBody400application/json
errors.CreateTeamAuthTeamsResponseBody401application/json
errors.CreateTeamAuthTeamsResponseResponseBody403application/json
errors.CreateTeamAuthTeamsResponse404ResponseBody404application/json
errors.CreateTeamAuthTeamsResponse409ResponseBody409application/json
errors.CreateTeamAuthTeamsResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

list

List teams in an org

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.teams.list({
    orgId: "<id>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authTeamsList } from "@meetkai/mka1/funcs/authTeamsList.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 authTeamsList(sdk, {
    orgId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authTeamsList 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.
  useAuthTeamsList,
  useAuthTeamsListSuspense,

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

Parameters

ParameterTypeRequiredDescription
requestoperations.ListTeamsRequest✔️The request object to use for the request.
optionsRequestOptionsUsed to set various options for making HTTP requests.
options.fetchOptionsRequestInitOptions 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.retriesRetryConfigEnables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.ListTeamsResponseBody>

Errors

Error TypeStatus CodeContent Type
errors.ListTeamsResponseBody400application/json
errors.ListTeamsAuthTeamsResponseBody401application/json
errors.ListTeamsAuthTeamsResponseResponseBody403application/json
errors.ListTeamsAuthTeamsResponse404ResponseBody404application/json
errors.ListTeamsAuthTeamsResponse409ResponseBody409application/json
errors.ListTeamsAuthTeamsResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

get

Get a team

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.teams.get({
    orgId: "<id>",
    teamId: "<id>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authTeamsGet } from "@meetkai/mka1/funcs/authTeamsGet.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 authTeamsGet(sdk, {
    orgId: "<id>",
    teamId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authTeamsGet 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.
  useAuthTeamsGet,
  useAuthTeamsGetSuspense,

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

Parameters

ParameterTypeRequiredDescription
requestoperations.GetTeamRequest✔️The request object to use for the request.
optionsRequestOptionsUsed to set various options for making HTTP requests.
options.fetchOptionsRequestInitOptions 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.retriesRetryConfigEnables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.GetTeamResponseBody>

Errors

Error TypeStatus CodeContent Type
errors.GetTeamResponseBody400application/json
errors.GetTeamAuthTeamsResponseBody401application/json
errors.GetTeamAuthTeamsResponseResponseBody403application/json
errors.GetTeamAuthTeamsResponse404ResponseBody404application/json
errors.GetTeamAuthTeamsResponse409ResponseBody409application/json
errors.GetTeamAuthTeamsResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

update

Rename a team

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.teams.update({
    orgId: "<id>",
    teamId: "<id>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authTeamsUpdate } from "@meetkai/mka1/funcs/authTeamsUpdate.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 authTeamsUpdate(sdk, {
    orgId: "<id>",
    teamId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authTeamsUpdate 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.
  useAuthTeamsUpdateMutation
} from "@meetkai/mka1/react-query/authTeamsUpdate.js";

Parameters

ParameterTypeRequiredDescription
requestoperations.UpdateTeamRequest✔️The request object to use for the request.
optionsRequestOptionsUsed to set various options for making HTTP requests.
options.fetchOptionsRequestInitOptions 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.retriesRetryConfigEnables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.UpdateTeamResponseBody>

Errors

Error TypeStatus CodeContent Type
errors.UpdateTeamResponseBody400application/json
errors.UpdateTeamAuthTeamsResponseBody401application/json
errors.UpdateTeamAuthTeamsResponseResponseBody403application/json
errors.UpdateTeamAuthTeamsResponse404ResponseBody404application/json
errors.UpdateTeamAuthTeamsResponse409ResponseBody409application/json
errors.UpdateTeamAuthTeamsResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

delete

Delete a team

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.teams.delete({
    orgId: "<id>",
    teamId: "<id>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authTeamsDelete } from "@meetkai/mka1/funcs/authTeamsDelete.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 authTeamsDelete(sdk, {
    orgId: "<id>",
    teamId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authTeamsDelete 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.
  useAuthTeamsDeleteMutation
} from "@meetkai/mka1/react-query/authTeamsDelete.js";

Parameters

ParameterTypeRequiredDescription
requestoperations.DeleteTeamRequest✔️The request object to use for the request.
optionsRequestOptionsUsed to set various options for making HTTP requests.
options.fetchOptionsRequestInitOptions 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.retriesRetryConfigEnables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.DeleteTeamResponseBody>

Errors

Error TypeStatus CodeContent Type
errors.DeleteTeamResponseBody400application/json
errors.DeleteTeamAuthTeamsResponseBody401application/json
errors.DeleteTeamAuthTeamsResponseResponseBody403application/json
errors.DeleteTeamAuthTeamsResponse404ResponseBody404application/json
errors.DeleteTeamAuthTeamsResponse409ResponseBody409application/json
errors.DeleteTeamAuthTeamsResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

addMember

Attach a principal (user or service account) to the team by its userId.

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.teams.addMember({
    orgId: "<id>",
    teamId: "<id>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authTeamsAddMember } from "@meetkai/mka1/funcs/authTeamsAddMember.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 authTeamsAddMember(sdk, {
    orgId: "<id>",
    teamId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authTeamsAddMember 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.
  useAuthTeamsAddMemberMutation
} from "@meetkai/mka1/react-query/authTeamsAddMember.js";

Parameters

ParameterTypeRequiredDescription
requestoperations.AddTeamMemberRequest✔️The request object to use for the request.
optionsRequestOptionsUsed to set various options for making HTTP requests.
options.fetchOptionsRequestInitOptions 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.retriesRetryConfigEnables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.AddTeamMemberResponseBody>

Errors

Error TypeStatus CodeContent Type
errors.AddTeamMemberResponseBody400application/json
errors.AddTeamMemberAuthTeamsResponseBody401application/json
errors.AddTeamMemberAuthTeamsResponseResponseBody403application/json
errors.AddTeamMemberAuthTeamsResponse404ResponseBody404application/json
errors.AddTeamMemberAuthTeamsResponse409ResponseBody409application/json
errors.AddTeamMemberAuthTeamsResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

listMembers

List team members

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.teams.listMembers({
    orgId: "<id>",
    teamId: "<id>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authTeamsListMembers } from "@meetkai/mka1/funcs/authTeamsListMembers.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 authTeamsListMembers(sdk, {
    orgId: "<id>",
    teamId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authTeamsListMembers 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.
  useAuthTeamsListMembers,
  useAuthTeamsListMembersSuspense,

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

Parameters

ParameterTypeRequiredDescription
requestoperations.ListTeamMembersRequest✔️The request object to use for the request.
optionsRequestOptionsUsed to set various options for making HTTP requests.
options.fetchOptionsRequestInitOptions 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.retriesRetryConfigEnables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.ListTeamMembersResponseBody>

Errors

Error TypeStatus CodeContent Type
errors.ListTeamMembersResponseBody400application/json
errors.ListTeamMembersAuthTeamsResponseBody401application/json
errors.ListTeamMembersAuthTeamsResponseResponseBody403application/json
errors.ListTeamMembersAuthTeamsResponse404ResponseBody404application/json
errors.ListTeamMembersAuthTeamsResponse409ResponseBody409application/json
errors.ListTeamMembersAuthTeamsResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

removeMember

Remove a team member

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.teams.removeMember({
    orgId: "<id>",
    teamId: "<id>",
    memberId: "<id>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

typescript
import { SDKCore } from "@meetkai/mka1/core.js";
import { authTeamsRemoveMember } from "@meetkai/mka1/funcs/authTeamsRemoveMember.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 authTeamsRemoveMember(sdk, {
    orgId: "<id>",
    teamId: "<id>",
    memberId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("authTeamsRemoveMember 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.
  useAuthTeamsRemoveMemberMutation
} from "@meetkai/mka1/react-query/authTeamsRemoveMember.js";

Parameters

ParameterTypeRequiredDescription
requestoperations.RemoveTeamMemberRequest✔️The request object to use for the request.
optionsRequestOptionsUsed to set various options for making HTTP requests.
options.fetchOptionsRequestInitOptions 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.retriesRetryConfigEnables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.RemoveTeamMemberResponseBody>

Errors

Error TypeStatus CodeContent Type
errors.RemoveTeamMemberResponseBody400application/json
errors.RemoveTeamMemberAuthTeamsResponseBody401application/json
errors.RemoveTeamMemberAuthTeamsResponseResponseBody403application/json
errors.RemoveTeamMemberAuthTeamsResponse404ResponseBody404application/json
errors.RemoveTeamMemberAuthTeamsResponse409ResponseBody409application/json
errors.RemoveTeamMemberAuthTeamsResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*