@meetkai/mka1 0.55.1 → 0.55.3

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 (281) hide show
  1. package/README.md +360 -360
  2. package/bin/mcp-server.js +1808 -1135
  3. package/bin/mcp-server.js.map +26 -15
  4. package/dist/commonjs/funcs/llmModelsGetQuota.d.ts +19 -0
  5. package/dist/commonjs/funcs/llmModelsGetQuota.d.ts.map +1 -0
  6. package/dist/commonjs/funcs/llmModelsGetQuota.js +138 -0
  7. package/dist/commonjs/funcs/llmModelsGetQuota.js.map +1 -0
  8. package/dist/commonjs/funcs/sessionsGetTenantResourcePolicy.d.ts +18 -0
  9. package/dist/commonjs/funcs/sessionsGetTenantResourcePolicy.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/sessionsGetTenantResourcePolicy.js +140 -0
  11. package/dist/commonjs/funcs/sessionsGetTenantResourcePolicy.js.map +1 -0
  12. package/dist/commonjs/funcs/sessionsSetTenantResourcePolicy.d.ts +18 -0
  13. package/dist/commonjs/funcs/sessionsSetTenantResourcePolicy.d.ts.map +1 -0
  14. package/dist/commonjs/funcs/sessionsSetTenantResourcePolicy.js +143 -0
  15. package/dist/commonjs/funcs/sessionsSetTenantResourcePolicy.js.map +1 -0
  16. package/dist/commonjs/lib/config.d.ts +2 -2
  17. package/dist/commonjs/lib/config.js +2 -2
  18. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  19. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  20. package/dist/commonjs/mcp-server/server.js +7 -1
  21. package/dist/commonjs/mcp-server/server.js.map +1 -1
  22. package/dist/commonjs/mcp-server/tools/llmModelsGetQuota.d.ts +8 -0
  23. package/dist/commonjs/mcp-server/tools/llmModelsGetQuota.d.ts.map +1 -0
  24. package/dist/commonjs/mcp-server/tools/llmModelsGetQuota.js +64 -0
  25. package/dist/commonjs/mcp-server/tools/llmModelsGetQuota.js.map +1 -0
  26. package/dist/commonjs/mcp-server/tools/sessionsGetTenantResourcePolicy.d.ts +8 -0
  27. package/dist/commonjs/mcp-server/tools/sessionsGetTenantResourcePolicy.d.ts.map +1 -0
  28. package/dist/commonjs/mcp-server/tools/sessionsGetTenantResourcePolicy.js +62 -0
  29. package/dist/commonjs/mcp-server/tools/sessionsGetTenantResourcePolicy.js.map +1 -0
  30. package/dist/commonjs/mcp-server/tools/sessionsSetTenantResourcePolicy.d.ts +8 -0
  31. package/dist/commonjs/mcp-server/tools/sessionsSetTenantResourcePolicy.d.ts.map +1 -0
  32. package/dist/commonjs/mcp-server/tools/sessionsSetTenantResourcePolicy.js +62 -0
  33. package/dist/commonjs/mcp-server/tools/sessionsSetTenantResourcePolicy.js.map +1 -0
  34. package/dist/commonjs/models/components/index.d.ts +2 -0
  35. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  36. package/dist/commonjs/models/components/index.js +2 -0
  37. package/dist/commonjs/models/components/index.js.map +1 -1
  38. package/dist/commonjs/models/components/responsescreaterequest.d.ts +5 -0
  39. package/dist/commonjs/models/components/responsescreaterequest.d.ts.map +1 -1
  40. package/dist/commonjs/models/components/responsescreaterequest.js +4 -0
  41. package/dist/commonjs/models/components/responsescreaterequest.js.map +1 -1
  42. package/dist/commonjs/models/components/savetenantresourcepolicy.d.ts +43 -0
  43. package/dist/commonjs/models/components/savetenantresourcepolicy.d.ts.map +1 -0
  44. package/dist/commonjs/models/components/savetenantresourcepolicy.js +100 -0
  45. package/dist/commonjs/models/components/savetenantresourcepolicy.js.map +1 -0
  46. package/dist/commonjs/models/components/tenantresourcepolicy.d.ts +43 -0
  47. package/dist/commonjs/models/components/tenantresourcepolicy.d.ts.map +1 -0
  48. package/dist/commonjs/models/components/tenantresourcepolicy.js +96 -0
  49. package/dist/commonjs/models/components/tenantresourcepolicy.js.map +1 -0
  50. package/dist/commonjs/models/operations/acceptclusterinvite.d.ts +6 -0
  51. package/dist/commonjs/models/operations/acceptclusterinvite.d.ts.map +1 -1
  52. package/dist/commonjs/models/operations/acceptclusterinvite.js +6 -0
  53. package/dist/commonjs/models/operations/acceptclusterinvite.js.map +1 -1
  54. package/dist/commonjs/models/operations/createscopedapikey.d.ts +6 -0
  55. package/dist/commonjs/models/operations/createscopedapikey.d.ts.map +1 -1
  56. package/dist/commonjs/models/operations/createscopedapikey.js +6 -0
  57. package/dist/commonjs/models/operations/createscopedapikey.js.map +1 -1
  58. package/dist/commonjs/models/operations/getmodelquota.d.ts +83 -0
  59. package/dist/commonjs/models/operations/getmodelquota.d.ts.map +1 -0
  60. package/dist/commonjs/models/operations/getmodelquota.js +153 -0
  61. package/dist/commonjs/models/operations/getmodelquota.js.map +1 -0
  62. package/dist/commonjs/models/operations/gettenantresourcepolicy.d.ts +36 -0
  63. package/dist/commonjs/models/operations/gettenantresourcepolicy.d.ts.map +1 -0
  64. package/dist/commonjs/models/operations/gettenantresourcepolicy.js +85 -0
  65. package/dist/commonjs/models/operations/gettenantresourcepolicy.js.map +1 -0
  66. package/dist/commonjs/models/operations/index.d.ts +3 -0
  67. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  68. package/dist/commonjs/models/operations/index.js +3 -0
  69. package/dist/commonjs/models/operations/index.js.map +1 -1
  70. package/dist/commonjs/models/operations/listscopedapikeys.d.ts +6 -0
  71. package/dist/commonjs/models/operations/listscopedapikeys.d.ts.map +1 -1
  72. package/dist/commonjs/models/operations/listscopedapikeys.js +6 -0
  73. package/dist/commonjs/models/operations/listscopedapikeys.js.map +1 -1
  74. package/dist/commonjs/models/operations/listserviceaccountapikeys.d.ts +6 -0
  75. package/dist/commonjs/models/operations/listserviceaccountapikeys.d.ts.map +1 -1
  76. package/dist/commonjs/models/operations/listserviceaccountapikeys.js +6 -0
  77. package/dist/commonjs/models/operations/listserviceaccountapikeys.js.map +1 -1
  78. package/dist/commonjs/models/operations/reissueownerkey.d.ts +6 -0
  79. package/dist/commonjs/models/operations/reissueownerkey.d.ts.map +1 -1
  80. package/dist/commonjs/models/operations/reissueownerkey.js +6 -0
  81. package/dist/commonjs/models/operations/reissueownerkey.js.map +1 -1
  82. package/dist/commonjs/models/operations/settenantresourcepolicy.d.ts +39 -0
  83. package/dist/commonjs/models/operations/settenantresourcepolicy.d.ts.map +1 -0
  84. package/dist/commonjs/models/operations/settenantresourcepolicy.js +90 -0
  85. package/dist/commonjs/models/operations/settenantresourcepolicy.js.map +1 -0
  86. package/dist/commonjs/models/operations/updatescopedapikey.d.ts +6 -0
  87. package/dist/commonjs/models/operations/updatescopedapikey.d.ts.map +1 -1
  88. package/dist/commonjs/models/operations/updatescopedapikey.js +6 -0
  89. package/dist/commonjs/models/operations/updatescopedapikey.js.map +1 -1
  90. package/dist/commonjs/react-query/index.d.ts +3 -0
  91. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  92. package/dist/commonjs/react-query/index.js +3 -0
  93. package/dist/commonjs/react-query/index.js.map +1 -1
  94. package/dist/commonjs/react-query/llmModelsGetQuota.core.d.ts +16 -0
  95. package/dist/commonjs/react-query/llmModelsGetQuota.core.d.ts.map +1 -0
  96. package/dist/commonjs/react-query/llmModelsGetQuota.core.js +38 -0
  97. package/dist/commonjs/react-query/llmModelsGetQuota.core.js.map +1 -0
  98. package/dist/commonjs/react-query/llmModelsGetQuota.d.ts +42 -0
  99. package/dist/commonjs/react-query/llmModelsGetQuota.d.ts.map +1 -0
  100. package/dist/commonjs/react-query/llmModelsGetQuota.js +60 -0
  101. package/dist/commonjs/react-query/llmModelsGetQuota.js.map +1 -0
  102. package/dist/commonjs/react-query/sessionsGetTenantResourcePolicy.core.d.ts +17 -0
  103. package/dist/commonjs/react-query/sessionsGetTenantResourcePolicy.core.d.ts.map +1 -0
  104. package/dist/commonjs/react-query/sessionsGetTenantResourcePolicy.core.js +44 -0
  105. package/dist/commonjs/react-query/sessionsGetTenantResourcePolicy.core.js.map +1 -0
  106. package/dist/commonjs/react-query/sessionsGetTenantResourcePolicy.d.ts +37 -0
  107. package/dist/commonjs/react-query/sessionsGetTenantResourcePolicy.d.ts.map +1 -0
  108. package/dist/commonjs/react-query/sessionsGetTenantResourcePolicy.js +59 -0
  109. package/dist/commonjs/react-query/sessionsGetTenantResourcePolicy.js.map +1 -0
  110. package/dist/commonjs/react-query/sessionsSetTenantResourcePolicy.d.ts +27 -0
  111. package/dist/commonjs/react-query/sessionsSetTenantResourcePolicy.d.ts.map +1 -0
  112. package/dist/commonjs/react-query/sessionsSetTenantResourcePolicy.js +44 -0
  113. package/dist/commonjs/react-query/sessionsSetTenantResourcePolicy.js.map +1 -0
  114. package/dist/commonjs/sdk/models.d.ts +7 -0
  115. package/dist/commonjs/sdk/models.d.ts.map +1 -1
  116. package/dist/commonjs/sdk/models.js +10 -0
  117. package/dist/commonjs/sdk/models.js.map +1 -1
  118. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  119. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  120. package/dist/commonjs/sdk/sdk.js +4 -0
  121. package/dist/commonjs/sdk/sdk.js.map +1 -1
  122. package/dist/commonjs/sdk/sessions.d.ts +14 -0
  123. package/dist/commonjs/sdk/sessions.d.ts.map +1 -0
  124. package/dist/commonjs/sdk/sessions.js +26 -0
  125. package/dist/commonjs/sdk/sessions.js.map +1 -0
  126. package/dist/esm/funcs/llmModelsGetQuota.d.ts +19 -0
  127. package/dist/esm/funcs/llmModelsGetQuota.d.ts.map +1 -0
  128. package/dist/esm/funcs/llmModelsGetQuota.js +102 -0
  129. package/dist/esm/funcs/llmModelsGetQuota.js.map +1 -0
  130. package/dist/esm/funcs/sessionsGetTenantResourcePolicy.d.ts +18 -0
  131. package/dist/esm/funcs/sessionsGetTenantResourcePolicy.d.ts.map +1 -0
  132. package/dist/esm/funcs/sessionsGetTenantResourcePolicy.js +104 -0
  133. package/dist/esm/funcs/sessionsGetTenantResourcePolicy.js.map +1 -0
  134. package/dist/esm/funcs/sessionsSetTenantResourcePolicy.d.ts +18 -0
  135. package/dist/esm/funcs/sessionsSetTenantResourcePolicy.d.ts.map +1 -0
  136. package/dist/esm/funcs/sessionsSetTenantResourcePolicy.js +107 -0
  137. package/dist/esm/funcs/sessionsSetTenantResourcePolicy.js.map +1 -0
  138. package/dist/esm/lib/config.d.ts +2 -2
  139. package/dist/esm/lib/config.js +2 -2
  140. package/dist/esm/mcp-server/mcp-server.js +1 -1
  141. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  142. package/dist/esm/mcp-server/server.js +7 -1
  143. package/dist/esm/mcp-server/server.js.map +1 -1
  144. package/dist/esm/mcp-server/tools/llmModelsGetQuota.d.ts +8 -0
  145. package/dist/esm/mcp-server/tools/llmModelsGetQuota.d.ts.map +1 -0
  146. package/dist/esm/mcp-server/tools/llmModelsGetQuota.js +28 -0
  147. package/dist/esm/mcp-server/tools/llmModelsGetQuota.js.map +1 -0
  148. package/dist/esm/mcp-server/tools/sessionsGetTenantResourcePolicy.d.ts +8 -0
  149. package/dist/esm/mcp-server/tools/sessionsGetTenantResourcePolicy.d.ts.map +1 -0
  150. package/dist/esm/mcp-server/tools/sessionsGetTenantResourcePolicy.js +26 -0
  151. package/dist/esm/mcp-server/tools/sessionsGetTenantResourcePolicy.js.map +1 -0
  152. package/dist/esm/mcp-server/tools/sessionsSetTenantResourcePolicy.d.ts +8 -0
  153. package/dist/esm/mcp-server/tools/sessionsSetTenantResourcePolicy.d.ts.map +1 -0
  154. package/dist/esm/mcp-server/tools/sessionsSetTenantResourcePolicy.js +26 -0
  155. package/dist/esm/mcp-server/tools/sessionsSetTenantResourcePolicy.js.map +1 -0
  156. package/dist/esm/models/components/index.d.ts +2 -0
  157. package/dist/esm/models/components/index.d.ts.map +1 -1
  158. package/dist/esm/models/components/index.js +2 -0
  159. package/dist/esm/models/components/index.js.map +1 -1
  160. package/dist/esm/models/components/responsescreaterequest.d.ts +5 -0
  161. package/dist/esm/models/components/responsescreaterequest.d.ts.map +1 -1
  162. package/dist/esm/models/components/responsescreaterequest.js +4 -0
  163. package/dist/esm/models/components/responsescreaterequest.js.map +1 -1
  164. package/dist/esm/models/components/savetenantresourcepolicy.d.ts +43 -0
  165. package/dist/esm/models/components/savetenantresourcepolicy.d.ts.map +1 -0
  166. package/dist/esm/models/components/savetenantresourcepolicy.js +62 -0
  167. package/dist/esm/models/components/savetenantresourcepolicy.js.map +1 -0
  168. package/dist/esm/models/components/tenantresourcepolicy.d.ts +43 -0
  169. package/dist/esm/models/components/tenantresourcepolicy.d.ts.map +1 -0
  170. package/dist/esm/models/components/tenantresourcepolicy.js +58 -0
  171. package/dist/esm/models/components/tenantresourcepolicy.js.map +1 -0
  172. package/dist/esm/models/operations/acceptclusterinvite.d.ts +6 -0
  173. package/dist/esm/models/operations/acceptclusterinvite.d.ts.map +1 -1
  174. package/dist/esm/models/operations/acceptclusterinvite.js +6 -0
  175. package/dist/esm/models/operations/acceptclusterinvite.js.map +1 -1
  176. package/dist/esm/models/operations/createscopedapikey.d.ts +6 -0
  177. package/dist/esm/models/operations/createscopedapikey.d.ts.map +1 -1
  178. package/dist/esm/models/operations/createscopedapikey.js +6 -0
  179. package/dist/esm/models/operations/createscopedapikey.js.map +1 -1
  180. package/dist/esm/models/operations/getmodelquota.d.ts +83 -0
  181. package/dist/esm/models/operations/getmodelquota.d.ts.map +1 -0
  182. package/dist/esm/models/operations/getmodelquota.js +111 -0
  183. package/dist/esm/models/operations/getmodelquota.js.map +1 -0
  184. package/dist/esm/models/operations/gettenantresourcepolicy.d.ts +36 -0
  185. package/dist/esm/models/operations/gettenantresourcepolicy.d.ts.map +1 -0
  186. package/dist/esm/models/operations/gettenantresourcepolicy.js +47 -0
  187. package/dist/esm/models/operations/gettenantresourcepolicy.js.map +1 -0
  188. package/dist/esm/models/operations/index.d.ts +3 -0
  189. package/dist/esm/models/operations/index.d.ts.map +1 -1
  190. package/dist/esm/models/operations/index.js +3 -0
  191. package/dist/esm/models/operations/index.js.map +1 -1
  192. package/dist/esm/models/operations/listscopedapikeys.d.ts +6 -0
  193. package/dist/esm/models/operations/listscopedapikeys.d.ts.map +1 -1
  194. package/dist/esm/models/operations/listscopedapikeys.js +6 -0
  195. package/dist/esm/models/operations/listscopedapikeys.js.map +1 -1
  196. package/dist/esm/models/operations/listserviceaccountapikeys.d.ts +6 -0
  197. package/dist/esm/models/operations/listserviceaccountapikeys.d.ts.map +1 -1
  198. package/dist/esm/models/operations/listserviceaccountapikeys.js +6 -0
  199. package/dist/esm/models/operations/listserviceaccountapikeys.js.map +1 -1
  200. package/dist/esm/models/operations/reissueownerkey.d.ts +6 -0
  201. package/dist/esm/models/operations/reissueownerkey.d.ts.map +1 -1
  202. package/dist/esm/models/operations/reissueownerkey.js +6 -0
  203. package/dist/esm/models/operations/reissueownerkey.js.map +1 -1
  204. package/dist/esm/models/operations/settenantresourcepolicy.d.ts +39 -0
  205. package/dist/esm/models/operations/settenantresourcepolicy.d.ts.map +1 -0
  206. package/dist/esm/models/operations/settenantresourcepolicy.js +52 -0
  207. package/dist/esm/models/operations/settenantresourcepolicy.js.map +1 -0
  208. package/dist/esm/models/operations/updatescopedapikey.d.ts +6 -0
  209. package/dist/esm/models/operations/updatescopedapikey.d.ts.map +1 -1
  210. package/dist/esm/models/operations/updatescopedapikey.js +6 -0
  211. package/dist/esm/models/operations/updatescopedapikey.js.map +1 -1
  212. package/dist/esm/react-query/index.d.ts +3 -0
  213. package/dist/esm/react-query/index.d.ts.map +1 -1
  214. package/dist/esm/react-query/index.js +3 -0
  215. package/dist/esm/react-query/index.js.map +1 -1
  216. package/dist/esm/react-query/llmModelsGetQuota.core.d.ts +16 -0
  217. package/dist/esm/react-query/llmModelsGetQuota.core.d.ts.map +1 -0
  218. package/dist/esm/react-query/llmModelsGetQuota.core.js +33 -0
  219. package/dist/esm/react-query/llmModelsGetQuota.core.js.map +1 -0
  220. package/dist/esm/react-query/llmModelsGetQuota.d.ts +42 -0
  221. package/dist/esm/react-query/llmModelsGetQuota.d.ts.map +1 -0
  222. package/dist/esm/react-query/llmModelsGetQuota.js +50 -0
  223. package/dist/esm/react-query/llmModelsGetQuota.js.map +1 -0
  224. package/dist/esm/react-query/sessionsGetTenantResourcePolicy.core.d.ts +17 -0
  225. package/dist/esm/react-query/sessionsGetTenantResourcePolicy.core.d.ts.map +1 -0
  226. package/dist/esm/react-query/sessionsGetTenantResourcePolicy.core.js +39 -0
  227. package/dist/esm/react-query/sessionsGetTenantResourcePolicy.core.js.map +1 -0
  228. package/dist/esm/react-query/sessionsGetTenantResourcePolicy.d.ts +37 -0
  229. package/dist/esm/react-query/sessionsGetTenantResourcePolicy.d.ts.map +1 -0
  230. package/dist/esm/react-query/sessionsGetTenantResourcePolicy.js +49 -0
  231. package/dist/esm/react-query/sessionsGetTenantResourcePolicy.js.map +1 -0
  232. package/dist/esm/react-query/sessionsSetTenantResourcePolicy.d.ts +27 -0
  233. package/dist/esm/react-query/sessionsSetTenantResourcePolicy.d.ts.map +1 -0
  234. package/dist/esm/react-query/sessionsSetTenantResourcePolicy.js +39 -0
  235. package/dist/esm/react-query/sessionsSetTenantResourcePolicy.js.map +1 -0
  236. package/dist/esm/sdk/models.d.ts +7 -0
  237. package/dist/esm/sdk/models.d.ts.map +1 -1
  238. package/dist/esm/sdk/models.js +10 -0
  239. package/dist/esm/sdk/models.js.map +1 -1
  240. package/dist/esm/sdk/sdk.d.ts +3 -0
  241. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  242. package/dist/esm/sdk/sdk.js +4 -0
  243. package/dist/esm/sdk/sdk.js.map +1 -1
  244. package/dist/esm/sdk/sessions.d.ts +14 -0
  245. package/dist/esm/sdk/sessions.d.ts.map +1 -0
  246. package/dist/esm/sdk/sessions.js +22 -0
  247. package/dist/esm/sdk/sessions.js.map +1 -0
  248. package/jsr.json +1 -1
  249. package/package.json +1 -1
  250. package/src/funcs/llmModelsGetQuota.ts +190 -0
  251. package/src/funcs/sessionsGetTenantResourcePolicy.ts +200 -0
  252. package/src/funcs/sessionsSetTenantResourcePolicy.ts +203 -0
  253. package/src/lib/config.ts +2 -2
  254. package/src/mcp-server/mcp-server.ts +1 -1
  255. package/src/mcp-server/server.ts +7 -1
  256. package/src/mcp-server/tools/llmModelsGetQuota.ts +37 -0
  257. package/src/mcp-server/tools/sessionsGetTenantResourcePolicy.ts +36 -0
  258. package/src/mcp-server/tools/sessionsSetTenantResourcePolicy.ts +36 -0
  259. package/src/models/components/index.ts +2 -0
  260. package/src/models/components/responsescreaterequest.ts +9 -0
  261. package/src/models/components/savetenantresourcepolicy.ts +118 -0
  262. package/src/models/components/tenantresourcepolicy.ts +104 -0
  263. package/src/models/operations/acceptclusterinvite.ts +12 -0
  264. package/src/models/operations/createscopedapikey.ts +12 -0
  265. package/src/models/operations/getmodelquota.ts +229 -0
  266. package/src/models/operations/gettenantresourcepolicy.ts +100 -0
  267. package/src/models/operations/index.ts +3 -0
  268. package/src/models/operations/listscopedapikeys.ts +12 -0
  269. package/src/models/operations/listserviceaccountapikeys.ts +12 -0
  270. package/src/models/operations/reissueownerkey.ts +12 -0
  271. package/src/models/operations/settenantresourcepolicy.ts +107 -0
  272. package/src/models/operations/updatescopedapikey.ts +12 -0
  273. package/src/react-query/index.ts +3 -0
  274. package/src/react-query/llmModelsGetQuota.core.ts +81 -0
  275. package/src/react-query/llmModelsGetQuota.ts +149 -0
  276. package/src/react-query/sessionsGetTenantResourcePolicy.core.ts +89 -0
  277. package/src/react-query/sessionsGetTenantResourcePolicy.ts +156 -0
  278. package/src/react-query/sessionsSetTenantResourcePolicy.ts +109 -0
  279. package/src/sdk/models.ts +18 -0
  280. package/src/sdk/sdk.ts +6 -0
  281. package/src/sdk/sessions.ts +40 -0
