@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,1808 +0,0 @@
1
- # FeatureFlags
2
- (*featureFlags*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [getStatus](#getstatus) - Get flag status across environments
9
- * [list](#list) - List feature flags
10
- * [create](#create) - Create a feature flag
11
- * [get](#get) - Get feature flag
12
- * [patch](#patch) - Update feature flag
13
- * [delete](#delete) - Delete feature flag
14
-
15
- ## getStatus
16
-
17
- Get the status for a particular feature flag across environments.
18
-
19
- ### Example Usage
20
-
21
- ```typescript
22
- import { LaunchDarkly } from "@launchdarkly/mcp-server";
23
-
24
- const launchDarkly = new LaunchDarkly({
25
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
26
- });
27
-
28
- async function run() {
29
- const result = await launchDarkly.featureFlags.getStatus({
30
- projectKey: "<value>",
31
- featureFlagKey: "<value>",
32
- });
33
-
34
- console.log(result);
35
- }
36
-
37
- run();
38
- ```
39
-
40
- ### Standalone function
41
-
42
- The standalone function version of this method:
43
-
44
- ```typescript
45
- import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
46
- import { featureFlagsGetStatus } from "@launchdarkly/mcp-server/funcs/featureFlagsGetStatus.js";
47
-
48
- // Use `LaunchDarklyCore` for best tree-shaking performance.
49
- // You can create one instance of it to use across an application.
50
- const launchDarkly = new LaunchDarklyCore({
51
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
52
- });
53
-
54
- async function run() {
55
- const res = await featureFlagsGetStatus(launchDarkly, {
56
- projectKey: "<value>",
57
- featureFlagKey: "<value>",
58
- });
59
- if (res.ok) {
60
- const { value: result } = res;
61
- console.log(result);
62
- } else {
63
- console.log("featureFlagsGetStatus failed:", res.error);
64
- }
65
- }
66
-
67
- run();
68
- ```
69
-
70
- ### Parameters
71
-
72
- | Parameter | Type | Required | Description |
73
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
74
- | `request` | [operations.GetFeatureFlagStatusAcrossEnvironmentsRequest](../../models/operations/getfeatureflagstatusacrossenvironmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
75
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
76
- | `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. |
77
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
78
-
79
- ### Response
80
-
81
- **Promise\<[components.FeatureFlagStatusAcrossEnvironments](../../models/components/featureflagstatusacrossenvironments.md)\>**
82
-
83
- ### Errors
84
-
85
- | Error Type | Status Code | Content Type |
86
- | --------------------------- | --------------------------- | --------------------------- |
87
- | errors.UnauthorizedErrorRep | 401 | application/json |
88
- | errors.ForbiddenErrorRep | 403 | application/json |
89
- | errors.NotFoundErrorRep | 404 | application/json |
90
- | errors.RateLimitedErrorRep | 429 | application/json |
91
- | errors.APIError | 4XX, 5XX | \*/\* |
92
-
93
- ## list
94
-
95
- Get a list of all feature flags in the given project. You can include information specific to different environments by adding `env` query parameter. For example, setting `env=production` adds configuration details about your production environment to the response. You can also filter feature flags by tag with the `tag` query parameter.
96
-
97
- > #### Recommended use
98
- >
99
- > This endpoint can return a large amount of information. We recommend using some or all of these query parameters to decrease response time and overall payload size: `limit`, `env`, `query`, and `filter=creationDate`.
100
-
101
- ### Filtering flags
102
-
103
- You can filter on certain fields using the `filter` query parameter. For example, setting `filter=query:dark-mode,tags:beta+test` matches flags with the string `dark-mode` in their key or name, ignoring case, which also have the tags `beta` and `test`.
104
-
105
- The `filter` query parameter supports the following arguments:
106
-
107
- | Filter argument | Description | Example |
108
- |-----------------------|-------------|----------------------|
109
- | `applicationEvaluated` | A string. It filters the list to flags that are evaluated in the application with the given key. | `filter=applicationEvaluated:com.launchdarkly.cafe` |
110
- | `archived` | (deprecated) A boolean value. It filters the list to archived flags. | Use `filter=state:archived` instead |
111
- | `contextKindsEvaluated` | A `+`-separated list of context kind keys. It filters the list to flags which have been evaluated in the past 30 days for all of the context kinds in the list. | `filter=contextKindsEvaluated:user+application` |
112
- | `codeReferences.max` | An integer value. Use `0` to return flags that do not have code references. | `filter=codeReferences.max:0` |
113
- | `codeReferences.min` | An integer value. Use `1` to return flags that do have code references. | `filter=codeReferences.min:1` |
114
- | `creationDate` | An object with an optional `before` field whose value is Unix time in milliseconds. It filters the list to flags created before the date. | `filter=creationDate:{"before":1690527600000}` |
115
- | `evaluated` | An object that contains a key of `after` and a value in Unix time in milliseconds. It filters the list to all flags that have been evaluated since the time you specify, in the environment provided. This filter requires the `filterEnv` filter. | `filter=evaluated:{"after":1690527600000},filterEnv:production` |
116
- | `filterEnv` | A valid environment key. You must use this field for filters that are environment-specific. If there are multiple environment-specific filters, you only need to include this field once. | `filter=evaluated:{"after": 1590768455282},filterEnv:production` |
117
- | `guardedRollout` | A string, one of `any`, `monitoring`, `regressed`, `rolledBack`, `completed`, `archived`. It filters the list to flags that are part of guarded rollouts. | `filter=guardedRollout:monitoring` |
118
- | `hasExperiment` | A boolean value. It filters the list to flags that are used in an experiment. | `filter=hasExperiment:true` |
119
- | `maintainerId` | A valid member ID. It filters the list to flags that are maintained by this member. | `filter=maintainerId:12ab3c45de678910abc12345` |
120
- | `maintainerTeamKey` | A string. It filters the list to flags that are maintained by the team with this key. | `filter=maintainerTeamKey:example-team-key` |
121
- | `query` | A string. It filters the list to flags that include the specified string in their key or name. It is not case sensitive. | `filter=query:example` |
122
- | `releasePipeline` | A release pipeline key. It filters the list to flags that are either currently active in the release pipeline or have completed the release pipeline. | `filter=releasePipeline:default-release-pipeline` |
123
- | `state` | A string, either `live`, `deprecated`, or `archived`. It filters the list to flags in this state. | `filter=state:archived` |
124
- | `sdkAvailability` | A string, one of `client`, `mobile`, `anyClient`, `server`. Using `client` filters the list to flags whose client-side SDK availability is set to use the client-side ID. Using `mobile` filters to flags set to use the mobile key. Using `anyClient` filters to flags set to use either the client-side ID or the mobile key. Using `server` filters to flags set to use neither, that is, to flags only available in server-side SDKs. | `filter=sdkAvailability:client` |
125
- | `tags` | A `+`-separated list of tags. It filters the list to flags that have all of the tags in the list. | `filter=tags:beta+test` |
126
- | `type` | A string, either `temporary` or `permanent`. It filters the list to flags with the specified type. | `filter=type:permanent` |
127
-
128
- The documented values for the `filter` query are prior to URL encoding. For example, the `+` in `filter=tags:beta+test` must be encoded to `%2B`.
129
-
130
- By default, this endpoint returns all flags. You can page through the list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the returned `_links` field. These links will not be present if the pages they refer to don't exist. For example, the `first` and `prev` links will be missing from the response on the first page.
131
-
132
- ### Sorting flags
133
-
134
- You can sort flags based on the following fields:
135
-
136
- - `creationDate` sorts by the creation date of the flag.
137
- - `key` sorts by the key of the flag.
138
- - `maintainerId` sorts by the flag maintainer.
139
- - `name` sorts by flag name.
140
- - `tags` sorts by tags.
141
- - `targetingModifiedDate` sorts by the date that the flag's targeting rules were last modified in a given environment. It must be used with `env` parameter and it can not be combined with any other sort. If multiple `env` values are provided, it will perform sort using the first one. For example, `sort=-targetingModifiedDate&env=production&env=staging` returns results sorted by `targetingModifiedDate` for the `production` environment.
142
- - `type` sorts by flag type
143
-
144
- All fields are sorted in ascending order by default. To sort in descending order, prefix the field with a dash ( - ). For example, `sort=-name` sorts the response by flag name in descending order.
145
-
146
- ### Expanding response
147
-
148
- LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields:
149
-
150
- - `codeReferences` includes code references for the feature flag
151
- - `evaluation` includes evaluation information within returned environments, including which context kinds the flag has been evaluated for in the past 30 days
152
- - `migrationSettings` includes migration settings information within the flag and within returned environments. These settings are only included for migration flags, that is, where `purpose` is `migration`.
153
-
154
- For example, `expand=evaluation` includes the `evaluation` field in the response.
155
-
156
- ### Migration flags
157
- For migration flags, the cohort information is included in the `rules` property of a flag's response, and default cohort information is included in the `fallthrough` property of a flag's response.
158
- To learn more, read [Migration Flags](https://launchdarkly.com/docs/home/flags/migration).
159
-
160
-
161
- ### Example Usage
162
-
163
- ```typescript
164
- import { LaunchDarkly } from "@launchdarkly/mcp-server";
165
-
166
- const launchDarkly = new LaunchDarkly({
167
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
168
- });
169
-
170
- async function run() {
171
- const result = await launchDarkly.featureFlags.list({
172
- projectKey: "<value>",
173
- });
174
-
175
- console.log(result);
176
- }
177
-
178
- run();
179
- ```
180
-
181
- ### Standalone function
182
-
183
- The standalone function version of this method:
184
-
185
- ```typescript
186
- import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
187
- import { featureFlagsList } from "@launchdarkly/mcp-server/funcs/featureFlagsList.js";
188
-
189
- // Use `LaunchDarklyCore` for best tree-shaking performance.
190
- // You can create one instance of it to use across an application.
191
- const launchDarkly = new LaunchDarklyCore({
192
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
193
- });
194
-
195
- async function run() {
196
- const res = await featureFlagsList(launchDarkly, {
197
- projectKey: "<value>",
198
- });
199
- if (res.ok) {
200
- const { value: result } = res;
201
- console.log(result);
202
- } else {
203
- console.log("featureFlagsList failed:", res.error);
204
- }
205
- }
206
-
207
- run();
208
- ```
209
-
210
- ### Parameters
211
-
212
- | Parameter | Type | Required | Description |
213
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
214
- | `request` | [operations.GetFeatureFlagsRequest](../../models/operations/getfeatureflagsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
215
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
216
- | `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. |
217
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
218
-
219
- ### Response
220
-
221
- **Promise\<[components.FeatureFlags](../../models/components/featureflags.md)\>**
222
-
223
- ### Errors
224
-
225
- | Error Type | Status Code | Content Type |
226
- | ----------------------------- | ----------------------------- | ----------------------------- |
227
- | errors.InvalidRequestErrorRep | 400 | application/json |
228
- | errors.UnauthorizedErrorRep | 401 | application/json |
229
- | errors.ForbiddenErrorRep | 403 | application/json |
230
- | errors.NotFoundErrorRep | 404 | application/json |
231
- | errors.RateLimitedErrorRep | 429 | application/json |
232
- | errors.APIError | 4XX, 5XX | \*/\* |
233
-
234
- ## create
235
-
236
- Create a feature flag with the given name, key, and variations.
237
-
238
- <details>
239
- <summary>Click to expand instructions for <strong>creating a migration flag</strong></summary>
240
-
241
- ### Creating a migration flag
242
-
243
- When you create a migration flag, the variations are pre-determined based on the number of stages in the migration.
244
-
245
- To create a migration flag, omit the `variations` and `defaults` information. Instead, provide a `purpose` of `migration`, and `migrationSettings`. If you create a migration flag with six stages, `contextKind` is required. Otherwise, it should be omitted.
246
-
247
- Here's an example:
248
-
249
- ```json
250
- {
251
- "key": "flag-key-123",
252
- "purpose": "migration",
253
- "migrationSettings": {
254
- "stageCount": 6,
255
- "contextKind": "account"
256
- }
257
- }
258
- ```
259
-
260
- To learn more, read [Migration Flags](https://launchdarkly.com/docs/home/flags/migration).
261
-
262
- </details>
263
-
264
-
265
- ### Example Usage
266
-
267
- ```typescript
268
- import { LaunchDarkly } from "@launchdarkly/mcp-server";
269
-
270
- const launchDarkly = new LaunchDarkly({
271
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
272
- });
273
-
274
- async function run() {
275
- const result = await launchDarkly.featureFlags.create({
276
- projectKey: "<value>",
277
- featureFlagBody: {
278
- name: "My Flag",
279
- key: "flag-key-123abc",
280
- clientSideAvailability: {
281
- usingEnvironmentId: true,
282
- usingMobileKey: true,
283
- },
284
- },
285
- });
286
-
287
- console.log(result);
288
- }
289
-
290
- run();
291
- ```
292
-
293
- ### Standalone function
294
-
295
- The standalone function version of this method:
296
-
297
- ```typescript
298
- import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
299
- import { featureFlagsCreate } from "@launchdarkly/mcp-server/funcs/featureFlagsCreate.js";
300
-
301
- // Use `LaunchDarklyCore` for best tree-shaking performance.
302
- // You can create one instance of it to use across an application.
303
- const launchDarkly = new LaunchDarklyCore({
304
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
305
- });
306
-
307
- async function run() {
308
- const res = await featureFlagsCreate(launchDarkly, {
309
- projectKey: "<value>",
310
- featureFlagBody: {
311
- name: "My Flag",
312
- key: "flag-key-123abc",
313
- clientSideAvailability: {
314
- usingEnvironmentId: true,
315
- usingMobileKey: true,
316
- },
317
- },
318
- });
319
- if (res.ok) {
320
- const { value: result } = res;
321
- console.log(result);
322
- } else {
323
- console.log("featureFlagsCreate failed:", res.error);
324
- }
325
- }
326
-
327
- run();
328
- ```
329
-
330
- ### Parameters
331
-
332
- | Parameter | Type | Required | Description |
333
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
334
- | `request` | [operations.PostFeatureFlagRequest](../../models/operations/postfeatureflagrequest.md) | :heavy_check_mark: | The request object to use for the request. |
335
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
336
- | `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. |
337
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
338
-
339
- ### Response
340
-
341
- **Promise\<[components.FeatureFlag](../../models/components/featureflag.md)\>**
342
-
343
- ### Errors
344
-
345
- | Error Type | Status Code | Content Type |
346
- | ----------------------------- | ----------------------------- | ----------------------------- |
347
- | errors.InvalidRequestErrorRep | 400 | application/json |
348
- | errors.UnauthorizedErrorRep | 401 | application/json |
349
- | errors.StatusConflictErrorRep | 409 | application/json |
350
- | errors.RateLimitedErrorRep | 429 | application/json |
351
- | errors.APIError | 4XX, 5XX | \*/\* |
352
-
353
- ## get
354
-
355
- Get a single feature flag by key. By default, this returns the configurations for all environments. You can filter environments with the `env` query parameter. For example, setting `env=production` restricts the returned configurations to just the `production` environment.
356
-
357
- > #### Recommended use
358
- >
359
- > This endpoint can return a large amount of information. Specifying one or multiple environments with the `env` parameter can decrease response time and overall payload size. We recommend using this parameter to return only the environments relevant to your query.
360
-
361
- ### Expanding response
362
-
363
- LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields:
364
-
365
- - `evaluation` includes evaluation information within returned environments, including which context kinds the flag has been evaluated for in the past 30 days
366
- - `migrationSettings` includes migration settings information within the flag and within returned environments. These settings are only included for migration flags, that is, where `purpose` is `migration`.
367
-
368
- For example, `expand=evaluation` includes the `evaluation` field in the response.
369
-
370
-
371
- ### Example Usage
372
-
373
- ```typescript
374
- import { LaunchDarkly } from "@launchdarkly/mcp-server";
375
-
376
- const launchDarkly = new LaunchDarkly({
377
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
378
- });
379
-
380
- async function run() {
381
- const result = await launchDarkly.featureFlags.get({
382
- projectKey: "<value>",
383
- featureFlagKey: "<value>",
384
- });
385
-
386
- console.log(result);
387
- }
388
-
389
- run();
390
- ```
391
-
392
- ### Standalone function
393
-
394
- The standalone function version of this method:
395
-
396
- ```typescript
397
- import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
398
- import { featureFlagsGet } from "@launchdarkly/mcp-server/funcs/featureFlagsGet.js";
399
-
400
- // Use `LaunchDarklyCore` for best tree-shaking performance.
401
- // You can create one instance of it to use across an application.
402
- const launchDarkly = new LaunchDarklyCore({
403
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
404
- });
405
-
406
- async function run() {
407
- const res = await featureFlagsGet(launchDarkly, {
408
- projectKey: "<value>",
409
- featureFlagKey: "<value>",
410
- });
411
- if (res.ok) {
412
- const { value: result } = res;
413
- console.log(result);
414
- } else {
415
- console.log("featureFlagsGet failed:", res.error);
416
- }
417
- }
418
-
419
- run();
420
- ```
421
-
422
- ### Parameters
423
-
424
- | Parameter | Type | Required | Description |
425
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
426
- | `request` | [operations.GetFeatureFlagRequest](../../models/operations/getfeatureflagrequest.md) | :heavy_check_mark: | The request object to use for the request. |
427
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
428
- | `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. |
429
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
430
-
431
- ### Response
432
-
433
- **Promise\<[components.FeatureFlag](../../models/components/featureflag.md)\>**
434
-
435
- ### Errors
436
-
437
- | Error Type | Status Code | Content Type |
438
- | --------------------------- | --------------------------- | --------------------------- |
439
- | errors.UnauthorizedErrorRep | 401 | application/json |
440
- | errors.ForbiddenErrorRep | 403 | application/json |
441
- | errors.NotFoundErrorRep | 404 | application/json |
442
- | errors.RateLimitedErrorRep | 429 | application/json |
443
- | errors.APIError | 4XX, 5XX | \*/\* |
444
-
445
- ## patch
446
-
447
- Perform a partial update to a feature flag. The request body must be a valid semantic patch, JSON patch, or JSON merge patch. To learn more the different formats, read [Updates](https://launchdarkly.com/docs/api#updates).
448
-
449
- ### Using semantic patches on a feature flag
450
-
451
- 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).
452
-
453
- The body of a semantic patch request for updating feature flags takes the following properties:
454
-
455
- * `comment` (string): (Optional) A description of the update.
456
- * `environmentKey` (string): (Required for some instructions only) The key of the LaunchDarkly environment.
457
- * `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.
458
-
459
- ### Instructions
460
-
461
- Semantic patch requests support the following `kind` instructions for updating feature flags.
462
-
463
- <details>
464
- <summary>Click to expand instructions for <strong>turning flags on and off</strong></summary>
465
-
466
- These instructions require the `environmentKey` parameter.
467
-
468
- #### turnFlagOff
469
-
470
- Sets the flag's targeting state to **Off**.
471
-
472
- Here's an example:
473
-
474
- ```json
475
- {
476
- "environmentKey": "environment-key-123abc",
477
- "instructions": [ { "kind": "turnFlagOff" } ]
478
- }
479
- ```
480
-
481
- #### turnFlagOn
482
-
483
- Sets the flag's targeting state to **On**.
484
-
485
- Here's an example:
486
-
487
- ```json
488
- {
489
- "environmentKey": "environment-key-123abc",
490
- "instructions": [ { "kind": "turnFlagOn" } ]
491
- }
492
- ```
493
-
494
- </details><br />
495
-
496
- <details>
497
- <summary>Click to expand instructions for <strong>working with targeting and variations</strong></summary>
498
-
499
- These instructions require the `environmentKey` parameter.
500
-
501
- Several of the instructions for working with targeting and variations require flag rule IDs, variation IDs, or clause IDs as parameters. Each of these are returned as part of the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) response. The flag rule ID is the `_id` field of each element in the `rules` array within each environment listed in the `environments` object. The variation ID is the `_id` field in each element of the `variations` array. The clause ID is the `_id` field of each element of the `clauses` array within the `rules` array within each environment listed in the `environments` object.
502
-
503
- #### addClauses
504
-
505
- Adds the given clauses to the rule indicated by `ruleId`.
506
-
507
- ##### Parameters
508
-
509
- - `ruleId`: ID of a rule in the flag.
510
- - `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.
511
-
512
- Here's an example:
513
-
514
- ```json
515
- {
516
- "environmentKey": "environment-key-123abc",
517
- "instructions": [{
518
- "kind": "addClauses",
519
- "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29",
520
- "clauses": [{
521
- "contextKind": "user",
522
- "attribute": "country",
523
- "op": "in",
524
- "negate": false,
525
- "values": ["USA", "Canada"]
526
- }]
527
- }]
528
- }
529
- ```
530
-
531
- #### addPrerequisite
532
-
533
- Adds the flag indicated by `key` with variation `variationId` as a prerequisite to the flag in the path parameter.
534
-
535
- ##### Parameters
536
-
537
- - `key`: Flag key of the prerequisite flag.
538
- - `variationId`: ID of a variation of the prerequisite flag.
539
-
540
- Here's an example:
541
-
542
- ```json
543
- {
544
- "environmentKey": "environment-key-123abc",
545
- "instructions": [{
546
- "kind": "addPrerequisite",
547
- "key": "example-prereq-flag-key",
548
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00"
549
- }]
550
- }
551
- ```
552
-
553
- #### addRule
554
-
555
- Adds a new targeting rule to the flag. The rule may contain `clauses` and serve the variation that `variationId` indicates, or serve a percentage rollout that `rolloutWeights`, `rolloutBucketBy`, and `rolloutContextKind` indicate.
556
-
557
- If you set `beforeRuleId`, this adds the new rule before the indicated rule. Otherwise, adds the new rule to the end of the list.
558
-
559
- ##### Parameters
560
-
561
- - `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.
562
- - `beforeRuleId`: (Optional) ID of a flag rule.
563
- - Either
564
- - `variationId`: ID of a variation of the flag.
565
-
566
- or
567
-
568
- - `rolloutWeights`: (Optional) Map of `variationId` to weight, in thousandths of a percent (0-100000).
569
- - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.
570
- - `rolloutContextKind`: (Optional) Context kind, defaults to `user`
571
-
572
- Here's an example that uses a `variationId`:
573
-
574
- ```json
575
- {
576
- "environmentKey": "environment-key-123abc",
577
- "instructions": [{
578
- "kind": "addRule",
579
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00",
580
- "clauses": [{
581
- "contextKind": "organization",
582
- "attribute": "located_in",
583
- "op": "in",
584
- "negate": false,
585
- "values": ["Sweden", "Norway"]
586
- }]
587
- }]
588
- }
589
- ```
590
-
591
- Here's an example that uses a percentage rollout:
592
-
593
- ```json
594
- {
595
- "environmentKey": "environment-key-123abc",
596
- "instructions": [{
597
- "kind": "addRule",
598
- "clauses": [{
599
- "contextKind": "organization",
600
- "attribute": "located_in",
601
- "op": "in",
602
- "negate": false,
603
- "values": ["Sweden", "Norway"]
604
- }],
605
- "rolloutContextKind": "organization",
606
- "rolloutWeights": {
607
- "2f43f67c-3e4e-4945-a18a-26559378ca00": 15000, // serve 15% this variation
608
- "e5830889-1ec5-4b0c-9cc9-c48790090c43": 85000 // serve 85% this variation
609
- }
610
- }]
611
- }
612
- ```
613
-
614
- #### addTargets
615
-
616
- 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 flag to target the same context key in multiple variations.
617
-
618
- ##### Parameters
619
-
620
- - `values`: List of context keys.
621
- - `contextKind`: (Optional) Context kind to target, defaults to `user`
622
- - `variationId`: ID of a variation on the flag.
623
-
624
- Here's an example:
625
-
626
- ```json
627
- {
628
- "environmentKey": "environment-key-123abc",
629
- "instructions": [{
630
- "kind": "addTargets",
631
- "values": ["context-key-123abc", "context-key-456def"],
632
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00"
633
- }]
634
- }
635
- ```
636
-
637
- #### addUserTargets
638
-
639
- Adds user keys to the individual user targets for the variation that `variationId` specifies. Returns an error if this causes the flag to target the same user key in multiple variations. If you are working with contexts, use `addTargets` instead of this instruction.
640
-
641
- ##### Parameters
642
-
643
- - `values`: List of user keys.
644
- - `variationId`: ID of a variation on the flag.
645
-
646
- Here's an example:
647
-
648
- ```json
649
- {
650
- "environmentKey": "environment-key-123abc",
651
- "instructions": [{
652
- "kind": "addUserTargets",
653
- "values": ["user-key-123abc", "user-key-456def"],
654
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00"
655
- }]
656
- }
657
- ```
658
-
659
- #### addValuesToClause
660
-
661
- Adds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator.
662
-
663
- ##### Parameters
664
-
665
- - `ruleId`: ID of a rule in the flag.
666
- - `clauseId`: ID of a clause in that rule.
667
- - `values`: Array of strings, case sensitive.
668
-
669
- Here's an example:
670
-
671
- ```json
672
- {
673
- "environmentKey": "environment-key-123abc",
674
- "instructions": [{
675
- "kind": "addValuesToClause",
676
- "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29",
677
- "clauseId": "10a58772-3121-400f-846b-b8a04e8944ed",
678
- "values": ["beta_testers"]
679
- }]
680
- }
681
- ```
682
-
683
- #### addVariation
684
-
685
- Adds a variation to the flag.
686
-
687
- ##### Parameters
688
-
689
- - `value`: The variation value.
690
- - `name`: (Optional) The variation name.
691
- - `description`: (Optional) A description for the variation.
692
-
693
- Here's an example:
694
-
695
- ```json
696
- {
697
- "instructions": [ { "kind": "addVariation", "value": 20, "name": "New variation" } ]
698
- }
699
- ```
700
-
701
- #### clearTargets
702
-
703
- Removes all individual targets from the variation that `variationId` specifies. This includes both user and non-user targets.
704
-
705
- ##### Parameters
706
-
707
- - `variationId`: ID of a variation on the flag.
708
-
709
- Here's an example:
710
-
711
- ```json
712
- {
713
- "environmentKey": "environment-key-123abc",
714
- "instructions": [ { "kind": "clearTargets", "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00" } ]
715
- }
716
- ```
717
-
718
- #### clearUserTargets
719
-
720
- Removes all individual user targets from the variation that `variationId` specifies. If you are working with contexts, use `clearTargets` instead of this instruction.
721
-
722
- ##### Parameters
723
-
724
- - `variationId`: ID of a variation on the flag.
725
-
726
- Here's an example:
727
-
728
- ```json
729
- {
730
- "environmentKey": "environment-key-123abc",
731
- "instructions": [ { "kind": "clearUserTargets", "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00" } ]
732
- }
733
- ```
734
-
735
- #### removeClauses
736
-
737
- Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`.
738
-
739
- ##### Parameters
740
-
741
- - `ruleId`: ID of a rule in the flag.
742
- - `clauseIds`: Array of IDs of clauses in the rule.
743
-
744
- Here's an example:
745
-
746
- ```json
747
- {
748
- "environmentKey": "environment-key-123abc",
749
- "instructions": [{
750
- "kind": "removeClauses",
751
- "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29",
752
- "clauseIds": ["10a58772-3121-400f-846b-b8a04e8944ed", "36a461dc-235e-4b08-97b9-73ce9365873e"]
753
- }]
754
- }
755
- ```
756
-
757
- #### removePrerequisite
758
-
759
- Removes the prerequisite flag indicated by `key`. Does nothing if this prerequisite does not exist.
760
-
761
- ##### Parameters
762
-
763
- - `key`: Flag key of an existing prerequisite flag.
764
-
765
- Here's an example:
766
-
767
- ```json
768
- {
769
- "environmentKey": "environment-key-123abc",
770
- "instructions": [ { "kind": "removePrerequisite", "key": "prereq-flag-key-123abc" } ]
771
- }
772
- ```
773
-
774
- #### removeRule
775
-
776
- Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist.
777
-
778
- ##### Parameters
779
-
780
- - `ruleId`: ID of a rule in the flag.
781
-
782
- Here's an example:
783
-
784
- ```json
785
- {
786
- "environmentKey": "environment-key-123abc",
787
- "instructions": [ { "kind": "removeRule", "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29" } ]
788
- }
789
- ```
790
-
791
- #### removeTargets
792
-
793
- 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.
794
-
795
- ##### Parameters
796
-
797
- - `values`: List of context keys.
798
- - `contextKind`: (Optional) Context kind to target, defaults to `user`
799
- - `variationId`: ID of a flag variation.
800
-
801
- Here's an example:
802
-
803
- ```json
804
- {
805
- "environmentKey": "environment-key-123abc",
806
- "instructions": [{
807
- "kind": "removeTargets",
808
- "values": ["context-key-123abc", "context-key-456def"],
809
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00"
810
- }]
811
- }
812
- ```
813
-
814
- #### removeUserTargets
815
-
816
- Removes user keys from the individual user targets for the variation that `variationId` specifies. Does nothing if the flag does not target the user keys. If you are working with contexts, use `removeTargets` instead of this instruction.
817
-
818
- ##### Parameters
819
-
820
- - `values`: List of user keys.
821
- - `variationId`: ID of a flag variation.
822
-
823
- Here's an example:
824
-
825
- ```json
826
- {
827
- "environmentKey": "environment-key-123abc",
828
- "instructions": [{
829
- "kind": "removeUserTargets",
830
- "values": ["user-key-123abc", "user-key-456def"],
831
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00"
832
- }]
833
- }
834
- ```
835
-
836
- #### removeValuesFromClause
837
-
838
- Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator.
839
-
840
- ##### Parameters
841
-
842
- - `ruleId`: ID of a rule in the flag.
843
- - `clauseId`: ID of a clause in that rule.
844
- - `values`: Array of strings, case sensitive.
845
-
846
- Here's an example:
847
-
848
- ```json
849
- {
850
- "environmentKey": "environment-key-123abc",
851
- "instructions": [{
852
- "kind": "removeValuesFromClause",
853
- "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29",
854
- "clauseId": "10a58772-3121-400f-846b-b8a04e8944ed",
855
- "values": ["beta_testers"]
856
- }]
857
- }
858
- ```
859
-
860
- #### removeVariation
861
-
862
- Removes a variation from the flag.
863
-
864
- ##### Parameters
865
-
866
- - `variationId`: ID of a variation of the flag to remove.
867
-
868
- Here's an example:
869
-
870
- ```json
871
- {
872
- "instructions": [ { "kind": "removeVariation", "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00" } ]
873
- }
874
- ```
875
-
876
- #### reorderRules
877
-
878
- 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 flag.
879
-
880
- ##### Parameters
881
-
882
- - `ruleIds`: Array of IDs of all rules in the flag.
883
-
884
- Here's an example:
885
-
886
- ```json
887
- {
888
- "environmentKey": "environment-key-123abc",
889
- "instructions": [{
890
- "kind": "reorderRules",
891
- "ruleIds": ["a902ef4a-2faf-4eaf-88e1-ecc356708a29", "63c238d1-835d-435e-8f21-c8d5e40b2a3d"]
892
- }]
893
- }
894
- ```
895
-
896
- #### replacePrerequisites
897
-
898
- Removes all existing prerequisites and replaces them with the list you provide.
899
-
900
- ##### Parameters
901
-
902
- - `prerequisites`: A list of prerequisites. Each item in the list must include a flag `key` and `variationId`.
903
-
904
- Here's an example:
905
-
906
- ```json
907
- {
908
- "environmentKey": "environment-key-123abc",
909
- "instructions": [
910
- {
911
- "kind": "replacePrerequisites",
912
- "prerequisites": [
913
- {
914
- "key": "prereq-flag-key-123abc",
915
- "variationId": "10a58772-3121-400f-846b-b8a04e8944ed"
916
- },
917
- {
918
- "key": "another-prereq-flag-key-456def",
919
- "variationId": "e5830889-1ec5-4b0c-9cc9-c48790090c43"
920
- }
921
- ]
922
- }
923
- ]
924
- }
925
- ```
926
-
927
- #### replaceRules
928
-
929
- Removes all targeting rules for the flag and replaces them with the list you provide.
930
-
931
- ##### Parameters
932
-
933
- - `rules`: A list of rules.
934
-
935
- Here's an example:
936
-
937
- ```json
938
- {
939
- "environmentKey": "environment-key-123abc",
940
- "instructions": [
941
- {
942
- "kind": "replaceRules",
943
- "rules": [
944
- {
945
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00",
946
- "description": "My new rule",
947
- "clauses": [
948
- {
949
- "contextKind": "user",
950
- "attribute": "segmentMatch",
951
- "op": "segmentMatch",
952
- "values": ["test"]
953
- }
954
- ],
955
- "trackEvents": true
956
- }
957
- ]
958
- }
959
- ]
960
- }
961
- ```
962
-
963
- #### replaceTargets
964
-
965
- Removes all existing targeting and replaces it with the list of targets you provide.
966
-
967
- ##### Parameters
968
-
969
- - `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`.
970
-
971
- Here's an example:
972
-
973
- ```json
974
- {
975
- "environmentKey": "environment-key-123abc",
976
- "instructions": [
977
- {
978
- "kind": "replaceTargets",
979
- "targets": [
980
- {
981
- "contextKind": "user",
982
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00",
983
- "values": ["user-key-123abc"]
984
- },
985
- {
986
- "contextKind": "device",
987
- "variationId": "e5830889-1ec5-4b0c-9cc9-c48790090c43",
988
- "values": ["device-key-456def"]
989
- }
990
- ]
991
- }
992
- ]
993
- }
994
- ```
995
-
996
- #### replaceUserTargets
997
-
998
- Removes all existing user targeting and replaces it with the list of targets you provide. In the list of targets, you must include a target for each of the flag's variations. If you are working with contexts, use `replaceTargets` instead of this instruction.
999
-
1000
- ##### Parameters
1001
-
1002
- - `targets`: A list of user targeting. Each item in the list must include a `variationId` and a list of `values`.
1003
-
1004
- Here's an example:
1005
-
1006
- ```json
1007
- {
1008
- "environmentKey": "environment-key-123abc",
1009
- "instructions": [
1010
- {
1011
- "kind": "replaceUserTargets",
1012
- "targets": [
1013
- {
1014
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00",
1015
- "values": ["user-key-123abc", "user-key-456def"]
1016
- },
1017
- {
1018
- "variationId": "e5830889-1ec5-4b0c-9cc9-c48790090c43",
1019
- "values": ["user-key-789ghi"]
1020
- }
1021
- ]
1022
- }
1023
- ]
1024
- }
1025
- ```
1026
-
1027
- #### updateClause
1028
-
1029
- Replaces the clause indicated by `ruleId` and `clauseId` with `clause`.
1030
-
1031
- ##### Parameters
1032
-
1033
- - `ruleId`: ID of a rule in the flag.
1034
- - `clauseId`: ID of a clause in that rule.
1035
- - `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.
1036
-
1037
- Here's an example:
1038
-
1039
- ```json
1040
- {
1041
- "environmentKey": "environment-key-123abc",
1042
- "instructions": [{
1043
- "kind": "updateClause",
1044
- "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29",
1045
- "clauseId": "10c7462a-2062-45ba-a8bb-dfb3de0f8af5",
1046
- "clause": {
1047
- "contextKind": "user",
1048
- "attribute": "country",
1049
- "op": "in",
1050
- "negate": false,
1051
- "values": ["Mexico", "Canada"]
1052
- }
1053
- }]
1054
- }
1055
- ```
1056
-
1057
- #### updateDefaultVariation
1058
-
1059
- Updates the default on or off variation of the flag.
1060
-
1061
- ##### Parameters
1062
-
1063
- - `onVariationValue`: (Optional) The value of the variation of the new on variation.
1064
- - `offVariationValue`: (Optional) The value of the variation of the new off variation
1065
-
1066
- Here's an example:
1067
-
1068
- ```json
1069
- {
1070
- "instructions": [ { "kind": "updateDefaultVariation", "OnVariationValue": true, "OffVariationValue": false } ]
1071
- }
1072
- ```
1073
-
1074
- #### updateFallthroughVariationOrRollout
1075
-
1076
- Updates the default or "fallthrough" rule for the flag, which the flag 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.
1077
-
1078
- ##### Parameters
1079
-
1080
- - `variationId`: ID of a variation of the flag.
1081
-
1082
- or
1083
-
1084
- - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).
1085
- - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.
1086
- - `rolloutContextKind`: (Optional) Context kind, defaults to `user`
1087
-
1088
- Here's an example that uses a `variationId`:
1089
-
1090
- ```json
1091
- {
1092
- "environmentKey": "environment-key-123abc",
1093
- "instructions": [{
1094
- "kind": "updateFallthroughVariationOrRollout",
1095
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00"
1096
- }]
1097
- }
1098
- ```
1099
-
1100
- Here's an example that uses a percentage rollout:
1101
-
1102
- ```json
1103
- {
1104
- "environmentKey": "environment-key-123abc",
1105
- "instructions": [{
1106
- "kind": "updateFallthroughVariationOrRollout",
1107
- "rolloutContextKind": "user",
1108
- "rolloutWeights": {
1109
- "2f43f67c-3e4e-4945-a18a-26559378ca00": 15000, // serve 15% this variation
1110
- "e5830889-1ec5-4b0c-9cc9-c48790090c43": 85000 // serve 85% this variation
1111
- }
1112
- }]
1113
- }
1114
- ```
1115
-
1116
- #### updateOffVariation
1117
-
1118
- Updates the default off variation to `variationId`. The flag serves the default off variation when the flag's targeting is **Off**.
1119
-
1120
- ##### Parameters
1121
-
1122
- - `variationId`: ID of a variation of the flag.
1123
-
1124
- Here's an example:
1125
-
1126
- ```json
1127
- {
1128
- "environmentKey": "environment-key-123abc",
1129
- "instructions": [ { "kind": "updateOffVariation", "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00" } ]
1130
- }
1131
- ```
1132
-
1133
- #### updatePrerequisite
1134
-
1135
- Changes the prerequisite flag that `key` indicates to use the variation that `variationId` indicates. Returns an error if this prerequisite does not exist.
1136
-
1137
- ##### Parameters
1138
-
1139
- - `key`: Flag key of an existing prerequisite flag.
1140
- - `variationId`: ID of a variation of the prerequisite flag.
1141
-
1142
- Here's an example:
1143
-
1144
- ```json
1145
- {
1146
- "environmentKey": "environment-key-123abc",
1147
- "instructions": [{
1148
- "kind": "updatePrerequisite",
1149
- "key": "example-prereq-flag-key",
1150
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00"
1151
- }]
1152
- }
1153
- ```
1154
-
1155
- #### updateRuleDescription
1156
-
1157
- Updates the description of the feature flag rule.
1158
-
1159
- ##### Parameters
1160
-
1161
- - `description`: The new human-readable description for this rule.
1162
- - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.
1163
-
1164
- Here's an example:
1165
-
1166
- ```json
1167
- {
1168
- "environmentKey": "environment-key-123abc",
1169
- "instructions": [{
1170
- "kind": "updateRuleDescription",
1171
- "description": "New rule description",
1172
- "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29"
1173
- }]
1174
- }
1175
- ```
1176
-
1177
- #### updateRuleTrackEvents
1178
-
1179
- Updates whether or not LaunchDarkly tracks events for the feature flag associated with this rule.
1180
-
1181
- ##### Parameters
1182
-
1183
- - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the flag.
1184
- - `trackEvents`: Whether or not events are tracked.
1185
-
1186
- Here's an example:
1187
-
1188
- ```json
1189
- {
1190
- "environmentKey": "environment-key-123abc",
1191
- "instructions": [{
1192
- "kind": "updateRuleTrackEvents",
1193
- "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29",
1194
- "trackEvents": true
1195
- }]
1196
- }
1197
- ```
1198
-
1199
- #### updateRuleVariationOrRollout
1200
-
1201
- 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.
1202
-
1203
- ##### Parameters
1204
-
1205
- - `ruleId`: ID of a rule in the flag.
1206
- - `variationId`: ID of a variation of the flag.
1207
-
1208
- or
1209
-
1210
- - `rolloutWeights`: Map of `variationId` to weight, in thousandths of a percent (0-100000).
1211
- - `rolloutBucketBy`: (Optional) Context attribute available in the specified `rolloutContextKind`.
1212
- - `rolloutContextKind`: (Optional) Context kind, defaults to `user`
1213
-
1214
- Here's an example:
1215
-
1216
- ```json
1217
- {
1218
- "environmentKey": "environment-key-123abc",
1219
- "instructions": [{
1220
- "kind": "updateRuleVariationOrRollout",
1221
- "ruleId": "a902ef4a-2faf-4eaf-88e1-ecc356708a29",
1222
- "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00"
1223
- }]
1224
- }
1225
- ```
1226
-
1227
- #### updateTrackEvents
1228
-
1229
- Updates whether or not LaunchDarkly tracks events for the feature flag, for all rules.
1230
-
1231
- ##### Parameters
1232
-
1233
- - `trackEvents`: Whether or not events are tracked.
1234
-
1235
- Here's an example:
1236
-
1237
- ```json
1238
- {
1239
- "environmentKey": "environment-key-123abc",
1240
- "instructions": [ { "kind": "updateTrackEvents", "trackEvents": true } ]
1241
- }
1242
- ```
1243
-
1244
- #### updateTrackEventsFallthrough
1245
-
1246
- Updates whether or not LaunchDarkly tracks events for the feature flag, for the default rule.
1247
-
1248
- ##### Parameters
1249
-
1250
- - `trackEvents`: Whether or not events are tracked.
1251
-
1252
- Here's an example:
1253
-
1254
- ```json
1255
- {
1256
- "environmentKey": "environment-key-123abc",
1257
- "instructions": [ { "kind": "updateTrackEventsFallthrough", "trackEvents": true } ]
1258
- }
1259
- ```
1260
-
1261
- #### updateVariation
1262
-
1263
- Updates a variation of the flag.
1264
-
1265
- ##### Parameters
1266
-
1267
- - `variationId`: The ID of the variation to update.
1268
- - `name`: (Optional) The updated variation name.
1269
- - `value`: (Optional) The updated variation value.
1270
- - `description`: (Optional) The updated variation description.
1271
-
1272
- Here's an example:
1273
-
1274
- ```json
1275
- {
1276
- "instructions": [ { "kind": "updateVariation", "variationId": "2f43f67c-3e4e-4945-a18a-26559378ca00", "value": 20 } ]
1277
- }
1278
- ```
1279
-
1280
- </details><br />
1281
-
1282
- <details>
1283
- <summary>Click to expand instructions for <strong>updating flag settings</strong></summary>
1284
-
1285
- These instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.
1286
-
1287
- #### addCustomProperties
1288
-
1289
- Adds a new custom property to the feature flag. Custom properties are used to associate feature flags with LaunchDarkly integrations. For example, if you create an integration with an issue tracking service, you may want to associate a flag with a list of issues related to a feature's development.
1290
-
1291
- ##### Parameters
1292
-
1293
- - `key`: The custom property key.
1294
- - `name`: The custom property name.
1295
- - `values`: A list of the associated values for the custom property.
1296
-
1297
- Here's an example:
1298
-
1299
- ```json
1300
- {
1301
- "instructions": [{
1302
- "kind": "addCustomProperties",
1303
- "key": "example-custom-property",
1304
- "name": "Example custom property",
1305
- "values": ["value1", "value2"]
1306
- }]
1307
- }
1308
- ```
1309
-
1310
- #### addTags
1311
-
1312
- Adds tags to the feature flag.
1313
-
1314
- ##### Parameters
1315
-
1316
- - `values`: A list of tags to add.
1317
-
1318
- Here's an example:
1319
-
1320
- ```json
1321
- {
1322
- "instructions": [ { "kind": "addTags", "values": ["tag1", "tag2"] } ]
1323
- }
1324
- ```
1325
-
1326
- #### makeFlagPermanent
1327
-
1328
- Marks the feature flag as permanent. LaunchDarkly does not prompt you to remove permanent flags, even if one variation is rolled out to all your customers.
1329
-
1330
- Here's an example:
1331
-
1332
- ```json
1333
- {
1334
- "instructions": [ { "kind": "makeFlagPermanent" } ]
1335
- }
1336
- ```
1337
-
1338
- #### makeFlagTemporary
1339
-
1340
- Marks the feature flag as temporary.
1341
-
1342
- Here's an example:
1343
-
1344
- ```json
1345
- {
1346
- "instructions": [ { "kind": "makeFlagTemporary" } ]
1347
- }
1348
- ```
1349
-
1350
- #### removeCustomProperties
1351
-
1352
- Removes the associated values from a custom property. If all the associated values are removed, this instruction also removes the custom property.
1353
-
1354
- ##### Parameters
1355
-
1356
- - `key`: The custom property key.
1357
- - `values`: A list of the associated values to remove from the custom property.
1358
-
1359
- ```json
1360
- {
1361
- "instructions": [{
1362
- "kind": "replaceCustomProperties",
1363
- "key": "example-custom-property",
1364
- "values": ["value1", "value2"]
1365
- }]
1366
- }
1367
- ```
1368
-
1369
- #### removeMaintainer
1370
-
1371
- Removes the flag's maintainer. To set a new maintainer, use the `updateMaintainerMember` or `updateMaintainerTeam` instructions.
1372
-
1373
- Here's an example:
1374
-
1375
- ```json
1376
- {
1377
- "instructions": [ { "kind": "removeMaintainer" } ]
1378
- }
1379
- ```
1380
-
1381
- #### removeTags
1382
-
1383
- Removes tags from the feature flag.
1384
-
1385
- ##### Parameters
1386
-
1387
- - `values`: A list of tags to remove.
1388
-
1389
- Here's an example:
1390
-
1391
- ```json
1392
- {
1393
- "instructions": [ { "kind": "removeTags", "values": ["tag1", "tag2"] } ]
1394
- }
1395
- ```
1396
-
1397
- #### replaceCustomProperties
1398
-
1399
- Replaces the existing associated values for a custom property with the new values.
1400
-
1401
- ##### Parameters
1402
-
1403
- - `key`: The custom property key.
1404
- - `name`: The custom property name.
1405
- - `values`: A list of the new associated values for the custom property.
1406
-
1407
- Here's an example:
1408
-
1409
- ```json
1410
- {
1411
- "instructions": [{
1412
- "kind": "replaceCustomProperties",
1413
- "key": "example-custom-property",
1414
- "name": "Example custom property",
1415
- "values": ["value1", "value2"]
1416
- }]
1417
- }
1418
- ```
1419
-
1420
- #### turnOffClientSideAvailability
1421
-
1422
- Turns off client-side SDK availability for the flag. This is equivalent to unchecking the **SDKs using Mobile key** and/or **SDKs using Client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them.
1423
-
1424
- ##### Parameters
1425
-
1426
- - `value`: Use "usingMobileKey" to turn off availability for mobile SDKs. Use "usingEnvironmentId" to turn on availability for client-side SDKs.
1427
-
1428
- Here's an example:
1429
-
1430
- ```json
1431
- {
1432
- "instructions": [ { "kind": "turnOffClientSideAvailability", "value": "usingMobileKey" } ]
1433
- }
1434
- ```
1435
-
1436
- #### turnOnClientSideAvailability
1437
-
1438
- Turns on client-side SDK availability for the flag. This is equivalent to checking the **SDKs using Mobile key** and/or **SDKs using Client-side ID** boxes for the flag. If you're using a client-side or mobile SDK, you must expose your feature flags in order for the client-side or mobile SDKs to evaluate them.
1439
-
1440
- ##### Parameters
1441
-
1442
- - `value`: Use "usingMobileKey" to turn on availability for mobile SDKs. Use "usingEnvironmentId" to turn on availability for client-side SDKs.
1443
-
1444
- Here's an example:
1445
-
1446
- ```json
1447
- {
1448
- "instructions": [ { "kind": "turnOnClientSideAvailability", "value": "usingMobileKey" } ]
1449
- }
1450
- ```
1451
-
1452
- #### updateDescription
1453
-
1454
- Updates the feature flag description.
1455
-
1456
- ##### Parameters
1457
-
1458
- - `value`: The new description.
1459
-
1460
- Here's an example:
1461
-
1462
- ```json
1463
- {
1464
- "instructions": [ { "kind": "updateDescription", "value": "Updated flag description" } ]
1465
- }
1466
- ```
1467
- #### updateMaintainerMember
1468
-
1469
- Updates the maintainer of the flag to an existing member and removes the existing maintainer.
1470
-
1471
- ##### Parameters
1472
-
1473
- - `value`: The ID of the member.
1474
-
1475
- Here's an example:
1476
-
1477
- ```json
1478
- {
1479
- "instructions": [ { "kind": "updateMaintainerMember", "value": "61e9b714fd47591727db558a" } ]
1480
- }
1481
- ```
1482
-
1483
- #### updateMaintainerTeam
1484
-
1485
- Updates the maintainer of the flag to an existing team and removes the existing maintainer.
1486
-
1487
- ##### Parameters
1488
-
1489
- - `value`: The key of the team.
1490
-
1491
- Here's an example:
1492
-
1493
- ```json
1494
- {
1495
- "instructions": [ { "kind": "updateMaintainerTeam", "value": "example-team-key" } ]
1496
- }
1497
- ```
1498
-
1499
- #### updateName
1500
-
1501
- Updates the feature flag name.
1502
-
1503
- ##### Parameters
1504
-
1505
- - `value`: The new name.
1506
-
1507
- Here's an example:
1508
-
1509
- ```json
1510
- {
1511
- "instructions": [ { "kind": "updateName", "value": "Updated flag name" } ]
1512
- }
1513
- ```
1514
-
1515
- </details><br />
1516
-
1517
- <details>
1518
- <summary>Click to expand instructions for <strong>updating the flag lifecycle</strong></summary>
1519
-
1520
- These instructions do not require the `environmentKey` parameter. They make changes that apply to the flag across all environments.
1521
-
1522
- #### archiveFlag
1523
-
1524
- Archives the feature flag. This retires it from LaunchDarkly without deleting it. You cannot archive a flag that is a prerequisite of other flags.
1525
-
1526
- ```json
1527
- {
1528
- "instructions": [ { "kind": "archiveFlag" } ]
1529
- }
1530
- ```
1531
-
1532
- #### deleteFlag
1533
-
1534
- Deletes the feature flag and its rules. You cannot restore a deleted flag. If this flag is requested again, the flag value defined in code will be returned for all contexts.
1535
-
1536
- Here's an example:
1537
-
1538
- ```json
1539
- {
1540
- "instructions": [ { "kind": "deleteFlag" } ]
1541
- }
1542
- ```
1543
-
1544
- #### deprecateFlag
1545
-
1546
- Deprecates the feature flag. This hides it from the live flags list without archiving or deleting it.
1547
-
1548
- Here's an example:
1549
-
1550
- ```json
1551
- {
1552
- "instructions": [ { "kind": "deprecateFlag" } ]
1553
- }
1554
- ```
1555
-
1556
- #### restoreDeprecatedFlag
1557
-
1558
- Restores the feature flag if it was previously deprecated.
1559
-
1560
- Here's an example:
1561
-
1562
- ```json
1563
- {
1564
- "instructions": [ { "kind": "restoreDeprecatedFlag" } ]
1565
- }
1566
- ```
1567
-
1568
- #### restoreFlag
1569
-
1570
- Restores the feature flag if it was previously archived.
1571
-
1572
- Here's an example:
1573
-
1574
- ```json
1575
- {
1576
- "instructions": [ { "kind": "restoreFlag" } ]
1577
- }
1578
- ```
1579
-
1580
- </details>
1581
-
1582
- ### Using JSON patches on a feature flag
1583
-
1584
- If you do not include the semantic patch header described above, you can use a [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes.
1585
-
1586
- In the JSON patch representation, use a JSON pointer in the `path` element to describe what field to change. Use the [Get feature flag](https://launchdarkly.com/docs/api/feature-flags/get-feature-flag) endpoint to find the field you want to update.
1587
-
1588
- There are a few special cases to keep in mind when determining the value of the `path` element:
1589
-
1590
- * To add an individual target to a specific variation if the flag variation already has individual targets, the path for the JSON patch operation is:
1591
-
1592
- ```json
1593
- [
1594
- {
1595
- "op": "add",
1596
- "path": "/environments/devint/targets/0/values/-",
1597
- "value": "TestClient10"
1598
- }
1599
- ]
1600
- ```
1601
-
1602
- * To add an individual target to a specific variation if the flag variation does not already have individual targets, the path for the JSON patch operation is:
1603
-
1604
- ```json
1605
- [
1606
- {
1607
- "op": "add",
1608
- "path": "/environments/devint/targets/-",
1609
- "value": { "variation": 0, "values": ["TestClient10"] }
1610
- }
1611
- ]
1612
- ```
1613
-
1614
- * To add a flag to a release pipeline, the path for the JSON patch operation is:
1615
-
1616
- ```json
1617
- [
1618
- {
1619
- "op": "add",
1620
- "path": "/releasePipelineKey",
1621
- "value": "example-release-pipeline-key"
1622
- }
1623
- ]
1624
- ```
1625
-
1626
- ### Required approvals
1627
- If a request attempts to alter a flag configuration in an environment where approvals are required for the flag, the request will fail with a 405. Changes to the flag configuration in that environment will require creating an [approval request](https://launchdarkly.com/docs/api/approvals) or a [workflow](https://launchdarkly.com/docs/api/workflows).
1628
-
1629
- ### Conflicts
1630
- If a flag configuration change made through this endpoint would cause a pending scheduled change or approval request to fail, this endpoint will return a 400. You can ignore this check by adding an `ignoreConflicts` query parameter set to `true`.
1631
-
1632
- ### Migration flags
1633
- For migration flags, the cohort information is included in the `rules` property of a flag's response. You can update cohorts by updating `rules`. Default cohort information is included in the `fallthrough` property of a flag's response. You can update the default cohort by updating `fallthrough`.
1634
- When you update the rollout for a cohort or the default cohort through the API, provide a rollout instead of a single `variationId`.
1635
- To learn more, read [Migration flags](https://launchdarkly.com/docs/home/flags/migration).
1636
-
1637
-
1638
- ### Example Usage
1639
-
1640
- ```typescript
1641
- import { LaunchDarkly } from "@launchdarkly/mcp-server";
1642
-
1643
- const launchDarkly = new LaunchDarkly({
1644
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
1645
- });
1646
-
1647
- async function run() {
1648
- const result = await launchDarkly.featureFlags.patch({
1649
- projectKey: "<value>",
1650
- featureFlagKey: "<value>",
1651
- patchWithComment: {
1652
- patch: [
1653
- {
1654
- op: "replace",
1655
- path: "/description",
1656
- value: "New description for this flag",
1657
- },
1658
- ],
1659
- },
1660
- });
1661
-
1662
- console.log(result);
1663
- }
1664
-
1665
- run();
1666
- ```
1667
-
1668
- ### Standalone function
1669
-
1670
- The standalone function version of this method:
1671
-
1672
- ```typescript
1673
- import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
1674
- import { featureFlagsPatch } from "@launchdarkly/mcp-server/funcs/featureFlagsPatch.js";
1675
-
1676
- // Use `LaunchDarklyCore` for best tree-shaking performance.
1677
- // You can create one instance of it to use across an application.
1678
- const launchDarkly = new LaunchDarklyCore({
1679
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
1680
- });
1681
-
1682
- async function run() {
1683
- const res = await featureFlagsPatch(launchDarkly, {
1684
- projectKey: "<value>",
1685
- featureFlagKey: "<value>",
1686
- patchWithComment: {
1687
- patch: [
1688
- {
1689
- op: "replace",
1690
- path: "/description",
1691
- value: "New description for this flag",
1692
- },
1693
- ],
1694
- },
1695
- });
1696
- if (res.ok) {
1697
- const { value: result } = res;
1698
- console.log(result);
1699
- } else {
1700
- console.log("featureFlagsPatch failed:", res.error);
1701
- }
1702
- }
1703
-
1704
- run();
1705
- ```
1706
-
1707
- ### Parameters
1708
-
1709
- | Parameter | Type | Required | Description |
1710
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1711
- | `request` | [operations.PatchFeatureFlagRequest](../../models/operations/patchfeatureflagrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1712
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1713
- | `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. |
1714
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1715
-
1716
- ### Response
1717
-
1718
- **Promise\<[components.FeatureFlag](../../models/components/featureflag.md)\>**
1719
-
1720
- ### Errors
1721
-
1722
- | Error Type | Status Code | Content Type |
1723
- | ------------------------------- | ------------------------------- | ------------------------------- |
1724
- | errors.InvalidRequestErrorRep | 400 | application/json |
1725
- | errors.UnauthorizedErrorRep | 401 | application/json |
1726
- | errors.NotFoundErrorRep | 404 | application/json |
1727
- | errors.MethodNotAllowedErrorRep | 405 | application/json |
1728
- | errors.StatusConflictErrorRep | 409 | application/json |
1729
- | errors.RateLimitedErrorRep | 429 | application/json |
1730
- | errors.APIError | 4XX, 5XX | \*/\* |
1731
-
1732
- ## delete
1733
-
1734
- Delete a feature flag in all environments. Use with caution: only delete feature flags your application no longer uses.
1735
-
1736
- ### Example Usage
1737
-
1738
- ```typescript
1739
- import { LaunchDarkly } from "@launchdarkly/mcp-server";
1740
-
1741
- const launchDarkly = new LaunchDarkly({
1742
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
1743
- });
1744
-
1745
- async function run() {
1746
- await launchDarkly.featureFlags.delete({
1747
- projectKey: "<value>",
1748
- featureFlagKey: "<value>",
1749
- });
1750
-
1751
-
1752
- }
1753
-
1754
- run();
1755
- ```
1756
-
1757
- ### Standalone function
1758
-
1759
- The standalone function version of this method:
1760
-
1761
- ```typescript
1762
- import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
1763
- import { featureFlagsDelete } from "@launchdarkly/mcp-server/funcs/featureFlagsDelete.js";
1764
-
1765
- // Use `LaunchDarklyCore` for best tree-shaking performance.
1766
- // You can create one instance of it to use across an application.
1767
- const launchDarkly = new LaunchDarklyCore({
1768
- apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
1769
- });
1770
-
1771
- async function run() {
1772
- const res = await featureFlagsDelete(launchDarkly, {
1773
- projectKey: "<value>",
1774
- featureFlagKey: "<value>",
1775
- });
1776
- if (res.ok) {
1777
- const { value: result } = res;
1778
-
1779
- } else {
1780
- console.log("featureFlagsDelete failed:", res.error);
1781
- }
1782
- }
1783
-
1784
- run();
1785
- ```
1786
-
1787
- ### Parameters
1788
-
1789
- | Parameter | Type | Required | Description |
1790
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1791
- | `request` | [operations.DeleteFeatureFlagRequest](../../models/operations/deletefeatureflagrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1792
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1793
- | `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. |
1794
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1795
-
1796
- ### Response
1797
-
1798
- **Promise\<void\>**
1799
-
1800
- ### Errors
1801
-
1802
- | Error Type | Status Code | Content Type |
1803
- | ----------------------------- | ----------------------------- | ----------------------------- |
1804
- | errors.UnauthorizedErrorRep | 401 | application/json |
1805
- | errors.NotFoundErrorRep | 404 | application/json |
1806
- | errors.StatusConflictErrorRep | 409 | application/json |
1807
- | errors.RateLimitedErrorRep | 429 | application/json |
1808
- | errors.APIError | 4XX, 5XX | \*/\* |