@meetkai/mka1 0.55.20 → 0.55.21

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.
Files changed (119) hide show
  1. package/README.md +411 -404
  2. package/bin/mcp-server.js +3395 -3072
  3. package/bin/mcp-server.js.map +14 -10
  4. package/dist/commonjs/funcs/authApiKeysDelete.d.ts +20 -0
  5. package/dist/commonjs/funcs/authApiKeysDelete.d.ts.map +1 -0
  6. package/dist/commonjs/funcs/authApiKeysDelete.js +132 -0
  7. package/dist/commonjs/funcs/authApiKeysDelete.js.map +1 -0
  8. package/dist/commonjs/lib/config.d.ts +2 -2
  9. package/dist/commonjs/lib/config.js +2 -2
  10. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  11. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  12. package/dist/commonjs/mcp-server/server.js +3 -1
  13. package/dist/commonjs/mcp-server/server.js.map +1 -1
  14. package/dist/commonjs/mcp-server/tools/authApiKeysDelete.d.ts +8 -0
  15. package/dist/commonjs/mcp-server/tools/authApiKeysDelete.d.ts.map +1 -0
  16. package/dist/commonjs/mcp-server/tools/authApiKeysDelete.js +64 -0
  17. package/dist/commonjs/mcp-server/tools/authApiKeysDelete.js.map +1 -0
  18. package/dist/commonjs/models/errors/deletescopedapikey.d.ts +188 -0
  19. package/dist/commonjs/models/errors/deletescopedapikey.d.ts.map +1 -0
  20. package/dist/commonjs/models/errors/deletescopedapikey.js +270 -0
  21. package/dist/commonjs/models/errors/deletescopedapikey.js.map +1 -0
  22. package/dist/commonjs/models/errors/index.d.ts +1 -0
  23. package/dist/commonjs/models/errors/index.d.ts.map +1 -1
  24. package/dist/commonjs/models/errors/index.js +1 -0
  25. package/dist/commonjs/models/errors/index.js.map +1 -1
  26. package/dist/commonjs/models/operations/deletescopedapikey.d.ts +53 -0
  27. package/dist/commonjs/models/operations/deletescopedapikey.d.ts.map +1 -0
  28. package/dist/commonjs/models/operations/deletescopedapikey.js +107 -0
  29. package/dist/commonjs/models/operations/deletescopedapikey.js.map +1 -0
  30. package/dist/commonjs/models/operations/index.d.ts +1 -0
  31. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  32. package/dist/commonjs/models/operations/index.js +1 -0
  33. package/dist/commonjs/models/operations/index.js.map +1 -1
  34. package/dist/commonjs/models/operations/updatescopedapikey.d.ts +8 -24
  35. package/dist/commonjs/models/operations/updatescopedapikey.d.ts.map +1 -1
  36. package/dist/commonjs/models/operations/updatescopedapikey.js +8 -24
  37. package/dist/commonjs/models/operations/updatescopedapikey.js.map +1 -1
  38. package/dist/commonjs/models/operations/updateserviceaccountapikey.d.ts +2 -0
  39. package/dist/commonjs/models/operations/updateserviceaccountapikey.d.ts.map +1 -1
  40. package/dist/commonjs/models/operations/updateserviceaccountapikey.js +2 -0
  41. package/dist/commonjs/models/operations/updateserviceaccountapikey.js.map +1 -1
  42. package/dist/commonjs/react-query/authApiKeysDelete.d.ts +29 -0
  43. package/dist/commonjs/react-query/authApiKeysDelete.d.ts.map +1 -0
  44. package/dist/commonjs/react-query/authApiKeysDelete.js +47 -0
  45. package/dist/commonjs/react-query/authApiKeysDelete.js.map +1 -0
  46. package/dist/commonjs/react-query/index.d.ts +1 -0
  47. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  48. package/dist/commonjs/react-query/index.js +1 -0
  49. package/dist/commonjs/react-query/index.js.map +1 -1
  50. package/dist/commonjs/sdk/apikeys.d.ts +7 -0
  51. package/dist/commonjs/sdk/apikeys.d.ts.map +1 -1
  52. package/dist/commonjs/sdk/apikeys.js +10 -0
  53. package/dist/commonjs/sdk/apikeys.js.map +1 -1
  54. package/dist/esm/funcs/authApiKeysDelete.d.ts +20 -0
  55. package/dist/esm/funcs/authApiKeysDelete.d.ts.map +1 -0
  56. package/dist/esm/funcs/authApiKeysDelete.js +96 -0
  57. package/dist/esm/funcs/authApiKeysDelete.js.map +1 -0
  58. package/dist/esm/lib/config.d.ts +2 -2
  59. package/dist/esm/lib/config.js +2 -2
  60. package/dist/esm/mcp-server/mcp-server.js +1 -1
  61. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  62. package/dist/esm/mcp-server/server.js +3 -1
  63. package/dist/esm/mcp-server/server.js.map +1 -1
  64. package/dist/esm/mcp-server/tools/authApiKeysDelete.d.ts +8 -0
  65. package/dist/esm/mcp-server/tools/authApiKeysDelete.d.ts.map +1 -0
  66. package/dist/esm/mcp-server/tools/authApiKeysDelete.js +28 -0
  67. package/dist/esm/mcp-server/tools/authApiKeysDelete.js.map +1 -0
  68. package/dist/esm/models/errors/deletescopedapikey.d.ts +188 -0
  69. package/dist/esm/models/errors/deletescopedapikey.d.ts.map +1 -0
  70. package/dist/esm/models/errors/deletescopedapikey.js +227 -0
  71. package/dist/esm/models/errors/deletescopedapikey.js.map +1 -0
  72. package/dist/esm/models/errors/index.d.ts +1 -0
  73. package/dist/esm/models/errors/index.d.ts.map +1 -1
  74. package/dist/esm/models/errors/index.js +1 -0
  75. package/dist/esm/models/errors/index.js.map +1 -1
  76. package/dist/esm/models/operations/deletescopedapikey.d.ts +53 -0
  77. package/dist/esm/models/operations/deletescopedapikey.d.ts.map +1 -0
  78. package/dist/esm/models/operations/deletescopedapikey.js +65 -0
  79. package/dist/esm/models/operations/deletescopedapikey.js.map +1 -0
  80. package/dist/esm/models/operations/index.d.ts +1 -0
  81. package/dist/esm/models/operations/index.d.ts.map +1 -1
  82. package/dist/esm/models/operations/index.js +1 -0
  83. package/dist/esm/models/operations/index.js.map +1 -1
  84. package/dist/esm/models/operations/updatescopedapikey.d.ts +8 -24
  85. package/dist/esm/models/operations/updatescopedapikey.d.ts.map +1 -1
  86. package/dist/esm/models/operations/updatescopedapikey.js +8 -24
  87. package/dist/esm/models/operations/updatescopedapikey.js.map +1 -1
  88. package/dist/esm/models/operations/updateserviceaccountapikey.d.ts +2 -0
  89. package/dist/esm/models/operations/updateserviceaccountapikey.d.ts.map +1 -1
  90. package/dist/esm/models/operations/updateserviceaccountapikey.js +2 -0
  91. package/dist/esm/models/operations/updateserviceaccountapikey.js.map +1 -1
  92. package/dist/esm/react-query/authApiKeysDelete.d.ts +29 -0
  93. package/dist/esm/react-query/authApiKeysDelete.d.ts.map +1 -0
  94. package/dist/esm/react-query/authApiKeysDelete.js +42 -0
  95. package/dist/esm/react-query/authApiKeysDelete.js.map +1 -0
  96. package/dist/esm/react-query/index.d.ts +1 -0
  97. package/dist/esm/react-query/index.d.ts.map +1 -1
  98. package/dist/esm/react-query/index.js +1 -0
  99. package/dist/esm/react-query/index.js.map +1 -1
  100. package/dist/esm/sdk/apikeys.d.ts +7 -0
  101. package/dist/esm/sdk/apikeys.d.ts.map +1 -1
  102. package/dist/esm/sdk/apikeys.js +10 -0
  103. package/dist/esm/sdk/apikeys.js.map +1 -1
  104. package/jsr.json +1 -1
  105. package/package.json +1 -1
  106. package/src/funcs/authApiKeysDelete.ts +230 -0
  107. package/src/lib/config.ts +2 -2
  108. package/src/mcp-server/mcp-server.ts +1 -1
  109. package/src/mcp-server/server.ts +3 -1
  110. package/src/mcp-server/tools/authApiKeysDelete.ts +37 -0
  111. package/src/models/errors/deletescopedapikey.ts +461 -0
  112. package/src/models/errors/index.ts +1 -0
  113. package/src/models/operations/deletescopedapikey.ts +168 -0
  114. package/src/models/operations/index.ts +1 -0
  115. package/src/models/operations/updatescopedapikey.ts +18 -48
  116. package/src/models/operations/updateserviceaccountapikey.ts +6 -0
  117. package/src/react-query/authApiKeysDelete.ts +117 -0
  118. package/src/react-query/index.ts +1 -0
  119. package/src/sdk/apikeys.ts +18 -0