@@ -0,0 +1,100 @@
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 { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export const GetTenantResourcePolicyPathParamScope = {
13
+ Organization: "organization",
14
+ Team: "team",
15
+ } as const;
16
+ export type GetTenantResourcePolicyPathParamScope = ClosedEnum<
17
+ typeof GetTenantResourcePolicyPathParamScope
18
+ >;
19
+
20
+ export type GetTenantResourcePolicyRequest = {
21
+ scope: GetTenantResourcePolicyPathParamScope;
22
+ expectedOrganizationId: string;
23
+ expectedTeamId: string;
24
+ /**
25
+ * Optional external end-user identifier forwarded by the API gateway.
26
+ */
27
+ xOnBehalfOf?: string | undefined;
28
+ };
29
+
30
+ /** @internal */
31
+ export const GetTenantResourcePolicyPathParamScope$inboundSchema:
32
+ z.ZodNativeEnum<typeof GetTenantResourcePolicyPathParamScope> = z.nativeEnum(
33
+ GetTenantResourcePolicyPathParamScope,
34
+ );
35
+ /** @internal */
36
+ export const GetTenantResourcePolicyPathParamScope$outboundSchema:
37
+ z.ZodNativeEnum<typeof GetTenantResourcePolicyPathParamScope> =
38
+ GetTenantResourcePolicyPathParamScope$inboundSchema;
39
+
40
+ /** @internal */
41
+ export const GetTenantResourcePolicyRequest$inboundSchema: z.ZodType<
42
+ GetTenantResourcePolicyRequest,
43
+ z.ZodTypeDef,
44
+ unknown
45
+ > = z.object({
46
+ scope: GetTenantResourcePolicyPathParamScope$inboundSchema,
47
+ expected_organization_id: z.string(),
48
+ expected_team_id: z.string(),
49
+ "X-On-Behalf-Of": z.string().optional(),
50
+ }).transform((v) => {
51
+ return remap$(v, {
52
+ "expected_organization_id": "expectedOrganizationId",
53
+ "expected_team_id": "expectedTeamId",
54
+ "X-On-Behalf-Of": "xOnBehalfOf",
55
+ });
56
+ });
57
+ /** @internal */
58
+ export type GetTenantResourcePolicyRequest$Outbound = {
59
+ scope: string;
60
+ expected_organization_id: string;
61
+ expected_team_id: string;
62
+ "X-On-Behalf-Of"?: string | undefined;
63
+ };
64
+
65
+ /** @internal */
66
+ export const GetTenantResourcePolicyRequest$outboundSchema: z.ZodType<
67
+ GetTenantResourcePolicyRequest$Outbound,
68
+ z.ZodTypeDef,
69
+ GetTenantResourcePolicyRequest
70
+ > = z.object({
71
+ scope: GetTenantResourcePolicyPathParamScope$outboundSchema,
72
+ expectedOrganizationId: z.string(),
73
+ expectedTeamId: z.string(),
74
+ xOnBehalfOf: z.string().optional(),
75
+ }).transform((v) => {
76
+ return remap$(v, {
77
+ expectedOrganizationId: "expected_organization_id",
78
+ expectedTeamId: "expected_team_id",
79
+ xOnBehalfOf: "X-On-Behalf-Of",
80
+ });
81
+ });
82
+
83
+ export function getTenantResourcePolicyRequestToJSON(
84
+ getTenantResourcePolicyRequest: GetTenantResourcePolicyRequest,
85
+ ): string {
86
+ return JSON.stringify(
87
+ GetTenantResourcePolicyRequest$outboundSchema.parse(
88
+ getTenantResourcePolicyRequest,
89
+ ),
90
+ );
91
+ }
92
+ export function getTenantResourcePolicyRequestFromJSON(
93
+ jsonString: string,
94
+ ): SafeParseResult<GetTenantResourcePolicyRequest, SDKValidationError> {
95
+ return safeParse(
96
+ jsonString,
97
+ (x) => GetTenantResourcePolicyRequest$inboundSchema.parse(JSON.parse(x)),
98
+ `Failed to parse 'GetTenantResourcePolicyRequest' from JSON`,
99
+ );
100
+ }
@@ -215,6 +215,7 @@ export * from "./getmcpserver.js";
215
215
  export * from "./getmemoryentry.js";
216
216
  export * from "./getmemorystore.js";
217
217
  export * from "./getmodel.js";
218
+ export * from "./getmodelquota.js";
218
219
  export * from "./getnetworkpolicyaccess.js";
219
220
  export * from "./getorganizationbilling.js";
220
221
  export * from "./getorgbudgets.js";
@@ -247,6 +248,7 @@ export * from "./getteam.js";
247
248
  export * from "./getteambudgets.js";
248
249
  export * from "./getteamdefaultbudgets.js";
249
250
  export * from "./gettenantnetworkpolicy.js";
251
+ export * from "./gettenantresourcepolicy.js";
250
252
  export * from "./gettexttospeechhistory.js";
251
253
  export * from "./gettexttospeechhistorycontent.js";
252
254
  export * from "./getuserbudgets.js";
@@ -404,6 +406,7 @@ export * from "./setsandboxconnectortools.js";
404
406
  export * from "./setteambudget.js";
405
407
  export * from "./setteamdefaultbudget.js";
406
408
  export * from "./settenantnetworkpolicy.js";
409
+ export * from "./settenantresourcepolicy.js";
407
410
  export * from "./setupwhatsappappwebhook.js";
408
411
  export * from "./setuserbudget.js";
409
412
  export * from "./setuserdefaultbudget.js";
@@ -37,6 +37,9 @@ export type ResponseBody = {
37
37
  orgId: string | null;
38
38
  teamId: string | null;
39
39
  scopes: Array<string>;
40
+ rateLimitEnabled?: boolean | null | undefined;
41
+ rateLimitTimeWindow?: number | null | undefined;
42
+ rateLimitMax?: number | null | undefined;
40
43
  expiresAt?: string | null | undefined;
41
44
  };
42
45
 
@@ -118,6 +121,9 @@ export const ResponseBody$inboundSchema: z.ZodType<
118
121
  orgId: z.nullable(z.string()),
119
122
  teamId: z.nullable(z.string()),
120
123
  scopes: z.array(z.string()),
124
+ rateLimitEnabled: z.nullable(z.boolean()).optional(),
125
+ rateLimitTimeWindow: z.nullable(z.number()).optional(),
126
+ rateLimitMax: z.nullable(z.number()).optional(),
121
127
  expiresAt: z.nullable(z.string()).optional(),
122
128
  });
