@cloudinary/asset-management-mcp 0.9.0-rc.0 → 0.9.1

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 (908) hide show
  1. package/README.md +103 -58
  2. package/bin/mcp-server.js +1443 -732
  3. package/bin/mcp-server.js.map +111 -84
  4. package/esm/funcs/assetRelationsCreateAssetRelationsByAssetId.d.ts +3 -3
  5. package/esm/funcs/assetRelationsCreateAssetRelationsByAssetId.d.ts.map +1 -1
  6. package/esm/funcs/assetRelationsCreateAssetRelationsByAssetId.js +8 -6
  7. package/esm/funcs/assetRelationsCreateAssetRelationsByAssetId.js.map +1 -1
  8. package/esm/funcs/assetRelationsCreateAssetRelationsByPublicId.d.ts +3 -3
  9. package/esm/funcs/assetRelationsCreateAssetRelationsByPublicId.d.ts.map +1 -1
  10. package/esm/funcs/assetRelationsCreateAssetRelationsByPublicId.js +5 -5
  11. package/esm/funcs/assetRelationsCreateAssetRelationsByPublicId.js.map +1 -1
  12. package/esm/funcs/assetRelationsDeleteAssetRelationsByAssetId.d.ts +3 -3
  13. package/esm/funcs/assetRelationsDeleteAssetRelationsByAssetId.d.ts.map +1 -1
  14. package/esm/funcs/assetRelationsDeleteAssetRelationsByAssetId.js +6 -6
  15. package/esm/funcs/assetRelationsDeleteAssetRelationsByAssetId.js.map +1 -1
  16. package/esm/funcs/assetRelationsDeleteAssetRelationsByPublicId.d.ts +3 -3
  17. package/esm/funcs/assetRelationsDeleteAssetRelationsByPublicId.d.ts.map +1 -1
  18. package/esm/funcs/assetRelationsDeleteAssetRelationsByPublicId.js +5 -5
  19. package/esm/funcs/assetRelationsDeleteAssetRelationsByPublicId.js.map +1 -1
  20. package/esm/funcs/assetsDeleteBackupVersions.d.ts +2 -2
  21. package/esm/funcs/assetsDeleteBackupVersions.d.ts.map +1 -1
  22. package/esm/funcs/assetsDeleteBackupVersions.js +9 -7
  23. package/esm/funcs/assetsDeleteBackupVersions.js.map +1 -1
  24. package/esm/funcs/assetsDestroyByAssetId.d.ts +4 -5
  25. package/esm/funcs/assetsDestroyByAssetId.d.ts.map +1 -1
  26. package/esm/funcs/assetsDestroyByAssetId.js +4 -5
  27. package/esm/funcs/assetsDestroyByAssetId.js.map +1 -1
  28. package/esm/funcs/assetsDownloadAsset.d.ts +2 -2
  29. package/esm/funcs/assetsDownloadAsset.d.ts.map +1 -1
  30. package/esm/funcs/assetsDownloadAsset.js +3 -9
  31. package/esm/funcs/assetsDownloadAsset.js.map +1 -1
  32. package/esm/funcs/assetsDownloadBackupAsset.d.ts +1 -1
  33. package/esm/funcs/assetsDownloadBackupAsset.d.ts.map +1 -1
  34. package/esm/funcs/assetsDownloadBackupAsset.js +3 -9
  35. package/esm/funcs/assetsDownloadBackupAsset.js.map +1 -1
  36. package/esm/funcs/assetsExplicitAsset.d.ts +2 -2
  37. package/esm/funcs/assetsExplicitAsset.d.ts.map +1 -1
  38. package/esm/funcs/assetsExplicitAsset.js +7 -5
  39. package/esm/funcs/assetsExplicitAsset.js.map +1 -1
  40. package/esm/funcs/assetsListImages.d.ts +5 -5
  41. package/esm/funcs/assetsListImages.d.ts.map +1 -1
  42. package/esm/funcs/assetsListImages.js +1 -1
  43. package/esm/funcs/assetsListImages.js.map +1 -1
  44. package/esm/funcs/assetsListRawFiles.d.ts +5 -5
  45. package/esm/funcs/assetsListRawFiles.d.ts.map +1 -1
  46. package/esm/funcs/assetsListRawFiles.js +1 -1
  47. package/esm/funcs/assetsListRawFiles.js.map +1 -1
  48. package/esm/funcs/assetsListResourcesByAssetFolder.d.ts +3 -3
  49. package/esm/funcs/assetsListResourcesByAssetFolder.d.ts.map +1 -1
  50. package/esm/funcs/assetsListResourcesByAssetFolder.js.map +1 -1
  51. package/esm/funcs/assetsListResourcesByAssetIDs.d.ts +2 -2
  52. package/esm/funcs/assetsListResourcesByAssetIDs.d.ts.map +1 -1
  53. package/esm/funcs/assetsListResourcesByAssetIDs.js.map +1 -1
  54. package/esm/funcs/assetsListResourcesByContext.d.ts +3 -3
  55. package/esm/funcs/assetsListResourcesByContext.d.ts.map +1 -1
  56. package/esm/funcs/assetsListResourcesByContext.js.map +1 -1
  57. package/esm/funcs/assetsListResourcesByModerationKindAndStatus.d.ts +5 -4
  58. package/esm/funcs/assetsListResourcesByModerationKindAndStatus.d.ts.map +1 -1
  59. package/esm/funcs/assetsListResourcesByModerationKindAndStatus.js.map +1 -1
  60. package/esm/funcs/assetsListVideos.d.ts +5 -5
  61. package/esm/funcs/assetsListVideos.d.ts.map +1 -1
  62. package/esm/funcs/assetsListVideos.js +1 -1
  63. package/esm/funcs/assetsListVideos.js.map +1 -1
  64. package/esm/funcs/assetsRestoreResourcesByAssetIDs.d.ts +2 -2
  65. package/esm/funcs/assetsRestoreResourcesByAssetIDs.d.ts.map +1 -1
  66. package/esm/funcs/assetsRestoreResourcesByAssetIDs.js +2 -2
  67. package/esm/funcs/assetsRestoreResourcesByAssetIDs.js.map +1 -1
  68. package/esm/funcs/assetsUpdateResourceByAssetId.d.ts +1 -1
  69. package/esm/funcs/assetsUpdateResourceByAssetId.js +1 -1
  70. package/esm/funcs/backupsDeleteBackupVersions.d.ts +2 -2
  71. package/esm/funcs/backupsDeleteBackupVersions.d.ts.map +1 -1
  72. package/esm/funcs/backupsDeleteBackupVersions.js +9 -7
  73. package/esm/funcs/backupsDeleteBackupVersions.js.map +1 -1
  74. package/esm/funcs/foldersSearchFolders.d.ts +4 -2
  75. package/esm/funcs/foldersSearchFolders.d.ts.map +1 -1
  76. package/esm/funcs/foldersSearchFolders.js.map +1 -1
  77. package/esm/funcs/foldersSearchFoldersPost.d.ts +2 -2
  78. package/esm/funcs/foldersSearchFoldersPost.d.ts.map +1 -1
  79. package/esm/funcs/foldersSearchFoldersPost.js +2 -2
  80. package/esm/funcs/foldersSearchFoldersPost.js.map +1 -1
  81. package/esm/funcs/foldersUpdateFolder.d.ts +2 -2
  82. package/esm/funcs/foldersUpdateFolder.d.ts.map +1 -1
  83. package/esm/funcs/foldersUpdateFolder.js +7 -5
  84. package/esm/funcs/foldersUpdateFolder.js.map +1 -1
  85. package/esm/funcs/moderationsListResourcesByModerationKindAndStatus.d.ts +5 -4
  86. package/esm/funcs/moderationsListResourcesByModerationKindAndStatus.d.ts.map +1 -1
  87. package/esm/funcs/moderationsListResourcesByModerationKindAndStatus.js.map +1 -1
  88. package/esm/funcs/peopleListPeople.d.ts +2 -2
  89. package/esm/funcs/peopleListPeople.d.ts.map +1 -1
  90. package/esm/funcs/peopleListPeople.js.map +1 -1
  91. package/esm/funcs/peopleUpdatePerson.d.ts +2 -2
  92. package/esm/funcs/peopleUpdatePerson.d.ts.map +1 -1
  93. package/esm/funcs/peopleUpdatePerson.js +9 -7
  94. package/esm/funcs/peopleUpdatePerson.js.map +1 -1
  95. package/esm/funcs/searchSearchAssets.d.ts +46 -2
  96. package/esm/funcs/searchSearchAssets.d.ts.map +1 -1
  97. package/esm/funcs/searchSearchAssets.js +46 -2
  98. package/esm/funcs/searchSearchAssets.js.map +1 -1
  99. package/esm/funcs/searchVisualSearchAssets.d.ts +1 -1
  100. package/esm/funcs/searchVisualSearchAssets.js +1 -1
  101. package/esm/funcs/uploadDestroyAsset.d.ts +2 -1
  102. package/esm/funcs/uploadDestroyAsset.d.ts.map +1 -1
  103. package/esm/funcs/uploadDestroyAsset.js +7 -12
  104. package/esm/funcs/uploadDestroyAsset.js.map +1 -1
  105. package/esm/funcs/uploadText.d.ts +3 -2
  106. package/esm/funcs/uploadText.d.ts.map +1 -1
  107. package/esm/funcs/uploadText.js +7 -7
  108. package/esm/funcs/uploadText.js.map +1 -1
  109. package/esm/landing-page.js +1 -1
  110. package/esm/lib/config.d.ts +4 -4
  111. package/esm/lib/config.js +4 -4
  112. package/esm/lib/config.js.map +1 -1
  113. package/esm/lib/sdks.js +0 -2
  114. package/esm/lib/sdks.js.map +1 -1
  115. package/esm/mcp-server/{widgets/widget-shared.d.ts → apps/app-shared.d.ts} +2 -2
  116. package/esm/mcp-server/apps/app-shared.d.ts.map +1 -0
  117. package/esm/mcp-server/{widgets/widget-shared.js → apps/app-shared.js} +4 -4
  118. package/esm/mcp-server/apps/app-shared.js.map +1 -0
  119. package/esm/mcp-server/apps/asset-details-app.d.ts +2 -0
  120. package/esm/mcp-server/apps/asset-details-app.d.ts.map +1 -0
  121. package/esm/mcp-server/{widgets/asset-details-widget.js → apps/asset-details-app.js} +7 -7
  122. package/esm/mcp-server/apps/asset-details-app.js.map +1 -0
  123. package/esm/mcp-server/apps/asset-gallery-app.d.ts +2 -0
  124. package/esm/mcp-server/apps/asset-gallery-app.d.ts.map +1 -0
  125. package/esm/mcp-server/{widgets/asset-gallery-widget.js → apps/asset-gallery-app.js} +35 -21
  126. package/esm/mcp-server/apps/asset-gallery-app.js.map +1 -0
  127. package/esm/mcp-server/apps/asset-upload-app.d.ts +2 -0
  128. package/esm/mcp-server/apps/asset-upload-app.d.ts.map +1 -0
  129. package/esm/mcp-server/{widgets/asset-upload-widget.js → apps/asset-upload-app.js} +11 -11
  130. package/esm/mcp-server/apps/asset-upload-app.js.map +1 -0
  131. package/esm/mcp-server/apps/cli-flag.d.ts +9 -0
  132. package/esm/mcp-server/apps/cli-flag.d.ts.map +1 -0
  133. package/esm/mcp-server/apps/cli-flag.js +12 -0
  134. package/esm/mcp-server/apps/cli-flag.js.map +1 -0
  135. package/esm/mcp-server/apps/config.d.ts +7 -0
  136. package/esm/mcp-server/apps/config.d.ts.map +1 -0
  137. package/esm/mcp-server/apps/config.js +42 -0
  138. package/esm/mcp-server/apps/config.js.map +1 -0
  139. package/esm/mcp-server/apps/extensions.d.ts +4 -0
  140. package/esm/mcp-server/apps/extensions.d.ts.map +1 -0
  141. package/esm/mcp-server/apps/extensions.js +83 -0
  142. package/esm/mcp-server/apps/extensions.js.map +1 -0
  143. package/esm/mcp-server/apps/tool-hooks.d.ts +2 -0
  144. package/esm/mcp-server/apps/tool-hooks.d.ts.map +1 -0
  145. package/esm/mcp-server/apps/tool-hooks.js +18 -0
  146. package/esm/mcp-server/apps/tool-hooks.js.map +1 -0
  147. package/esm/mcp-server/apps/uri.d.ts +11 -0
  148. package/esm/mcp-server/apps/uri.d.ts.map +1 -0
  149. package/esm/mcp-server/apps/uri.js +31 -0
  150. package/esm/mcp-server/apps/uri.js.map +1 -0
  151. package/esm/mcp-server/cli/serve/command.d.ts.map +1 -1
  152. package/esm/mcp-server/cli/serve/command.js +3 -1
  153. package/esm/mcp-server/cli/serve/command.js.map +1 -1
  154. package/esm/mcp-server/cli/serve/impl.d.ts.map +1 -1
  155. package/esm/mcp-server/cli/serve/impl.js +2 -0
  156. package/esm/mcp-server/cli/serve/impl.js.map +1 -1
  157. package/esm/mcp-server/cli/start/command.d.ts.map +1 -1
  158. package/esm/mcp-server/cli/start/command.js +3 -1
  159. package/esm/mcp-server/cli/start/command.js.map +1 -1
  160. package/esm/mcp-server/cli/start/impl.d.ts.map +1 -1
  161. package/esm/mcp-server/cli/start/impl.js +3 -0
  162. package/esm/mcp-server/cli/start/impl.js.map +1 -1
  163. package/esm/mcp-server/flags.d.ts +2 -0
  164. package/esm/mcp-server/flags.d.ts.map +1 -1
  165. package/esm/mcp-server/mcp-server.js +1 -1
  166. package/esm/mcp-server/mcp-server.js.map +1 -1
  167. package/esm/mcp-server/server.d.ts +2 -0
  168. package/esm/mcp-server/server.d.ts.map +1 -1
  169. package/esm/mcp-server/server.extensions.d.ts +2 -1
  170. package/esm/mcp-server/server.extensions.d.ts.map +1 -1
  171. package/esm/mcp-server/server.extensions.js +3 -85
  172. package/esm/mcp-server/server.extensions.js.map +1 -1
  173. package/esm/mcp-server/server.js +3 -3
  174. package/esm/mcp-server/server.js.map +1 -1
  175. package/esm/mcp-server/tools/assetRelationsCreateAssetRelationsByAssetId.d.ts +1 -1
  176. package/esm/mcp-server/tools/assetRelationsCreateAssetRelationsByAssetId.d.ts.map +1 -1
  177. package/esm/mcp-server/tools/assetRelationsCreateAssetRelationsByAssetId.js +5 -4
  178. package/esm/mcp-server/tools/assetRelationsCreateAssetRelationsByAssetId.js.map +1 -1
  179. package/esm/mcp-server/tools/assetRelationsDeleteAssetRelationsByAssetId.d.ts +1 -1
  180. package/esm/mcp-server/tools/assetRelationsDeleteAssetRelationsByAssetId.d.ts.map +1 -1
  181. package/esm/mcp-server/tools/assetRelationsDeleteAssetRelationsByAssetId.js +5 -4
  182. package/esm/mcp-server/tools/assetRelationsDeleteAssetRelationsByAssetId.js.map +1 -1
  183. package/esm/mcp-server/tools/assetsDerivedDestroy.d.ts.map +1 -1
  184. package/esm/mcp-server/tools/assetsDerivedDestroy.js +1 -1
  185. package/esm/mcp-server/tools/assetsDerivedDestroy.js.map +1 -1
  186. package/esm/mcp-server/tools/assetsDestroyByAssetId.d.ts +1 -1
  187. package/esm/mcp-server/tools/assetsDestroyByAssetId.d.ts.map +1 -1
  188. package/esm/mcp-server/tools/assetsDestroyByAssetId.js +4 -5
  189. package/esm/mcp-server/tools/assetsDestroyByAssetId.js.map +1 -1
  190. package/esm/mcp-server/tools/assetsDownloadBackupAsset.d.ts +0 -3
  191. package/esm/mcp-server/tools/assetsDownloadBackupAsset.d.ts.map +1 -1
  192. package/esm/mcp-server/tools/assetsDownloadBackupAsset.js +2 -5
  193. package/esm/mcp-server/tools/assetsDownloadBackupAsset.js.map +1 -1
  194. package/esm/mcp-server/tools/assetsGenerateArchive.d.ts.map +1 -1
  195. package/esm/mcp-server/tools/assetsGenerateArchive.js +2 -2
  196. package/esm/mcp-server/tools/assetsGenerateArchive.js.map +1 -1
  197. package/esm/mcp-server/tools/assetsGetResourceByAssetId.js +2 -2
  198. package/esm/mcp-server/tools/assetsGetResourceByAssetId.js.map +1 -1
  199. package/esm/mcp-server/tools/assetsListImages.d.ts +3 -36
  200. package/esm/mcp-server/tools/assetsListImages.d.ts.map +1 -1
  201. package/esm/mcp-server/tools/assetsListImages.js +12 -12
  202. package/esm/mcp-server/tools/assetsListImages.js.map +1 -1
  203. package/esm/mcp-server/tools/assetsListRawFiles.d.ts +3 -36
  204. package/esm/mcp-server/tools/assetsListRawFiles.d.ts.map +1 -1
  205. package/esm/mcp-server/tools/assetsListRawFiles.js +12 -12
  206. package/esm/mcp-server/tools/assetsListRawFiles.js.map +1 -1
  207. package/esm/mcp-server/tools/assetsListResourceTags.d.ts.map +1 -1
  208. package/esm/mcp-server/tools/assetsListResourceTags.js +2 -2
  209. package/esm/mcp-server/tools/assetsListResourceTags.js.map +1 -1
  210. package/esm/mcp-server/tools/assetsListVideos.d.ts +3 -36
  211. package/esm/mcp-server/tools/assetsListVideos.d.ts.map +1 -1
  212. package/esm/mcp-server/tools/assetsListVideos.js +12 -12
  213. package/esm/mcp-server/tools/assetsListVideos.js.map +1 -1
  214. package/esm/mcp-server/tools/assetsRenameAsset.d.ts.map +1 -1
  215. package/esm/mcp-server/tools/assetsRenameAsset.js +2 -2
  216. package/esm/mcp-server/tools/assetsRenameAsset.js.map +1 -1
  217. package/esm/mcp-server/tools/assetsUpdateResourceByAssetId.d.ts.map +1 -1
  218. package/esm/mcp-server/tools/assetsUpdateResourceByAssetId.js +2 -2
  219. package/esm/mcp-server/tools/assetsUpdateResourceByAssetId.js.map +1 -1
  220. package/esm/mcp-server/tools/foldersCreateFolder.d.ts.map +1 -1
  221. package/esm/mcp-server/tools/foldersCreateFolder.js +1 -1
  222. package/esm/mcp-server/tools/foldersCreateFolder.js.map +1 -1
  223. package/esm/mcp-server/tools/foldersDestroyFolder.d.ts.map +1 -1
  224. package/esm/mcp-server/tools/foldersDestroyFolder.js +1 -1
  225. package/esm/mcp-server/tools/foldersDestroyFolder.js.map +1 -1
  226. package/esm/mcp-server/tools/foldersSearchFolders.d.ts +5 -2
  227. package/esm/mcp-server/tools/foldersSearchFolders.d.ts.map +1 -1
  228. package/esm/mcp-server/tools/foldersSearchFolders.js +3 -3
  229. package/esm/mcp-server/tools/foldersSearchFolders.js.map +1 -1
  230. package/esm/mcp-server/tools/foldersUpdateFolder.d.ts +1 -1
  231. package/esm/mcp-server/tools/foldersUpdateFolder.d.ts.map +1 -1
  232. package/esm/mcp-server/tools/foldersUpdateFolder.js +4 -4
  233. package/esm/mcp-server/tools/foldersUpdateFolder.js.map +1 -1
  234. package/esm/mcp-server/tools/searchSearchAssets.d.ts.map +1 -1
  235. package/esm/mcp-server/tools/searchSearchAssets.js +49 -5
  236. package/esm/mcp-server/tools/searchSearchAssets.js.map +1 -1
  237. package/esm/mcp-server/tools/searchVisualSearchAssets.d.ts.map +1 -1
  238. package/esm/mcp-server/tools/searchVisualSearchAssets.js +2 -2
  239. package/esm/mcp-server/tools/searchVisualSearchAssets.js.map +1 -1
  240. package/esm/mcp-server/tools/uploadUpload.d.ts.map +1 -1
  241. package/esm/mcp-server/tools/uploadUpload.js +4 -9
  242. package/esm/mcp-server/tools/uploadUpload.js.map +1 -1
  243. package/esm/mcp-server/tools/usageGetUsage.d.ts.map +1 -1
  244. package/esm/mcp-server/tools/usageGetUsage.js +1 -1
  245. package/esm/mcp-server/tools/usageGetUsage.js.map +1 -1
  246. package/esm/mcp-server/tools.d.ts +2 -1
  247. package/esm/mcp-server/tools.d.ts.map +1 -1
  248. package/esm/mcp-server/tools.js +19 -12
  249. package/esm/mcp-server/tools.js.map +1 -1
  250. package/esm/models/accesscontrolitem.d.ts +12 -2
  251. package/esm/models/accesscontrolitem.d.ts.map +1 -1
  252. package/esm/models/accesscontrolitem.js +16 -2
  253. package/esm/models/accesscontrolitem.js.map +1 -1
  254. package/esm/models/assetdeliverytype.d.ts +16 -0
  255. package/esm/models/assetdeliverytype.d.ts.map +1 -0
  256. package/esm/models/assetdeliverytype.js +15 -0
  257. package/esm/models/assetdeliverytype.js.map +1 -0
  258. package/esm/models/assignfolderrolesop.d.ts.map +1 -1
  259. package/esm/models/assignfolderrolesop.js +1 -1
  260. package/esm/models/assignfolderrolesop.js.map +1 -1
  261. package/esm/models/asyncuploadresponse.d.ts +2 -2
  262. package/esm/models/asyncuploadresponse.d.ts.map +1 -1
  263. package/esm/models/asyncuploadresponse.js +2 -2
  264. package/esm/models/asyncuploadresponse.js.map +1 -1
  265. package/esm/models/backupversionfailure.d.ts +7 -0
  266. package/esm/models/backupversionfailure.d.ts.map +1 -0
  267. package/esm/models/backupversionfailure.js +11 -0
  268. package/esm/models/backupversionfailure.js.map +1 -0
  269. package/esm/models/componentsdestroyrequest.d.ts +9 -0
  270. package/esm/models/componentsdestroyrequest.d.ts.map +1 -0
  271. package/esm/models/componentsdestroyrequest.js +12 -0
  272. package/esm/models/componentsdestroyrequest.js.map +1 -0
  273. package/esm/models/componentsdestroyresponse.d.ts +22 -0
  274. package/esm/models/componentsdestroyresponse.d.ts.map +1 -0
  275. package/esm/models/componentsdestroyresponse.js +20 -0
  276. package/esm/models/componentsdestroyresponse.js.map +1 -0
  277. package/esm/models/contextfullresponse.d.ts +17 -0
  278. package/esm/models/contextfullresponse.d.ts.map +1 -0
  279. package/esm/models/contextfullresponse.js +21 -0
  280. package/esm/models/contextfullresponse.js.map +1 -0
  281. package/esm/models/coordinatesresponse.d.ts +10 -0
  282. package/esm/models/coordinatesresponse.d.ts.map +1 -0
  283. package/esm/models/coordinatesresponse.js +11 -0
  284. package/esm/models/coordinatesresponse.js.map +1 -0
  285. package/esm/models/createassetrelationsbyassetidop.d.ts +2 -5
  286. package/esm/models/createassetrelationsbyassetidop.d.ts.map +1 -1
  287. package/esm/models/createassetrelationsbyassetidop.js +3 -4
  288. package/esm/models/createassetrelationsbyassetidop.js.map +1 -1
  289. package/esm/models/createassetrelationsbypublicidop.d.ts +4 -7
  290. package/esm/models/createassetrelationsbypublicidop.d.ts.map +1 -1
  291. package/esm/models/createassetrelationsbypublicidop.js +6 -7
  292. package/esm/models/createassetrelationsbypublicidop.js.map +1 -1
  293. package/esm/models/createfolderop.d.ts +3 -11
  294. package/esm/models/createfolderop.d.ts.map +1 -1
  295. package/esm/models/createfolderop.js +4 -9
  296. package/esm/models/createfolderop.js.map +1 -1
  297. package/esm/models/createfolderresponse.d.ts +8 -0
  298. package/esm/models/createfolderresponse.d.ts.map +1 -0
  299. package/esm/models/createfolderresponse.js +12 -0
  300. package/esm/models/createfolderresponse.js.map +1 -0
  301. package/esm/models/deleteassetrelationsbyassetidop.d.ts +2 -5
  302. package/esm/models/deleteassetrelationsbyassetidop.d.ts.map +1 -1
  303. package/esm/models/deleteassetrelationsbyassetidop.js +3 -4
  304. package/esm/models/deleteassetrelationsbyassetidop.js.map +1 -1
  305. package/esm/models/deleteassetrelationsbypublicidop.d.ts +4 -7
  306. package/esm/models/deleteassetrelationsbypublicidop.d.ts.map +1 -1
  307. package/esm/models/deleteassetrelationsbypublicidop.js +5 -7
  308. package/esm/models/deleteassetrelationsbypublicidop.js.map +1 -1
  309. package/esm/models/deletebackupversionsop.d.ts +8 -31
  310. package/esm/models/deletebackupversionsop.d.ts.map +1 -1
  311. package/esm/models/deletebackupversionsop.js +9 -21
  312. package/esm/models/deletebackupversionsop.js.map +1 -1
  313. package/esm/models/deletebackupversionspartialresponse.d.ts +9 -0
  314. package/esm/models/deletebackupversionspartialresponse.d.ts.map +1 -0
  315. package/esm/models/deletebackupversionspartialresponse.js +12 -0
  316. package/esm/models/deletebackupversionspartialresponse.js.map +1 -0
  317. package/esm/models/deletebackupversionsrequest.d.ts +6 -0
  318. package/esm/models/deletebackupversionsrequest.d.ts.map +1 -0
  319. package/esm/models/deletebackupversionsrequest.js +9 -0
  320. package/esm/models/deletebackupversionsrequest.js.map +1 -0
  321. package/esm/models/deletebackupversionsresponse.d.ts +7 -0
  322. package/esm/models/deletebackupversionsresponse.d.ts.map +1 -0
  323. package/esm/models/deletebackupversionsresponse.js +10 -0
  324. package/esm/models/deletebackupversionsresponse.js.map +1 -0
  325. package/esm/models/deletefolderresponse.d.ts +6 -0
  326. package/esm/models/deletefolderresponse.d.ts.map +1 -0
  327. package/esm/models/deletefolderresponse.js +10 -0
  328. package/esm/models/deletefolderresponse.js.map +1 -0
  329. package/esm/models/deliverytype.d.ts +20 -0
  330. package/esm/models/deliverytype.d.ts.map +1 -0
  331. package/esm/models/deliverytype.js +19 -0
  332. package/esm/models/deliverytype.js.map +1 -0
  333. package/esm/models/deliverytypeall.d.ts +20 -0
  334. package/esm/models/deliverytypeall.d.ts.map +1 -0
  335. package/esm/models/deliverytypeall.js +25 -0
  336. package/esm/models/deliverytypeall.js.map +1 -0
  337. package/esm/models/destroyassetop.d.ts +14 -26
  338. package/esm/models/destroyassetop.d.ts.map +1 -1
  339. package/esm/models/destroyassetop.js +11 -18
  340. package/esm/models/destroyassetop.js.map +1 -1
  341. package/esm/models/destroybyassetidop.d.ts +2 -2
  342. package/esm/models/destroybyassetidop.d.ts.map +1 -1
  343. package/esm/models/destroybyassetidop.js +2 -2
  344. package/esm/models/destroybyassetidop.js.map +1 -1
  345. package/esm/models/destroyfolderop.d.ts +2 -8
  346. package/esm/models/destroyfolderop.d.ts.map +1 -1
  347. package/esm/models/destroyfolderop.js +3 -5
  348. package/esm/models/destroyfolderop.js.map +1 -1
  349. package/esm/models/destroyresponse.d.ts +6 -7
  350. package/esm/models/destroyresponse.d.ts.map +1 -1
  351. package/esm/models/destroyresponse.js +5 -6
  352. package/esm/models/destroyresponse.js.map +1 -1
  353. package/esm/models/directionenum.d.ts +18 -0
  354. package/esm/models/directionenum.d.ts.map +1 -0
  355. package/esm/models/directionenum.js +17 -0
  356. package/esm/models/directionenum.js.map +1 -0
  357. package/esm/models/downloadassetop.d.ts +2 -5
  358. package/esm/models/downloadassetop.d.ts.map +1 -1
  359. package/esm/models/downloadassetop.js +3 -6
  360. package/esm/models/downloadassetop.js.map +1 -1
  361. package/esm/models/downloadbackupassetop.d.ts +2 -39
  362. package/esm/models/downloadbackupassetop.d.ts.map +1 -1
  363. package/esm/models/downloadbackupassetop.js +2 -27
  364. package/esm/models/downloadbackupassetop.js.map +1 -1
  365. package/esm/models/explicitassetop.d.ts +2 -62
  366. package/esm/models/explicitassetop.d.ts.map +1 -1
  367. package/esm/models/explicitassetop.js +3 -64
  368. package/esm/models/explicitassetop.js.map +1 -1
  369. package/esm/models/explicitdeliverytype.d.ts +11 -0
  370. package/esm/models/explicitdeliverytype.d.ts.map +1 -0
  371. package/esm/models/explicitdeliverytype.js +17 -0
  372. package/esm/models/explicitdeliverytype.js.map +1 -0
  373. package/esm/models/explicitrequest.d.ts +128 -0
  374. package/esm/models/explicitrequest.d.ts.map +1 -0
  375. package/esm/models/explicitrequest.js +118 -0
  376. package/esm/models/explicitrequest.js.map +1 -0
  377. package/esm/models/exploderesourceop.d.ts +7 -27
  378. package/esm/models/exploderesourceop.d.ts.map +1 -1
  379. package/esm/models/exploderesourceop.js +6 -21
  380. package/esm/models/exploderesourceop.js.map +1 -1
  381. package/esm/models/exploderesponse.d.ts +21 -0
  382. package/esm/models/exploderesponse.d.ts.map +1 -0
  383. package/esm/models/exploderesponse.js +19 -0
  384. package/esm/models/exploderesponse.js.map +1 -0
  385. package/esm/models/fetchdeliverytype.d.ts +18 -0
  386. package/esm/models/fetchdeliverytype.d.ts.map +1 -0
  387. package/esm/models/fetchdeliverytype.js +17 -0
  388. package/esm/models/fetchdeliverytype.js.map +1 -0
  389. package/esm/models/fields.d.ts +5 -0
  390. package/esm/models/fields.d.ts.map +1 -0
  391. package/esm/models/fields.js +11 -0
  392. package/esm/models/fields.js.map +1 -0
  393. package/esm/models/foldernamepath.d.ts +7 -0
  394. package/esm/models/foldernamepath.d.ts.map +1 -0
  395. package/esm/models/foldernamepath.js +10 -0
  396. package/esm/models/foldernamepath.js.map +1 -0
  397. package/esm/models/foldersearchrequest.d.ts +12 -0
  398. package/esm/models/foldersearchrequest.d.ts.map +1 -0
  399. package/esm/models/foldersearchrequest.js +15 -0
  400. package/esm/models/foldersearchrequest.js.map +1 -0
  401. package/esm/models/generatearchiveop.d.ts +27 -34
  402. package/esm/models/generatearchiveop.d.ts.map +1 -1
  403. package/esm/models/generatearchiveop.js +31 -37
  404. package/esm/models/generatearchiveop.js.map +1 -1
  405. package/esm/models/generatearchiveresponse.d.ts +27 -0
  406. package/esm/models/generatearchiveresponse.d.ts.map +1 -0
  407. package/esm/models/generatearchiveresponse.js +30 -0
  408. package/esm/models/generatearchiveresponse.js.map +1 -0
  409. package/esm/models/generateddeliverytype.d.ts +22 -0
  410. package/esm/models/generateddeliverytype.d.ts.map +1 -0
  411. package/esm/models/generateddeliverytype.js +21 -0
  412. package/esm/models/generateddeliverytype.js.map +1 -0
  413. package/esm/models/getpersonop.d.ts +2 -9
  414. package/esm/models/getpersonop.d.ts.map +1 -1
  415. package/esm/models/getpersonop.js +2 -5
  416. package/esm/models/getpersonop.js.map +1 -1
  417. package/esm/models/getusageop.d.ts.map +1 -1
  418. package/esm/models/getusageop.js +1 -1
  419. package/esm/models/getusageop.js.map +1 -1
  420. package/esm/models/getvideoviewsop.d.ts +3 -23
  421. package/esm/models/getvideoviewsop.d.ts.map +1 -1
  422. package/esm/models/getvideoviewsop.js +2 -17
  423. package/esm/models/getvideoviewsop.js.map +1 -1
  424. package/esm/models/info.d.ts +54 -21
  425. package/esm/models/info.d.ts.map +1 -1
  426. package/esm/models/info.js +50 -23
  427. package/esm/models/info.js.map +1 -1
  428. package/esm/models/listimagesop.d.ts +6 -6
  429. package/esm/models/listimagesop.d.ts.map +1 -1
  430. package/esm/models/listimagesop.js +9 -9
  431. package/esm/models/listimagesop.js.map +1 -1
  432. package/esm/models/listpeopleop.d.ts +4 -12
  433. package/esm/models/listpeopleop.d.ts.map +1 -1
  434. package/esm/models/listpeopleop.js +4 -8
  435. package/esm/models/listpeopleop.js.map +1 -1
  436. package/esm/models/listrawfilesop.d.ts +6 -6
  437. package/esm/models/listrawfilesop.d.ts.map +1 -1
  438. package/esm/models/listrawfilesop.js +9 -9
  439. package/esm/models/listrawfilesop.js.map +1 -1
  440. package/esm/models/listresourcesbyassetfolderop.d.ts +4 -4
  441. package/esm/models/listresourcesbyassetfolderop.d.ts.map +1 -1
  442. package/esm/models/listresourcesbyassetfolderop.js +5 -5
  443. package/esm/models/listresourcesbyassetfolderop.js.map +1 -1
  444. package/esm/models/listresourcesbyassetidsop.d.ts +2 -2
  445. package/esm/models/listresourcesbyassetidsop.d.ts.map +1 -1
  446. package/esm/models/listresourcesbyassetidsop.js +3 -3
  447. package/esm/models/listresourcesbyassetidsop.js.map +1 -1
  448. package/esm/models/listresourcesbycontextop.d.ts +4 -4
  449. package/esm/models/listresourcesbycontextop.d.ts.map +1 -1
  450. package/esm/models/listresourcesbycontextop.js +5 -5
  451. package/esm/models/listresourcesbycontextop.js.map +1 -1
  452. package/esm/models/listresourcesbymoderationkindandstatusop.d.ts +7 -40
  453. package/esm/models/listresourcesbymoderationkindandstatusop.d.ts.map +1 -1
  454. package/esm/models/listresourcesbymoderationkindandstatusop.js +9 -39
  455. package/esm/models/listresourcesbymoderationkindandstatusop.js.map +1 -1
  456. package/esm/models/listresourcetagsop.d.ts +2 -9
  457. package/esm/models/listresourcetagsop.d.ts.map +1 -1
  458. package/esm/models/listresourcetagsop.js +4 -7
  459. package/esm/models/listresourcetagsop.js.map +1 -1
  460. package/esm/models/listresourcetypesop.d.ts +3 -21
  461. package/esm/models/listresourcetypesop.d.ts.map +1 -1
  462. package/esm/models/listresourcetypesop.js +3 -16
  463. package/esm/models/listresourcetypesop.js.map +1 -1
  464. package/esm/models/listvideosop.d.ts +6 -6
  465. package/esm/models/listvideosop.d.ts.map +1 -1
  466. package/esm/models/listvideosop.js +9 -9
  467. package/esm/models/listvideosop.js.map +1 -1
  468. package/esm/models/manageddeliverytype.d.ts +20 -0
  469. package/esm/models/manageddeliverytype.d.ts.map +1 -0
  470. package/esm/models/manageddeliverytype.js +19 -0
  471. package/esm/models/manageddeliverytype.js.map +1 -0
  472. package/esm/models/moderationkind.d.ts +22 -0
  473. package/esm/models/moderationkind.d.ts.map +1 -0
  474. package/esm/models/moderationkind.js +24 -0
  475. package/esm/models/moderationkind.js.map +1 -0
  476. package/esm/models/moderationstatusparameter.d.ts +18 -0
  477. package/esm/models/moderationstatusparameter.d.ts.map +1 -0
  478. package/esm/models/moderationstatusparameter.js +20 -0
  479. package/esm/models/moderationstatusparameter.js.map +1 -0
  480. package/esm/models/movefolderrequest.d.ts +9 -0
  481. package/esm/models/movefolderrequest.d.ts.map +1 -0
  482. package/esm/models/movefolderrequest.js +10 -0
  483. package/esm/models/movefolderrequest.js.map +1 -0
  484. package/esm/models/movefolderresponse.d.ts +8 -0
  485. package/esm/models/movefolderresponse.d.ts.map +1 -0
  486. package/esm/models/movefolderresponse.js +12 -0
  487. package/esm/models/movefolderresponse.js.map +1 -0
  488. package/esm/models/nonfinalchunkuploadresponse.d.ts +2 -2
  489. package/esm/models/nonfinalchunkuploadresponse.d.ts.map +1 -1
  490. package/esm/models/nonfinalchunkuploadresponse.js +2 -2
  491. package/esm/models/nonfinalchunkuploadresponse.js.map +1 -1
  492. package/esm/models/peoplelistresponse.d.ts +8 -0
  493. package/esm/models/peoplelistresponse.d.ts.map +1 -0
  494. package/esm/models/peoplelistresponse.js +12 -0
  495. package/esm/models/peoplelistresponse.js.map +1 -0
  496. package/esm/models/personresponse.d.ts +7 -0
  497. package/esm/models/personresponse.d.ts.map +1 -0
  498. package/esm/models/personresponse.js +10 -0
  499. package/esm/models/personresponse.js.map +1 -0
  500. package/esm/models/relateassetsbyassetidrequest.d.ts +9 -0
  501. package/esm/models/relateassetsbyassetidrequest.d.ts.map +1 -0
  502. package/esm/models/relateassetsbyassetidrequest.js +9 -0
  503. package/esm/models/relateassetsbyassetidrequest.js.map +1 -0
  504. package/esm/models/relateassetsbypublicidrequest.d.ts +9 -0
  505. package/esm/models/relateassetsbypublicidrequest.d.ts.map +1 -0
  506. package/esm/models/relateassetsbypublicidrequest.js +9 -0
  507. package/esm/models/relateassetsbypublicidrequest.js.map +1 -0
  508. package/esm/models/renameassetop.d.ts +8 -8
  509. package/esm/models/renameassetop.d.ts.map +1 -1
  510. package/esm/models/renameassetop.js +10 -13
  511. package/esm/models/renameassetop.js.map +1 -1
  512. package/esm/models/resourcefieldsenum.d.ts +66 -0
  513. package/esm/models/resourcefieldsenum.d.ts.map +1 -0
  514. package/esm/models/resourcefieldsenum.js +65 -0
  515. package/esm/models/resourcefieldsenum.js.map +1 -0
  516. package/esm/models/resourcetypesresponse.d.ts +18 -0
  517. package/esm/models/resourcetypesresponse.d.ts.map +1 -0
  518. package/esm/models/resourcetypesresponse.js +20 -0
  519. package/esm/models/resourcetypesresponse.js.map +1 -0
  520. package/esm/models/resourceupdaterequest.d.ts +11 -6
  521. package/esm/models/resourceupdaterequest.d.ts.map +1 -1
  522. package/esm/models/resourceupdaterequest.js +11 -8
  523. package/esm/models/resourceupdaterequest.js.map +1 -1
  524. package/esm/models/responsivebreakpoint.d.ts +11 -0
  525. package/esm/models/responsivebreakpoint.d.ts.map +1 -0
  526. package/esm/models/responsivebreakpoint.js +15 -0
  527. package/esm/models/responsivebreakpoint.js.map +1 -0
  528. package/esm/models/restorerequest.d.ts +8 -0
  529. package/esm/models/restorerequest.d.ts.map +1 -0
  530. package/esm/models/restorerequest.js +11 -0
  531. package/esm/models/restorerequest.js.map +1 -0
  532. package/esm/models/restoreresourcesbyassetidsop.d.ts +0 -6
  533. package/esm/models/restoreresourcesbyassetidsop.d.ts.map +1 -1
  534. package/esm/models/restoreresourcesbyassetidsop.js +0 -5
  535. package/esm/models/restoreresourcesbyassetidsop.js.map +1 -1
  536. package/esm/models/restoreresponseunion.d.ts +1 -1
  537. package/esm/models/searchfoldersop.d.ts +5 -9
  538. package/esm/models/searchfoldersop.d.ts.map +1 -1
  539. package/esm/models/searchfoldersop.js +3 -10
  540. package/esm/models/searchfoldersop.js.map +1 -1
  541. package/esm/models/searchfolderspostop.d.ts +0 -7
  542. package/esm/models/searchfolderspostop.d.ts.map +1 -1
  543. package/esm/models/searchfolderspostop.js +0 -6
  544. package/esm/models/searchfolderspostop.js.map +1 -1
  545. package/esm/models/searchparameters.d.ts +14 -8
  546. package/esm/models/searchparameters.d.ts.map +1 -1
  547. package/esm/models/searchparameters.js +14 -13
  548. package/esm/models/searchparameters.js.map +1 -1
  549. package/esm/models/searchresponse.d.ts +6 -29
  550. package/esm/models/searchresponse.d.ts.map +1 -1
  551. package/esm/models/searchresponse.js +4 -21
  552. package/esm/models/searchresponse.js.map +1 -1
  553. package/esm/models/showfolderop.d.ts.map +1 -1
  554. package/esm/models/showfolderop.js +1 -1
  555. package/esm/models/showfolderop.js.map +1 -1
  556. package/esm/models/{extendedstoragetype.d.ts → socialdeliverytype.d.ts} +14 -18
  557. package/esm/models/socialdeliverytype.d.ts.map +1 -0
  558. package/esm/models/{extendedstoragetype.js → socialdeliverytype.js} +14 -18
  559. package/esm/models/socialdeliverytype.js.map +1 -0
  560. package/esm/models/structuredmetadataparam.d.ts +12 -0
  561. package/esm/models/structuredmetadataparam.d.ts.map +1 -0
  562. package/esm/models/structuredmetadataparam.js +11 -0
  563. package/esm/models/structuredmetadataparam.js.map +1 -0
  564. package/esm/models/structuredmetadatavalue.d.ts +4 -0
  565. package/esm/models/structuredmetadatavalue.d.ts.map +1 -0
  566. package/esm/models/structuredmetadatavalue.js +11 -0
  567. package/esm/models/structuredmetadatavalue.js.map +1 -0
  568. package/esm/models/tagslistresponse.d.ts +7 -0
  569. package/esm/models/tagslistresponse.d.ts.map +1 -0
  570. package/esm/models/tagslistresponse.js +10 -0
  571. package/esm/models/tagslistresponse.js.map +1 -0
  572. package/esm/models/tagsparam.d.ts +7 -0
  573. package/esm/models/tagsparam.d.ts.map +1 -0
  574. package/esm/models/tagsparam.js +10 -0
  575. package/esm/models/tagsparam.js.map +1 -0
  576. package/esm/models/textop.d.ts +7 -127
  577. package/esm/models/textop.d.ts.map +1 -1
  578. package/esm/models/textop.js +8 -97
  579. package/esm/models/textop.js.map +1 -1
  580. package/esm/models/textrequest.d.ts +82 -0
  581. package/esm/models/textrequest.d.ts.map +1 -0
  582. package/esm/models/textrequest.js +68 -0
  583. package/esm/models/textrequest.js.map +1 -0
  584. package/esm/models/textresponse.d.ts +41 -0
  585. package/esm/models/textresponse.d.ts.map +1 -0
  586. package/esm/models/textresponse.js +36 -0
  587. package/esm/models/textresponse.js.map +1 -0
  588. package/esm/models/unrelateassetsbyassetidrequest.d.ts +9 -0
  589. package/esm/models/unrelateassetsbyassetidrequest.d.ts.map +1 -0
  590. package/esm/models/unrelateassetsbyassetidrequest.js +9 -0
  591. package/esm/models/unrelateassetsbyassetidrequest.js.map +1 -0
  592. package/esm/models/unrelateassetsbypublicidrequest.d.ts +9 -0
  593. package/esm/models/unrelateassetsbypublicidrequest.d.ts.map +1 -0
  594. package/esm/models/unrelateassetsbypublicidrequest.js +9 -0
  595. package/esm/models/unrelateassetsbypublicidrequest.js.map +1 -0
  596. package/esm/models/updatefolderop.d.ts +4 -24
  597. package/esm/models/updatefolderop.d.ts.map +1 -1
  598. package/esm/models/updatefolderop.js +5 -18
  599. package/esm/models/updatefolderop.js.map +1 -1
  600. package/esm/models/updatepersonop.d.ts +7 -21
  601. package/esm/models/updatepersonop.d.ts.map +1 -1
  602. package/esm/models/updatepersonop.js +6 -17
  603. package/esm/models/updatepersonop.js.map +1 -1
  604. package/esm/models/updatepersonrequest.d.ts +9 -0
  605. package/esm/models/updatepersonrequest.d.ts.map +1 -0
  606. package/esm/models/updatepersonrequest.js +13 -0
  607. package/esm/models/updatepersonrequest.js.map +1 -0
  608. package/esm/models/updatepersonresponse.d.ts +9 -0
  609. package/esm/models/updatepersonresponse.d.ts.map +1 -0
  610. package/esm/models/updatepersonresponse.js +13 -0
  611. package/esm/models/updatepersonresponse.js.map +1 -0
  612. package/esm/models/updateresourcebyassetidop.d.ts.map +1 -1
  613. package/esm/models/updateresourcebyassetidop.js +1 -1
  614. package/esm/models/updateresourcebyassetidop.js.map +1 -1
  615. package/esm/models/uploadchunkop.d.ts.map +1 -1
  616. package/esm/models/uploadchunkop.js +2 -2
  617. package/esm/models/uploadchunkop.js.map +1 -1
  618. package/esm/models/uploaddeliverytype.d.ts +9 -0
  619. package/esm/models/uploaddeliverytype.d.ts.map +1 -0
  620. package/esm/models/uploaddeliverytype.js +13 -0
  621. package/esm/models/uploaddeliverytype.js.map +1 -0
  622. package/esm/models/uploadop.d.ts.map +1 -1
  623. package/esm/models/uploadop.js +2 -2
  624. package/esm/models/uploadop.js.map +1 -1
  625. package/esm/models/uploadrequest.d.ts +69 -74
  626. package/esm/models/uploadrequest.d.ts.map +1 -1
  627. package/esm/models/uploadrequest.js +38 -47
  628. package/esm/models/uploadrequest.js.map +1 -1
  629. package/esm/models/uploadresponse.d.ts +11 -1
  630. package/esm/models/uploadresponse.d.ts.map +1 -1
  631. package/esm/models/uploadresponse.js +12 -4
  632. package/esm/models/uploadresponse.js.map +1 -1
  633. package/esm/models/videoview.d.ts +14 -0
  634. package/esm/models/videoview.d.ts.map +1 -0
  635. package/esm/models/videoview.js +17 -0
  636. package/esm/models/videoview.js.map +1 -0
  637. package/esm/models/videoviewsresponse.d.ts +9 -0
  638. package/esm/models/videoviewsresponse.d.ts.map +1 -0
  639. package/esm/models/videoviewsresponse.js +13 -0
  640. package/esm/models/videoviewsresponse.js.map +1 -0
  641. package/esm/tool-names.js +9 -9
  642. package/esm/tool-names.js.map +1 -1
  643. package/package.json +1 -1
  644. package/src/funcs/assetRelationsCreateAssetRelationsByAssetId.ts +9 -7
  645. package/src/funcs/assetRelationsCreateAssetRelationsByPublicId.ts +13 -9
  646. package/src/funcs/assetRelationsDeleteAssetRelationsByAssetId.ts +11 -7
  647. package/src/funcs/assetRelationsDeleteAssetRelationsByPublicId.ts +13 -9
  648. package/src/funcs/assetsDeleteBackupVersions.ts +12 -10
  649. package/src/funcs/assetsDestroyByAssetId.ts +8 -9
  650. package/src/funcs/assetsDownloadAsset.ts +3 -18
  651. package/src/funcs/assetsDownloadBackupAsset.ts +0 -15
  652. package/src/funcs/assetsExplicitAsset.ts +8 -6
  653. package/src/funcs/assetsListImages.ts +10 -10
  654. package/src/funcs/assetsListRawFiles.ts +10 -10
  655. package/src/funcs/assetsListResourcesByAssetFolder.ts +6 -6
  656. package/src/funcs/assetsListResourcesByAssetIDs.ts +3 -3
  657. package/src/funcs/assetsListResourcesByContext.ts +6 -6
  658. package/src/funcs/assetsListResourcesByModerationKindAndStatus.ts +10 -10
  659. package/src/funcs/assetsListVideos.ts +10 -10
  660. package/src/funcs/assetsRestoreResourcesByAssetIDs.ts +6 -6
  661. package/src/funcs/assetsUpdateResourceByAssetId.ts +1 -1
  662. package/src/funcs/backupsDeleteBackupVersions.ts +12 -10
  663. package/src/funcs/foldersSearchFolders.ts +5 -5
  664. package/src/funcs/foldersSearchFoldersPost.ts +6 -6
  665. package/src/funcs/foldersUpdateFolder.ts +8 -6
  666. package/src/funcs/moderationsListResourcesByModerationKindAndStatus.ts +10 -10
  667. package/src/funcs/peopleListPeople.ts +3 -3
  668. package/src/funcs/peopleUpdatePerson.ts +12 -10
  669. package/src/funcs/searchSearchAssets.ts +46 -2
  670. package/src/funcs/searchVisualSearchAssets.ts +1 -1
  671. package/src/funcs/uploadDestroyAsset.ts +8 -15
  672. package/src/funcs/uploadText.ts +10 -10
  673. package/src/landing-page.ts +1 -1
  674. package/src/lib/config.ts +4 -4
  675. package/src/lib/sdks.ts +0 -2
  676. package/src/mcp-server/{widgets/widget-shared.ts → apps/app-shared.ts} +3 -3
  677. package/src/mcp-server/{widgets/asset-details-widget.ts → apps/asset-details-app.ts} +6 -7
  678. package/src/mcp-server/{widgets/asset-gallery-widget.ts → apps/asset-gallery-app.ts} +34 -21
  679. package/src/mcp-server/{widgets/asset-upload-widget.ts → apps/asset-upload-app.ts} +10 -11
  680. package/src/mcp-server/apps/cli-flag.ts +14 -0
  681. package/src/mcp-server/apps/config.ts +48 -0
  682. package/src/mcp-server/apps/extensions.ts +102 -0
  683. package/src/mcp-server/apps/tool-hooks.ts +19 -0
  684. package/src/mcp-server/apps/uri.ts +38 -0
  685. package/src/mcp-server/cli/serve/command.ts +3 -1
  686. package/src/mcp-server/cli/serve/impl.ts +2 -0
  687. package/src/mcp-server/cli/start/command.ts +3 -1
  688. package/src/mcp-server/cli/start/impl.ts +3 -0
  689. package/src/mcp-server/flags.ts +2 -0
  690. package/src/mcp-server/mcp-server.ts +1 -1
  691. package/src/mcp-server/server.extensions.ts +8 -98
  692. package/src/mcp-server/server.ts +5 -2
  693. package/src/mcp-server/tools/assetRelationsCreateAssetRelationsByAssetId.ts +5 -4
  694. package/src/mcp-server/tools/assetRelationsDeleteAssetRelationsByAssetId.ts +5 -4
  695. package/src/mcp-server/tools/assetsDerivedDestroy.ts +3 -1
  696. package/src/mcp-server/tools/assetsDestroyByAssetId.ts +6 -5
  697. package/src/mcp-server/tools/assetsDownloadBackupAsset.ts +1 -13
  698. package/src/mcp-server/tools/assetsGenerateArchive.ts +4 -2
  699. package/src/mcp-server/tools/assetsGetResourceByAssetId.ts +2 -2
  700. package/src/mcp-server/tools/assetsListImages.ts +19 -15
  701. package/src/mcp-server/tools/assetsListRawFiles.ts +19 -15
  702. package/src/mcp-server/tools/assetsListResourceTags.ts +4 -2
  703. package/src/mcp-server/tools/assetsListVideos.ts +19 -15
  704. package/src/mcp-server/tools/assetsRenameAsset.ts +6 -2
  705. package/src/mcp-server/tools/assetsUpdateResourceByAssetId.ts +4 -2
  706. package/src/mcp-server/tools/foldersCreateFolder.ts +3 -1
  707. package/src/mcp-server/tools/foldersDestroyFolder.ts +3 -1
  708. package/src/mcp-server/tools/foldersSearchFolders.ts +6 -6
  709. package/src/mcp-server/tools/foldersUpdateFolder.ts +8 -4
  710. package/src/mcp-server/tools/searchSearchAssets.ts +49 -5
  711. package/src/mcp-server/tools/searchVisualSearchAssets.ts +4 -2
  712. package/src/mcp-server/tools/uploadUpload.ts +6 -9
  713. package/src/mcp-server/tools/usageGetUsage.ts +3 -1
  714. package/src/mcp-server/tools.ts +20 -12
  715. package/src/models/accesscontrolitem.ts +36 -6
  716. package/src/models/assetdeliverytype.ts +22 -0
  717. package/src/models/assignfolderrolesop.ts +3 -1
  718. package/src/models/asyncuploadresponse.ts +8 -3
  719. package/src/models/backupversionfailure.ts +21 -0
  720. package/src/models/componentsdestroyrequest.ts +28 -0
  721. package/src/models/componentsdestroyresponse.ts +38 -0
  722. package/src/models/contextfullresponse.ts +42 -0
  723. package/src/models/coordinatesresponse.ts +24 -0
  724. package/src/models/createassetrelationsbyassetidop.ts +7 -14
  725. package/src/models/createassetrelationsbypublicidop.ts +13 -23
  726. package/src/models/createfolderop.ts +14 -26
  727. package/src/models/createfolderresponse.ts +21 -0
  728. package/src/models/deleteassetrelationsbyassetidop.ts +7 -14
  729. package/src/models/deleteassetrelationsbypublicidop.ts +14 -22
  730. package/src/models/deletebackupversionsop.ts +25 -74
  731. package/src/models/deletebackupversionspartialresponse.ts +28 -0
  732. package/src/models/deletebackupversionsrequest.ts +16 -0
  733. package/src/models/deletebackupversionsresponse.ts +20 -0
  734. package/src/models/deletefolderresponse.ts +13 -0
  735. package/src/models/deliverytype.ts +28 -0
  736. package/src/models/deliverytypeall.ts +56 -0
  737. package/src/models/destroyassetop.ts +41 -41
  738. package/src/models/destroybyassetidop.ts +5 -5
  739. package/src/models/destroyfolderop.ts +9 -14
  740. package/src/models/destroyresponse.ts +9 -13
  741. package/src/models/directionenum.ts +24 -0
  742. package/src/models/downloadassetop.ts +10 -17
  743. package/src/models/downloadbackupassetop.ts +4 -91
  744. package/src/models/explicitassetop.ts +10 -208
  745. package/src/models/explicitdeliverytype.ts +39 -0
  746. package/src/models/explicitrequest.ts +383 -0
  747. package/src/models/exploderesourceop.ts +20 -52
  748. package/src/models/exploderesponse.ts +34 -0
  749. package/src/models/fetchdeliverytype.ts +26 -0
  750. package/src/models/fields.ts +17 -0
  751. package/src/models/foldernamepath.ts +13 -0
  752. package/src/models/foldersearchrequest.ts +31 -0
  753. package/src/models/generatearchiveop.ts +67 -118
  754. package/src/models/generatearchiveresponse.ts +100 -0
  755. package/src/models/generateddeliverytype.ts +28 -0
  756. package/src/models/getpersonop.ts +3 -15
  757. package/src/models/getusageop.ts +3 -1
  758. package/src/models/getvideoviewsop.ts +6 -63
  759. package/src/models/info.ts +127 -46
  760. package/src/models/listimagesop.ts +22 -18
  761. package/src/models/listpeopleop.ts +8 -27
  762. package/src/models/listrawfilesop.ts +22 -18
  763. package/src/models/listresourcesbyassetfolderop.ts +11 -7
  764. package/src/models/listresourcesbyassetidsop.ts +6 -4
  765. package/src/models/listresourcesbycontextop.ts +13 -7
  766. package/src/models/listresourcesbymoderationkindandstatusop.ts +25 -53
  767. package/src/models/listresourcetagsop.ts +10 -19
  768. package/src/models/listresourcetypesop.ts +10 -38
  769. package/src/models/listvideosop.ts +22 -18
  770. package/src/models/manageddeliverytype.ts +28 -0
  771. package/src/models/moderationkind.ts +28 -0
  772. package/src/models/moderationstatusparameter.ts +26 -0
  773. package/src/models/movefolderrequest.ts +16 -0
  774. package/src/models/movefolderresponse.ts +15 -0
  775. package/src/models/nonfinalchunkuploadresponse.ts +7 -4
  776. package/src/models/peoplelistresponse.ts +22 -0
  777. package/src/models/personresponse.ts +15 -0
  778. package/src/models/relateassetsbyassetidrequest.ts +19 -0
  779. package/src/models/relateassetsbypublicidrequest.ts +19 -0
  780. package/src/models/renameassetop.ts +30 -32
  781. package/src/models/resourcefieldsenum.ts +72 -0
  782. package/src/models/resourcetypesresponse.ts +32 -0
  783. package/src/models/resourceupdaterequest.ts +25 -16
  784. package/src/models/responsivebreakpoint.ts +37 -0
  785. package/src/models/restorerequest.ts +24 -0
  786. package/src/models/restoreresourcesbyassetidsop.ts +0 -20
  787. package/src/models/searchfoldersop.ts +8 -26
  788. package/src/models/searchfolderspostop.ts +0 -24
  789. package/src/models/searchparameters.ts +35 -19
  790. package/src/models/searchresponse.ts +11 -38
  791. package/src/models/showfolderop.ts +3 -1
  792. package/src/models/socialdeliverytype.ts +44 -0
  793. package/src/models/structuredmetadataparam.ts +28 -0
  794. package/src/models/structuredmetadatavalue.ts +16 -0
  795. package/src/models/tagslistresponse.ts +18 -0
  796. package/src/models/tagsparam.ts +16 -0
  797. package/src/models/textop.ts +17 -251
  798. package/src/models/textrequest.ts +125 -0
  799. package/src/models/textresponse.ts +113 -0
  800. package/src/models/unrelateassetsbyassetidrequest.ts +21 -0
  801. package/src/models/unrelateassetsbypublicidrequest.ts +21 -0
  802. package/src/models/updatefolderop.ts +17 -39
  803. package/src/models/updatepersonop.ts +23 -49
  804. package/src/models/updatepersonrequest.ts +26 -0
  805. package/src/models/updatepersonresponse.ts +24 -0
  806. package/src/models/updateresourcebyassetidop.ts +3 -1
  807. package/src/models/uploadchunkop.ts +4 -2
  808. package/src/models/uploaddeliverytype.ts +25 -0
  809. package/src/models/uploadop.ts +4 -2
  810. package/src/models/uploadrequest.ts +144 -126
  811. package/src/models/uploadresponse.ts +38 -6
  812. package/src/models/videoview.ts +48 -0
  813. package/src/models/videoviewsresponse.ts +22 -0
  814. package/src/tool-names.ts +9 -9
  815. package/esm/funcs/assetsDeleteResourcesByPublicId.d.ts +0 -18
  816. package/esm/funcs/assetsDeleteResourcesByPublicId.d.ts.map +0 -1
  817. package/esm/funcs/assetsDeleteResourcesByPublicId.js +0 -104
  818. package/esm/funcs/assetsDeleteResourcesByPublicId.js.map +0 -1
  819. package/esm/funcs/assetsGetResourceByPublicId.d.ts +0 -17
  820. package/esm/funcs/assetsGetResourceByPublicId.d.ts.map +0 -1
  821. package/esm/funcs/assetsGetResourceByPublicId.js +0 -130
  822. package/esm/funcs/assetsGetResourceByPublicId.js.map +0 -1
  823. package/esm/funcs/assetsUpdateResourceByPublicId.d.ts +0 -18
  824. package/esm/funcs/assetsUpdateResourceByPublicId.d.ts.map +0 -1
  825. package/esm/funcs/assetsUpdateResourceByPublicId.js +0 -109
  826. package/esm/funcs/assetsUpdateResourceByPublicId.js.map +0 -1
  827. package/esm/mcp-server/widgets/asset-details-widget.d.ts +0 -3
  828. package/esm/mcp-server/widgets/asset-details-widget.d.ts.map +0 -1
  829. package/esm/mcp-server/widgets/asset-details-widget.js.map +0 -1
  830. package/esm/mcp-server/widgets/asset-gallery-widget.d.ts +0 -4
  831. package/esm/mcp-server/widgets/asset-gallery-widget.d.ts.map +0 -1
  832. package/esm/mcp-server/widgets/asset-gallery-widget.js.map +0 -1
  833. package/esm/mcp-server/widgets/asset-upload-widget.d.ts +0 -3
  834. package/esm/mcp-server/widgets/asset-upload-widget.d.ts.map +0 -1
  835. package/esm/mcp-server/widgets/asset-upload-widget.js.map +0 -1
  836. package/esm/mcp-server/widgets/widget-shared.d.ts.map +0 -1
  837. package/esm/mcp-server/widgets/widget-shared.js.map +0 -1
  838. package/esm/models/archivestoragetype.d.ts +0 -22
  839. package/esm/models/archivestoragetype.d.ts.map +0 -1
  840. package/esm/models/archivestoragetype.js +0 -21
  841. package/esm/models/archivestoragetype.js.map +0 -1
  842. package/esm/models/deleteresourcebypublicidsrequestunion.d.ts +0 -89
  843. package/esm/models/deleteresourcebypublicidsrequestunion.d.ts.map +0 -1
  844. package/esm/models/deleteresourcebypublicidsrequestunion.js +0 -83
  845. package/esm/models/deleteresourcebypublicidsrequestunion.js.map +0 -1
  846. package/esm/models/deleteresourcesbypublicidop.d.ts +0 -23
  847. package/esm/models/deleteresourcesbypublicidop.d.ts.map +0 -1
  848. package/esm/models/deleteresourcesbypublicidop.js +0 -24
  849. package/esm/models/deleteresourcesbypublicidop.js.map +0 -1
  850. package/esm/models/destroyrequest.d.ts +0 -12
  851. package/esm/models/destroyrequest.d.ts.map +0 -1
  852. package/esm/models/destroyrequest.js +0 -15
  853. package/esm/models/destroyrequest.js.map +0 -1
  854. package/esm/models/direction.d.ts +0 -12
  855. package/esm/models/direction.d.ts.map +0 -1
  856. package/esm/models/direction.js +0 -14
  857. package/esm/models/direction.js.map +0 -1
  858. package/esm/models/extendedstoragetype.d.ts.map +0 -1
  859. package/esm/models/extendedstoragetype.js.map +0 -1
  860. package/esm/models/fieldsspec.d.ts +0 -60
  861. package/esm/models/fieldsspec.d.ts.map +0 -1
  862. package/esm/models/fieldsspec.js +0 -62
  863. package/esm/models/fieldsspec.js.map +0 -1
  864. package/esm/models/getresourcebypublicidop.d.ts +0 -29
  865. package/esm/models/getresourcebypublicidop.d.ts.map +0 -1
  866. package/esm/models/getresourcebypublicidop.js +0 -34
  867. package/esm/models/getresourcebypublicidop.js.map +0 -1
  868. package/esm/models/liststoragetype.d.ts +0 -24
  869. package/esm/models/liststoragetype.d.ts.map +0 -1
  870. package/esm/models/liststoragetype.js +0 -23
  871. package/esm/models/liststoragetype.js.map +0 -1
  872. package/esm/models/parametersdirection.d.ts +0 -18
  873. package/esm/models/parametersdirection.d.ts.map +0 -1
  874. package/esm/models/parametersdirection.js +0 -17
  875. package/esm/models/parametersdirection.js.map +0 -1
  876. package/esm/models/searchsortpair.d.ts +0 -12
  877. package/esm/models/searchsortpair.d.ts.map +0 -1
  878. package/esm/models/searchsortpair.js +0 -14
  879. package/esm/models/searchsortpair.js.map +0 -1
  880. package/esm/models/storagetype.d.ts +0 -20
  881. package/esm/models/storagetype.d.ts.map +0 -1
  882. package/esm/models/storagetype.js +0 -19
  883. package/esm/models/storagetype.js.map +0 -1
  884. package/esm/models/storagetypeparameter.d.ts +0 -20
  885. package/esm/models/storagetypeparameter.d.ts.map +0 -1
  886. package/esm/models/storagetypeparameter.js +0 -19
  887. package/esm/models/storagetypeparameter.js.map +0 -1
  888. package/esm/models/updateresourcebypublicidop.d.ts +0 -20
  889. package/esm/models/updateresourcebypublicidop.d.ts.map +0 -1
  890. package/esm/models/updateresourcebypublicidop.js +0 -25
  891. package/esm/models/updateresourcebypublicidop.js.map +0 -1
  892. package/src/funcs/assetsDeleteResourcesByPublicId.ts +0 -181
  893. package/src/funcs/assetsGetResourceByPublicId.ts +0 -239
  894. package/src/funcs/assetsUpdateResourceByPublicId.ts +0 -189
  895. package/src/models/archivestoragetype.ts +0 -28
  896. package/src/models/deleteresourcebypublicidsrequestunion.ts +0 -212
  897. package/src/models/deleteresourcesbypublicidop.ts +0 -64
  898. package/src/models/destroyrequest.ts +0 -38
  899. package/src/models/direction.ts +0 -18
  900. package/src/models/extendedstoragetype.ts +0 -48
  901. package/src/models/fieldsspec.ts +0 -66
  902. package/src/models/getresourcebypublicidop.ts +0 -91
  903. package/src/models/liststoragetype.ts +0 -30
  904. package/src/models/parametersdirection.ts +0 -24
  905. package/src/models/searchsortpair.ts +0 -18
  906. package/src/models/storagetype.ts +0 -26
  907. package/src/models/storagetypeparameter.ts +0 -26
  908. package/src/models/updateresourcebypublicidop.ts +0 -55
