Auth.Orgs
Overview
Available Operations
- getQuota - Get an org's usage quota
- updateQuota - Set an org's usage quota (cluster-admin)
- getRateLimit - Get an org's rate limit
- updateRateLimit - Set an org's rate limit (cluster-admin)
getQuota
Get an org's usage quota
Example Usage
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:
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.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.GetOrgQuotaRequest | ✔️ | 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.GetOrgQuotaResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.GetOrgQuotaResponseBody | 400 | application/json |
| errors.GetOrgQuotaAuthOrgsResponseBody | 401 | application/json |
| errors.GetOrgQuotaAuthOrgsResponseResponseBody | 403 | application/json |
| errors.GetOrgQuotaAuthOrgsResponse404ResponseBody | 404 | application/json |
| errors.GetOrgQuotaAuthOrgsResponse409ResponseBody | 409 | application/json |
| errors.GetOrgQuotaAuthOrgsResponse429ResponseBody | 429 | application/json |
| errors.APIError | 4XX, 5XX | */* |
updateQuota
Set an org's usage quota (cluster-admin)
Example Usage
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:
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.
import {
// Mutation hook for triggering the API call.
useAuthOrgsUpdateQuotaMutation
} from "@meetkai/mka1/react-query/authOrgsUpdateQuota.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.UpdateOrgQuotaRequest | ✔️ | 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.UpdateOrgQuotaResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.UpdateOrgQuotaResponseBody | 400 | application/json |
| errors.UpdateOrgQuotaAuthOrgsResponseBody | 401 | application/json |
| errors.UpdateOrgQuotaAuthOrgsResponseResponseBody | 403 | application/json |
| errors.UpdateOrgQuotaAuthOrgsResponse404ResponseBody | 404 | application/json |
| errors.UpdateOrgQuotaAuthOrgsResponse409ResponseBody | 409 | application/json |
| errors.UpdateOrgQuotaAuthOrgsResponse429ResponseBody | 429 | application/json |
| errors.APIError | 4XX, 5XX | */* |
getRateLimit
Get an org's rate limit
Example Usage
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:
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.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.GetOrgRateLimitRequest | ✔️ | 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.GetOrgRateLimitResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.GetOrgRateLimitResponseBody | 400 | application/json |
| errors.GetOrgRateLimitAuthOrgsResponseBody | 401 | application/json |
| errors.GetOrgRateLimitAuthOrgsResponseResponseBody | 403 | application/json |
| errors.GetOrgRateLimitAuthOrgsResponse404ResponseBody | 404 | application/json |
| errors.GetOrgRateLimitAuthOrgsResponse409ResponseBody | 409 | application/json |
| errors.GetOrgRateLimitAuthOrgsResponse429ResponseBody | 429 | application/json |
| errors.APIError | 4XX, 5XX | */* |
updateRateLimit
Set an org's rate limit (cluster-admin)
Example Usage
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:
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.
import {
// Mutation hook for triggering the API call.
useAuthOrgsUpdateRateLimitMutation
} from "@meetkai/mka1/react-query/authOrgsUpdateRateLimit.js";Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.UpdateOrgRateLimitRequest | ✔️ | 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.UpdateOrgRateLimitResponseBody>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.UpdateOrgRateLimitResponseBody | 400 | application/json |
| errors.UpdateOrgRateLimitAuthOrgsResponseBody | 401 | application/json |
| errors.UpdateOrgRateLimitAuthOrgsResponseResponseBody | 403 | application/json |
| errors.UpdateOrgRateLimitAuthOrgsResponse404ResponseBody | 404 | application/json |
| errors.UpdateOrgRateLimitAuthOrgsResponse409ResponseBody | 409 | application/json |
| errors.UpdateOrgRateLimitAuthOrgsResponse429ResponseBody | 429 | application/json |
| errors.APIError | 4XX, 5XX | */* |