123
129
  /** @internal */
@@ -132,6 +138,9 @@ export type ResponseBody$Outbound = {
132
138
  orgId: string | null;
133
139
  teamId: string | null;
134
140
  scopes: Array<string>;
141
+ rateLimitEnabled?: boolean | null | undefined;
142
+ rateLimitTimeWindow?: number | null | undefined;
143
+ rateLimitMax?: number | null | undefined;
135
144
  expiresAt?: string | null | undefined;
136
145
  };
137
146
 
@@ -151,6 +160,9 @@ export const ResponseBody$outboundSchema: z.ZodType<
151
160
  orgId: z.nullable(z.string()),
152
161
  teamId: z.nullable(z.string()),
153
162
  scopes: z.array(z.string()),
163
+ rateLimitEnabled: z.nullable(z.boolean()).optional(),
164
+ rateLimitTimeWindow: z.nullable(z.number()).optional(),
165
+ rateLimitMax: z.nullable(z.number()).optional(),
154
166
  expiresAt: z.nullable(z.string()).optional(),
155
167
  });
156
168
 
@@ -37,6 +37,9 @@ export type ListServiceAccountApiKeysResponseBody = {
37
37
  orgId: string | null;
38
38
  teamId: string | null;
39
39
  scopes: Array<string>;
40
+ rateLimitEnabled?: boolean | null | undefined;
41
+ rateLimitTimeWindow?: number | null | undefined;
42
+ rateLimitMax?: number | null | undefined;
40
43
  expiresAt?: string | null | undefined;
41
44
  };