package/bin/mcp-server.js CHANGED
@@ -13959,13 +13959,71 @@ var init_config = __esm(() => {
13959
13959
  ]).describe("Regional endpoint selection");
13960
13960
  SDK_METADATA = {
13961
13961
  language: "typescript",
13962
- openapiDocVersion: "0.4.0",
13963
- sdkVersion: "0.9.0-rc.0",
13964
- genVersion: "2.879.11",
13965
- userAgent: "speakeasy-sdk/mcp-typescript 0.9.0-rc.0 2.879.11 0.4.0 @cloudinary/asset-management-mcp"
13962
+ openapiDocVersion: "0.5.1",
13963
+ sdkVersion: "0.9.1",
13964
+ genVersion: "2.881.4",
13965
+ userAgent: "speakeasy-sdk/mcp-typescript 0.9.1 2.881.4 0.5.1 @cloudinary/asset-management-mcp"
13966
13966
  };
13967
13967
  });
13968
13968
 
13969
+ // src/mcp-server/apps/uri.ts
13970
+ function appUri(app, toolName) {
13971
+ return `${ROOT}/${app}/${toolName}.html`;
13972
+ }
13973
+ function appUriTemplate(app) {
13974
+ return `${ROOT}/${app}/{tool}.html`;
13975
+ }
13976
+ function appUriPrefix(app) {
13977
+ return `${ROOT}/${app}/`;
13978
+ }
13979
+ function injectToolName(html, toolName) {
13980
+ if (!toolName)
13981
+ return html;
13982
+ const inject = `<script>window.__MCP_TOOL_NAME__=${JSON.stringify(toolName)};</script>`;
13983
+ return html.replace("</head>", `${inject}</head>`);
13984
+ }
13985
+ var MCP_APP_MIME_TYPE = "text/html;profile=mcp-app", ROOT = "ui://cloudinary";
13986
+
13987
+ // src/mcp-server/apps/config.ts
13988
+ function parseMcpAppsList(value) {
13989
+ const parts = value.split(",").map((s) => s.trim()).filter(Boolean);
13990
+ if (parts.length === 0)
13991
+ return [...MCP_APPS];
13992
+ if (parts.length === 1) {
13993
+ const v2 = parts[0].toLowerCase();
13994
+ if (v2 === "all" || v2 === "true")
13995
+ return [...MCP_APPS];
13996
+ if (v2 === "none" || v2 === "false")
13997
+ return [];
13998
+ }
13999
+ for (const p of parts) {
14000
+ if (!MCP_APPS.includes(p)) {
14001
+ throw new Error(`Invalid mcp-apps value: "${p}". Valid: ${MCP_APPS.join(", ")}, all/true, none/false`);
14002
+ }
14003
+ }
14004
+ return parts;
14005
+ }
14006
+ function resolveMcpApps(flag) {
14007
+ if (flag !== undefined)
14008
+ return flag;
14009
+ const env = process.env["CLOUDINARY_MCP_APPS"];
14010
+ if (env != null)
14011
+ return parseMcpAppsList(env);
14012
+ return [...DEFAULT_MCP_APPS];
14013
+ }
14014
+ function enabledAppUriPrefixes(apps) {
14015
+ return apps.map(appUriPrefix);
14016
+ }
14017
+ var MCP_APPS, DEFAULT_MCP_APPS;
14018
+ var init_config2 = __esm(() => {
14019
+ MCP_APPS = [
14020
+ "asset-gallery",
14021
+ "asset-details",
14022
+ "asset-upload"
14023
+ ];
14024
+ DEFAULT_MCP_APPS = [];
14025
+ });
14026
+
13969
14027
  // src/mcp-server/console-logger.ts
13970
14028
  function createConsoleLogger(level) {
13971
14029
  const min = consoleLoggerLevels.indexOf(level);
@@ -61841,6 +61899,221 @@ var init_completable = __esm(() => {
61841
61899
  McpZodTypeKind2["Completable"] = "McpCompletable";
61842
61900
  })(McpZodTypeKind || (McpZodTypeKind = {}));
61843
61901
  });
61902
+
61903
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/shared/uriTemplate.js
61904
+ class UriTemplate {
61905
+ static isTemplate(str) {
61906
+ return /\{[^}\s]+\}/.test(str);
61907
+ }
61908
+ static validateLength(str, max, context) {
61909
+ if (str.length > max) {
61910
+ throw new Error(`${context} exceeds maximum length of ${max} characters (got ${str.length})`);
61911
+ }
61912
+ }
61913
+ get variableNames() {
61914
+ return this.parts.flatMap((part) => typeof part === "string" ? [] : part.names);
61915
+ }
61916
+ constructor(template) {
61917
+ UriTemplate.validateLength(template, MAX_TEMPLATE_LENGTH, "Template");
61918
+ this.template = template;
61919
+ this.parts = this.parse(template);
61920
+ }
61921
+ toString() {
61922
+ return this.template;
61923
+ }
61924
+ parse(template) {
61925
+ const parts = [];
61926
+ let currentText = "";
61927
+ let i = 0;
61928
+ let expressionCount = 0;
61929
+ while (i < template.length) {
61930
+ if (template[i] === "{") {
61931
+ if (currentText) {
61932
+ parts.push(currentText);
61933
+ currentText = "";
61934
+ }
61935
+ const end = template.indexOf("}", i);
61936
+ if (end === -1)
61937
+ throw new Error("Unclosed template expression");
61938
+ expressionCount++;
61939
+ if (expressionCount > MAX_TEMPLATE_EXPRESSIONS) {
61940
+ throw new Error(`Template contains too many expressions (max ${MAX_TEMPLATE_EXPRESSIONS})`);
61941
+ }
61942
+ const expr = template.slice(i + 1, end);
61943
+ const operator = this.getOperator(expr);
61944
+ const exploded = expr.includes("*");
61945
+ const names = this.getNames(expr);
61946
+ const name = names[0];
61947
+ for (const name2 of names) {
61948
+ UriTemplate.validateLength(name2, MAX_VARIABLE_LENGTH, "Variable name");
61949
+ }
61950
+ parts.push({ name, operator, names, exploded });
61951
+ i = end + 1;
61952
+ } else {
61953
+ currentText += template[i];
61954
+ i++;
61955
+ }
61956
+ }
61957
+ if (currentText) {
61958
+ parts.push(currentText);
61959
+ }
61960
+ return parts;
61961
+ }
61962
+ getOperator(expr) {
61963
+ const operators = ["+", "#", ".", "/", "?", "&"];
61964
+ return operators.find((op) => expr.startsWith(op)) || "";
61965
+ }
61966
+ getNames(expr) {
61967
+ const operator = this.getOperator(expr);
61968
+ return expr.slice(operator.length).split(",").map((name) => name.replace("*", "").trim()).filter((name) => name.length > 0);
61969
+ }
61970
+ encodeValue(value, operator) {
61971
+ UriTemplate.validateLength(value, MAX_VARIABLE_LENGTH, "Variable value");
61972
+ if (operator === "+" || operator === "#") {
61973
+ return encodeURI(value);
61974
+ }
61975
+ return encodeURIComponent(value);
61976
+ }
61977
+ expandPart(part, variables) {
61978
+ if (part.operator === "?" || part.operator === "&") {
61979
+ const pairs = part.names.map((name) => {
61980
+ const value2 = variables[name];
61981
+ if (value2 === undefined)
61982
+ return "";
61983
+ const encoded2 = Array.isArray(value2) ? value2.map((v2) => this.encodeValue(v2, part.operator)).join(",") : this.encodeValue(value2.toString(), part.operator);
61984
+ return `${name}=${encoded2}`;
61985
+ }).filter((pair) => pair.length > 0);
61986
+ if (pairs.length === 0)
61987
+ return "";
61988
+ const separator = part.operator === "?" ? "?" : "&";
61989
+ return separator + pairs.join("&");
61990
+ }
61991
+ if (part.names.length > 1) {
61992
+ const values2 = part.names.map((name) => variables[name]).filter((v2) => v2 !== undefined);
61993
+ if (values2.length === 0)
61994
+ return "";
61995
+ return values2.map((v2) => Array.isArray(v2) ? v2[0] : v2).join(",");
61996
+ }
61997
+ const value = variables[part.name];
61998
+ if (value === undefined)
61999
+ return "";
62000
+ const values = Array.isArray(value) ? value : [value];
62001
+ const encoded = values.map((v2) => this.encodeValue(v2, part.operator));
62002
+ switch (part.operator) {
62003
+ case "":
62004
+ return encoded.join(",");
62005
+ case "+":
62006
+ return encoded.join(",");
62007
+ case "#":
62008
+ return "#" + encoded.join(",");
62009
+ case ".":
62010
+ return "." + encoded.join(".");
62011
+ case "/":
62012
+ return "/" + encoded.join("/");
62013
+ default:
62014
+ return encoded.join(",");
62015
+ }
62016
+ }
62017
+ expand(variables) {
62018
+ let result = "";
62019
+ let hasQueryParam = false;
62020
+ for (const part of this.parts) {
62021
+ if (typeof part === "string") {
62022
+ result += part;
62023
+ continue;
62024
+ }
62025
+ const expanded = this.expandPart(part, variables);
62026
+ if (!expanded)
62027
+ continue;
62028
+ if ((part.operator === "?" || part.operator === "&") && hasQueryParam) {
62029
+ result += expanded.replace("?", "&");
62030
+ } else {
62031
+ result += expanded;
62032
+ }
62033
+ if (part.operator === "?" || part.operator === "&") {
62034
+ hasQueryParam = true;
62035
+ }
62036
+ }
62037
+ return result;
62038
+ }
62039
+ escapeRegExp(str) {
62040
+ return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
62041
+ }
62042
+ partToRegExp(part) {
62043
+ const patterns = [];
62044
+ for (const name2 of part.names) {
62045
+ UriTemplate.validateLength(name2, MAX_VARIABLE_LENGTH, "Variable name");
62046
+ }
62047
+ if (part.operator === "?" || part.operator === "&") {
62048
+ for (let i = 0;i < part.names.length; i++) {
62049
+ const name2 = part.names[i];
62050
+ const prefix = i === 0 ? "\\" + part.operator : "&";
62051
+ patterns.push({
62052
+ pattern: prefix + this.escapeRegExp(name2) + "=([^&]+)",
62053
+ name: name2
62054
+ });
62055
+ }
62056
+ return patterns;
62057
+ }
62058
+ let pattern;
62059
+ const name = part.name;
62060
+ switch (part.operator) {
62061
+ case "":
62062
+ pattern = part.exploded ? "([^/,]+(?:,[^/,]+)*)" : "([^/,]+)";
62063
+ break;
62064
+ case "+":
62065
+ case "#":
62066
+ pattern = "(.+)";
62067
+ break;
62068
+ case ".":
62069
+ pattern = "\\.([^/,]+)";
62070
+ break;
62071
+ case "/":
62072
+ pattern = "/" + (part.exploded ? "([^/,]+(?:,[^/,]+)*)" : "([^/,]+)");
62073
+ break;
62074
+ default:
62075
+ pattern = "([^/]+)";
62076
+ }
62077
+ patterns.push({ pattern, name });
62078
+ return patterns;
62079
+ }
62080
+ match(uri) {
62081
+ UriTemplate.validateLength(uri, MAX_TEMPLATE_LENGTH, "URI");
62082
+ let pattern = "^";
62083
+ const names = [];
62084
+ for (const part of this.parts) {
62085
+ if (typeof part === "string") {
62086
+ pattern += this.escapeRegExp(part);
62087
+ } else {
62088
+ const patterns = this.partToRegExp(part);
62089
+ for (const { pattern: partPattern, name } of patterns) {
62090
+ pattern += partPattern;
62091
+ names.push({ name, exploded: part.exploded });
62092
+ }
62093
+ }
62094
+ }
62095
+ pattern += "$";
62096
+ UriTemplate.validateLength(pattern, MAX_REGEX_LENGTH, "Generated regex pattern");
62097
+ const regex = new RegExp(pattern);
62098
+ const match = uri.match(regex);
62099
+ if (!match)
62100
+ return null;
62101
+ const result = {};
62102
+ for (let i = 0;i < names.length; i++) {
62103
+ const { name, exploded } = names[i];
62104
+ const value = match[i + 1];
62105
+ const cleanName = name.replace("*", "");
62106
+ if (exploded && value.includes(",")) {
62107
+ result[cleanName] = value.split(",");
62108
+ } else {
62109
+ result[cleanName] = value;
62110
+ }
62111
+ }
62112
+ return result;
62113
+ }
62114
+ }
62115
+ var MAX_TEMPLATE_LENGTH = 1e6, MAX_VARIABLE_LENGTH = 1e6, MAX_TEMPLATE_EXPRESSIONS = 1e4, MAX_REGEX_LENGTH = 1e6;
62116
+
61844
62117
  // node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
