@launchdarkly/mcp-server 0.4.1 → 0.5.0

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 (368) hide show
  1. package/README.md +81 -0
  2. package/_speakeasy/.github/action-inputs-config.json +53 -0
  3. package/_speakeasy/.github/action-security-config.json +88 -0
  4. package/bin/mcp-server.js +355 -278
  5. package/bin/mcp-server.js.map +49 -42
  6. package/dist/commonjs/funcs/aiConfigsCreate.js +0 -1
  7. package/dist/commonjs/funcs/aiConfigsCreate.js.map +1 -1
  8. package/dist/commonjs/funcs/aiConfigsCreateVariation.js +0 -1
  9. package/dist/commonjs/funcs/aiConfigsCreateVariation.js.map +1 -1
  10. package/dist/commonjs/funcs/aiConfigsDelete.js +0 -1
  11. package/dist/commonjs/funcs/aiConfigsDelete.js.map +1 -1
  12. package/dist/commonjs/funcs/aiConfigsDeleteVariation.js +0 -1
  13. package/dist/commonjs/funcs/aiConfigsDeleteVariation.js.map +1 -1
  14. package/dist/commonjs/funcs/aiConfigsGet.js +0 -1
  15. package/dist/commonjs/funcs/aiConfigsGet.js.map +1 -1
  16. package/dist/commonjs/funcs/aiConfigsGetTargeting.js +0 -1
  17. package/dist/commonjs/funcs/aiConfigsGetTargeting.js.map +1 -1
  18. package/dist/commonjs/funcs/aiConfigsGetVariation.js +0 -1
  19. package/dist/commonjs/funcs/aiConfigsGetVariation.js.map +1 -1
  20. package/dist/commonjs/funcs/aiConfigsList.js +0 -1
  21. package/dist/commonjs/funcs/aiConfigsList.js.map +1 -1
  22. package/dist/commonjs/funcs/aiConfigsUpdate.js +0 -1
  23. package/dist/commonjs/funcs/aiConfigsUpdate.js.map +1 -1
  24. package/dist/commonjs/funcs/aiConfigsUpdateTargeting.js +0 -1
  25. package/dist/commonjs/funcs/aiConfigsUpdateTargeting.js.map +1 -1
  26. package/dist/commonjs/funcs/aiConfigsUpdateVariation.js +0 -1
  27. package/dist/commonjs/funcs/aiConfigsUpdateVariation.js.map +1 -1
  28. package/dist/commonjs/funcs/featureFlagsPatch.d.ts +1 -1
  29. package/dist/commonjs/funcs/featureFlagsPatch.js +2 -1
  30. package/dist/commonjs/funcs/featureFlagsPatch.js.map +1 -1
  31. package/dist/commonjs/lib/config.d.ts +2 -2
  32. package/dist/commonjs/lib/config.js +2 -2
  33. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  34. package/dist/commonjs/mcp-server/server.js +1 -1
  35. package/dist/commonjs/models/components/aiconfig.d.ts +26 -0
  36. package/dist/commonjs/models/components/aiconfig.d.ts.map +1 -1
  37. package/dist/commonjs/models/components/aiconfig.js +10 -0
  38. package/dist/commonjs/models/components/aiconfig.js.map +1 -1
  39. package/dist/commonjs/models/components/aiconfigdependency.d.ts +69 -0
  40. package/dist/commonjs/models/components/aiconfigdependency.d.ts.map +1 -0
  41. package/dist/commonjs/models/components/aiconfigdependency.js +92 -0
  42. package/dist/commonjs/models/components/aiconfigdependency.js.map +1 -0
  43. package/dist/commonjs/models/components/aiconfigpatch.d.ts +10 -0
  44. package/dist/commonjs/models/components/aiconfigpatch.d.ts.map +1 -1
  45. package/dist/commonjs/models/components/aiconfigpatch.js +4 -0
  46. package/dist/commonjs/models/components/aiconfigpatch.js.map +1 -1
  47. package/dist/commonjs/models/components/aiconfigpost.d.ts +16 -0
  48. package/dist/commonjs/models/components/aiconfigpost.d.ts.map +1 -1
  49. package/dist/commonjs/models/components/aiconfigpost.js +8 -0
  50. package/dist/commonjs/models/components/aiconfigpost.js.map +1 -1
  51. package/dist/commonjs/models/components/aiconfigsmetricdatasourcerefrep.d.ts +35 -0
  52. package/dist/commonjs/models/components/aiconfigsmetricdatasourcerefrep.d.ts.map +1 -0
  53. package/dist/commonjs/models/components/aiconfigsmetricdatasourcerefrep.js +86 -0
  54. package/dist/commonjs/models/components/aiconfigsmetricdatasourcerefrep.js.map +1 -0
  55. package/dist/commonjs/models/components/aiconfigsmetriclistingrep.d.ts +43 -0
  56. package/dist/commonjs/models/components/aiconfigsmetriclistingrep.d.ts.map +1 -1
  57. package/dist/commonjs/models/components/aiconfigsmetriclistingrep.js +23 -0
  58. package/dist/commonjs/models/components/aiconfigsmetriclistingrep.js.map +1 -1
  59. package/dist/commonjs/models/components/aiconfigvariation.d.ts +8 -0
  60. package/dist/commonjs/models/components/aiconfigvariation.d.ts.map +1 -1
  61. package/dist/commonjs/models/components/aiconfigvariation.js +8 -0
  62. package/dist/commonjs/models/components/aiconfigvariation.js.map +1 -1
  63. package/dist/commonjs/models/components/aiconfigvariationpatch.d.ts +14 -0
  64. package/dist/commonjs/models/components/aiconfigvariationpatch.d.ts.map +1 -1
  65. package/dist/commonjs/models/components/aiconfigvariationpatch.js +8 -0
  66. package/dist/commonjs/models/components/aiconfigvariationpatch.js.map +1 -1
  67. package/dist/commonjs/models/components/aiconfigvariationpost.d.ts +16 -2
  68. package/dist/commonjs/models/components/aiconfigvariationpost.d.ts.map +1 -1
  69. package/dist/commonjs/models/components/aiconfigvariationpost.js +10 -2
  70. package/dist/commonjs/models/components/aiconfigvariationpost.js.map +1 -1
  71. package/dist/commonjs/models/components/environment.d.ts +3 -0
  72. package/dist/commonjs/models/components/environment.d.ts.map +1 -1
  73. package/dist/commonjs/models/components/environment.js +5 -0
  74. package/dist/commonjs/models/components/environment.js.map +1 -1
  75. package/dist/commonjs/models/components/index.d.ts +7 -0
  76. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  77. package/dist/commonjs/models/components/index.js +7 -0
  78. package/dist/commonjs/models/components/index.js.map +1 -1
  79. package/dist/commonjs/models/components/judgeattachment.d.ts +37 -0
  80. package/dist/commonjs/models/components/judgeattachment.d.ts.map +1 -0
  81. package/dist/commonjs/models/components/judgeattachment.js +71 -0
  82. package/dist/commonjs/models/components/judgeattachment.js.map +1 -0
  83. package/dist/commonjs/models/components/judgeconfiguration.d.ts +35 -0
  84. package/dist/commonjs/models/components/judgeconfiguration.d.ts.map +1 -0
  85. package/dist/commonjs/models/components/judgeconfiguration.js +70 -0
  86. package/dist/commonjs/models/components/judgeconfiguration.js.map +1 -0
  87. package/dist/commonjs/models/components/metricdatasourcerefrep.d.ts +35 -0
  88. package/dist/commonjs/models/components/metricdatasourcerefrep.d.ts.map +1 -0
  89. package/dist/commonjs/models/components/metricdatasourcerefrep.js +86 -0
  90. package/dist/commonjs/models/components/metricdatasourcerefrep.js.map +1 -0
  91. package/dist/commonjs/models/components/metriclistingrep.d.ts +38 -0
  92. package/dist/commonjs/models/components/metriclistingrep.d.ts.map +1 -1
  93. package/dist/commonjs/models/components/metriclistingrep.js +21 -0
  94. package/dist/commonjs/models/components/metriclistingrep.js.map +1 -1
  95. package/dist/commonjs/models/components/rule.d.ts +5 -0
  96. package/dist/commonjs/models/components/rule.d.ts.map +1 -1
  97. package/dist/commonjs/models/components/rule.js +2 -0
  98. package/dist/commonjs/models/components/rule.js.map +1 -1
  99. package/dist/commonjs/models/components/variationtool.d.ts +46 -0
  100. package/dist/commonjs/models/components/variationtool.d.ts.map +1 -0
  101. package/dist/commonjs/models/components/variationtool.js +73 -0
  102. package/dist/commonjs/models/components/variationtool.js.map +1 -0
  103. package/dist/commonjs/models/components/variationtoolpost.d.ts +37 -0
  104. package/dist/commonjs/models/components/variationtoolpost.d.ts.map +1 -0
  105. package/dist/commonjs/models/components/variationtoolpost.js +71 -0
  106. package/dist/commonjs/models/components/variationtoolpost.js.map +1 -0
  107. package/dist/commonjs/models/operations/deleteaiconfig.d.ts +0 -34
  108. package/dist/commonjs/models/operations/deleteaiconfig.d.ts.map +1 -1
  109. package/dist/commonjs/models/operations/deleteaiconfig.js +1 -33
  110. package/dist/commonjs/models/operations/deleteaiconfig.js.map +1 -1
  111. package/dist/commonjs/models/operations/deleteaiconfigvariation.d.ts +0 -34
  112. package/dist/commonjs/models/operations/deleteaiconfigvariation.d.ts.map +1 -1
  113. package/dist/commonjs/models/operations/deleteaiconfigvariation.js +1 -33
  114. package/dist/commonjs/models/operations/deleteaiconfigvariation.js.map +1 -1
  115. package/dist/commonjs/models/operations/getaiconfig.d.ts +0 -34
  116. package/dist/commonjs/models/operations/getaiconfig.d.ts.map +1 -1
  117. package/dist/commonjs/models/operations/getaiconfig.js +1 -33
  118. package/dist/commonjs/models/operations/getaiconfig.js.map +1 -1
  119. package/dist/commonjs/models/operations/getaiconfigs.d.ts +0 -34
  120. package/dist/commonjs/models/operations/getaiconfigs.d.ts.map +1 -1
  121. package/dist/commonjs/models/operations/getaiconfigs.js +1 -33
  122. package/dist/commonjs/models/operations/getaiconfigs.js.map +1 -1
  123. package/dist/commonjs/models/operations/getaiconfigtargeting.d.ts +0 -34
  124. package/dist/commonjs/models/operations/getaiconfigtargeting.d.ts.map +1 -1
  125. package/dist/commonjs/models/operations/getaiconfigtargeting.js +1 -33
  126. package/dist/commonjs/models/operations/getaiconfigtargeting.js.map +1 -1
  127. package/dist/commonjs/models/operations/getaiconfigvariation.d.ts +0 -34
  128. package/dist/commonjs/models/operations/getaiconfigvariation.d.ts.map +1 -1
  129. package/dist/commonjs/models/operations/getaiconfigvariation.js +1 -33
  130. package/dist/commonjs/models/operations/getaiconfigvariation.js.map +1 -1
  131. package/dist/commonjs/models/operations/getfeatureflags.d.ts +1 -1
  132. package/dist/commonjs/models/operations/patchaiconfig.d.ts +0 -34
  133. package/dist/commonjs/models/operations/patchaiconfig.d.ts.map +1 -1
  134. package/dist/commonjs/models/operations/patchaiconfig.js +1 -26
  135. package/dist/commonjs/models/operations/patchaiconfig.js.map +1 -1
  136. package/dist/commonjs/models/operations/patchaiconfigtargeting.d.ts +0 -34
  137. package/dist/commonjs/models/operations/patchaiconfigtargeting.d.ts.map +1 -1
  138. package/dist/commonjs/models/operations/patchaiconfigtargeting.js +1 -26
  139. package/dist/commonjs/models/operations/patchaiconfigtargeting.js.map +1 -1
  140. package/dist/commonjs/models/operations/patchaiconfigvariation.d.ts +0 -34
  141. package/dist/commonjs/models/operations/patchaiconfigvariation.d.ts.map +1 -1
  142. package/dist/commonjs/models/operations/patchaiconfigvariation.js +1 -26
  143. package/dist/commonjs/models/operations/patchaiconfigvariation.js.map +1 -1
  144. package/dist/commonjs/models/operations/patchfeatureflag.d.ts +5 -0
  145. package/dist/commonjs/models/operations/patchfeatureflag.d.ts.map +1 -1
  146. package/dist/commonjs/models/operations/patchfeatureflag.js +2 -0
  147. package/dist/commonjs/models/operations/patchfeatureflag.js.map +1 -1
  148. package/dist/commonjs/models/operations/postaiconfig.d.ts +0 -34
  149. package/dist/commonjs/models/operations/postaiconfig.d.ts.map +1 -1
  150. package/dist/commonjs/models/operations/postaiconfig.js +1 -26
  151. package/dist/commonjs/models/operations/postaiconfig.js.map +1 -1
  152. package/dist/commonjs/models/operations/postaiconfigvariation.d.ts +0 -34
  153. package/dist/commonjs/models/operations/postaiconfigvariation.d.ts.map +1 -1
  154. package/dist/commonjs/models/operations/postaiconfigvariation.js +1 -26
  155. package/dist/commonjs/models/operations/postaiconfigvariation.js.map +1 -1
  156. package/dist/commonjs/sdk/featureflags.d.ts +1 -1
  157. package/dist/commonjs/sdk/featureflags.js +1 -1
  158. package/dist/esm/funcs/aiConfigsCreate.js +0 -1
  159. package/dist/esm/funcs/aiConfigsCreate.js.map +1 -1
  160. package/dist/esm/funcs/aiConfigsCreateVariation.js +0 -1
  161. package/dist/esm/funcs/aiConfigsCreateVariation.js.map +1 -1
  162. package/dist/esm/funcs/aiConfigsDelete.js +0 -1
  163. package/dist/esm/funcs/aiConfigsDelete.js.map +1 -1
  164. package/dist/esm/funcs/aiConfigsDeleteVariation.js +0 -1
  165. package/dist/esm/funcs/aiConfigsDeleteVariation.js.map +1 -1
  166. package/dist/esm/funcs/aiConfigsGet.js +0 -1
  167. package/dist/esm/funcs/aiConfigsGet.js.map +1 -1
  168. package/dist/esm/funcs/aiConfigsGetTargeting.js +0 -1
  169. package/dist/esm/funcs/aiConfigsGetTargeting.js.map +1 -1
  170. package/dist/esm/funcs/aiConfigsGetVariation.js +0 -1
  171. package/dist/esm/funcs/aiConfigsGetVariation.js.map +1 -1
  172. package/dist/esm/funcs/aiConfigsList.js +0 -1
  173. package/dist/esm/funcs/aiConfigsList.js.map +1 -1
  174. package/dist/esm/funcs/aiConfigsUpdate.js +0 -1
  175. package/dist/esm/funcs/aiConfigsUpdate.js.map +1 -1
  176. package/dist/esm/funcs/aiConfigsUpdateTargeting.js +0 -1
  177. package/dist/esm/funcs/aiConfigsUpdateTargeting.js.map +1 -1
  178. package/dist/esm/funcs/aiConfigsUpdateVariation.js +0 -1
  179. package/dist/esm/funcs/aiConfigsUpdateVariation.js.map +1 -1
  180. package/dist/esm/funcs/featureFlagsPatch.d.ts +1 -1
  181. package/dist/esm/funcs/featureFlagsPatch.js +2 -1
  182. package/dist/esm/funcs/featureFlagsPatch.js.map +1 -1
  183. package/dist/esm/lib/config.d.ts +2 -2
  184. package/dist/esm/lib/config.js +2 -2
  185. package/dist/esm/mcp-server/mcp-server.js +1 -1
  186. package/dist/esm/mcp-server/server.js +1 -1
  187. package/dist/esm/models/components/aiconfig.d.ts +26 -0
  188. package/dist/esm/models/components/aiconfig.d.ts.map +1 -1
  189. package/dist/esm/models/components/aiconfig.js +10 -0
  190. package/dist/esm/models/components/aiconfig.js.map +1 -1
  191. package/dist/esm/models/components/aiconfigdependency.d.ts +69 -0
  192. package/dist/esm/models/components/aiconfigdependency.d.ts.map +1 -0
  193. package/dist/esm/models/components/aiconfigdependency.js +54 -0
  194. package/dist/esm/models/components/aiconfigdependency.js.map +1 -0
  195. package/dist/esm/models/components/aiconfigpatch.d.ts +10 -0
  196. package/dist/esm/models/components/aiconfigpatch.d.ts.map +1 -1
  197. package/dist/esm/models/components/aiconfigpatch.js +4 -0
  198. package/dist/esm/models/components/aiconfigpatch.js.map +1 -1
  199. package/dist/esm/models/components/aiconfigpost.d.ts +16 -0
  200. package/dist/esm/models/components/aiconfigpost.d.ts.map +1 -1
  201. package/dist/esm/models/components/aiconfigpost.js +8 -0
  202. package/dist/esm/models/components/aiconfigpost.js.map +1 -1
  203. package/dist/esm/models/components/aiconfigsmetricdatasourcerefrep.d.ts +35 -0
  204. package/dist/esm/models/components/aiconfigsmetricdatasourcerefrep.d.ts.map +1 -0
  205. package/dist/esm/models/components/aiconfigsmetricdatasourcerefrep.js +48 -0
  206. package/dist/esm/models/components/aiconfigsmetricdatasourcerefrep.js.map +1 -0
  207. package/dist/esm/models/components/aiconfigsmetriclistingrep.d.ts +43 -0
  208. package/dist/esm/models/components/aiconfigsmetriclistingrep.d.ts.map +1 -1
  209. package/dist/esm/models/components/aiconfigsmetriclistingrep.js +23 -0
  210. package/dist/esm/models/components/aiconfigsmetriclistingrep.js.map +1 -1
  211. package/dist/esm/models/components/aiconfigvariation.d.ts +8 -0
  212. package/dist/esm/models/components/aiconfigvariation.d.ts.map +1 -1
  213. package/dist/esm/models/components/aiconfigvariation.js +8 -0
  214. package/dist/esm/models/components/aiconfigvariation.js.map +1 -1
  215. package/dist/esm/models/components/aiconfigvariationpatch.d.ts +14 -0
  216. package/dist/esm/models/components/aiconfigvariationpatch.d.ts.map +1 -1
  217. package/dist/esm/models/components/aiconfigvariationpatch.js +8 -0
  218. package/dist/esm/models/components/aiconfigvariationpatch.js.map +1 -1
  219. package/dist/esm/models/components/aiconfigvariationpost.d.ts +16 -2
  220. package/dist/esm/models/components/aiconfigvariationpost.d.ts.map +1 -1
  221. package/dist/esm/models/components/aiconfigvariationpost.js +10 -2
  222. package/dist/esm/models/components/aiconfigvariationpost.js.map +1 -1
  223. package/dist/esm/models/components/environment.d.ts +3 -0
  224. package/dist/esm/models/components/environment.d.ts.map +1 -1
  225. package/dist/esm/models/components/environment.js +5 -0
  226. package/dist/esm/models/components/environment.js.map +1 -1
  227. package/dist/esm/models/components/index.d.ts +7 -0
  228. package/dist/esm/models/components/index.d.ts.map +1 -1
  229. package/dist/esm/models/components/index.js +7 -0
  230. package/dist/esm/models/components/index.js.map +1 -1
  231. package/dist/esm/models/components/judgeattachment.d.ts +37 -0
  232. package/dist/esm/models/components/judgeattachment.d.ts.map +1 -0
  233. package/dist/esm/models/components/judgeattachment.js +33 -0
  234. package/dist/esm/models/components/judgeattachment.js.map +1 -0
  235. package/dist/esm/models/components/judgeconfiguration.d.ts +35 -0
  236. package/dist/esm/models/components/judgeconfiguration.d.ts.map +1 -0
  237. package/dist/esm/models/components/judgeconfiguration.js +32 -0
  238. package/dist/esm/models/components/judgeconfiguration.js.map +1 -0
  239. package/dist/esm/models/components/metricdatasourcerefrep.d.ts +35 -0
  240. package/dist/esm/models/components/metricdatasourcerefrep.d.ts.map +1 -0
  241. package/dist/esm/models/components/metricdatasourcerefrep.js +48 -0
  242. package/dist/esm/models/components/metricdatasourcerefrep.js.map +1 -0
  243. package/dist/esm/models/components/metriclistingrep.d.ts +38 -0
  244. package/dist/esm/models/components/metriclistingrep.d.ts.map +1 -1
  245. package/dist/esm/models/components/metriclistingrep.js +21 -0
  246. package/dist/esm/models/components/metriclistingrep.js.map +1 -1
  247. package/dist/esm/models/components/rule.d.ts +5 -0
  248. package/dist/esm/models/components/rule.d.ts.map +1 -1
  249. package/dist/esm/models/components/rule.js +2 -0
  250. package/dist/esm/models/components/rule.js.map +1 -1
  251. package/dist/esm/models/components/variationtool.d.ts +46 -0
  252. package/dist/esm/models/components/variationtool.d.ts.map +1 -0
  253. package/dist/esm/models/components/variationtool.js +35 -0
  254. package/dist/esm/models/components/variationtool.js.map +1 -0
  255. package/dist/esm/models/components/variationtoolpost.d.ts +37 -0
  256. package/dist/esm/models/components/variationtoolpost.d.ts.map +1 -0
  257. package/dist/esm/models/components/variationtoolpost.js +33 -0
  258. package/dist/esm/models/components/variationtoolpost.js.map +1 -0
  259. package/dist/esm/models/operations/deleteaiconfig.d.ts +0 -34
  260. package/dist/esm/models/operations/deleteaiconfig.d.ts.map +1 -1
  261. package/dist/esm/models/operations/deleteaiconfig.js +0 -32
  262. package/dist/esm/models/operations/deleteaiconfig.js.map +1 -1
  263. package/dist/esm/models/operations/deleteaiconfigvariation.d.ts +0 -34
  264. package/dist/esm/models/operations/deleteaiconfigvariation.d.ts.map +1 -1
  265. package/dist/esm/models/operations/deleteaiconfigvariation.js +0 -32
  266. package/dist/esm/models/operations/deleteaiconfigvariation.js.map +1 -1
  267. package/dist/esm/models/operations/getaiconfig.d.ts +0 -34
  268. package/dist/esm/models/operations/getaiconfig.d.ts.map +1 -1
  269. package/dist/esm/models/operations/getaiconfig.js +0 -32
  270. package/dist/esm/models/operations/getaiconfig.js.map +1 -1
  271. package/dist/esm/models/operations/getaiconfigs.d.ts +0 -34
  272. package/dist/esm/models/operations/getaiconfigs.d.ts.map +1 -1
  273. package/dist/esm/models/operations/getaiconfigs.js +0 -32
  274. package/dist/esm/models/operations/getaiconfigs.js.map +1 -1
  275. package/dist/esm/models/operations/getaiconfigtargeting.d.ts +0 -34
  276. package/dist/esm/models/operations/getaiconfigtargeting.d.ts.map +1 -1
  277. package/dist/esm/models/operations/getaiconfigtargeting.js +0 -32
  278. package/dist/esm/models/operations/getaiconfigtargeting.js.map +1 -1
  279. package/dist/esm/models/operations/getaiconfigvariation.d.ts +0 -34
  280. package/dist/esm/models/operations/getaiconfigvariation.d.ts.map +1 -1
  281. package/dist/esm/models/operations/getaiconfigvariation.js +0 -32
  282. package/dist/esm/models/operations/getaiconfigvariation.js.map +1 -1
  283. package/dist/esm/models/operations/getfeatureflags.d.ts +1 -1
  284. package/dist/esm/models/operations/patchaiconfig.d.ts +0 -34
  285. package/dist/esm/models/operations/patchaiconfig.d.ts.map +1 -1
  286. package/dist/esm/models/operations/patchaiconfig.js +0 -25
  287. package/dist/esm/models/operations/patchaiconfig.js.map +1 -1
  288. package/dist/esm/models/operations/patchaiconfigtargeting.d.ts +0 -34
  289. package/dist/esm/models/operations/patchaiconfigtargeting.d.ts.map +1 -1
  290. package/dist/esm/models/operations/patchaiconfigtargeting.js +0 -25
  291. package/dist/esm/models/operations/patchaiconfigtargeting.js.map +1 -1
  292. package/dist/esm/models/operations/patchaiconfigvariation.d.ts +0 -34
  293. package/dist/esm/models/operations/patchaiconfigvariation.d.ts.map +1 -1
  294. package/dist/esm/models/operations/patchaiconfigvariation.js +0 -25
  295. package/dist/esm/models/operations/patchaiconfigvariation.js.map +1 -1
  296. package/dist/esm/models/operations/patchfeatureflag.d.ts +5 -0
  297. package/dist/esm/models/operations/patchfeatureflag.d.ts.map +1 -1
  298. package/dist/esm/models/operations/patchfeatureflag.js +2 -0
  299. package/dist/esm/models/operations/patchfeatureflag.js.map +1 -1
  300. package/dist/esm/models/operations/postaiconfig.d.ts +0 -34
  301. package/dist/esm/models/operations/postaiconfig.d.ts.map +1 -1
  302. package/dist/esm/models/operations/postaiconfig.js +0 -25
  303. package/dist/esm/models/operations/postaiconfig.js.map +1 -1
  304. package/dist/esm/models/operations/postaiconfigvariation.d.ts +0 -34
  305. package/dist/esm/models/operations/postaiconfigvariation.d.ts.map +1 -1
  306. package/dist/esm/models/operations/postaiconfigvariation.js +0 -25
  307. package/dist/esm/models/operations/postaiconfigvariation.js.map +1 -1
  308. package/dist/esm/sdk/featureflags.d.ts +1 -1
  309. package/dist/esm/sdk/featureflags.js +1 -1
  310. package/examples/package-lock.json +1 -1
  311. package/jsr.json +1 -1
  312. package/package.json +1 -1
  313. package/schemas/openapi.json +37610 -18886
  314. package/schemas/output.json +37861 -19106
  315. package/src/funcs/aiConfigsCreate.ts +0 -5
  316. package/src/funcs/aiConfigsCreateVariation.ts +0 -5
  317. package/src/funcs/aiConfigsDelete.ts +0 -5
  318. package/src/funcs/aiConfigsDeleteVariation.ts +0 -5
  319. package/src/funcs/aiConfigsGet.ts +0 -5
  320. package/src/funcs/aiConfigsGetTargeting.ts +0 -5
  321. package/src/funcs/aiConfigsGetVariation.ts +0 -5
  322. package/src/funcs/aiConfigsList.ts +0 -5
  323. package/src/funcs/aiConfigsUpdate.ts +0 -5
  324. package/src/funcs/aiConfigsUpdateTargeting.ts +0 -5
  325. package/src/funcs/aiConfigsUpdateVariation.ts +0 -5
  326. package/src/funcs/featureFlagsPatch.ts +2 -1
  327. package/src/lib/config.ts +2 -2
  328. package/src/mcp-server/mcp-server.ts +1 -1
  329. package/src/mcp-server/server.ts +1 -1
  330. package/src/models/components/aiconfig.ts +37 -0
  331. package/src/models/components/aiconfigdependency.ts +112 -0
  332. package/src/models/components/aiconfigpatch.ts +14 -0
  333. package/src/models/components/aiconfigpost.ts +25 -0
  334. package/src/models/components/aiconfigsmetricdatasourcerefrep.ts +91 -0
  335. package/src/models/components/aiconfigsmetriclistingrep.ts +66 -0
  336. package/src/models/components/aiconfigvariation.ts +24 -0
  337. package/src/models/components/aiconfigvariationpatch.ts +30 -0
  338. package/src/models/components/aiconfigvariationpost.ts +34 -4
  339. package/src/models/components/environment.ts +12 -0
  340. package/src/models/components/index.ts +7 -0
  341. package/src/models/components/judgeattachment.ts +74 -0
  342. package/src/models/components/judgeconfiguration.ts +77 -0
  343. package/src/models/components/metricdatasourcerefrep.ts +89 -0
  344. package/src/models/components/metriclistingrep.ts +59 -0
  345. package/src/models/components/rule.ts +7 -0
  346. package/src/models/components/variationtool.ts +79 -0
  347. package/src/models/components/variationtoolpost.ts +76 -0
  348. package/src/models/operations/deleteaiconfig.ts +0 -51
  349. package/src/models/operations/deleteaiconfigvariation.ts +0 -53
  350. package/src/models/operations/getaiconfig.ts +0 -51
  351. package/src/models/operations/getaiconfigs.ts +0 -51
  352. package/src/models/operations/getaiconfigtargeting.ts +0 -51
  353. package/src/models/operations/getaiconfigvariation.ts +0 -51
  354. package/src/models/operations/getfeatureflags.ts +1 -1
  355. package/src/models/operations/patchaiconfig.ts +0 -44
  356. package/src/models/operations/patchaiconfigtargeting.ts +0 -45
  357. package/src/models/operations/patchaiconfigvariation.ts +0 -45
  358. package/src/models/operations/patchfeatureflag.ts +7 -0
  359. package/src/models/operations/postaiconfig.ts +0 -44
  360. package/src/models/operations/postaiconfigvariation.ts +0 -45
  361. package/src/sdk/featureflags.ts +1 -1
  362. package/.devcontainer/README.md +0 -35
  363. package/docs/sdks/aiconfigs/README.md +0 -1616
  364. package/docs/sdks/codereferences/README.md +0 -79
  365. package/docs/sdks/environments/README.md +0 -112
  366. package/docs/sdks/featureflags/README.md +0 -1808
  367. package/docs/sdks/launchdarkly/README.md +0 -430
  368. package/examples/README.md +0 -26