42
45
 
@@ -120,6 +123,9 @@ export const ListServiceAccountApiKeysResponseBody$inboundSchema: z.ZodType<
120
123
  orgId: z.nullable(z.string()),
121
124
  teamId: z.nullable(z.string()),
122
125
  scopes: z.array(z.string()),
126
+ rateLimitEnabled: z.nullable(z.boolean()).optional(),
127
+ rateLimitTimeWindow: z.nullable(z.number()).optional(),
128
+ rateLimitMax: z.nullable(z.number()).optional(),
123
129
  expiresAt: z.nullable(z.string()).optional(),
124
130
  });
125
131
  /** @internal */
@@ -134,6 +140,9 @@ export type ListServiceAccountApiKeysResponseBody$Outbound = {
134
140
  orgId: string | null;
135
141
  teamId: string | null;
136
142
  scopes: Array<string>;
143
+ rateLimitEnabled?: boolean | null | undefined;
144
+ rateLimitTimeWindow?: number | null | undefined;
145
+ rateLimitMax?: number | null | undefined;
137
146
  expiresAt?: string | null | undefined;
138
147
  };
139
148
 
@@ -153,6 +162,9 @@ export const ListServiceAccountApiKeysResponseBody$outboundSchema: z.ZodType<
153
162
  orgId: z.nullable(z.string()),