@@ -16,6 +16,7 @@ export type UpdateScopedApiKeyRequestBody = {
16
16
  rateLimitEnabled?: boolean | undefined;
17
17
  rateLimitTimeWindow?: number | undefined;
18
18
  rateLimitMax?: number | undefined;
19
+ expiresAt?: Date | null | undefined;
19
20
  };
20
21
 
21
22
  export type UpdateScopedApiKeyRequest = {
@@ -39,19 +40,10 @@ export type UpdateScopedApiKeyUserType = ClosedEnum<
39
40
  */
40
41
  export type UpdateScopedApiKeyResponseBody = {
41
42
  id: string;
42
- name?: string | null | undefined;
43
- key?: string | undefined;
44
- prefix?: string | null | undefined;
45
- start?: string | null | undefined;
46
- userId: string;
47
- userType: UpdateScopedApiKeyUserType;
48
- orgId: string | null;
49
- teamId: string | null;
50
43
  scopes: Array<string>;
51
- rateLimitEnabled?: boolean | null | undefined;
52
- rateLimitTimeWindow?: number | null | undefined;
53
- rateLimitMax?: number | null | undefined;
54
- expiresAt?: string | null | undefined;
44
+ userType: UpdateScopedApiKeyUserType;
45
+ orgId: string;
46
+ expiresAt: string | null;
55
47
  };
56
48
 
57
49
  /** @internal */
@@ -66,6 +58,9 @@ export const UpdateScopedApiKeyRequestBody$inboundSchema: z.ZodType<
66
58
  rateLimitEnabled: z.boolean().optional(),
67
59
  rateLimitTimeWindow: z.number().optional(),
68
60
  rateLimitMax: z.number().optional(),
61
+ expiresAt: z.nullable(
62
+ z.string().datetime({ offset: true }).transform(v => new Date(v)),
63
+ ).optional(),
69
64
  });
