@meetkai/mka1 0.55.20 → 0.55.22

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 (200) hide show
  1. package/README.md +411 -404
  2. package/bin/mcp-server.js +3601 -3076
  3. package/bin/mcp-server.js.map +21 -13
  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/funcs/computeSecretsRotateComputeSecret.d.ts +19 -0
  9. package/dist/commonjs/funcs/computeSecretsRotateComputeSecret.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/computeSecretsRotateComputeSecret.js +136 -0
  11. package/dist/commonjs/funcs/computeSecretsRotateComputeSecret.js.map +1 -0
  12. package/dist/commonjs/lib/config.d.ts +2 -2
  13. package/dist/commonjs/lib/config.js +2 -2
  14. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  15. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  16. package/dist/commonjs/mcp-server/server.js +5 -1
  17. package/dist/commonjs/mcp-server/server.js.map +1 -1
  18. package/dist/commonjs/mcp-server/tools/authApiKeysDelete.d.ts +8 -0
  19. package/dist/commonjs/mcp-server/tools/authApiKeysDelete.d.ts.map +1 -0
  20. package/dist/commonjs/mcp-server/tools/authApiKeysDelete.js +64 -0
  21. package/dist/commonjs/mcp-server/tools/authApiKeysDelete.js.map +1 -0
  22. package/dist/commonjs/mcp-server/tools/computeSecretsRotateComputeSecret.d.ts +8 -0
  23. package/dist/commonjs/mcp-server/tools/computeSecretsRotateComputeSecret.d.ts.map +1 -0
  24. package/dist/commonjs/mcp-server/tools/computeSecretsRotateComputeSecret.js +64 -0
  25. package/dist/commonjs/mcp-server/tools/computeSecretsRotateComputeSecret.js.map +1 -0
  26. package/dist/commonjs/models/components/computesecret.d.ts +15 -0
  27. package/dist/commonjs/models/components/computesecret.d.ts.map +1 -1
  28. package/dist/commonjs/models/components/computesecret.js +10 -0
  29. package/dist/commonjs/models/components/computesecret.js.map +1 -1
  30. package/dist/commonjs/models/components/computesecretcreate.d.ts +5 -0
  31. package/dist/commonjs/models/components/computesecretcreate.d.ts.map +1 -1
  32. package/dist/commonjs/models/components/computesecretcreate.js +12 -0
  33. package/dist/commonjs/models/components/computesecretcreate.js.map +1 -1
  34. package/dist/commonjs/models/components/computesecretrotate.d.ts +26 -0
  35. package/dist/commonjs/models/components/computesecretrotate.d.ts.map +1 -0
  36. package/dist/commonjs/models/components/computesecretrotate.js +70 -0
  37. package/dist/commonjs/models/components/computesecretrotate.js.map +1 -0
  38. package/dist/commonjs/models/components/index.d.ts +1 -0
  39. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  40. package/dist/commonjs/models/components/index.js +1 -0
  41. package/dist/commonjs/models/components/index.js.map +1 -1
  42. package/dist/commonjs/models/errors/deletescopedapikey.d.ts +188 -0
  43. package/dist/commonjs/models/errors/deletescopedapikey.d.ts.map +1 -0
  44. package/dist/commonjs/models/errors/deletescopedapikey.js +270 -0
  45. package/dist/commonjs/models/errors/deletescopedapikey.js.map +1 -0
  46. package/dist/commonjs/models/errors/index.d.ts +1 -0
  47. package/dist/commonjs/models/errors/index.d.ts.map +1 -1
  48. package/dist/commonjs/models/errors/index.js +1 -0
  49. package/dist/commonjs/models/errors/index.js.map +1 -1
  50. package/dist/commonjs/models/operations/deletescopedapikey.d.ts +53 -0
  51. package/dist/commonjs/models/operations/deletescopedapikey.d.ts.map +1 -0
  52. package/dist/commonjs/models/operations/deletescopedapikey.js +107 -0
  53. package/dist/commonjs/models/operations/deletescopedapikey.js.map +1 -0
  54. package/dist/commonjs/models/operations/index.d.ts +2 -0
  55. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  56. package/dist/commonjs/models/operations/index.js +2 -0
  57. package/dist/commonjs/models/operations/index.js.map +1 -1
  58. package/dist/commonjs/models/operations/rotatecomputesecret.d.ts +34 -0
  59. package/dist/commonjs/models/operations/rotatecomputesecret.d.ts.map +1 -0
  60. package/dist/commonjs/models/operations/rotatecomputesecret.js +92 -0
  61. package/dist/commonjs/models/operations/rotatecomputesecret.js.map +1 -0
  62. package/dist/commonjs/models/operations/updatescopedapikey.d.ts +8 -24
  63. package/dist/commonjs/models/operations/updatescopedapikey.d.ts.map +1 -1
  64. package/dist/commonjs/models/operations/updatescopedapikey.js +8 -24
  65. package/dist/commonjs/models/operations/updatescopedapikey.js.map +1 -1
  66. package/dist/commonjs/models/operations/updateserviceaccountapikey.d.ts +2 -0
  67. package/dist/commonjs/models/operations/updateserviceaccountapikey.d.ts.map +1 -1
  68. package/dist/commonjs/models/operations/updateserviceaccountapikey.js +2 -0
  69. package/dist/commonjs/models/operations/updateserviceaccountapikey.js.map +1 -1
  70. package/dist/commonjs/react-query/authApiKeysDelete.d.ts +29 -0
  71. package/dist/commonjs/react-query/authApiKeysDelete.d.ts.map +1 -0
  72. package/dist/commonjs/react-query/authApiKeysDelete.js +47 -0
  73. package/dist/commonjs/react-query/authApiKeysDelete.js.map +1 -0
  74. package/dist/commonjs/react-query/computeSecretsRotateComputeSecret.d.ts +28 -0
  75. package/dist/commonjs/react-query/computeSecretsRotateComputeSecret.d.ts.map +1 -0
  76. package/dist/commonjs/react-query/computeSecretsRotateComputeSecret.js +47 -0
  77. package/dist/commonjs/react-query/computeSecretsRotateComputeSecret.js.map +1 -0
  78. package/dist/commonjs/react-query/index.d.ts +2 -0
  79. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  80. package/dist/commonjs/react-query/index.js +2 -0
  81. package/dist/commonjs/react-query/index.js.map +1 -1
  82. package/dist/commonjs/sdk/apikeys.d.ts +7 -0
  83. package/dist/commonjs/sdk/apikeys.d.ts.map +1 -1
  84. package/dist/commonjs/sdk/apikeys.js +10 -0
  85. package/dist/commonjs/sdk/apikeys.js.map +1 -1
  86. package/dist/commonjs/sdk/computesecrets.d.ts +7 -0
  87. package/dist/commonjs/sdk/computesecrets.d.ts.map +1 -1
  88. package/dist/commonjs/sdk/computesecrets.js +10 -0
  89. package/dist/commonjs/sdk/computesecrets.js.map +1 -1
  90. package/dist/esm/funcs/authApiKeysDelete.d.ts +20 -0
  91. package/dist/esm/funcs/authApiKeysDelete.d.ts.map +1 -0
  92. package/dist/esm/funcs/authApiKeysDelete.js +96 -0
  93. package/dist/esm/funcs/authApiKeysDelete.js.map +1 -0
  94. package/dist/esm/funcs/computeSecretsRotateComputeSecret.d.ts +19 -0
  95. package/dist/esm/funcs/computeSecretsRotateComputeSecret.d.ts.map +1 -0
  96. package/dist/esm/funcs/computeSecretsRotateComputeSecret.js +100 -0
  97. package/dist/esm/funcs/computeSecretsRotateComputeSecret.js.map +1 -0
  98. package/dist/esm/lib/config.d.ts +2 -2
  99. package/dist/esm/lib/config.js +2 -2
  100. package/dist/esm/mcp-server/mcp-server.js +1 -1
  101. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  102. package/dist/esm/mcp-server/server.js +5 -1
  103. package/dist/esm/mcp-server/server.js.map +1 -1
  104. package/dist/esm/mcp-server/tools/authApiKeysDelete.d.ts +8 -0
  105. package/dist/esm/mcp-server/tools/authApiKeysDelete.d.ts.map +1 -0
  106. package/dist/esm/mcp-server/tools/authApiKeysDelete.js +28 -0
  107. package/dist/esm/mcp-server/tools/authApiKeysDelete.js.map +1 -0
  108. package/dist/esm/mcp-server/tools/computeSecretsRotateComputeSecret.d.ts +8 -0
  109. package/dist/esm/mcp-server/tools/computeSecretsRotateComputeSecret.d.ts.map +1 -0
  110. package/dist/esm/mcp-server/tools/computeSecretsRotateComputeSecret.js +28 -0
  111. package/dist/esm/mcp-server/tools/computeSecretsRotateComputeSecret.js.map +1 -0
  112. package/dist/esm/models/components/computesecret.d.ts +15 -0
  113. package/dist/esm/models/components/computesecret.d.ts.map +1 -1
  114. package/dist/esm/models/components/computesecret.js +10 -0
  115. package/dist/esm/models/components/computesecret.js.map +1 -1
  116. package/dist/esm/models/components/computesecretcreate.d.ts +5 -0
  117. package/dist/esm/models/components/computesecretcreate.d.ts.map +1 -1
  118. package/dist/esm/models/components/computesecretcreate.js +12 -0
  119. package/dist/esm/models/components/computesecretcreate.js.map +1 -1
  120. package/dist/esm/models/components/computesecretrotate.d.ts +26 -0
  121. package/dist/esm/models/components/computesecretrotate.d.ts.map +1 -0
  122. package/dist/esm/models/components/computesecretrotate.js +32 -0
  123. package/dist/esm/models/components/computesecretrotate.js.map +1 -0
  124. package/dist/esm/models/components/index.d.ts +1 -0
  125. package/dist/esm/models/components/index.d.ts.map +1 -1
  126. package/dist/esm/models/components/index.js +1 -0
  127. package/dist/esm/models/components/index.js.map +1 -1
  128. package/dist/esm/models/errors/deletescopedapikey.d.ts +188 -0
  129. package/dist/esm/models/errors/deletescopedapikey.d.ts.map +1 -0
  130. package/dist/esm/models/errors/deletescopedapikey.js +227 -0
  131. package/dist/esm/models/errors/deletescopedapikey.js.map +1 -0
  132. package/dist/esm/models/errors/index.d.ts +1 -0
  133. package/dist/esm/models/errors/index.d.ts.map +1 -1
  134. package/dist/esm/models/errors/index.js +1 -0
  135. package/dist/esm/models/errors/index.js.map +1 -1
  136. package/dist/esm/models/operations/deletescopedapikey.d.ts +53 -0
  137. package/dist/esm/models/operations/deletescopedapikey.d.ts.map +1 -0
  138. package/dist/esm/models/operations/deletescopedapikey.js +65 -0
  139. package/dist/esm/models/operations/deletescopedapikey.js.map +1 -0
  140. package/dist/esm/models/operations/index.d.ts +2 -0
  141. package/dist/esm/models/operations/index.d.ts.map +1 -1
  142. package/dist/esm/models/operations/index.js +2 -0
  143. package/dist/esm/models/operations/index.js.map +1 -1
  144. package/dist/esm/models/operations/rotatecomputesecret.d.ts +34 -0
  145. package/dist/esm/models/operations/rotatecomputesecret.d.ts.map +1 -0
  146. package/dist/esm/models/operations/rotatecomputesecret.js +52 -0
  147. package/dist/esm/models/operations/rotatecomputesecret.js.map +1 -0
  148. package/dist/esm/models/operations/updatescopedapikey.d.ts +8 -24
  149. package/dist/esm/models/operations/updatescopedapikey.d.ts.map +1 -1
  150. package/dist/esm/models/operations/updatescopedapikey.js +8 -24
  151. package/dist/esm/models/operations/updatescopedapikey.js.map +1 -1
  152. package/dist/esm/models/operations/updateserviceaccountapikey.d.ts +2 -0
  153. package/dist/esm/models/operations/updateserviceaccountapikey.d.ts.map +1 -1
  154. package/dist/esm/models/operations/updateserviceaccountapikey.js +2 -0
  155. package/dist/esm/models/operations/updateserviceaccountapikey.js.map +1 -1
  156. package/dist/esm/react-query/authApiKeysDelete.d.ts +29 -0
  157. package/dist/esm/react-query/authApiKeysDelete.d.ts.map +1 -0
  158. package/dist/esm/react-query/authApiKeysDelete.js +42 -0
  159. package/dist/esm/react-query/authApiKeysDelete.js.map +1 -0
  160. package/dist/esm/react-query/computeSecretsRotateComputeSecret.d.ts +28 -0
  161. package/dist/esm/react-query/computeSecretsRotateComputeSecret.d.ts.map +1 -0
  162. package/dist/esm/react-query/computeSecretsRotateComputeSecret.js +42 -0
  163. package/dist/esm/react-query/computeSecretsRotateComputeSecret.js.map +1 -0
  164. package/dist/esm/react-query/index.d.ts +2 -0
  165. package/dist/esm/react-query/index.d.ts.map +1 -1
  166. package/dist/esm/react-query/index.js +2 -0
  167. package/dist/esm/react-query/index.js.map +1 -1
  168. package/dist/esm/sdk/apikeys.d.ts +7 -0
  169. package/dist/esm/sdk/apikeys.d.ts.map +1 -1
  170. package/dist/esm/sdk/apikeys.js +10 -0
  171. package/dist/esm/sdk/apikeys.js.map +1 -1
  172. package/dist/esm/sdk/computesecrets.d.ts +7 -0
  173. package/dist/esm/sdk/computesecrets.d.ts.map +1 -1
  174. package/dist/esm/sdk/computesecrets.js +10 -0
  175. package/dist/esm/sdk/computesecrets.js.map +1 -1
  176. package/jsr.json +1 -1
  177. package/package.json +1 -1
  178. package/src/funcs/authApiKeysDelete.ts +230 -0
  179. package/src/funcs/computeSecretsRotateComputeSecret.ts +189 -0
  180. package/src/lib/config.ts +2 -2
  181. package/src/mcp-server/mcp-server.ts +1 -1
  182. package/src/mcp-server/server.ts +5 -1
  183. package/src/mcp-server/tools/authApiKeysDelete.ts +37 -0
  184. package/src/mcp-server/tools/computeSecretsRotateComputeSecret.ts +39 -0
  185. package/src/models/components/computesecret.ts +27 -0
  186. package/src/models/components/computesecretcreate.ts +17 -0
  187. package/src/models/components/computesecretrotate.ts +68 -0
  188. package/src/models/components/index.ts +1 -0
  189. package/src/models/errors/deletescopedapikey.ts +461 -0
  190. package/src/models/errors/index.ts +1 -0
  191. package/src/models/operations/deletescopedapikey.ts +168 -0
  192. package/src/models/operations/index.ts +2 -0
  193. package/src/models/operations/rotatecomputesecret.ts +121 -0
  194. package/src/models/operations/updatescopedapikey.ts +18 -48
  195. package/src/models/operations/updateserviceaccountapikey.ts +6 -0
  196. package/src/react-query/authApiKeysDelete.ts +117 -0
  197. package/src/react-query/computeSecretsRotateComputeSecret.ts +109 -0
  198. package/src/react-query/index.ts +2 -0
  199. package/src/sdk/apikeys.ts +18 -0
  200. package/src/sdk/computesecrets.ts +18 -0