154
163
  teamId: z.nullable(z.string()),
155
164
  scopes: z.array(z.string()),
165
+ rateLimitEnabled: z.nullable(z.boolean()).optional(),
166
+ rateLimitTimeWindow: z.nullable(z.number()).optional(),
167
+ rateLimitMax: z.nullable(z.number()).optional(),
156
168
  expiresAt: z.nullable(z.string()).optional(),
157
169
  });
158
170
 
@@ -42,6 +42,9 @@ export type ApiKey = {
42
42
  orgId: string | null;
43
43
  teamId: string | null;
44
44
  scopes: Array<string>;
45
+ rateLimitEnabled?: boolean | null | undefined;
46
+ rateLimitTimeWindow?: number | null | undefined;
47
+ rateLimitMax?: number | null | undefined;
45
48
  expiresAt?: string | null | undefined;
46
49
  };
47
50
 
@@ -175,6 +178,9 @@ export const ApiKey$inboundSchema: z.ZodType<ApiKey, z.ZodTypeDef, unknown> = z
175
178
  orgId: z.nullable(z.string()),
176
179
  teamId: z.nullable(z.string()),
177
180
  scopes: z.array(z.string()),
181
+ rateLimitEnabled: z.nullable(z.boolean()).optional(),
182
+ rateLimitTimeWindow: z.nullable(z.number()).optional(),
183
+ rateLimitMax: z.nullable(z.number()).optional(),
178
184
  expiresAt: z.nullable(z.string()).optional(),