@@ -1,1616 +0,0 @@
1
- # AiConfigs
2
- (*aiConfigs*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [getTargeting](#gettargeting) - Show an AI Config's targeting
9
- * [updateTargeting](#updatetargeting) - Update AI Config targeting
10
- * [list](#list) - List AI Configs
11
- * [create](#create) - Create new AI Config
12
- * [delete](#delete) - Delete AI Config
13
- * [get](#get) - Get AI Config
14
- * [update](#update) - Update AI Config
15
- * [createVariation](#createvariation) - Create AI Config variation
16
- * [deleteVariation](#deletevariation) - Delete AI Config variation
17
- * [getVariation](#getvariation) - Get AI Config variation
18
- * [updateVariation](#updatevariation) - Update AI Config variation
19
-
20
- ## getTargeting
21
-
22
- Retrieves a specific AI Config's targeting by its key
23
-
24
- ### Example Usage
25
-
26
- ```typescript
27
- import { LaunchDarkly } from "@launchdarkly/mcp-server";
28
-
29
- const launchDarkly = new LaunchDarkly({
30
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
31
- });
32
-
33
- async function run() {
34
- const result = await launchDarkly.aiConfigs.getTargeting({
35
- ldAPIVersion: "beta",
36
- projectKey: "<value>",
37
- configKey: "<value>",
38
- });
39
-
40
- console.log(result);
41
- }
42
-
43
- run();
44
- ```
45
-
46
- ### Standalone function
47
-
48
- The standalone function version of this method:
49
-
50
- ```typescript
51
- import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
52
- import { aiConfigsGetTargeting } from "@launchdarkly/mcp-server/funcs/aiConfigsGetTargeting.js";
53
-
54
- // Use `LaunchDarklyCore` for best tree-shaking performance.
55
- // You can create one instance of it to use across an application.
56
- const launchDarkly = new LaunchDarklyCore({
57
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
58
- });
59
-
60
- async function run() {
61
- const res = await aiConfigsGetTargeting(launchDarkly, {
62
- ldAPIVersion: "beta",
63
- projectKey: "<value>",
64
- configKey: "<value>",
65
- });
66
- if (res.ok) {
67
- const { value: result } = res;
68
- console.log(result);
69
- } else {
70
- console.log("aiConfigsGetTargeting failed:", res.error);
71
- }
72
- }
73
-
74
- run();
75
- ```
76
-
77
- ### Parameters
78
-
79
- | Parameter | Type | Required | Description |
80
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
81
- | `request` | [operations.GetAIConfigTargetingRequest](../../models/operations/getaiconfigtargetingrequest.md) | :heavy_check_mark: | The request object to use for the request. |
82
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
83
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
84
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
85
-
86
- ### Response
87
-
88
- **Promise\<[components.AIConfigTargeting](../../models/components/aiconfigtargeting.md)\>**
89
-
90
- ### Errors
91
-
92
- | Error Type | Status Code | Content Type |
93
- | ---------------- | ---------------- | ---------------- |
94
- | errors.ErrorT | 403, 404 | application/json |
95
- | errors.ErrorT | 500 | application/json |
96
- | errors.APIError | 4XX, 5XX | \*/\* |
97
-
98
- ## updateTargeting
99
-
100
- Perform a partial update to an AI Config's targeting. The request body must be a valid semantic patch.
101
-
102
- ### Using semantic patches on an AI Config
103
-
104
- To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).
105
-
106
- The body of a semantic patch request for updating an AI Config's targeting takes the following properties:
107
-
108
- * `comment` (string): (Optional) A description of the update.
109
- * `environmentKey` (string): The key of the LaunchDarkly environment.
110
- * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. The body of a single semantic patch can contain many different instructions.
111
-
112
- ### Instructions
113
-
114
- Semantic patch requests support the following `kind` instructions for updating AI Configs.
115
-
116
- <details>
117
- <summary>Click to expand instructions for <strong>working with targeting and variations</strong> for AI Configs</summary>
118
-
119
- #### addClauses
120
-
121
- Adds the given clauses to the rule indicated by `ruleId`.
122
-
123
- ##### Parameters
124
-
125
- - `ruleId`: ID of a rule in the AI Config.
126
- - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.
127
-
128
- Here's an example:
129
-
130
- ```json
131
- {
132
- "environmentKey": "environment-key-123abc",
133
- "instructions": [{
134
- "kind": "addClauses",
135
- "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29",
136
- "clauses": [{
137
- "contextKind": "user",
138
- "attribute": "country",
139
- "op": "in",
140
- "negate": false,
141
- "values": ["USA", "Canada"]
142
- }]
143
- }]
144
- }
145
- ```
146
-
147
- #### addRule
148
-
149
- Adds a new targeting rule to the AI Config. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate.
150
-
151
- If you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list.
152
-
153
- ##### Parameters
154
-
155
- - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.
156
- - `beforeRuleId`: (Optional) ID of a rule.
157
- - Either
158
- - `variationId`: ID of a variation.
159
-
160
- or
161
-
162
- - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000).
163
- - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.
164
- - `rolloutContextKind`: (Optional) Context kind, defaults to `user`
165
-
166
- Here's an example that uses a `variationId`:
167
-
168
- ```json
169
- {
170
- "environmentKey": "environment-key-123abc",
171
- "instructions": [{
172
- "kind": "addRule",
173
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00",
174
- "clauses": [{
175
- "contextKind": "organization",
176
- "attribute": "located_in",
177
- "op": "in",
178
- "negate": false,
179
- "values": ["Sweden", "Norway"]
180
- }]
181
- }]
182
- }
183
- ```
184
-
185
- Here's an example that uses a percentage rollout:
186
-
187
- ```json
188
- {
189
- "environmentKey": "environment-key-123abc",
190
- "instructions": [{
191
- "kind": "addRule",
192
- "clauses": [{
193
- "contextKind": "organization",
194
- "attribute": "located_in",
195
- "op": "in",
196
- "negate": false,
197
- "values": ["Sweden", "Norway"]
198
- }],
199
- "rolloutContextKind": "organization",
200
- "rolloutWeights": {
201
- "2f43f67c-3e4e-4945-a18a-26559378ca00": 15000, // serve 15% this variation
202
- "e5830889-1ec5-4b0c-9cc9-c48790090c43": 85000 // serve 85% this variation
203
- }
204
- }]
205
- }
206
- ```
207
-
208
- #### addTargets
209
-
210
- Adds context keys to the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Returns an error if this causes the AI Config to target the same context key in multiple variations.
211
-
212
- ##### Parameters
213
-
214
- - `values`: List of context keys.
215
- - `contextKind`: (Optional) Context kind to target, defaults to `user`
216
- - `variationId`: ID of a variation.
217
-
218
- Here's an example:
219
-
220
- ```json
221
- {
222
- "environmentKey": "environment-key-123abc",
223
- "instructions": [{
224
- "kind": "addTargets",
225
- "values": ["context-key-123abc", "context-key-456def"],
226
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00"
227
- }]
228
- }
229
- ```
230
-
231
- #### addValuesToClause
232
-
233
- Adds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator.
234
-
235
- ##### Parameters
236
-
237
- - `ruleId`: ID of a rule in the AI Config.
238
- - `clauseId`: ID of a clause in that rule.
239
- - `values`: Array of strings, case sensitive.
240
-
241
- Here's an example:
242
-
243
- ```json
244
- {
245
- "environmentKey": "environment-key-123abc",
246
- "instructions": [{
247
- "kind": "addValuesToClause",
248
- "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29",
249
- "clauseId": "10a58772-3121-400f-846b-b8a04e8944ed",
250
- "values": ["beta_testers"]
251
- }]
252
- }
253
- ```
254
-
255
- #### clearTargets
256
-
257
- Removes all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets.
258
-
259
- ##### Parameters
260
-
261
- - `variationId`: ID of a variation.
262
-
263
- Here's an example:
264
-
265
- ```json
266
- {
267
- "environmentKey": "environment-key-123abc",
268
- "instructions": [ { "kind": "clearTargets", "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00" } ]
269
- }
270
- ```
271
-
272
- #### removeClauses
273
-
274
- Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`.
275
-
276
- ##### Parameters
277
-
278
- - `ruleId`: ID of a rule.
279
- - `clauseIds`: Array of IDs of clauses in the rule.
280
-
281
- Here's an example:
282
-
283
- ```json
284
- {
285
- "environmentKey": "environment-key-123abc",
286
- "instructions": [{
287
- "kind": "removeClauses",
288
- "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29",
289
- "clauseIds": ["10a58772-3121-400f-846b-b8a04e8944ed", "36a461dc-235e-4b08-97b9-73ce9365873e"]
290
- }]
291
- }
292
- ```
293
-
294
- #### removeRule
295
-
296
- Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist.
297
-
298
- ##### Parameters
299
-
300
- - `ruleId`: ID of a rule.
301
-
302
- Here's an example:
303
-
304
- ```json
305
- {
306
- "environmentKey": "environment-key-123abc",
307
- "instructions": [ { "kind": "removeRule", "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29" } ]
308
- }
309
- ```
310
-
311
- #### removeTargets
312
-
313
- Removes context keys from the individual context targets for the context kind that `contextKind` specifies and the variation that `variationId` specifies. Does nothing if the flag does not target the context keys.
314
-
315
- ##### Parameters
316
-
317
- - `values`: List of context keys.
318
- - `contextKind`: (Optional) Context kind to target, defaults to `user`
319
- - `variationId`: ID of a variation.
320
-
321
- Here's an example:
322
-
323
- ```json
324
- {
325
- "environmentKey": "environment-key-123abc",
326
- "instructions": [{
327
- "kind": "removeTargets",
328
- "values": ["context-key-123abc", "context-key-456def"],
329
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00"
330
- }]
331
- }
332
- ```
333
-
334
- #### removeValuesFromClause
335
-
336
- Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator.
337
-
338
- ##### Parameters
339
-
340
- - `ruleId`: ID of a rule.
341
- - `clauseId`: ID of a clause in that rule.
342
- - `values`: Array of strings, case sensitive.
343
-
344
- Here's an example:
345
-
346
- ```json
347
- {
348
- "environmentKey": "environment-key-123abc",
349
- "instructions": [{
350
- "kind": "removeValuesFromClause",
351
- "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29",
352
- "clauseId": "10a58772-3121-400f-846b-b8a04e8944ed",
353
- "values": ["beta_testers"]
354
- }]
355
- }
356
- ```
357
-
358
- #### reorderRules
359
-
360
- Rearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules on the AI Config.
361
-
362
- ##### Parameters
363
-
364
- - `ruleIds`: Array of IDs of all rules.
365
-
366
- Here's an example:
367
-
368
- ```json
369
- {
370
- "environmentKey": "environment-key-123abc",
371
- "instructions": [{
372
- "kind": "reorderRules",
373
- "ruleIds": ["a902ef4a-2faf-4eaf-88e1-ecc356708a29", "63c238d1-835d-435e-8f21-c8d5e40b2a3d"]
374
- }]
375
- }
376
- ```
377
-
378
- #### replaceRules
379
-
380
- Removes all targeting rules for the AI Config and replaces them with the list you provide.
381
-
382
- ##### Parameters
383
-
384
- - `rules`: A list of rules.
385
-
386
- Here's an example:
387
-
388
- ```json
389
- {
390
- "environmentKey": "environment-key-123abc",
391
- "instructions": [
392
- {
393
- "kind": "replaceRules",
394
- "rules": [
395
- {
396
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00",
397
- "description": "My new rule",
398
- "clauses": [
399
- {
400
- "contextKind": "user",
401
- "attribute": "segmentMatch",
402
- "op": "segmentMatch",
403
- "values": ["test"]
404
- }
405
- ]
406
- }
407
- ]
408
- }
409
- ]
410
- }
411
- ```
412
-
413
- #### replaceTargets
414
-
415
- Removes all existing targeting and replaces it with the list of targets you provide.
416
-
417
- ##### Parameters
418
-
419
- - `targets`: A list of context targeting. Each item in the list includes an optional `contextKind` that defaults to `user`, a required `variationId`, and a required list of `values`.
420
-
421
- Here's an example:
422
-
423
- ```json
424
- {
425
- "environmentKey": "environment-key-123abc",
426
- "instructions": [
427
- {
428
- "kind": "replaceTargets",
429
- "targets": [
430
- {
431
- "contextKind": "user",
432
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00",
433
- "values": ["user-key-123abc"]
434
- },
435
- {
436
- "contextKind": "device",
437
- "variationId": "e5830889-1ec5-4b0c-9cc9-c48790090c43",
438
- "values": ["device-key-456def"]
439
- }
440
- ]
441
- }
442
- ]
443
- }
444
- ```
445
-
446
- #### updateClause
447
-
448
- Replaces the clause indicated by `ruleId` and `clauseId` with `clause`.
449
-
450
- ##### Parameters
451
-
452
- - `ruleId`: ID of a rule.
453
- - `clauseId`: ID of a clause in that rule.
454
- - `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case.
455
-
456
- Here's an example:
457
-
458
- ```json
459
- {
460
- "environmentKey": "environment-key-123abc",
461
- "instructions": [{
462
- "kind": "updateClause",
463
- "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29",
464
- "clauseId": "10c7462a-2062-45ba-a8bb-dfb3de0f8af5",
465
- "clause": {
466
- "contextKind": "user",
467
- "attribute": "country",
468
- "op": "in",
469
- "negate": false,
470
- "values": ["Mexico", "Canada"]
471
- }
472
- }]
473
- }
474
- ```
475
-
476
- #### updateDefaultVariation
477
-
478
- Updates the default on or off variation of the AI Config.
479
-
480
- ##### Parameters
481
-
482
- - `onVariationValue`: (Optional) The value of the variation of the new on variation.
483
- - `offVariationValue`: (Optional) The value of the variation of the new off variation
484
-
485
- Here's an example:
486
-
487
- ```json
488
- {
489
- "instructions": [ { "kind": "updateDefaultVariation", "OnVariationValue": true, "OffVariationValue": false } ]
490
- }
491
- ```
492
-
493
- #### updateFallthroughVariationOrRollout
494
-
495
- Updates the default or "fallthrough" rule for the AI Config, which the AI Config serves when a context matches none of the targeting rules. The rule can serve either the variation that `variationId` indicates, or a percentage rollout that `rolloutWeights` and `rolloutBucketBy` indicate.
496
-
497
- ##### Parameters
498
-
499
- - `variationId`: ID of a variation.
500
-
501
- or
502
-
503
- - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).
504
- - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.
505
- - `rolloutContextKind`: (Optional) Context kind, defaults to `user`
506
-
507
- Here's an example that uses a `variationId`:
508
-
509
- ```json
510
- {
511
- "environmentKey": "environment-key-123abc",
512
- "instructions": [{
513
- "kind": "updateFallthroughVariationOrRollout",
514
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00"
515
- }]
516
- }
517
- ```
518
-
519
- Here's an example that uses a percentage rollout:
520
-
521
- ```json
522
- {
523
- "environmentKey": "environment-key-123abc",
524
- "instructions": [{
525
- "kind": "updateFallthroughVariationOrRollout",
526
- "rolloutContextKind": "user",
527
- "rolloutWeights": {
528
- "2f43f67c-3e4e-4945-a18a-26559378ca00": 15000, // serve 15% this variation
529
- "e5830889-1ec5-4b0c-9cc9-c48790090c43": 85000 // serve 85% this variation
530
- }
531
- }]
532
- }
533
- ```
534
-
535
- #### updateOffVariation
536
-
537
- Updates the default off variation to `variationId`. The AI Config serves the default off variation when the AI Config's targeting is **Off**.
538
-
539
- ##### Parameters
540
-
541
- - `variationId`: ID of a variation.
542
-
543
- Here's an example:
544
-
545
- ```json
546
- {
547
- "environmentKey": "environment-key-123abc",
548
- "instructions": [ { "kind": "updateOffVariation", "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00" } ]
549
- }
550
- ```
551
-
552
- #### updateRuleDescription
553
-
554
- Updates the description of the targeting rule.
555
-
556
- ##### Parameters
557
-
558
- - `description`: The new human-readable description for this rule.
559
- - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the AI Config.
560
-
561
- Here's an example:
562
-
563
- ```json
564
- {
565
- "environmentKey": "environment-key-123abc",
566
- "instructions": [{
567
- "kind": "updateRuleDescription",
568
- "description": "New rule description",
569
- "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29"
570
- }]
571
- }
572
- ```
573
-
574
- #### updateRuleTrackEvents
575
-
576
- Updates whether or not LaunchDarkly tracks events for the AI Config associated with this rule.
577
-
578
- ##### Parameters
579
-
580
- - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the AI Config.
581
- - `trackEvents`: Whether or not events are tracked.
582
-
583
- Here's an example:
584
-
585
- ```json
586
- {
587
- "environmentKey": "environment-key-123abc",
588
- "instructions": [{
589
- "kind": "updateRuleTrackEvents",
590
- "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29",
591
- "trackEvents": true
592
- }]
593
- }
594
- ```
595
-
596
- #### updateRuleVariationOrRollout
597
-
598
- Updates what `ruleId` serves when its clauses evaluate to true. The rule can serve either the variation that `variationId` indicates, or a percent rollout that `rolloutWeights` and `rolloutBucketBy` indicate.
599
-
600
- ##### Parameters
601
-
602
- - `ruleId`: ID of a rule.
603
- - `variationId`: ID of a variation.
604
-
605
- or
606
-
607
- - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).
608
- - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.
609
- - `rolloutContextKind`: (Optional) Context kind, defaults to `user`
610
-
611
- Here's an example:
612
-
613
- ```json
614
- {
615
- "environmentKey": "environment-key-123abc",
616
- "instructions": [{
617
- "kind": "updateRuleVariationOrRollout",
618
- "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29",
619
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00"
620
- }]
621
- }
622
- ```
623
-
624
- #### updateTrackEvents
625
-
626
- Updates whether or not LaunchDarkly tracks events for the AI Config, for all rules.
627
-
628
- ##### Parameters
629
-
630
- - `trackEvents`: Whether or not events are tracked.
631
-
632
- Here's an example:
633
-
634
- ```json
635
- {
636
- "environmentKey": "environment-key-123abc",
637
- "instructions": [ { "kind": "updateTrackEvents", "trackEvents": true } ]
638
- }
639
- ```
640
-
641
- #### updateTrackEventsFallthrough
642
-
643
- Updates whether or not LaunchDarkly tracks events for the AI Config, for the default rule.
644
-
645
- ##### Parameters
646
-
647
- - `trackEvents`: Whether or not events are tracked.
648
-
649
- Here's an example:
650
-
651
- ```json
652
- {
653
- "environmentKey": "environment-key-123abc",
654
- "instructions": [ { "kind": "updateTrackEventsFallthrough", "trackEvents": true } ]
655
- }
656
- ```
657
- </details>
658
-
659
-
660
- ### Example Usage
661
-
662
- ```typescript
663
- import { LaunchDarkly } from "@launchdarkly/mcp-server";
664
-
665
- const launchDarkly = new LaunchDarkly({
666
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
667
- });
668
-
669
- async function run() {
670
- const result = await launchDarkly.aiConfigs.updateTargeting({
671
- ldAPIVersion: "beta",
672
- projectKey: "<value>",
673
- configKey: "<value>",
674
- aiConfigTargetingPatch: {
675
- comment: "comment",
676
- environmentKey: "environmentKey",
677
- instructions: [
678
- {
679
- "key": "",
680
- },
681
- {
682
- "key": "",
683
- },
684
- ],
685
- },
686
- });
687
-
688
- console.log(result);
689
- }
690
-
691
- run();
692
- ```
693
-
694
- ### Standalone function
695
-
696
- The standalone function version of this method:
697
-
698
- ```typescript
699
- import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
700
- import { aiConfigsUpdateTargeting } from "@launchdarkly/mcp-server/funcs/aiConfigsUpdateTargeting.js";
701
-
702
- // Use `LaunchDarklyCore` for best tree-shaking performance.
703
- // You can create one instance of it to use across an application.
704
- const launchDarkly = new LaunchDarklyCore({
705
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
706
- });
707
-
708
- async function run() {
709
- const res = await aiConfigsUpdateTargeting(launchDarkly, {
710
- ldAPIVersion: "beta",
711
- projectKey: "<value>",
712
- configKey: "<value>",
713
- aiConfigTargetingPatch: {
714
- comment: "comment",
715
- environmentKey: "environmentKey",
716
- instructions: [
717
- {
718
- "key": "",
719
- },
720
- {
721
- "key": "",
722
- },
723
- ],
724
- },
725
- });
726
- if (res.ok) {
727
- const { value: result } = res;
728
- console.log(result);
729
- } else {
730
- console.log("aiConfigsUpdateTargeting failed:", res.error);
731
- }
732
- }
733
-
734
- run();
735
- ```
736
-
737
- ### Parameters
738
-
739
- | Parameter | Type | Required | Description |
740
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
741
- | `request` | [operations.PatchAIConfigTargetingRequest](../../models/operations/patchaiconfigtargetingrequest.md) | :heavy_check_mark: | The request object to use for the request. |
742
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
743
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
744
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
745
-
746
- ### Response
747
-
748
- **Promise\<[components.AIConfigTargeting](../../models/components/aiconfigtargeting.md)\>**
749
-
750
- ### Errors
751
-
752
- | Error Type | Status Code | Content Type |
753
- | ---------------- | ---------------- | ---------------- |
754
- | errors.ErrorT | 400, 403, 404 | application/json |
755
- | errors.ErrorT | 500 | application/json |
756
- | errors.APIError | 4XX, 5XX | \*/\* |
757
-
758
- ## list
759
-
760
- Get a list of all AI Configs in the given project.
761
-
762
- ### Example Usage
763
-
764
- ```typescript
765
- import { LaunchDarkly } from "@launchdarkly/mcp-server";
766
-
767
- const launchDarkly = new LaunchDarkly({
768
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
769
- });
770
-
771
- async function run() {
772
- const result = await launchDarkly.aiConfigs.list({
773
- ldAPIVersion: "beta",
774
- projectKey: "default",
775
- });
776
-
777
- console.log(result);
778
- }
779
-
780
- run();
781
- ```
782
-
783
- ### Standalone function
784
-
785
- The standalone function version of this method:
786
-
787
- ```typescript
788
- import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
789
- import { aiConfigsList } from "@launchdarkly/mcp-server/funcs/aiConfigsList.js";
790
-
791
- // Use `LaunchDarklyCore` for best tree-shaking performance.
792
- // You can create one instance of it to use across an application.
793
- const launchDarkly = new LaunchDarklyCore({
794
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
795
- });
796
-
797
- async function run() {
798
- const res = await aiConfigsList(launchDarkly, {
799
- ldAPIVersion: "beta",
800
- projectKey: "default",
801
- });
802
- if (res.ok) {
803
- const { value: result } = res;
804
- console.log(result);
805
- } else {
806
- console.log("aiConfigsList failed:", res.error);
807
- }
808
- }
809
-
810
- run();
811
- ```
812
-
813
- ### Parameters
814
-
815
- | Parameter | Type | Required | Description |
816
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
817
- | `request` | [operations.GetAIConfigsRequest](../../models/operations/getaiconfigsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
818
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
819
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
820
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
821
-
822
- ### Response
823
-
824
- **Promise\<[components.AIConfigs](../../models/components/aiconfigs.md)\>**
825
-
826
- ### Errors
827
-
828
- | Error Type | Status Code | Content Type |
829
- | ---------------- | ---------------- | ---------------- |
830
- | errors.ErrorT | 400, 403, 404 | application/json |
831
- | errors.ErrorT | 500 | application/json |
832
- | errors.APIError | 4XX, 5XX | \*/\* |
833
-
834
- ## create
835
-
836
- Create a new AI Config within the given project.
837
-
838
- ### Example Usage
839
-
840
- ```typescript
841
- import { LaunchDarkly } from "@launchdarkly/mcp-server";
842
-
843
- const launchDarkly = new LaunchDarkly({
844
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
845
- });
846
-
847
- async function run() {
848
- const result = await launchDarkly.aiConfigs.create({
849
- ldAPIVersion: "beta",
850
- projectKey: "<value>",
851
- aiConfigPost: {
852
- key: "key",
853
- maintainerId: "maintainerId",
854
- maintainerTeamKey: "maintainerTeamKey",
855
- name: "name",
856
- tags: [
857
- "tags",
858
- "tags",
859
- ],
860
- },
861
- });
862
-
863
- console.log(result);
864
- }
865
-
866
- run();
867
- ```
868
-
869
- ### Standalone function
870
-
871
- The standalone function version of this method:
872
-
873
- ```typescript
874
- import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
875
- import { aiConfigsCreate } from "@launchdarkly/mcp-server/funcs/aiConfigsCreate.js";
876
-
877
- // Use `LaunchDarklyCore` for best tree-shaking performance.
878
- // You can create one instance of it to use across an application.
879
- const launchDarkly = new LaunchDarklyCore({
880
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
881
- });
882
-
883
- async function run() {
884
- const res = await aiConfigsCreate(launchDarkly, {
885
- ldAPIVersion: "beta",
886
- projectKey: "<value>",
887
- aiConfigPost: {
888
- key: "key",
889
- maintainerId: "maintainerId",
890
- maintainerTeamKey: "maintainerTeamKey",
891
- name: "name",
892
- tags: [
893
- "tags",
894
- "tags",
895
- ],
896
- },
897
- });
898
- if (res.ok) {
899
- const { value: result } = res;
900
- console.log(result);
901
- } else {
902
- console.log("aiConfigsCreate failed:", res.error);
903
- }
904
- }
905
-
906
- run();
907
- ```
908
-
909
- ### Parameters
910
-
911
- | Parameter | Type | Required | Description |
912
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
913
- | `request` | [operations.PostAIConfigRequest](../../models/operations/postaiconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. |
914
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
915
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
916
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
917
-
918
- ### Response
919
-
920
- **Promise\<[components.AIConfig](../../models/components/aiconfig.md)\>**
921
-
922
- ### Errors
923
-
924
- | Error Type | Status Code | Content Type |
925
- | ---------------- | ---------------- | ---------------- |
926
- | errors.ErrorT | 400, 403 | application/json |
927
- | errors.ErrorT | 500 | application/json |
928
- | errors.APIError | 4XX, 5XX | \*/\* |
929
-
930
- ## delete
931
-
932
- Delete an existing AI Config.
933
-
934
- ### Example Usage
935
-
936
- ```typescript
937
- import { LaunchDarkly } from "@launchdarkly/mcp-server";
938
-
939
- const launchDarkly = new LaunchDarkly({
940
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
941
- });
942
-
943
- async function run() {
944
- await launchDarkly.aiConfigs.delete({
945
- ldAPIVersion: "beta",
946
- projectKey: "default",
947
- configKey: "<value>",
948
- });
949
-
950
-
951
- }
952
-
953
- run();
954
- ```
955
-
956
- ### Standalone function
957
-
958
- The standalone function version of this method:
959
-
960
- ```typescript
961
- import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
962
- import { aiConfigsDelete } from "@launchdarkly/mcp-server/funcs/aiConfigsDelete.js";
963
-
964
- // Use `LaunchDarklyCore` for best tree-shaking performance.
965
- // You can create one instance of it to use across an application.
966
- const launchDarkly = new LaunchDarklyCore({
967
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
968
- });
969
-
970
- async function run() {
971
- const res = await aiConfigsDelete(launchDarkly, {
972
- ldAPIVersion: "beta",
973
- projectKey: "default",
974
- configKey: "<value>",
975
- });
976
- if (res.ok) {
977
- const { value: result } = res;
978
-
979
- } else {
980
- console.log("aiConfigsDelete failed:", res.error);
981
- }
982
- }
983
-
984
- run();
985
- ```
986
-
987
- ### Parameters
988
-
989
- | Parameter | Type | Required | Description |
990
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
991
- | `request` | [operations.DeleteAIConfigRequest](../../models/operations/deleteaiconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. |
992
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
993
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
994
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
995
-
996
- ### Response
997
-
998
- **Promise\<void\>**
999
-
1000
- ### Errors
1001
-
1002
- | Error Type | Status Code | Content Type |
1003
- | ---------------- | ---------------- | ---------------- |
1004
- | errors.ErrorT | 400, 403, 404 | application/json |
1005
- | errors.ErrorT | 500 | application/json |
1006
- | errors.APIError | 4XX, 5XX | \*/\* |
1007
-
1008
- ## get
1009
-
1010
- Retrieve a specific AI Config by its key.
1011
-
1012
- ### Example Usage
1013
-
1014
- ```typescript
1015
- import { LaunchDarkly } from "@launchdarkly/mcp-server";
1016
-
1017
- const launchDarkly = new LaunchDarkly({
1018
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
1019
- });
1020
-
1021
- async function run() {
1022
- const result = await launchDarkly.aiConfigs.get({
1023
- ldAPIVersion: "beta",
1024
- projectKey: "<value>",
1025
- configKey: "<value>",
1026
- });
1027
-
1028
- console.log(result);
1029
- }
1030
-
1031
- run();
1032
- ```
1033
-
1034
- ### Standalone function
1035
-
1036
- The standalone function version of this method:
1037
-
1038
- ```typescript
1039
- import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
1040
- import { aiConfigsGet } from "@launchdarkly/mcp-server/funcs/aiConfigsGet.js";
1041
-
1042
- // Use `LaunchDarklyCore` for best tree-shaking performance.
1043
- // You can create one instance of it to use across an application.
1044
- const launchDarkly = new LaunchDarklyCore({
1045
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
1046
- });
1047
-
1048
- async function run() {
1049
- const res = await aiConfigsGet(launchDarkly, {
1050
- ldAPIVersion: "beta",
1051
- projectKey: "<value>",
1052
- configKey: "<value>",
1053
- });
1054
- if (res.ok) {
1055
- const { value: result } = res;
1056
- console.log(result);
1057
- } else {
1058
- console.log("aiConfigsGet failed:", res.error);
1059
- }
1060
- }
1061
-
1062
- run();
1063
- ```
1064
-
1065
- ### Parameters
1066
-
1067
- | Parameter | Type | Required | Description |
1068
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1069
- | `request` | [operations.GetAIConfigRequest](../../models/operations/getaiconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1070
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1071
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
1072
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1073
-
1074
- ### Response
1075
-
1076
- **Promise\<[components.AIConfig](../../models/components/aiconfig.md)\>**
1077
-
1078
- ### Errors
1079
-
1080
- | Error Type | Status Code | Content Type |
1081
- | ---------------- | ---------------- | ---------------- |
1082
- | errors.ErrorT | 400, 403, 404 | application/json |
1083
- | errors.ErrorT | 500 | application/json |
1084
- | errors.APIError | 4XX, 5XX | \*/\* |
1085
-
1086
- ## update
1087
-
1088
- Edit an existing AI Config.
1089
-
1090
- The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields.
1091
-
1092
- Here's an example:
1093
- ```
1094
- {
1095
- "description": "Example updated description",
1096
- "tags": ["new-tag"]
1097
- }
1098
- ```
1099
-
1100
-
1101
- ### Example Usage
1102
-
1103
- ```typescript
1104
- import { LaunchDarkly } from "@launchdarkly/mcp-server";
1105
-
1106
- const launchDarkly = new LaunchDarkly({
1107
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
1108
- });
1109
-
1110
- async function run() {
1111
- const result = await launchDarkly.aiConfigs.update({
1112
- ldAPIVersion: "beta",
1113
- projectKey: "<value>",
1114
- configKey: "<value>",
1115
- aiConfigPatch: {
1116
- description: "description",
1117
- maintainerId: "maintainerId",
1118
- maintainerTeamKey: "maintainerTeamKey",
1119
- name: "name",
1120
- tags: [
1121
- "tags",
1122
- "tags",
1123
- ],
1124
- },
1125
- });
1126
-
1127
- console.log(result);
1128
- }
1129
-
1130
- run();
1131
- ```
1132
-
1133
- ### Standalone function
1134
-
1135
- The standalone function version of this method:
1136
-
1137
- ```typescript
1138
- import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
1139
- import { aiConfigsUpdate } from "@launchdarkly/mcp-server/funcs/aiConfigsUpdate.js";
1140
-
1141
- // Use `LaunchDarklyCore` for best tree-shaking performance.
1142
- // You can create one instance of it to use across an application.
1143
- const launchDarkly = new LaunchDarklyCore({
1144
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
1145
- });
1146
-
1147
- async function run() {
1148
- const res = await aiConfigsUpdate(launchDarkly, {
1149
- ldAPIVersion: "beta",
1150
- projectKey: "<value>",
1151
- configKey: "<value>",
1152
- aiConfigPatch: {
1153
- description: "description",
1154
- maintainerId: "maintainerId",
1155
- maintainerTeamKey: "maintainerTeamKey",
1156
- name: "name",
1157
- tags: [
1158
- "tags",
1159
- "tags",
1160
- ],
1161
- },
1162
- });
1163
- if (res.ok) {
1164
- const { value: result } = res;
1165
- console.log(result);
1166
- } else {
1167
- console.log("aiConfigsUpdate failed:", res.error);
1168
- }
1169
- }
1170
-
1171
- run();
1172
- ```
1173
-
1174
- ### Parameters
1175
-
1176
- | Parameter | Type | Required | Description |
1177
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1178
- | `request` | [operations.PatchAIConfigRequest](../../models/operations/patchaiconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1179
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1180
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
1181
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1182
-
1183
- ### Response
1184
-
1185
- **Promise\<[components.AIConfig](../../models/components/aiconfig.md)\>**
1186
-
1187
- ### Errors
1188
-
1189
- | Error Type | Status Code | Content Type |
1190
- | ---------------- | ---------------- | ---------------- |
1191
- | errors.ErrorT | 400, 403, 404 | application/json |
1192
- | errors.ErrorT | 500 | application/json |
1193
- | errors.APIError | 4XX, 5XX | \*/\* |
1194
-
1195
- ## createVariation
1196
-
1197
- Create a new variation for a given AI Config.
1198
-
1199
- The <code>model</code> in the request body requires a <code>modelName</code> and <code>parameters</code>, for example:
1200
-
1201
- ```
1202
- "model": {
1203
- "modelName": "claude-3-opus-20240229",
1204
- "parameters": {
1205
- "max_tokens": 1024
1206
- }
1207
- }
1208
- ```
1209
-
1210
-
1211
- ### Example Usage
1212
-
1213
- ```typescript
1214
- import { LaunchDarkly } from "@launchdarkly/mcp-server";
1215
-
1216
- const launchDarkly = new LaunchDarkly({
1217
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
1218
- });
1219
-
1220
- async function run() {
1221
- const result = await launchDarkly.aiConfigs.createVariation({
1222
- ldAPIVersion: "beta",
1223
- projectKey: "<value>",
1224
- configKey: "<value>",
1225
- aiConfigVariationPost: {
1226
- comment: "comment",
1227
- description: "description",
1228
- instructions: "instructions",
1229
- key: "key",
1230
- messages: [
1231
- {
1232
- content: "content",
1233
- role: "role",
1234
- },
1235
- {
1236
- content: "content",
1237
- role: "role",
1238
- },
1239
- ],
1240
- model: {},
1241
- name: "name",
1242
- modelConfigKey: "modelConfigKey",
1243
- },
1244
- });
1245
-
1246
- console.log(result);
1247
- }
1248
-
1249
- run();
1250
- ```
1251
-
1252
- ### Standalone function
1253
-
1254
- The standalone function version of this method:
1255
-
1256
- ```typescript
1257
- import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
1258
- import { aiConfigsCreateVariation } from "@launchdarkly/mcp-server/funcs/aiConfigsCreateVariation.js";
1259
-
1260
- // Use `LaunchDarklyCore` for best tree-shaking performance.
1261
- // You can create one instance of it to use across an application.
1262
- const launchDarkly = new LaunchDarklyCore({
1263
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
1264
- });
1265
-
1266
- async function run() {
1267
- const res = await aiConfigsCreateVariation(launchDarkly, {
1268
- ldAPIVersion: "beta",
1269
- projectKey: "<value>",
1270
- configKey: "<value>",
1271
- aiConfigVariationPost: {
1272
- comment: "comment",
1273
- description: "description",
1274
- instructions: "instructions",
1275
- key: "key",
1276
- messages: [
1277
- {
1278
- content: "content",
1279
- role: "role",
1280
- },
1281
- {
1282
- content: "content",
1283
- role: "role",
1284
- },
1285
- ],
1286
- model: {},
1287
- name: "name",
1288
- modelConfigKey: "modelConfigKey",
1289
- },
1290
- });
1291
- if (res.ok) {
1292
- const { value: result } = res;
1293
- console.log(result);
1294
- } else {
1295
- console.log("aiConfigsCreateVariation failed:", res.error);
1296
- }
1297
- }
1298
-
1299
- run();
1300
- ```
1301
-
1302
- ### Parameters
1303
-
1304
- | Parameter | Type | Required | Description |
1305
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1306
- | `request` | [operations.PostAIConfigVariationRequest](../../models/operations/postaiconfigvariationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1307
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1308
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
1309
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1310
-
1311
- ### Response
1312
-
1313
- **Promise\<[components.AIConfigVariation](../../models/components/aiconfigvariation.md)\>**
1314
-
1315
- ### Errors
1316
-
1317
- | Error Type | Status Code | Content Type |
1318
- | ---------------- | ---------------- | ---------------- |
1319
- | errors.ErrorT | 400, 403 | application/json |
1320
- | errors.ErrorT | 500 | application/json |
1321
- | errors.APIError | 4XX, 5XX | \*/\* |
1322
-
1323
- ## deleteVariation
1324
-
1325
- Delete a specific variation of an AI Config by config key and variation key.
1326
-
1327
- ### Example Usage
1328
-
1329
- ```typescript
1330
- import { LaunchDarkly } from "@launchdarkly/mcp-server";
1331
-
1332
- const launchDarkly = new LaunchDarkly({
1333
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
1334
- });
1335
-
1336
- async function run() {
1337
- await launchDarkly.aiConfigs.deleteVariation({
1338
- ldAPIVersion: "beta",
1339
- projectKey: "<value>",
1340
- configKey: "<value>",
1341
- variationKey: "<value>",
1342
- });
1343
-
1344
-
1345
- }
1346
-
1347
- run();
1348
- ```
1349
-
1350
- ### Standalone function
1351
-
1352
- The standalone function version of this method:
1353
-
1354
- ```typescript
1355
- import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
1356
- import { aiConfigsDeleteVariation } from "@launchdarkly/mcp-server/funcs/aiConfigsDeleteVariation.js";
1357
-
1358
- // Use `LaunchDarklyCore` for best tree-shaking performance.
1359
- // You can create one instance of it to use across an application.
1360
- const launchDarkly = new LaunchDarklyCore({
1361
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
1362
- });
1363
-
1364
- async function run() {
1365
- const res = await aiConfigsDeleteVariation(launchDarkly, {
1366
- ldAPIVersion: "beta",
1367
- projectKey: "<value>",
1368
- configKey: "<value>",
1369
- variationKey: "<value>",
1370
- });
1371
- if (res.ok) {
1372
- const { value: result } = res;
1373
-
1374
- } else {
1375
- console.log("aiConfigsDeleteVariation failed:", res.error);
1376
- }
1377
- }
1378
-
1379
- run();
1380
- ```
1381
-
1382
- ### Parameters
1383
-
1384
- | Parameter | Type | Required | Description |
1385
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1386
- | `request` | [operations.DeleteAIConfigVariationRequest](../../models/operations/deleteaiconfigvariationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1387
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1388
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
1389
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1390
-
1391
- ### Response
1392
-
1393
- **Promise\<void\>**
1394
-
1395
- ### Errors
1396
-
1397
- | Error Type | Status Code | Content Type |
1398
- | ---------------- | ---------------- | ---------------- |
1399
- | errors.ErrorT | 400, 403, 404 | application/json |
1400
- | errors.ErrorT | 500 | application/json |
1401
- | errors.APIError | 4XX, 5XX | \*/\* |
1402
-
1403
- ## getVariation
1404
-
1405
- Get an AI Config variation by key. The response includes all variation versions for the given variation key.
1406
-
1407
- ### Example Usage
1408
-
1409
- ```typescript
1410
- import { LaunchDarkly } from "@launchdarkly/mcp-server";
1411
-
1412
- const launchDarkly = new LaunchDarkly({
1413
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
1414
- });
1415
-
1416
- async function run() {
1417
- const result = await launchDarkly.aiConfigs.getVariation({
1418
- ldAPIVersion: "beta",
1419
- projectKey: "default",
1420
- configKey: "default",
1421
- variationKey: "default",
1422
- });
1423
-
1424
- console.log(result);
1425
- }
1426
-
1427
- run();
1428
- ```
1429
-
1430
- ### Standalone function
1431
-
1432
- The standalone function version of this method:
1433
-
1434
- ```typescript
1435
- import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
1436
- import { aiConfigsGetVariation } from "@launchdarkly/mcp-server/funcs/aiConfigsGetVariation.js";
1437
-
1438
- // Use `LaunchDarklyCore` for best tree-shaking performance.
1439
- // You can create one instance of it to use across an application.
1440
- const launchDarkly = new LaunchDarklyCore({
1441
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
1442
- });
1443
-
1444
- async function run() {
1445
- const res = await aiConfigsGetVariation(launchDarkly, {
1446
- ldAPIVersion: "beta",
1447
- projectKey: "default",
1448
- configKey: "default",
1449
- variationKey: "default",
1450
- });
1451
- if (res.ok) {
1452
- const { value: result } = res;
1453
- console.log(result);
1454
- } else {
1455
- console.log("aiConfigsGetVariation failed:", res.error);
1456
- }
1457
- }
1458
-
1459
- run();
1460
- ```
1461
-
1462
- ### Parameters
1463
-
1464
- | Parameter | Type | Required | Description |
1465
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1466
- | `request` | [operations.GetAIConfigVariationRequest](../../models/operations/getaiconfigvariationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1467
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1468
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
1469
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1470
-
1471
- ### Response
1472
-
1473
- **Promise\<[components.AIConfigVariationsResponse](../../models/components/aiconfigvariationsresponse.md)\>**
1474
-
1475
- ### Errors
1476
-
1477
- | Error Type | Status Code | Content Type |
1478
- | ---------------- | ---------------- | ---------------- |
1479
- | errors.ErrorT | 400, 403, 404 | application/json |
1480
- | errors.ErrorT | 500 | application/json |
1481
- | errors.APIError | 4XX, 5XX | \*/\* |
1482
-
1483
- ## updateVariation
1484
-
1485
- Edit an existing variation of an AI Config. This creates a new version of the variation.
1486
-
1487
- The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields.
1488
-
1489
- Here's an example:
1490
- ```
1491
- {
1492
- "messages": [
1493
- {
1494
- "role": "system",
1495
- "content": "The new message"
1496
- }
1497
- ]
1498
- }
1499
- ```
1500
-
1501
-
1502
- ### Example Usage
1503
-
1504
- ```typescript
1505
- import { LaunchDarkly } from "@launchdarkly/mcp-server";
1506
-
1507
- const launchDarkly = new LaunchDarkly({
1508
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
1509
- });
1510
-
1511
- async function run() {
1512
- const result = await launchDarkly.aiConfigs.updateVariation({
1513
- ldAPIVersion: "beta",
1514
- projectKey: "<value>",
1515
- configKey: "<value>",
1516
- variationKey: "<value>",
1517
- aiConfigVariationPatch: {
1518
- comment: "comment",
1519
- description: "description",
1520
- instructions: "instructions",
1521
- messages: [
1522
- {
1523
- content: "content",
1524
- role: "role",
1525
- },
1526
- {
1527
- content: "content",
1528
- role: "role",
1529
- },
1530
- ],
1531
- model: {},
1532
- modelConfigKey: "modelConfigKey",
1533
- name: "name",
1534
- published: true,
1535
- state: "state",
1536
- },
1537
- });
1538
-
1539
- console.log(result);
1540
- }
1541
-
1542
- run();
1543
- ```
1544
-
1545
- ### Standalone function
1546
-
1547
- The standalone function version of this method:
1548
-
1549
- ```typescript
1550
- import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
1551
- import { aiConfigsUpdateVariation } from "@launchdarkly/mcp-server/funcs/aiConfigsUpdateVariation.js";
1552
-
1553
- // Use `LaunchDarklyCore` for best tree-shaking performance.
1554
- // You can create one instance of it to use across an application.
1555
- const launchDarkly = new LaunchDarklyCore({
1556
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
1557
- });
1558
-
1559
- async function run() {
1560
- const res = await aiConfigsUpdateVariation(launchDarkly, {
1561
- ldAPIVersion: "beta",
1562
- projectKey: "<value>",
1563
- configKey: "<value>",
1564
- variationKey: "<value>",
1565
- aiConfigVariationPatch: {
1566
- comment: "comment",
1567
- description: "description",
1568
- instructions: "instructions",
1569
- messages: [
1570
- {
1571
- content: "content",
1572
- role: "role",
1573
- },
1574
- {
1575
- content: "content",
1576
- role: "role",
1577
- },
1578
- ],
1579
- model: {},
1580
- modelConfigKey: "modelConfigKey",
1581
- name: "name",
1582
- published: true,
1583
- state: "state",
1584
- },
1585
- });
1586
- if (res.ok) {
1587
- const { value: result } = res;
1588
- console.log(result);
1589
- } else {
1590
- console.log("aiConfigsUpdateVariation failed:", res.error);
1591
- }
1592
- }
1593
-
1594
- run();
1595
- ```
1596
-
1597
- ### Parameters
1598
-
1599
- | Parameter | Type | Required | Description |
1600
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1601
- | `request` | [operations.PatchAIConfigVariationRequest](../../models/operations/patchaiconfigvariationrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1602
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1603
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
1604
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1605
-
1606
- ### Response
1607
-
1608
- **Promise\<[components.AIConfigVariation](../../models/components/aiconfigvariation.md)\>**
1609
-
1610
- ### Errors
1611
-
1612
- | Error Type | Status Code | Content Type |
1613
- | ---------------- | ---------------- | ---------------- |
1614
- | errors.ErrorT | 400, 403, 404 | application/json |
1615
- | errors.ErrorT | 500 | application/json |
1616
- | errors.APIError | 4XX, 5XX | \*/\* |