@@ -0,0 +1,168 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type DeleteScopedApiKeyRequestBody = {
12
+ keyId: string;
13
+ };
14
+
15
+ export type DeleteScopedApiKeyRequest = {
16
+ /**
17
+ * Optional external end-user identifier forwarded by the API gateway.
18
+ */
19
+ xOnBehalfOf?: string | undefined;
20
+ requestBody?: DeleteScopedApiKeyRequestBody | undefined;
21
+ };
22
+
23
+ /**
24
+ * Deleted
25
+ */
26
+ export type DeleteScopedApiKeyResponseBody = {
27
+ id: string;
28
+ deleted: true;
29
+ };
30
+
31
+ /** @internal */
32
+ export const DeleteScopedApiKeyRequestBody$inboundSchema: z.ZodType<
33
+ DeleteScopedApiKeyRequestBody,
34
+ z.ZodTypeDef,
35
+ unknown
36
+ > = z.object({
37
+ keyId: z.string(),
38
+ });
39
+ /** @internal */
40
+ export type DeleteScopedApiKeyRequestBody$Outbound = {
41
+ keyId: string;
42
+ };
43
+
44
+ /** @internal */
45
+ export const DeleteScopedApiKeyRequestBody$outboundSchema: z.ZodType<
46
+ DeleteScopedApiKeyRequestBody$Outbound,
47
+ z.ZodTypeDef,
48
+ DeleteScopedApiKeyRequestBody
49
+ > = z.object({
50
+ keyId: z.string(),
51
+ });
52
+
53
+ export function deleteScopedApiKeyRequestBodyToJSON(
54
+ deleteScopedApiKeyRequestBody: DeleteScopedApiKeyRequestBody,
55
+ ): string {
56
+ return JSON.stringify(
57
+ DeleteScopedApiKeyRequestBody$outboundSchema.parse(
58
+ deleteScopedApiKeyRequestBody,
59
+ ),
60
+ );
61
+ }
62
+ export function deleteScopedApiKeyRequestBodyFromJSON(
63
+ jsonString: string,
64
+ ): SafeParseResult<DeleteScopedApiKeyRequestBody, SDKValidationError> {
65
+ return safeParse(
66
+ jsonString,
67
+ (x) => DeleteScopedApiKeyRequestBody$inboundSchema.parse(JSON.parse(x)),
68
+ `Failed to parse 'DeleteScopedApiKeyRequestBody' from JSON`,
69
+ );
70
+ }
71
+
72
+ /** @internal */
73
+ export const DeleteScopedApiKeyRequest$inboundSchema: z.ZodType<
74
+ DeleteScopedApiKeyRequest,
75
+ z.ZodTypeDef,
76
+ unknown
77
+ > = z.object({
78
+ "X-On-Behalf-Of": z.string().optional(),
79
+ RequestBody: z.lazy(() => DeleteScopedApiKeyRequestBody$inboundSchema)
80
+ .optional(),
81
+ }).transform((v) => {
82
+ return remap$(v, {
83
+ "X-On-Behalf-Of": "xOnBehalfOf",
84
+ "RequestBody": "requestBody",
85
+ });
86
+ });
87
+ /** @internal */
88
+ export type DeleteScopedApiKeyRequest$Outbound = {
89
+ "X-On-Behalf-Of"?: string | undefined;
90
+ RequestBody?: DeleteScopedApiKeyRequestBody$Outbound | undefined;
91
+ };
92
+
93
+ /** @internal */
94
+ export const DeleteScopedApiKeyRequest$outboundSchema: z.ZodType<
95
+ DeleteScopedApiKeyRequest$Outbound,
96
+ z.ZodTypeDef,
97
+ DeleteScopedApiKeyRequest
98
+ > = z.object({
99
+ xOnBehalfOf: z.string().optional(),
100
+ requestBody: z.lazy(() => DeleteScopedApiKeyRequestBody$outboundSchema)
101
+ .optional(),
102
+ }).transform((v) => {
103
+ return remap$(v, {
104
+ xOnBehalfOf: "X-On-Behalf-Of",
105
+ requestBody: "RequestBody",
106
+ });
107
+ });
108
+
109
+ export function deleteScopedApiKeyRequestToJSON(
110
+ deleteScopedApiKeyRequest: DeleteScopedApiKeyRequest,
111
+ ): string {
112
+ return JSON.stringify(
113
+ DeleteScopedApiKeyRequest$outboundSchema.parse(deleteScopedApiKeyRequest),
114
+ );
115
+ }
116
+ export function deleteScopedApiKeyRequestFromJSON(
117
+ jsonString: string,
118
+ ): SafeParseResult<DeleteScopedApiKeyRequest, SDKValidationError> {
119
+ return safeParse(
120
+ jsonString,
121
+ (x) => DeleteScopedApiKeyRequest$inboundSchema.parse(JSON.parse(x)),
122
+ `Failed to parse 'DeleteScopedApiKeyRequest' from JSON`,
123
+ );
124
+ }
125
+
126
+ /** @internal */
127
+ export const DeleteScopedApiKeyResponseBody$inboundSchema: z.ZodType<
128
+ DeleteScopedApiKeyResponseBody,
129
+ z.ZodTypeDef,
130
+ unknown
131
+ > = z.object({
132
+ id: z.string(),
133
+ deleted: z.literal(true),
134
+ });
135
+ /** @internal */
136
+ export type DeleteScopedApiKeyResponseBody$Outbound = {
137
+ id: string;
138
+ deleted: true;
139
+ };
140
+
141
+ /** @internal */
142
+ export const DeleteScopedApiKeyResponseBody$outboundSchema: z.ZodType<
143
+ DeleteScopedApiKeyResponseBody$Outbound,
144
+ z.ZodTypeDef,
145
+ DeleteScopedApiKeyResponseBody
146
+ > = z.object({
147
+ id: z.string(),
148
+ deleted: z.literal(true),
149
+ });
150
+
151
+ export function deleteScopedApiKeyResponseBodyToJSON(
152
+ deleteScopedApiKeyResponseBody: DeleteScopedApiKeyResponseBody,
153
+ ): string {
154
+ return JSON.stringify(
155
+ DeleteScopedApiKeyResponseBody$outboundSchema.parse(
156
+ deleteScopedApiKeyResponseBody,
157
+ ),
158
+ );
159
+ }
160
+ export function deleteScopedApiKeyResponseBodyFromJSON(
161
+ jsonString: string,
162
+ ): SafeParseResult<DeleteScopedApiKeyResponseBody, SDKValidationError> {
163
+ return safeParse(
164
+ jsonString,
165
+ (x) => DeleteScopedApiKeyResponseBody$inboundSchema.parse(JSON.parse(x)),
166
+ `Failed to parse 'DeleteScopedApiKeyResponseBody' from JSON`,
167
+ );
168
+ }
@@ -132,6 +132,7 @@ export * from "./deleterepo.js";
132
132
  export * from "./deleterepotag.js";