179
185
  });
180
186
  /** @internal */
@@ -189,6 +195,9 @@ export type ApiKey$Outbound = {
189
195
  orgId: string | null;
190
196
  teamId: string | null;
191
197
  scopes: Array<string>;
198
+ rateLimitEnabled?: boolean | null | undefined;
199
+ rateLimitTimeWindow?: number | null | undefined;
200
+ rateLimitMax?: number | null | undefined;
192
201
  expiresAt?: string | null | undefined;
193
202
  };
194
203
 
@@ -208,6 +217,9 @@ export const ApiKey$outboundSchema: z.ZodType<
208
217
  orgId: z.nullable(z.string()),
209
218
  teamId: z.nullable(z.string()),
210
219
  scopes: z.array(z.string()),
220
+ rateLimitEnabled: z.nullable(z.boolean()).optional(),
221
+ rateLimitTimeWindow: z.nullable(z.number()).optional(),
222
+ rateLimitMax: z.nullable(z.number()).optional(),
211
223
  expiresAt: z.nullable(z.string()).optional(),
212
224
  });
213
225
 
@@ -0,0 +1,107 @@
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 { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import * as components from "../components/index.js";
11
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
+
13
+ export const SetTenantResourcePolicyPathParamScope = {
14
+ Organization: "organization",
15
+ Team: "team",
16
+ } as const;
17
+ export type SetTenantResourcePolicyPathParamScope = ClosedEnum<
18
+ typeof SetTenantResourcePolicyPathParamScope
19
+ >;
20
+
21
+ export type SetTenantResourcePolicyRequest = {
22
+ scope: SetTenantResourcePolicyPathParamScope;
23
+ expectedOrganizationId: string;
24
+ expectedTeamId: string;
25
+ /**
26
+ * Optional external end-user identifier forwarded by the API gateway.
27
+ */
28
+ xOnBehalfOf?: string | undefined;
29
+ saveTenantResourcePolicy: components.SaveTenantResourcePolicy;
30
+ };
31
+
32
+ /** @internal */
33
+ export const SetTenantResourcePolicyPathParamScope$inboundSchema:
34
+ z.ZodNativeEnum<typeof SetTenantResourcePolicyPathParamScope> = z.nativeEnum(
35
+ SetTenantResourcePolicyPathParamScope,
36
+ );
37
+ /** @internal */
38
+ export const SetTenantResourcePolicyPathParamScope$outboundSchema:
39
+ z.ZodNativeEnum<typeof SetTenantResourcePolicyPathParamScope> =
40
+ SetTenantResourcePolicyPathParamScope$inboundSchema;
41
+
42
+ /** @internal */
43
+ export const SetTenantResourcePolicyRequest$inboundSchema: z.ZodType<
44
+ SetTenantResourcePolicyRequest,
45
+ z.ZodTypeDef,
46
+ unknown
47
+ > = z.object({
48
+ scope: SetTenantResourcePolicyPathParamScope$inboundSchema,
49
+ expected_organization_id: z.string(),
50
+ expected_team_id: z.string(),
51
+ "X-On-Behalf-Of": z.string().optional(),
52
+ SaveTenantResourcePolicy: components.SaveTenantResourcePolicy$inboundSchema,
53
+ }).transform((v) => {
54
+ return remap$(v, {
55
+ "expected_organization_id": "expectedOrganizationId",
56
+ "expected_team_id": "expectedTeamId",
57
+ "X-On-Behalf-Of": "xOnBehalfOf",
58
+ "SaveTenantResourcePolicy": "saveTenantResourcePolicy",
59
+ });
60
+ });
61
+ /** @internal */
62
+ export type SetTenantResourcePolicyRequest$Outbound = {
63
+ scope: string;
64
+ expected_organization_id: string;
65
+ expected_team_id: string;
66
+ "X-On-Behalf-Of"?: string | undefined;
67
+ SaveTenantResourcePolicy: components.SaveTenantResourcePolicy$Outbound;
68
+ };
69
+
70
+ /** @internal */
71
+ export const SetTenantResourcePolicyRequest$outboundSchema: z.ZodType<
72
+ SetTenantResourcePolicyRequest$Outbound,
73
+ z.ZodTypeDef,
74
+ SetTenantResourcePolicyRequest
75
+ > = z.object({
76
+ scope: SetTenantResourcePolicyPathParamScope$outboundSchema,
77
+ expectedOrganizationId: z.string(),
78
+ expectedTeamId: z.string(),
79
+ xOnBehalfOf: z.string().optional(),
80
+ saveTenantResourcePolicy: components.SaveTenantResourcePolicy$outboundSchema,
81
+ }).transform((v) => {
82
+ return remap$(v, {
83
+ expectedOrganizationId: "expected_organization_id",
84
+ expectedTeamId: "expected_team_id",
85
+ xOnBehalfOf: "X-On-Behalf-Of",
86
+ saveTenantResourcePolicy: "SaveTenantResourcePolicy",
87
+ });
88
+ });
89
+
90
+ export function setTenantResourcePolicyRequestToJSON(
91
+ setTenantResourcePolicyRequest: SetTenantResourcePolicyRequest,
92
+ ): string {
93
+ return JSON.stringify(
94
+ SetTenantResourcePolicyRequest$outboundSchema.parse(
95
+ setTenantResourcePolicyRequest,
96
+ ),
97
+ );
98
+ }
99
+ export function setTenantResourcePolicyRequestFromJSON(
100
+ jsonString: string,
101
+ ): SafeParseResult<SetTenantResourcePolicyRequest, SDKValidationError> {
102
+ return safeParse(
103
+ jsonString,
104
+ (x) => SetTenantResourcePolicyRequest$inboundSchema.parse(JSON.parse(x)),
105
+ `Failed to parse 'SetTenantResourcePolicyRequest' from JSON`,
106
+ );
107
+ }
@@ -48,6 +48,9 @@ export type UpdateScopedApiKeyResponseBody = {
48
48
  orgId: string | null;
49
49
  teamId: string | null;
50
50
  scopes: Array<string>;
51
+ rateLimitEnabled?: boolean | null | undefined;
52
+ rateLimitTimeWindow?: number | null | undefined;
53
+ rateLimitMax?: number | null | undefined;
51
54
  expiresAt?: string | null | undefined;
52
55
  };
53
56
 
@@ -186,6 +189,9 @@ export const UpdateScopedApiKeyResponseBody$inboundSchema: z.ZodType<
186
189
  orgId: z.nullable(z.string()),
187
190
  teamId: z.nullable(z.string()),
188
191
  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(),
189
195
  expiresAt: z.nullable(z.string()).optional(),
190
196
  });