70
65
  /** @internal */
71
66
  export type UpdateScopedApiKeyRequestBody$Outbound = {
@@ -75,6 +70,7 @@ export type UpdateScopedApiKeyRequestBody$Outbound = {
75
70
  rateLimitEnabled?: boolean | undefined;
76
71
  rateLimitTimeWindow?: number | undefined;
77
72
  rateLimitMax?: number | undefined;
73
+ expiresAt?: string | null | undefined;
78
74
  };
79
75
 
80
76
  /** @internal */
@@ -89,6 +85,7 @@ export const UpdateScopedApiKeyRequestBody$outboundSchema: z.ZodType<
89
85
  rateLimitEnabled: z.boolean().optional(),
90
86
  rateLimitTimeWindow: z.number().optional(),
91
87
  rateLimitMax: z.number().optional(),
88
+ expiresAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
92
89
  });
93
90
 
94
91
  export function updateScopedApiKeyRequestBodyToJSON(
@@ -180,36 +177,18 @@ export const UpdateScopedApiKeyResponseBody$inboundSchema: z.ZodType<
180
177
  unknown
181
178
  > = z.object({
182
179
  id: z.string(),
183
- name: z.nullable(z.string()).optional(),
184
- key: z.string().optional(),
185
- prefix: z.nullable(z.string()).optional(),
186
- start: z.nullable(z.string()).optional(),
187
- userId: z.string(),
188
- userType: UpdateScopedApiKeyUserType$inboundSchema,
189
- orgId: z.nullable(z.string()),
190
- teamId: z.nullable(z.string()),
191
180
  scopes: z.array(z.string()),
192
- rateLimitEnabled: z.nullable(z.boolean()).optional(),
193
- rateLimitTimeWindow: z.nullable(z.number()).optional(),
194
- rateLimitMax: z.nullable(z.number()).optional(),
195
- expiresAt: z.nullable(z.string()).optional(),
181
+ userType: UpdateScopedApiKeyUserType$inboundSchema,
182
+ orgId: z.string(),
183
+ expiresAt: z.nullable(z.string()),
196
184
  });
197
185
  /** @internal */
198
186
  export type UpdateScopedApiKeyResponseBody$Outbound = {
199
187
  id: string;
200
- name?: string | null | undefined;
201
- key?: string | undefined;
202
- prefix?: string | null | undefined;
203
- start?: string | null | undefined;
204
- userId: string;
205
- userType: string;
206
- orgId: string | null;
207
- teamId: string | null;
208
188
  scopes: Array<string>;
209
- rateLimitEnabled?: boolean | null | undefined;
210
- rateLimitTimeWindow?: number | null | undefined;
211
- rateLimitMax?: number | null | undefined;
212
- expiresAt?: string | null | undefined;
189
+ userType: string;
190
+ orgId: string;
191
+ expiresAt: string | null;
213
192
  };
214
193
 
215
194
  /** @internal */
@@ -219,19 +198,10 @@ export const UpdateScopedApiKeyResponseBody$outboundSchema: z.ZodType<
219
198
  UpdateScopedApiKeyResponseBody
220
199
  > = z.object({
221
200
  id: z.string(),
222
- name: z.nullable(z.string()).optional(),
223
- key: z.string().optional(),
224
- prefix: z.nullable(z.string()).optional(),
225
- start: z.nullable(z.string()).optional(),
226
- userId: z.string(),
227
- userType: UpdateScopedApiKeyUserType$outboundSchema,
228
- orgId: z.nullable(z.string()),
229
- teamId: z.nullable(z.string()),
230
201
  scopes: z.array(z.string()),
231
- rateLimitEnabled: z.nullable(z.boolean()).optional(),
232
- rateLimitTimeWindow: z.nullable(z.number()).optional(),
233
- rateLimitMax: z.nullable(z.number()).optional(),
234
- expiresAt: z.nullable(z.string()).optional(),
202
+ userType: UpdateScopedApiKeyUserType$outboundSchema,
203
+ orgId: z.string(),
204
+ expiresAt: z.nullable(z.string()),
235
205
  });
236
206
 
237
207
  export function updateScopedApiKeyResponseBodyToJSON(
@@ -14,6 +14,7 @@ export type UpdateServiceAccountApiKeyRequestBody = {
14
14
  rateLimitEnabled?: boolean | undefined;
15
15
  rateLimitTimeWindow?: number | undefined;
16
16
  rateLimitMax?: number | undefined;
17
+ expiresAt?: Date | null | undefined;
17
18
  };
18
19
 
19
20
  export type UpdateServiceAccountApiKeyRequest = {
@@ -46,6 +47,9 @@ export const UpdateServiceAccountApiKeyRequestBody$inboundSchema: z.ZodType<
46
47
  rateLimitEnabled: z.boolean().optional(),
47
48
  rateLimitTimeWindow: z.number().optional(),
48
49
  rateLimitMax: z.number().optional(),
50
+ expiresAt: z.nullable(
51
+ z.string().datetime({ offset: true }).transform(v => new Date(v)),
52
+ ).optional(),
49
53
  });
50
54
  /** @internal */
51
55
  export type UpdateServiceAccountApiKeyRequestBody$Outbound = {
@@ -54,6 +58,7 @@ export type UpdateServiceAccountApiKeyRequestBody$Outbound = {
54
58
  rateLimitEnabled?: boolean | undefined;
55
59
  rateLimitTimeWindow?: number | undefined;
56
60
  rateLimitMax?: number | undefined;
61
+ expiresAt?: string | null | undefined;
57
62
  };
58
63
 
59
64
  /** @internal */
@@ -67,6 +72,7 @@ export const UpdateServiceAccountApiKeyRequestBody$outboundSchema: z.ZodType<
67
72
  rateLimitEnabled: z.boolean().optional(),
68
73
  rateLimitTimeWindow: z.number().optional(),
69
74
  rateLimitMax: z.number().optional(),
75
+ expiresAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
70
76
  });
