Skip to content

Auth.Orgs

Overview

Available Operations

getQuota

Get an org's usage quota

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

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

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

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

Parameters

ParameterTypeRequiredDescription
requestoperations.GetOrgQuotaRequest✔️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.GetOrgQuotaResponseBody>

Errors

Error TypeStatus CodeContent Type
errors.GetOrgQuotaResponseBody400application/json
errors.GetOrgQuotaAuthOrgsResponseBody401application/json
errors.GetOrgQuotaAuthOrgsResponseResponseBody403application/json
errors.GetOrgQuotaAuthOrgsResponse404ResponseBody404application/json
errors.GetOrgQuotaAuthOrgsResponse409ResponseBody409application/json
errors.GetOrgQuotaAuthOrgsResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

updateQuota

Set an org's usage quota (cluster-admin)

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

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

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

Parameters

ParameterTypeRequiredDescription
requestoperations.UpdateOrgQuotaRequest✔️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.UpdateOrgQuotaResponseBody>

Errors

Error TypeStatus CodeContent Type
errors.UpdateOrgQuotaResponseBody400application/json
errors.UpdateOrgQuotaAuthOrgsResponseBody401application/json
errors.UpdateOrgQuotaAuthOrgsResponseResponseBody403application/json
errors.UpdateOrgQuotaAuthOrgsResponse404ResponseBody404application/json
errors.UpdateOrgQuotaAuthOrgsResponse409ResponseBody409application/json
errors.UpdateOrgQuotaAuthOrgsResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

getRateLimit

Get an org's rate limit

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

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

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

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

Parameters

ParameterTypeRequiredDescription
requestoperations.GetOrgRateLimitRequest✔️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.GetOrgRateLimitResponseBody>

Errors

Error TypeStatus CodeContent Type
errors.GetOrgRateLimitResponseBody400application/json
errors.GetOrgRateLimitAuthOrgsResponseBody401application/json
errors.GetOrgRateLimitAuthOrgsResponseResponseBody403application/json
errors.GetOrgRateLimitAuthOrgsResponse404ResponseBody404application/json
errors.GetOrgRateLimitAuthOrgsResponse409ResponseBody409application/json
errors.GetOrgRateLimitAuthOrgsResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*

updateRateLimit

Set an org's rate limit (cluster-admin)

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

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

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

Parameters

ParameterTypeRequiredDescription
requestoperations.UpdateOrgRateLimitRequest✔️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.UpdateOrgRateLimitResponseBody>

Errors

Error TypeStatus CodeContent Type
errors.UpdateOrgRateLimitResponseBody400application/json
errors.UpdateOrgRateLimitAuthOrgsResponseBody401application/json
errors.UpdateOrgRateLimitAuthOrgsResponseResponseBody403application/json
errors.UpdateOrgRateLimitAuthOrgsResponse404ResponseBody404application/json
errors.UpdateOrgRateLimitAuthOrgsResponse409ResponseBody409application/json
errors.UpdateOrgRateLimitAuthOrgsResponse429ResponseBody429application/json
errors.APIError4XX, 5XX*/*