191
197
  /** @internal */
@@ -200,6 +206,9 @@ export type UpdateScopedApiKeyResponseBody$Outbound = {
200
206
  orgId: string | null;
201
207
  teamId: string | null;
202
208
  scopes: Array<string>;
209
+ rateLimitEnabled?: boolean | null | undefined;
210
+ rateLimitTimeWindow?: number | null | undefined;
211
+ rateLimitMax?: number | null | undefined;
203
212
  expiresAt?: string | null | undefined;
204
213
  };
205
214
 
@@ -219,6 +228,9 @@ export const UpdateScopedApiKeyResponseBody$outboundSchema: z.ZodType<
219
228
  orgId: z.nullable(z.string()),
220
229
  teamId: z.nullable(z.string()),
221
230
  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(),
222
234
  expiresAt: z.nullable(z.string()).optional(),
223
235
  });
224
236
 
@@ -338,6 +338,7 @@ export * from "./llmModelsDeleteCatalogEntry.js";
338
338
  export * from "./llmModelsDeleteOrgAutoModel.js";
339
339
  export * from "./llmModelsGet.js";
340
340
  export * from "./llmModelsGetClusterCurrency.js";
341
+ export * from "./llmModelsGetQuota.js";
341
342
  export * from "./llmModelsList.js";
342
343
  export * from "./llmModelsListCatalog.js";
343
344
  export * from "./llmModelsListCatalogModelAccess.js";
@@ -477,6 +478,8 @@ export * from "./sandboxUploadArchive.js";
477
478
  export * from "./sandboxUploadFile.js";
478
479
  export * from "./sessionExchangeSessionToken.js";
479
480
  export * from "./sessionGetPendingInvitation.js";
481
+ export * from "./sessionsGetTenantResourcePolicy.js";
482
+ export * from "./sessionsSetTenantResourcePolicy.js";
480
483
  export * from "./trackingExperimentsCreate.js";
481
484
  export * from "./trackingExperimentsDelete.js";
482
485
  export * from "./trackingExperimentsGet.js";