71
77
 
72
78
  export function updateServiceAccountApiKeyRequestBodyToJSON(
@@ -0,0 +1,117 @@
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 { authApiKeysDelete } from "../funcs/authApiKeysDelete.js";
12
+ import { combineSignals } from "../lib/primitives.js";
13
+ import { RequestOptions } from "../lib/sdks.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKError } from "../models/errors/sdkerror.js";
24
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
25
+ import * as operations from "../models/operations/index.js";
26
+ import { unwrapAsync } from "../types/fp.js";
27
+ import { useSDKContext } from "./_context.js";
28
+ import { MutationHookOptions } from "./_types.js";
29
+
30
+ export type AuthApiKeysDeleteMutationVariables = {
31
+ request: operations.DeleteScopedApiKeyRequest;
32
+ options?: RequestOptions;
33
+ };
34
+
35
+ export type AuthApiKeysDeleteMutationData =
36
+ operations.DeleteScopedApiKeyResponseBody;
37
+
38
+ export type AuthApiKeysDeleteMutationError =
39
+ | errors.DeleteScopedApiKeyResponseBody
40
+ | errors.DeleteScopedApiKeyAuthApiKeysResponseBody
41
+ | errors.DeleteScopedApiKeyAuthApiKeysResponseResponseBody
42
+ | errors.DeleteScopedApiKeyAuthApiKeysResponse404ResponseBody
43
+ | errors.DeleteScopedApiKeyAuthApiKeysResponse409ResponseBody
44
+ | errors.DeleteScopedApiKeyAuthApiKeysResponse410ResponseBody
45
+ | errors.DeleteScopedApiKeyAuthApiKeysResponse429ResponseBody
46
+ | SDKError
47
+ | ResponseValidationError
48
+ | ConnectionError
49
+ | RequestAbortedError
50
+ | RequestTimeoutError
51
+ | InvalidRequestError
52
+ | UnexpectedClientError
53
+ | SDKValidationError;
54
+
55
+ /**
56
+ * Delete a scoped API key
57
+ *
58
+ * @remarks
59
+ * Delete one of the caller's own keys. A key caller needs `write:apikeys` and may delete only keys in its own organization whose scopes it holds, including itself. Takes effect immediately.
60
+ */
61
+ export function useAuthApiKeysDeleteMutation(
62
+ options?: MutationHookOptions<
63
+ AuthApiKeysDeleteMutationData,
64
+ AuthApiKeysDeleteMutationError,
65
+ AuthApiKeysDeleteMutationVariables
66
+ >,
67
+ ): UseMutationResult<
68
+ AuthApiKeysDeleteMutationData,
69
+ AuthApiKeysDeleteMutationError,
70
+ AuthApiKeysDeleteMutationVariables
71
+ > {
72
+ const client = useSDKContext();
73
+ return useMutation({
74
+ ...buildAuthApiKeysDeleteMutation(client, options),
75
+ ...options,
76
+ });
77
+ }
78
+
79
+ export function mutationKeyAuthApiKeysDelete(): MutationKey {
80
+ return ["@meetkai/mka1", "apiKeys", "delete"];
81
+ }
82
+
83
+ export function buildAuthApiKeysDeleteMutation(
84
+ client$: SDKCore,
85
+ hookOptions?: RequestOptions,
86
+ ): {
87
+ mutationKey: MutationKey;
88
+ mutationFn: (
89
+ variables: AuthApiKeysDeleteMutationVariables,
90
+ ) => Promise<AuthApiKeysDeleteMutationData>;
91
+ } {
92
+ return {
93
+ mutationKey: mutationKeyAuthApiKeysDelete(),
94
+ mutationFn: function authApiKeysDeleteMutationFn({
95
+ request,
96
+ options,
97
+ }): Promise<AuthApiKeysDeleteMutationData> {
98
+ const mergedOptions = {
99
+ ...hookOptions,
100
+ ...options,
101
+ fetchOptions: {
102
+ ...hookOptions?.fetchOptions,
103
+ ...options?.fetchOptions,
104
+ signal: combineSignals(
105
+ hookOptions?.fetchOptions?.signal,
106
+ options?.fetchOptions?.signal,
107
+ ),
108
+ },
109
+ };
110
+ return unwrapAsync(authApiKeysDelete(
111
+ client$,
112
+ request,
113
+ mergedOptions,
114
+ ));
115
+ },
116
+ };
117
+ }
@@ -53,6 +53,7 @@ export * from "./analyticsQuery.js";
53
53
  export * from "./analyticsVisitorsSearch.js";
54
54
  export * from "./authApiKeyGetJwtFromKey.js";
55
55
  export * from "./authApiKeysCreate.js";
56
+ export * from "./authApiKeysDelete.js";
56
57
  export * from "./authApiKeysExchangeToken.js";
57
58
  export * from "./authApiKeysList.js";
58
59
  export * from "./authApiKeysRegenerate.js";
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  import { authApiKeysCreate } from "../funcs/authApiKeysCreate.js";
6
+ import { authApiKeysDelete } from "../funcs/authApiKeysDelete.js";
6
7
  import { authApiKeysExchangeToken } from "../funcs/authApiKeysExchangeToken.js";
7
8
  import { authApiKeysList } from "../funcs/authApiKeysList.js";
8
9
  import { authApiKeysRegenerate } from "../funcs/authApiKeysRegenerate.js";
@@ -80,6 +81,23 @@ export class ApiKeys extends ClientSDK {
80
81
  ));
81
82
  }
82
83
 
84
+ /**
85
+ * Delete a scoped API key
86
+ *
87
+ * @remarks
88
+ * Delete one of the caller's own keys. A key caller needs `write:apikeys` and may delete only keys in its own organization whose scopes it holds, including itself. Takes effect immediately.
89
+ */
90
+ async delete(
91
+ request: operations.DeleteScopedApiKeyRequest,
92
+ options?: RequestOptions,
93
+ ): Promise<operations.DeleteScopedApiKeyResponseBody> {
94
+ return unwrapAsync(authApiKeysDelete(
95
+ this,
96
+ request,
97
+ options,
98
+ ));
99
+ }
100
+
83
101
  /**
84
102
  * Exchange API key for a JWT token
85
103
  *