133
133
  export * from "./deleteresponse.js";
134
134
  export * from "./deletesandboxenvironment.js";
135
+ export * from "./deletescopedapikey.js";
135
136
  export * from "./deleteserviceaccount.js";
136
137
  export * from "./deleteserviceaccountapikey.js";
137
138
  export * from "./deleteskill.js";
@@ -399,6 +400,7 @@ export * from "./revokeclusterinvite.js";
399
400
  export * from "./revokefeatureflagevaluationkey.js";
400
401
  export * from "./rollbackagentversion.js";
401
402
  export * from "./rollbackprompt.js";
403
+ export * from "./rotatecomputesecret.js";
402
404
  export * from "./runcode.js";
403
405
  export * from "./runcommand.js";
404
406
  export * from "./runsandboxenvironmentsetup.js";
@@ -0,0 +1,121 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type RotateComputeSecretRequest = {
13
+ id: string;
14
+ /**
15
+ * Optional external end-user identifier forwarded by the API gateway.
16
+ */
17
+ xOnBehalfOf?: string | undefined;
18
+ computeSecretRotate: components.ComputeSecretRotate;
19
+ };
20
+
21
+ export type RotateComputeSecretResponse =
22
+ | components.ComputeSecret
23
+ | components.ComputeErrorEnvelope;
24
+
25
+ /** @internal */
26
+ export const RotateComputeSecretRequest$inboundSchema: z.ZodType<
27
+ RotateComputeSecretRequest,
28
+ z.ZodTypeDef,
29
+ unknown
30
+ > = z.object({
31
+ id: z.string(),
32
+ "X-On-Behalf-Of": z.string().optional(),
33
+ ComputeSecretRotate: components.ComputeSecretRotate$inboundSchema,
34
+ }).transform((v) => {
35
+ return remap$(v, {
36
+ "X-On-Behalf-Of": "xOnBehalfOf",
37
+ "ComputeSecretRotate": "computeSecretRotate",
38
+ });
39
+ });
40
+ /** @internal */
41
+ export type RotateComputeSecretRequest$Outbound = {
42
+ id: string;
43
+ "X-On-Behalf-Of"?: string | undefined;
44
+ ComputeSecretRotate: components.ComputeSecretRotate$Outbound;
45
+ };
46
+
47
+ /** @internal */
48
+ export const RotateComputeSecretRequest$outboundSchema: z.ZodType<
49
+ RotateComputeSecretRequest$Outbound,
50
+ z.ZodTypeDef,
51
+ RotateComputeSecretRequest
52
+ > = z.object({
53
+ id: z.string(),
54
+ xOnBehalfOf: z.string().optional(),
55
+ computeSecretRotate: components.ComputeSecretRotate$outboundSchema,
56
+ }).transform((v) => {
57
+ return remap$(v, {
58
+ xOnBehalfOf: "X-On-Behalf-Of",
59
+ computeSecretRotate: "ComputeSecretRotate",
60
+ });
61
+ });
62
+
63
+ export function rotateComputeSecretRequestToJSON(
64
+ rotateComputeSecretRequest: RotateComputeSecretRequest,
65
+ ): string {
66
+ return JSON.stringify(
67
+ RotateComputeSecretRequest$outboundSchema.parse(rotateComputeSecretRequest),
68
+ );
69
+ }
70
+ export function rotateComputeSecretRequestFromJSON(
71
+ jsonString: string,
72
+ ): SafeParseResult<RotateComputeSecretRequest, SDKValidationError> {
73
+ return safeParse(
74
+ jsonString,
75
+ (x) => RotateComputeSecretRequest$inboundSchema.parse(JSON.parse(x)),
76
+ `Failed to parse 'RotateComputeSecretRequest' from JSON`,
77
+ );
78
+ }
79
+
80
+ /** @internal */
81
+ export const RotateComputeSecretResponse$inboundSchema: z.ZodType<
82
+ RotateComputeSecretResponse,
83
+ z.ZodTypeDef,
84
+ unknown
85
+ > = z.union([
86
+ components.ComputeSecret$inboundSchema,
87
+ components.ComputeErrorEnvelope$inboundSchema,
88
+ ]);
89
+ /** @internal */
90
+ export type RotateComputeSecretResponse$Outbound =
91
+ | components.ComputeSecret$Outbound
92
+ | components.ComputeErrorEnvelope$Outbound;
93
+
94
+ /** @internal */
95
+ export const RotateComputeSecretResponse$outboundSchema: z.ZodType<
96
+ RotateComputeSecretResponse$Outbound,
97
+ z.ZodTypeDef,
98
+ RotateComputeSecretResponse
99
+ > = z.union([
100
+ components.ComputeSecret$outboundSchema,
101
+ components.ComputeErrorEnvelope$outboundSchema,
102
+ ]);
103
+
104
+ export function rotateComputeSecretResponseToJSON(
105
+ rotateComputeSecretResponse: RotateComputeSecretResponse,
106
+ ): string {
107
+ return JSON.stringify(
108
+ RotateComputeSecretResponse$outboundSchema.parse(
109
+ rotateComputeSecretResponse,
110
+ ),
111
+ );
112
+ }
113
+ export function rotateComputeSecretResponseFromJSON(
114
+ jsonString: string,
115
+ ): SafeParseResult<RotateComputeSecretResponse, SDKValidationError> {
116
+ return safeParse(
117
+ jsonString,
118
+ (x) => RotateComputeSecretResponse$inboundSchema.parse(JSON.parse(x)),
119
+ `Failed to parse 'RotateComputeSecretResponse' from JSON`,
120
+ );
121
+ }
@@ -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
+ }
@@ -0,0 +1,109 @@
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 { computeSecretsRotateComputeSecret } from "../funcs/computeSecretsRotateComputeSecret.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 { 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 { unwrapAsync } from "../types/fp.js";
26
+ import { useSDKContext } from "./_context.js";
27
+ import { MutationHookOptions } from "./_types.js";
28
+
29
+ export type ComputeSecretsRotateComputeSecretMutationVariables = {
30
+ request: operations.RotateComputeSecretRequest;
31
+ options?: RequestOptions;
32
+ };
33
+
34
+ export type ComputeSecretsRotateComputeSecretMutationData =
35
+ operations.RotateComputeSecretResponse;
36
+
37
+ export type ComputeSecretsRotateComputeSecretMutationError =
38
+ | SDKError
39
+ | ResponseValidationError
40
+ | ConnectionError
41
+ | RequestAbortedError
42
+ | RequestTimeoutError
43
+ | InvalidRequestError
44
+ | UnexpectedClientError
45
+ | SDKValidationError;
46
+
47
+ /**
48
+ * Rotate a secret
49
+ *
50
+ * @remarks
51
+ * Replaces every value of the secret under the same id and increments its version. Resources that reference it read the new values at their next launch, retry or restart; running workloads keep the values they started with. The new keys must include every key a live resource references. The expiry is set from the request: omit expires_at for a version that never expires.
52
+ */
53
+ export function useComputeSecretsRotateComputeSecretMutation(
54
+ options?: MutationHookOptions<
55
+ ComputeSecretsRotateComputeSecretMutationData,
56
+ ComputeSecretsRotateComputeSecretMutationError,
57
+ ComputeSecretsRotateComputeSecretMutationVariables
58
+ >,
59
+ ): UseMutationResult<
60
+ ComputeSecretsRotateComputeSecretMutationData,
61
+ ComputeSecretsRotateComputeSecretMutationError,
62
+ ComputeSecretsRotateComputeSecretMutationVariables
63
+ > {
64
+ const client = useSDKContext();
65
+ return useMutation({
66
+ ...buildComputeSecretsRotateComputeSecretMutation(client, options),
67
+ ...options,
68
+ });
69
+ }
70
+
71
+ export function mutationKeyComputeSecretsRotateComputeSecret(): MutationKey {
72
+ return ["@meetkai/mka1", "Compute Secrets", "rotateComputeSecret"];
73
+ }
74
+
75
+ export function buildComputeSecretsRotateComputeSecretMutation(
76
+ client$: SDKCore,
77
+ hookOptions?: RequestOptions,
78
+ ): {
79
+ mutationKey: MutationKey;
80
+ mutationFn: (
81
+ variables: ComputeSecretsRotateComputeSecretMutationVariables,
82
+ ) => Promise<ComputeSecretsRotateComputeSecretMutationData>;
83
+ } {
84
+ return {
85
+ mutationKey: mutationKeyComputeSecretsRotateComputeSecret(),
86
+ mutationFn: function computeSecretsRotateComputeSecretMutationFn({
87
+ request,
88
+ options,
89
+ }): Promise<ComputeSecretsRotateComputeSecretMutationData> {
90
+ const mergedOptions = {
91
+ ...hookOptions,
92
+ ...options,
93
+ fetchOptions: {
94
+ ...hookOptions?.fetchOptions,
95
+ ...options?.fetchOptions,
96
+ signal: combineSignals(
97
+ hookOptions?.fetchOptions?.signal,
98
+ options?.fetchOptions?.signal,
99
+ ),
100
+ },
101
+ };
102
+ return unwrapAsync(computeSecretsRotateComputeSecret(
103
+ client$,
104
+ request,
105
+ mergedOptions,
106
+ ));
107
+ },
108
+ };
109
+ }