@@ -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 { llmModelsGetQuota } from "../funcs/llmModelsGetQuota.js";
12
+ import { combineSignals } from "../lib/primitives.js";
13
+ import { RequestOptions } from "../lib/sdks.js";
14
+ import * as operations from "../models/operations/index.js";
15
+ import { unwrapAsync } from "../types/fp.js";
16
+ export type LlmModelsGetQuotaQueryData = operations.GetModelQuotaResponseBody;
17
+
18
+ export function prefetchLlmModelsGetQuota(
19
+ queryClient: QueryClient,
20
+ client$: SDKCore,
21
+ request: operations.GetModelQuotaRequest,
22
+ options?: RequestOptions,
23
+ ): Promise<void> {
24
+ return queryClient.prefetchQuery({
25
+ ...buildLlmModelsGetQuotaQuery(
26
+ client$,
27
+ request,
28
+ options,
29
+ ),
30
+ });
31
+ }
32
+
33
+ export function buildLlmModelsGetQuotaQuery(
34
+ client$: SDKCore,
35
+ request: operations.GetModelQuotaRequest,
36
+ options?: RequestOptions,
37
+ ): {
38
+ queryKey: QueryKey;
39
+ queryFn: (
40
+ context: QueryFunctionContext,
41
+ ) => Promise<LlmModelsGetQuotaQueryData>;
42
+ } {
43
+ return {
44
+ queryKey: queryKeyLlmModelsGetQuota(request.modelId, {
45
+ apiKeyId: request.apiKeyId,
46
+ serviceAccountId: request.serviceAccountId,
47
+ xOnBehalfOf: request.xOnBehalfOf,
48
+ }),
49
+ queryFn: async function llmModelsGetQuotaQueryFn(
50
+ ctx,
51
+ ): Promise<LlmModelsGetQuotaQueryData> {
52
+ const sig = combineSignals(
53
+ ctx.signal,
54
+ options?.signal,
55
+ options?.fetchOptions?.signal,
56
+ );
57
+ const mergedOptions = {
58
+ ...options?.fetchOptions,
59
+ ...options,
60
+ signal: sig,
61
+ };
62
+
63
+ return unwrapAsync(llmModelsGetQuota(
64
+ client$,
65
+ request,
66
+ mergedOptions,
67
+ ));
68
+ },
69
+ };
70
+ }
71
+
72
+ export function queryKeyLlmModelsGetQuota(
73
+ modelId: string,
74
+ parameters: {
75
+ apiKeyId?: string | undefined;
76
+ serviceAccountId?: string | undefined;
77
+ xOnBehalfOf?: string | undefined;
78
+ },
79
+ ): QueryKey {
80
+ return ["@meetkai/mka1", "models", "getQuota", modelId, parameters];
81
+ }
@@ -0,0 +1,149 @@
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 { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
21
+ import { SDKError } from "../models/errors/sdkerror.js";
22
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
23
+ import * as operations from "../models/operations/index.js";
24
+ import { useSDKContext } from "./_context.js";
25
+ import {
26
+ QueryHookOptions,
27
+ SuspenseQueryHookOptions,
28
+ TupleToPrefixes,
29
+ } from "./_types.js";
30
+ import {
31
+ buildLlmModelsGetQuotaQuery,
32
+ LlmModelsGetQuotaQueryData,
33
+ prefetchLlmModelsGetQuota,
34
+ queryKeyLlmModelsGetQuota,
35
+ } from "./llmModelsGetQuota.core.js";
36
+ export {
37
+ buildLlmModelsGetQuotaQuery,
38
+ type LlmModelsGetQuotaQueryData,
39
+ prefetchLlmModelsGetQuota,
40
+ queryKeyLlmModelsGetQuota,
41
+ };
42
+
43
+ export type LlmModelsGetQuotaQueryError =
44
+ | SDKError
45
+ | ResponseValidationError
46
+ | ConnectionError
47
+ | RequestAbortedError
48
+ | RequestTimeoutError
49
+ | InvalidRequestError
50
+ | UnexpectedClientError
51
+ | SDKValidationError;
52
+
53
+ /**
54
+ * Read a model's token quota
55
+ *
56
+ * @remarks
57
+ * Read current tokens-per-minute limits without consuming tokens or starting a window. Use a concrete active model, not auto. Omit selectors for the authenticated caller's context, including its delegated external user. Human sessions may select an authorized api_key_id, plus service_account_id for a service-account key; selected keys use their ordinary, non-delegated context. Scopes with missing subject identities are omitted to avoid exposing shared fallback usage; their enforcement is unchanged. An empty limits array means no reportable token rules for this context. Untouched windows have reset_at: null; unavailable counters return 503.
58
+ */
59
+ export function useLlmModelsGetQuota(
60
+ request: operations.GetModelQuotaRequest,
61
+ options?: QueryHookOptions<
62
+ LlmModelsGetQuotaQueryData,
63
+ LlmModelsGetQuotaQueryError
64
+ >,
65
+ ): UseQueryResult<LlmModelsGetQuotaQueryData, LlmModelsGetQuotaQueryError> {
66
+ const client = useSDKContext();
67
+ return useQuery({
68
+ ...buildLlmModelsGetQuotaQuery(
69
+ client,
70
+ request,
71
+ options,
72
+ ),
73
+ ...options,
74
+ });
75
+ }
76
+
77
+ /**
78
+ * Read a model's token quota
79
+ *
80
+ * @remarks
81
+ * Read current tokens-per-minute limits without consuming tokens or starting a window. Use a concrete active model, not auto. Omit selectors for the authenticated caller's context, including its delegated external user. Human sessions may select an authorized api_key_id, plus service_account_id for a service-account key; selected keys use their ordinary, non-delegated context. Scopes with missing subject identities are omitted to avoid exposing shared fallback usage; their enforcement is unchanged. An empty limits array means no reportable token rules for this context. Untouched windows have reset_at: null; unavailable counters return 503.
82
+ */
83
+ export function useLlmModelsGetQuotaSuspense(
84
+ request: operations.GetModelQuotaRequest,
85
+ options?: SuspenseQueryHookOptions<
86
+ LlmModelsGetQuotaQueryData,
87
+ LlmModelsGetQuotaQueryError
88
+ >,
89
+ ): UseSuspenseQueryResult<
90
+ LlmModelsGetQuotaQueryData,
91
+ LlmModelsGetQuotaQueryError
92
+ > {
93
+ const client = useSDKContext();
94
+ return useSuspenseQuery({
95
+ ...buildLlmModelsGetQuotaQuery(
96
+ client,
97
+ request,
98
+ options,
99
+ ),
100
+ ...options,
101
+ });
102
+ }
103
+
104
+ export function setLlmModelsGetQuotaData(
105
+ client: QueryClient,
106
+ queryKeyBase: [
107
+ modelId: string,
108
+ parameters: {
109
+ apiKeyId?: string | undefined;
110
+ serviceAccountId?: string | undefined;
111
+ xOnBehalfOf?: string | undefined;
112
+ },
113
+ ],
114
+ data: LlmModelsGetQuotaQueryData,
115
+ ): LlmModelsGetQuotaQueryData | undefined {
116
+ const key = queryKeyLlmModelsGetQuota(...queryKeyBase);
117
+
118
+ return client.setQueryData<LlmModelsGetQuotaQueryData>(key, data);
119
+ }
120
+
121
+ export function invalidateLlmModelsGetQuota(
122
+ client: QueryClient,
123
+ queryKeyBase: TupleToPrefixes<
124
+ [
125
+ modelId: string,
126
+ parameters: {
127
+ apiKeyId?: string | undefined;
128
+ serviceAccountId?: string | undefined;
129
+ xOnBehalfOf?: string | undefined;
130
+ },
131
+ ]
132
+ >,
133
+ filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
134
+ ): Promise<void> {
135
+ return client.invalidateQueries({
136
+ ...filters,
137
+ queryKey: ["@meetkai/mka1", "models", "getQuota", ...queryKeyBase],
138
+ });
139
+ }
140
+
141
+ export function invalidateAllLlmModelsGetQuota(
142
+ client: QueryClient,
143
+ filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
144
+ ): Promise<void> {
145
+ return client.invalidateQueries({
146
+ ...filters,
147
+ queryKey: ["@meetkai/mka1", "models", "getQuota"],
148
+ });
149
+ }