61845
62118
  function validateToolName(name) {
61846
62119
  const warnings = [];
@@ -62564,6 +62837,22 @@ class McpServer {
62564
62837
  }
62565
62838
  }
62566
62839
  }
62840
+
62841
+ class ResourceTemplate {
62842
+ constructor(uriTemplate, _callbacks) {
62843
+ this._callbacks = _callbacks;
62844
+ this._uriTemplate = typeof uriTemplate === "string" ? new UriTemplate(uriTemplate) : uriTemplate;
62845
+ }
62846
+ get uriTemplate() {
62847
+ return this._uriTemplate;
62848
+ }
62849
+ get listCallback() {
62850
+ return this._callbacks.list;
62851
+ }
62852
+ completeCallback(variable) {
62853
+ return this._callbacks.complete?.[variable];
62854
+ }
62855
+ }
62567
62856
  function isZodTypeLike(value) {
62568
62857
  return value !== null && typeof value === "object" && "parse" in value && typeof value.parse === "function" && "safeParse" in value && typeof value.safeParse === "function";
62569
62858
  }
@@ -63827,8 +64116,6 @@ async function logResponse(logger, res, req) {
63827
64116
  logger.log(await res.clone().json());
63828
64117
  break;
63829
64118
  case (matchContentType(res, "application/jsonl") || jsonlLikeContentTypeRE.test(ct)):
63830
- logger.log(await res.clone().text());
63831
- break;
63832
64119
  case matchContentType(res, "text/event-stream"):
63833
64120
  logger.log(`<${contentType}>`);
63834
64121
  break;
@@ -63982,6 +64269,17 @@ function createRegisterResourceTemplate(logger, server, getSDK, allowedScopes) {
63982
64269
  }
63983
64270
  var init_resources = () => {};
63984
64271
 
64272
+ // src/mcp-server/apps/tool-hooks.ts
64273
+ function shouldForwardToolMeta(meta3, enabledUriPrefixes) {
64274
+ if (!meta3)
64275
+ return false;
64276
+ const ui = meta3.ui;
64277
+ const uri = ui && typeof ui.resourceUri === "string" ? ui.resourceUri : undefined;
64278
+ if (!uri)
64279
+ return true;
64280
+ return enabledUriPrefixes.some((p) => uri.startsWith(p));
64281
+ }
64282
+
63985
64283
  // src/mcp-server/tools.ts
63986
64284
  function buildAnnotationFilter(annotations) {
63987
64285
  const filter = {};
@@ -64013,7 +64311,8 @@ async function formatResult(response) {
64013
64311
  }
64014
64312
  return response.ok ? { content } : { content, isError: true };
64015
64313
  }
64016
- function createRegisterTool(logger, server, getSDK, allowedScopes, allowedTools, dynamic, annotationFilter) {
64314
+ function createRegisterTool(logger, server, getSDK, allowedScopes, allowedTools, dynamic, annotationFilter, mcpApps) {
64315
+ const enabledUris = enabledAppUriPrefixes(mcpApps ?? []);
64017
64316
  const tools = [];
64018
64317
  const toolMap = new Map;
64019
64318
  const registerTool = (tool) => {
@@ -64053,7 +64352,7 @@ function createRegisterTool(logger, server, getSDK, allowedScopes, allowedTools,
64053
64352
  description: tool.description,
64054
64353
  inputSchema: tool.args,
64055
64354
  annotations: tool.annotations,
64056
- ...tool._meta ? { _meta: tool._meta } : {}
64355
+ ...shouldForwardToolMeta(tool._meta, enabledUris) ? { _meta: tool._meta } : {}
64057
64356
  }, async (args, ctx) => {
64058
64357
  return tool.tool(getSDK(), args, ctx);
64059
64358
  });
@@ -64061,7 +64360,7 @@ function createRegisterTool(logger, server, getSDK, allowedScopes, allowedTools,
64061
64360
  server.registerTool(tool.name, {
64062
64361
  description: tool.description,
64063
64362
  annotations: tool.annotations,
64064
- ...tool._meta ? { _meta: tool._meta } : {}
64363
+ ...shouldForwardToolMeta(tool._meta, enabledUris) ? { _meta: tool._meta } : {}
64065
64364
  }, async (ctx) => {
64066
64365
  return tool.tool(getSDK(), ctx);
64067
64366
  });
@@ -64166,12 +64465,12 @@ function registerDynamicTools(logger, server, getSDK, toolMap, allowedScopes) {
64166
64465
 
64167
64466
  `) }] };
64168
64467
  });
64169
- logger.debug("Registered dynamic meta-tool", { name: "describe_tool" });
64468
+ logger.debug("Registered dynamic meta-tool", { name: "describe_tool_input" });
64170
64469
  server.registerTool("execute_tool", {
64171
- description: "Execute a tool by name with the provided input parameters. If executing a given tool for the first time, it is recommended to call describe_tool_input first to understand the expected input schema.",
64470
+ description: "Execute a tool by name with its arguments. If executing a given tool for the first time, it is recommended to call describe_tool_input first to understand the expected `arguments` shape.",
64172
64471
  inputSchema: {
64173
- tool_name: string2().describe("The name of the tool to execute"),
64174
- input: record(string2(), unknown()).optional().describe("Input parameters for the tool as a JSON object")
64472
+ name: string2().describe("The name of the tool to execute"),
64473
+ arguments: looseObject({}).optional().describe("Arguments for the target tool as a JSON object, matching the schema returned by describe_tool_input.")
64175
64474
  },
64176
64475
  annotations: {
64177
64476
  title: "Execute Tool",
@@ -64181,16 +64480,16 @@ function registerDynamicTools(logger, server, getSDK, toolMap, allowedScopes) {
64181
64480
  openWorldHint: true
64182
64481
  }
64183
64482
  }, async (args, ctx) => {
64184
- const def = toolMap.get(args.tool_name);
64483
+ const def = toolMap.get(args.name);
64185
64484
  if (!def) {
64186
64485
  return {
64187
- content: [{ type: "text", text: `Unknown tool: ${args.tool_name}` }],
64486
+ content: [{ type: "text", text: `Unknown tool: ${args.name}` }],
64188
64487
  isError: true
64189
64488
  };
64190
64489
  }
64191
64490
  let validatedInput = {};
64192
64491
  if (def.args) {
64193
- const vres = object(def.args).safeParse(args.input ?? {});
64492
+ const vres = object(def.args).safeParse(args.arguments ?? {});
64194
64493
  if (vres.success) {
64195
64494
  validatedInput = vres.data;
64196
64495
  } else {
@@ -64198,7 +64497,7 @@ function registerDynamicTools(logger, server, getSDK, toolMap, allowedScopes) {
64198
64497
  return {
64199
64498
  content: [{
64200
64499
  type: "text",
64201
- text: `Invalid input for tool ${args.tool_name}:
64500
+ text: `Invalid input for tool ${args.name}:
64202
64501
  <issues>
64203
64502
  ${issues}
64204
64503
  </issues>`
@@ -64218,7 +64517,7 @@ ${issues}
64218
64517
  return {
64219
64518
  content: [{
64220
64519
  type: "text",
64221
- text: `Error executing tool ${args.tool_name}: ${message}`
64520
+ text: `Error executing tool ${args.name}: ${message}`
64222
64521
  }],
64223
64522
  isError: true
64224
64523
  };
@@ -64288,6 +64587,7 @@ var init_tools = __esm(() => {
64288
64587
  init_zod();
64289
64588
  init_core3();
64290
64589
  init_config();
64590
+ init_config2();
64291
64591
  init_scopes();
64292
64592
  init_shared();
64293
64593
  VALID_ANNOTATIONS = [
@@ -64353,6 +64653,27 @@ function ERR2(error48) {
64353
64653
  }
64354
64654
 
64355
64655
  // src/lib/schemas.ts
64656
+ function collectExtraKeys(obj, extrasKey, optional3) {
64657
+ return obj.transform((val) => {
64658
+ const extras = {};
64659
+ const { shape } = obj;
64660
+ for (const [key] of Object.entries(val)) {
64661
+ if (key in shape) {
64662
+ continue;
64663
+ }
64664
+ const v2 = val[key];
64665
+ if (typeof v2 === "undefined") {
64666
+ continue;
64667
+ }
64668
+ extras[key] = v2;
64669
+ delete val[key];
64670
+ }
64671
+ if (optional3 && Object.keys(extras).length === 0) {
64672
+ return val;
64673
+ }
64674
+ return { ...val, [extrasKey]: extras };
64675
+ });
64676
+ }
64356
64677
  function safeParse4(rawValue, fn, errorMessage) {
64357
64678
  try {
64358
64679
  return OK3(fn(rawValue));
@@ -64522,127 +64843,253 @@ var init_apierror = __esm(() => {
64522
64843
  });
64523
64844
  });
64524
64845
 
64525
- // src/models/archivestoragetype.ts
64526
- var ArchiveStorageType$zodSchema;
64527
- var init_archivestoragetype = __esm(() => {
64846
+ // src/models/accesscontrolitem.ts
64847
+ var AccessType$zodSchema, Start$zodSchema, End$zodSchema, AccessControlItem$zodSchema;
64848
+ var init_accesscontrolitem = __esm(() => {
64528
64849
  init_zod();
64529
- ArchiveStorageType$zodSchema = _enum2([
64850
+ AccessType$zodSchema = _enum2([
64851
+ "token",
64852
+ "anonymous"
64853
+ ]).describe("The type of access control to apply to the asset.");
64854
+ Start$zodSchema = union([
64855
+ string2(),
64856
+ int()
64857
+ ]).describe("The start date and time when anonymous access becomes available. Accepts ISO 8601 string or Unix timestamp.");
64858
+ End$zodSchema = union([
64859
+ string2(),
64860
+ int()
64861
+ ]).describe("The end date and time when anonymous access expires. Accepts ISO 8601 string or Unix timestamp.");
64862
+ AccessControlItem$zodSchema = object({
64863
+ access_type: AccessType$zodSchema.describe("The type of access control to apply to the asset."),
64864
+ end: union([
64865
+ string2(),
64866
+ int()
64867
+ ]).optional().describe("The end date and time when anonymous access expires. Accepts ISO 8601 string or Unix timestamp."),
64868
+ key: string2().optional().describe("The authentication key identifier for token-based access. Default key is used if not specified or if set to 'default'."),
64869
+ start: union([
64870
+ string2(),
64871
+ int()
64872
+ ]).optional().describe("The start date and time when anonymous access becomes available. Accepts ISO 8601 string or Unix timestamp.")
64873
+ }).describe("Access control rule that defines when and how the asset can be accessed.");
64874
+ });
64875
+
64876
+ // src/models/assetdeliverytype.ts
64877
+ var AssetDeliveryType$zodSchema;
64878
+ var init_assetdeliverytype = __esm(() => {
64879
+ init_zod();
64880
+ AssetDeliveryType$zodSchema = _enum2([
64881
+ "asset"
64882
+ ]).describe("Static asset delivery type.");
64883
+ });
64884
+
64885
+ // src/models/fetchdeliverytype.ts
64886
+ var FetchDeliveryType$zodSchema;
64887
+ var init_fetchdeliverytype = __esm(() => {
64888
+ init_zod();
64889
+ FetchDeliveryType$zodSchema = _enum2([
64890
+ "fetch",
64891
+ "url2png"
64892
+ ]).describe("Fetch-based delivery types for assets retrieved from remote URLs.");
64893
+ });
64894
+
64895
+ // src/models/manageddeliverytype.ts
64896
+ var ManagedDeliveryType$zodSchema;
64897
+ var init_manageddeliverytype = __esm(() => {
64898
+ init_zod();
64899
+ ManagedDeliveryType$zodSchema = _enum2([
64530
64900
  "upload",
64531
64901
  "private",
64532
- "authenticated",
64533
- "fetch"
64534
- ]).describe("The storage type of resources to include in the archive.");
64902
+ "authenticated"
64903
+ ]).describe("Managed delivery types for assets uploaded and stored by Cloudinary.");
64535
64904
  });
64536
64905
 
64537
- // src/models/resourcetype.ts
64538
- var ResourceType$zodSchema;
64539
- var init_resourcetype = __esm(() => {
64906
+ // src/models/socialdeliverytype.ts
64907
+ var SocialDeliveryType$zodSchema;
64908
+ var init_socialdeliverytype = __esm(() => {
64540
64909
  init_zod();
64541
- ResourceType$zodSchema = _enum2([
64542
- "image",
64543
- "video",
64544
- "raw"
64545
- ]).describe("The type of resource.");
64910
+ SocialDeliveryType$zodSchema = _enum2([
64911
+ "facebook",
64912
+ "twitter",
64913
+ "twitter_name",
64914
+ "instagram",
64915
+ "instagram_name",
64916
+ "gravatar",
64917
+ "youtube",
64918
+ "hulu",
64919
+ "vimeo",
64920
+ "animoto",
64921
+ "dailymotion",
64922
+ "worldstarhiphop"
64923
+ ]).describe("Delivery types for assets fetched from third-party platforms.");
64924
+ });
64925
+
64926
+ // src/models/explicitdeliverytype.ts
64927
+ var ExplicitDeliveryType$zodSchema;
64928
+ var init_explicitdeliverytype = __esm(() => {
64929
+ init_zod();
64930
+ init_assetdeliverytype();
64931
+ init_fetchdeliverytype();
64932
+ init_manageddeliverytype();
64933
+ init_socialdeliverytype();
64934
+ ExplicitDeliveryType$zodSchema = union([
64935
+ ManagedDeliveryType$zodSchema,
64936
+ AssetDeliveryType$zodSchema,
64937
+ FetchDeliveryType$zodSchema,
64938
+ SocialDeliveryType$zodSchema
64939
+ ]).describe("Delivery types accepted by the explicit operation.");
64940
+ });
64941
+
64942
+ // src/models/responsivebreakpoint.ts
64943
+ var ResponsiveBreakpoint$zodSchema;
64944
+ var init_responsivebreakpoint = __esm(() => {
64945
+ init_zod();
64946
+ ResponsiveBreakpoint$zodSchema = object({
64947
+ bytes_step: int().optional().describe("The minimum byte size difference between consecutive breakpoint images."),
64948
+ create_derived: boolean2().optional().describe("Whether to generate and store the derived images. Default is true."),
64949
+ max_images: int().optional().describe("The maximum number of breakpoint images to generate."),
64950
+ max_width: int().optional().describe("The maximum width for responsive breakpoint images."),
64951
+ min_width: int().optional().describe("The minimum width for responsive breakpoint images."),
64952
+ transformation: string2().optional().describe("A transformation string to apply before generating breakpoints.")
64953
+ });
64546
64954
  });
64547
64955
 
64548
- // src/models/uploadresponse.ts
64549
- var UploadResponseImageMetadata$zodSchema, Eager$zodSchema, UploadResponse$zodSchema;
64550
- var init_uploadresponse = __esm(() => {
64956
+ // src/models/structuredmetadatavalue.ts
64957
+ var StructuredMetadataValue$zodSchema;
64958
+ var init_structuredmetadatavalue = __esm(() => {
64551
64959
  init_zod();
64552
- UploadResponseImageMetadata$zodSchema = object({}).describe("The image metadata of the uploaded file.");
64553
- Eager$zodSchema = object({
64554
- bytes: int().optional(),
64555
- format: string2().optional(),
64556
- height: int().optional(),
64557
- secure_url: string2().optional(),
64558
- transformation: string2().optional(),
64559
- url: string2().optional(),
64560
- width: int().optional()
64561
- });
64562
- UploadResponse$zodSchema = object({
64563
- api_key: string2().optional().describe("The API key used to upload the file."),
64564
- asset_id: string2().optional().describe("The asset ID of the uploaded file. This is the ID of the uploaded file in the Cloudinary database."),
64565
- bytes: int().optional().describe("The size of the uploaded file in bytes."),
64566
- created_at: string2().optional().describe("The date and time the file was uploaded."),
64567
- eager: array(lazy(() => Eager$zodSchema)).optional(),
64568
- etag: string2().optional().describe("The ETag of the uploaded file."),
64569
- format: string2().optional().describe("The format of the uploaded file."),
64570
- grayscale: boolean2().optional().describe("Whether the uploaded file is grayscale."),
64571
- height: int().optional().describe("The height of the uploaded file."),
64572
- illustration_score: number2().optional().describe("The illustration score of the uploaded file."),
64573
- image_metadata: lazy(() => UploadResponseImageMetadata$zodSchema).optional().describe("The image metadata of the uploaded file."),
64574
- original_filename: string2().optional().describe("The original filename of the uploaded file."),
64575
- pages: int().optional().describe("The number of pages in the uploaded file."),
64576
- placeholder: boolean2().optional().describe("Whether the uploaded file is a placeholder."),
64577
- public_id: string2().optional().describe("The public ID of the uploaded file."),
64578
- resource_type: string2().optional().describe("The type of resource that was uploaded."),
64579
- secure_url: string2().optional().describe("The secure URL of the uploaded file."),
64580
- semi_transparent: boolean2().optional().describe("Whether the uploaded file is semi-transparent."),
64581
- signature: string2().optional().describe("The signature of the uploaded file."),
64582
- tags: array(string2()).optional().describe("The tags of the uploaded file."),
64583
- type: string2().optional().describe("The type of the uploaded file."),
64584
- url: string2().optional().describe("The URL of the uploaded file."),
64585
- version: int().optional().describe("The version of the uploaded file."),
64586
- version_id: string2().optional().describe("The version ID of the uploaded file."),
64587
- width: int().optional().describe("The width of the uploaded file.")
64588
- });
64960
+ StructuredMetadataValue$zodSchema = union([
64961
+ string2(),
64962
+ int(),
64963
+ array(string2())
64964
+ ]);
64589
64965
  });
64590
64966
 
64591
- // src/models/explicitassetop.ts
64592
- var ExplicitAssetGlobals$zodSchema, ExplicitAssetAutoTranscription$zodSchema, ExplicitAssetAutoTranscriptionUnion$zodSchema, ExplicitAssetResponsiveBreakpoint$zodSchema, QualityOverride$zodSchema, ExplicitAssetRequestBody$zodSchema, ExplicitAssetRequest$zodSchema, ExplicitAssetResponse$zodSchema;
64593
- var init_explicitassetop = __esm(() => {
64967
+ // src/models/structuredmetadataparam.ts
64968
+ var StructuredMetadataParam$zodSchema;
64969
+ var init_structuredmetadataparam = __esm(() => {
64594
64970
  init_zod();
64595
- init_apierror();
64596
- init_archivestoragetype();
64597
- init_resourcetype();
64598
- init_uploadresponse();
64599
- ExplicitAssetGlobals$zodSchema = object({
64600
- cloud_name: string2().describe("The cloud name of your product environment.").optional()
64601
- });
64602
- ExplicitAssetAutoTranscription$zodSchema = object({
64971
+ init_structuredmetadatavalue();
64972
+ StructuredMetadataParam$zodSchema = union([
64973
+ string2(),
64974
+ record(string2(), StructuredMetadataValue$zodSchema)
64975
+ ]).describe(`A pipe-separated list or a map of custom metadata fields (by external_id) and the values to assign to each of them. The = " and | characters can be supported as values when escaped with a prepended backslash (\\). For a multi-select field, you can set a maximum of 3000 different metadata values on an asset.
64976
+ `);
64977
+ });
64978
+
64979
+ // src/models/tagsparam.ts
64980
+ var TagsParam$zodSchema;
64981
+ var init_tagsparam = __esm(() => {
64982
+ init_zod();
64983
+ TagsParam$zodSchema = union([
64984
+ string2(),
64985
+ array(string2())
64986
+ ]).describe("A comma-separated list of tag names, or an array of tag names.");
64987
+ });
64988
+
64989
+ // src/models/explicitrequest.ts
64990
+ var ExplicitRequestAutoTranscription$zodSchema, ExplicitRequestAutoTranscriptionUnion$zodSchema, ExplicitRequestAccessMode$zodSchema, ExplicitRequestRegions$zodSchema, ExplicitRequestResponsiveBreakpoints$zodSchema, QualityOverride$zodSchema, ExplicitRequest$zodSchema;
64991
+ var init_explicitrequest = __esm(() => {
64992
+ init_zod();
64993
+ init_accesscontrolitem();
64994
+ init_explicitdeliverytype();
64995
+ init_responsivebreakpoint();
64996
+ init_structuredmetadataparam();
64997
+ init_tagsparam();
64998
+ ExplicitRequestAutoTranscription$zodSchema = object({
64603
64999
  translate: array(string2()).optional().describe("Array of target language codes for transcription translation.")
64604
65000
  }).describe("Configuration object for automatic video transcription with translation options.");
64605
- ExplicitAssetAutoTranscriptionUnion$zodSchema = union([
65001
+ ExplicitRequestAutoTranscriptionUnion$zodSchema = union([
64606
65002
  boolean2(),
64607
- lazy(() => ExplicitAssetAutoTranscription$zodSchema)
65003
+ lazy(() => ExplicitRequestAutoTranscription$zodSchema)
64608
65004
  ]);
64609
- ExplicitAssetResponsiveBreakpoint$zodSchema = object({
64610
- bytes_step: int().optional(),
64611
- create_derived: boolean2().optional(),
64612
- max_images: int().optional(),
64613
- max_width: int().optional(),
64614
- min_width: int().optional(),
64615
- transformation: string2().optional()
64616
- });
65005
+ ExplicitRequestAccessMode$zodSchema = _enum2([
65006
+ "public",
65007
+ "authenticated"
65008
+ ]).describe(`Deprecated. Use access_control instead. Allows the asset to behave as if it's of the authenticated delivery type while still using the default 'upload' type in delivery URLs. The asset can later be made public by changing its access_mode via the Admin API, without having to update any delivery URLs.
65009
+ `);
65010
+ ExplicitRequestRegions$zodSchema = union([
65011
+ string2(),
65012
+ record(string2(), array(array(int())))
65013
+ ]).describe(`Named region coordinate groups for cropping with region gravity.
65014
+ Can be a JSON-encoded string or an object. Each region name may contain
65015
+ only letters, numbers, or hyphens, and must have at least two coordinate pairs.
65016
+ `);
65017
+ ExplicitRequestResponsiveBreakpoints$zodSchema = union([
65018
+ array(ResponsiveBreakpoint$zodSchema),
65019
+ ResponsiveBreakpoint$zodSchema
65020
+ ]).describe("Settings to automatically generate breakpoints for responsive images.");
64617
65021
  QualityOverride$zodSchema = union([
64618
65022
  string2(),
64619
65023
  int()
64620
65024
  ]).describe("Override the quality setting for this asset.");
64621
- ExplicitAssetRequestBody$zodSchema = object({
64622
- accessibility_analysis: boolean2().optional().describe("Whether to return return accessibility analysis values for the image."),
64623
- api_key: string2().optional().describe("The API key to use for the request. This is automatically computed by the Cloudinary's SDKs."),
65025
+ ExplicitRequest$zodSchema = object({
65026
+ access_control: array(AccessControlItem$zodSchema).optional().describe(`Restricts access to the asset by specifying one or more access types.
65027
+ The asset is restricted unless at least one listed access type is valid.
65028
+ `),
65029
+ access_mode: ExplicitRequestAccessMode$zodSchema.optional().describe(`Deprecated. Use access_control instead. Allows the asset to behave as if it's of the authenticated delivery type while still using the default 'upload' type in delivery URLs. The asset can later be made public by changing its access_mode via the Admin API, without having to update any delivery URLs.
65030
+ `),
65031
+ accessibility_analysis: boolean2().optional().describe("Whether to return accessibility analysis values for the image."),
65032
+ allowed_formats: string2().optional().describe("A comma-separated list of file formats that are allowed for uploading. Files of other types will be rejected. The formats can be any combination of image types, video formats or raw file extensions.\nNote: You can also add the `format` parameter to convert other file types instead of rejecting them. In this case, only files that would normally be rejected are converted, any file format allowed for upload won't be converted.\n"),
64624
65033
  asset_folder: string2().optional().describe("The asset folder to assign to the asset."),
64625
65034
  async: boolean2().optional().describe(`When set to true, returns the uploaded asset's public_id immediately in the response, before the upload is completed (asynchronously). Default: false.
64626
65035
  `),
64627
65036
  auto_chaptering: boolean2().optional().describe("Whether to trigger automatic generation of video chapters. Chapters will be generated and saved as a .vtt file with -chapters appended to the public ID of the video. You can enable chapters as part of the Cloudinary Video Player. Relevant for videos only."),
65037
+ auto_tagging: number2().optional().describe(`Automatically assigns tags to an asset according to detected objects or categories with a confidence score higher than the specified value.
65038
+ Use together with the detection parameter for:
65039
+ - Cloudinary AI Content Analysis
65040
+ - Amazon Rekognition Celebrity Detection
65041
+ Use together with the categorization parameter for:
65042
+ - Google Automatic Video Tagging
65043
+ - Google Auto Tagging
65044
+ - Imagga Auto Tagging
65045
+ - Amazon Rekognition Auto Tagging
65046
+ `),
64628
65047
  auto_transcription: union([
64629
65048
  boolean2(),
64630
- lazy(() => ExplicitAssetAutoTranscription$zodSchema)
65049
+ lazy(() => ExplicitRequestAutoTranscription$zodSchema)
64631
65050
  ]).optional(),
65051
+ background_removal: string2().optional().describe(`Automatically remove the background of an image using an add-on.
65052
+ - Set to cloudinary_ai to use the deep-learning based Cloudinary AI Background Removal add-on.
65053
+ Optionally append a template suffix (e.g., cloudinary_ai:fine_edges).
65054
+ - Note: this feature has been superseded by background removal on the fly.
65055
+ - Set to pixelz to use the human-powered Pixelz Remove-The-Background Editing add-on service.
65056
+ Relevant for images only.
65057
+ `),
65058
+ backup: boolean2().optional().describe("Whether to backup the uploaded asset. When set to true, backs up uploaded assets to a secondary storage bucket."),
64632
65059
  callback: string2().optional().describe(`A URL to redirect to after the upload/explicit is completed instead of returning the upload response.
64633
65060
  Signed upload result parameters are added to the callback URL. This parameter is ignored for XHR (Ajax XMLHttpRequest) or JavaScript Fetch API upload requests.
64634
65061
  Note: This parameter is relevant for direct uploads from a form in the browser. It is automatically set if you perform direct upload from the browser using Cloudinary's SDKs and the jQuery plugin.
65062
+ `),
65063
+ categorization: string2().optional().describe(`A comma-separated list of the categorization add-ons to run on the asset.
65064
+ Set to google_tagging, google_video_tagging, imagga_tagging and/or aws_rek_tagging
65065
+ to automatically classify the scenes of the uploaded asset.
65066
+ Optionally append a language code suffix (e.g., google_tagging:fr).
64635
65067
  `),
64636
65068
  cinemagraph_analysis: boolean2().optional().describe("Whether to return a cinemagraph analysis value for the media asset between 0 and 1, where 0 means the asset is not a cinemagraph and 1 means the asset is a cinemagraph. Relevant for animated images and video only. A static image will return 0."),
65069
+ clear_invalid: boolean2().default(false).describe("Whether to clear metadata field values that have become invalid due to a change in metadata rules. If false, the API returns an error if any existing metadata value is no longer valid. Default: false."),
64637
65070
  colors: boolean2().default(false).describe("Whether to retrieve predominant colors & color histogram of the uploaded image. Note: If all returned colors are opaque, then 6-digit RGB hex values are returned. If one or more colors contain an alpha channel, then 8-digit RGBA hex quadruplet values are returned."),
64638
- context: string2().optional().describe("Key-value pairs of general textual context metadata to attach to the asset."),
64639
- custom_coordinates: string2().optional().describe("An array of coordinates for custom cropping."),
65071
+ context: string2().optional().describe('A pipe-separated list of key-value pairs of general textual context metadata to attach to the asset (e.g., "alt=My image|caption=Nice photo"). The =, ", and | characters can be escaped with a prepending backslash (\\).'),
65072
+ custom_coordinates: string2().optional().describe("Custom coordinates as comma-separated values, with multiple coordinates separated by pipes."),
65073
+ detection: string2().optional().describe(`Invokes the relevant add-on to return a list of detected content.
65074
+ Set to:
65075
+ - <content-aware model>_[<version>] (e.g. coco_v2) to return a list of detected content using the Cloudinary AI Content Analysis add-on. Can be used together with the auto_tagging parameter to apply tags automatically.
65076
+ - captioning to analyze an image and suggest a caption based on the image's contents.
65077
+ - iqa to analyze the quality of an image.
65078
+ - watermark-detection to detect watermarks in an image.
65079
+ - adv_face to return a list of facial attributes using the Advanced Facial Attribute Detection add-on.
65080
+ - aws_rek_face to return a list of detected celebrities and facial attributes using the Amazon Rekognition Celebrity Detection add-on. Can be used together with the auto_tagging parameter to apply tags automatically.
65081
+ `),
65082
+ discard_original_filename: boolean2().optional().describe("Whether to discard the name of the original uploaded file. Relevant when delivering assets as attachments (setting the flag disposition:attachment in delivery URLs)."),
64640
65083
  display_name: string2().optional().describe("A display name for the asset."),
64641
65084
  eager: string2().optional().describe("A list of transformations to eagerly generate for the asset. Accepts either a single transformation or a pipe-separated list of transformations."),
64642
65085
  eager_async: boolean2().optional().describe("Whether to generate the eager transformations asynchronously in the background after the upload request is completed rather than before the upload is completed."),
64643
65086
  eager_notification_url: string2().optional().describe("A URL to notify when eager transformations are completed."),
64644
- face_coordinates: string2().optional().describe("An array of coordinates representing detected faces in the asset, used for custom cropping or overlays."),
65087
+ eval: string2().optional().describe("Allows you to modify upload parameters by specifying custom logic with JavaScript. This can be useful for conditionally adding tags, contextual metadata, structured metadata or eager transformations depending on specific criteria of the uploaded file."),
65088
+ face_coordinates: string2().optional().describe("Face coordinates as comma-separated values, with multiple faces separated by pipes."),
64645
65089
  faces: boolean2().optional().describe("Whether to detect faces in the asset."),
65090
+ filename_override: string2().optional().describe("Overrides the originally uploaded asset's file name in downloads that use flags like fl_attachment or fl_force_original."),
65091
+ folder: string2().optional().describe("Folder name where the uploaded asset will be stored. This parameter applies when using the Admin API, or when specifying the upload preset for unsigned uploading with the Upload API."),
65092
+ format: string2().optional().describe("An optional format to convert the uploaded asset to before saving in the cloud."),
64646
65093
  headers: string2().optional().describe(`An HTTP header or a list of headers lines for adding as response HTTP headers when delivering the asset to your users. Supported headers: Link, Authorization, X-Robots-Tag.
64647
65094
  `),
64648
65095
  invalidate: boolean2().optional().describe(`Whether to invalidate CDN cache copies of a previously uploaded asset that shares the same public ID. Default: false.
@@ -64653,7 +65100,8 @@ Supported for images, video, and audio.
64653
65100
  - Returned metadata for audio and video includes: audio_codec, audio_bit_rate, audio_frequency, channels, channel_layout.
64654
65101
  - Additional metadata for video includes: pix_format, codec, level, profile, video_bit_rate, dar.
64655
65102
  `),
64656
- metadata: string2().optional().describe("Structured metadata to attach to the asset based on the metadata fields defined for your account."),
65103
+ metadata: StructuredMetadataParam$zodSchema.optional().describe(`A pipe-separated list or a map of custom metadata fields (by external_id) and the values to assign to each of them. The = " and | characters can be supported as values when escaped with a prepended backslash (\\). For a multi-select field, you can set a maximum of 3000 different metadata values on an asset.
65104
+ `),
64657
65105
  moderation: string2().optional().describe(`For all asset types, set to:
64658
65106
  - manual to add the uploaded asset to a list of pending assets that can be moderated using the Admin API or the Cloudinary Console.
64659
65107
  - perception_point to automatically moderate the uploaded asset using the Perception Point Malware Detection add-on.
@@ -64673,28 +65121,163 @@ To request multiple moderations in a single API call:
64673
65121
  Note: Rejected assets are automatically invalidated on the CDN within approximately ten minutes.
64674
65122
  `),
64675
65123
  notification_url: string2().optional().describe("A URL to notify when the asset is ready."),
65124
+ ocr: string2().optional().describe(`Set to adv_ocr to extract all text elements in an image as well as the bounding box
65125
+ coordinates of each detected element using the OCR text detection and extraction add-on.
65126
+ Optionally append options (e.g., adv_ocr:document).
65127
+ `),
65128
+ on_success: string2().optional().describe("Allows you to update an asset by specifying custom logic with JavaScript that is executed after the upload to Cloudinary is completed successfully. This can be useful for conditionally adding tags, contextual metadata, and structured metadata, depending on the results of using the detection parameter on upload."),
64676
65129
  overwrite: boolean2().optional().describe(`When applying eager for already existing video transformations, this setting indicates whether to force the existing derived video resources to be regenerated. Default for videos: false.
64677
65130
  Note: When specifying existing eager transformations for images, corresponding derived images are always regenerated.
64678
65131
  `),
64679
65132
  phash: boolean2().optional().describe(`Whether to return the perceptual hash (pHash) on the uploaded image for image similarity detection.
64680
65133
  `),
65134
+ proxy: string2().optional().describe("A proxy to use for fetching remote URLs. The format should be http://hostname:port."),
64681
65135
  public_id: string2().describe("The public ID of the existing asset to apply operations on."),
65136
+ public_id_prefix: string2().optional().describe("A string or path that's automatically prepended to the public_id with a forward slash. The value can contain the same characters as the public_id including additional forward slashes. This prefix can be useful to provide context and improve the SEO of an asset's filename in the delivery URL, but the value does not impact the location where the asset is stored."),
64682
65137
  quality_analysis: boolean2().optional().describe("Whether to return a quality analysis value for the image between 0 and 1, where 0 means the image is blurry and out of focus and 1 means the image is sharp and in focus. Relevant for images only."),
64683
65138
  quality_override: union([
64684
65139
  string2(),
64685
65140
  int()
64686
65141
  ]).optional().describe("Override the quality setting for this asset."),
64687
- regions: string2().optional().describe("Regions to detect in the asset."),
64688
- responsive_breakpoints: array(lazy(() => ExplicitAssetResponsiveBreakpoint$zodSchema)).optional().describe("Settings to automatically generate breakpoints for responsive images."),
64689
- signature: string2().optional().describe(`(Required for signed REST API calls) Used to authenticate the request and based on the parameters you use in the request. When using the Cloudinary SDKs for signed requests, the signature is automatically generated and added to the request. If you manually generate your own signed POST request, you need to manually generate the signature parameter and add it to the request together with the api_key and timestamp parameters.
65142
+ raw_convert: string2().optional().describe(`Generates a related file based on the uploaded file.
65143
+ - Set to aspose to automatically create a PDF or other image format from a raw Office document using the Aspose Document Conversion add-on. (Asynchronous)
65144
+ - Set to google_speech to instruct the Google AI Video Transcription add-on to generate an automatic transcript raw file from an uploaded video. (Asynchronous)
65145
+ - Set to extract_text to extract all the text from a PDF file and store it in a raw JSON file with a public ID in the format: [pdf_public_id].extract_text.json. The full URL of the generated JSON file is included in the API response. Unlike the above raw_convert options, this option doesn't require registering for an add-on.(Synchronous)
65146
+ - Set to azure_video_indexer to generate AI-powered video insights from Microsoft Azure. (Asynchronous)
64690
65147
  `),
64691
- tags: string2().optional().describe("A comma-separated list of tag names to assign to the asset."),
64692
- timestamp: int().optional().describe("The timestamp to use for the request in unix time. This is automatically computed by the Cloudinary's SDKs."),
64693
- type: ArchiveStorageType$zodSchema.optional().describe("The storage type of resources to include in the archive.")
65148
+ regions: union([
65149
+ string2(),
65150
+ record(string2(), array(array(int())))
65151
+ ]).optional().describe(`Named region coordinate groups for cropping with region gravity.
65152
+ Can be a JSON-encoded string or an object. Each region name may contain
65153
+ only letters, numbers, or hyphens, and must have at least two coordinate pairs.
65154
+ `),
65155
+ responsive_breakpoints: union([
65156
+ array(ResponsiveBreakpoint$zodSchema),
65157
+ ResponsiveBreakpoint$zodSchema
65158
+ ]).optional().describe("Settings to automatically generate breakpoints for responsive images."),
65159
+ return_delete_token: boolean2().optional().describe("Whether to return a deletion token in the upload response. The token can be used to delete the uploaded asset within approximately 10 minutes using an unauthenticated API call."),
65160
+ tags: TagsParam$zodSchema.optional().describe("A comma-separated list of tag names, or an array of tag names."),
65161
+ transformation: string2().optional().describe("An incoming transformation to run on the uploaded asset before its storage. In contrast to eager, this parameter is applied before the file is stored."),
65162
+ type: ExplicitDeliveryType$zodSchema.optional().describe("Delivery types accepted by the explicit operation."),
65163
+ unique_display_name: boolean2().optional().describe("Whether the display name should be unique."),
65164
+ unique_filename: boolean2().optional().describe(`When set to false and used together with use_filename, if an asset with the same file name already exists, no random characters are appended to the file name. Instead, the asset is overwritten. Default: true (random characters are added to the file name if needed).
65165
+ `),
65166
+ upload_preset: string2().optional().describe("Name of an upload preset that you defined for your Cloudinary product environment. An upload preset consists of upload parameters centrally managed using the Admin API or from the Upload Presets page of the Console Settings."),
65167
+ use_asset_folder_as_public_id_prefix: boolean2().optional().describe("Whether to add the asset_folder value as a prefix to the public_id value (prepended with a forward slash). This ensures that the public ID path will always match the initial asset folder, and can help to retain the behavior that previously existed in fixed folder mode. However, keep in mind that even when this option is used during upload, an asset with a certain public ID path can later be moved to a completely different asset folder hierarchy without impacting the public ID. This option only ensures path matching for the initial upload. Relevant only when public_id_prefix (or folder) has not been separately specified."),
65168
+ use_filename: boolean2().optional().describe(`Whether to use the original file name of the uploaded asset if available for the public ID. The file name is normalized and random characters are appended to ensure uniqueness if the file name already exists. Default: false.
65169
+ `),
65170
+ use_filename_as_display_name: boolean2().optional().describe("Whether to automatically assign the original filename of the uploaded asset as the asset's display name. Relevant only if the display_name parameter isn't set."),
65171
+ visual_search: boolean2().optional().describe("Whether to index the image for use with visual searches. Relevant for images only.")
65172
+ }).describe("Common parameters for configuring an asset, including transformation, tagging, metadata, and moderation options.");
65173
+ });
65174
+
65175
+ // src/models/resourcetype.ts
65176
+ var ResourceType$zodSchema;
65177
+ var init_resourcetype = __esm(() => {
65178
+ init_zod();
65179
+ ResourceType$zodSchema = _enum2([
65180
+ "image",
65181
+ "video",
65182
+ "raw"
65183
+ ]).describe("The type of resource.");
65184
+ });
65185
+
65186
+ // src/models/contextfullresponse.ts
65187
+ var ContextFullResponse$zodSchema, ContextFullResponse$zodSchemaOutbound;
65188
+ var init_contextfullresponse = __esm(() => {
65189
+ init_zod();
65190
+ init_schemas4();
65191
+ ContextFullResponse$zodSchema = collectExtraKeys(object({
65192
+ custom: record(string2(), string2()).optional().describe("User-defined contextual metadata as key-value pairs.")
65193
+ }).describe("Contextual metadata grouped by kind. Custom user context appears under the 'custom' key. Other context kinds may also appear as additional keys.").catchall(record(string2(), string2())), "AdditionalProperties", true);
65194
+ ContextFullResponse$zodSchemaOutbound = object({
65195
+ AdditionalProperties: record(string2(), record(string2(), string2())).optional(),
65196
+ custom: record(string2(), string2()).optional()
65197
+ }).describe("Contextual metadata grouped by kind. Custom user context appears under the 'custom' key. Other context kinds may also appear as additional keys.").transform((v2) => {
65198
+ const { AdditionalProperties, ...rest } = v2;
65199
+ return {
65200
+ ...rest,
65201
+ ...AdditionalProperties
65202
+ };
65203
+ });
65204
+ });
65205
+
65206
+ // src/models/coordinatesresponse.ts
65207
+ var CoordinatesResponse$zodSchema;
65208
+ var init_coordinatesresponse = __esm(() => {
65209
+ init_zod();
65210
+ CoordinatesResponse$zodSchema = object({
65211
+ custom: array(array(number2())).optional().describe("Custom coordinate rectangles [x, y, width, height]."),
65212
+ faces: array(array(int())).optional().describe("Detected face coordinate rectangles [x, y, width, height].")
65213
+ }).describe("Coordinate data for faces and custom regions.");
65214
+ });
65215
+
65216
+ // src/models/uploadresponse.ts
65217
+ var UploadResponseImageMetadata$zodSchema, Eager$zodSchema, UploadResponse$zodSchema;
65218
+ var init_uploadresponse = __esm(() => {
65219
+ init_zod();
65220
+ init_contextfullresponse();
65221
+ init_coordinatesresponse();
65222
+ UploadResponseImageMetadata$zodSchema = object({}).describe("The image metadata of the uploaded file.");
65223
+ Eager$zodSchema = object({
65224
+ bytes: int().optional(),
65225
+ format: string2().optional(),
65226
+ height: int().optional(),
65227
+ secure_url: string2().optional(),
65228
+ transformation: string2().optional(),
65229
+ url: string2().optional(),
65230
+ width: int().optional()
65231
+ });
65232
+ UploadResponse$zodSchema = object({
65233
+ api_key: string2().optional().describe("The API key used to upload the file."),
65234
+ asset_folder: string2().nullable().optional().describe("The asset folder where the file is stored."),
65235
+ asset_id: string2().optional().describe("A 32-character hexadecimal asset ID."),
65236
+ bytes: int().optional().describe("The size of the uploaded file in bytes."),
65237
+ context: ContextFullResponse$zodSchema.nullable().optional().describe("Contextual metadata grouped by kind. Custom user context appears under the 'custom' key. Other context kinds may also appear as additional keys."),
65238
+ coordinates: CoordinatesResponse$zodSchema.nullable().optional().describe("Coordinate data for faces and custom regions."),
65239
+ created_at: exports_iso.datetime({ offset: true }).optional().describe("The date and time the file was uploaded."),
65240
+ display_name: string2().optional().describe("The display name of the uploaded file."),
65241
+ eager: array(lazy(() => Eager$zodSchema)).optional(),
65242
+ etag: string2().optional().describe("The ETag of the uploaded file."),
65243
+ faces: array(array(int())).nullable().optional().describe("Detected face coordinate rectangles [x, y, width, height]."),
65244
+ format: string2().optional().describe("The format of the uploaded file."),
65245
+ grayscale: boolean2().optional().describe("Whether the uploaded file is grayscale."),
65246
+ height: int().optional().describe("The height of the uploaded file."),
65247
+ illustration_score: number2().optional().describe("The illustration score of the uploaded file."),
65248
+ image_metadata: lazy(() => UploadResponseImageMetadata$zodSchema).optional().describe("The image metadata of the uploaded file."),
65249
+ metadata: record(string2(), any()).optional().describe("Structured metadata associated with the uploaded file."),
65250
+ original_filename: string2().optional().describe("The original filename of the uploaded file."),
65251
+ pages: int().optional().describe("The number of pages in the uploaded file."),
65252
+ placeholder: boolean2().optional().describe("Whether the uploaded file is a placeholder."),
65253
+ public_id: string2().optional().describe("The public ID of the uploaded file."),
65254
+ resource_type: string2().optional().describe("The type of resource that was uploaded."),
65255
+ secure_url: string2().optional().describe("The secure URL of the uploaded file."),
65256
+ semi_transparent: boolean2().optional().describe("Whether the uploaded file is semi-transparent."),
65257
+ signature: string2().optional().describe("The signature of the uploaded file."),
65258
+ tags: array(string2()).nullable().optional().describe("Tag names assigned to the asset."),
65259
+ type: string2().optional().describe("The type of the uploaded file."),
65260
+ url: string2().optional().describe("The URL of the uploaded file."),
65261
+ version: int().optional().describe("The version of the uploaded file."),
65262
+ version_id: string2().optional().describe("Hexadecimal version ID; length is a positive multiple of 32 (typically 32 or 64)."),
65263
+ width: int().optional().describe("The width of the uploaded file.")
65264
+ });
65265
+ });
65266
+
65267
+ // src/models/explicitassetop.ts
65268
+ var ExplicitAssetGlobals$zodSchema, ExplicitAssetRequest$zodSchema, ExplicitAssetResponse$zodSchema;
65269
+ var init_explicitassetop = __esm(() => {
65270
+ init_zod();
65271
+ init_apierror();
65272
+ init_explicitrequest();
65273
+ init_resourcetype();
65274
+ init_uploadresponse();
65275
+ ExplicitAssetGlobals$zodSchema = object({
65276
+ cloud_name: string2().describe("The cloud name of your product environment.").optional()
64694
65277
  });
64695
65278
  ExplicitAssetRequest$zodSchema = object({
64696
- RequestBody: lazy(() => ExplicitAssetRequestBody$zodSchema),
64697
- resource_type: ResourceType$zodSchema.describe("The type of resource.")
65279
+ explicit_request: ExplicitRequest$zodSchema.describe("The asset and operations to apply."),
65280
+ resource_type: ResourceType$zodSchema.describe("The type of resource (image, video, or raw).")
64698
65281
  });
64699
65282
  ExplicitAssetResponse$zodSchema = union([
64700
65283
  ApiError$zodSchema,
@@ -64729,20 +65312,22 @@ var init_async = __esm(() => {
64729
65312
  });
64730
65313
 
64731
65314
  // src/funcs/assetsExplicitAsset.ts
64732
- function assetsExplicitAsset(client$, resource_type, RequestBody, options) {
64733
- return new APIPromise($do(client$, resource_type, RequestBody, options));
65315
+ function assetsExplicitAsset(client$, resource_type, explicit_request, options) {
65316
+ return new APIPromise($do(client$, resource_type, explicit_request, options));
64734
65317
  }
64735
- async function $do(client$, resource_type, RequestBody, options) {
65318
+ async function $do(client$, resource_type, explicit_request, options) {
64736
65319
  const input$ = {
64737
65320
  resource_type,
64738
- RequestBody
65321
+ explicit_request
64739
65322
  };
64740
65323
  const parsed$ = safeParse4(input$, (value$) => ExplicitAssetRequest$zodSchema.parse(value$), "Input validation failed");
64741
65324
  if (!parsed$.ok) {
64742
65325
  return [parsed$, { status: "invalid" }];
64743
65326
  }
64744
65327
  const payload$ = parsed$.value;
64745
- const body$ = encodeJSON("body", payload$.RequestBody, { explode: true });
65328
+ const body$ = encodeJSON("body", payload$.explicit_request, {
65329
+ explode: true
65330
+ });
64746
65331
  const pathParams$ = {
64747
65332
  cloud_name: encodeSimple("cloud_name", client$._options.cloud_name, {
64748
65333
  explode: false,
@@ -64815,94 +65400,138 @@ var init_assetsExplicitAsset = __esm(() => {
64815
65400
  init_async();
64816
65401
  });
64817
65402
 
64818
- // src/models/accesscontrolitem.ts
64819
- var AccessType$zodSchema, AccessControlItem$zodSchema;
64820
- var init_accesscontrolitem = __esm(() => {
65403
+ // src/models/generateddeliverytype.ts
65404
+ var GeneratedDeliveryType$zodSchema;
65405
+ var init_generateddeliverytype = __esm(() => {
64821
65406
  init_zod();
64822
- AccessType$zodSchema = _enum2([
64823
- "token",
64824
- "anonymous"
64825
- ]).describe("The type of access control to apply to the asset.");
64826
- AccessControlItem$zodSchema = object({
64827
- access_type: AccessType$zodSchema.describe("The type of access control to apply to the asset."),
64828
- end: string2().optional().describe("The end date and time when anonymous access expires (ISO 8601 format)."),
64829
- key: string2().optional().describe("The authentication key identifier for token-based access. Default key is used if not specified or if set to 'default'."),
64830
- start: string2().optional().describe("The start date and time when anonymous access becomes available (ISO 8601 format).")
64831
- }).describe("Access control rule that defines when and how the asset can be accessed.");
65407
+ GeneratedDeliveryType$zodSchema = _enum2([
65408
+ "multi",
65409
+ "sprite",
65410
+ "text",
65411
+ "list"
65412
+ ]).describe("Delivery types for assets generated by Cloudinary operations.");
65413
+ });
65414
+
65415
+ // src/models/deliverytypeall.ts
65416
+ var DeliveryTypeAllEnum$zodSchema, DeliveryTypeAll$zodSchema;
65417
+ var init_deliverytypeall = __esm(() => {
65418
+ init_zod();
65419
+ init_assetdeliverytype();
65420
+ init_fetchdeliverytype();
65421
+ init_generateddeliverytype();
65422
+ init_manageddeliverytype();
65423
+ init_socialdeliverytype();
65424
+ DeliveryTypeAllEnum$zodSchema = _enum2([
65425
+ "media_optimization"
65426
+ ]);
65427
+ DeliveryTypeAll$zodSchema = union([
65428
+ ManagedDeliveryType$zodSchema,
65429
+ AssetDeliveryType$zodSchema,
65430
+ FetchDeliveryType$zodSchema,
65431
+ SocialDeliveryType$zodSchema,
65432
+ GeneratedDeliveryType$zodSchema,
65433
+ DeliveryTypeAllEnum$zodSchema
65434
+ ]).describe("All supported delivery types.");
64832
65435
  });
64833
65436
 
64834
65437
  // src/models/info.ts
64835
- var InfoContext2$zodSchema, InfoContext1$zodSchema, Context$zodSchema, Moderation$zodSchema, RelatedAsset$zodSchema, Derivative$zodSchema, Info$zodSchema;
65438
+ var InfoModeration$zodSchema, RelatedAsset$zodSchema, LastUpdated$zodSchema, Derived$zodSchema, Version$zodSchema, InfoInfo$zodSchema, Derivative$zodSchema, Info$zodSchema;
64836
65439
  var init_info = __esm(() => {
64837
65440
  init_zod();
64838
65441
  init_accesscontrolitem();
64839
- InfoContext2$zodSchema = object({
64840
- key: string2().optional(),
64841
- value: string2().optional()
64842
- });
64843
- InfoContext1$zodSchema = object({
64844
- custom: record(string2(), any()).optional()
64845
- });
64846
- Context$zodSchema = union([
64847
- lazy(() => InfoContext1$zodSchema),
64848
- array(lazy(() => InfoContext2$zodSchema))
64849
- ]).describe("Included if 'context=true' parameter is used. Can be object with custom properties or array of key-value pairs.");
64850
- Moderation$zodSchema = object({
65442
+ init_contextfullresponse();
65443
+ init_coordinatesresponse();
65444
+ init_deliverytypeall();
65445
+ InfoModeration$zodSchema = object({
64851
65446
  kind: string2().optional(),
64852
65447
  status: string2().optional(),
64853
65448
  updated_at: exports_iso.datetime({ offset: true }).optional()
64854
65449
  });
64855
65450
  RelatedAsset$zodSchema = object({});
65451
+ LastUpdated$zodSchema = object({
65452
+ access_control_updated_at: exports_iso.datetime({ offset: true }).optional(),
65453
+ context_updated_at: exports_iso.datetime({ offset: true }).optional(),
65454
+ metadata_updated_at: exports_iso.datetime({ offset: true }).optional(),
65455
+ public_id_updated_at: exports_iso.datetime({ offset: true }).optional(),
65456
+ tags_updated_at: exports_iso.datetime({ offset: true }).optional(),
65457
+ updated_at: exports_iso.datetime({ offset: true }).optional()
65458
+ });
65459
+ Derived$zodSchema = object({
65460
+ bytes: int().optional(),
65461
+ format: string2().optional(),
65462
+ id: string2().optional(),
65463
+ secure_url: string2().optional(),
65464
+ transformation: string2().optional(),
65465
+ url: string2().optional()
65466
+ });
65467
+ Version$zodSchema = object({
65468
+ format: string2().nullable().optional(),
65469
+ restorable: boolean2().optional(),
65470
+ size: int().optional(),
65471
+ time: exports_iso.datetime({ offset: true }).optional(),
65472
+ version: string2().optional(),
65473
+ version_id: string2().optional().describe("Hexadecimal version ID; length is a positive multiple of 32 (typically 32 or 64).")
65474
+ });
65475
+ InfoInfo$zodSchema = object({}).describe("Additional asset information (visual search, recognized people, etc.)");
64856
65476
  Derivative$zodSchema = object({
64857
- id: string2().optional().describe("The unique identifier of the derived resource"),
64858
- secure_url: string2().optional().describe("The secure URL for accessing the derived resource"),
64859
- transformation: string2().optional().describe("The transformation string that was applied"),
64860
- transformation_signature: string2().optional().describe("The unique signature of the transformation")
65477
+ id: string2().optional().describe("The unique identifier of the derived resource."),
65478
+ secure_url: string2().optional().describe("The secure URL for accessing the derived resource."),
65479
+ transformation: string2().optional().describe("The transformation string that was applied."),
65480
+ transformation_signature: string2().optional().describe("The unique signature of the transformation.")
64861
65481
  });
64862
65482
  Info$zodSchema = object({
64863
65483
  access_control: array(AccessControlItem$zodSchema).nullable().optional(),
64864
65484
  animated: boolean2().nullable().optional().describe("Whether the asset is animated (e.g., GIF, animated WebP). Null for non-animated assets."),
64865
65485
  aspect_ratio: number2().nullable().optional(),
64866
65486
  asset_folder: string2().optional(),
64867
- asset_id: string2().optional(),
65487
+ asset_id: string2().optional().describe("A 32-character hexadecimal asset ID."),
64868
65488
  backup: boolean2().optional(),
64869
65489
  backup_bytes: int().optional(),
64870
65490
  bytes: int().optional(),
64871
- context: union([
64872
- lazy(() => InfoContext1$zodSchema),
64873
- array(lazy(() => InfoContext2$zodSchema))
64874
- ]).nullable().optional().describe("Included if 'context=true' parameter is used. Can be object with custom properties or array of key-value pairs."),
65491
+ colors: array(array(any())).optional(),
65492
+ context: ContextFullResponse$zodSchema.nullable().optional().describe("Included if 'context=true' parameter is used."),
65493
+ coordinates: CoordinatesResponse$zodSchema.nullable().optional().describe("Face and custom coordinate data. Included if 'coordinates=true' parameter is used."),
64875
65494
  created_at: exports_iso.datetime({ offset: true }).optional(),
64876
65495
  derivatives: array(lazy(() => Derivative$zodSchema)).nullable().optional().describe("Included if 'derived=true' parameter is used. Null when no derivatives exist."),
65496
+ derived: array(lazy(() => Derived$zodSchema)).optional(),
64877
65497
  display_name: string2().optional(),
64878
65498
  duration: number2().nullable().optional().describe("Duration in seconds for video/audio assets. Null for images."),
64879
65499
  etag: string2().optional(),
65500
+ faces: array(array(int())).nullable().optional().describe("Detected face rectangles. Included if 'faces=true' parameter is used."),
64880
65501
  filename: string2().optional(),
64881
65502
  folder: string2().optional(),
64882
65503
  format: string2().optional(),
65504
+ grayscale: boolean2().optional(),
64883
65505
  height: int().nullable().optional(),
65506
+ illustration_score: number2().optional(),
65507
+ info: lazy(() => InfoInfo$zodSchema).optional().describe("Additional asset information (visual search, recognized people, etc.)"),
65508
+ last_updated: lazy(() => LastUpdated$zodSchema).nullable().optional(),
64884
65509
  metadata: record(string2(), any()).optional(),
64885
- moderation: array(lazy(() => Moderation$zodSchema)).optional().describe("Included if 'moderations=true' parameter is used."),
65510
+ moderation: array(lazy(() => InfoModeration$zodSchema)).optional().describe("Included if 'moderations=true' parameter is used."),
64886
65511
  moderation_kind: string2().optional().describe("The type of moderation applied to the asset."),
64887
65512
  moderation_status: string2().optional().describe("The current status of the moderation process for the asset."),
65513
+ next_cursor: string2().optional().describe("Cursor for paginating derived assets."),
64888
65514
  pixels: int().nullable().optional(),
65515
+ predominant: record(string2(), array(array(any()))).optional(),
64889
65516
  public_id: string2().optional(),
64890
65517
  related_assets: array(lazy(() => RelatedAsset$zodSchema)).nullable().optional().describe("Related assets linked to this resource. Null when none linked."),
64891
65518
  resource_subtype: string2().nullable().optional().describe("The subtype of the resource (e.g., for video). Null when not applicable."),
64892
65519
  resource_type: string2().optional(),
64893
65520
  secure_url: string2().optional(),
65521
+ semi_transparent: boolean2().optional(),
64894
65522
  status: string2().optional(),
64895
65523
  substatus: string2().nullable().optional().describe("The substatus of the resource. Null when not set."),
64896
65524
  tags: array(string2()).nullable().optional().describe("Included if 'tags=true' parameter is used."),
64897
- type: string2().optional(),
65525
+ type: DeliveryTypeAll$zodSchema.optional().describe("All supported delivery types."),
64898
65526
  uploaded_at: exports_iso.datetime({ offset: true }).optional(),
64899
65527
  url: string2().optional(),
64900
65528
  version: int().optional(),
65529
+ versions: array(lazy(() => Version$zodSchema)).optional(),
64901
65530
  width: int().nullable().optional()
64902
65531
  });
64903
65532
  });
64904
65533
 
64905
- // src/mcp-server/widgets/widget-shared.ts
65534
+ // src/mcp-server/apps/app-shared.ts
64906
65535
  function extractSchemaDescriptions(schema) {
64907
65536
  const props = schema.properties || {};
64908
65537
  const result = {};
@@ -65256,7 +65885,7 @@ details.detail-section > summary.detail-section-title::-webkit-details-marker {
65256
65885
  .media-modal-audio-wrap audio { width: 100%; max-width: 480px; }
65257
65886
  .thumb-overlay.playable { pointer-events: auto; cursor: pointer; }
65258
65887
 
65259
- /* Upload widget */
65888
+ /* Upload app */
65260
65889
  .upload-zone {
65261
65890
  border: 2px dashed var(--cld-border2); border-radius: var(--cld-radius);
65262
65891
  padding: 40px 24px; text-align: center; cursor: pointer;
@@ -66878,7 +67507,7 @@ function setupResize(app, minHeight) {
66878
67507
  report();
66879
67508
  }
66880
67509
  `, SHARED_JS_TOOLTIPS;
66881
- var init_widget_shared = __esm(() => {
67510
+ var init_app_shared = __esm(() => {
66882
67511
  init_zod();
66883
67512
  init_info();
66884
67513
  init_uploadresponse();
@@ -66903,11 +67532,11 @@ function tip(key) {
66903
67532
  `;
66904
67533
  });
66905
67534
 
66906
- // src/mcp-server/widgets/asset-gallery-widget.ts
66907
- function getAssetGalleryHtml() {
66908
- return ASSET_GALLERY_HTML;
67535
+ // src/mcp-server/apps/asset-gallery-app.ts
67536
+ function getAssetGalleryHtml(toolName) {
67537
+ return injectToolName(ASSET_GALLERY_HTML, toolName);
66909
67538
  }
66910
- var ASSET_GALLERY_RESOURCE_URI = "ui://cloudinary/asset-gallery.html", MCP_APP_MIME_TYPE = "text/html;profile=mcp-app", GALLERY_CSS = `
67539
+ var GALLERY_CSS = `
66911
67540
  /* ── Header ── */
66912
67541
  .header {
66913
67542
  display: flex; align-items: center; justify-content: space-between;
@@ -67183,7 +67812,10 @@ var LOG_PREFIX = "[gallery]";
67183
67812
  var MIN_HEIGHT = 120;
67184
67813
  var allResources = [];
67185
67814
  var lastCursor = null;
67186
- var pendingCall = { name: null, args: null };
67815
+ var pendingCall = {
67816
+ name: (typeof window.__MCP_TOOL_NAME__ === "string" && window.__MCP_TOOL_NAME__) || null,
67817
+ args: null,
67818
+ };
67187
67819
  var selected = new Set();
67188
67820
  var filterQuery = "";
67189
67821
  var aspectFilter = "";
@@ -67795,23 +68427,23 @@ app.ontoolcancelled = function(params) {
67795
68427
  showCancelledPrompt(pendingCall, fetchDirect);
67796
68428
  };
67797
68429
 
67798
- function inferToolName(data) {
67799
- if (data.total_count !== undefined) return "search-assets";
67800
- var resources = data.resources;
67801
- if (!resources || !resources.length) return null;
67802
- var rt = resources[0].resource_type;
67803
- if (rt === "video") return "list-videos";
67804
- if (rt === "raw") return "list-files";
67805
- return "list-images";
68430
+ function resolveToolName(result) {
68431
+ if (typeof window.__MCP_TOOL_NAME__ === "string" && window.__MCP_TOOL_NAME__) {
68432
+ return window.__MCP_TOOL_NAME__;
68433
+ }
68434
+ var fromMeta = result && result._meta && result._meta["cloudinary/toolName"];
68435
+ if (fromMeta) return fromMeta;
68436
+ return pendingCall.name;
67806
68437
  }
67807
68438
 
67808
68439
  app.ontoolresult = function(result) {
67809
68440
  var data = ingestResult(result);
68441
+ var name = resolveToolName(result);
68442
+ if (name) pendingCall.name = name;
67810
68443
  if (data && data.resources) {
67811
68444
  console.log(LOG_PREFIX, "host result:", data.resources.length, "resources");
67812
68445
  allResources = data.resources;
67813
68446
  lastCursor = data.next_cursor || null;
67814
- pendingCall.name = inferToolName(data) || pendingCall.name;
67815
68447
  render(); attachEvents();
67816
68448
  return;
67817
68449
  }
@@ -67832,7 +68464,11 @@ app.ontoolresult = function(result) {
67832
68464
  };
67833
68465
 
67834
68466
  function showFetchPrompt() {
67835
- var name = pendingCall.name || "list-images";
68467
+ var name = pendingCall.name;
68468
+ if (!name) {
68469
+ showPersistentError("Unknown Tool", "Could not determine which tool produced this result. Please retry from the host.");
68470
+ return;
68471
+ }
67836
68472
  var root = document.getElementById("app");
67837
68473
  var h = '<div class="prompt">';
67838
68474
  h += '<div class="prompt-icon">\\u{1F4E6}</div>';
@@ -67855,7 +68491,11 @@ function jsonArgs(src) {
67855
68491
  }
67856
68492
 
67857
68493
  async function fetchDirect() {
67858
- var name = pendingCall.name || "list-images";
68494
+ var name = pendingCall.name;
68495
+ if (!name) {
68496
+ showPersistentError("Unknown Tool", "Could not determine which tool to call. Please retry from the host.");
68497
+ return;
68498
+ }
67859
68499
  var args = jsonArgs(pendingCall.args || {});
67860
68500
  console.log(LOG_PREFIX, "fetchDirect ->", name);
67861
68501
 
@@ -67880,7 +68520,11 @@ async function fetchDirect() {
67880
68520
 
67881
68521
  async function loadMore() {
67882
68522
  if (!lastCursor) return;
67883
- var name = pendingCall.name || "list-images";
68523
+ var name = pendingCall.name;
68524
+ if (!name) {
68525
+ showError("Unknown Tool", "Could not determine which tool to call for pagination.");
68526
+ return;
68527
+ }
67884
68528
  var args = name === "search-assets"
67885
68529
  ? { request: { next_cursor: lastCursor } }
67886
68530
  : { next_cursor: lastCursor };
@@ -67927,8 +68571,8 @@ app.connect().then(function() {
67927
68571
  });
67928
68572
 
67929
68573
  `, ASSET_GALLERY_HTML;
67930
- var init_asset_gallery_widget = __esm(() => {
67931
- init_widget_shared();
68574
+ var init_asset_gallery_app = __esm(() => {
68575
+ init_app_shared();
67932
68576
  ASSET_GALLERY_HTML = `<!DOCTYPE html>
67933
68577
  <html lang="en">
67934
68578
  <head>
@@ -67958,11 +68602,11 @@ ${GALLERY_JS}
67958
68602
  </html>`;
67959
68603
  });
67960
68604
 
67961
- // src/mcp-server/widgets/asset-details-widget.ts
67962
- function getAssetDetailsHtml() {
67963
- return ASSET_DETAILS_HTML;
68605
+ // src/mcp-server/apps/asset-details-app.ts
68606
+ function getAssetDetailsHtml(toolName) {
68607
+ return injectToolName(ASSET_DETAILS_HTML, toolName);
67964
68608
  }
67965
- var ASSET_DETAILS_RESOURCE_URI = "ui://cloudinary/asset-details.html", ASSET_DETAILS_CSS = `
68609
+ var ASSET_DETAILS_CSS = `
67966
68610
  .details-header {
67967
68611
  display: flex; align-items: center; gap: 14px;
67968
68612
  padding-bottom: var(--cld-sp-md);
@@ -68221,8 +68865,8 @@ app.connect().then(function() {
68221
68865
  showError("Connection Failed", err && err.message ? err.message : String(err));
68222
68866
  });
68223
68867
  `, ASSET_DETAILS_HTML;
68224
- var init_asset_details_widget = __esm(() => {
68225
- init_widget_shared();
68868
+ var init_asset_details_app = __esm(() => {
68869
+ init_app_shared();
68226
68870
  ASSET_DETAILS_HTML = `<!DOCTYPE html>
68227
68871
  <html lang="en">
68228
68872
  <head>
@@ -68251,46 +68895,58 @@ ${ASSET_DETAILS_JS}
68251
68895
  </html>`;
68252
68896
  });
68253
68897
 
68898
+ // src/models/uploaddeliverytype.ts
68899
+ var UploadDeliveryType$zodSchema;
68900
+ var init_uploaddeliverytype = __esm(() => {
68901
+ init_zod();
68902
+ init_assetdeliverytype();
68903
+ init_manageddeliverytype();
68904
+ UploadDeliveryType$zodSchema = union([
68905
+ ManagedDeliveryType$zodSchema,
68906
+ AssetDeliveryType$zodSchema
68907
+ ]).describe("Delivery types accepted by upload and rename operations.");
68908
+ });
68909
+
68254
68910
  // src/models/uploadrequest.ts
68255
- var AutoTranscription$zodSchema, AutoTranscriptionUnion$zodSchema, ResponsiveBreakpoint$zodSchema, UploadRequestType$zodSchema, UploadRequestAccessMode$zodSchema, UploadRequest$zodSchema;
68911
+ var UploadRequestAutoTranscription$zodSchema, UploadRequestAutoTranscriptionUnion$zodSchema, UploadRequestAccessMode$zodSchema, UploadRequestRegions$zodSchema, UploadRequestResponsiveBreakpoints$zodSchema, UploadRequest$zodSchema;
68256
68912
  var init_uploadrequest = __esm(() => {
68257
68913
  init_zod();
68258
68914
  init_accesscontrolitem();
68259
- AutoTranscription$zodSchema = object({
68915
+ init_responsivebreakpoint();
68916
+ init_structuredmetadataparam();
68917
+ init_tagsparam();
68918
+ init_uploaddeliverytype();
68919
+ UploadRequestAutoTranscription$zodSchema = object({
68260
68920
  translate: array(string2()).optional().describe("Array of target language codes for transcription translation.")
68261
68921
  }).describe("Configuration object for automatic video transcription with translation options.");
68262
- AutoTranscriptionUnion$zodSchema = union([
68922
+ UploadRequestAutoTranscriptionUnion$zodSchema = union([
68263
68923
  boolean2(),
68264
- lazy(() => AutoTranscription$zodSchema)
68924
+ lazy(() => UploadRequestAutoTranscription$zodSchema)
68265
68925
  ]);
68266
- ResponsiveBreakpoint$zodSchema = object({
68267
- bytes_step: int().optional(),
68268
- create_derived: boolean2().optional(),
68269
- max_images: int().optional(),
68270
- max_width: int().optional(),
68271
- min_width: int().optional(),
68272
- transformation: string2().optional()
68273
- });
68274
- UploadRequestType$zodSchema = _enum2([
68275
- "upload",
68276
- "authenticated",
68277
- "private",
68278
- "asset"
68279
- ]).describe("The delivery type that defines if and how the uploaded asset is available for public delivery. By default, all uploaded assets are public (upload). Possible values are upload, authenticated, private or asset.");
68280
68926
  UploadRequestAccessMode$zodSchema = _enum2([
68281
68927
  "public",
68282
68928
  "authenticated"
68283
- ]).describe(`Allows the asset to behave as if it's of the authenticated 'type' (see above) while still using the default 'upload' type in delivery URLs. The asset can later be made public by changing its access_mode via the Admin API, without having to update any delivery URLs. Valid values: public, and authenticated.
68929
+ ]).describe(`Deprecated. Use access_control instead. Allows the asset to behave as if it's of the authenticated delivery type while still using the default 'upload' type in delivery URLs. The asset can later be made public by changing its access_mode via the Admin API, without having to update any delivery URLs.
68930
+ `);
68931
+ UploadRequestRegions$zodSchema = union([
68932
+ string2(),
68933
+ record(string2(), array(array(int())))
68934
+ ]).describe(`Named region coordinate groups for cropping with region gravity.
68935
+ Can be a JSON-encoded string or an object. Each region name may contain
68936
+ only letters, numbers, or hyphens, and must have at least two coordinate pairs.
68284
68937
  `);
68938
+ UploadRequestResponsiveBreakpoints$zodSchema = union([
68939
+ array(ResponsiveBreakpoint$zodSchema),
68940
+ ResponsiveBreakpoint$zodSchema
68941
+ ]).describe("Settings to automatically generate breakpoints for responsive images.");
68285
68942
  UploadRequest$zodSchema = object({
68286
68943
  access_control: array(AccessControlItem$zodSchema).optional().describe(`Restricts access to the asset by specifying one or more access types.
68287
68944
  The asset is restricted unless at least one listed access type is valid.
68288
68945
  `),
68289
- access_mode: UploadRequestAccessMode$zodSchema.optional().describe(`Allows the asset to behave as if it's of the authenticated 'type' (see above) while still using the default 'upload' type in delivery URLs. The asset can later be made public by changing its access_mode via the Admin API, without having to update any delivery URLs. Valid values: public, and authenticated.
68946
+ access_mode: UploadRequestAccessMode$zodSchema.optional().describe(`Deprecated. Use access_control instead. Allows the asset to behave as if it's of the authenticated delivery type while still using the default 'upload' type in delivery URLs. The asset can later be made public by changing its access_mode via the Admin API, without having to update any delivery URLs.
68290
68947
  `),
68291
- accessibility_analysis: boolean2().optional().describe("Whether to return return accessibility analysis values for the image."),
68292
- allowed_formats: string2().optional().describe("A comma-separated list of file formats that are allowed for uploading. Files of other types will be rejected. The formats can be any combination of image types, video formats or raw file extensions.\nNote: You can also add the `format` parameter to convert other file types instead of rejecting them. In this case, only files that would normally be rejected are converted, any file format allowed for upload wont be converted.\n"),
68293
- api_key: string2().optional().describe("The API key to use for the request. This is automatically computed by the Cloudinary's SDKs."),
68948
+ accessibility_analysis: boolean2().optional().describe("Whether to return accessibility analysis values for the image."),
68949
+ allowed_formats: string2().optional().describe("A comma-separated list of file formats that are allowed for uploading. Files of other types will be rejected. The formats can be any combination of image types, video formats or raw file extensions.\nNote: You can also add the `format` parameter to convert other file types instead of rejecting them. In this case, only files that would normally be rejected are converted, any file format allowed for upload won't be converted.\n"),
68294
68950
  asset_folder: string2().optional().describe("The asset folder to assign to the asset."),
68295
68951
  async: boolean2().optional().describe(`When set to true, returns the uploaded asset's public_id immediately in the response, before the upload is completed (asynchronously). Default: false.
68296
68952
  `),
@@ -68307,7 +68963,7 @@ Use together with the categorization parameter for:
68307
68963
  `),
68308
68964
  auto_transcription: union([
68309
68965
  boolean2(),
68310
- lazy(() => AutoTranscription$zodSchema)
68966
+ lazy(() => UploadRequestAutoTranscription$zodSchema)
68311
68967
  ]).optional(),
68312
68968
  background_removal: string2().optional().describe(`Automatically remove the background of an image using an add-on.
68313
68969
  - Set to cloudinary_ai to use the deep-learning based Cloudinary AI Background Removal add-on.
@@ -68327,9 +68983,10 @@ to automatically classify the scenes of the uploaded asset.
68327
68983
  Optionally append a language code suffix (e.g., google_tagging:fr).
68328
68984
  `),
68329
68985
  cinemagraph_analysis: boolean2().optional().describe("Whether to return a cinemagraph analysis value for the media asset between 0 and 1, where 0 means the asset is not a cinemagraph and 1 means the asset is a cinemagraph. Relevant for animated images and video only. A static image will return 0."),
68986
+ clear_invalid: boolean2().default(false).describe("Whether to clear metadata field values that have become invalid due to a change in metadata rules. If false, the API returns an error if any existing metadata value is no longer valid. Default: false."),
68330
68987
  colors: boolean2().default(false).describe("Whether to retrieve predominant colors & color histogram of the uploaded image. Note: If all returned colors are opaque, then 6-digit RGB hex values are returned. If one or more colors contain an alpha channel, then 8-digit RGBA hex quadruplet values are returned."),
68331
- context: string2().optional().describe("Key-value pairs of general textual context metadata to attach to the asset."),
68332
- custom_coordinates: string2().optional().describe("An array of coordinates for custom cropping."),
68988
+ context: string2().optional().describe('A pipe-separated list of key-value pairs of general textual context metadata to attach to the asset (e.g., "alt=My image|caption=Nice photo"). The =, ", and | characters can be escaped with a prepending backslash (\\).'),
68989
+ custom_coordinates: string2().optional().describe("Custom coordinates as comma-separated values, with multiple coordinates separated by pipes."),
68333
68990
  detection: string2().optional().describe(`Invokes the relevant add-on to return a list of detected content.
68334
68991
  Set to:
68335
68992
  - <content-aware model>_[<version>] (e.g. coco_v2) to return a list of detected content using the Cloudinary AI Content Analysis add-on. Can be used together with the auto_tagging parameter to apply tags automatically.
@@ -68345,7 +69002,7 @@ Set to:
68345
69002
  eager_async: boolean2().optional().describe("Whether to generate the eager transformations asynchronously in the background after the upload request is completed rather than before the upload is completed."),
68346
69003
  eager_notification_url: string2().optional().describe("A URL to notify when eager transformations are completed."),
68347
69004
  eval: string2().optional().describe("Allows you to modify upload parameters by specifying custom logic with JavaScript. This can be useful for conditionally adding tags, contextual metadata, structured metadata or eager transformations depending on specific criteria of the uploaded file."),
68348
- face_coordinates: string2().optional().describe("An array of coordinates representing detected faces in the asset, used for custom cropping or overlays."),
69005
+ face_coordinates: string2().optional().describe("Face coordinates as comma-separated values, with multiple faces separated by pipes."),
68349
69006
  faces: boolean2().optional().describe("Whether to detect faces in the asset."),
68350
69007
  file: string2().describe(`One of the following:
68351
69008
  - The remote HTTP or HTTPS URL address of an existing file.
@@ -68366,7 +69023,8 @@ Supported for images, video, and audio.
68366
69023
  - Returned metadata for audio and video includes: audio_codec, audio_bit_rate, audio_frequency, channels, channel_layout.
68367
69024
  - Additional metadata for video includes: pix_format, codec, level, profile, video_bit_rate, dar.
68368
69025
  `),
68369
- metadata: string2().optional().describe("Structured metadata to attach to the asset based on the metadata fields defined for your account."),
69026
+ metadata: StructuredMetadataParam$zodSchema.optional().describe(`A pipe-separated list or a map of custom metadata fields (by external_id) and the values to assign to each of them. The = " and | characters can be supported as values when escaped with a prepended backslash (\\). For a multi-select field, you can set a maximum of 3000 different metadata values on an asset.
69027
+ `),
68370
69028
  moderation: string2().optional().describe(`For all asset types, set to:
68371
69029
  - manual to add the uploaded asset to a list of pending assets that can be moderated using the Admin API or the Cloudinary Console.
68372
69030
  - perception_point to automatically moderate the uploaded asset using the Perception Point Malware Detection add-on.
@@ -68405,15 +69063,21 @@ Optionally append options (e.g., adv_ocr:document).
68405
69063
  - Set to extract_text to extract all the text from a PDF file and store it in a raw JSON file with a public ID in the format: [pdf_public_id].extract_text.json. The full URL of the generated JSON file is included in the API response. Unlike the above raw_convert options, this option doesn't require registering for an add-on.(Synchronous)
68406
69064
  - Set to azure_video_indexer to generate AI-powered video insights from Microsoft Azure. (Asynchronous)
68407
69065
  `),
68408
- regions: string2().optional().describe("Regions to detect in the asset."),
68409
- responsive_breakpoints: array(lazy(() => ResponsiveBreakpoint$zodSchema)).optional().describe("Settings to automatically generate breakpoints for responsive images."),
68410
- return_delete_token: boolean2().optional().describe("Whether to return a deletion token in the upload response. The token can be used to delete the uploaded asset within approximately 10 minutes using an unauthenticated API call."),
68411
- signature: string2().optional().describe(`(Required for signed REST API calls) Used to authenticate the request and based on the parameters you use in the request. When using the Cloudinary SDKs for signed requests, the signature is automatically generated and added to the request. If you manually generate your own signed POST request, you need to manually generate the signature parameter and add it to the request together with the api_key and timestamp parameters.
69066
+ regions: union([
69067
+ string2(),
69068
+ record(string2(), array(array(int())))
69069
+ ]).optional().describe(`Named region coordinate groups for cropping with region gravity.
69070
+ Can be a JSON-encoded string or an object. Each region name may contain
69071
+ only letters, numbers, or hyphens, and must have at least two coordinate pairs.
68412
69072
  `),
68413
- tags: string2().optional().describe("A comma-separated list of tag names to assign to the asset."),
68414
- timestamp: int().optional().describe("The timestamp to use for the request in unix time. This is automatically computed by the Cloudinary's SDKs."),
69073
+ responsive_breakpoints: union([
69074
+ array(ResponsiveBreakpoint$zodSchema),
69075
+ ResponsiveBreakpoint$zodSchema
69076
+ ]).optional().describe("Settings to automatically generate breakpoints for responsive images."),
69077
+ return_delete_token: boolean2().optional().describe("Whether to return a deletion token in the upload response. The token can be used to delete the uploaded asset within approximately 10 minutes using an unauthenticated API call."),
69078
+ tags: TagsParam$zodSchema.optional().describe("A comma-separated list of tag names, or an array of tag names."),
68415
69079
  transformation: string2().optional().describe("An incoming transformation to run on the uploaded asset before its storage. In contrast to eager, this parameter is applied before the file is stored."),
68416
- type: UploadRequestType$zodSchema.optional().describe("The delivery type that defines if and how the uploaded asset is available for public delivery. By default, all uploaded assets are public (upload). Possible values are upload, authenticated, private or asset."),
69080
+ type: UploadDeliveryType$zodSchema.optional().describe("The delivery type that defines if and how the uploaded asset is available for public delivery. By default, all uploaded assets are public (upload)."),
68417
69081
  unique_display_name: boolean2().optional().describe("Whether the display name should be unique."),
68418
69082
  unique_filename: boolean2().optional().describe(`When set to false and used together with use_filename, if an asset with the same file name already exists, no random characters are appended to the file name. Instead, the asset is overwritten. Default: true (random characters are added to the file name if needed).
68419
69083
  `),
@@ -68425,7 +69089,7 @@ Name of an upload preset that you defined for your Cloudinary product environmen
68425
69089
  `),
68426
69090
  use_filename_as_display_name: boolean2().optional().describe("Whether to automatically assign the original filename of the uploaded asset as the asset's display name. Relevant only if the display_name parameter isn't set."),
68427
69091
  visual_search: boolean2().optional().describe("Whether to index the image for use with visual searches. Relevant for images only.")
68428
- });
69092
+ }).describe("Parameters for configuring asset uploads, including transformation, tagging, metadata, and delivery options.");
68429
69093
  });
68430
69094
 
68431
69095
  // src/models/uploadresourcetype.ts
@@ -68445,11 +69109,11 @@ var init_uploadresourcetype = __esm(() => {
68445
69109
  `);
68446
69110
  });
68447
69111
 
68448
- // src/mcp-server/widgets/asset-upload-widget.ts
68449
- function getAssetUploadHtml() {
68450
- return ASSET_UPLOAD_HTML;
69112
+ // src/mcp-server/apps/asset-upload-app.ts
69113
+ function getAssetUploadHtml(toolName) {
69114
+ return injectToolName(ASSET_UPLOAD_HTML, toolName);
68451
69115
  }
68452
- var ASSET_UPLOAD_RESOURCE_URI = "ui://cloudinary/asset-upload.html", uploadJsonSchema, rtJsonSchema, allSchemaProperties, rtCopy, SCHEMA_JSON, UPLOAD_CSS = `
69116
+ var uploadJsonSchema, rtJsonSchema, allSchemaProperties, rtCopy, SCHEMA_JSON, UPLOAD_CSS = `
68453
69117
  .upload-header {
68454
69118
  display: flex; align-items: center; gap: 10px;
68455
69119
  margin-bottom: var(--cld-sp-md); padding-bottom: var(--cld-sp-sm);
@@ -68475,9 +69139,9 @@ var ASSET_UPLOAD_RESOURCE_URI = "ui://cloudinary/asset-upload.html", uploadJsonS
68475
69139
  margin-top: 16px; text-align: center;
68476
69140
  }
68477
69141
  `, UPLOAD_JS, ASSET_UPLOAD_HTML;
68478
- var init_asset_upload_widget = __esm(() => {
69142
+ var init_asset_upload_app = __esm(() => {
68479
69143
  init_zod();
68480
- init_widget_shared();
69144
+ init_app_shared();
68481
69145
  init_uploadrequest();
68482
69146
  init_uploadresourcetype();
68483
69147
  uploadJsonSchema = toJSONSchema(UploadRequest$zodSchema);
@@ -69119,7 +69783,7 @@ function renderUploadError(title, msg) {
69119
69783
  var safeMsg = esc(msg).replace(/\\n/g, "<br>");
69120
69784
  var h = '<div class="upload-error-msg">' + safeMsg + "</div>";
69121
69785
  h += '<div class="upload-another" style="margin-top:14px">';
69122
- h += '<button class="prompt-btn prompt-btn-primary" id="retry-upload-btn">Try from Widget</button>';
69786
+ h += '<button class="prompt-btn prompt-btn-primary" id="retry-upload-btn">Try from App</button>';
69123
69787
  h += "</div>";
69124
69788
  wrap.innerHTML = h;
69125
69789
  } else {
@@ -69131,7 +69795,7 @@ function renderUploadError(title, msg) {
69131
69795
  h += "</div>";
69132
69796
  h += '<div class="upload-error-msg">' + safeMsg + "</div>";
69133
69797
  h += '<div class="upload-another" style="margin-top:14px;text-align:center">';
69134
- h += '<button class="prompt-btn prompt-btn-primary" id="retry-upload-btn">Try from Widget</button>';
69798
+ h += '<button class="prompt-btn prompt-btn-primary" id="retry-upload-btn">Try from App</button>';
69135
69799
  h += "</div>";
69136
69800
  root.innerHTML = h;
69137
69801
  }
@@ -69269,7 +69933,7 @@ async function doUpload(fileData, displayHint) {
69269
69933
  if (uploadOrigin === "host") {
69270
69934
  try {
69271
69935
  app._rpc("ui/updateModelContext", {
69272
- content: [{ type: "text", text: "File uploaded successfully via widget. public_id: " + data.public_id + ", secure_url: " + (data.secure_url || data.url || "") }]
69936
+ content: [{ type: "text", text: "File uploaded successfully via app. public_id: " + data.public_id + ", secure_url: " + (data.secure_url || data.url || "") }]
69273
69937
  });
69274
69938
  } catch (e) { console.warn(LOG_PREFIX, "updateModelContext failed:", e); }
69275
69939
  }
@@ -69436,7 +70100,7 @@ app.ontoolcancelled = function(params) {
69436
70100
  h += '<div style="font-size:14px;font-weight:600;color:var(--cld-text);margin-bottom:4px">Upload Cancelled</div>';
69437
70101
  h += renderParamsList(pendingCall.args);
69438
70102
  h += '<div class="prompt-actions" style="margin-top:14px">';
69439
- h += '<button class="prompt-btn prompt-btn-primary" id="cancelled-retry-btn">Upload from Widget</button>';
70103
+ h += '<button class="prompt-btn prompt-btn-primary" id="cancelled-retry-btn">Upload from App</button>';
69440
70104
  h += '</div>';
69441
70105
  h += '</div>';
69442
70106
  root.innerHTML = h;
@@ -69521,8 +70185,85 @@ ${UPLOAD_JS}
69521
70185
  </html>`;
69522
70186
  });
69523
70187
 
70188
+ // src/mcp-server/apps/extensions.ts
70189
+ function appResourceContent(uri, html) {
70190
+ return {
70191
+ contents: [{
70192
+ uri: uri.toString(),
70193
+ mimeType: MCP_APP_MIME_TYPE,
70194
+ text: html,
70195
+ _meta: { ui: { csp: { resourceDomains: CSP_RESOURCE_DOMAINS } } }
70196
+ }]
70197
+ };
70198
+ }
70199
+ function registerAppResources(register, enabledApps) {
70200
+ for (const spec of APP_SPECS) {
70201
+ if (!enabledApps.has(spec.app))
70202
+ continue;
70203
+ register.resourceTemplate({
70204
+ name: spec.name,
70205
+ description: spec.description,
70206
+ metadata: { mimeType: MCP_APP_MIME_TYPE },
70207
+ resource: new ResourceTemplate(appUriTemplate(spec.app), {
70208
+ list: async () => ({
70209
+ resources: spec.tools.map(({ tool, title }) => ({
70210
+ uri: appUri(spec.app, tool),
70211
+ name: title,
70212
+ mimeType: MCP_APP_MIME_TYPE
70213
+ }))
70214
+ })
70215
+ }),
70216
+ scopes: [],
70217
+ read: async (_client, uri, vars, _extra) => {
70218
+ const tool = String(vars["tool"] ?? "");
70219
+ return appResourceContent(uri, spec.render(tool || undefined));
70220
+ }
70221
+ });
70222
+ }
70223
+ }
70224
+ var CSP_RESOURCE_DOMAINS, APP_SPECS;
70225
+ var init_extensions = __esm(() => {
70226
+ init_mcp();
70227
+ init_asset_gallery_app();
70228
+ init_asset_details_app();
70229
+ init_asset_upload_app();
70230
+ CSP_RESOURCE_DOMAINS = [
70231
+ "https://res.cloudinary.com",
70232
+ "https://*.cloudinary.com"
70233
+ ];
70234
+ APP_SPECS = [
70235
+ {
70236
+ app: "asset-gallery",
70237
+ name: "Asset Gallery",
70238
+ description: "Interactive asset gallery for browsing Cloudinary images, videos, files, and search results",
70239
+ tools: [
70240
+ { tool: "list-images", title: "Browse Images" },
70241
+ { tool: "list-videos", title: "Browse Videos" },
70242
+ { tool: "list-files", title: "Browse Files" },
70243
+ { tool: "search-assets", title: "Search Assets" }
70244
+ ],
70245
+ render: getAssetGalleryHtml
70246
+ },
70247
+ {
70248
+ app: "asset-details",
70249
+ name: "Asset Details",
70250
+ description: "Interactive single-asset detail view for Cloudinary assets",
70251
+ tools: [{ tool: "get-asset-details", title: "Asset Details" }],
70252
+ render: getAssetDetailsHtml
70253
+ },
70254
+ {
70255
+ app: "asset-upload",
70256
+ name: "Asset Upload",
70257
+ description: "Interactive upload interface for uploading assets to Cloudinary",
70258
+ tools: [{ tool: "upload-asset", title: "Upload Asset" }],
70259
+ render: getAssetUploadHtml
70260
+ }
70261
+ ];
70262
+ });
70263
+
69524
70264
  // src/mcp-server/server.extensions.ts
69525
- function registerMCPExtensions(register) {
70265
+ function registerMCPExtensions(register, mcpApps = []) {
70266
+ registerAppResources(register, new Set(mcpApps));
69526
70267
  register.tool({
69527
70268
  name: "get-tx-reference",
69528
70269
  description: `Get Cloudinary transformation rules documentation from official docs
@@ -69582,84 +70323,6 @@ You can view the documentation directly at: ${TX_RULES_URL}`
69582
70323
  }
69583
70324
  }
69584
70325
  });
69585
- register.resource({
69586
- name: "Asset Gallery Widget",
69587
- description: "Interactive asset gallery for browsing Cloudinary images",
69588
- metadata: {
69589
- mimeType: MCP_APP_MIME_TYPE
69590
- },
69591
- resource: ASSET_GALLERY_RESOURCE_URI,
69592
- scopes: [],
69593
- read: async (_client, _uri, _extra) => ({
69594
- contents: [{
69595
- uri: ASSET_GALLERY_RESOURCE_URI,
69596
- mimeType: MCP_APP_MIME_TYPE,
69597
- text: getAssetGalleryHtml(),
69598
- _meta: {
69599
- ui: {
69600
- csp: {
69601
- resourceDomains: [
69602
- "https://res.cloudinary.com",
69603
- "https://*.cloudinary.com"
69604
- ]
69605
- }
69606
- }
69607
- }
69608
- }]
69609
- })
69610
- });
69611
- register.resource({
69612
- name: "Asset Details Widget",
69613
- description: "Interactive single-asset detail view for Cloudinary assets",
69614
- metadata: {
69615
- mimeType: MCP_APP_MIME_TYPE
69616
- },
69617
- resource: ASSET_DETAILS_RESOURCE_URI,
69618
- scopes: [],
69619
- read: async (_client, _uri, _extra) => ({
69620
- contents: [{
69621
- uri: ASSET_DETAILS_RESOURCE_URI,
69622
- mimeType: MCP_APP_MIME_TYPE,
69623
- text: getAssetDetailsHtml(),
69624
- _meta: {
69625
- ui: {
69626
- csp: {
69627
- resourceDomains: [
69628
- "https://res.cloudinary.com",
69629
- "https://*.cloudinary.com"
69630
- ]
69631
- }
69632
- }
69633
- }
69634
- }]
69635
- })
69636
- });
69637
- register.resource({
69638
- name: "Asset Upload Widget",
69639
- description: "Interactive upload interface for uploading assets to Cloudinary",
69640
- metadata: {
69641
- mimeType: MCP_APP_MIME_TYPE
69642
- },
69643
- resource: ASSET_UPLOAD_RESOURCE_URI,
69644
- scopes: [],
69645
- read: async (_client, _uri, _extra) => ({
69646
- contents: [{
69647
- uri: ASSET_UPLOAD_RESOURCE_URI,
69648
- mimeType: MCP_APP_MIME_TYPE,
69649
- text: getAssetUploadHtml(),
69650
- _meta: {
69651
- ui: {
69652
- csp: {
69653
- resourceDomains: [
69654
- "https://res.cloudinary.com",
69655
- "https://*.cloudinary.com"
69656
- ]
69657
- }
69658
- }
69659
- }
69660
- }]
69661
- })
69662
- });
69663
70326
  register.tool({
69664
70327
  name: "transform-asset",
69665
70328
  description: `Generate derived transformations for existing assets using Cloudinary's explicit API with eager transformations
@@ -69727,9 +70390,7 @@ var init_server_extensions = __esm(() => {
69727
70390
  init_tools();
69728
70391
  init_assetsExplicitAsset();
69729
70392
  init_resourcetype();
69730
- init_asset_gallery_widget();
69731
- init_asset_details_widget();
69732
- init_asset_upload_widget();
70393
+ init_extensions();
69733
70394
  });
69734
70395
 
69735
70396
  // src/models/assetrelationinfo.ts
@@ -69765,21 +70426,28 @@ var init_assetrelationsresponse = __esm(() => {
69765
70426
  });
69766
70427
  });
69767
70428
 
70429
+ // src/models/relateassetsbyassetidrequest.ts
70430
+ var RelateAssetsByAssetIdRequest$zodSchema;
70431
+ var init_relateassetsbyassetidrequest = __esm(() => {
70432
+ init_zod();
70433
+ RelateAssetsByAssetIdRequest$zodSchema = object({
70434
+ assets_to_relate: array(string2()).describe("Relates the asset to all the assets specified in this array of up to 10 assets, specified by their asset IDs.")
70435
+ }).describe("The asset relation request.");
70436
+ });
70437
+
69768
70438
  // src/models/createassetrelationsbyassetidop.ts
69769
- var CreateAssetRelationsByAssetIdGlobals$zodSchema, CreateAssetRelationsByAssetIdRequestBody$zodSchema, CreateAssetRelationsByAssetIdRequest$zodSchema, CreateAssetRelationsByAssetIdResponse$zodSchema;
70439
+ var CreateAssetRelationsByAssetIdGlobals$zodSchema, CreateAssetRelationsByAssetIdRequest$zodSchema, CreateAssetRelationsByAssetIdResponse$zodSchema;
69770
70440
  var init_createassetrelationsbyassetidop = __esm(() => {
69771
70441
  init_zod();
69772
70442
  init_apierror();
69773
70443
  init_assetrelationsresponse();
70444
+ init_relateassetsbyassetidrequest();
69774
70445
  CreateAssetRelationsByAssetIdGlobals$zodSchema = object({
69775
70446
  cloud_name: string2().describe("The cloud name of your product environment.").optional()
69776
70447
  });
69777
- CreateAssetRelationsByAssetIdRequestBody$zodSchema = object({
69778
- assets_to_relate: array(string2()).describe("Relates the asset to all the assets specified in this array of up to 10 assets, specified by their asset IDs.")
69779
- });
69780
70448
  CreateAssetRelationsByAssetIdRequest$zodSchema = object({
69781
- RequestBody: lazy(() => CreateAssetRelationsByAssetIdRequestBody$zodSchema),
69782
- asset_id: string2().describe("The asset ID of the resource. Must be a 32-character hexadecimal string.")
70449
+ asset_id: string2().describe("The asset ID of the resource. Must be a 32-character hexadecimal string."),
70450
+ relate_assets_by_asset_id_request: RelateAssetsByAssetIdRequest$zodSchema.describe("The asset IDs to relate.")
69783
70451
  });
69784
70452
  CreateAssetRelationsByAssetIdResponse$zodSchema = union([
69785
70453
  ApiError$zodSchema,
@@ -69788,20 +70456,22 @@ var init_createassetrelationsbyassetidop = __esm(() => {
69788
70456
  });
69789
70457
 
69790
70458
  // src/funcs/assetRelationsCreateAssetRelationsByAssetId.ts
69791
- function assetRelationsCreateAssetRelationsByAssetId(client$, asset_id, RequestBody, options) {
69792
- return new APIPromise($do2(client$, asset_id, RequestBody, options));
70459
+ function assetRelationsCreateAssetRelationsByAssetId(client$, asset_id, relate_assets_by_asset_id_request, options) {
70460
+ return new APIPromise($do2(client$, asset_id, relate_assets_by_asset_id_request, options));
69793
70461
  }
69794
- async function $do2(client$, asset_id, RequestBody, options) {
70462
+ async function $do2(client$, asset_id, relate_assets_by_asset_id_request, options) {
69795
70463
  const input$ = {
69796
70464
  asset_id,
69797
- RequestBody
70465
+ relate_assets_by_asset_id_request
69798
70466
  };
69799
70467
  const parsed$ = safeParse4(input$, (value$) => CreateAssetRelationsByAssetIdRequest$zodSchema.parse(value$), "Input validation failed");
69800
70468
  if (!parsed$.ok) {
69801
70469
  return [parsed$, { status: "invalid" }];
69802
70470
  }
69803
70471
  const payload$ = parsed$.value;
69804
- const body$ = encodeJSON("body", payload$.RequestBody, { explode: true });
70472
+ const body$ = encodeJSON("body", payload$.relate_assets_by_asset_id_request, {
70473
+ explode: true
70474
+ });
69805
70475
  const pathParams$ = {
69806
70476
  asset_id: encodeSimple("asset_id", payload$.asset_id, {
69807
70477
  explode: false,
@@ -69879,17 +70549,17 @@ var args, tool$assetRelationsCreateAssetRelationsByAssetId;
69879
70549
  var init_assetRelationsCreateAssetRelationsByAssetId2 = __esm(() => {
69880
70550
  init_zod();
69881
70551
  init_assetRelationsCreateAssetRelationsByAssetId();
69882
- init_createassetrelationsbyassetidop();
70552
+ init_relateassetsbyassetidrequest();
69883
70553
  init_tools();
69884
70554
  args = {
69885
70555
  asset_id: string2().describe("The asset ID of the resource. Must be a 32-character hexadecimal string."),
69886
- RequestBody: CreateAssetRelationsByAssetIdRequestBody$zodSchema
70556
+ relate_assets_by_asset_id_request: RelateAssetsByAssetIdRequest$zodSchema.describe(`The asset IDs to relate.`)
69887
70557
  };
69888
70558
  tool$assetRelationsCreateAssetRelationsByAssetId = {
69889
70559
  name: "create-asset-relations",
69890
70560
  description: `Add related assets by asset ID
69891
70561
 
69892
- Relates an asset to other assets by their asset IDs, an immutable identifier, regardless of public ID, display name, asset folder, resource type or deliver type. This is a bidirectional process, meaning that the asset will also be added as a related_asset to all the other assets specified. The relation is also a one to many relationship, where the asset is related to all the assets specified, but those assets aren't also related to each other.`,
70562
+ Relates an asset to other assets by their asset IDs, an immutable identifier, regardless of public ID, display name, asset folder, resource type or delivery type. This is a bidirectional process, meaning that the asset will also be added as a related_asset to all the other assets specified. The relation is also a one to many relationship, where the asset is related to all the assets specified, but those assets aren't also related to each other.`,
69893
70563
  scopes: ["librarian"],
69894
70564
  annotations: {
69895
70565
  title: "Create Asset Relations",
@@ -69900,7 +70570,7 @@ Relates an asset to other assets by their asset IDs, an immutable identifier, re
69900
70570
  },
69901
70571
  args,
69902
70572
  tool: async (client, args2, ctx) => {
69903
- const [result] = await assetRelationsCreateAssetRelationsByAssetId(client, args2.asset_id, args2.RequestBody, { fetchOptions: { signal: ctx.signal } }).$inspect();
70573
+ const [result] = await assetRelationsCreateAssetRelationsByAssetId(client, args2.asset_id, args2.relate_assets_by_asset_id_request, { fetchOptions: { signal: ctx.signal } }).$inspect();
69904
70574
  if (!result.ok) {
69905
70575
  return {
69906
70576
  content: [{ type: "text", text: result.error.message }],
@@ -69923,21 +70593,28 @@ var init_assetrelationsdeleteresponse = __esm(() => {
69923
70593
  });
69924
70594
  });
69925
70595
 
70596
+ // src/models/unrelateassetsbyassetidrequest.ts
70597
+ var UnrelateAssetsByAssetIdRequest$zodSchema;
70598
+ var init_unrelateassetsbyassetidrequest = __esm(() => {
70599
+ init_zod();
70600
+ UnrelateAssetsByAssetIdRequest$zodSchema = object({
70601
+ assets_to_unrelate: array(string2()).describe("Unrelates the asset from all the assets specified in this array of assets, specified by their asset IDs.")
70602
+ }).describe("The asset unrelation request.");
70603
+ });
70604
+
69926
70605
  // src/models/deleteassetrelationsbyassetidop.ts
69927
- var DeleteAssetRelationsByAssetIdGlobals$zodSchema, DeleteAssetRelationsByAssetIdRequestBody$zodSchema, DeleteAssetRelationsByAssetIdRequest$zodSchema, DeleteAssetRelationsByAssetIdResponse$zodSchema;
70606
+ var DeleteAssetRelationsByAssetIdGlobals$zodSchema, DeleteAssetRelationsByAssetIdRequest$zodSchema, DeleteAssetRelationsByAssetIdResponse$zodSchema;
69928
70607
  var init_deleteassetrelationsbyassetidop = __esm(() => {
69929
70608
  init_zod();
69930
70609
  init_apierror();
69931
70610
  init_assetrelationsdeleteresponse();
70611
+ init_unrelateassetsbyassetidrequest();
69932
70612
  DeleteAssetRelationsByAssetIdGlobals$zodSchema = object({
69933
70613
  cloud_name: string2().describe("The cloud name of your product environment.").optional()
69934
70614
  });
69935
- DeleteAssetRelationsByAssetIdRequestBody$zodSchema = object({
69936
- assets_to_unrelate: array(string2()).describe("Unrelates the asset from all the assets specified in this array of assets, specified by their asset IDs.")
69937
- });
69938
70615
  DeleteAssetRelationsByAssetIdRequest$zodSchema = object({
69939
- RequestBody: lazy(() => DeleteAssetRelationsByAssetIdRequestBody$zodSchema),
69940
- asset_id: string2().describe("The asset ID of the resource. Must be a 32-character hexadecimal string.")
70616
+ asset_id: string2().describe("The asset ID of the resource. Must be a 32-character hexadecimal string."),
70617
+ unrelate_assets_by_asset_id_request: UnrelateAssetsByAssetIdRequest$zodSchema.describe("The asset IDs to unrelate.")
69941
70618
  });
69942
70619
  DeleteAssetRelationsByAssetIdResponse$zodSchema = union([
69943
70620
  ApiError$zodSchema,
@@ -69946,20 +70623,20 @@ var init_deleteassetrelationsbyassetidop = __esm(() => {
69946
70623
  });
69947
70624
 
69948
70625
  // src/funcs/assetRelationsDeleteAssetRelationsByAssetId.ts
69949
- function assetRelationsDeleteAssetRelationsByAssetId(client$, asset_id, RequestBody, options) {
69950
- return new APIPromise($do3(client$, asset_id, RequestBody, options));
70626
+ function assetRelationsDeleteAssetRelationsByAssetId(client$, asset_id, unrelate_assets_by_asset_id_request, options) {
70627
+ return new APIPromise($do3(client$, asset_id, unrelate_assets_by_asset_id_request, options));
69951
70628
  }
69952
- async function $do3(client$, asset_id, RequestBody, options) {
70629
+ async function $do3(client$, asset_id, unrelate_assets_by_asset_id_request, options) {
69953
70630
  const input$ = {
69954
70631
  asset_id,
69955
- RequestBody
70632
+ unrelate_assets_by_asset_id_request
69956
70633
  };
69957
70634
  const parsed$ = safeParse4(input$, (value$) => DeleteAssetRelationsByAssetIdRequest$zodSchema.parse(value$), "Input validation failed");
69958
70635
  if (!parsed$.ok) {
69959
70636
  return [parsed$, { status: "invalid" }];
69960
70637
  }
69961
70638
  const payload$ = parsed$.value;
69962
- const body$ = encodeJSON("body", payload$.RequestBody, { explode: true });
70639
+ const body$ = encodeJSON("body", payload$.unrelate_assets_by_asset_id_request, { explode: true });
69963
70640
  const pathParams$ = {
69964
70641
  asset_id: encodeSimple("asset_id", payload$.asset_id, {
69965
70642
  explode: false,
@@ -70037,17 +70714,17 @@ var args2, tool$assetRelationsDeleteAssetRelationsByAssetId;
70037
70714
  var init_assetRelationsDeleteAssetRelationsByAssetId2 = __esm(() => {
70038
70715
  init_zod();
70039
70716
  init_assetRelationsDeleteAssetRelationsByAssetId();
70040
- init_deleteassetrelationsbyassetidop();
70717
+ init_unrelateassetsbyassetidrequest();
70041
70718
  init_tools();
70042
70719
  args2 = {
70043
70720
  asset_id: string2().describe("The asset ID of the resource. Must be a 32-character hexadecimal string."),
70044
- RequestBody: DeleteAssetRelationsByAssetIdRequestBody$zodSchema
70721
+ unrelate_assets_by_asset_id_request: UnrelateAssetsByAssetIdRequest$zodSchema.describe(`The asset IDs to unrelate.`)
70045
70722
  };
70046
70723
  tool$assetRelationsDeleteAssetRelationsByAssetId = {
70047
70724
  name: "delete-asset-relations",
70048
70725
  description: `Delete asset relations by asset ID
70049
70726
 
70050
- Unrelates the asset from other assets, specified by their asset IDs, an immutable identifier, regardless of public ID, display name, asset folder, resource type or deliver type. This is a bidirectional process, meaning that the asset will also be removed as a related_asset from all the other assets specified.`,
70727
+ Unrelates the asset from other assets, specified by their asset IDs, an immutable identifier, regardless of public ID, display name, asset folder, resource type or delivery type. This is a bidirectional process, meaning that the asset will also be removed as a related_asset from all the other assets specified.`,
70051
70728
  scopes: ["librarian"],
70052
70729
  annotations: {
70053
70730
  title: "Delete Asset Relations",
@@ -70058,7 +70735,7 @@ Unrelates the asset from other assets, specified by their asset IDs, an immutabl
70058
70735
  },
70059
70736
  args: args2,
70060
70737
  tool: async (client, args3, ctx) => {
70061
- const [result] = await assetRelationsDeleteAssetRelationsByAssetId(client, args3.asset_id, args3.RequestBody, { fetchOptions: { signal: ctx.signal } }).$inspect();
70738
+ const [result] = await assetRelationsDeleteAssetRelationsByAssetId(client, args3.asset_id, args3.unrelate_assets_by_asset_id_request, { fetchOptions: { signal: ctx.signal } }).$inspect();
70062
70739
  if (!result.ok) {
70063
70740
  return {
70064
70741
  content: [{ type: "text", text: result.error.message }],
@@ -70166,7 +70843,7 @@ var init_assetsDerivedDestroy2 = __esm(() => {
70166
70843
  init_deriveddestroyrequest();
70167
70844
  init_tools();
70168
70845
  args3 = {
70169
- request: DerivedDestroyRequest$zodSchema
70846
+ request: DerivedDestroyRequest$zodSchema.describe(`The derived resource IDs to delete.`)
70170
70847
  };
70171
70848
  tool$assetsDerivedDestroy = {
70172
70849
  name: "delete-derived-assets",
@@ -70195,19 +70872,15 @@ Deletes derived resources by derived resource ID`,
70195
70872
  };
70196
70873
  });
70197
70874
 
70198
- // src/models/destroyrequest.ts
70199
- var DestroyRequest$zodSchema;
70200
- var init_destroyrequest = __esm(() => {
70875
+ // src/models/componentsdestroyrequest.ts
70876
+ var ComponentsDestroyRequest$zodSchema;
70877
+ var init_componentsdestroyrequest = __esm(() => {
70201
70878
  init_zod();
70202
- DestroyRequest$zodSchema = object({
70203
- api_key: string2().optional().describe("The API key to use for the request. This is automatically computed by the Cloudinary's SDKs."),
70204
- asset_id: string2().describe("The ID of the asset to delete."),
70879
+ ComponentsDestroyRequest$zodSchema = object({
70880
+ asset_id: string2().describe("A 32-character hexadecimal asset ID."),
70205
70881
  callback: string2().optional().describe("URL for redirect after operation completion."),
70206
70882
  invalidate: boolean2().optional().describe("Whether to invalidate CDN cache. Default is false."),
70207
- notification_url: string2().optional().describe("URL to receive completion notification."),
70208
- signature: string2().optional().describe(`(Required for signed REST API calls) Used to authenticate the request and based on the parameters you use in the request. When using the Cloudinary SDKs for signed requests, the signature is automatically generated and added to the request. If you manually generate your own signed POST request, you need to manually generate the signature parameter and add it to the request together with the api_key and timestamp parameters.
70209
- `),
70210
- timestamp: int().optional().describe("The timestamp to use for the request in unix time. This is automatically computed by the Cloudinary's SDKs.")
70883
+ notification_url: string2().optional().describe("URL to receive completion notification.")
70211
70884
  });
70212
70885
  });
70213
70886
 
@@ -70216,7 +70889,7 @@ function assetsDestroyByAssetId(client$, request, options) {
70216
70889
  return new APIPromise($do5(client$, request, options));
70217
70890
  }
70218
70891
  async function $do5(client$, request, options) {
70219
- const parsed$ = safeParse4(request, (value$) => DestroyRequest$zodSchema.parse(value$), "Input validation failed");
70892
+ const parsed$ = safeParse4(request, (value$) => ComponentsDestroyRequest$zodSchema.parse(value$), "Input validation failed");
70220
70893
  if (!parsed$.ok) {
70221
70894
  return [parsed$, { status: "invalid" }];
70222
70895
  }
@@ -70286,7 +70959,7 @@ var init_assetsDestroyByAssetId = __esm(() => {
70286
70959
  init_schemas4();
70287
70960
  init_security();
70288
70961
  init_url();
70289
- init_destroyrequest();
70962
+ init_componentsdestroyrequest();
70290
70963
  init_async();
70291
70964
  });
70292
70965
 
@@ -70294,17 +70967,16 @@ var init_assetsDestroyByAssetId = __esm(() => {
70294
70967
  var args4, tool$assetsDestroyByAssetId;
70295
70968
  var init_assetsDestroyByAssetId2 = __esm(() => {
70296
70969
  init_assetsDestroyByAssetId();
70297
- init_destroyrequest();
70970
+ init_componentsdestroyrequest();
70298
70971
  init_tools();
70299
70972
  args4 = {
70300
- request: DestroyRequest$zodSchema
70973
+ request: ComponentsDestroyRequest$zodSchema.describe(`The asset to delete and related options.`)
70301
70974
  };
70302
70975
  tool$assetsDestroyByAssetId = {
70303
70976
  name: "delete-asset",
70304
- description: `Delete asset by asset-id
70977
+ description: `Delete asset by asset ID
70305
70978
 
70306
- Deletes an asset using its asset ID. This endpoint replaces the legacy /resources/by_asset_id endpoint.
70307
- Returns the deletion status and asset folder information when folder decoupling is enabled.
70979
+ Deletes an asset using its immutable asset ID.
70308
70980
  `,
70309
70981
  scopes: ["admin"],
70310
70982
  annotations: {
@@ -70329,63 +71001,35 @@ Returns the deletion status and asset folder information when folder decoupling
70329
71001
  });
70330
71002
 
70331
71003
  // src/models/downloadbackupassetop.ts
70332
- var DownloadBackupAssetGlobals$zodSchema, DownloadBackupAssetRequest$zodSchema, NotFoundError$zodSchema, DownloadBackupAssetNotFoundResponseBody$zodSchema, DownloadBackupAssetUnauthorizedError$zodSchema, DownloadBackupAssetUnauthorizedResponseBody$zodSchema, BadRequestError$zodSchema, DownloadBackupAssetBadRequestResponseBody$zodSchema, DownloadBackupAssetResponse$zodSchema;
71004
+ var DownloadBackupAssetGlobals$zodSchema, DownloadBackupAssetRequest$zodSchema, DownloadBackupAssetResponse$zodSchema;
70333
71005
  var init_downloadbackupassetop = __esm(() => {
70334
71006
  init_zod();
70335
71007
  init_base64();
71008
+ init_apierror();
70336
71009
  DownloadBackupAssetGlobals$zodSchema = object({
70337
71010
  cloud_name: string2().describe("The cloud name of your product environment.").optional()
70338
71011
  });
70339
71012
  DownloadBackupAssetRequest$zodSchema = object({
70340
- api_key: string2().describe("The API key to use for the request. This is automatically computed by the Cloudinary's SDKs.").optional(),
70341
71013
  asset_id: string2().describe("The asset ID of the resource. Must be a 32-character hexadecimal string."),
70342
- signature: string2().describe(`(Required for signed REST API calls) Used to authenticate the request and based on the parameters you use in the request. When using the Cloudinary SDKs for signed requests, the signature is automatically generated and added to the request. If you manually generate your own signed POST request, you need to manually generate the signature parameter and add it to the request together with the api_key and timestamp parameters.
70343
- `).optional(),
70344
- timestamp: int().describe("The timestamp to use for the request in unix time. This is automatically computed by the Cloudinary's SDKs.").optional(),
70345
71014
  version_id: string2().describe("The version ID of the backup to download. Must be a 32-character hexadecimal string.")
70346
71015
  });
70347
- NotFoundError$zodSchema = object({
70348
- message: string2().optional().describe("Specified version does not exist")
70349
- });
70350
- DownloadBackupAssetNotFoundResponseBody$zodSchema = object({
70351
- error: lazy(() => NotFoundError$zodSchema).optional()
70352
- }).describe("Version not found");
70353
- DownloadBackupAssetUnauthorizedError$zodSchema = object({
70354
- http_code: int().optional().describe("The HTTP status code."),
70355
- message: string2().optional().describe("Invalid Signature or timestamp expired.")
70356
- });
70357
- DownloadBackupAssetUnauthorizedResponseBody$zodSchema = object({
70358
- error: lazy(() => DownloadBackupAssetUnauthorizedError$zodSchema).optional()
70359
- }).describe("Authentication failed");
70360
- BadRequestError$zodSchema = object({
70361
- http_code: int().optional().describe("The HTTP status code."),
70362
- message: string2().optional().describe("A problem with one of the parameters or timestamp.")
70363
- });
70364
- DownloadBackupAssetBadRequestResponseBody$zodSchema = object({
70365
- error: lazy(() => BadRequestError$zodSchema).optional()
70366
- }).describe("Bad request");
70367
71016
  DownloadBackupAssetResponse$zodSchema = union([
71017
+ ApiError$zodSchema,
70368
71018
  string2().describe("Base64-encoded binary content").transform(bytesFromBase64),
70369
71019
  string2().describe("Base64-encoded binary content").transform(bytesFromBase64),
70370
71020
  string2().describe("Base64-encoded binary content").transform(bytesFromBase64),
70371
- string2().describe("Base64-encoded binary content").transform(bytesFromBase64),
70372
- lazy(() => DownloadBackupAssetBadRequestResponseBody$zodSchema),
70373
- lazy(() => DownloadBackupAssetUnauthorizedResponseBody$zodSchema),
70374
- lazy(() => DownloadBackupAssetNotFoundResponseBody$zodSchema)
71021
+ string2().describe("Base64-encoded binary content").transform(bytesFromBase64)
70375
71022
  ]);
70376
71023
  });
70377
71024
 
70378
71025
  // src/funcs/assetsDownloadBackupAsset.ts
70379
- function assetsDownloadBackupAsset(client$, asset_id, version_id, api_key, signature, timestamp, options) {
70380
- return new APIPromise($do6(client$, asset_id, version_id, api_key, signature, timestamp, options));
71026
+ function assetsDownloadBackupAsset(client$, asset_id, version_id, options) {
71027
+ return new APIPromise($do6(client$, asset_id, version_id, options));
70381
71028
  }
70382
- async function $do6(client$, asset_id, version_id, api_key, signature, timestamp, options) {
71029
+ async function $do6(client$, asset_id, version_id, options) {
70383
71030
  const input$ = {
70384
71031
  asset_id,
70385
- version_id,
70386
- api_key,
70387
- signature,
70388
- timestamp
71032
+ version_id
70389
71033
  };
70390
71034
  const parsed$ = safeParse4(input$, (value$) => DownloadBackupAssetRequest$zodSchema.parse(value$), "Input validation failed");
70391
71035
  if (!parsed$.ok) {
@@ -70401,10 +71045,7 @@ async function $do6(client$, asset_id, version_id, api_key, signature, timestamp
70401
71045
  };
70402
71046
  const path$ = pathToFunc("/v1_1/{cloud_name}/download_backup")(pathParams$);
70403
71047
  const query$ = encodeFormQuery({
70404
- api_key: payload$.api_key,
70405
71048
  asset_id: payload$.asset_id,
70406
- signature: payload$.signature,
70407
- timestamp: payload$.timestamp,
70408
71049
  version_id: payload$.version_id
70409
71050
  });
70410
71051
  const headers$ = new Headers(compactMap({
@@ -70476,11 +71117,7 @@ var init_assetsDownloadBackupAsset2 = __esm(() => {
70476
71117
  init_tools();
70477
71118
  args5 = {
70478
71119
  asset_id: string2().describe("The asset ID of the resource. Must be a 32-character hexadecimal string."),
70479
- version_id: string2().describe("The version ID of the backup to download. Must be a 32-character hexadecimal string."),
70480
- api_key: string2().describe("The API key to use for the request. This is automatically computed by the Cloudinary's SDKs.").optional(),
70481
- signature: string2().describe(`(Required for signed REST API calls) Used to authenticate the request and based on the parameters you use in the request. When using the Cloudinary SDKs for signed requests, the signature is automatically generated and added to the request. If you manually generate your own signed POST request, you need to manually generate the signature parameter and add it to the request together with the api_key and timestamp parameters.
70482
- `).optional(),
70483
- timestamp: int().describe("The timestamp to use for the request in unix time. This is automatically computed by the Cloudinary's SDKs.").optional()
71120
+ version_id: string2().describe("The version ID of the backup to download. Must be a 32-character hexadecimal string.")
70484
71121
  };
70485
71122
  tool$assetsDownloadBackupAsset = {
70486
71123
  name: "download-asset-backup",
@@ -70488,13 +71125,13 @@ var init_assetsDownloadBackupAsset2 = __esm(() => {
70488
71125
  annotations: {
70489
71126
  title: "Download Asset Backup",
70490
71127
  destructiveHint: false,
70491
- idempotentHint: false,
71128
+ idempotentHint: true,
70492
71129
  openWorldHint: false,
70493
71130
  readOnlyHint: true
70494
71131
  },
70495
71132
  args: args5,
70496
71133
  tool: async (client, args6, ctx) => {
70497
- const [result] = await assetsDownloadBackupAsset(client, args6.asset_id, args6.version_id, args6.api_key, args6.signature, args6.timestamp, { fetchOptions: { signal: ctx.signal } }).$inspect();
71134
+ const [result] = await assetsDownloadBackupAsset(client, args6.asset_id, args6.version_id, { fetchOptions: { signal: ctx.signal } }).$inspect();
70498
71135
  if (!result.ok) {
70499
71136
  return {
70500
71137
  content: [{ type: "text", text: result.error.message }],
@@ -70518,82 +71155,105 @@ var init_archiveresourcetype = __esm(() => {
70518
71155
  ]).describe('The type of resources to include in the archive. "image" for images, "video" for videos, "raw" for non-media files, or "all" for mixed types.');
70519
71156
  });
70520
71157
 
71158
+ // src/models/generatearchiveresponse.ts
71159
+ var GenerateArchiveResponse$zodSchema;
71160
+ var init_generatearchiveresponse = __esm(() => {
71161
+ init_zod();
71162
+ GenerateArchiveResponse$zodSchema = object({
71163
+ asset_folder: string2().optional().describe("The folder in your product environment where the archive is stored."),
71164
+ asset_id: string2().optional().describe("A 32-character hexadecimal asset ID."),
71165
+ bytes: int().optional().describe("The size of the generated archive in bytes."),
71166
+ created_at: exports_iso.datetime({ offset: true }).optional().describe("The timestamp when the archive was generated."),
71167
+ display_name: string2().optional().describe("The display name of the generated archive."),
71168
+ empty_prefixes: array(string2()).optional().describe("The list of prefixes that were requested but returned no results."),
71169
+ empty_tags: array(string2()).optional().describe("The list of tags that were requested but returned no results."),
71170
+ etag: string2().optional().describe("The ETag of the generated archive."),
71171
+ file_count: int().optional().describe("The total number of files in the archive."),
71172
+ folder: string2().optional().describe("The folder where the archive is stored (only for product environments with Dynamic Folders disabled)."),
71173
+ missing_public_ids: array(string2()).optional().describe("The list of public IDs that were requested but not found."),
71174
+ placeholder: boolean2().optional().describe("Whether the generated archive is a placeholder."),
71175
+ public_id: string2().optional().describe("The public ID of the generated archive."),
71176
+ resource_count: int().optional().describe("The number of unique resources included in the archive."),
71177
+ resource_type: string2().optional().describe('The type of resource. Always "raw" for generated archives.'),
71178
+ secure_url: string2().optional().describe("The HTTPS URL for downloading the generated archive."),
71179
+ signature: string2().optional().describe("The API signature for the generated archive."),
71180
+ tags: array(string2()).nullable().optional().describe("Tag names assigned to the asset."),
71181
+ type: string2().optional().describe("The resource type of the generated archive."),
71182
+ url: string2().optional().describe("The HTTP URL for downloading the generated archive."),
71183
+ version: int().optional().describe("The version number of the generated archive."),
71184
+ version_id: string2().optional().describe("Hexadecimal version ID; length is a positive multiple of 32 (typically 32 or 64).")
71185
+ });
71186
+ });
71187
+
70521
71188
  // src/models/generatearchiveop.ts
70522
- var GenerateArchiveGlobals$zodSchema, Mode$zodSchema, TargetFormat$zodSchema, GenerateArchiveRequestBody$zodSchema, GenerateArchiveRequest$zodSchema, GenerateArchiveResponseBody$zodSchema, GenerateArchiveResponse$zodSchema;
71189
+ var GenerateArchiveGlobals$zodSchema, Mode$zodSchema, TargetFormat$zodSchema, AssetFolders$zodSchema, GenerateArchiveRequestBody$zodSchema, GenerateArchiveRequest$zodSchema, GenerateArchiveResponseResponse$zodSchema;
70523
71190
  var init_generatearchiveop = __esm(() => {
70524
71191
  init_zod();
70525
71192
  init_base64();
70526
71193
  init_apierror();
70527
71194
  init_archiveresourcetype();
70528
- init_archivestoragetype();
71195
+ init_deliverytypeall();
71196
+ init_generatearchiveresponse();
70529
71197
  GenerateArchiveGlobals$zodSchema = object({
70530
71198
  cloud_name: string2().describe("The cloud name of your product environment.").optional()
70531
71199
  });
70532
71200
  Mode$zodSchema = _enum2([
70533
- "create"
70534
- ]).describe(`The method for generating and delivering the archive. Only "create" is supported:
71201
+ "download",
71202
+ "create",
71203
+ "create_and_download"
71204
+ ]).describe(`The method for generating and delivering the archive. Options:
71205
+ download - Generates and delivers the archive file without storing it
70535
71206
  create - Creates and stores the archive as a raw asset, returning URLs in the response
71207
+ create_and_download - Creates, stores, and delivers the archive file
70536
71208
  `);
70537
71209
  TargetFormat$zodSchema = _enum2([
70538
71210
  "zip",
70539
71211
  "tgz"
70540
71212
  ]).describe("The format of the generated archive.");
71213
+ AssetFolders$zodSchema = union([
71214
+ array(string2()),
71215
+ string2()
71216
+ ]).describe("A list of asset folder paths to include in the archive, or a single folder path string. Only available when asset folders are enabled for your account.");
70541
71217
  GenerateArchiveRequestBody$zodSchema = object({
70542
71218
  allow_missing: boolean2().default(false).describe("Whether to allow missing assets in the archive. If false, the operation will fail if any asset is not found."),
70543
- api_key: string2().optional().describe("The API key to use for the request. This is automatically computed by the Cloudinary's SDKs."),
71219
+ asset_folders: union([
71220
+ array(string2()),
71221
+ string2()
71222
+ ]).optional().describe("A list of asset folder paths to include in the archive, or a single folder path string. Only available when asset folders are enabled for your account."),
70544
71223
  async: boolean2().default(false).describe('("create" mode only), specifies whether to generate the archive asynchronously.'),
70545
71224
  expires_at: int().optional().describe('("download" mode only) Unix timestamp indicating when the generated archive URL should expire.'),
70546
71225
  flatten_folders: boolean2().default(false).describe("Whether to flatten all files to be in the root of the archive file."),
70547
71226
  flatten_transformations: boolean2().default(false).describe("Whether to flatten the folder structure of the derived assets."),
71227
+ fully_qualified_public_ids: array(string2()).optional().describe("A list of fully qualified public IDs (resource_type/type/public_id) to include in the archive."),
70548
71228
  keep_derived: boolean2().default(false).describe("Whether to keep the derived assets used for generating the archive."),
70549
- mode: Mode$zodSchema.default("create").describe(`The method for generating and delivering the archive. Only "create" is supported:
71229
+ mode: Mode$zodSchema.default("create").describe(`The method for generating and delivering the archive. Options:
71230
+ download - Generates and delivers the archive file without storing it
70550
71231
  create - Creates and stores the archive as a raw asset, returning URLs in the response
71232
+ create_and_download - Creates, stores, and delivers the archive file
70551
71233
  `),
70552
71234
  notification_url: string2().optional().describe('("create" mode only), specifies the URL to notify when the archive generation is complete.'),
70553
- prefixes: array(string2()).optional().describe("Select all assets where the public ID starts with this prefix. Up to 20 prefixes are supported."),
70554
- public_ids: array(string2()).optional().describe("The list of public IDs to include in the archive. Up to 1000 public IDs are supported."),
70555
- signature: string2().optional().describe(`(Required for signed REST API calls) Used to authenticate the request and based on the parameters you use in the request. When using the Cloudinary SDKs for signed requests, the signature is automatically generated and added to the request. If you manually generate your own signed POST request, you need to manually generate the signature parameter and add it to the request together with the api_key and timestamp parameters.
70556
- `),
71235
+ prefixes: array(string2()).optional().describe("Select all assets where the public ID starts with this prefix."),
71236
+ public_ids: array(string2()).optional().describe("The list of public IDs to include in the archive."),
71237
+ search_expression: string2().optional().describe("A search expression to select assets to include in the archive."),
70557
71238
  skip_transformation_name: boolean2().default(false).describe("Whether to skip adding the transformation details to the file names in the archive."),
70558
- tags: array(string2()).optional().describe("A tag to use for selecting assets to include in the archive. Up to 20 tags are supported."),
71239
+ tags: array(string2()).optional().describe("Tags to filter which assets to include in the archive. Assets matching any of the specified tags are included."),
70559
71240
  target_asset_folder: string2().optional().describe("The folder in your product environment where the generated archive should be stored."),
71241
+ target_filename: string2().optional().describe("The filename for the downloaded archive file. Extension must match target_format (zip or tgz)."),
70560
71242
  target_format: TargetFormat$zodSchema.default("zip").describe("The format of the generated archive."),
70561
71243
  target_public_id: string2().optional().describe("The public ID to assign to the generated archive, or the filename of the downloaded archive file."),
70562
71244
  target_tags: array(string2()).optional().describe("A list of tag names to assign to the generated archive."),
70563
- timestamp: int().optional().describe("The timestamp to use for the request in unix time. This is automatically computed by the Cloudinary's SDKs."),
70564
71245
  transformations: string2().optional().describe('The transformations to apply to the assets before including them in the archive (separated by "|").'),
70565
- type: ArchiveStorageType$zodSchema.optional().describe("The storage type of resources to include in the archive."),
71246
+ type: DeliveryTypeAll$zodSchema.optional().describe("All supported delivery types."),
70566
71247
  use_original_filename: boolean2().default(false).describe("Whether to use the original filenames of the assets in the archive instead of public IDs (when available).")
70567
- });
71248
+ }).describe("The archive generation parameters.");
70568
71249
  GenerateArchiveRequest$zodSchema = object({
70569
- RequestBody: lazy(() => GenerateArchiveRequestBody$zodSchema),
70570
- resource_type: ArchiveResourceType$zodSchema.describe('The type of resources to include in the archive. "image" for images, "video" for videos, "raw" for non-media files, or "all" for mixed types.')
71250
+ RequestBody: lazy(() => GenerateArchiveRequestBody$zodSchema).describe("The archive generation parameters."),
71251
+ resource_type: ArchiveResourceType$zodSchema.describe("The type of resource for archive generation (image, video, or raw).")
70571
71252
  });
70572
- GenerateArchiveResponseBody$zodSchema = object({
70573
- asset_folder: string2().optional().describe("The folder in your product environment where the archive is stored."),
70574
- asset_id: string2().optional().describe("The unique identifier of the generated archive in the Cloudinary system."),
70575
- bytes: int().optional().describe("The size of the generated archive in bytes."),
70576
- created_at: exports_iso.datetime({ offset: true }).optional().describe("The timestamp when the archive was generated."),
70577
- display_name: string2().optional().describe("The display name of the generated archive."),
70578
- empty_prefixes: array(string2()).optional().describe("The list of prefixes that were requested but returned no results."),
70579
- empty_tags: array(string2()).optional().describe("The list of tags that were requested but returned no results."),
70580
- file_count: int().optional().describe("The total number of files in the archive."),
70581
- folder: string2().optional().describe("The folder where the archive is stored (only for product environments with Dynamic Folders disabled)"),
70582
- missing_public_ids: array(string2()).optional().describe("The list of public IDs that were requested but not found."),
70583
- public_id: string2().optional().describe("The public ID of the generated archive."),
70584
- resource_count: int().optional().describe("The number of unique resources included in the archive."),
70585
- resource_type: string2().optional().describe('The type of resource. Always "raw" for generated archives.'),
70586
- secure_url: string2().optional().describe("The HTTPS URL for downloading the generated archive."),
70587
- tags: array(string2()).optional().describe("The tags assigned to the generated archive."),
70588
- type: string2().optional().describe("The resource type of the generated archive."),
70589
- url: string2().optional().describe("The HTTP URL for downloading the generated archive."),
70590
- version: int().optional().describe("The version number of the generated archive."),
70591
- version_id: string2().optional().describe("The unique identifier of this version of the generated archive.")
70592
- }).describe("Archive successfully generated or downloaded");
70593
- GenerateArchiveResponse$zodSchema = union([
71253
+ GenerateArchiveResponseResponse$zodSchema = union([
70594
71254
  ApiError$zodSchema,
70595
71255
  string2().describe("Base64-encoded binary content").transform(bytesFromBase64),
70596
- lazy(() => GenerateArchiveResponseBody$zodSchema)
71256
+ GenerateArchiveResponse$zodSchema
70597
71257
  ]);
70598
71258
  });
70599
71259
 
@@ -70692,8 +71352,8 @@ var init_assetsGenerateArchive2 = __esm(() => {
70692
71352
  init_generatearchiveop();
70693
71353
  init_tools();
70694
71354
  args6 = {
70695
- resource_type: ArchiveResourceType$zodSchema.describe(`The type of resources to include in the archive. "image" for images, "video" for videos, "raw" for non-media files, or "all" for mixed types.`),
70696
- RequestBody: GenerateArchiveRequestBody$zodSchema
71355
+ resource_type: ArchiveResourceType$zodSchema.describe(`The type of resource for archive generation (image, video, or raw).`),
71356
+ RequestBody: GenerateArchiveRequestBody$zodSchema.describe(`The archive generation parameters.`)
70697
71357
  };
70698
71358
  tool$assetsGenerateArchive = {
70699
71359
  name: "generate-archive",
@@ -70867,7 +71527,6 @@ var init_assetsGetResourceByAssetId2 = __esm(() => {
70867
71527
  init_zod();
70868
71528
  init_assetsGetResourceByAssetId();
70869
71529
  init_tools();
70870
- init_asset_details_widget();
70871
71530
  args7 = {
70872
71531
  asset_id: string2().describe("The asset ID of the resource. Must be a 32-character hexadecimal string."),
70873
71532
  colors: boolean2().default(false).describe("Whether to include color information (predominant colors and histogram of 32 leading colors). Default: false."),
@@ -70896,7 +71555,7 @@ Returns the details of a single resource specified by its asset ID.`,
70896
71555
  readOnlyHint: true
70897
71556
  },
70898
71557
  _meta: {
70899
- ui: { resourceUri: ASSET_DETAILS_RESOURCE_URI }
71558
+ ui: { resourceUri: appUri("asset-details", "get-asset-details") }
70900
71559
  },
70901
71560
  args: args7,
70902
71561
  tool: async (client, args8, ctx) => {
@@ -70912,47 +71571,58 @@ Returns the details of a single resource specified by its asset ID.`,
70912
71571
  };
70913
71572
  });
70914
71573
 
70915
- // src/models/direction.ts
70916
- var Direction$zodSchema;
70917
- var init_direction = __esm(() => {
71574
+ // src/models/directionenum.ts
71575
+ var DirectionEnum$zodSchema;
71576
+ var init_directionenum = __esm(() => {
70918
71577
  init_zod();
70919
- Direction$zodSchema = _enum2([
71578
+ DirectionEnum$zodSchema = _enum2([
70920
71579
  "asc",
70921
71580
  "desc"
70922
- ]);
71581
+ ]).describe("Sort direction.");
70923
71582
  });
70924
71583
 
70925
- // src/models/fieldsspec.ts
70926
- var FieldsSpec$zodSchema;
70927
- var init_fieldsspec = __esm(() => {
71584
+ // src/models/resourcefieldsenum.ts
71585
+ var ResourceFieldsEnum$zodSchema;
71586
+ var init_resourcefieldsenum = __esm(() => {
70928
71587
  init_zod();
70929
- FieldsSpec$zodSchema = _enum2([
71588
+ ResourceFieldsEnum$zodSchema = _enum2([
71589
+ "public_id",
71590
+ "asset_id",
70930
71591
  "asset_folder",
70931
71592
  "folder",
70932
- "filename",
71593
+ "display_name",
70933
71594
  "format",
70934
71595
  "version",
70935
- "version_id",
70936
- "signature",
70937
71596
  "resource_type",
71597
+ "type",
70938
71598
  "created_at",
70939
- "uploaded_at",
70940
71599
  "bytes",
70941
- "backup_bytes",
70942
71600
  "width",
70943
71601
  "height",
70944
- "aspect_ratio",
71602
+ "backup",
70945
71603
  "access_control",
70946
- "metadata",
70947
- "context",
70948
- "tags",
70949
- "pixels",
70950
- "custom",
70951
- "moderation",
71604
+ "access_mode",
70952
71605
  "url",
70953
71606
  "secure_url",
70954
- "status",
70955
- "etag"
71607
+ "tags",
71608
+ "context",
71609
+ "metadata",
71610
+ "moderation_kind",
71611
+ "moderation_status",
71612
+ "placeholder",
71613
+ "regions",
71614
+ "is_audio"
71615
+ ]).describe("Valid field names for selective resource responses.");
71616
+ });
71617
+
71618
+ // src/models/fields.ts
71619
+ var Fields$zodSchema;
71620
+ var init_fields = __esm(() => {
71621
+ init_zod();
71622
+ init_resourcefieldsenum();
71623
+ Fields$zodSchema = union([
71624
+ string2(),
71625
+ array(ResourceFieldsEnum$zodSchema)
70956
71626
  ]);
70957
71627
  });
70958
71628
 
@@ -70968,41 +71638,28 @@ var init_listresponse = __esm(() => {
70968
71638
  });
70969
71639
  });
70970
71640
 
70971
- // src/models/liststoragetype.ts
70972
- var ListStorageType$zodSchema;
70973
- var init_liststoragetype = __esm(() => {
70974
- init_zod();
70975
- ListStorageType$zodSchema = _enum2([
70976
- "upload",
70977
- "private",
70978
- "authenticated",
70979
- "fetch",
70980
- "list"
70981
- ]).describe("The delivery type for filtering resources in list operations.");
70982
- });
70983
-
70984
71641
  // src/models/listimagesop.ts
70985
71642
  var ListImagesGlobals$zodSchema, ListImagesRequest$zodSchema, ListImagesResponse$zodSchema;
70986
71643
  var init_listimagesop = __esm(() => {
70987
71644
  init_zod();
70988
71645
  init_apierror();
70989
- init_direction();
70990
- init_fieldsspec();
71646
+ init_deliverytypeall();
71647
+ init_directionenum();
71648
+ init_fields();
70991
71649
  init_listresponse();
70992
- init_liststoragetype();
70993
71650
  ListImagesGlobals$zodSchema = object({
70994
71651
  cloud_name: string2().describe("The cloud name of your product environment.").optional()
70995
71652
  });
70996
71653
  ListImagesRequest$zodSchema = object({
70997
- direction: Direction$zodSchema.optional().describe("Sort direction."),
70998
- fields: array(FieldsSpec$zodSchema).optional(),
71654
+ direction: DirectionEnum$zodSchema.optional().describe('The sort direction for the results. Default is "desc".'),
71655
+ fields: Fields$zodSchema.optional().describe("Additional fields to include in the response. The fields public_id and asset_id are always included."),
70999
71656
  max_results: int().describe("Maximum number of results to return (1-500).").optional(),
71000
71657
  next_cursor: string2().describe("Cursor for pagination.").optional(),
71001
- prefix: string2().describe("Find resources with a public ID prefix. Requires the `type` parameter.").optional(),
71658
+ prefix: string2().describe("A public_id prefix. When specified, all assets with that prefix are returned.").optional(),
71002
71659
  public_ids: array(string2()).describe("An array of public IDs to return.").optional(),
71003
- start_at: exports_iso.datetime({ offset: true }).describe("Retrieve resources uploaded after this timestamp.").optional(),
71004
- tags: boolean2().describe("Whether to include the list of tag names assigned to each asset. Default: false").optional(),
71005
- type: ListStorageType$zodSchema.optional().describe("The storage type of the assets. Necessary for prefix filtering.")
71660
+ start_at: exports_iso.datetime({ offset: true }).describe("An ISO-8601 formatted timestamp. When specified, returns resources created since that timestamp. Supported only if neither `prefix` nor `public_ids` were passed.").optional(),
71661
+ tags: boolean2().default(false).describe("Whether to include the list of tag names assigned to each asset. Default is false."),
71662
+ type: DeliveryTypeAll$zodSchema.optional().describe("The delivery type to filter by. When omitted, returns assets of all delivery types.")
71006
71663
  });
71007
71664
  ListImagesResponse$zodSchema = union([
71008
71665
  ApiError$zodSchema,
@@ -71117,27 +71774,26 @@ var args8, tool$assetsListImages;
71117
71774
  var init_assetsListImages2 = __esm(() => {
71118
71775
  init_zod();
71119
71776
  init_assetsListImages();
71120
- init_direction();
71121
- init_fieldsspec();
71122
- init_liststoragetype();
71123
- init_asset_gallery_widget();
71777
+ init_deliverytypeall();
71778
+ init_directionenum();
71779
+ init_fields();
71124
71780
  init_tools();
71125
71781
  args8 = {
71126
- type: ListStorageType$zodSchema.optional().describe(`The storage type of the assets. Necessary for prefix filtering.`),
71127
- prefix: string2().describe("Find resources with a public ID prefix. Requires the `type` parameter.").optional(),
71782
+ type: DeliveryTypeAll$zodSchema.optional().describe(`The delivery type to filter by. When omitted, returns assets of all delivery types.`),
71783
+ prefix: string2().describe("A public_id prefix. When specified, all assets with that prefix are returned.").optional(),
71128
71784
  public_ids: array(string2()).describe("An array of public IDs to return.").optional(),
71129
- tags: boolean2().describe("Whether to include the list of tag names assigned to each asset. Default: false").optional(),
71785
+ tags: boolean2().default(false).describe("Whether to include the list of tag names assigned to each asset. Default is false."),
71130
71786
  next_cursor: string2().describe("Cursor for pagination.").optional(),
71131
71787
  max_results: int().describe("Maximum number of results to return (1-500).").optional(),
71132
- direction: Direction$zodSchema.optional().describe(`Sort direction.`),
71133
- start_at: exports_iso.datetime({ offset: true }).describe("Retrieve resources uploaded after this timestamp.").optional(),
71134
- fields: array(FieldsSpec$zodSchema).optional()
71788
+ direction: DirectionEnum$zodSchema.optional().describe(`The sort direction for the results. Default is "desc".`),
71789
+ start_at: exports_iso.datetime({ offset: true }).describe("An ISO-8601 formatted timestamp. When specified, returns resources created since that timestamp. Supported only if neither `prefix` nor `public_ids` were passed.").optional(),
71790
+ fields: Fields$zodSchema.optional().describe(`Additional fields to include in the response. The fields public_id and asset_id are always included.`)
71135
71791
  };
71136
71792
  tool$assetsListImages = {
71137
71793
  name: "list-images",
71138
71794
  description: `Get image assets
71139
71795
 
71140
- Retrieves a list of image assets. Results can be filtered by various criteria like tags, moderation status, prefix, or specific public IDs.
71796
+ Retrieves a list of image assets. Results can be filtered by various criteria like tags, prefix, or specific public IDs.
71141
71797
  `,
71142
71798
  scopes: ["librarian"],
71143
71799
  annotations: {
@@ -71148,7 +71804,7 @@ Retrieves a list of image assets. Results can be filtered by various criteria li
71148
71804
  readOnlyHint: true
71149
71805
  },
71150
71806
  _meta: {
71151
- ui: { resourceUri: ASSET_GALLERY_RESOURCE_URI }
71807
+ ui: { resourceUri: appUri("asset-gallery", "list-images") }
71152
71808
  },
71153
71809
  args: args8,
71154
71810
  tool: async (client, args9, ctx) => {
@@ -71169,23 +71825,23 @@ var ListRawFilesGlobals$zodSchema, ListRawFilesRequest$zodSchema, ListRawFilesRe
71169
71825
  var init_listrawfilesop = __esm(() => {
71170
71826
  init_zod();
71171
71827
  init_apierror();
71172
- init_direction();
71173
- init_fieldsspec();
71828
+ init_deliverytypeall();
71829
+ init_directionenum();
71830
+ init_fields();
71174
71831
  init_listresponse();
71175
- init_liststoragetype();
71176
71832
  ListRawFilesGlobals$zodSchema = object({
71177
71833
  cloud_name: string2().describe("The cloud name of your product environment.").optional()
71178
71834
  });
71179
71835
  ListRawFilesRequest$zodSchema = object({
71180
- direction: Direction$zodSchema.optional().describe("Sort direction."),
71181
- fields: array(FieldsSpec$zodSchema).optional(),
71836
+ direction: DirectionEnum$zodSchema.optional().describe('The sort direction for the results. Default is "desc".'),
71837
+ fields: Fields$zodSchema.optional().describe("Additional fields to include in the response. The fields public_id and asset_id are always included."),
71182
71838
  max_results: int().describe("Maximum number of results to return (1-500).").optional(),
71183
71839
  next_cursor: string2().describe("Cursor for pagination.").optional(),
71184
- prefix: string2().describe("A public_id prefix. When specified, all assets with that prefix are returned. When using this, the `type` parameter must also be specified.").optional(),
71840
+ prefix: string2().describe("A public_id prefix. When specified, all assets with that prefix are returned.").optional(),
71185
71841
  public_ids: array(string2()).describe("An array of public IDs to return.").optional(),
71186
- start_at: exports_iso.datetime({ offset: true }).describe("An ISO-8601 formatted timestamp. When specified, assets created since that timestamp are returned. Supported only if neither `prefix` nor `public_ids` were passed.").optional(),
71187
- tags: boolean2().describe("Whether to include the list of tag names assigned to each asset. Default: false").optional(),
71188
- type: ListStorageType$zodSchema.optional().describe("The delivery type. Necessary for prefix filtering.")
71842
+ start_at: exports_iso.datetime({ offset: true }).describe("An ISO-8601 formatted timestamp. When specified, returns resources created since that timestamp. Supported only if neither `prefix` nor `public_ids` were passed.").optional(),
71843
+ tags: boolean2().default(false).describe("Whether to include the list of tag names assigned to each asset. Default is false."),
71844
+ type: DeliveryTypeAll$zodSchema.optional().describe("The delivery type to filter by. When omitted, returns assets of all delivery types.")
71189
71845
  });
71190
71846
  ListRawFilesResponse$zodSchema = union([
71191
71847
  ApiError$zodSchema,
@@ -71300,27 +71956,26 @@ var args9, tool$assetsListRawFiles;
71300
71956
  var init_assetsListRawFiles2 = __esm(() => {
71301
71957
  init_zod();
71302
71958
  init_assetsListRawFiles();
71303
- init_direction();
71304
- init_fieldsspec();
71305
- init_liststoragetype();
71959
+ init_deliverytypeall();
71960
+ init_directionenum();
71961
+ init_fields();
71306
71962
  init_tools();
71307
- init_asset_gallery_widget();
71308
71963
  args9 = {
71309
- type: ListStorageType$zodSchema.optional().describe(`The delivery type. Necessary for prefix filtering.`),
71310
- prefix: string2().describe("A public_id prefix. When specified, all assets with that prefix are returned. When using this, the `type` parameter must also be specified.").optional(),
71964
+ type: DeliveryTypeAll$zodSchema.optional().describe(`The delivery type to filter by. When omitted, returns assets of all delivery types.`),
71965
+ prefix: string2().describe("A public_id prefix. When specified, all assets with that prefix are returned.").optional(),
71311
71966
  public_ids: array(string2()).describe("An array of public IDs to return.").optional(),
71312
- tags: boolean2().describe("Whether to include the list of tag names assigned to each asset. Default: false").optional(),
71967
+ tags: boolean2().default(false).describe("Whether to include the list of tag names assigned to each asset. Default is false."),
71313
71968
  next_cursor: string2().describe("Cursor for pagination.").optional(),
71314
71969
  max_results: int().describe("Maximum number of results to return (1-500).").optional(),
71315
- direction: Direction$zodSchema.optional().describe(`Sort direction.`),
71316
- start_at: exports_iso.datetime({ offset: true }).describe("An ISO-8601 formatted timestamp. When specified, assets created since that timestamp are returned. Supported only if neither `prefix` nor `public_ids` were passed.").optional(),
71317
- fields: array(FieldsSpec$zodSchema).optional()
71970
+ direction: DirectionEnum$zodSchema.optional().describe(`The sort direction for the results. Default is "desc".`),
71971
+ start_at: exports_iso.datetime({ offset: true }).describe("An ISO-8601 formatted timestamp. When specified, returns resources created since that timestamp. Supported only if neither `prefix` nor `public_ids` were passed.").optional(),
71972
+ fields: Fields$zodSchema.optional().describe(`Additional fields to include in the response. The fields public_id and asset_id are always included.`)
71318
71973
  };
71319
71974
  tool$assetsListRawFiles = {
71320
71975
  name: "list-files",
71321
71976
  description: `Get raw assets
71322
71977
 
71323
- Retrieves a list of raw assets. Results can be filtered by various criteria like tags, moderation status, prefix, or specific public IDs.
71978
+ Retrieves a list of raw assets. Results can be filtered by various criteria like tags, prefix, or specific public IDs.
71324
71979
  `,
71325
71980
  scopes: ["librarian"],
71326
71981
  annotations: {
@@ -71331,7 +71986,7 @@ Retrieves a list of raw assets. Results can be filtered by various criteria like
71331
71986
  readOnlyHint: true
71332
71987
  },
71333
71988
  _meta: {
71334
- ui: { resourceUri: ASSET_GALLERY_RESOURCE_URI }
71989
+ ui: { resourceUri: appUri("asset-gallery", "list-files") }
71335
71990
  },
71336
71991
  args: args9,
71337
71992
  tool: async (client, args10, ctx) => {
@@ -71347,28 +72002,35 @@ Retrieves a list of raw assets. Results can be filtered by various criteria like
71347
72002
  };
71348
72003
  });
71349
72004
 
72005
+ // src/models/tagslistresponse.ts
72006
+ var TagsListResponse$zodSchema;
72007
+ var init_tagslistresponse = __esm(() => {
72008
+ init_zod();
72009
+ TagsListResponse$zodSchema = object({
72010
+ next_cursor: string2().nullable().optional(),
72011
+ tags: array(string2()).optional()
72012
+ });
72013
+ });
72014
+
71350
72015
  // src/models/listresourcetagsop.ts
71351
- var ListResourceTagsGlobals$zodSchema, ListResourceTagsRequest$zodSchema, ListResourceTagsResponseBody$zodSchema, ListResourceTagsResponse$zodSchema;
72016
+ var ListResourceTagsGlobals$zodSchema, ListResourceTagsRequest$zodSchema, ListResourceTagsResponse$zodSchema;
71352
72017
  var init_listresourcetagsop = __esm(() => {
71353
72018
  init_zod();
71354
72019
  init_apierror();
71355
72020
  init_resourcetype();
72021
+ init_tagslistresponse();
71356
72022
  ListResourceTagsGlobals$zodSchema = object({
71357
72023
  cloud_name: string2().describe("The cloud name of your product environment.").optional()
71358
72024
  });
71359
72025
  ListResourceTagsRequest$zodSchema = object({
71360
72026
  max_results: int().describe("Maximum number of results to return (1-500).").optional(),
71361
72027
  next_cursor: string2().describe("Cursor for pagination.").optional(),
71362
- prefix: string2().describe("The prefix to use if you want to limit the returned tags to those that start with the specified prefix.").optional(),
71363
- resource_type: ResourceType$zodSchema.describe("The type of resource.")
72028
+ prefix: string2().describe("Limit the returned tags to those that start with the specified prefix.").optional(),
72029
+ resource_type: ResourceType$zodSchema.describe("The type of resource (image, video, or raw).")
71364
72030
  });
71365
- ListResourceTagsResponseBody$zodSchema = object({
71366
- next_cursor: string2().nullable().optional(),
71367
- tags: array(string2()).optional()
71368
- }).describe("List of tags retrieved");
71369
72031
  ListResourceTagsResponse$zodSchema = union([
71370
72032
  ApiError$zodSchema,
71371
- lazy(() => ListResourceTagsResponseBody$zodSchema)
72033
+ TagsListResponse$zodSchema
71372
72034
  ]);
71373
72035
  });
71374
72036
 
@@ -71474,8 +72136,8 @@ var init_assetsListResourceTags2 = __esm(() => {
71474
72136
  init_resourcetype();
71475
72137
  init_tools();
71476
72138
  args10 = {
71477
- resource_type: ResourceType$zodSchema.describe(`The type of resource.`),
71478
- prefix: string2().describe("The prefix to use if you want to limit the returned tags to those that start with the specified prefix.").optional(),
72139
+ resource_type: ResourceType$zodSchema.describe(`The type of resource (image, video, or raw).`),
72140
+ prefix: string2().describe("Limit the returned tags to those that start with the specified prefix.").optional(),
71479
72141
  next_cursor: string2().describe("Cursor for pagination.").optional(),
71480
72142
  max_results: int().describe("Maximum number of results to return (1-500).").optional()
71481
72143
  };
@@ -71514,23 +72176,23 @@ var ListVideosGlobals$zodSchema, ListVideosRequest$zodSchema, ListVideosResponse
71514
72176
  var init_listvideosop = __esm(() => {
71515
72177
  init_zod();
71516
72178
  init_apierror();
71517
- init_direction();
71518
- init_fieldsspec();
72179
+ init_deliverytypeall();
72180
+ init_directionenum();
72181
+ init_fields();
71519
72182
  init_listresponse();
71520
- init_liststoragetype();
71521
72183
  ListVideosGlobals$zodSchema = object({
71522
72184
  cloud_name: string2().describe("The cloud name of your product environment.").optional()
71523
72185
  });
71524
72186
  ListVideosRequest$zodSchema = object({
71525
- direction: Direction$zodSchema.optional().describe("Sort direction."),
71526
- fields: array(FieldsSpec$zodSchema).optional(),
72187
+ direction: DirectionEnum$zodSchema.optional().describe('The sort direction for the results. Default is "desc".'),
72188
+ fields: Fields$zodSchema.optional().describe("Additional fields to include in the response. The fields public_id and asset_id are always included."),
71527
72189
  max_results: int().describe("Maximum number of results to return (1-500).").optional(),
71528
72190
  next_cursor: string2().describe("Cursor for pagination.").optional(),
71529
- prefix: string2().describe("A public_id prefix. When specified, all assets with that prefix are returned. When using this, the `type` parameter must also be specified.").optional(),
72191
+ prefix: string2().describe("A public_id prefix. When specified, all assets with that prefix are returned.").optional(),
71530
72192
  public_ids: array(string2()).describe("An array of public IDs to return.").optional(),
71531
- start_at: exports_iso.datetime({ offset: true }).describe("An ISO-8601 formatted timestamp. When specified, assets created since that timestamp are returned. Supported only if neither `prefix` nor `public_ids` were passed.").optional(),
71532
- tags: boolean2().describe("Whether to include the list of tag names assigned to each asset. Default: false").optional(),
71533
- type: ListStorageType$zodSchema.optional().describe("The delivery type. Necessary for prefix filtering.")
72193
+ start_at: exports_iso.datetime({ offset: true }).describe("An ISO-8601 formatted timestamp. When specified, returns resources created since that timestamp. Supported only if neither `prefix` nor `public_ids` were passed.").optional(),
72194
+ tags: boolean2().default(false).describe("Whether to include the list of tag names assigned to each asset. Default is false."),
72195
+ type: DeliveryTypeAll$zodSchema.optional().describe("The delivery type to filter by. When omitted, returns assets of all delivery types.")
71534
72196
  });
71535
72197
  ListVideosResponse$zodSchema = union([
71536
72198
  ApiError$zodSchema,
@@ -71645,27 +72307,26 @@ var args11, tool$assetsListVideos;
71645
72307
  var init_assetsListVideos2 = __esm(() => {
71646
72308
  init_zod();
71647
72309
  init_assetsListVideos();
71648
- init_direction();
71649
- init_fieldsspec();
71650
- init_liststoragetype();
72310
+ init_deliverytypeall();
72311
+ init_directionenum();
72312
+ init_fields();
71651
72313
  init_tools();
71652
- init_asset_gallery_widget();
71653
72314
  args11 = {
71654
- type: ListStorageType$zodSchema.optional().describe(`The delivery type. Necessary for prefix filtering.`),
71655
- prefix: string2().describe("A public_id prefix. When specified, all assets with that prefix are returned. When using this, the `type` parameter must also be specified.").optional(),
72315
+ type: DeliveryTypeAll$zodSchema.optional().describe(`The delivery type to filter by. When omitted, returns assets of all delivery types.`),
72316
+ prefix: string2().describe("A public_id prefix. When specified, all assets with that prefix are returned.").optional(),
71656
72317
  public_ids: array(string2()).describe("An array of public IDs to return.").optional(),
71657
- tags: boolean2().describe("Whether to include the list of tag names assigned to each asset. Default: false").optional(),
72318
+ tags: boolean2().default(false).describe("Whether to include the list of tag names assigned to each asset. Default is false."),
71658
72319
  next_cursor: string2().describe("Cursor for pagination.").optional(),
71659
72320
  max_results: int().describe("Maximum number of results to return (1-500).").optional(),
71660
- direction: Direction$zodSchema.optional().describe(`Sort direction.`),
71661
- start_at: exports_iso.datetime({ offset: true }).describe("An ISO-8601 formatted timestamp. When specified, assets created since that timestamp are returned. Supported only if neither `prefix` nor `public_ids` were passed.").optional(),
71662
- fields: array(FieldsSpec$zodSchema).optional()
72321
+ direction: DirectionEnum$zodSchema.optional().describe(`The sort direction for the results. Default is "desc".`),
72322
+ start_at: exports_iso.datetime({ offset: true }).describe("An ISO-8601 formatted timestamp. When specified, returns resources created since that timestamp. Supported only if neither `prefix` nor `public_ids` were passed.").optional(),
72323
+ fields: Fields$zodSchema.optional().describe(`Additional fields to include in the response. The fields public_id and asset_id are always included.`)
71663
72324
  };
71664
72325
  tool$assetsListVideos = {
71665
72326
  name: "list-videos",
71666
72327
  description: `Get video assets
71667
72328
 
71668
- Retrieves a list of video assets. Results can be filtered by various criteria like tags, moderation status, prefix, or specific public IDs.
72329
+ Retrieves a list of video assets. Results can be filtered by various criteria like tags, prefix, or specific public IDs.
71669
72330
  `,
71670
72331
  scopes: ["librarian"],
71671
72332
  annotations: {
@@ -71676,7 +72337,7 @@ Retrieves a list of video assets. Results can be filtered by various criteria li
71676
72337
  readOnlyHint: true
71677
72338
  },
71678
72339
  _meta: {
71679
- ui: { resourceUri: ASSET_GALLERY_RESOURCE_URI }
72340
+ ui: { resourceUri: appUri("asset-gallery", "list-videos") }
71680
72341
  },
71681
72342
  args: args11,
71682
72343
  tool: async (client, args12, ctx) => {
@@ -71692,46 +72353,31 @@ Retrieves a list of video assets. Results can be filtered by various criteria li
71692
72353
  };
71693
72354
  });
71694
72355
 
71695
- // src/models/storagetype.ts
71696
- var StorageType$zodSchema;
71697
- var init_storagetype = __esm(() => {
71698
- init_zod();
71699
- StorageType$zodSchema = _enum2([
71700
- "upload",
71701
- "private",
71702
- "authenticated"
71703
- ]).describe("The storage type of the resource.");
71704
- });
71705
-
71706
72356
  // src/models/renameassetop.ts
71707
72357
  var RenameAssetGlobals$zodSchema, RenameAssetRequestBody$zodSchema, RenameAssetRequest$zodSchema, RenameAssetResponse$zodSchema;
71708
72358
  var init_renameassetop = __esm(() => {
71709
72359
  init_zod();
71710
72360
  init_apierror();
71711
72361
  init_resourcetype();
71712
- init_storagetype();
72362
+ init_uploaddeliverytype();
71713
72363
  init_uploadresponse();
71714
72364
  RenameAssetGlobals$zodSchema = object({
71715
72365
  cloud_name: string2().describe("The cloud name of your product environment.").optional()
71716
72366
  });
71717
72367
  RenameAssetRequestBody$zodSchema = object({
71718
- api_key: string2().optional().describe("The API key to use for the request. This is automatically computed by the Cloudinary's SDKs."),
71719
- context: string2().optional().describe("Context metadata to update during rename."),
72368
+ context: boolean2().default(false).describe("Whether to include contextual metadata in the response. Default is false."),
71720
72369
  from_public_id: string2().describe("The public ID of the asset to rename."),
71721
- invalidate: boolean2().optional().describe("Whether to invalidate the CDN cache for the renamed asset."),
71722
- metadata: string2().optional().describe("Structured metadata to update during rename."),
72370
+ invalidate: boolean2().default(false).describe("Whether to invalidate CDN cache copies of the renamed asset. Default is false."),
72371
+ metadata: boolean2().default(false).describe("Whether to include structured metadata in the response. Default is false."),
71723
72372
  notification_url: string2().optional().describe("URL to notify when the operation is complete."),
71724
- overwrite: boolean2().optional().describe("Whether to overwrite the target asset if it already exists."),
71725
- signature: string2().optional().describe(`(Required for signed REST API calls) Used to authenticate the request and based on the parameters you use in the request. When using the Cloudinary SDKs for signed requests, the signature is automatically generated and added to the request. If you manually generate your own signed POST request, you need to manually generate the signature parameter and add it to the request together with the api_key and timestamp parameters.
71726
- `),
71727
- timestamp: int().optional().describe("The timestamp to use for the request in unix time. This is automatically computed by the Cloudinary's SDKs."),
72373
+ overwrite: boolean2().default(false).describe("Whether to overwrite the target asset if it already exists. Default is false."),
71728
72374
  to_public_id: string2().describe("The new public ID for the asset."),
71729
- to_type: StorageType$zodSchema.optional().describe("The storage type of the resource."),
71730
- type: StorageType$zodSchema.optional().describe("The storage type of the resource.")
71731
- });
72375
+ to_type: UploadDeliveryType$zodSchema.optional().describe("The target delivery type for the renamed asset. If omitted, the delivery type remains unchanged."),
72376
+ type: UploadDeliveryType$zodSchema.optional().describe("The current delivery type of the asset.")
72377
+ }).describe("The rename request parameters.");
71732
72378
  RenameAssetRequest$zodSchema = object({
71733
- RequestBody: lazy(() => RenameAssetRequestBody$zodSchema),
71734
- resource_type: ResourceType$zodSchema.describe("The type of resource.")
72379
+ RequestBody: lazy(() => RenameAssetRequestBody$zodSchema).describe("The rename request parameters."),
72380
+ resource_type: ResourceType$zodSchema.describe("The type of resource (image, video, or raw).")
71735
72381
  });
71736
72382
  RenameAssetResponse$zodSchema = union([
71737
72383
  ApiError$zodSchema,
@@ -71834,8 +72480,8 @@ var init_assetsRenameAsset2 = __esm(() => {
71834
72480
  init_resourcetype();
71835
72481
  init_tools();
71836
72482
  args12 = {
71837
- resource_type: ResourceType$zodSchema.describe(`The type of resource.`),
71838
- RequestBody: RenameAssetRequestBody$zodSchema
72483
+ resource_type: ResourceType$zodSchema.describe(`The type of resource (image, video, or raw).`),
72484
+ RequestBody: RenameAssetRequestBody$zodSchema.describe(`The rename request parameters.`)
71839
72485
  };
71840
72486
  tool$assetsRenameAsset = {
71841
72487
  name: "asset-rename",
@@ -71863,11 +72509,13 @@ var init_assetsRenameAsset2 = __esm(() => {
71863
72509
  });
71864
72510
 
71865
72511
  // src/models/resourceupdaterequest.ts
71866
- var ModerationStatus$zodSchema, ResourceUpdateRequest$zodSchema;
72512
+ var ResourceUpdateRequestModerationStatus$zodSchema, ResourceUpdateRequest$zodSchema;
71867
72513
  var init_resourceupdaterequest = __esm(() => {
71868
72514
  init_zod();
71869
72515
  init_accesscontrolitem();
71870
- ModerationStatus$zodSchema = _enum2([
72516
+ init_structuredmetadataparam();
72517
+ init_tagsparam();
72518
+ ResourceUpdateRequestModerationStatus$zodSchema = _enum2([
71871
72519
  "approved",
71872
72520
  "rejected"
71873
72521
  ]).describe("The moderation status of the resource.");
@@ -71880,21 +72528,22 @@ The asset is restricted unless at least one listed access type is valid.
71880
72528
  background_removal: string2().optional().describe("The background removal provider to use for the resource. Optionally append a template suffix (e.g., cloudinary_ai:fine_edges)."),
71881
72529
  categorization: string2().optional().describe("The type of categorization to perform on the resource. Optionally append a language code suffix (e.g., google_tagging:fr)."),
71882
72530
  clear_invalid: boolean2().default(false).describe("Whether to clear invalid metadata fields. If false, invalid fields will be preserved. Default: false"),
71883
- context: string2().optional().describe("A pipe-separated list of key-value pairs of contextual metadata."),
72531
+ context: string2().optional().describe('A pipe-separated list of key-value pairs of general textual context metadata to attach to the asset (e.g., "alt=My image|caption=Nice photo"). The =, ", and | characters can be escaped with a prepending backslash (\\).'),
71884
72532
  custom_coordinates: string2().optional().describe("Custom coordinates as comma-separated values, with multiple coordinates separated by pipes."),
71885
72533
  detection: string2().optional().describe("The type of detection to perform on the resource."),
71886
72534
  display_name: string2().optional().describe("The display name of the resource."),
71887
72535
  face_coordinates: string2().optional().describe("Face coordinates as comma-separated values, with multiple faces separated by pipes."),
71888
- metadata: string2().optional().describe("A pipe-separated list of custom metadata fields (by external_id) and their values."),
71889
- moderation_status: ModerationStatus$zodSchema.optional().describe("The moderation status of the resource."),
72536
+ metadata: StructuredMetadataParam$zodSchema.optional().describe(`A pipe-separated list or a map of custom metadata fields (by external_id) and the values to assign to each of them. The = " and | characters can be supported as values when escaped with a prepended backslash (\\). For a multi-select field, you can set a maximum of 3000 different metadata values on an asset.
72537
+ `),
72538
+ moderation_status: ResourceUpdateRequestModerationStatus$zodSchema.optional().describe("The moderation status of the resource."),
71890
72539
  ocr: string2().optional().describe("The type of OCR to perform on the resource. Set to adv_ocr, optionally with options (e.g., adv_ocr:document)."),
71891
72540
  quality_override: string2().optional().describe("Quality override value that will override any automatic quality transformations."),
71892
72541
  raw_convert: string2().optional().describe("The conversion to apply for raw files (e.g., aspose, google_speech, extract_text)."),
71893
- regions: string2().optional().describe("Named groups of coordinate pairs representing regions."),
71894
- tags: string2().optional().describe("A comma-separated list of tags to assign to the resource."),
72542
+ regions: string2().optional().describe("A JSON-encoded object of named groups of coordinate pairs representing regions. Each region name may contain only letters, numbers, or hyphens, and must have at least two coordinate pairs."),
72543
+ tags: TagsParam$zodSchema.optional().describe("A comma-separated list of tag names, or an array of tag names."),
71895
72544
  unique_display_name: boolean2().default(false).describe("Whether to ensure the display name is unique across all resources. If false, the operation will fail if a resource with the same display name exists. Default: false"),
71896
72545
  visual_search: boolean2().optional().describe("Whether to index the resource with visual search. If true, the resource will be indexed for visual search capabilities. Default: false")
71897
- });
72546
+ }).describe("The resource properties to update.");
71898
72547
  });
71899
72548
 
71900
72549
  // src/models/updateresourcebyassetidop.ts
@@ -71908,7 +72557,7 @@ var init_updateresourcebyassetidop = __esm(() => {
71908
72557
  cloud_name: string2().describe("The cloud name of your product environment.").optional()
71909
72558
  });
71910
72559
  UpdateResourceByAssetIdRequest$zodSchema = object({
71911
- ResourceUpdateRequest: ResourceUpdateRequest$zodSchema,
72560
+ ResourceUpdateRequest: ResourceUpdateRequest$zodSchema.describe("The asset attributes to update."),
71912
72561
  asset_id: string2().describe("The asset ID of the resource. Must be a 32-character hexadecimal string.")
71913
72562
  });
71914
72563
  UpdateResourceByAssetIdResponse$zodSchema = union([
@@ -72015,13 +72664,13 @@ var init_assetsUpdateResourceByAssetId2 = __esm(() => {
72015
72664
  init_tools();
72016
72665
  args13 = {
72017
72666
  asset_id: string2().describe("The asset ID of the resource. Must be a 32-character hexadecimal string."),
72018
- ResourceUpdateRequest: ResourceUpdateRequest$zodSchema
72667
+ ResourceUpdateRequest: ResourceUpdateRequest$zodSchema.describe(`The asset attributes to update.`)
72019
72668
  };
72020
72669
  tool$assetsUpdateResourceByAssetId = {
72021
72670
  name: "asset-update",
72022
72671
  description: `Updates an existing asset's metadata, tags, and other attributes using its asset ID
72023
72672
 
72024
- Updates one or more attributes of a specified resource (asset) by its asset ID. This enables you to update details of an asset by its unique and immutable identifier, regardless of public ID, display name, asset folder, resource type or deliver type. Note that you can also update many attributes of an existing asset using the explicit method, which is not rate-limited.
72673
+ Updates one or more attributes of a specified resource (asset) by its asset ID. This enables you to update details of an asset by its unique and immutable identifier, regardless of public ID, display name, asset folder, resource type or delivery type. Note that you can also update attributes of an existing asset using the explicit API endpoint.
72025
72674
  `,
72026
72675
  scopes: ["librarian"],
72027
72676
  annotations: {
@@ -72045,25 +72694,32 @@ Updates one or more attributes of a specified resource (asset) by its asset ID.
72045
72694
  };
72046
72695
  });
72047
72696
 
72697
+ // src/models/createfolderresponse.ts
72698
+ var CreateFolderResponse$zodSchema;
72699
+ var init_createfolderresponse = __esm(() => {
72700
+ init_zod();
72701
+ CreateFolderResponse$zodSchema = object({
72702
+ name: string2().optional().describe("The name of the created folder."),
72703
+ path: string2().optional().describe("The path of the created folder."),
72704
+ success: boolean2().optional().describe("Whether the operation was successful.")
72705
+ });
72706
+ });
72707
+
72048
72708
  // src/models/createfolderop.ts
72049
- var CreateFolderGlobals$zodSchema, CreateFolderRequest$zodSchema, CreateFolderResponseBody$zodSchema, CreateFolderResponse$zodSchema;
72709
+ var CreateFolderGlobals$zodSchema, CreateFolderRequest$zodSchema, CreateFolderResponseResponse$zodSchema;
72050
72710
  var init_createfolderop = __esm(() => {
72051
72711
  init_zod();
72052
72712
  init_apierror();
72713
+ init_createfolderresponse();
72053
72714
  CreateFolderGlobals$zodSchema = object({
72054
72715
  cloud_name: string2().describe("The cloud name of your product environment.").optional()
72055
72716
  });
72056
72717
  CreateFolderRequest$zodSchema = object({
72057
- folder: string2()
72058
- });
72059
- CreateFolderResponseBody$zodSchema = object({
72060
- name: string2().optional().describe("The name of the created folder"),
72061
- path: string2().optional().describe("The path of the created folder"),
72062
- success: boolean2().optional().describe("Whether the operation was successful")
72063
- }).describe("Folder created successfully");
72064
- CreateFolderResponse$zodSchema = union([
72718
+ folder: string2().describe("The full path of the folder, including any nested folders. Must not be empty, and must not contain double slashes or leading/trailing slashes.")
72719
+ });
72720
+ CreateFolderResponseResponse$zodSchema = union([
72065
72721
  ApiError$zodSchema,
72066
- lazy(() => CreateFolderResponseBody$zodSchema)
72722
+ CreateFolderResponse$zodSchema
72067
72723
  ]);
72068
72724
  });
72069
72725
 
@@ -72159,7 +72815,7 @@ var init_foldersCreateFolder2 = __esm(() => {
72159
72815
  init_foldersCreateFolder();
72160
72816
  init_tools();
72161
72817
  args14 = {
72162
- folder: string2()
72818
+ folder: string2().describe("The full path of the folder, including any nested folders. Must not be empty, and must not contain double slashes or leading/trailing slashes.")
72163
72819
  };
72164
72820
  tool$foldersCreateFolder = {
72165
72821
  name: "create-folder",
@@ -72188,22 +72844,29 @@ Creates a new folder at the specified path`,
72188
72844
  };
72189
72845
  });
72190
72846
 
72847
+ // src/models/deletefolderresponse.ts
72848
+ var DeleteFolderResponse$zodSchema;
72849
+ var init_deletefolderresponse = __esm(() => {
72850
+ init_zod();
72851
+ DeleteFolderResponse$zodSchema = object({
72852
+ deleted: array(string2()).describe("List of deleted folder paths.")
72853
+ });
72854
+ });
72855
+
72191
72856
  // src/models/destroyfolderop.ts
72192
- var DestroyFolderGlobals$zodSchema, DestroyFolderRequest$zodSchema, DestroyFolderResponseBody$zodSchema, DestroyFolderResponse$zodSchema;
72857
+ var DestroyFolderGlobals$zodSchema, DestroyFolderRequest$zodSchema, DestroyFolderResponse$zodSchema;
72193
72858
  var init_destroyfolderop = __esm(() => {
72194
72859
  init_zod();
72195
72860
  init_apierror();
72861
+ init_deletefolderresponse();
72196
72862
  DestroyFolderGlobals$zodSchema = object({
72197
72863
  cloud_name: string2().describe("The cloud name of your product environment.").optional()
72198
72864
  });
72199
72865
  DestroyFolderRequest$zodSchema = object({
72200
- folder: string2()
72866
+ folder: string2().describe("The full path of the folder, including any nested folders. Must not be empty, and must not contain double slashes or leading/trailing slashes.")
72201
72867
  });
72202
- DestroyFolderResponseBody$zodSchema = object({
72203
- deleted: array(string2()).describe("List of deleted folder paths")
72204
- }).describe("Folder deleted successfully");
72205
72868
  DestroyFolderResponse$zodSchema = union([
72206
- lazy(() => DestroyFolderResponseBody$zodSchema),
72869
+ DeleteFolderResponse$zodSchema,
72207
72870
  ApiError$zodSchema
72208
72871
  ]);
72209
72872
  });
@@ -72300,7 +72963,7 @@ var init_foldersDestroyFolder2 = __esm(() => {
72300
72963
  init_foldersDestroyFolder();
72301
72964
  init_tools();
72302
72965
  args15 = {
72303
- folder: string2()
72966
+ folder: string2().describe("The full path of the folder, including any nested folders. Must not be empty, and must not contain double slashes or leading/trailing slashes.")
72304
72967
  };
72305
72968
  tool$foldersDestroyFolder = {
72306
72969
  name: "delete-folder",
@@ -72355,27 +73018,20 @@ var init_folderssearchresponse = __esm(() => {
72355
73018
  });
72356
73019
 
72357
73020
  // src/models/searchfoldersop.ts
72358
- var SearchFoldersGlobals$zodSchema, Expression$zodSchema, ExpressionUnion$zodSchema, SearchFoldersRequest$zodSchema, SearchFoldersResponse$zodSchema;
73021
+ var SearchFoldersGlobals$zodSchema, SearchFoldersRequest$zodSchema, SearchFoldersResponse$zodSchema;
72359
73022
  var init_searchfoldersop = __esm(() => {
72360
73023
  init_zod();
72361
73024
  init_apierror();
73025
+ init_directionenum();
72362
73026
  init_folderssearchresponse();
72363
73027
  SearchFoldersGlobals$zodSchema = object({
72364
73028
  cloud_name: string2().describe("The cloud name of your product environment.").optional()
72365
73029
  });
72366
- Expression$zodSchema = object({});
72367
- ExpressionUnion$zodSchema = union([
72368
- string2(),
72369
- lazy(() => Expression$zodSchema)
72370
- ]).describe("The (Lucene-like) string expression specifying the search query, or an object for advanced queries. If not passed, returns all folders (up to max_results).");
72371
73030
  SearchFoldersRequest$zodSchema = object({
72372
- expression: union([
72373
- string2(),
72374
- lazy(() => Expression$zodSchema)
72375
- ]).optional().describe("The (Lucene-like) string expression specifying the search query, or an object for advanced queries. If not passed, returns all folders (up to max_results)."),
73031
+ expression: string2().describe("The (Lucene-like) string expression specifying the search query. If not passed, returns all folders (up to max_results).").optional(),
72376
73032
  max_results: int().default(50).describe("Maximum number of folders to return (max 500, default 50)."),
72377
73033
  next_cursor: string2().describe("The cursor for pagination. Use the next_cursor value from a previous response to get the next page of results.").optional(),
72378
- sort_by: array(string2()).describe("An array of key-value pairs for sorting. Each value is a key and direction (asc/desc).").optional()
73034
+ sort_by: array(record(string2(), DirectionEnum$zodSchema)).describe("Sort order for the results. Each item maps a field name to a direction.").optional()
72379
73035
  });
72380
73036
  SearchFoldersResponse$zodSchema = union([
72381
73037
  FoldersSearchResponse$zodSchema,
@@ -72479,11 +73135,11 @@ var args16, tool$foldersSearchFolders;
72479
73135
  var init_foldersSearchFolders2 = __esm(() => {
72480
73136
  init_zod();
72481
73137
  init_foldersSearchFolders();
72482
- init_searchfoldersop();
73138
+ init_directionenum();
72483
73139
  init_tools();
72484
73140
  args16 = {
72485
- expression: ExpressionUnion$zodSchema.optional().describe(`The (Lucene-like) string expression specifying the search query, or an object for advanced queries. If not passed, returns all folders (up to max_results).`),
72486
- sort_by: array(string2()).describe("An array of key-value pairs for sorting. Each value is a key and direction (asc/desc).").optional(),
73141
+ expression: string2().describe("The (Lucene-like) string expression specifying the search query. If not passed, returns all folders (up to max_results).").optional(),
73142
+ sort_by: array(record(string2(), DirectionEnum$zodSchema)).describe("Sort order for the results. Each item maps a field name to a direction.").optional(),
72487
73143
  max_results: int().default(50).describe("Maximum number of folders to return (max 500, default 50)."),
72488
73144
  next_cursor: string2().describe("The cursor for pagination. Use the next_cursor value from a previous response to get the next page of results.").optional()
72489
73145
  };
@@ -72515,54 +73171,73 @@ Lists the folders that match the specified search expression. Limited to 2000 re
72515
73171
  };
72516
73172
  });
72517
73173
 
73174
+ // src/models/movefolderrequest.ts
73175
+ var MoveFolderRequest$zodSchema;
73176
+ var init_movefolderrequest = __esm(() => {
73177
+ init_zod();
73178
+ MoveFolderRequest$zodSchema = object({
73179
+ to_folder: string2().describe("The new path for the folder.")
73180
+ }).describe("The folder move/rename request.");
73181
+ });
73182
+
73183
+ // src/models/foldernamepath.ts
73184
+ var FolderNamePath$zodSchema;
73185
+ var init_foldernamepath = __esm(() => {
73186
+ init_zod();
73187
+ FolderNamePath$zodSchema = object({
73188
+ name: string2().describe("The name of the folder."),
73189
+ path: string2().describe("The full path of the folder.")
73190
+ });
73191
+ });
73192
+
73193
+ // src/models/movefolderresponse.ts
73194
+ var MoveFolderResponse$zodSchema;
73195
+ var init_movefolderresponse = __esm(() => {
73196
+ init_zod();
73197
+ init_foldernamepath();
73198
+ MoveFolderResponse$zodSchema = object({
73199
+ from: FolderNamePath$zodSchema,
73200
+ to: FolderNamePath$zodSchema
73201
+ });
73202
+ });
73203
+
72518
73204
  // src/models/updatefolderop.ts
72519
- var UpdateFolderGlobals$zodSchema, UpdateFolderRequestBody$zodSchema, UpdateFolderRequest$zodSchema, From$zodSchema, To$zodSchema, UpdateFolderResponseBody$zodSchema, UpdateFolderResponse$zodSchema;
73205
+ var UpdateFolderGlobals$zodSchema, UpdateFolderRequest$zodSchema, UpdateFolderResponse$zodSchema;
72520
73206
  var init_updatefolderop = __esm(() => {
72521
73207
  init_zod();
72522
73208
  init_apierror();
73209
+ init_movefolderrequest();
73210
+ init_movefolderresponse();
72523
73211
  UpdateFolderGlobals$zodSchema = object({
72524
73212
  cloud_name: string2().describe("The cloud name of your product environment.").optional()
72525
73213
  });
72526
- UpdateFolderRequestBody$zodSchema = object({
72527
- to_folder: string2().describe("The new path for the folder.")
72528
- });
72529
73214
  UpdateFolderRequest$zodSchema = object({
72530
- RequestBody: lazy(() => UpdateFolderRequestBody$zodSchema),
72531
- folder: string2()
72532
- });
72533
- From$zodSchema = object({
72534
- name: string2().describe("The name of the source folder."),
72535
- path: string2().describe("The full path of the source folder.")
73215
+ folder: string2().describe("The full path of the folder, including any nested folders. Must not be empty, and must not contain double slashes or leading/trailing slashes."),
73216
+ move_folder_request: MoveFolderRequest$zodSchema.describe("The new folder path.")
72536
73217
  });
72537
- To$zodSchema = object({
72538
- name: string2().describe("The name of the target folder."),
72539
- path: string2().describe("The full path of the target folder.")
72540
- });
72541
- UpdateFolderResponseBody$zodSchema = object({
72542
- from: lazy(() => From$zodSchema),
72543
- to: lazy(() => To$zodSchema)
72544
- }).describe("Folder renamed successfully");
72545
73218
  UpdateFolderResponse$zodSchema = union([
72546
- lazy(() => UpdateFolderResponseBody$zodSchema),
73219
+ MoveFolderResponse$zodSchema,
72547
73220
  ApiError$zodSchema
72548
73221
  ]);
72549
73222
  });
72550
73223
 
72551
73224
  // src/funcs/foldersUpdateFolder.ts
72552
- function foldersUpdateFolder(client$, folder, RequestBody, options) {
72553
- return new APIPromise($do18(client$, folder, RequestBody, options));
73225
+ function foldersUpdateFolder(client$, folder, move_folder_request, options) {
73226
+ return new APIPromise($do18(client$, folder, move_folder_request, options));
72554
73227
  }
72555
- async function $do18(client$, folder, RequestBody, options) {
73228
+ async function $do18(client$, folder, move_folder_request, options) {
72556
73229
  const input$ = {
72557
73230
  folder,
72558
- RequestBody
73231
+ move_folder_request
72559
73232
  };
72560
73233
  const parsed$ = safeParse4(input$, (value$) => UpdateFolderRequest$zodSchema.parse(value$), "Input validation failed");
72561
73234
  if (!parsed$.ok) {
72562
73235
  return [parsed$, { status: "invalid" }];
72563
73236
  }
72564
73237
  const payload$ = parsed$.value;
72565
- const body$ = encodeJSON("body", payload$.RequestBody, { explode: true });
73238
+ const body$ = encodeJSON("body", payload$.move_folder_request, {
73239
+ explode: true
73240
+ });
72566
73241
  const pathParams$ = {
72567
73242
  cloud_name: encodeSimple("cloud_name", client$._options.cloud_name, {
72568
73243
  explode: false,
@@ -72640,11 +73315,11 @@ var args17, tool$foldersUpdateFolder;
72640
73315
  var init_foldersUpdateFolder2 = __esm(() => {
72641
73316
  init_zod();
72642
73317
  init_foldersUpdateFolder();
72643
- init_updatefolderop();
73318
+ init_movefolderrequest();
72644
73319
  init_tools();
72645
73320
  args17 = {
72646
- folder: string2(),
72647
- RequestBody: UpdateFolderRequestBody$zodSchema
73321
+ folder: string2().describe("The full path of the folder, including any nested folders. Must not be empty, and must not contain double slashes or leading/trailing slashes."),
73322
+ move_folder_request: MoveFolderRequest$zodSchema.describe(`The new folder path.`)
72648
73323
  };
72649
73324
  tool$foldersUpdateFolder = {
72650
73325
  name: "move-folder",
@@ -72661,7 +73336,7 @@ Renames or moves an entire folder (along with all assets it contains) to a new l
72661
73336
  },
72662
73337
  args: args17,
72663
73338
  tool: async (client, args18, ctx) => {
72664
- const [result] = await foldersUpdateFolder(client, args18.folder, args18.RequestBody, { fetchOptions: { signal: ctx.signal } }).$inspect();
73339
+ const [result] = await foldersUpdateFolder(client, args18.folder, args18.move_folder_request, { fetchOptions: { signal: ctx.signal } }).$inspect();
72665
73340
  if (!result.ok) {
72666
73341
  return {
72667
73342
  content: [{ type: "text", text: result.error.message }],
@@ -72673,34 +73348,25 @@ Renames or moves an entire folder (along with all assets it contains) to a new l
72673
73348
  };
72674
73349
  });
72675
73350
 
72676
- // src/models/searchsortpair.ts
72677
- var SearchSortPair$zodSchema;
72678
- var init_searchsortpair = __esm(() => {
72679
- init_zod();
72680
- SearchSortPair$zodSchema = _enum2([
72681
- "asc",
72682
- "desc"
72683
- ]);
72684
- });
72685
-
72686
73351
  // src/models/searchparameters.ts
72687
- var SearchParametersType$zodSchema, SearchParametersRange$zodSchema, Aggregate$zodSchema, AggregateEnum$zodSchema, AggregateUnion$zodSchema, WithField$zodSchema, SearchParameters$zodSchema;
73352
+ var Type$zodSchema, SearchParametersRange$zodSchema, Aggregate$zodSchema, AggregateEnum$zodSchema, AggregateUnion$zodSchema, WithField$zodSchema, SearchParameters$zodSchema;
72688
73353
  var init_searchparameters = __esm(() => {
72689
73354
  init_zod();
72690
- init_searchsortpair();
72691
- SearchParametersType$zodSchema = _enum2([
73355
+ init_directionenum();
73356
+ Type$zodSchema = _enum2([
72692
73357
  "bytes",
72693
73358
  "image_pixels",
72694
73359
  "video_pixels",
72695
73360
  "duration"
72696
73361
  ]);
72697
73362
  SearchParametersRange$zodSchema = object({
72698
- from: number2().optional().describe("Start of the range (inclusive)"),
72699
- to: number2().optional().describe("End of the range (exclusive)")
73363
+ from: number2().optional().describe("Start of the range (inclusive). At least one of `from` / `to` is required."),
73364
+ key: string2().describe("A label for the bucket, returned in the aggregation response. 1–20 chars, alphanumeric plus `-` and `_`."),
73365
+ to: number2().optional().describe("End of the range (exclusive). At least one of `from` / `to` is required.")
72700
73366
  });
72701
73367
  Aggregate$zodSchema = object({
72702
- ranges: array(lazy(() => SearchParametersRange$zodSchema)),
72703
- type: SearchParametersType$zodSchema
73368
+ ranges: array(lazy(() => SearchParametersRange$zodSchema)).describe("One or more ranges for the numeric field. Each range must include a `key` label and at least one of `from` / `to`.\n"),
73369
+ type: Type$zodSchema
72704
73370
  });
72705
73371
  AggregateEnum$zodSchema = _enum2([
72706
73372
  "format",
@@ -72710,7 +73376,8 @@ var init_searchparameters = __esm(() => {
72710
73376
  AggregateUnion$zodSchema = union([
72711
73377
  array(AggregateEnum$zodSchema),
72712
73378
  array(lazy(() => Aggregate$zodSchema))
72713
- ]);
73379
+ ]).describe(`Fields or ranges to aggregate search results by. Requires a Tier 2 search plan; on Tier 1 the field is accepted but aggregations are omitted from the response.
73380
+ `);
72714
73381
  WithField$zodSchema = _enum2([
72715
73382
  "context",
72716
73383
  "tags",
@@ -72724,19 +73391,20 @@ var init_searchparameters = __esm(() => {
72724
73391
  aggregate: union([
72725
73392
  array(AggregateEnum$zodSchema),
72726
73393
  array(lazy(() => Aggregate$zodSchema))
72727
- ]).optional(),
72728
- expression: string2().optional().describe("The search expression. Supports exact match, wildcard match, presence, greater/less than, and range. For details on building expressions, see the Search API documentation."),
73394
+ ]).optional().describe(`Fields or ranges to aggregate search results by. Requires a Tier 2 search plan; on Tier 1 the field is accepted but aggregations are omitted from the response.
73395
+ `),
73396
+ expression: string2().optional().describe('The Lucene-like search expression. Supports token match (`:`), exact match (`=`), trailing `*` for prefix match, ranges (`[a TO b]`, `{a TO b}`), and comparisons (`>`, `<`, `>=`, `<=`). Combine terms with uppercase `AND`, `OR`, `NOT`, or `+`/`-`. `NOT` must appear between clauses — a leading `NOT` is a parse error; use `-field:value` to negate the first clause. Group with parentheses.\n\nWrap values containing spaces, colons, or other reserved characters (`! ( ) { } [ ] ^ ~ ? \\ = & < > |`) in double quotes, e.g. `tags:"service:mantels"`, `aspect_ratio:"16:9"`. Send raw `<`/`>`, never HTML-escaped.\n\nWildcards are prefix-only (trailing `*`). A bare `*` (e.g. `folder:*`, `context.alt:*`, `metadata.key:*`, `tags:*`, `-tags:*`) is a parse error — there is no "has any value" / presence probe. Either drop the clause, use a concrete prefix, or filter on a known token.\n\nDates: ISO-8601 in quotes, or relative shorthand `1h`, `1d`, `1w`, `1m`, `1y` (`uploaded_at>1d`, `created_at:[4w TO 1w]`).\n\nSupported fields: `public_id`, `asset_id`, `filename`, `display_name`, `folder` / `asset_folder` (singular, not `folders`), `tags`, `context.<key>`, `metadata.<external_id>`, `resource_type`, `type`, `format`, `bytes`, `width`, `height`, `duration`, `pages`, `aspect_ratio`, `transparent`, `grayscale`, `status`, `moderation_status`, `moderation_kind`, `uploaded_at`, `created_at`, `taken_at`, `updated_at`, `last_updated.<kind>`, `face_count`, `illustration_score`, `quality_score`. Fields under `image_metadata.*`, `image_analysis.*`, `quality_analysis.*`, and `accessibility_analysis.*` also require the matching `with_field` to be returned in the response.\n\nSee the [search expressions guide](https://cloudinary.com/documentation/search_expressions.md) for the full reference.\n'),
72729
73397
  fields: string2().optional().describe(`A comma-separated list of fields to include in the response.
72730
73398
  Notes:
72731
73399
  - This parameter takes precedence over the with_field parameter, so if you want any additional asset attributes returned, make sure to also include them in this list (e.g., tags or context).
72732
73400
  - The following fields are always included in the response: public_id, asset_id, asset_folder, created_at, status, type, and resource_type.
72733
73401
  `),
72734
- max_results: int().optional().describe("The maximum number of results to return. Default - 50. Maximum - 500."),
73402
+ max_results: int().optional().describe("The maximum number of results to return. Default - 50. Maximum - 500.\nSet to `0` to get only `total_count` and `aggregations` without any resources in the response — useful for counting or aggregation-only queries.\n"),
72735
73403
  next_cursor: string2().optional().describe("The cursor value to get the next page of results. Available when a previous search returned more results than max_results."),
72736
- sort_by: array(record(string2(), SearchSortPair$zodSchema)).optional().describe(`An array of single-key objects mapping a field to a sort direction. Each object must contain exactly one field name mapped to 'asc' or 'desc'.
73404
+ sort_by: array(record(string2(), DirectionEnum$zodSchema)).optional().describe(`An array of single-key objects mapping a field to a sort direction. Each object must contain exactly one field name mapped to 'asc' or 'desc'.
72737
73405
  Default: [{"created_at": "desc"}].
72738
73406
  `),
72739
- with_field: array(WithField$zodSchema).optional().describe("The additional fields to include in the response. Note that the fields parameter takes precedence over this parameter.")
73407
+ with_field: array(WithField$zodSchema).optional().describe("The additional asset attributes to include in each search result. The `fields` parameter takes precedence over this parameter. `image_metadata`, `image_analysis`, and `metadata` require a Tier 2 search plan.\n")
72740
73408
  }).describe("Common parameters for resource search operations.");
72741
73409
  });
72742
73410
 
@@ -72825,9 +73493,8 @@ var init_searchSearchAssets2 = __esm(() => {
72825
73493
  init_searchSearchAssets();
72826
73494
  init_searchparameters();
72827
73495
  init_tools();
72828
- init_asset_gallery_widget();
72829
73496
  args18 = {
72830
- request: SearchParameters$zodSchema
73497
+ request: SearchParameters$zodSchema.describe(`The search query parameters.`)
72831
73498
  };
72832
73499
  tool$searchSearchAssets = {
72833
73500
  name: "search-assets",
@@ -72835,9 +73502,53 @@ var init_searchSearchAssets2 = __esm(() => {
72835
73502
 
72836
73503
  Returns a list of resources matching the specified search criteria.
72837
73504
 
72838
- Uses Lucene-like query language to search by descriptive attributes (public_id, filename, folder, tags, context), file details (resource_type, format, bytes, width, height), embedded data (image_metadata), and analyzed data (face_count, colors, quality_score). Supports aggregate counts and complex Boolean expressions.
72839
-
72840
- Examples: tags:shirt AND uploaded_at>1d, resource_type:image AND bytes>1mb, folder:products OR context.category:electronics
73505
+ Uses a Lucene-like query language to filter assets by descriptive attributes (\`public_id\`, \`asset_id\`, \`filename\`, \`display_name\`, \`folder\` / \`asset_folder\`, \`tags\`, \`context.<key>\`), file details (\`resource_type\`, \`type\`, \`format\`, \`bytes\`, \`width\`, \`height\`, \`duration\`, \`pages\`, \`aspect_ratio\`, \`transparent\`, \`grayscale\`), lifecycle dates (\`uploaded_at\`, \`created_at\`, \`taken_at\`, \`updated_at\`, \`last_updated.<kind>\`), moderation and lifecycle state (\`status\`, \`moderation_status\`, \`moderation_kind\`), embedded data (\`image_metadata.*\`), structured metadata (\`metadata.<external_id>\`), and analysis fields (\`face_count\`, \`colors\`, \`quality_score\`, \`illustration_score\`, \`accessibility_analysis.*\`). Supports sorting, aggregate counts, and complex boolean expressions. See the \`expression\` parameter for the full field reference.
73506
+
73507
+ ## Expression syntax
73508
+
73509
+ - **Match**: \`field:value\` (token match) or \`field=value\` (exact match). Examples: \`tags:shirt\`, \`tags=cotton\`.
73510
+ - **Comparisons**: \`>\`, \`<\`, \`>=\`, \`<=\` for numbers and dates. Example: \`bytes>10000000\`.
73511
+ - **Ranges**: \`field:[from TO to]\` inclusive, \`field:{from TO to}\` exclusive. Example: \`width:{200 TO 1028}\`.
73512
+ - **Booleans**: \`AND\`, \`OR\`, \`NOT\` (uppercase), or \`+\` (must), \`-\` (must not). \`NOT\` must appear between clauses — a bare leading \`NOT\` is a parse error; use \`-field:value\` to negate the first clause. Group with parentheses: \`(shirt OR pants) AND clothes\`.
73513
+ - **Wildcards**: trailing \`*\` only, for prefix match (\`public_id:shoes_*\`, \`format:jp*\`, \`tags:shirt*\`). Not supported on \`folder\`, \`asset_folder\`, \`resource_type\`, or \`type\`. Leading \`*\`, middle \`*\`, \`?\`, and bare \`*\` (\`folder:*\`, \`context.alt:*\`) are all parse errors — wildcards cannot be used as a "field is present" probe.
73514
+ - **Tokenized vs exact fields**: \`tags\`, \`filename\`, \`display_name\`, \`context.<key>\`, and \`metadata.<id>\` match on tokens split by whitespace and punctuation — \`tags:analysis\` matches the tag \`full-analysis\`. \`public_id\`, \`folder\`, \`asset_folder\`, and \`format\` match the whole value — \`public_id:dog\` will not match \`dog_pldcwy\`; use \`public_id="dog_pldcwy"\` (exact) or \`public_id:dog*\` (prefix). These exact-match fields still accept a trailing \`*\` for prefix match (except \`folder\` / \`asset_folder\`, where wildcards are ignored).
73515
+ - **Dates**: ISO-8601 in quotes (\`uploaded_at>"2024-01-15"\`) or relative shorthand \`Nh\`, \`Nd\`, \`Nw\`, \`Nm\`, \`Ny\` (\`uploaded_at>1d\`, \`created_at:[4w TO 1w]\`). Send raw \`<\`/\`>\`, never HTML-escaped.
73516
+ - **Quoting**: wrap any value containing a space, colon, or other reserved character (\`! ( ) { } [ ] ^ ~ ? \\ = & < > |\`) in double quotes, or escape each character with \`\\\`. Examples: \`tags:"service:mantels"\`, \`aspect_ratio:"16:9"\`, \`folder:"My Folder"\`.
73517
+
73518
+ ## Common mistakes
73519
+
73520
+ - Use \`folder:\` or \`asset_folder:\` (singular); \`folders:\`, \`asset_folder_id:\`, and other invented variants are not valid fields. Pass the exact folder name — wildcards do not apply here.
73521
+ - There is no "has any value" / presence probe. \`folder:*\`, \`metadata.alt:*\`, \`context.key:*\`, \`tags:*\`, and \`-tags:*\` are all parse errors. See *"Which assets have any value for \`metadata.<id>\`?"* under **Common tasks** for workarounds.
73522
+ - \`NOT foo AND bar\` is a parse error. Write it as \`bar AND NOT foo\` or \`-foo AND bar\`, and keep every \`NOT\` between two clauses (\`a AND NOT b AND NOT c\` is fine; \`NOT b AND NOT c …\` is not).
73523
+ - \`public_id:dog\` will not match \`dog_pldcwy\`. Use \`public_id="dog_pldcwy"\` (exact) or \`public_id:dog*\` (prefix).
73524
+ - \`tags=service:mantels\` fails because the unquoted colon is parsed as a field separator. Use \`tags="service:mantels"\` or \`tags=service\\:mantels\`.
73525
+ - Do not HTML-escape operators. Send \`uploaded_at<1h\`, not \`uploaded_at&lt;1h\`.
73526
+ - Do not leave an operand empty (e.g. \`tags: AND -tags:foo\`). Omit the empty clause entirely.
73527
+
73528
+ ## Tips
73529
+
73530
+ - Set \`max_results: 0\` to return only \`total_count\` and \`aggregations\` without any resource payload — useful for counts and aggregation-only queries.
73531
+ - \`total_count\` is always present in the response; prefer it over running an aggregation just to get a count.
73532
+ - \`aggregate\` (both simple and range variants) and the \`metadata\`, \`image_metadata\`, \`image_analysis\` values of \`with_field\` require a Tier 2 search plan.
73533
+ - Range aggregations require each range to include a \`key\` label (1–20 chars, \`[a-zA-Z0-9_-]+\`) and at least one of \`from\` / \`to\`.
73534
+
73535
+ ## Common tasks
73536
+
73537
+ - **Count matching assets** — put the filter in \`expression\` with \`max_results: 0\` and read \`total_count\` from the response. Works on every tier; no \`aggregate\` needed.
73538
+ - **Preview one matching asset** — set \`max_results: 1\`; add \`with_field: ["tags", "context"]\` (or \`metadata\`, Tier 2) to inspect values. Prefer this over fetching and scanning a full page.
73539
+ - **Distribution of values for a field** — Tier 2: \`aggregate: [format|resource_type|type]\` for enum counts, or range aggregations on \`bytes\`, \`image_pixels\`, \`video_pixels\`, or \`duration\`. Tier 1 fallback: run N small queries with \`max_results: 0\`, one per candidate value, and read \`total_count\` from each.
73540
+ - **"Which assets have any value for \`metadata.<id>\`?"** — not expressible directly (\`metadata.X:*\` is a parse error; there is no presence probe). Workarounds: (a) if the field has a known value set, enumerate — \`metadata.region:(apac OR emea OR amer)\`; (b) query broadly with \`with_field: ["metadata"]\` (Tier 2) and filter client-side for entries where the field is set; (c) at ingest time, attach a sentinel tag whenever the field is set, then search by that tag.
73541
+ - **Newest / largest N** — keep the filter in \`expression\` and sort explicitly: \`sort_by: [{uploaded_at: "desc"}]\` with \`max_results: 10\`.
73542
+ - **Filter by folder** — both \`asset_folder:"parent/child"\` and \`folder:"parent/child"\` match an exact folder path; there is no wildcard or "contains". To query across multiple folders, enumerate: \`asset_folder:("campaigns/2024" OR "campaigns/2025")\`.
73543
+ - **Filter by metadata when you only know the label** — first call \`list-metadata-fields\` to resolve the label to an \`external_id\`, then query \`metadata.<external_id>:value\`.
73544
+ - **Multiple independent filters in one turn** — prefer one \`expression\` with \`OR\` / parentheses over firing many parallel calls: \`metadata.region:apac OR metadata.region:emea\` in a single request is faster and more reliable than two parallel requests.
73545
+
73546
+ ## Examples
73547
+
73548
+ - \`tags:shirt AND uploaded_at>1d\`
73549
+ - \`resource_type:image AND bytes>1000000 AND (format:png OR format:jpg)\`
73550
+ - \`folder:products AND context.category:electronics\`
73551
+ - \`tags:"service:mantels" AND -tags:discontinued\`
72841
73552
  `,
72842
73553
  scopes: ["librarian"],
72843
73554
  annotations: {
@@ -72848,7 +73559,7 @@ Examples: tags:shirt AND uploaded_at>1d, resource_type:image AND bytes>1mb, fold
72848
73559
  readOnlyHint: true
72849
73560
  },
72850
73561
  _meta: {
72851
- ui: { resourceUri: ASSET_GALLERY_RESOURCE_URI }
73562
+ ui: { resourceUri: appUri("asset-gallery", "search-assets") }
72852
73563
  },
72853
73564
  args: args18,
72854
73565
  tool: async (client, args19, ctx) => {
@@ -72973,7 +73684,7 @@ var init_searchVisualSearchAssets2 = __esm(() => {
72973
73684
  init_visualsearchparametersunion();
72974
73685
  init_tools();
72975
73686
  args19 = {
72976
- request: VisualSearchParametersUnion$zodSchema
73687
+ request: VisualSearchParametersUnion$zodSchema.describe(`The visual search parameters.`)
72977
73688
  };
72978
73689
  tool$searchVisualSearchAssets = {
72979
73690
  name: "visual-search-assets",
@@ -72981,7 +73692,7 @@ var init_searchVisualSearchAssets2 = __esm(() => {
72981
73692
 
72982
73693
  Returns a list of resources that are visually similar to a specified image. You can provide the source image for comparison in one of three ways:
72983
73694
  - Provide a URL of an image
72984
- - Specify the public ID or asset ID of an existing image
73695
+ - Specify the asset ID of an existing image
72985
73696
  - Provide a textual description
72986
73697
  `,
72987
73698
  scopes: ["librarian"],
@@ -73011,7 +73722,7 @@ var AsyncUploadResponseStatus$zodSchema, AsyncUploadResponse$zodSchema;
73011
73722
  var init_asyncuploadresponse = __esm(() => {
73012
73723
  init_zod();
73013
73724
  init_resourcetype();
73014
- init_storagetype();
73725
+ init_uploaddeliverytype();
73015
73726
  AsyncUploadResponseStatus$zodSchema = _enum2([
73016
73727
  "pending"
73017
73728
  ]).describe("The status of the asynchronous upload. Will be 'pending' for async uploads.");
@@ -73021,7 +73732,7 @@ var init_asyncuploadresponse = __esm(() => {
73021
73732
  requester_ip: string2().optional().describe("The IP address of the requester. This is only included if a product environment has requester_ip tracking enabled."),
73022
73733
  resource_type: ResourceType$zodSchema.optional().describe("The type of resource."),
73023
73734
  status: AsyncUploadResponseStatus$zodSchema.describe("The status of the asynchronous upload. Will be 'pending' for async uploads."),
73024
- type: StorageType$zodSchema.describe("The storage type of the resource.")
73735
+ type: UploadDeliveryType$zodSchema.describe("Delivery types accepted by upload and rename operations.")
73025
73736
  }).describe("Response returned when an upload is processed asynchronously (async=true)");
73026
73737
  });
73027
73738
 
@@ -73038,13 +73749,8 @@ var init_uploadop = __esm(() => {
73038
73749
  cloud_name: string2().describe("The cloud name of your product environment.").optional()
73039
73750
  });
73040
73751
  UploadRequestRequest$zodSchema = object({
73041
- resource_type: UploadResourceType$zodSchema.default("auto").describe(`The type of resource to upload:
73042
- - "image" for uploading strictly images
73043
- - "video" for uploading strictly videos
73044
- - "raw" for uploading non-media files
73045
- - "auto" for allowing Cloudinary to automatically detect the type of the uploaded file
73046
- `),
73047
- upload_request: UploadRequest$zodSchema
73752
+ resource_type: UploadResourceType$zodSchema.default("auto").describe("The type of resource (image, video, raw, or auto)."),
73753
+ upload_request: UploadRequest$zodSchema.describe("The file to upload and associated parameters.")
73048
73754
  });
73049
73755
  UploadResponseBody$zodSchema = union([
73050
73756
  AsyncUploadResponse$zodSchema,
@@ -73153,16 +73859,10 @@ var init_uploadUpload2 = __esm(() => {
73153
73859
  init_uploadUpload();
73154
73860
  init_uploadrequest();
73155
73861
  init_uploadresourcetype();
73156
- init_asset_upload_widget();
73157
73862
  init_tools();
73158
73863
  args20 = {
73159
- resource_type: UploadResourceType$zodSchema.default("auto").describe(`The type of resource to upload:
73160
- - "image" for uploading strictly images
73161
- - "video" for uploading strictly videos
73162
- - "raw" for uploading non-media files
73163
- - "auto" for allowing Cloudinary to automatically detect the type of the uploaded file
73164
- `),
73165
- upload_request: UploadRequest$zodSchema
73864
+ resource_type: UploadResourceType$zodSchema.default("auto").describe(`The type of resource (image, video, raw, or auto).`),
73865
+ upload_request: UploadRequest$zodSchema.describe(`The file to upload and associated parameters.`)
73166
73866
  };
73167
73867
  tool$uploadUpload = {
73168
73868
  name: "upload-asset",
@@ -73192,7 +73892,7 @@ Transform media files using transformation syntax in delivery URLs, which create
73192
73892
  readOnlyHint: false
73193
73893
  },
73194
73894
  _meta: {
73195
- ui: { resourceUri: ASSET_UPLOAD_RESOURCE_URI }
73895
+ ui: { resourceUri: appUri("asset-upload", "upload-asset") }
73196
73896
  },
73197
73897
  args: args20,
73198
73898
  tool: async (client, args21, ctx) => {
@@ -73270,7 +73970,7 @@ var init_getusageop = __esm(() => {
73270
73970
  cloud_name: string2().describe("The cloud name of your product environment.").optional()
73271
73971
  });
73272
73972
  GetUsageRequest$zodSchema = object({
73273
- date: string2().date().optional()
73973
+ date: string2().date().describe("The date for which to retrieve usage details (YYYY-MM-DD). If not specified, returns the current usage.").optional()
73274
73974
  });
73275
73975
  GetUsageResponse$zodSchema = union([
73276
73976
  ApiError$zodSchema,
@@ -73370,7 +74070,7 @@ var init_usageGetUsage2 = __esm(() => {
73370
74070
  init_usageGetUsage();
73371
74071
  init_tools();
73372
74072
  args21 = {
73373
- date: string2().date().optional()
74073
+ date: string2().date().describe("The date for which to retrieve usage details (YYYY-MM-DD). If not specified, returns the current usage.").optional()
73374
74074
  };
73375
74075
  tool$usageGetUsage = {
73376
74076
  name: "get-usage-details",
@@ -73403,7 +74103,7 @@ A report on the status of product environment usage, including storage, credits,
73403
74103
  function createMCPServer(deps) {
73404
74104
  const server = new McpServer({
73405
74105
  name: "CloudinaryAssetMgmt",
73406
- version: "0.9.0-rc.0"
74106
+ version: "0.9.1"
73407
74107
  });
73408
74108
  const getClient = deps.getSDK || (() => new CloudinaryAssetMgmtCore({
73409
74109
  security: deps.security,
@@ -73420,7 +74120,7 @@ function createMCPServer(deps) {
73420
74120
  }));
73421
74121
  const scopes = new Set(deps.scopes);
73422
74122
  const allowedTools = deps.allowedTools && new Set(deps.allowedTools);
73423
- const [tool, tools, toolMap] = createRegisterTool(deps.logger, server, getClient, scopes, allowedTools, deps.dynamic, deps.annotationFilter);
74123
+ const [tool, tools, toolMap] = createRegisterTool(deps.logger, server, getClient, scopes, allowedTools, deps.dynamic, deps.annotationFilter, deps.mcpApps);
73424
74124
  const resource = createRegisterResource(deps.logger, server, getClient, scopes);
73425
74125
  const resourceTemplate = createRegisterResourceTemplate(deps.logger, server, getClient, scopes);
73426
74126
  const prompt = createRegisterPrompt(deps.logger, server, getClient, scopes);
@@ -73449,7 +74149,7 @@ function createMCPServer(deps) {
73449
74149
  if (deps.dynamic) {
73450
74150
  registerDynamicTools(deps.logger, server, getClient, toolMap, scopes);
73451
74151
  }
73452
- registerMCPExtensions(register);
74152
+ registerMCPExtensions(register, deps.mcpApps);
73453
74153
  return { server, tools };
73454
74154
  }
73455
74155
  var init_server2 = __esm(() => {
@@ -73521,31 +74221,30 @@ Creates a downloadable ZIP or other archive format containing the specified reso
73521
74221
  },
73522
74222
  {
73523
74223
  name: "delete-asset",
73524
- description: `Delete asset by asset-id
74224
+ description: `Delete asset by asset ID
73525
74225
 
73526
- Deletes an asset using its asset ID. This endpoint replaces the legacy /resources/by_asset_id endpoint.
73527
- Returns the deletion status and asset folder information when folder decoupling is enabled.
74226
+ Deletes an asset using its immutable asset ID.
73528
74227
  `
73529
74228
  },
73530
74229
  {
73531
74230
  name: "list-images",
73532
74231
  description: `Get image assets
73533
74232
 
73534
- Retrieves a list of image assets. Results can be filtered by various criteria like tags, moderation status, prefix, or specific public IDs.
74233
+ Retrieves a list of image assets. Results can be filtered by various criteria like tags, prefix, or specific public IDs.
73535
74234
  `
73536
74235
  },
73537
74236
  {
73538
74237
  name: "list-videos",
73539
74238
  description: `Get video assets
73540
74239
 
73541
- Retrieves a list of video assets. Results can be filtered by various criteria like tags, moderation status, prefix, or specific public IDs.
74240
+ Retrieves a list of video assets. Results can be filtered by various criteria like tags, prefix, or specific public IDs.
73542
74241
  `
73543
74242
  },
73544
74243
  {
73545
74244
  name: "list-files",
73546
74245
  description: `Get raw assets
73547
74246
 
73548
- Retrieves a list of raw assets. Results can be filtered by various criteria like tags, moderation status, prefix, or specific public IDs.
74247
+ Retrieves a list of raw assets. Results can be filtered by various criteria like tags, prefix, or specific public IDs.
73549
74248
  `
73550
74249
  },
73551
74250
  {
@@ -73558,7 +74257,7 @@ Returns the details of a single resource specified by its asset ID.`
73558
74257
  name: "asset-update",
73559
74258
  description: `Updates an existing asset's metadata, tags, and other attributes using its asset ID
73560
74259
 
73561
- Updates one or more attributes of a specified resource (asset) by its asset ID. This enables you to update details of an asset by its unique and immutable identifier, regardless of public ID, display name, asset folder, resource type or deliver type. Note that you can also update many attributes of an existing asset using the explicit method, which is not rate-limited.
74260
+ Updates one or more attributes of a specified resource (asset) by its asset ID. This enables you to update details of an asset by its unique and immutable identifier, regardless of public ID, display name, asset folder, resource type or delivery type. Note that you can also update attributes of an existing asset using the explicit API endpoint.
73562
74261
  `
73563
74262
  },
73564
74263
  {
@@ -73586,13 +74285,13 @@ A report on the status of product environment usage, including storage, credits,
73586
74285
  name: "create-asset-relations",
73587
74286
  description: `Add related assets by asset ID
73588
74287
 
73589
- Relates an asset to other assets by their asset IDs, an immutable identifier, regardless of public ID, display name, asset folder, resource type or deliver type. This is a bidirectional process, meaning that the asset will also be added as a related_asset to all the other assets specified. The relation is also a one to many relationship, where the asset is related to all the assets specified, but those assets aren't also related to each other.`
74288
+ Relates an asset to other assets by their asset IDs, an immutable identifier, regardless of public ID, display name, asset folder, resource type or delivery type. This is a bidirectional process, meaning that the asset will also be added as a related_asset to all the other assets specified. The relation is also a one to many relationship, where the asset is related to all the assets specified, but those assets aren't also related to each other.`
73590
74289
  },
73591
74290
  {
73592
74291
  name: "delete-asset-relations",
73593
74292
  description: `Delete asset relations by asset ID
73594
74293
 
73595
- Unrelates the asset from other assets, specified by their asset IDs, an immutable identifier, regardless of public ID, display name, asset folder, resource type or deliver type. This is a bidirectional process, meaning that the asset will also be removed as a related_asset from all the other assets specified.`
74294
+ Unrelates the asset from other assets, specified by their asset IDs, an immutable identifier, regardless of public ID, display name, asset folder, resource type or delivery type. This is a bidirectional process, meaning that the asset will also be removed as a related_asset from all the other assets specified.`
73596
74295
  },
73597
74296
  {
73598
74297
  name: "move-folder",
@@ -73621,14 +74320,7 @@ Lists the folders that match the specified search expression. Limited to 2000 re
73621
74320
  },
73622
74321
  {
73623
74322
  name: "search-assets",
73624
- description: `Provides a powerful query interface to filter and retrieve assets and their details
73625
-
73626
- Returns a list of resources matching the specified search criteria.
73627
-
73628
- Uses Lucene-like query language to search by descriptive attributes (public_id, filename, folder, tags, context), file details (resource_type, format, bytes, width, height), embedded data (image_metadata), and analyzed data (face_count, colors, quality_score). Supports aggregate counts and complex Boolean expressions.
73629
-
73630
- Examples: tags:shirt AND uploaded_at>1d, resource_type:image AND bytes>1mb, folder:products OR context.category:electronics
73631
- `
74323
+ description: "Provides a powerful query interface to filter and retrieve assets and their details\n\nReturns a list of resources matching the specified search criteria.\n\nUses a Lucene-like query language to filter assets by descriptive attributes (`public_id`, `asset_id`, `filename`, `display_name`, `folder` / `asset_folder`, `tags`, `context.<key>`), file details (`resource_type`, `type`, `format`, `bytes`, `width`, `height`, `duration`, `pages`, `aspect_ratio`, `transparent`, `grayscale`), lifecycle dates (`uploaded_at`, `created_at`, `taken_at`, `updated_at`, `last_updated.<kind>`), moderation and lifecycle state (`status`, `moderation_status`, `moderation_kind`), embedded data (`image_metadata.*`), structured metadata (`metadata.<external_id>`), and analysis fields (`face_count`, `colors`, `quality_score`, `illustration_score`, `accessibility_analysis.*`). Supports sorting, aggregate counts, and complex boolean expressions. See the `expression` parameter for the full field reference.\n\n## Expression syntax\n\n- **Match**: `field:value` (token match) or `field=value` (exact match). Examples: `tags:shirt`, `tags=cotton`.\n- **Comparisons**: `>`, `<`, `>=`, `<=` for numbers and dates. Example: `bytes>10000000`.\n- **Ranges**: `field:[from TO to]` inclusive, `field:{from TO to}` exclusive. Example: `width:{200 TO 1028}`.\n- **Booleans**: `AND`, `OR`, `NOT` (uppercase), or `+` (must), `-` (must not). `NOT` must appear between clauses — a bare leading `NOT` is a parse error; use `-field:value` to negate the first clause. Group with parentheses: `(shirt OR pants) AND clothes`.\n- **Wildcards**: trailing `*` only, for prefix match (`public_id:shoes_*`, `format:jp*`, `tags:shirt*`). Not supported on `folder`, `asset_folder`, `resource_type`, or `type`. Leading `*`, middle `*`, `?`, and bare `*` (`folder:*`, `context.alt:*`) are all parse errors — wildcards cannot be used as a \"field is present\" probe.\n- **Tokenized vs exact fields**: `tags`, `filename`, `display_name`, `context.<key>`, and `metadata.<id>` match on tokens split by whitespace and punctuation — `tags:analysis` matches the tag `full-analysis`. `public_id`, `folder`, `asset_folder`, and `format` match the whole value — `public_id:dog` will not match `dog_pldcwy`; use `public_id=\"dog_pldcwy\"` (exact) or `public_id:dog*` (prefix). These exact-match fields still accept a trailing `*` for prefix match (except `folder` / `asset_folder`, where wildcards are ignored).\n- **Dates**: ISO-8601 in quotes (`uploaded_at>\"2024-01-15\"`) or relative shorthand `Nh`, `Nd`, `Nw`, `Nm`, `Ny` (`uploaded_at>1d`, `created_at:[4w TO 1w]`). Send raw `<`/`>`, never HTML-escaped.\n- **Quoting**: wrap any value containing a space, colon, or other reserved character (`! ( ) { } [ ] ^ ~ ? \\ = & < > |`) in double quotes, or escape each character with `\\`. Examples: `tags:\"service:mantels\"`, `aspect_ratio:\"16:9\"`, `folder:\"My Folder\"`.\n\n## Common mistakes\n\n- Use `folder:` or `asset_folder:` (singular); `folders:`, `asset_folder_id:`, and other invented variants are not valid fields. Pass the exact folder name — wildcards do not apply here.\n- There is no \"has any value\" / presence probe. `folder:*`, `metadata.alt:*`, `context.key:*`, `tags:*`, and `-tags:*` are all parse errors. See *\"Which assets have any value for `metadata.<id>`?\"* under **Common tasks** for workarounds.\n- `NOT foo AND bar` is a parse error. Write it as `bar AND NOT foo` or `-foo AND bar`, and keep every `NOT` between two clauses (`a AND NOT b AND NOT c` is fine; `NOT b AND NOT c …` is not).\n- `public_id:dog` will not match `dog_pldcwy`. Use `public_id=\"dog_pldcwy\"` (exact) or `public_id:dog*` (prefix).\n- `tags=service:mantels` fails because the unquoted colon is parsed as a field separator. Use `tags=\"service:mantels\"` or `tags=service\\:mantels`.\n- Do not HTML-escape operators. Send `uploaded_at<1h`, not `uploaded_at&lt;1h`.\n- Do not leave an operand empty (e.g. `tags: AND -tags:foo`). Omit the empty clause entirely.\n\n## Tips\n\n- Set `max_results: 0` to return only `total_count` and `aggregations` without any resource payload — useful for counts and aggregation-only queries.\n- `total_count` is always present in the response; prefer it over running an aggregation just to get a count.\n- `aggregate` (both simple and range variants) and the `metadata`, `image_metadata`, `image_analysis` values of `with_field` require a Tier 2 search plan.\n- Range aggregations require each range to include a `key` label (1–20 chars, `[a-zA-Z0-9_-]+`) and at least one of `from` / `to`.\n\n## Common tasks\n\n- **Count matching assets** — put the filter in `expression` with `max_results: 0` and read `total_count` from the response. Works on every tier; no `aggregate` needed.\n- **Preview one matching asset** — set `max_results: 1`; add `with_field: [\"tags\", \"context\"]` (or `metadata`, Tier 2) to inspect values. Prefer this over fetching and scanning a full page.\n- **Distribution of values for a field** — Tier 2: `aggregate: [format|resource_type|type]` for enum counts, or range aggregations on `bytes`, `image_pixels`, `video_pixels`, or `duration`. Tier 1 fallback: run N small queries with `max_results: 0`, one per candidate value, and read `total_count` from each.\n- **\"Which assets have any value for `metadata.<id>`?\"** — not expressible directly (`metadata.X:*` is a parse error; there is no presence probe). Workarounds: (a) if the field has a known value set, enumerate — `metadata.region:(apac OR emea OR amer)`; (b) query broadly with `with_field: [\"metadata\"]` (Tier 2) and filter client-side for entries where the field is set; (c) at ingest time, attach a sentinel tag whenever the field is set, then search by that tag.\n- **Newest / largest N** — keep the filter in `expression` and sort explicitly: `sort_by: [{uploaded_at: \"desc\"}]` with `max_results: 10`.\n- **Filter by folder** — both `asset_folder:\"parent/child\"` and `folder:\"parent/child\"` match an exact folder path; there is no wildcard or \"contains\". To query across multiple folders, enumerate: `asset_folder:(\"campaigns/2024\" OR \"campaigns/2025\")`.\n- **Filter by metadata when you only know the label** — first call `list-metadata-fields` to resolve the label to an `external_id`, then query `metadata.<external_id>:value`.\n- **Multiple independent filters in one turn** — prefer one `expression` with `OR` / parentheses over firing many parallel calls: `metadata.region:apac OR metadata.region:emea` in a single request is faster and more reliable than two parallel requests.\n\n## Examples\n\n- `tags:shirt AND uploaded_at>1d`\n- `resource_type:image AND bytes>1000000 AND (format:png OR format:jpg)`\n- `folder:products AND context.category:electronics`\n- `tags:\"service:mantels\" AND -tags:discontinued`\n"
73632
74324
  },
73633
74325
  {
73634
74326
  name: "visual-search-assets",
@@ -73636,7 +74328,7 @@ Examples: tags:shirt AND uploaded_at>1d, resource_type:image AND bytes>1mb, fold
73636
74328
 
73637
74329
  Returns a list of resources that are visually similar to a specified image. You can provide the source image for comparison in one of three ways:
73638
74330
  - Provide a URL of an image
73639
- - Specify the public ID or asset ID of an existing image
74331
+ - Specify the asset ID of an existing image
73640
74332
  - Provide a textual description
73641
74333
  `
73642
74334
  },
@@ -74588,7 +75280,7 @@ http_headers = { "api-key" = "YOUR_API_KEY", "api-secret" = "YOUR_API_SECRET", "
74588
75280
  <h1>Instructions</h1>
74589
75281
  <p>One-click installation for Claude Desktop users</p>
74590
75282
  <div class="instruction-item">
74591
- <a href="https://github.com/cloudinary/asset-management-mcp/releases/download/v0.9.0-rc.0/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
75283
+ <a href="https://github.com/cloudinary/asset-management-mcp/releases/download/v0.9.1/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
74592
75284
  \uD83D\uDCE5 Download MCP Bundle
74593
75285
  </a>
74594
75286
  </div>
@@ -74780,7 +75472,8 @@ async function startStreamableHTTP(cliFlags) {
74780
75472
  cloud_name: cliFlags["cloud-name"],
74781
75473
  serverIdx: cliFlags["server-index"],
74782
75474
  region: cliFlags.region,
74783
- host: cliFlags["api-host"]
75475
+ host: cliFlags["api-host"],
75476
+ mcpApps: resolveMcpApps(cliFlags["mcp-apps"])
74784
75477
  });
74785
75478
  mcpServer.server.onerror = (error48) => {
74786
75479
  logger.error("MCP protocol error", {
@@ -74815,6 +75508,7 @@ async function startStreamableHTTP(cliFlags) {
74815
75508
  var import_express;
74816
75509
  var init_impl = __esm(() => {
74817
75510
  init_streamableHttp();
75511
+ init_config2();
74818
75512
  init_console_logger();
74819
75513
  init_server2();
74820
75514
  init_tools();
@@ -75083,7 +75777,8 @@ async function startStdio(flags) {
75083
75777
  serverURL: flags["server-url"],
75084
75778
  serverIdx: flags["server-index"],
75085
75779
  region: flags.region,
75086
- host: flags["api-host"]
75780
+ host: flags["api-host"],
75781
+ mcpApps: resolveMcpApps(flags["mcp-apps"])
75087
75782
  });
75088
75783
  await server.connect(transport);
75089
75784
  const abort = async () => {
@@ -75134,7 +75829,8 @@ async function startSSE(cliFlags) {
75134
75829
  serverURL: flags["server-url"],
75135
75830
  serverIdx: flags["server-index"],
75136
75831
  region: flags.region,
75137
- host: flags["api-host"]
75832
+ host: flags["api-host"],
75833
+ mcpApps: resolveMcpApps(flags["mcp-apps"])
75138
75834
  });
75139
75835
  const transport = new SSEServerTransport(`/message/${sessionId}`, res);
75140
75836
  const cleanup = async () => {
@@ -75214,6 +75910,7 @@ var import_express2;
75214
75910
  var init_impl2 = __esm(() => {
75215
75911
  init_sse();
75216
75912
  init_stdio2();
75913
+ init_config2();
75217
75914
  init_console_logger();
75218
75915
  init_server2();
75219
75916
  init_tools();
@@ -76218,6 +76915,18 @@ function buildContext(process2) {
76218
76915
  // src/mcp-server/cli/serve/command.ts
76219
76916
  init_zod();
76220
76917
  init_config();
76918
+
76919
+ // src/mcp-server/apps/cli-flag.ts
76920
+ init_config2();
76921
+ var mcpAppsFlag = {
76922
+ kind: "parsed",
76923
+ brief: "Enable MCP Apps (interactive UI). Bare flag or 'all'/'true' enables all; 'none'/'false' disables; or comma-separated: asset-gallery,asset-details,asset-upload. Env: CLOUDINARY_MCP_APPS.",
76924
+ optional: true,
76925
+ inferEmpty: true,
76926
+ parse: parseMcpAppsList
76927
+ };
76928
+
76929
+ // src/mcp-server/cli/serve/command.ts
76221
76930
  init_console_logger();
76222
76931
  init_scopes();
76223
76932
  var serveCommand = sn({
@@ -76249,7 +76958,7 @@ var serveCommand = sn({
76249
76958
  },
76250
76959
  mode: {
76251
76960
  kind: "enum",
76252
- brief: "Server mode (dynamic: expose list_tools, describe_tool, and execute_tool instead of individual tools)",
76961
+ brief: "Server mode (dynamic: expose list_tools, describe_tool_input, and execute_tool instead of individual tools)",
76253
76962
  values: ["dynamic"],
76254
76963
  optional: true
76255
76964
  },
@@ -76322,6 +77031,7 @@ var serveCommand = sn({
76322
77031
  optional: true,
76323
77032
  parse: (value) => value
76324
77033
  },
77034
+ "mcp-apps": mcpAppsFlag,
76325
77035
  "log-level": {
76326
77036
  kind: "enum",
76327
77037
  brief: "The log level to use for the server",
@@ -76392,7 +77102,7 @@ var startCommand = sn({
76392
77102
  },
76393
77103
  mode: {
76394
77104
  kind: "enum",
76395
- brief: "Server mode (dynamic: expose list_tools, describe_tool, and execute_tool instead of individual tools)",
77105
+ brief: "Server mode (dynamic: expose list_tools, describe_tool_input, and execute_tool instead of individual tools)",
76396
77106
  values: ["dynamic"],
76397
77107
  optional: true
76398
77108
  },
@@ -76465,6 +77175,7 @@ var startCommand = sn({
76465
77175
  optional: true,
76466
77176
  parse: (value) => value
76467
77177
  },
77178
+ "mcp-apps": mcpAppsFlag,
76468
77179
  "log-level": {
76469
77180
  kind: "enum",
76470
77181
  brief: "The log level to use for the server",
@@ -76513,7 +77224,7 @@ var routes = ln({
76513
77224
  var app = _e(routes, {
76514
77225
  name: "mcp",
76515
77226
  versionInfo: {
76516
- currentVersion: "0.9.0-rc.0"
77227
+ currentVersion: "0.9.1"
76517
77228
  }
76518
77229
  });
76519
77230
  Yt(app, process4.argv.slice(2), buildContext(process4));
@@ -76521,5 +77232,5 @@ export {
76521
77232
  app
76522
77233
  };
76523
77234
 
76524
- //# debugId=2917C5DD083B0D6C64756E2164756E21
77235
+ //# debugId=92BB3EDCF4CED14664756E2164756E21
76525
77236
  //# sourceMappingURL=mcp-server.js.map