@meetkai/mka1 0.51.1 → 0.51.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +239 -227
- package/bin/mcp-server.js +572 -47
- package/bin/mcp-server.js.map +20 -8
- package/dist/commonjs/funcs/servingTenantsGet.d.ts +19 -0
- package/dist/commonjs/funcs/servingTenantsGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/servingTenantsGet.js +136 -0
- package/dist/commonjs/funcs/servingTenantsGet.js.map +1 -0
- package/dist/commonjs/funcs/servingTenantsList.d.ts +19 -0
- package/dist/commonjs/funcs/servingTenantsList.d.ts.map +1 -0
- package/dist/commonjs/funcs/servingTenantsList.js +135 -0
- package/dist/commonjs/funcs/servingTenantsList.js.map +1 -0
- package/dist/commonjs/funcs/servingTenantsSet.d.ts +19 -0
- package/dist/commonjs/funcs/servingTenantsSet.d.ts.map +1 -0
- package/dist/commonjs/funcs/servingTenantsSet.js +137 -0
- package/dist/commonjs/funcs/servingTenantsSet.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +7 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/servingTenantsGet.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/servingTenantsGet.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/servingTenantsGet.js +64 -0
- package/dist/commonjs/mcp-server/tools/servingTenantsGet.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/servingTenantsList.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/servingTenantsList.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/servingTenantsList.js +64 -0
- package/dist/commonjs/mcp-server/tools/servingTenantsList.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/servingTenantsSet.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/servingTenantsSet.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/servingTenantsSet.js +64 -0
- package/dist/commonjs/mcp-server/tools/servingTenantsSet.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +3 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +3 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/pageservingtenant.d.ts +22 -0
- package/dist/commonjs/models/components/pageservingtenant.d.ts.map +1 -0
- package/dist/commonjs/models/components/pageservingtenant.js +72 -0
- package/dist/commonjs/models/components/pageservingtenant.js.map +1 -0
- package/dist/commonjs/models/components/servingtenant.d.ts +28 -0
- package/dist/commonjs/models/components/servingtenant.d.ts.map +1 -0
- package/dist/commonjs/models/components/servingtenant.js +81 -0
- package/dist/commonjs/models/components/servingtenant.js.map +1 -0
- package/dist/commonjs/models/components/servingtenantset.d.ts +20 -0
- package/dist/commonjs/models/components/servingtenantset.d.ts.map +1 -0
- package/dist/commonjs/models/components/servingtenantset.js +58 -0
- package/dist/commonjs/models/components/servingtenantset.js.map +1 -0
- package/dist/commonjs/models/operations/getservingtenant.d.ts +22 -0
- package/dist/commonjs/models/operations/getservingtenant.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getservingtenant.js +71 -0
- package/dist/commonjs/models/operations/getservingtenant.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +3 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +3 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listservingtenants.d.ts +24 -0
- package/dist/commonjs/models/operations/listservingtenants.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listservingtenants.js +71 -0
- package/dist/commonjs/models/operations/listservingtenants.js.map +1 -0
- package/dist/commonjs/models/operations/setservingtenant.d.ts +25 -0
- package/dist/commonjs/models/operations/setservingtenant.d.ts.map +1 -0
- package/dist/commonjs/models/operations/setservingtenant.js +76 -0
- package/dist/commonjs/models/operations/setservingtenant.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +3 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +3 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/servingTenantsGet.core.d.ts +15 -0
- package/dist/commonjs/react-query/servingTenantsGet.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/servingTenantsGet.core.js +36 -0
- package/dist/commonjs/react-query/servingTenantsGet.core.js.map +1 -0
- package/dist/commonjs/react-query/servingTenantsGet.d.ts +39 -0
- package/dist/commonjs/react-query/servingTenantsGet.d.ts.map +1 -0
- package/dist/commonjs/react-query/servingTenantsGet.js +60 -0
- package/dist/commonjs/react-query/servingTenantsGet.js.map +1 -0
- package/dist/commonjs/react-query/servingTenantsList.core.d.ts +17 -0
- package/dist/commonjs/react-query/servingTenantsList.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/servingTenantsList.core.js +38 -0
- package/dist/commonjs/react-query/servingTenantsList.core.js.map +1 -0
- package/dist/commonjs/react-query/servingTenantsList.d.ts +41 -0
- package/dist/commonjs/react-query/servingTenantsList.d.ts.map +1 -0
- package/dist/commonjs/react-query/servingTenantsList.js +60 -0
- package/dist/commonjs/react-query/servingTenantsList.js.map +1 -0
- package/dist/commonjs/react-query/servingTenantsSet.d.ts +30 -0
- package/dist/commonjs/react-query/servingTenantsSet.d.ts.map +1 -0
- package/dist/commonjs/react-query/servingTenantsSet.js +47 -0
- package/dist/commonjs/react-query/servingTenantsSet.js.map +1 -0
- package/dist/commonjs/sdk/serving.d.ts +3 -0
- package/dist/commonjs/sdk/serving.d.ts.map +1 -1
- package/dist/commonjs/sdk/serving.js +4 -0
- package/dist/commonjs/sdk/serving.js.map +1 -1
- package/dist/commonjs/sdk/tenants.d.ts +27 -0
- package/dist/commonjs/sdk/tenants.d.ts.map +1 -0
- package/dist/commonjs/sdk/tenants.js +42 -0
- package/dist/commonjs/sdk/tenants.js.map +1 -0
- package/dist/esm/funcs/servingTenantsGet.d.ts +19 -0
- package/dist/esm/funcs/servingTenantsGet.d.ts.map +1 -0
- package/dist/esm/funcs/servingTenantsGet.js +100 -0
- package/dist/esm/funcs/servingTenantsGet.js.map +1 -0
- package/dist/esm/funcs/servingTenantsList.d.ts +19 -0
- package/dist/esm/funcs/servingTenantsList.d.ts.map +1 -0
- package/dist/esm/funcs/servingTenantsList.js +99 -0
- package/dist/esm/funcs/servingTenantsList.js.map +1 -0
- package/dist/esm/funcs/servingTenantsSet.d.ts +19 -0
- package/dist/esm/funcs/servingTenantsSet.d.ts.map +1 -0
- package/dist/esm/funcs/servingTenantsSet.js +101 -0
- package/dist/esm/funcs/servingTenantsSet.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +7 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/servingTenantsGet.d.ts +8 -0
- package/dist/esm/mcp-server/tools/servingTenantsGet.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/servingTenantsGet.js +28 -0
- package/dist/esm/mcp-server/tools/servingTenantsGet.js.map +1 -0
- package/dist/esm/mcp-server/tools/servingTenantsList.d.ts +8 -0
- package/dist/esm/mcp-server/tools/servingTenantsList.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/servingTenantsList.js +28 -0
- package/dist/esm/mcp-server/tools/servingTenantsList.js.map +1 -0
- package/dist/esm/mcp-server/tools/servingTenantsSet.d.ts +8 -0
- package/dist/esm/mcp-server/tools/servingTenantsSet.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/servingTenantsSet.js +28 -0
- package/dist/esm/mcp-server/tools/servingTenantsSet.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +3 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +3 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/pageservingtenant.d.ts +22 -0
- package/dist/esm/models/components/pageservingtenant.d.ts.map +1 -0
- package/dist/esm/models/components/pageservingtenant.js +34 -0
- package/dist/esm/models/components/pageservingtenant.js.map +1 -0
- package/dist/esm/models/components/servingtenant.d.ts +28 -0
- package/dist/esm/models/components/servingtenant.d.ts.map +1 -0
- package/dist/esm/models/components/servingtenant.js +43 -0
- package/dist/esm/models/components/servingtenant.js.map +1 -0
- package/dist/esm/models/components/servingtenantset.d.ts +20 -0
- package/dist/esm/models/components/servingtenantset.d.ts.map +1 -0
- package/dist/esm/models/components/servingtenantset.js +20 -0
- package/dist/esm/models/components/servingtenantset.js.map +1 -0
- package/dist/esm/models/operations/getservingtenant.d.ts +22 -0
- package/dist/esm/models/operations/getservingtenant.d.ts.map +1 -0
- package/dist/esm/models/operations/getservingtenant.js +33 -0
- package/dist/esm/models/operations/getservingtenant.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +3 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +3 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listservingtenants.d.ts +24 -0
- package/dist/esm/models/operations/listservingtenants.d.ts.map +1 -0
- package/dist/esm/models/operations/listservingtenants.js +33 -0
- package/dist/esm/models/operations/listservingtenants.js.map +1 -0
- package/dist/esm/models/operations/setservingtenant.d.ts +25 -0
- package/dist/esm/models/operations/setservingtenant.d.ts.map +1 -0
- package/dist/esm/models/operations/setservingtenant.js +38 -0
- package/dist/esm/models/operations/setservingtenant.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +3 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +3 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/servingTenantsGet.core.d.ts +15 -0
- package/dist/esm/react-query/servingTenantsGet.core.d.ts.map +1 -0
- package/dist/esm/react-query/servingTenantsGet.core.js +31 -0
- package/dist/esm/react-query/servingTenantsGet.core.js.map +1 -0
- package/dist/esm/react-query/servingTenantsGet.d.ts +39 -0
- package/dist/esm/react-query/servingTenantsGet.d.ts.map +1 -0
- package/dist/esm/react-query/servingTenantsGet.js +50 -0
- package/dist/esm/react-query/servingTenantsGet.js.map +1 -0
- package/dist/esm/react-query/servingTenantsList.core.d.ts +17 -0
- package/dist/esm/react-query/servingTenantsList.core.d.ts.map +1 -0
- package/dist/esm/react-query/servingTenantsList.core.js +33 -0
- package/dist/esm/react-query/servingTenantsList.core.js.map +1 -0
- package/dist/esm/react-query/servingTenantsList.d.ts +41 -0
- package/dist/esm/react-query/servingTenantsList.d.ts.map +1 -0
- package/dist/esm/react-query/servingTenantsList.js +50 -0
- package/dist/esm/react-query/servingTenantsList.js.map +1 -0
- package/dist/esm/react-query/servingTenantsSet.d.ts +30 -0
- package/dist/esm/react-query/servingTenantsSet.d.ts.map +1 -0
- package/dist/esm/react-query/servingTenantsSet.js +42 -0
- package/dist/esm/react-query/servingTenantsSet.js.map +1 -0
- package/dist/esm/sdk/serving.d.ts +3 -0
- package/dist/esm/sdk/serving.d.ts.map +1 -1
- package/dist/esm/sdk/serving.js +4 -0
- package/dist/esm/sdk/serving.js.map +1 -1
- package/dist/esm/sdk/tenants.d.ts +27 -0
- package/dist/esm/sdk/tenants.d.ts.map +1 -0
- package/dist/esm/sdk/tenants.js +38 -0
- package/dist/esm/sdk/tenants.js.map +1 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/servingTenantsGet.ts +196 -0
- package/src/funcs/servingTenantsList.ts +196 -0
- package/src/funcs/servingTenantsSet.ts +197 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +7 -1
- package/src/mcp-server/tools/servingTenantsGet.ts +37 -0
- package/src/mcp-server/tools/servingTenantsList.ts +37 -0
- package/src/mcp-server/tools/servingTenantsSet.ts +37 -0
- package/src/models/components/index.ts +3 -0
- package/src/models/components/pageservingtenant.ts +74 -0
- package/src/models/components/servingtenant.ts +85 -0
- package/src/models/components/servingtenantset.ts +54 -0
- package/src/models/operations/getservingtenant.ts +69 -0
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/listservingtenants.ts +71 -0
- package/src/models/operations/setservingtenant.ts +76 -0
- package/src/react-query/index.ts +3 -0
- package/src/react-query/servingTenantsGet.core.ts +76 -0
- package/src/react-query/servingTenantsGet.ts +141 -0
- package/src/react-query/servingTenantsList.core.ts +81 -0
- package/src/react-query/servingTenantsList.ts +148 -0
- package/src/react-query/servingTenantsSet.ts +112 -0
- package/src/sdk/serving.ts +6 -0
- package/src/sdk/tenants.ts +64 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
InvalidateQueryFilters,
|
|
7
|
+
QueryClient,
|
|
8
|
+
useQuery,
|
|
9
|
+
UseQueryResult,
|
|
10
|
+
useSuspenseQuery,
|
|
11
|
+
UseSuspenseQueryResult,
|
|
12
|
+
} from "@tanstack/react-query";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { useSDKContext } from "./_context.js";
|
|
26
|
+
import {
|
|
27
|
+
QueryHookOptions,
|
|
28
|
+
SuspenseQueryHookOptions,
|
|
29
|
+
TupleToPrefixes,
|
|
30
|
+
} from "./_types.js";
|
|
31
|
+
import {
|
|
32
|
+
buildServingTenantsGetQuery,
|
|
33
|
+
prefetchServingTenantsGet,
|
|
34
|
+
queryKeyServingTenantsGet,
|
|
35
|
+
ServingTenantsGetQueryData,
|
|
36
|
+
} from "./servingTenantsGet.core.js";
|
|
37
|
+
export {
|
|
38
|
+
buildServingTenantsGetQuery,
|
|
39
|
+
prefetchServingTenantsGet,
|
|
40
|
+
queryKeyServingTenantsGet,
|
|
41
|
+
type ServingTenantsGetQueryData,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type ServingTenantsGetQueryError =
|
|
45
|
+
| errors.ServingError
|
|
46
|
+
| errors.ServingHTTPValidationError
|
|
47
|
+
| SDKError
|
|
48
|
+
| ResponseValidationError
|
|
49
|
+
| ConnectionError
|
|
50
|
+
| RequestAbortedError
|
|
51
|
+
| RequestTimeoutError
|
|
52
|
+
| InvalidRequestError
|
|
53
|
+
| UnexpectedClientError
|
|
54
|
+
| SDKValidationError;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Get a serving tenant
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* Get one organization's serving enablement record. Cluster administrators only.
|
|
61
|
+
*/
|
|
62
|
+
export function useServingTenantsGet(
|
|
63
|
+
request: operations.GetServingTenantRequest,
|
|
64
|
+
options?: QueryHookOptions<
|
|
65
|
+
ServingTenantsGetQueryData,
|
|
66
|
+
ServingTenantsGetQueryError
|
|
67
|
+
>,
|
|
68
|
+
): UseQueryResult<ServingTenantsGetQueryData, ServingTenantsGetQueryError> {
|
|
69
|
+
const client = useSDKContext();
|
|
70
|
+
return useQuery({
|
|
71
|
+
...buildServingTenantsGetQuery(
|
|
72
|
+
client,
|
|
73
|
+
request,
|
|
74
|
+
options,
|
|
75
|
+
),
|
|
76
|
+
...options,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Get a serving tenant
|
|
82
|
+
*
|
|
83
|
+
* @remarks
|
|
84
|
+
* Get one organization's serving enablement record. Cluster administrators only.
|
|
85
|
+
*/
|
|
86
|
+
export function useServingTenantsGetSuspense(
|
|
87
|
+
request: operations.GetServingTenantRequest,
|
|
88
|
+
options?: SuspenseQueryHookOptions<
|
|
89
|
+
ServingTenantsGetQueryData,
|
|
90
|
+
ServingTenantsGetQueryError
|
|
91
|
+
>,
|
|
92
|
+
): UseSuspenseQueryResult<
|
|
93
|
+
ServingTenantsGetQueryData,
|
|
94
|
+
ServingTenantsGetQueryError
|
|
95
|
+
> {
|
|
96
|
+
const client = useSDKContext();
|
|
97
|
+
return useSuspenseQuery({
|
|
98
|
+
...buildServingTenantsGetQuery(
|
|
99
|
+
client,
|
|
100
|
+
request,
|
|
101
|
+
options,
|
|
102
|
+
),
|
|
103
|
+
...options,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function setServingTenantsGetData(
|
|
108
|
+
client: QueryClient,
|
|
109
|
+
queryKeyBase: [
|
|
110
|
+
orgId: string,
|
|
111
|
+
parameters: { xOnBehalfOf?: string | undefined },
|
|
112
|
+
],
|
|
113
|
+
data: ServingTenantsGetQueryData,
|
|
114
|
+
): ServingTenantsGetQueryData | undefined {
|
|
115
|
+
const key = queryKeyServingTenantsGet(...queryKeyBase);
|
|
116
|
+
|
|
117
|
+
return client.setQueryData<ServingTenantsGetQueryData>(key, data);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function invalidateServingTenantsGet(
|
|
121
|
+
client: QueryClient,
|
|
122
|
+
queryKeyBase: TupleToPrefixes<
|
|
123
|
+
[orgId: string, parameters: { xOnBehalfOf?: string | undefined }]
|
|
124
|
+
>,
|
|
125
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
126
|
+
): Promise<void> {
|
|
127
|
+
return client.invalidateQueries({
|
|
128
|
+
...filters,
|
|
129
|
+
queryKey: ["@meetkai/mka1", "tenants", "get", ...queryKeyBase],
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function invalidateAllServingTenantsGet(
|
|
134
|
+
client: QueryClient,
|
|
135
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
136
|
+
): Promise<void> {
|
|
137
|
+
return client.invalidateQueries({
|
|
138
|
+
...filters,
|
|
139
|
+
queryKey: ["@meetkai/mka1", "tenants", "get"],
|
|
140
|
+
});
|
|
141
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
QueryClient,
|
|
7
|
+
QueryFunctionContext,
|
|
8
|
+
QueryKey,
|
|
9
|
+
} from "@tanstack/react-query";
|
|
10
|
+
import { SDKCore } from "../core.js";
|
|
11
|
+
import { servingTenantsList } from "../funcs/servingTenantsList.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import * as operations from "../models/operations/index.js";
|
|
16
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
17
|
+
export type ServingTenantsListQueryData = components.PageServingTenant;
|
|
18
|
+
|
|
19
|
+
export function prefetchServingTenantsList(
|
|
20
|
+
queryClient: QueryClient,
|
|
21
|
+
client$: SDKCore,
|
|
22
|
+
request: operations.ListServingTenantsRequest,
|
|
23
|
+
options?: RequestOptions,
|
|
24
|
+
): Promise<void> {
|
|
25
|
+
return queryClient.prefetchQuery({
|
|
26
|
+
...buildServingTenantsListQuery(
|
|
27
|
+
client$,
|
|
28
|
+
request,
|
|
29
|
+
options,
|
|
30
|
+
),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function buildServingTenantsListQuery(
|
|
35
|
+
client$: SDKCore,
|
|
36
|
+
request: operations.ListServingTenantsRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): {
|
|
39
|
+
queryKey: QueryKey;
|
|
40
|
+
queryFn: (
|
|
41
|
+
context: QueryFunctionContext,
|
|
42
|
+
) => Promise<ServingTenantsListQueryData>;
|
|
43
|
+
} {
|
|
44
|
+
return {
|
|
45
|
+
queryKey: queryKeyServingTenantsList({
|
|
46
|
+
cursor: request.cursor,
|
|
47
|
+
limit: request.limit,
|
|
48
|
+
xOnBehalfOf: request.xOnBehalfOf,
|
|
49
|
+
}),
|
|
50
|
+
queryFn: async function servingTenantsListQueryFn(
|
|
51
|
+
ctx,
|
|
52
|
+
): Promise<ServingTenantsListQueryData> {
|
|
53
|
+
const sig = combineSignals(
|
|
54
|
+
ctx.signal,
|
|
55
|
+
options?.signal,
|
|
56
|
+
options?.fetchOptions?.signal,
|
|
57
|
+
);
|
|
58
|
+
const mergedOptions = {
|
|
59
|
+
...options?.fetchOptions,
|
|
60
|
+
...options,
|
|
61
|
+
signal: sig,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
return unwrapAsync(servingTenantsList(
|
|
65
|
+
client$,
|
|
66
|
+
request,
|
|
67
|
+
mergedOptions,
|
|
68
|
+
));
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function queryKeyServingTenantsList(
|
|
74
|
+
parameters: {
|
|
75
|
+
cursor?: string | null | undefined;
|
|
76
|
+
limit?: number | undefined;
|
|
77
|
+
xOnBehalfOf?: string | undefined;
|
|
78
|
+
},
|
|
79
|
+
): QueryKey {
|
|
80
|
+
return ["@meetkai/mka1", "tenants", "list", parameters];
|
|
81
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
InvalidateQueryFilters,
|
|
7
|
+
QueryClient,
|
|
8
|
+
useQuery,
|
|
9
|
+
UseQueryResult,
|
|
10
|
+
useSuspenseQuery,
|
|
11
|
+
UseSuspenseQueryResult,
|
|
12
|
+
} from "@tanstack/react-query";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { useSDKContext } from "./_context.js";
|
|
26
|
+
import {
|
|
27
|
+
QueryHookOptions,
|
|
28
|
+
SuspenseQueryHookOptions,
|
|
29
|
+
TupleToPrefixes,
|
|
30
|
+
} from "./_types.js";
|
|
31
|
+
import {
|
|
32
|
+
buildServingTenantsListQuery,
|
|
33
|
+
prefetchServingTenantsList,
|
|
34
|
+
queryKeyServingTenantsList,
|
|
35
|
+
ServingTenantsListQueryData,
|
|
36
|
+
} from "./servingTenantsList.core.js";
|
|
37
|
+
export {
|
|
38
|
+
buildServingTenantsListQuery,
|
|
39
|
+
prefetchServingTenantsList,
|
|
40
|
+
queryKeyServingTenantsList,
|
|
41
|
+
type ServingTenantsListQueryData,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type ServingTenantsListQueryError =
|
|
45
|
+
| errors.ServingError
|
|
46
|
+
| errors.ServingHTTPValidationError
|
|
47
|
+
| SDKError
|
|
48
|
+
| ResponseValidationError
|
|
49
|
+
| ConnectionError
|
|
50
|
+
| RequestAbortedError
|
|
51
|
+
| RequestTimeoutError
|
|
52
|
+
| InvalidRequestError
|
|
53
|
+
| UnexpectedClientError
|
|
54
|
+
| SDKValidationError;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* List serving tenants
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* List organization-wide serving enablement records. Cluster administrators only; a missing organization is not provisioned.
|
|
61
|
+
*/
|
|
62
|
+
export function useServingTenantsList(
|
|
63
|
+
request: operations.ListServingTenantsRequest,
|
|
64
|
+
options?: QueryHookOptions<
|
|
65
|
+
ServingTenantsListQueryData,
|
|
66
|
+
ServingTenantsListQueryError
|
|
67
|
+
>,
|
|
68
|
+
): UseQueryResult<ServingTenantsListQueryData, ServingTenantsListQueryError> {
|
|
69
|
+
const client = useSDKContext();
|
|
70
|
+
return useQuery({
|
|
71
|
+
...buildServingTenantsListQuery(
|
|
72
|
+
client,
|
|
73
|
+
request,
|
|
74
|
+
options,
|
|
75
|
+
),
|
|
76
|
+
...options,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* List serving tenants
|
|
82
|
+
*
|
|
83
|
+
* @remarks
|
|
84
|
+
* List organization-wide serving enablement records. Cluster administrators only; a missing organization is not provisioned.
|
|
85
|
+
*/
|
|
86
|
+
export function useServingTenantsListSuspense(
|
|
87
|
+
request: operations.ListServingTenantsRequest,
|
|
88
|
+
options?: SuspenseQueryHookOptions<
|
|
89
|
+
ServingTenantsListQueryData,
|
|
90
|
+
ServingTenantsListQueryError
|
|
91
|
+
>,
|
|
92
|
+
): UseSuspenseQueryResult<
|
|
93
|
+
ServingTenantsListQueryData,
|
|
94
|
+
ServingTenantsListQueryError
|
|
95
|
+
> {
|
|
96
|
+
const client = useSDKContext();
|
|
97
|
+
return useSuspenseQuery({
|
|
98
|
+
...buildServingTenantsListQuery(
|
|
99
|
+
client,
|
|
100
|
+
request,
|
|
101
|
+
options,
|
|
102
|
+
),
|
|
103
|
+
...options,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function setServingTenantsListData(
|
|
108
|
+
client: QueryClient,
|
|
109
|
+
queryKeyBase: [
|
|
110
|
+
parameters: {
|
|
111
|
+
cursor?: string | null | undefined;
|
|
112
|
+
limit?: number | undefined;
|
|
113
|
+
xOnBehalfOf?: string | undefined;
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
data: ServingTenantsListQueryData,
|
|
117
|
+
): ServingTenantsListQueryData | undefined {
|
|
118
|
+
const key = queryKeyServingTenantsList(...queryKeyBase);
|
|
119
|
+
|
|
120
|
+
return client.setQueryData<ServingTenantsListQueryData>(key, data);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function invalidateServingTenantsList(
|
|
124
|
+
client: QueryClient,
|
|
125
|
+
queryKeyBase: TupleToPrefixes<
|
|
126
|
+
[parameters: {
|
|
127
|
+
cursor?: string | null | undefined;
|
|
128
|
+
limit?: number | undefined;
|
|
129
|
+
xOnBehalfOf?: string | undefined;
|
|
130
|
+
}]
|
|
131
|
+
>,
|
|
132
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
133
|
+
): Promise<void> {
|
|
134
|
+
return client.invalidateQueries({
|
|
135
|
+
...filters,
|
|
136
|
+
queryKey: ["@meetkai/mka1", "tenants", "list", ...queryKeyBase],
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function invalidateAllServingTenantsList(
|
|
141
|
+
client: QueryClient,
|
|
142
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
143
|
+
): Promise<void> {
|
|
144
|
+
return client.invalidateQueries({
|
|
145
|
+
...filters,
|
|
146
|
+
queryKey: ["@meetkai/mka1", "tenants", "list"],
|
|
147
|
+
});
|
|
148
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
MutationKey,
|
|
7
|
+
useMutation,
|
|
8
|
+
UseMutationResult,
|
|
9
|
+
} from "@tanstack/react-query";
|
|
10
|
+
import { SDKCore } from "../core.js";
|
|
11
|
+
import { servingTenantsSet } from "../funcs/servingTenantsSet.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
26
|
+
import * as operations from "../models/operations/index.js";
|
|
27
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
28
|
+
import { useSDKContext } from "./_context.js";
|
|
29
|
+
import { MutationHookOptions } from "./_types.js";
|
|
30
|
+
|
|
31
|
+
export type ServingTenantsSetMutationVariables = {
|
|
32
|
+
request: operations.SetServingTenantRequest;
|
|
33
|
+
options?: RequestOptions;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type ServingTenantsSetMutationData = components.ServingTenant;
|
|
37
|
+
|
|
38
|
+
export type ServingTenantsSetMutationError =
|
|
39
|
+
| errors.ServingError
|
|
40
|
+
| errors.ServingHTTPValidationError
|
|
41
|
+
| SDKError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Set serving tenant enablement
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* Enable or disable serving for an organization and all of its teams. Disabling blocks product API access but does not stop existing workloads or callbacks. Cluster administrators only.
|
|
55
|
+
*/
|
|
56
|
+
export function useServingTenantsSetMutation(
|
|
57
|
+
options?: MutationHookOptions<
|
|
58
|
+
ServingTenantsSetMutationData,
|
|
59
|
+
ServingTenantsSetMutationError,
|
|
60
|
+
ServingTenantsSetMutationVariables
|
|
61
|
+
>,
|
|
62
|
+
): UseMutationResult<
|
|
63
|
+
ServingTenantsSetMutationData,
|
|
64
|
+
ServingTenantsSetMutationError,
|
|
65
|
+
ServingTenantsSetMutationVariables
|
|
66
|
+
> {
|
|
67
|
+
const client = useSDKContext();
|
|
68
|
+
return useMutation({
|
|
69
|
+
...buildServingTenantsSetMutation(client, options),
|
|
70
|
+
...options,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function mutationKeyServingTenantsSet(): MutationKey {
|
|
75
|
+
return ["@meetkai/mka1", "tenants", "set"];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function buildServingTenantsSetMutation(
|
|
79
|
+
client$: SDKCore,
|
|
80
|
+
hookOptions?: RequestOptions,
|
|
81
|
+
): {
|
|
82
|
+
mutationKey: MutationKey;
|
|
83
|
+
mutationFn: (
|
|
84
|
+
variables: ServingTenantsSetMutationVariables,
|
|
85
|
+
) => Promise<ServingTenantsSetMutationData>;
|
|
86
|
+
} {
|
|
87
|
+
return {
|
|
88
|
+
mutationKey: mutationKeyServingTenantsSet(),
|
|
89
|
+
mutationFn: function servingTenantsSetMutationFn({
|
|
90
|
+
request,
|
|
91
|
+
options,
|
|
92
|
+
}): Promise<ServingTenantsSetMutationData> {
|
|
93
|
+
const mergedOptions = {
|
|
94
|
+
...hookOptions,
|
|
95
|
+
...options,
|
|
96
|
+
fetchOptions: {
|
|
97
|
+
...hookOptions?.fetchOptions,
|
|
98
|
+
...options?.fetchOptions,
|
|
99
|
+
signal: combineSignals(
|
|
100
|
+
hookOptions?.fetchOptions?.signal,
|
|
101
|
+
options?.fetchOptions?.signal,
|
|
102
|
+
),
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
return unwrapAsync(servingTenantsSet(
|
|
106
|
+
client$,
|
|
107
|
+
request,
|
|
108
|
+
mergedOptions,
|
|
109
|
+
));
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
}
|
package/src/sdk/serving.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { FinetuneJobs } from "./finetunejobs.js";
|
|
|
9
9
|
import { SDKImages } from "./sdkimages.js";
|
|
10
10
|
import { SDKModels } from "./sdkmodels.js";
|
|
11
11
|
import { Secrets } from "./secrets.js";
|
|
12
|
+
import { Tenants } from "./tenants.js";
|
|
12
13
|
import { Volumes } from "./volumes.js";
|
|
13
14
|
|
|
14
15
|
export class Serving extends ClientSDK {
|
|
@@ -42,6 +43,11 @@ export class Serving extends ClientSDK {
|
|
|
42
43
|
return (this._secrets ??= new Secrets(this._options));
|
|
43
44
|
}
|
|
44
45
|
|
|
46
|
+
private _tenants?: Tenants;
|
|
47
|
+
get tenants(): Tenants {
|
|
48
|
+
return (this._tenants ??= new Tenants(this._options));
|
|
49
|
+
}
|
|
50
|
+
|
|
45
51
|
private _volumes?: Volumes;
|
|
46
52
|
get volumes(): Volumes {
|
|
47
53
|
return (this._volumes ??= new Volumes(this._options));
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { servingTenantsGet } from "../funcs/servingTenantsGet.js";
|
|
6
|
+
import { servingTenantsList } from "../funcs/servingTenantsList.js";
|
|
7
|
+
import { servingTenantsSet } from "../funcs/servingTenantsSet.js";
|
|
8
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
9
|
+
import * as components from "../models/components/index.js";
|
|
10
|
+
import * as operations from "../models/operations/index.js";
|
|
11
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
12
|
+
|
|
13
|
+
export class Tenants extends ClientSDK {
|
|
14
|
+
/**
|
|
15
|
+
* List serving tenants
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* List organization-wide serving enablement records. Cluster administrators only; a missing organization is not provisioned.
|
|
19
|
+
*/
|
|
20
|
+
async list(
|
|
21
|
+
request: operations.ListServingTenantsRequest,
|
|
22
|
+
options?: RequestOptions,
|
|
23
|
+
): Promise<components.PageServingTenant> {
|
|
24
|
+
return unwrapAsync(servingTenantsList(
|
|
25
|
+
this,
|
|
26
|
+
request,
|
|
27
|
+
options,
|
|
28
|
+
));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get a serving tenant
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* Get one organization's serving enablement record. Cluster administrators only.
|
|
36
|
+
*/
|
|
37
|
+
async get(
|
|
38
|
+
request: operations.GetServingTenantRequest,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): Promise<components.ServingTenant> {
|
|
41
|
+
return unwrapAsync(servingTenantsGet(
|
|
42
|
+
this,
|
|
43
|
+
request,
|
|
44
|
+
options,
|
|
45
|
+
));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Set serving tenant enablement
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* Enable or disable serving for an organization and all of its teams. Disabling blocks product API access but does not stop existing workloads or callbacks. Cluster administrators only.
|
|
53
|
+
*/
|
|
54
|
+
async set(
|
|
55
|
+
request: operations.SetServingTenantRequest,
|
|
56
|
+
options?: RequestOptions,
|
|
57
|
+
): Promise<components.ServingTenant> {
|
|
58
|
+
return unwrapAsync(servingTenantsSet(
|
|
59
|
+
this,
|
|
60
|
+
request,
|
|
61
|
+
options,
|
|
62
|
+
));
|
|
63
|
+
}
|
|
64
|
+
}
|