@cloudinary/asset-management-mcp 0.9.2 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/bin/mcp-server.js +1356 -188
- package/bin/mcp-server.js.map +70 -35
- package/esm/funcs/assetsDestroyByAssetId.d.ts +2 -2
- package/esm/funcs/assetsDestroyByAssetId.d.ts.map +1 -1
- package/esm/funcs/assetsDestroyByAssetId.js +2 -2
- package/esm/funcs/assetsDestroyByAssetId.js.map +1 -1
- package/esm/funcs/assetsDownloadAssetByAssetId.d.ts +22 -0
- package/esm/funcs/assetsDownloadAssetByAssetId.d.ts.map +1 -0
- package/esm/funcs/assetsDownloadAssetByAssetId.js +116 -0
- package/esm/funcs/assetsDownloadAssetByAssetId.js.map +1 -0
- package/esm/funcs/assetsGetResourceByBody.d.ts +16 -0
- package/esm/funcs/assetsGetResourceByBody.d.ts.map +1 -0
- package/esm/funcs/assetsGetResourceByBody.js +89 -0
- package/esm/funcs/assetsGetResourceByBody.js.map +1 -0
- package/esm/funcs/assetsInvalidateDerivedByUrls.d.ts +16 -0
- package/esm/funcs/assetsInvalidateDerivedByUrls.d.ts.map +1 -0
- package/esm/funcs/assetsInvalidateDerivedByUrls.js +89 -0
- package/esm/funcs/assetsInvalidateDerivedByUrls.js.map +1 -0
- package/esm/funcs/assetsListResourcesByContainerId.d.ts +15 -0
- package/esm/funcs/assetsListResourcesByContainerId.d.ts.map +1 -0
- package/esm/funcs/assetsListResourcesByContainerId.js +106 -0
- package/esm/funcs/assetsListResourcesByContainerId.js.map +1 -0
- package/esm/funcs/assetsUpdateResourceByBody.d.ts +16 -0
- package/esm/funcs/assetsUpdateResourceByBody.d.ts.map +1 -0
- package/esm/funcs/assetsUpdateResourceByBody.js +89 -0
- package/esm/funcs/assetsUpdateResourceByBody.js.map +1 -0
- package/esm/funcs/foldersGetFolderById.d.ts +16 -0
- package/esm/funcs/foldersGetFolderById.d.ts.map +1 -0
- package/esm/funcs/foldersGetFolderById.js +89 -0
- package/esm/funcs/foldersGetFolderById.js.map +1 -0
- package/esm/funcs/foldersGetFolderByPath.d.ts +16 -0
- package/esm/funcs/foldersGetFolderByPath.d.ts.map +1 -0
- package/esm/funcs/foldersGetFolderByPath.js +89 -0
- package/esm/funcs/foldersGetFolderByPath.js.map +1 -0
- package/esm/funcs/foldersGetFolderDescendants.d.ts +16 -0
- package/esm/funcs/foldersGetFolderDescendants.d.ts.map +1 -0
- package/esm/funcs/foldersGetFolderDescendants.js +89 -0
- package/esm/funcs/foldersGetFolderDescendants.js.map +1 -0
- package/esm/funcs/foldersRenameFolderOperation.d.ts +16 -0
- package/esm/funcs/foldersRenameFolderOperation.d.ts.map +1 -0
- package/esm/funcs/foldersRenameFolderOperation.js +89 -0
- package/esm/funcs/foldersRenameFolderOperation.js.map +1 -0
- package/esm/funcs/generationGenerateImage.d.ts +21 -0
- package/esm/funcs/generationGenerateImage.d.ts.map +1 -0
- package/esm/funcs/generationGenerateImage.js +94 -0
- package/esm/funcs/generationGenerateImage.js.map +1 -0
- package/esm/funcs/generationGenerateImageFromImages.d.ts +31 -0
- package/esm/funcs/generationGenerateImageFromImages.d.ts.map +1 -0
- package/esm/funcs/generationGenerateImageFromImages.js +104 -0
- package/esm/funcs/generationGenerateImageFromImages.js.map +1 -0
- package/esm/funcs/initialBackupCreateInitialBackup.d.ts +18 -0
- package/esm/funcs/initialBackupCreateInitialBackup.d.ts.map +1 -0
- package/esm/funcs/initialBackupCreateInitialBackup.js +93 -0
- package/esm/funcs/initialBackupCreateInitialBackup.js.map +1 -0
- package/esm/funcs/initialBackupGetInitialBackup.d.ts +15 -0
- package/esm/funcs/initialBackupGetInitialBackup.d.ts.map +1 -0
- package/esm/funcs/initialBackupGetInitialBackup.js +95 -0
- package/esm/funcs/initialBackupGetInitialBackup.js.map +1 -0
- package/esm/funcs/initialBackupListInitialBackups.d.ts +15 -0
- package/esm/funcs/initialBackupListInitialBackups.d.ts.map +1 -0
- package/esm/funcs/initialBackupListInitialBackups.js +97 -0
- package/esm/funcs/initialBackupListInitialBackups.js.map +1 -0
- package/esm/funcs/peopleInspectPeoplePermissions.d.ts +16 -0
- package/esm/funcs/peopleInspectPeoplePermissions.d.ts.map +1 -0
- package/esm/funcs/peopleInspectPeoplePermissions.js +89 -0
- package/esm/funcs/peopleInspectPeoplePermissions.js.map +1 -0
- package/esm/funcs/searchSearchAssets.d.ts +3 -2
- package/esm/funcs/searchSearchAssets.d.ts.map +1 -1
- package/esm/funcs/searchSearchAssets.js +3 -2
- package/esm/funcs/searchSearchAssets.js.map +1 -1
- package/esm/funcs/tasksGetGenerationTaskStatus.d.ts +15 -0
- package/esm/funcs/tasksGetGenerationTaskStatus.d.ts.map +1 -0
- package/esm/funcs/tasksGetGenerationTaskStatus.js +95 -0
- package/esm/funcs/tasksGetGenerationTaskStatus.js.map +1 -0
- package/esm/funcs/uploadConcat.d.ts +20 -0
- package/esm/funcs/uploadConcat.d.ts.map +1 -0
- package/esm/funcs/uploadConcat.js +93 -0
- package/esm/funcs/uploadConcat.js.map +1 -0
- package/esm/funcs/uploadEvalUploadParams.d.ts +16 -0
- package/esm/funcs/uploadEvalUploadParams.d.ts.map +1 -0
- package/esm/funcs/uploadEvalUploadParams.js +89 -0
- package/esm/funcs/uploadEvalUploadParams.js.map +1 -0
- package/esm/funcs/uploadUploadChunk.d.ts +12 -1
- package/esm/funcs/uploadUploadChunk.d.ts.map +1 -1
- package/esm/funcs/uploadUploadChunk.js +19 -4
- package/esm/funcs/uploadUploadChunk.js.map +1 -1
- package/esm/hooks/oauth2scopes.d.ts +5 -1
- package/esm/hooks/oauth2scopes.d.ts.map +1 -1
- package/esm/landing-page.js +1 -1
- package/esm/lib/config.d.ts +4 -4
- package/esm/lib/config.js +4 -4
- package/esm/lib/config.js.map +1 -1
- package/esm/lib/encodings.js +1 -1
- package/esm/lib/encodings.js.map +1 -1
- package/esm/lib/env.d.ts.map +1 -1
- package/esm/lib/env.js +2 -2
- package/esm/lib/env.js.map +1 -1
- package/esm/lib/http.d.ts +1 -1
- package/esm/lib/http.d.ts.map +1 -1
- package/esm/lib/http.js +1 -1
- package/esm/lib/http.js.map +1 -1
- package/esm/lib/primitives.d.ts +1 -0
- package/esm/lib/primitives.d.ts.map +1 -1
- package/esm/lib/primitives.js +17 -0
- package/esm/lib/primitives.js.map +1 -1
- package/esm/lib/retries.js +7 -0
- package/esm/lib/retries.js.map +1 -1
- package/esm/lib/security.d.ts +5 -4
- package/esm/lib/security.d.ts.map +1 -1
- package/esm/lib/security.js +4 -5
- package/esm/lib/security.js.map +1 -1
- package/esm/mcp-server/apps/app-shared.d.ts +3 -3
- package/esm/mcp-server/apps/app-shared.d.ts.map +1 -1
- package/esm/mcp-server/apps/app-shared.js +56 -3
- package/esm/mcp-server/apps/app-shared.js.map +1 -1
- package/esm/mcp-server/apps/asset-gallery-app.js +24 -8
- package/esm/mcp-server/apps/asset-gallery-app.js.map +1 -1
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/mcp-server.js.map +1 -1
- package/esm/mcp-server/server.d.ts.map +1 -1
- package/esm/mcp-server/server.js +7 -1
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/assetsDestroyByAssetId.d.ts +1 -1
- package/esm/mcp-server/tools/assetsDestroyByAssetId.js +2 -2
- package/esm/mcp-server/tools/assetsDestroyByAssetId.js.map +1 -1
- package/esm/mcp-server/tools/generationGenerateImage.d.ts +7 -0
- package/esm/mcp-server/tools/generationGenerateImage.d.ts.map +1 -0
- package/esm/mcp-server/tools/generationGenerateImage.js +42 -0
- package/esm/mcp-server/tools/generationGenerateImage.js.map +1 -0
- package/esm/mcp-server/tools/generationGenerateImageFromImages.d.ts +7 -0
- package/esm/mcp-server/tools/generationGenerateImageFromImages.d.ts.map +1 -0
- package/esm/mcp-server/tools/generationGenerateImageFromImages.js +59 -0
- package/esm/mcp-server/tools/generationGenerateImageFromImages.js.map +1 -0
- package/esm/mcp-server/tools/searchSearchAssets.d.ts.map +1 -1
- package/esm/mcp-server/tools/searchSearchAssets.js +3 -2
- package/esm/mcp-server/tools/searchSearchAssets.js.map +1 -1
- package/esm/mcp-server/tools/tasksGetGenerationTaskStatus.d.ts +8 -0
- package/esm/mcp-server/tools/tasksGetGenerationTaskStatus.d.ts.map +1 -0
- package/esm/mcp-server/tools/tasksGetGenerationTaskStatus.js +36 -0
- package/esm/mcp-server/tools/tasksGetGenerationTaskStatus.js.map +1 -0
- package/esm/mcp-server/tools.d.ts.map +1 -1
- package/esm/mcp-server/tools.js +2 -0
- package/esm/mcp-server/tools.js.map +1 -1
- package/esm/models/addonquota.d.ts +13 -0
- package/esm/models/addonquota.d.ts.map +1 -0
- package/esm/models/addonquota.js +13 -0
- package/esm/models/addonquota.js.map +1 -0
- package/esm/models/admincontextoperation.d.ts +12 -0
- package/esm/models/admincontextoperation.d.ts.map +1 -0
- package/esm/models/admincontextoperation.js +12 -0
- package/esm/models/admincontextoperation.js.map +1 -0
- package/esm/models/assignfolderrolesrequest.d.ts +8 -8
- package/esm/models/assignfolderrolesrequest.d.ts.map +1 -1
- package/esm/models/assignfolderrolesrequest.js +4 -4
- package/esm/models/assignfolderrolesrequest.js.map +1 -1
- package/esm/models/concatop.d.ts +10 -0
- package/esm/models/concatop.d.ts.map +1 -0
- package/esm/models/concatop.js +16 -0
- package/esm/models/concatop.js.map +1 -0
- package/esm/models/concatrequest.d.ts +121 -0
- package/esm/models/concatrequest.d.ts.map +1 -0
- package/esm/models/concatrequest.js +110 -0
- package/esm/models/concatrequest.js.map +1 -0
- package/esm/models/concatresponse.d.ts +39 -0
- package/esm/models/concatresponse.d.ts.map +1 -0
- package/esm/models/concatresponse.js +30 -0
- package/esm/models/concatresponse.js.map +1 -0
- package/esm/models/createfolderop.d.ts +1 -1
- package/esm/models/createfolderop.d.ts.map +1 -1
- package/esm/models/createfolderop.js +1 -1
- package/esm/models/createfolderop.js.map +1 -1
- package/esm/models/createfolderresponse.d.ts +4 -2
- package/esm/models/createfolderresponse.d.ts.map +1 -1
- package/esm/models/createfolderresponse.js +4 -2
- package/esm/models/createfolderresponse.js.map +1 -1
- package/esm/models/createinitialbackupop.d.ts +10 -0
- package/esm/models/createinitialbackupop.d.ts.map +1 -0
- package/esm/models/createinitialbackupop.js +16 -0
- package/esm/models/createinitialbackupop.js.map +1 -0
- package/esm/models/declarativeimagesize.d.ts +74 -0
- package/esm/models/declarativeimagesize.d.ts.map +1 -0
- package/esm/models/declarativeimagesize.js +53 -0
- package/esm/models/declarativeimagesize.js.map +1 -0
- package/esm/models/destroybyassetidop.d.ts +3 -3
- package/esm/models/destroybyassetidop.d.ts.map +1 -1
- package/esm/models/destroybyassetidop.js +3 -3
- package/esm/models/destroybyassetidop.js.map +1 -1
- package/esm/models/destroybyassetidrequest.d.ts +9 -0
- package/esm/models/destroybyassetidrequest.d.ts.map +1 -0
- package/esm/models/{componentsdestroyrequest.js → destroybyassetidrequest.js} +3 -3
- package/esm/models/destroybyassetidrequest.js.map +1 -0
- package/esm/models/destroybyassetidresponse.d.ts +22 -0
- package/esm/models/destroybyassetidresponse.d.ts.map +1 -0
- package/esm/models/destroybyassetidresponse.js +20 -0
- package/esm/models/destroybyassetidresponse.js.map +1 -0
- package/esm/models/dimensionsimagesize.d.ts +10 -0
- package/esm/models/dimensionsimagesize.d.ts.map +1 -0
- package/esm/models/dimensionsimagesize.js +11 -0
- package/esm/models/dimensionsimagesize.js.map +1 -0
- package/esm/models/downloadassetbyassetidop.d.ts +19 -0
- package/esm/models/downloadassetbyassetidop.d.ts.map +1 -0
- package/esm/models/downloadassetbyassetidop.js +27 -0
- package/esm/models/downloadassetbyassetidop.js.map +1 -0
- package/esm/models/error.d.ts +18 -0
- package/esm/models/error.d.ts.map +1 -0
- package/esm/models/error.js +14 -0
- package/esm/models/error.js.map +1 -0
- package/esm/models/errorcategory.d.ts +34 -0
- package/esm/models/errorcategory.d.ts.map +1 -0
- package/esm/models/errorcategory.js +27 -0
- package/esm/models/errorcategory.js.map +1 -0
- package/esm/models/errorresponse.d.ts +11 -0
- package/esm/models/errorresponse.d.ts.map +1 -0
- package/esm/models/errorresponse.js +11 -0
- package/esm/models/errorresponse.js.map +1 -0
- package/esm/models/evalrequest.d.ts +17 -0
- package/esm/models/evalrequest.d.ts.map +1 -0
- package/esm/models/evalrequest.js +22 -0
- package/esm/models/evalrequest.js.map +1 -0
- package/esm/models/evaluploadparamsop.d.ts +11 -0
- package/esm/models/evaluploadparamsop.d.ts.map +1 -0
- package/esm/models/evaluploadparamsop.js +15 -0
- package/esm/models/evaluploadparamsop.js.map +1 -0
- package/esm/models/explicitrequest.d.ts +9 -9
- package/esm/models/explicitrequest.d.ts.map +1 -1
- package/esm/models/explicitrequest.js +7 -7
- package/esm/models/explicitrequest.js.map +1 -1
- package/esm/models/exploderesourceop.d.ts +4 -4
- package/esm/models/exploderesourceop.d.ts.map +1 -1
- package/esm/models/exploderesourceop.js +4 -4
- package/esm/models/exploderesourceop.js.map +1 -1
- package/esm/models/feature.d.ts +16 -0
- package/esm/models/feature.d.ts.map +1 -0
- package/esm/models/feature.js +15 -0
- package/esm/models/feature.js.map +1 -0
- package/esm/models/folderbyidrequest.d.ts +9 -0
- package/esm/models/folderbyidrequest.d.ts.map +1 -0
- package/esm/models/folderbyidrequest.js +10 -0
- package/esm/models/folderbyidrequest.js.map +1 -0
- package/esm/models/folderbypathrequest.d.ts +10 -0
- package/esm/models/folderbypathrequest.d.ts.map +1 -0
- package/esm/models/folderbypathrequest.js +11 -0
- package/esm/models/folderbypathrequest.js.map +1 -0
- package/esm/models/folderdescendantsrequest.d.ts +11 -0
- package/esm/models/folderdescendantsrequest.d.ts.map +1 -0
- package/esm/models/folderdescendantsrequest.js +11 -0
- package/esm/models/folderdescendantsrequest.js.map +1 -0
- package/esm/models/folderdescendantsresponse.d.ts +10 -0
- package/esm/models/folderdescendantsresponse.d.ts.map +1 -0
- package/esm/models/folderdescendantsresponse.js +10 -0
- package/esm/models/folderdescendantsresponse.js.map +1 -0
- package/esm/models/folderdetailresponse.d.ts +24 -0
- package/esm/models/folderdetailresponse.d.ts.map +1 -0
- package/esm/models/folderdetailresponse.js +36 -0
- package/esm/models/folderdetailresponse.js.map +1 -0
- package/esm/models/folderrenamerequest.d.ts +13 -0
- package/esm/models/folderrenamerequest.d.ts.map +1 -0
- package/esm/models/folderrenamerequest.js +14 -0
- package/esm/models/folderrenamerequest.js.map +1 -0
- package/esm/models/folderrenameresponse.d.ts +12 -0
- package/esm/models/folderrenameresponse.d.ts.map +1 -0
- package/esm/models/folderrenameresponse.js +13 -0
- package/esm/models/folderrenameresponse.js.map +1 -0
- package/esm/models/generatearchiveop.d.ts +4 -4
- package/esm/models/generatearchiveop.d.ts.map +1 -1
- package/esm/models/generatearchiveop.js +4 -4
- package/esm/models/generatearchiveop.js.map +1 -1
- package/esm/models/generatedasset.d.ts +40 -0
- package/esm/models/generatedasset.d.ts.map +1 -0
- package/esm/models/generatedasset.js +31 -0
- package/esm/models/generatedasset.js.map +1 -0
- package/esm/models/generatedassets.d.ts +10 -0
- package/esm/models/generatedassets.d.ts.map +1 -0
- package/esm/models/generatedassets.js +10 -0
- package/esm/models/generatedassets.js.map +1 -0
- package/esm/models/generateimagefromimagesop.d.ts +12 -0
- package/esm/models/generateimagefromimagesop.d.ts.map +1 -0
- package/esm/models/generateimagefromimagesop.js +20 -0
- package/esm/models/generateimagefromimagesop.js.map +1 -0
- package/esm/models/generateimageop.d.ts +12 -0
- package/esm/models/generateimageop.d.ts.map +1 -0
- package/esm/models/generateimageop.js +20 -0
- package/esm/models/generateimageop.js.map +1 -0
- package/esm/models/generateimagerequest.d.ts +23 -0
- package/esm/models/generateimagerequest.d.ts.map +1 -0
- package/esm/models/generateimagerequest.js +21 -0
- package/esm/models/generateimagerequest.js.map +1 -0
- package/esm/models/generateimageresult.d.ts +13 -0
- package/esm/models/generateimageresult.d.ts.map +1 -0
- package/esm/models/generateimageresult.js +14 -0
- package/esm/models/generateimageresult.js.map +1 -0
- package/esm/models/getfolderbyidop.d.ts +10 -0
- package/esm/models/getfolderbyidop.d.ts.map +1 -0
- package/esm/models/getfolderbyidop.js +16 -0
- package/esm/models/getfolderbyidop.js.map +1 -0
- package/esm/models/getfolderbypathop.d.ts +10 -0
- package/esm/models/getfolderbypathop.d.ts.map +1 -0
- package/esm/models/getfolderbypathop.js +16 -0
- package/esm/models/getfolderbypathop.js.map +1 -0
- package/esm/models/getfolderdescendantsop.d.ts +10 -0
- package/esm/models/getfolderdescendantsop.d.ts.map +1 -0
- package/esm/models/getfolderdescendantsop.js +16 -0
- package/esm/models/getfolderdescendantsop.js.map +1 -0
- package/esm/models/getgenerationtaskstatusop.d.ts +15 -0
- package/esm/models/getgenerationtaskstatusop.d.ts.map +1 -0
- package/esm/models/getgenerationtaskstatusop.js +21 -0
- package/esm/models/getgenerationtaskstatusop.js.map +1 -0
- package/esm/models/getinitialbackupop.d.ts +14 -0
- package/esm/models/getinitialbackupop.d.ts.map +1 -0
- package/esm/models/getinitialbackupop.js +19 -0
- package/esm/models/getinitialbackupop.js.map +1 -0
- package/esm/models/getresourcebybodyop.d.ts +10 -0
- package/esm/models/getresourcebybodyop.d.ts.map +1 -0
- package/esm/models/getresourcebybodyop.js +16 -0
- package/esm/models/getresourcebybodyop.js.map +1 -0
- package/esm/models/getvideoviewsop.d.ts +4 -4
- package/esm/models/getvideoviewsop.d.ts.map +1 -1
- package/esm/models/getvideoviewsop.js +4 -4
- package/esm/models/getvideoviewsop.js.map +1 -1
- package/esm/models/imageformat.d.ts +32 -0
- package/esm/models/imageformat.d.ts.map +1 -0
- package/esm/models/imageformat.js +25 -0
- package/esm/models/imageformat.js.map +1 -0
- package/esm/models/imagesize.d.ts +20 -0
- package/esm/models/imagesize.d.ts.map +1 -0
- package/esm/models/imagesize.js +12 -0
- package/esm/models/imagesize.js.map +1 -0
- package/esm/models/imagetoimagerequest.d.ts +26 -0
- package/esm/models/imagetoimagerequest.d.ts.map +1 -0
- package/esm/models/imagetoimagerequest.js +23 -0
- package/esm/models/imagetoimagerequest.js.map +1 -0
- package/esm/models/info.d.ts +15 -15
- package/esm/models/info.d.ts.map +1 -1
- package/esm/models/info.js +11 -11
- package/esm/models/info.js.map +1 -1
- package/esm/models/initialbackupcreaterequest.d.ts +6 -0
- package/esm/models/initialbackupcreaterequest.d.ts.map +1 -0
- package/esm/models/initialbackupcreaterequest.js +9 -0
- package/esm/models/initialbackupcreaterequest.js.map +1 -0
- package/esm/models/initialbackupcreateresponse.d.ts +6 -0
- package/esm/models/initialbackupcreateresponse.d.ts.map +1 -0
- package/esm/models/initialbackupcreateresponse.js +9 -0
- package/esm/models/initialbackupcreateresponse.js.map +1 -0
- package/esm/models/initialbackuplistresponse.d.ts +8 -0
- package/esm/models/initialbackuplistresponse.d.ts.map +1 -0
- package/esm/models/initialbackuplistresponse.js +11 -0
- package/esm/models/initialbackuplistresponse.js.map +1 -0
- package/esm/models/initialbackupprogressresponse.d.ts +29 -0
- package/esm/models/initialbackupprogressresponse.d.ts.map +1 -0
- package/esm/models/initialbackupprogressresponse.js +28 -0
- package/esm/models/initialbackupprogressresponse.js.map +1 -0
- package/esm/models/initialbackupstatusenum.d.ts +22 -0
- package/esm/models/initialbackupstatusenum.d.ts.map +1 -0
- package/esm/models/initialbackupstatusenum.js +21 -0
- package/esm/models/initialbackupstatusenum.js.map +1 -0
- package/esm/models/initialbackupsummary.d.ts +9 -0
- package/esm/models/initialbackupsummary.d.ts.map +1 -0
- package/esm/models/initialbackupsummary.js +13 -0
- package/esm/models/initialbackupsummary.js.map +1 -0
- package/esm/models/inspectpeoplepermissionsop.d.ts +10 -0
- package/esm/models/inspectpeoplepermissionsop.d.ts.map +1 -0
- package/esm/models/inspectpeoplepermissionsop.js +16 -0
- package/esm/models/inspectpeoplepermissionsop.js.map +1 -0
- package/esm/models/invalidatebyurlsrequest.d.ts +10 -0
- package/esm/models/invalidatebyurlsrequest.d.ts.map +1 -0
- package/esm/models/invalidatebyurlsrequest.js +10 -0
- package/esm/models/invalidatebyurlsrequest.js.map +1 -0
- package/esm/models/invalidatebyurlsresponse.d.ts +12 -0
- package/esm/models/invalidatebyurlsresponse.d.ts.map +1 -0
- package/esm/models/invalidatebyurlsresponse.js +12 -0
- package/esm/models/invalidatebyurlsresponse.js.map +1 -0
- package/esm/models/invalidatederivedbyurlsop.d.ts +10 -0
- package/esm/models/invalidatederivedbyurlsop.d.ts.map +1 -0
- package/esm/models/invalidatederivedbyurlsop.js +16 -0
- package/esm/models/invalidatederivedbyurlsop.js.map +1 -0
- package/esm/models/limits.d.ts +10 -0
- package/esm/models/limits.d.ts.map +1 -0
- package/esm/models/limits.js +10 -0
- package/esm/models/limits.js.map +1 -0
- package/esm/models/listinitialbackupsop.d.ts +15 -0
- package/esm/models/listinitialbackupsop.d.ts.map +1 -0
- package/esm/models/listinitialbackupsop.js +20 -0
- package/esm/models/listinitialbackupsop.js.map +1 -0
- package/esm/models/listpeopleop.d.ts +4 -4
- package/esm/models/listpeopleop.d.ts.map +1 -1
- package/esm/models/listpeopleop.js +4 -4
- package/esm/models/listpeopleop.js.map +1 -1
- package/esm/models/listresourcesbycontaineridop.d.ts +18 -0
- package/esm/models/listresourcesbycontaineridop.d.ts.map +1 -0
- package/esm/models/listresourcesbycontaineridop.js +23 -0
- package/esm/models/listresourcesbycontaineridop.js.map +1 -0
- package/esm/models/managedassetreference.d.ts +27 -0
- package/esm/models/managedassetreference.d.ts.map +1 -0
- package/esm/models/managedassetreference.js +19 -0
- package/esm/models/managedassetreference.js.map +1 -0
- package/esm/models/managedassetstorage.d.ts +50 -0
- package/esm/models/managedassetstorage.d.ts.map +1 -0
- package/esm/models/managedassetstorage.js +38 -0
- package/esm/models/managedassetstorage.js.map +1 -0
- package/esm/models/managedassettarget.d.ts +25 -0
- package/esm/models/managedassettarget.d.ts.map +1 -0
- package/esm/models/managedassettarget.js +21 -0
- package/esm/models/managedassettarget.js.map +1 -0
- package/esm/models/model.d.ts +11 -0
- package/esm/models/model.d.ts.map +1 -0
- package/esm/models/model.js +11 -0
- package/esm/models/model.js.map +1 -0
- package/esm/models/modelbyfamily.d.ts +64 -0
- package/esm/models/modelbyfamily.d.ts.map +1 -0
- package/esm/models/modelbyfamily.js +45 -0
- package/esm/models/modelbyfamily.js.map +1 -0
- package/esm/models/modelbyid.d.ts +63 -0
- package/esm/models/modelbyid.d.ts.map +1 -0
- package/esm/models/modelbyid.js +54 -0
- package/esm/models/modelbyid.js.map +1 -0
- package/esm/models/modelselection.d.ts +15 -0
- package/esm/models/modelselection.d.ts.map +1 -0
- package/esm/models/modelselection.js +12 -0
- package/esm/models/modelselection.js.map +1 -0
- package/esm/models/peopleinspectiongroup.d.ts +14 -0
- package/esm/models/peopleinspectiongroup.d.ts.map +1 -0
- package/esm/models/peopleinspectiongroup.js +10 -0
- package/esm/models/peopleinspectiongroup.js.map +1 -0
- package/esm/models/peopleinspectiontargets.d.ts +14 -0
- package/esm/models/peopleinspectiontargets.d.ts.map +1 -0
- package/esm/models/peopleinspectiontargets.js +24 -0
- package/esm/models/peopleinspectiontargets.js.map +1 -0
- package/esm/models/peopleinspectrequest.d.ts +10 -0
- package/esm/models/peopleinspectrequest.d.ts.map +1 -0
- package/esm/models/peopleinspectrequest.js +11 -0
- package/esm/models/peopleinspectrequest.js.map +1 -0
- package/esm/models/peopleinspectresponse.d.ts +12 -0
- package/esm/models/peopleinspectresponse.d.ts.map +1 -0
- package/esm/models/peopleinspectresponse.js +10 -0
- package/esm/models/peopleinspectresponse.js.map +1 -0
- package/esm/models/ratelimitedresponse.d.ts +13 -0
- package/esm/models/ratelimitedresponse.d.ts.map +1 -0
- package/esm/models/ratelimitedresponse.js +14 -0
- package/esm/models/ratelimitedresponse.js.map +1 -0
- package/esm/models/referenceimage.d.ts +19 -0
- package/esm/models/referenceimage.d.ts.map +1 -0
- package/esm/models/referenceimage.js +16 -0
- package/esm/models/referenceimage.js.map +1 -0
- package/esm/models/renamefolderoperationop.d.ts +10 -0
- package/esm/models/renamefolderoperationop.d.ts.map +1 -0
- package/esm/models/renamefolderoperationop.js +16 -0
- package/esm/models/renamefolderoperationop.js.map +1 -0
- package/esm/models/resourcegetbybodyrequest.d.ts +53 -0
- package/esm/models/resourcegetbybodyrequest.d.ts.map +1 -0
- package/esm/models/resourcegetbybodyrequest.js +57 -0
- package/esm/models/resourcegetbybodyrequest.js.map +1 -0
- package/esm/models/resourceinternalresponse.d.ts +118 -0
- package/esm/models/resourceinternalresponse.d.ts.map +1 -0
- package/esm/models/resourceinternalresponse.js +164 -0
- package/esm/models/resourceinternalresponse.js.map +1 -0
- package/esm/models/resourcesbycontaineridresponse.d.ts +12 -0
- package/esm/models/resourcesbycontaineridresponse.d.ts.map +1 -0
- package/esm/models/resourcesbycontaineridresponse.js +12 -0
- package/esm/models/resourcesbycontaineridresponse.js.map +1 -0
- package/esm/models/resourceupdatebybodyrequest.d.ts +85 -0
- package/esm/models/resourceupdatebybodyrequest.d.ts.map +1 -0
- package/esm/models/resourceupdatebybodyrequest.js +85 -0
- package/esm/models/resourceupdatebybodyrequest.js.map +1 -0
- package/esm/models/searchparameters.d.ts +18 -18
- package/esm/models/searchparameters.d.ts.map +1 -1
- package/esm/models/searchparameters.js +14 -14
- package/esm/models/searchparameters.js.map +1 -1
- package/esm/models/searchresponse.d.ts +8 -8
- package/esm/models/searchresponse.d.ts.map +1 -1
- package/esm/models/searchresponse.js +9 -8
- package/esm/models/searchresponse.js.map +1 -1
- package/esm/models/storage.d.ts +16 -0
- package/esm/models/storage.d.ts.map +1 -0
- package/esm/models/storage.js +16 -0
- package/esm/models/storage.js.map +1 -0
- package/esm/models/target.d.ts +16 -0
- package/esm/models/target.d.ts.map +1 -0
- package/esm/models/target.js +16 -0
- package/esm/models/target.js.map +1 -0
- package/esm/models/task.d.ts +28 -0
- package/esm/models/task.d.ts.map +1 -0
- package/esm/models/task.js +18 -0
- package/esm/models/task.js.map +1 -0
- package/esm/models/taskresponse.d.ts +14 -0
- package/esm/models/taskresponse.d.ts.map +1 -0
- package/esm/models/taskresponse.js +11 -0
- package/esm/models/taskresponse.js.map +1 -0
- package/esm/models/taskstatus.d.ts +34 -0
- package/esm/models/taskstatus.d.ts.map +1 -0
- package/esm/models/taskstatus.js +27 -0
- package/esm/models/taskstatus.js.map +1 -0
- package/esm/models/temporarystorage.d.ts +25 -0
- package/esm/models/temporarystorage.d.ts.map +1 -0
- package/esm/models/temporarystorage.js +20 -0
- package/esm/models/temporarystorage.js.map +1 -0
- package/esm/models/temporarytarget.d.ts +23 -0
- package/esm/models/temporarytarget.d.ts.map +1 -0
- package/esm/models/temporarytarget.js +18 -0
- package/esm/models/temporarytarget.js.map +1 -0
- package/esm/models/textop.d.ts +4 -4
- package/esm/models/textop.d.ts.map +1 -1
- package/esm/models/textop.js +4 -4
- package/esm/models/textop.js.map +1 -1
- package/esm/models/updateresourcebybodyop.d.ts +10 -0
- package/esm/models/updateresourcebybodyop.d.ts.map +1 -0
- package/esm/models/updateresourcebybodyop.js +16 -0
- package/esm/models/updateresourcebybodyop.js.map +1 -0
- package/esm/models/uploadchunkop.d.ts +3 -1
- package/esm/models/uploadchunkop.d.ts.map +1 -1
- package/esm/models/uploadchunkop.js +3 -1
- package/esm/models/uploadchunkop.js.map +1 -1
- package/esm/models/uploadrequest.d.ts +9 -9
- package/esm/models/uploadrequest.d.ts.map +1 -1
- package/esm/models/uploadrequest.js +7 -7
- package/esm/models/uploadrequest.js.map +1 -1
- package/esm/models/urlreference.d.ts +24 -0
- package/esm/models/urlreference.d.ts.map +1 -0
- package/esm/models/urlreference.js +19 -0
- package/esm/models/urlreference.js.map +1 -0
- package/esm/models/usageresponse.d.ts +3 -3
- package/esm/models/usageresponse.d.ts.map +1 -1
- package/esm/models/usageresponse.js +3 -2
- package/esm/models/usageresponse.js.map +1 -1
- package/esm/tool-names.d.ts.map +1 -1
- package/esm/tool-names.js +13 -1
- package/esm/tool-names.js.map +1 -1
- package/esm/types/async.d.ts.map +1 -1
- package/esm/types/async.js +6 -6
- package/esm/types/async.js.map +1 -1
- package/package.json +4 -2
- package/src/funcs/assetsDestroyByAssetId.ts +6 -6
- package/src/funcs/assetsDownloadAssetByAssetId.ts +202 -0
- package/src/funcs/assetsGetResourceByBody.ts +154 -0
- package/src/funcs/assetsInvalidateDerivedByUrls.ts +156 -0
- package/src/funcs/assetsListResourcesByContainerId.ts +186 -0
- package/src/funcs/assetsUpdateResourceByBody.ts +154 -0
- package/src/funcs/foldersGetFolderById.ts +154 -0
- package/src/funcs/foldersGetFolderByPath.ts +154 -0
- package/src/funcs/foldersGetFolderDescendants.ts +154 -0
- package/src/funcs/foldersRenameFolderOperation.ts +154 -0
- package/src/funcs/generationGenerateImage.ts +159 -0
- package/src/funcs/generationGenerateImageFromImages.ts +169 -0
- package/src/funcs/initialBackupCreateInitialBackup.ts +158 -0
- package/src/funcs/initialBackupGetInitialBackup.ts +161 -0
- package/src/funcs/initialBackupListInitialBackups.ts +166 -0
- package/src/funcs/peopleInspectPeoplePermissions.ts +154 -0
- package/src/funcs/searchSearchAssets.ts +3 -2
- package/src/funcs/tasksGetGenerationTaskStatus.ts +161 -0
- package/src/funcs/uploadConcat.ts +158 -0
- package/src/funcs/uploadEvalUploadParams.ts +154 -0
- package/src/funcs/uploadUploadChunk.ts +33 -4
- package/src/hooks/oauth2scopes.ts +5 -1
- package/src/landing-page.ts +1 -1
- package/src/lib/config.ts +4 -4
- package/src/lib/encodings.ts +1 -1
- package/src/lib/env.ts +6 -3
- package/src/lib/http.ts +3 -1
- package/src/lib/primitives.ts +16 -0
- package/src/lib/retries.ts +8 -0
- package/src/lib/security.ts +10 -5
- package/src/mcp-server/apps/app-shared.ts +56 -3
- package/src/mcp-server/apps/asset-gallery-app.ts +24 -8
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +7 -1
- package/src/mcp-server/tools/assetsDestroyByAssetId.ts +2 -2
- package/src/mcp-server/tools/generationGenerateImage.ts +52 -0
- package/src/mcp-server/tools/generationGenerateImageFromImages.ts +71 -0
- package/src/mcp-server/tools/searchSearchAssets.ts +3 -2
- package/src/mcp-server/tools/tasksGetGenerationTaskStatus.ts +44 -0
- package/src/mcp-server/tools.ts +2 -0
- package/src/models/addonquota.ts +28 -0
- package/src/models/admincontextoperation.ts +30 -0
- package/src/models/assignfolderrolesrequest.ts +14 -14
- package/src/models/concatop.ts +24 -0
- package/src/models/concatrequest.ts +363 -0
- package/src/models/concatresponse.ts +64 -0
- package/src/models/createfolderop.ts +2 -2
- package/src/models/createfolderresponse.ts +10 -4
- package/src/models/createinitialbackupop.ts +31 -0
- package/src/models/declarativeimagesize.ts +98 -0
- package/src/models/destroybyassetidop.ts +9 -7
- package/src/models/{componentsdestroyrequest.ts → destroybyassetidrequest.ts} +4 -4
- package/src/models/destroybyassetidresponse.ts +38 -0
- package/src/models/dimensionsimagesize.ts +19 -0
- package/src/models/downloadassetbyassetidop.ts +77 -0
- package/src/models/error.ts +43 -0
- package/src/models/errorcategory.ts +42 -0
- package/src/models/errorresponse.ts +23 -0
- package/src/models/evalrequest.ts +48 -0
- package/src/models/evaluploadparamsop.ts +25 -0
- package/src/models/explicitrequest.ts +28 -28
- package/src/models/exploderesourceop.ts +9 -9
- package/src/models/feature.ts +22 -0
- package/src/models/folderbyidrequest.ts +18 -0
- package/src/models/folderbypathrequest.ts +24 -0
- package/src/models/folderdescendantsrequest.ts +29 -0
- package/src/models/folderdescendantsresponse.ts +25 -0
- package/src/models/folderdetailresponse.ts +75 -0
- package/src/models/folderrenamerequest.ts +32 -0
- package/src/models/folderrenameresponse.ts +32 -0
- package/src/models/generatearchiveop.ts +9 -9
- package/src/models/generatedasset.ts +75 -0
- package/src/models/generatedassets.ts +18 -0
- package/src/models/generateimagefromimagesop.ts +42 -0
- package/src/models/generateimageop.ts +39 -0
- package/src/models/generateimagerequest.ts +57 -0
- package/src/models/generateimageresult.ts +33 -0
- package/src/models/getfolderbyidop.ts +28 -0
- package/src/models/getfolderbypathop.ts +29 -0
- package/src/models/getfolderdescendantsop.ts +29 -0
- package/src/models/getgenerationtaskstatusop.ts +44 -0
- package/src/models/getinitialbackupop.ts +39 -0
- package/src/models/getresourcebybodyop.ts +29 -0
- package/src/models/getvideoviewsop.ts +9 -9
- package/src/models/imageformat.ts +40 -0
- package/src/models/imagesize.ts +37 -0
- package/src/models/imagetoimagerequest.ts +63 -0
- package/src/models/info.ts +23 -21
- package/src/models/initialbackupcreaterequest.ts +16 -0
- package/src/models/initialbackupcreateresponse.ts +16 -0
- package/src/models/initialbackuplistresponse.ts +26 -0
- package/src/models/initialbackupprogressresponse.ts +61 -0
- package/src/models/initialbackupstatusenum.ts +30 -0
- package/src/models/initialbackupsummary.ts +29 -0
- package/src/models/inspectpeoplepermissionsop.ts +31 -0
- package/src/models/invalidatebyurlsrequest.ts +27 -0
- package/src/models/invalidatebyurlsresponse.ts +33 -0
- package/src/models/invalidatederivedbyurlsop.ts +33 -0
- package/src/models/limits.ts +18 -0
- package/src/models/listinitialbackupsop.ts +45 -0
- package/src/models/listpeopleop.ts +9 -9
- package/src/models/listresourcesbycontaineridop.ts +61 -0
- package/src/models/managedassetreference.ts +47 -0
- package/src/models/managedassetstorage.ts +83 -0
- package/src/models/managedassettarget.ts +48 -0
- package/src/models/model.ts +17 -0
- package/src/models/modelbyfamily.ts +84 -0
- package/src/models/modelbyid.ts +75 -0
- package/src/models/modelselection.ts +26 -0
- package/src/models/peopleinspectiongroup.ts +26 -0
- package/src/models/peopleinspectiontargets.ts +45 -0
- package/src/models/peopleinspectrequest.ts +22 -0
- package/src/models/peopleinspectresponse.ts +24 -0
- package/src/models/ratelimitedresponse.ts +30 -0
- package/src/models/referenceimage.ts +39 -0
- package/src/models/renamefolderoperationop.ts +29 -0
- package/src/models/resourcegetbybodyrequest.ts +109 -0
- package/src/models/resourceinternalresponse.ts +376 -0
- package/src/models/resourcesbycontaineridresponse.ts +35 -0
- package/src/models/resourceupdatebybodyrequest.ts +168 -0
- package/src/models/searchparameters.ts +35 -35
- package/src/models/searchresponse.ts +24 -19
- package/src/models/storage.ts +39 -0
- package/src/models/target.ts +39 -0
- package/src/models/task.ts +53 -0
- package/src/models/taskresponse.ts +26 -0
- package/src/models/taskstatus.ts +42 -0
- package/src/models/temporarystorage.ts +47 -0
- package/src/models/temporarytarget.ts +35 -0
- package/src/models/textop.ts +7 -7
- package/src/models/updateresourcebybodyop.ts +29 -0
- package/src/models/uploadchunkop.ts +11 -3
- package/src/models/uploadrequest.ts +28 -28
- package/src/models/urlreference.ts +34 -0
- package/src/models/usageresponse.ts +11 -10
- package/src/tool-names.ts +13 -1
- package/src/types/async.ts +8 -7
- package/esm/lib/dlv.d.ts +0 -14
- package/esm/lib/dlv.d.ts.map +0 -1
- package/esm/lib/dlv.js +0 -47
- package/esm/lib/dlv.js.map +0 -1
- package/esm/lib/is-plain-object.d.ts +0 -2
- package/esm/lib/is-plain-object.d.ts.map +0 -1
- package/esm/lib/is-plain-object.js +0 -39
- package/esm/lib/is-plain-object.js.map +0 -1
- package/esm/models/componentsdestroyrequest.d.ts +0 -9
- package/esm/models/componentsdestroyrequest.d.ts.map +0 -1
- package/esm/models/componentsdestroyrequest.js.map +0 -1
- package/esm/models/componentsdestroyresponse.d.ts +0 -22
- package/esm/models/componentsdestroyresponse.d.ts.map +0 -1
- package/esm/models/componentsdestroyresponse.js +0 -20
- package/esm/models/componentsdestroyresponse.js.map +0 -1
- package/src/lib/dlv.ts +0 -54
- package/src/lib/is-plain-object.ts +0 -44
- package/src/models/componentsdestroyresponse.ts +0 -38
package/bin/mcp-server.js
CHANGED
|
@@ -13959,10 +13959,10 @@ var init_config = __esm(() => {
|
|
|
13959
13959
|
]).describe("Regional endpoint selection");
|
|
13960
13960
|
SDK_METADATA = {
|
|
13961
13961
|
language: "typescript",
|
|
13962
|
-
openapiDocVersion: "0.
|
|
13963
|
-
sdkVersion: "0.
|
|
13964
|
-
genVersion: "2.
|
|
13965
|
-
userAgent: "speakeasy-sdk/mcp-typescript 0.
|
|
13962
|
+
openapiDocVersion: "0.7.4",
|
|
13963
|
+
sdkVersion: "0.10.0",
|
|
13964
|
+
genVersion: "2.918.4",
|
|
13965
|
+
userAgent: "speakeasy-sdk/mcp-typescript 0.10.0 2.918.4 0.7.4 @cloudinary/asset-management-mcp"
|
|
13966
13966
|
};
|
|
13967
13967
|
});
|
|
13968
13968
|
|
|
@@ -52531,6 +52531,10 @@ var require_data = __commonJS((exports, module) => {
|
|
|
52531
52531
|
var require_utils4 = __commonJS((exports, module) => {
|
|
52532
52532
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
52533
52533
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
52534
|
+
var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
|
|
52535
|
+
var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
|
|
52536
|
+
var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
|
|
52537
|
+
var isQueryFragmentCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/?]$/iu);
|
|
52534
52538
|
function stringArrayToHexStripped(input) {
|
|
52535
52539
|
let acc = "";
|
|
52536
52540
|
let code = 0;
|
|
@@ -52674,7 +52678,7 @@ var require_utils4 = __commonJS((exports, module) => {
|
|
|
52674
52678
|
continue;
|
|
52675
52679
|
}
|
|
52676
52680
|
} else if (input[0] === "/") {
|
|
52677
|
-
if (input[1] === "."
|
|
52681
|
+
if (input[1] === ".") {
|
|
52678
52682
|
output.push("/");
|
|
52679
52683
|
break;
|
|
52680
52684
|
}
|
|
@@ -52724,27 +52728,169 @@ var require_utils4 = __commonJS((exports, module) => {
|
|
|
52724
52728
|
}
|
|
52725
52729
|
return output.join("");
|
|
52726
52730
|
}
|
|
52727
|
-
|
|
52728
|
-
|
|
52729
|
-
|
|
52730
|
-
|
|
52731
|
+
var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
|
|
52732
|
+
var HOST_DELIM_RE = /[@/?#:]/g;
|
|
52733
|
+
var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
|
|
52734
|
+
function reescapeHostDelimiters(host, isIP) {
|
|
52735
|
+
const re2 = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
|
|
52736
|
+
re2.lastIndex = 0;
|
|
52737
|
+
return host.replace(re2, (ch) => HOST_DELIMS[ch]);
|
|
52738
|
+
}
|
|
52739
|
+
function normalizePercentEncoding(input, decodeUnreserved = false) {
|
|
52740
|
+
if (input.indexOf("%") === -1) {
|
|
52741
|
+
return input;
|
|
52731
52742
|
}
|
|
52732
|
-
|
|
52733
|
-
|
|
52743
|
+
let output = "";
|
|
52744
|
+
for (let i = 0;i < input.length; i++) {
|
|
52745
|
+
if (input[i] === "%" && i + 2 < input.length) {
|
|
52746
|
+
const hex3 = input.slice(i + 1, i + 3);
|
|
52747
|
+
if (isHexPair(hex3)) {
|
|
52748
|
+
const normalizedHex = hex3.toUpperCase();
|
|
52749
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
52750
|
+
if (decodeUnreserved && isUnreserved(decoded)) {
|
|
52751
|
+
output += decoded;
|
|
52752
|
+
} else {
|
|
52753
|
+
output += "%" + normalizedHex;
|
|
52754
|
+
}
|
|
52755
|
+
i += 2;
|
|
52756
|
+
continue;
|
|
52757
|
+
}
|
|
52758
|
+
}
|
|
52759
|
+
output += input[i];
|
|
52734
52760
|
}
|
|
52735
|
-
|
|
52736
|
-
|
|
52761
|
+
return output;
|
|
52762
|
+
}
|
|
52763
|
+
var BYTE_HEX = new Array(256);
|
|
52764
|
+
{
|
|
52765
|
+
const HEX_DIGITS = "0123456789ABCDEF";
|
|
52766
|
+
for (let i = 0;i < 256; i++) {
|
|
52767
|
+
BYTE_HEX[i] = "%" + HEX_DIGITS[i >> 4] + HEX_DIGITS[i & 15];
|
|
52737
52768
|
}
|
|
52738
|
-
|
|
52739
|
-
|
|
52769
|
+
}
|
|
52770
|
+
function isEscapeSafe(cp) {
|
|
52771
|
+
return cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 42 || cp === 43 || cp === 45 || cp === 46 || cp === 47 || cp === 64 || cp === 95;
|
|
52772
|
+
}
|
|
52773
|
+
function percentEncodeNonAscii(cp) {
|
|
52774
|
+
if (cp < 2048) {
|
|
52775
|
+
return BYTE_HEX[192 | cp >> 6] + BYTE_HEX[128 | cp & 63];
|
|
52740
52776
|
}
|
|
52741
|
-
if (
|
|
52742
|
-
|
|
52777
|
+
if (cp < 65536) {
|
|
52778
|
+
return BYTE_HEX[224 | cp >> 12] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
|
|
52743
52779
|
}
|
|
52744
|
-
|
|
52745
|
-
|
|
52780
|
+
return BYTE_HEX[240 | cp >> 18] + BYTE_HEX[128 | cp >> 12 & 63] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
|
|
52781
|
+
}
|
|
52782
|
+
function normalizePathEncoding(input) {
|
|
52783
|
+
let output = "";
|
|
52784
|
+
for (let i = 0;i < input.length; i++) {
|
|
52785
|
+
const ch = input[i];
|
|
52786
|
+
if (ch === "%" && i + 2 < input.length) {
|
|
52787
|
+
const hex3 = input.slice(i + 1, i + 3);
|
|
52788
|
+
if (isHexPair(hex3)) {
|
|
52789
|
+
const normalizedHex = hex3.toUpperCase();
|
|
52790
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
52791
|
+
if (decoded !== "." && isUnreserved(decoded)) {
|
|
52792
|
+
output += decoded;
|
|
52793
|
+
} else {
|
|
52794
|
+
output += "%" + normalizedHex;
|
|
52795
|
+
}
|
|
52796
|
+
i += 2;
|
|
52797
|
+
continue;
|
|
52798
|
+
}
|
|
52799
|
+
}
|
|
52800
|
+
if (isPathCharacter(ch)) {
|
|
52801
|
+
output += ch;
|
|
52802
|
+
} else {
|
|
52803
|
+
const code = input.charCodeAt(i);
|
|
52804
|
+
if (code < 128) {
|
|
52805
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
52806
|
+
} else if (code < 55296 || code > 57343) {
|
|
52807
|
+
output += percentEncodeNonAscii(code);
|
|
52808
|
+
} else if (code <= 56319 && i + 1 < input.length) {
|
|
52809
|
+
const low = input.charCodeAt(i + 1);
|
|
52810
|
+
if (low >= 56320 && low <= 57343) {
|
|
52811
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
52812
|
+
i++;
|
|
52813
|
+
} else {
|
|
52814
|
+
output += percentEncodeNonAscii(65533);
|
|
52815
|
+
}
|
|
52816
|
+
} else {
|
|
52817
|
+
output += percentEncodeNonAscii(65533);
|
|
52818
|
+
}
|
|
52819
|
+
}
|
|
52746
52820
|
}
|
|
52747
|
-
return
|
|
52821
|
+
return output;
|
|
52822
|
+
}
|
|
52823
|
+
function normalizeQueryFragmentEncoding(input) {
|
|
52824
|
+
let output = "";
|
|
52825
|
+
for (let i = 0;i < input.length; i++) {
|
|
52826
|
+
const ch = input[i];
|
|
52827
|
+
if (ch === "%" && i + 2 < input.length) {
|
|
52828
|
+
const hex3 = input.slice(i + 1, i + 3);
|
|
52829
|
+
if (isHexPair(hex3)) {
|
|
52830
|
+
const normalizedHex = hex3.toUpperCase();
|
|
52831
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
52832
|
+
if (isUnreserved(decoded)) {
|
|
52833
|
+
output += decoded;
|
|
52834
|
+
} else {
|
|
52835
|
+
output += "%" + normalizedHex;
|
|
52836
|
+
}
|
|
52837
|
+
i += 2;
|
|
52838
|
+
continue;
|
|
52839
|
+
}
|
|
52840
|
+
}
|
|
52841
|
+
if (isQueryFragmentCharacter(ch)) {
|
|
52842
|
+
output += ch;
|
|
52843
|
+
} else {
|
|
52844
|
+
const code = input.charCodeAt(i);
|
|
52845
|
+
if (code < 128) {
|
|
52846
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
52847
|
+
} else if (code < 55296 || code > 57343) {
|
|
52848
|
+
output += percentEncodeNonAscii(code);
|
|
52849
|
+
} else if (code <= 56319 && i + 1 < input.length) {
|
|
52850
|
+
const low = input.charCodeAt(i + 1);
|
|
52851
|
+
if (low >= 56320 && low <= 57343) {
|
|
52852
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
52853
|
+
i++;
|
|
52854
|
+
} else {
|
|
52855
|
+
output += percentEncodeNonAscii(65533);
|
|
52856
|
+
}
|
|
52857
|
+
} else {
|
|
52858
|
+
output += percentEncodeNonAscii(65533);
|
|
52859
|
+
}
|
|
52860
|
+
}
|
|
52861
|
+
}
|
|
52862
|
+
return output;
|
|
52863
|
+
}
|
|
52864
|
+
function escapePreservingEscapes(input) {
|
|
52865
|
+
let output = "";
|
|
52866
|
+
for (let i = 0;i < input.length; i++) {
|
|
52867
|
+
const ch = input[i];
|
|
52868
|
+
if (ch === "%" && i + 2 < input.length) {
|
|
52869
|
+
const hex3 = input.slice(i + 1, i + 3);
|
|
52870
|
+
if (isHexPair(hex3)) {
|
|
52871
|
+
output += "%" + hex3.toUpperCase();
|
|
52872
|
+
i += 2;
|
|
52873
|
+
continue;
|
|
52874
|
+
}
|
|
52875
|
+
}
|
|
52876
|
+
const code = input.charCodeAt(i);
|
|
52877
|
+
if (code < 128) {
|
|
52878
|
+
output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
|
|
52879
|
+
} else if (code < 55296 || code > 57343) {
|
|
52880
|
+
output += percentEncodeNonAscii(code);
|
|
52881
|
+
} else if (code <= 56319 && i + 1 < input.length) {
|
|
52882
|
+
const low = input.charCodeAt(i + 1);
|
|
52883
|
+
if (low >= 56320 && low <= 57343) {
|
|
52884
|
+
output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
|
|
52885
|
+
i++;
|
|
52886
|
+
} else {
|
|
52887
|
+
output += percentEncodeNonAscii(65533);
|
|
52888
|
+
}
|
|
52889
|
+
} else {
|
|
52890
|
+
output += percentEncodeNonAscii(65533);
|
|
52891
|
+
}
|
|
52892
|
+
}
|
|
52893
|
+
return output;
|
|
52748
52894
|
}
|
|
52749
52895
|
function recomposeAuthority(component) {
|
|
52750
52896
|
const uriTokens = [];
|
|
@@ -52759,7 +52905,7 @@ var require_utils4 = __commonJS((exports, module) => {
|
|
|
52759
52905
|
if (ipV6res.isIPV6 === true) {
|
|
52760
52906
|
host = `[${ipV6res.escapedHost}]`;
|
|
52761
52907
|
} else {
|
|
52762
|
-
host =
|
|
52908
|
+
host = reescapeHostDelimiters(host, false);
|
|
52763
52909
|
}
|
|
52764
52910
|
}
|
|
52765
52911
|
uriTokens.push(host);
|
|
@@ -52773,7 +52919,11 @@ var require_utils4 = __commonJS((exports, module) => {
|
|
|
52773
52919
|
module.exports = {
|
|
52774
52920
|
nonSimpleDomain,
|
|
52775
52921
|
recomposeAuthority,
|
|
52776
|
-
|
|
52922
|
+
reescapeHostDelimiters,
|
|
52923
|
+
normalizePercentEncoding,
|
|
52924
|
+
normalizePathEncoding,
|
|
52925
|
+
normalizeQueryFragmentEncoding,
|
|
52926
|
+
escapePreservingEscapes,
|
|
52777
52927
|
removeDotSegments,
|
|
52778
52928
|
isIPv4,
|
|
52779
52929
|
isUUID,
|
|
@@ -52958,11 +53108,11 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
52958
53108
|
|
|
52959
53109
|
// node_modules/fast-uri/index.js
|
|
52960
53110
|
var require_fast_uri = __commonJS((exports, module) => {
|
|
52961
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority,
|
|
53111
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, normalizeQueryFragmentEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils4();
|
|
52962
53112
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
52963
53113
|
function normalize(uri, options) {
|
|
52964
53114
|
if (typeof uri === "string") {
|
|
52965
|
-
uri =
|
|
53115
|
+
uri = normalizeString(uri, options);
|
|
52966
53116
|
} else if (typeof uri === "object") {
|
|
52967
53117
|
uri = parse6(serialize(uri, options), options);
|
|
52968
53118
|
}
|
|
@@ -53028,19 +53178,9 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
53028
53178
|
return target;
|
|
53029
53179
|
}
|
|
53030
53180
|
function equal(uriA, uriB, options) {
|
|
53031
|
-
|
|
53032
|
-
|
|
53033
|
-
|
|
53034
|
-
} else if (typeof uriA === "object") {
|
|
53035
|
-
uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
|
|
53036
|
-
}
|
|
53037
|
-
if (typeof uriB === "string") {
|
|
53038
|
-
uriB = unescape(uriB);
|
|
53039
|
-
uriB = serialize(normalizeComponentEncoding(parse6(uriB, options), true), { ...options, skipEscape: true });
|
|
53040
|
-
} else if (typeof uriB === "object") {
|
|
53041
|
-
uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
|
|
53042
|
-
}
|
|
53043
|
-
return uriA.toLowerCase() === uriB.toLowerCase();
|
|
53181
|
+
const normalizedA = normalizeComparableURI(uriA, options);
|
|
53182
|
+
const normalizedB = normalizeComparableURI(uriB, options);
|
|
53183
|
+
return normalizedA !== undefined && normalizedB !== undefined && normalizedA.toLowerCase() === normalizedB.toLowerCase();
|
|
53044
53184
|
}
|
|
53045
53185
|
function serialize(cmpts, opts) {
|
|
53046
53186
|
const component = {
|
|
@@ -53066,12 +53206,12 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
53066
53206
|
schemeHandler.serialize(component, options);
|
|
53067
53207
|
if (component.path !== undefined) {
|
|
53068
53208
|
if (!options.skipEscape) {
|
|
53069
|
-
component.path =
|
|
53209
|
+
component.path = escapePreservingEscapes(component.path);
|
|
53070
53210
|
if (component.scheme !== undefined) {
|
|
53071
53211
|
component.path = component.path.split("%3A").join(":");
|
|
53072
53212
|
}
|
|
53073
53213
|
} else {
|
|
53074
|
-
component.path =
|
|
53214
|
+
component.path = normalizePercentEncoding(component.path);
|
|
53075
53215
|
}
|
|
53076
53216
|
}
|
|
53077
53217
|
if (options.reference !== "suffix" && component.scheme) {
|
|
@@ -53106,7 +53246,17 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
53106
53246
|
return uriTokens.join("");
|
|
53107
53247
|
}
|
|
53108
53248
|
var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
53109
|
-
|
|
53249
|
+
var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
|
|
53250
|
+
function getParseError(parsed, matches) {
|
|
53251
|
+
if (matches[2] !== undefined && parsed.path && parsed.path[0] !== "/") {
|
|
53252
|
+
return 'URI path must start with "/" when authority is present.';
|
|
53253
|
+
}
|
|
53254
|
+
if (typeof parsed.port === "number" && (parsed.port < 0 || parsed.port > 65535)) {
|
|
53255
|
+
return "URI port is malformed.";
|
|
53256
|
+
}
|
|
53257
|
+
return;
|
|
53258
|
+
}
|
|
53259
|
+
function parseWithStatus(uri, opts) {
|
|
53110
53260
|
const options = Object.assign({}, opts);
|
|
53111
53261
|
const parsed = {
|
|
53112
53262
|
scheme: undefined,
|
|
@@ -53117,6 +53267,7 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
53117
53267
|
query: undefined,
|
|
53118
53268
|
fragment: undefined
|
|
53119
53269
|
};
|
|
53270
|
+
let malformedAuthorityOrPort = false;
|
|
53120
53271
|
let isIP = false;
|
|
53121
53272
|
if (options.reference === "suffix") {
|
|
53122
53273
|
if (options.scheme) {
|
|
@@ -53125,9 +53276,14 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
53125
53276
|
uri = "//" + uri;
|
|
53126
53277
|
}
|
|
53127
53278
|
}
|
|
53279
|
+
const authorityMatch = uri.match(AUTHORITY_PREFIX);
|
|
53280
|
+
if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
|
|
53281
|
+
parsed.error = "URI authority must not contain a literal backslash.";
|
|
53282
|
+
malformedAuthorityOrPort = true;
|
|
53283
|
+
}
|
|
53128
53284
|
const matches = uri.match(URI_PARSE);
|
|
53129
53285
|
if (matches) {
|
|
53130
|
-
parsed.scheme = matches[1];
|
|
53286
|
+
parsed.scheme = matches[1] === undefined ? undefined : matches[1].toLowerCase();
|
|
53131
53287
|
parsed.userinfo = matches[3];
|
|
53132
53288
|
parsed.host = matches[4];
|
|
53133
53289
|
parsed.port = parseInt(matches[5], 10);
|
|
@@ -53137,6 +53293,11 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
53137
53293
|
if (isNaN(parsed.port)) {
|
|
53138
53294
|
parsed.port = matches[5];
|
|
53139
53295
|
}
|
|
53296
|
+
const parseError = getParseError(parsed, matches);
|
|
53297
|
+
if (parseError !== undefined) {
|
|
53298
|
+
parsed.error = parsed.error || parseError;
|
|
53299
|
+
malformedAuthorityOrPort = true;
|
|
53300
|
+
}
|
|
53140
53301
|
if (parsed.host) {
|
|
53141
53302
|
const ipv4result = isIPv4(parsed.host);
|
|
53142
53303
|
if (ipv4result === false) {
|
|
@@ -53163,7 +53324,7 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
53163
53324
|
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
|
|
53164
53325
|
if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
53165
53326
|
try {
|
|
53166
|
-
parsed.host = URL
|
|
53327
|
+
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
53167
53328
|
} catch (e) {
|
|
53168
53329
|
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
53169
53330
|
}
|
|
@@ -53175,14 +53336,17 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
53175
53336
|
parsed.scheme = unescape(parsed.scheme);
|
|
53176
53337
|
}
|
|
53177
53338
|
if (parsed.host !== undefined) {
|
|
53178
|
-
parsed.host = unescape(parsed.host);
|
|
53339
|
+
parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
|
|
53179
53340
|
}
|
|
53180
53341
|
}
|
|
53181
53342
|
if (parsed.path) {
|
|
53182
|
-
parsed.path =
|
|
53343
|
+
parsed.path = normalizePathEncoding(parsed.path);
|
|
53344
|
+
}
|
|
53345
|
+
if (parsed.query) {
|
|
53346
|
+
parsed.query = normalizeQueryFragmentEncoding(parsed.query);
|
|
53183
53347
|
}
|
|
53184
53348
|
if (parsed.fragment) {
|
|
53185
|
-
parsed.fragment =
|
|
53349
|
+
parsed.fragment = normalizeQueryFragmentEncoding(parsed.fragment);
|
|
53186
53350
|
}
|
|
53187
53351
|
}
|
|
53188
53352
|
if (schemeHandler && schemeHandler.parse) {
|
|
@@ -53191,7 +53355,29 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
53191
53355
|
} else {
|
|
53192
53356
|
parsed.error = parsed.error || "URI can not be parsed.";
|
|
53193
53357
|
}
|
|
53194
|
-
return parsed;
|
|
53358
|
+
return { parsed, malformedAuthorityOrPort };
|
|
53359
|
+
}
|
|
53360
|
+
function parse6(uri, opts) {
|
|
53361
|
+
return parseWithStatus(uri, opts).parsed;
|
|
53362
|
+
}
|
|
53363
|
+
function normalizeString(uri, opts) {
|
|
53364
|
+
return normalizeStringWithStatus(uri, opts).normalized;
|
|
53365
|
+
}
|
|
53366
|
+
function normalizeStringWithStatus(uri, opts) {
|
|
53367
|
+
const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
|
|
53368
|
+
return {
|
|
53369
|
+
normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
|
|
53370
|
+
malformedAuthorityOrPort
|
|
53371
|
+
};
|
|
53372
|
+
}
|
|
53373
|
+
function normalizeComparableURI(uri, opts) {
|
|
53374
|
+
if (typeof uri === "string") {
|
|
53375
|
+
const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
|
|
53376
|
+
return malformedAuthorityOrPort ? undefined : normalized;
|
|
53377
|
+
}
|
|
53378
|
+
if (typeof uri === "object") {
|
|
53379
|
+
return serialize(uri, opts);
|
|
53380
|
+
}
|
|
53195
53381
|
}
|
|
53196
53382
|
var fastUri = {
|
|
53197
53383
|
SCHEMES,
|
|
@@ -63347,14 +63533,31 @@ var init_base64 = __esm(() => {
|
|
|
63347
63533
|
zodInbound = custom((x) => x instanceof Uint8Array).or(string2().transform(bytesFromBase64));
|
|
63348
63534
|
});
|
|
63349
63535
|
|
|
63350
|
-
// src/lib/
|
|
63536
|
+
// src/lib/primitives.ts
|
|
63537
|
+
function compactMap(values) {
|
|
63538
|
+
const out = {};
|
|
63539
|
+
for (const [k2, v2] of Object.entries(values)) {
|
|
63540
|
+
if (typeof v2 !== "undefined") {
|
|
63541
|
+
out[k2] = v2;
|
|
63542
|
+
}
|
|
63543
|
+
}
|
|
63544
|
+
return out;
|
|
63545
|
+
}
|
|
63351
63546
|
function isPlainObject3(value) {
|
|
63352
|
-
if (typeof value !== "object"
|
|
63547
|
+
if (value === null || typeof value !== "object")
|
|
63548
|
+
return false;
|
|
63549
|
+
if (Object.prototype.toString.call(value) !== "[object Object]")
|
|
63550
|
+
return false;
|
|
63551
|
+
const proto = Object.getPrototypeOf(value);
|
|
63552
|
+
if (proto === null || proto === Object.prototype)
|
|
63553
|
+
return true;
|
|
63554
|
+
try {
|
|
63555
|
+
return Object.getPrototypeOf(proto) === null;
|
|
63556
|
+
} catch {
|
|
63353
63557
|
return false;
|
|
63354
63558
|
}
|
|
63355
|
-
const prototype = Object.getPrototypeOf(value);
|
|
63356
|
-
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
|
|
63357
63559
|
}
|
|
63560
|
+
var init_primitives = () => {};
|
|
63358
63561
|
|
|
63359
63562
|
// src/lib/encodings.ts
|
|
63360
63563
|
function formEncoder(sep) {
|
|
@@ -63553,6 +63756,7 @@ var EncodingError, encodeForm, encodeSpaceDelimited, encodePipeDelimited, encode
|
|
|
63553
63756
|
}, encodeJSONQuery, encodeFormQuery, encodeSpaceDelimitedQuery, encodePipeDelimitedQuery, encodeDeepObjectQuery;
|
|
63554
63757
|
var init_encodings = __esm(() => {
|
|
63555
63758
|
init_base64();
|
|
63759
|
+
init_primitives();
|
|
63556
63760
|
EncodingError = class EncodingError extends Error {
|
|
63557
63761
|
constructor(message) {
|
|
63558
63762
|
super(message);
|
|
@@ -63569,22 +63773,13 @@ var init_encodings = __esm(() => {
|
|
|
63569
63773
|
encodeDeepObjectQuery = queryEncoder(encodeDeepObject);
|
|
63570
63774
|
});
|
|
63571
63775
|
|
|
63572
|
-
// src/lib/dlv.ts
|
|
63573
|
-
function dlv(obj, key, def, p, undef) {
|
|
63574
|
-
key = Array.isArray(key) ? key : key.split(".");
|
|
63575
|
-
for (p = 0;p < key.length; p++) {
|
|
63576
|
-
const k2 = key[p];
|
|
63577
|
-
obj = k2 != null && obj ? obj[k2] : undef;
|
|
63578
|
-
}
|
|
63579
|
-
return obj === undef ? def : obj;
|
|
63580
|
-
}
|
|
63581
|
-
|
|
63582
63776
|
// src/lib/env.ts
|
|
63583
63777
|
function env() {
|
|
63584
63778
|
if (envMemo) {
|
|
63585
63779
|
return envMemo;
|
|
63586
63780
|
}
|
|
63587
|
-
|
|
63781
|
+
const globals = globalThis;
|
|
63782
|
+
envMemo = envSchema.parse(globals.process?.env ?? globals.Deno?.env?.toObject?.() ?? {});
|
|
63588
63783
|
return envMemo;
|
|
63589
63784
|
}
|
|
63590
63785
|
function fillGlobals(options) {
|
|
@@ -63609,11 +63804,11 @@ var init_env = __esm(() => {
|
|
|
63609
63804
|
|
|
63610
63805
|
// src/lib/http.ts
|
|
63611
63806
|
class HTTPClient {
|
|
63612
|
-
options;
|
|
63613
63807
|
fetcher;
|
|
63614
63808
|
requestHooks = [];
|
|
63615
63809
|
requestErrorHooks = [];
|
|
63616
63810
|
responseHooks = [];
|
|
63811
|
+
options;
|
|
63617
63812
|
constructor(options = {}) {
|
|
63618
63813
|
this.options = options;
|
|
63619
63814
|
this.fetcher = options.fetcher || DEFAULT_FETCHER;
|
|
@@ -63861,6 +64056,13 @@ async function retryBackoff(fn, strategy) {
|
|
|
63861
64056
|
}
|
|
63862
64057
|
}
|
|
63863
64058
|
function retryIntervalFromResponse(res) {
|
|
64059
|
+
const retryAfterMsVal = res.headers.get("retry-after-ms");
|
|
64060
|
+
if (retryAfterMsVal) {
|
|
64061
|
+
const parsedMs = Number(retryAfterMsVal);
|
|
64062
|
+
if (Number.isFinite(parsedMs) && parsedMs >= 0) {
|
|
64063
|
+
return parsedMs;
|
|
64064
|
+
}
|
|
64065
|
+
}
|
|
63864
64066
|
const retryVal = res.headers.get("retry-after") || "";
|
|
63865
64067
|
if (!retryVal) {
|
|
63866
64068
|
return 0;
|
|
@@ -64447,7 +64649,9 @@ function registerDynamicTools(logger, server, getSDK, toolMap, allowedScopes) {
|
|
|
64447
64649
|
`;
|
|
64448
64650
|
if (def.args) {
|
|
64449
64651
|
const jsonSchema = toJSONSchema(object(def.args), {
|
|
64450
|
-
target: "draft-2020-12"
|
|
64652
|
+
target: "draft-2020-12",
|
|
64653
|
+
io: "input",
|
|
64654
|
+
unrepresentable: "any"
|
|
64451
64655
|
});
|
|
64452
64656
|
schemaText += JSON.stringify(jsonSchema, null, 2);
|
|
64453
64657
|
} else {
|
|
@@ -64604,18 +64808,6 @@ var init_tools = __esm(() => {
|
|
|
64604
64808
|
};
|
|
64605
64809
|
});
|
|
64606
64810
|
|
|
64607
|
-
// src/lib/primitives.ts
|
|
64608
|
-
function compactMap(values) {
|
|
64609
|
-
const out = {};
|
|
64610
|
-
for (const [k2, v2] of Object.entries(values)) {
|
|
64611
|
-
if (typeof v2 !== "undefined") {
|
|
64612
|
-
out[k2] = v2;
|
|
64613
|
-
}
|
|
64614
|
-
}
|
|
64615
|
-
return out;
|
|
64616
|
-
}
|
|
64617
|
-
var init_primitives = () => {};
|
|
64618
|
-
|
|
64619
64811
|
// src/models/errors/sdkvalidationerror.ts
|
|
64620
64812
|
function formatZodError(err) {
|
|
64621
64813
|
return prettifyError(err);
|
|
@@ -64812,9 +65004,13 @@ async function extractSecurity(sec) {
|
|
|
64812
65004
|
}
|
|
64813
65005
|
return typeof sec === "function" ? sec() : sec;
|
|
64814
65006
|
}
|
|
64815
|
-
var SecurityError;
|
|
65007
|
+
var SecurityErrorCode, SecurityError;
|
|
64816
65008
|
var init_security = __esm(() => {
|
|
64817
65009
|
init_env();
|
|
65010
|
+
SecurityErrorCode = {
|
|
65011
|
+
Incomplete: "incomplete",
|
|
65012
|
+
UnrecognisedSecurityType: "unrecognized_security_type"
|
|
65013
|
+
};
|
|
64818
65014
|
SecurityError = class SecurityError extends Error {
|
|
64819
65015
|
code;
|
|
64820
65016
|
constructor(code, message) {
|
|
@@ -64823,10 +65019,10 @@ var init_security = __esm(() => {
|
|
|
64823
65019
|
this.name = "SecurityError";
|
|
64824
65020
|
}
|
|
64825
65021
|
static incomplete() {
|
|
64826
|
-
return new SecurityError(
|
|
65022
|
+
return new SecurityError(SecurityErrorCode.Incomplete, "Security requirements not met in order to perform the operation");
|
|
64827
65023
|
}
|
|
64828
65024
|
static unrecognizedType(type) {
|
|
64829
|
-
return new SecurityError(
|
|
65025
|
+
return new SecurityError(SecurityErrorCode.UnrecognisedSecurityType, `Unrecognised security type: ${type}`);
|
|
64830
65026
|
}
|
|
64831
65027
|
};
|
|
64832
65028
|
});
|
|
@@ -64987,7 +65183,7 @@ var init_tagsparam = __esm(() => {
|
|
|
64987
65183
|
});
|
|
64988
65184
|
|
|
64989
65185
|
// src/models/explicitrequest.ts
|
|
64990
|
-
var
|
|
65186
|
+
var ExplicitRequestAccessMode$zodSchema, ExplicitRequestAutoTranscription$zodSchema, ExplicitRequestAutoTranscriptionUnion$zodSchema, ExplicitRequestRegions$zodSchema, ExplicitRequestResponsiveBreakpoints$zodSchema, QualityOverride$zodSchema, ExplicitRequest$zodSchema;
|
|
64991
65187
|
var init_explicitrequest = __esm(() => {
|
|
64992
65188
|
init_zod();
|
|
64993
65189
|
init_accesscontrolitem();
|
|
@@ -64995,6 +65191,11 @@ var init_explicitrequest = __esm(() => {
|
|
|
64995
65191
|
init_responsivebreakpoint();
|
|
64996
65192
|
init_structuredmetadataparam();
|
|
64997
65193
|
init_tagsparam();
|
|
65194
|
+
ExplicitRequestAccessMode$zodSchema = _enum2([
|
|
65195
|
+
"public",
|
|
65196
|
+
"authenticated"
|
|
65197
|
+
]).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.
|
|
65198
|
+
`);
|
|
64998
65199
|
ExplicitRequestAutoTranscription$zodSchema = object({
|
|
64999
65200
|
translate: array(string2()).optional().describe("Array of target language codes for transcription translation.")
|
|
65000
65201
|
}).describe("Configuration object for automatic video transcription with translation options.");
|
|
@@ -65002,11 +65203,6 @@ var init_explicitrequest = __esm(() => {
|
|
|
65002
65203
|
boolean2(),
|
|
65003
65204
|
lazy(() => ExplicitRequestAutoTranscription$zodSchema)
|
|
65004
65205
|
]);
|
|
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
65206
|
ExplicitRequestRegions$zodSchema = union([
|
|
65011
65207
|
string2(),
|
|
65012
65208
|
record(string2(), array(array(int())))
|
|
@@ -65294,16 +65490,19 @@ var init_async = __esm(() => {
|
|
|
65294
65490
|
[Symbol.toStringTag] = "APIPromise";
|
|
65295
65491
|
constructor(p) {
|
|
65296
65492
|
this.#promise = p instanceof Promise ? p : Promise.resolve(p);
|
|
65297
|
-
this.#unwrapped = p instanceof Promise ?
|
|
65493
|
+
this.#unwrapped = p instanceof Promise ? null : Promise.resolve(p[0]);
|
|
65494
|
+
}
|
|
65495
|
+
#getUnwrapped() {
|
|
65496
|
+
return this.#unwrapped ??= this.#promise.then(([value]) => value);
|
|
65298
65497
|
}
|
|
65299
65498
|
then(onfulfilled, onrejected) {
|
|
65300
65499
|
return this.#promise.then(onfulfilled ? ([value]) => onfulfilled(value) : undefined, onrejected);
|
|
65301
65500
|
}
|
|
65302
65501
|
catch(onrejected) {
|
|
65303
|
-
return this.#
|
|
65502
|
+
return this.#getUnwrapped().catch(onrejected);
|
|
65304
65503
|
}
|
|
65305
65504
|
finally(onfinally) {
|
|
65306
|
-
return this.#
|
|
65505
|
+
return this.#getUnwrapped().finally(onfinally);
|
|
65307
65506
|
}
|
|
65308
65507
|
$inspect() {
|
|
65309
65508
|
return this.#promise;
|
|
@@ -65435,7 +65634,7 @@ var init_deliverytypeall = __esm(() => {
|
|
|
65435
65634
|
});
|
|
65436
65635
|
|
|
65437
65636
|
// src/models/info.ts
|
|
65438
|
-
var InfoModeration$zodSchema,
|
|
65637
|
+
var InfoModeration$zodSchema, InfoRelatedAsset$zodSchema, InfoLastUpdated$zodSchema, InfoDerived$zodSchema, InfoVersion$zodSchema, InfoInfo$zodSchema, InfoDerivative$zodSchema, Info$zodSchema;
|
|
65439
65638
|
var init_info = __esm(() => {
|
|
65440
65639
|
init_zod();
|
|
65441
65640
|
init_accesscontrolitem();
|
|
@@ -65447,8 +65646,8 @@ var init_info = __esm(() => {
|
|
|
65447
65646
|
status: string2().optional(),
|
|
65448
65647
|
updated_at: exports_iso.datetime({ offset: true }).optional()
|
|
65449
65648
|
});
|
|
65450
|
-
|
|
65451
|
-
|
|
65649
|
+
InfoRelatedAsset$zodSchema = object({});
|
|
65650
|
+
InfoLastUpdated$zodSchema = object({
|
|
65452
65651
|
access_control_updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
65453
65652
|
context_updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
65454
65653
|
metadata_updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
@@ -65456,7 +65655,7 @@ var init_info = __esm(() => {
|
|
|
65456
65655
|
tags_updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
65457
65656
|
updated_at: exports_iso.datetime({ offset: true }).optional()
|
|
65458
65657
|
});
|
|
65459
|
-
|
|
65658
|
+
InfoDerived$zodSchema = object({
|
|
65460
65659
|
bytes: int().optional(),
|
|
65461
65660
|
format: string2().optional(),
|
|
65462
65661
|
id: string2().optional(),
|
|
@@ -65464,7 +65663,7 @@ var init_info = __esm(() => {
|
|
|
65464
65663
|
transformation: string2().optional(),
|
|
65465
65664
|
url: string2().optional()
|
|
65466
65665
|
});
|
|
65467
|
-
|
|
65666
|
+
InfoVersion$zodSchema = object({
|
|
65468
65667
|
format: string2().nullable().optional(),
|
|
65469
65668
|
restorable: boolean2().optional(),
|
|
65470
65669
|
size: int().optional(),
|
|
@@ -65473,7 +65672,7 @@ var init_info = __esm(() => {
|
|
|
65473
65672
|
version_id: string2().optional().describe("Hexadecimal version ID; length is a positive multiple of 32 (typically 32 or 64).")
|
|
65474
65673
|
});
|
|
65475
65674
|
InfoInfo$zodSchema = object({}).describe("Additional asset information (visual search, recognized people, etc.)");
|
|
65476
|
-
|
|
65675
|
+
InfoDerivative$zodSchema = object({
|
|
65477
65676
|
id: string2().optional().describe("The unique identifier of the derived resource."),
|
|
65478
65677
|
secure_url: string2().optional().describe("The secure URL for accessing the derived resource."),
|
|
65479
65678
|
transformation: string2().optional().describe("The transformation string that was applied."),
|
|
@@ -65492,8 +65691,8 @@ var init_info = __esm(() => {
|
|
|
65492
65691
|
context: ContextFullResponse$zodSchema.nullable().optional().describe("Included if 'context=true' parameter is used."),
|
|
65493
65692
|
coordinates: CoordinatesResponse$zodSchema.nullable().optional().describe("Face and custom coordinate data. Included if 'coordinates=true' parameter is used."),
|
|
65494
65693
|
created_at: exports_iso.datetime({ offset: true }).optional(),
|
|
65495
|
-
derivatives: array(lazy(() =>
|
|
65496
|
-
derived: array(lazy(() =>
|
|
65694
|
+
derivatives: array(lazy(() => InfoDerivative$zodSchema)).nullable().optional().describe("Included if 'derived=true' parameter is used. Null when no derivatives exist."),
|
|
65695
|
+
derived: array(lazy(() => InfoDerived$zodSchema)).optional(),
|
|
65497
65696
|
display_name: string2().optional(),
|
|
65498
65697
|
duration: number2().nullable().optional().describe("Duration in seconds for video/audio assets. Null for images."),
|
|
65499
65698
|
etag: string2().optional(),
|
|
@@ -65505,7 +65704,7 @@ var init_info = __esm(() => {
|
|
|
65505
65704
|
height: int().nullable().optional(),
|
|
65506
65705
|
illustration_score: number2().optional(),
|
|
65507
65706
|
info: lazy(() => InfoInfo$zodSchema).optional().describe("Additional asset information (visual search, recognized people, etc.)"),
|
|
65508
|
-
last_updated: lazy(() =>
|
|
65707
|
+
last_updated: lazy(() => InfoLastUpdated$zodSchema).nullable().optional(),
|
|
65509
65708
|
metadata: record(string2(), any()).optional(),
|
|
65510
65709
|
moderation: array(lazy(() => InfoModeration$zodSchema)).optional().describe("Included if 'moderations=true' parameter is used."),
|
|
65511
65710
|
moderation_kind: string2().optional().describe("The type of moderation applied to the asset."),
|
|
@@ -65514,7 +65713,7 @@ var init_info = __esm(() => {
|
|
|
65514
65713
|
pixels: int().nullable().optional(),
|
|
65515
65714
|
predominant: record(string2(), array(array(any()))).optional(),
|
|
65516
65715
|
public_id: string2().optional(),
|
|
65517
|
-
related_assets: array(lazy(() =>
|
|
65716
|
+
related_assets: array(lazy(() => InfoRelatedAsset$zodSchema)).nullable().optional().describe("Related assets linked to this resource. Null when none linked."),
|
|
65518
65717
|
resource_subtype: string2().nullable().optional().describe("The subtype of the resource (e.g., for video). Null when not applicable."),
|
|
65519
65718
|
resource_type: string2().optional(),
|
|
65520
65719
|
secure_url: string2().optional(),
|
|
@@ -65526,7 +65725,7 @@ var init_info = __esm(() => {
|
|
|
65526
65725
|
uploaded_at: exports_iso.datetime({ offset: true }).optional(),
|
|
65527
65726
|
url: string2().optional(),
|
|
65528
65727
|
version: int().optional(),
|
|
65529
|
-
versions: array(lazy(() =>
|
|
65728
|
+
versions: array(lazy(() => InfoVersion$zodSchema)).optional(),
|
|
65530
65729
|
width: int().nullable().optional()
|
|
65531
65730
|
});
|
|
65532
65731
|
});
|
|
@@ -65624,7 +65823,7 @@ var _infoSchema, _uploadSchema, TOOLTIP_MAP_JSON, SHARED_CSS_TOKENS = `
|
|
|
65624
65823
|
[data-theme="dark"] .status-warn, .dark .status-warn { background: #854d0e; color: #fef08a; }
|
|
65625
65824
|
[data-theme="dark"] .status-err, .dark .status-err { background: #991b1b; color: #fecaca; }
|
|
65626
65825
|
|
|
65627
|
-
html {
|
|
65826
|
+
html { scrollbar-gutter: auto; }
|
|
65628
65827
|
body {
|
|
65629
65828
|
font-family: var(--cld-font);
|
|
65630
65829
|
background: var(--cld-bg);
|
|
@@ -65633,6 +65832,7 @@ body {
|
|
|
65633
65832
|
line-height: 1.5;
|
|
65634
65833
|
font-size: var(--cld-font-xs);
|
|
65635
65834
|
position: relative;
|
|
65835
|
+
overflow-x: hidden;
|
|
65636
65836
|
}
|
|
65637
65837
|
.theme-btn {
|
|
65638
65838
|
width: 22px; height: 22px; border-radius: 50%;
|
|
@@ -65668,9 +65868,11 @@ body {
|
|
|
65668
65868
|
.link { cursor: pointer; }
|
|
65669
65869
|
.link:hover { color: var(--cld-accent); text-decoration: underline; }
|
|
65670
65870
|
|
|
65671
|
-
/* Modal
|
|
65871
|
+
/* Modal — positioned absolutely so it can be placed in the part of the
|
|
65872
|
+
* iframe that is currently visible in the host's viewport (since position:fixed
|
|
65873
|
+
* inside a tall iframe anchors to iframe-center, not the user's visible area). */
|
|
65672
65874
|
.modal-overlay {
|
|
65673
|
-
position:
|
|
65875
|
+
position: absolute; left: 0; right: 0;
|
|
65674
65876
|
background: rgba(0,0,0,0.45);
|
|
65675
65877
|
display: flex; align-items: center; justify-content: center;
|
|
65676
65878
|
z-index: 1000; backdrop-filter: blur(3px); padding: 24px;
|
|
@@ -66506,6 +66708,55 @@ function closeModal() {
|
|
|
66506
66708
|
if (ov) ov.remove();
|
|
66507
66709
|
}
|
|
66508
66710
|
|
|
66711
|
+
/* Position the modal overlay so it's centered on the part of the iframe
|
|
66712
|
+
* the user is currently looking at. Inside an iframe that the host has
|
|
66713
|
+
* sized to scrollHeight, position: fixed anchors to iframe-center, not
|
|
66714
|
+
* the user's visible band — so we compute the visible band ourselves
|
|
66715
|
+
* via IntersectionObserver and place the overlay absolutely there. */
|
|
66716
|
+
function positionModalInVisibleArea(overlay) {
|
|
66717
|
+
if (!overlay) return;
|
|
66718
|
+
var docH = Math.max(document.documentElement.scrollHeight, window.innerHeight);
|
|
66719
|
+
|
|
66720
|
+
// Try IntersectionObserver first (works cross-origin too)
|
|
66721
|
+
if (typeof IntersectionObserver !== "undefined") {
|
|
66722
|
+
var probe = document.createElement("div");
|
|
66723
|
+
probe.style.cssText = "position:absolute;left:0;top:0;width:1px;height:" + docH + "px;pointer-events:none;visibility:hidden;";
|
|
66724
|
+
document.body.appendChild(probe);
|
|
66725
|
+
var io = new IntersectionObserver(function(entries) {
|
|
66726
|
+
try {
|
|
66727
|
+
var entry = entries[0];
|
|
66728
|
+
var rect = entry.intersectionRect;
|
|
66729
|
+
var rootRect = entry.rootBounds || entry.boundingClientRect;
|
|
66730
|
+
// intersectionRect.top is in viewport coords; visible band of the
|
|
66731
|
+
// document is from (probe.top + rect.top) to (probe.top + rect.bottom).
|
|
66732
|
+
var probeTop = entry.boundingClientRect.top; // viewport-relative
|
|
66733
|
+
var visibleTop = rect.top - probeTop; // document-relative
|
|
66734
|
+
var visibleHeight = rect.height;
|
|
66735
|
+
if (visibleHeight > 0) {
|
|
66736
|
+
overlay.style.top = visibleTop + "px";
|
|
66737
|
+
overlay.style.height = visibleHeight + "px";
|
|
66738
|
+
} else {
|
|
66739
|
+
// Fallback: probe not intersecting (shouldn't happen with full-height probe)
|
|
66740
|
+
overlay.style.top = (window.scrollY || 0) + "px";
|
|
66741
|
+
overlay.style.height = window.innerHeight + "px";
|
|
66742
|
+
}
|
|
66743
|
+
} finally {
|
|
66744
|
+
io.disconnect();
|
|
66745
|
+
if (probe.parentNode) probe.parentNode.removeChild(probe);
|
|
66746
|
+
}
|
|
66747
|
+
});
|
|
66748
|
+
io.observe(probe);
|
|
66749
|
+
return;
|
|
66750
|
+
}
|
|
66751
|
+
|
|
66752
|
+
// Fallback: same-origin only — read iframe's bounding rect
|
|
66753
|
+
var rect = document.documentElement.getBoundingClientRect();
|
|
66754
|
+
var visibleTop = rect.top < 0 ? -rect.top : 0;
|
|
66755
|
+
var visibleHeight = Math.min(window.innerHeight, rect.bottom) - Math.max(0, rect.top);
|
|
66756
|
+
overlay.style.top = visibleTop + "px";
|
|
66757
|
+
overlay.style.height = Math.max(visibleHeight, 200) + "px";
|
|
66758
|
+
}
|
|
66759
|
+
|
|
66509
66760
|
function openModal(headerHtml, bodyHtml) {
|
|
66510
66761
|
closeModal();
|
|
66511
66762
|
var h = '<div class="modal-overlay"><div class="modal">';
|
|
@@ -66515,6 +66766,7 @@ function openModal(headerHtml, bodyHtml) {
|
|
|
66515
66766
|
document.body.insertAdjacentHTML("beforeend", h);
|
|
66516
66767
|
|
|
66517
66768
|
var overlay = document.querySelector(".modal-overlay");
|
|
66769
|
+
positionModalInVisibleArea(overlay);
|
|
66518
66770
|
overlay.addEventListener("click", function(e) {
|
|
66519
66771
|
if (e.target === overlay || e.target.classList.contains("modal-close")) {
|
|
66520
66772
|
closeModal();
|
|
@@ -67745,17 +67997,27 @@ var GALLERY_CSS = `
|
|
|
67745
67997
|
}
|
|
67746
67998
|
|
|
67747
67999
|
/* ── Multi-select bar ── */
|
|
68000
|
+
/* Wrapper takes layout space ONLY when a selection is active. When idle
|
|
68001
|
+
* it's display:none so it contributes 0 to scrollHeight (no phantom
|
|
68002
|
+
* scrollbar gutter / no extra iframe height). */
|
|
68003
|
+
.select-bar-wrap {
|
|
68004
|
+
display: none;
|
|
68005
|
+
position: sticky; bottom: 0; left: 0; right: 0;
|
|
68006
|
+
justify-content: center; pointer-events: none;
|
|
68007
|
+
z-index: 100; height: 64px;
|
|
68008
|
+
}
|
|
68009
|
+
.select-bar-wrap.visible { display: flex; }
|
|
67748
68010
|
.select-bar {
|
|
67749
|
-
position:
|
|
67750
|
-
transform:
|
|
68011
|
+
position: absolute; bottom: 8px;
|
|
68012
|
+
transform: translateY(80px);
|
|
67751
68013
|
background: #1a1d24; color: white; border-radius: 40px;
|
|
67752
68014
|
padding: 0 6px 0 16px; height: 48px;
|
|
67753
68015
|
display: flex; align-items: center; gap: 4px;
|
|
67754
68016
|
box-shadow: 0 8px 32px rgba(0,0,0,0.4);
|
|
67755
68017
|
transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
|
|
67756
|
-
opacity: 0; pointer-events: none;
|
|
68018
|
+
opacity: 0; pointer-events: none; white-space: nowrap;
|
|
67757
68019
|
}
|
|
67758
|
-
.select-bar.visible { transform:
|
|
68020
|
+
.select-bar-wrap.visible .select-bar { transform: translateY(0); opacity: 1; pointer-events: all; }
|
|
67759
68021
|
.select-count { font-size: 13px; font-weight: 600; margin-right: 8px; }
|
|
67760
68022
|
.bar-btn {
|
|
67761
68023
|
height: 36px; padding: 0 14px; border: none; border-radius: 30px;
|
|
@@ -67818,12 +68080,12 @@ function showToast(msg) {
|
|
|
67818
68080
|
}
|
|
67819
68081
|
|
|
67820
68082
|
function updateSelectBar() {
|
|
67821
|
-
var
|
|
68083
|
+
var wrap = document.getElementById("select-bar-wrap");
|
|
67822
68084
|
var countEl = document.getElementById("select-count");
|
|
67823
|
-
if (!
|
|
68085
|
+
if (!wrap || !countEl) return;
|
|
67824
68086
|
var n = selected.size;
|
|
67825
68087
|
countEl.textContent = n + " selected";
|
|
67826
|
-
|
|
68088
|
+
wrap.classList.toggle("visible", n > 0);
|
|
67827
68089
|
var btn = document.getElementById("select-all-btn");
|
|
67828
68090
|
if (btn) {
|
|
67829
68091
|
var visible = getVisibleIndices();
|
|
@@ -68103,7 +68365,8 @@ function render() {
|
|
|
68103
68365
|
h += "</div>";
|
|
68104
68366
|
}
|
|
68105
68367
|
|
|
68106
|
-
// Multi-select bar
|
|
68368
|
+
// Multi-select bar (sticky, in-flow wrapper so iframe sizing stays truthful)
|
|
68369
|
+
h += '<div class="select-bar-wrap" id="select-bar-wrap">';
|
|
68107
68370
|
h += '<div class="select-bar" id="select-bar">';
|
|
68108
68371
|
h += '<span class="select-count" id="select-count">0 selected</span>';
|
|
68109
68372
|
h += '<div class="bar-divider"></div>';
|
|
@@ -68113,6 +68376,7 @@ function render() {
|
|
|
68113
68376
|
h += '<div class="bar-divider"></div>';
|
|
68114
68377
|
h += '<button class="bar-btn bar-ghost" id="bar-clear">' + IC.x + '</button>';
|
|
68115
68378
|
h += '</div>';
|
|
68379
|
+
h += '</div>';
|
|
68116
68380
|
|
|
68117
68381
|
// Toast
|
|
68118
68382
|
h += '<div class="gallery-toast" id="gallery-toast"></div>';
|
|
@@ -68342,6 +68606,9 @@ async function fetchDirect() {
|
|
|
68342
68606
|
console.log(LOG_PREFIX, "fetchDirect ->", name);
|
|
68343
68607
|
|
|
68344
68608
|
document.getElementById("app").innerHTML = '<div class="status">Fetching assets\\u2026</div>';
|
|
68609
|
+
requestAnimationFrame(function() {
|
|
68610
|
+
app.reportSize(Math.max(document.documentElement.scrollHeight, MIN_HEIGHT));
|
|
68611
|
+
});
|
|
68345
68612
|
try {
|
|
68346
68613
|
var res = await app.callServerTool({ name: name, arguments: args });
|
|
68347
68614
|
var data = ingestResult(res);
|
|
@@ -68393,6 +68660,7 @@ async function loadMore() {
|
|
|
68393
68660
|
function refreshGallery() {
|
|
68394
68661
|
allResources = [];
|
|
68395
68662
|
lastCursor = null;
|
|
68663
|
+
selected.clear();
|
|
68396
68664
|
fetchDirect();
|
|
68397
68665
|
}
|
|
68398
68666
|
|
|
@@ -68743,7 +69011,7 @@ var init_uploaddeliverytype = __esm(() => {
|
|
|
68743
69011
|
});
|
|
68744
69012
|
|
|
68745
69013
|
// src/models/uploadrequest.ts
|
|
68746
|
-
var
|
|
69014
|
+
var UploadRequestAccessMode$zodSchema, UploadRequestAutoTranscription$zodSchema, UploadRequestAutoTranscriptionUnion$zodSchema, UploadRequestRegions$zodSchema, UploadRequestResponsiveBreakpoints$zodSchema, UploadRequest$zodSchema;
|
|
68747
69015
|
var init_uploadrequest = __esm(() => {
|
|
68748
69016
|
init_zod();
|
|
68749
69017
|
init_accesscontrolitem();
|
|
@@ -68751,6 +69019,11 @@ var init_uploadrequest = __esm(() => {
|
|
|
68751
69019
|
init_structuredmetadataparam();
|
|
68752
69020
|
init_tagsparam();
|
|
68753
69021
|
init_uploaddeliverytype();
|
|
69022
|
+
UploadRequestAccessMode$zodSchema = _enum2([
|
|
69023
|
+
"public",
|
|
69024
|
+
"authenticated"
|
|
69025
|
+
]).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.
|
|
69026
|
+
`);
|
|
68754
69027
|
UploadRequestAutoTranscription$zodSchema = object({
|
|
68755
69028
|
translate: array(string2()).optional().describe("Array of target language codes for transcription translation.")
|
|
68756
69029
|
}).describe("Configuration object for automatic video transcription with translation options.");
|
|
@@ -68758,11 +69031,6 @@ var init_uploadrequest = __esm(() => {
|
|
|
68758
69031
|
boolean2(),
|
|
68759
69032
|
lazy(() => UploadRequestAutoTranscription$zodSchema)
|
|
68760
69033
|
]);
|
|
68761
|
-
UploadRequestAccessMode$zodSchema = _enum2([
|
|
68762
|
-
"public",
|
|
68763
|
-
"authenticated"
|
|
68764
|
-
]).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.
|
|
68765
|
-
`);
|
|
68766
69034
|
UploadRequestRegions$zodSchema = union([
|
|
68767
69035
|
string2(),
|
|
68768
69036
|
record(string2(), array(array(int())))
|
|
@@ -70717,11 +70985,11 @@ Deletes derived resources by derived resource ID`,
|
|
|
70717
70985
|
};
|
|
70718
70986
|
});
|
|
70719
70987
|
|
|
70720
|
-
// src/models/
|
|
70721
|
-
var
|
|
70722
|
-
var
|
|
70988
|
+
// src/models/destroybyassetidrequest.ts
|
|
70989
|
+
var DestroyByAssetIdRequest$zodSchema;
|
|
70990
|
+
var init_destroybyassetidrequest = __esm(() => {
|
|
70723
70991
|
init_zod();
|
|
70724
|
-
|
|
70992
|
+
DestroyByAssetIdRequest$zodSchema = object({
|
|
70725
70993
|
asset_id: string2().describe("A 32-character hexadecimal asset ID."),
|
|
70726
70994
|
callback: string2().optional().describe("URL for redirect after operation completion."),
|
|
70727
70995
|
invalidate: boolean2().optional().describe("Whether to invalidate CDN cache. Default is false."),
|
|
@@ -70734,7 +71002,7 @@ function assetsDestroyByAssetId(client$, request, options) {
|
|
|
70734
71002
|
return new APIPromise($do5(client$, request, options));
|
|
70735
71003
|
}
|
|
70736
71004
|
async function $do5(client$, request, options) {
|
|
70737
|
-
const parsed$ = safeParse4(request, (value$) =>
|
|
71005
|
+
const parsed$ = safeParse4(request, (value$) => DestroyByAssetIdRequest$zodSchema.parse(value$), "Input validation failed");
|
|
70738
71006
|
if (!parsed$.ok) {
|
|
70739
71007
|
return [parsed$, { status: "invalid" }];
|
|
70740
71008
|
}
|
|
@@ -70804,7 +71072,7 @@ var init_assetsDestroyByAssetId = __esm(() => {
|
|
|
70804
71072
|
init_schemas4();
|
|
70805
71073
|
init_security();
|
|
70806
71074
|
init_url();
|
|
70807
|
-
|
|
71075
|
+
init_destroybyassetidrequest();
|
|
70808
71076
|
init_async();
|
|
70809
71077
|
});
|
|
70810
71078
|
|
|
@@ -70812,10 +71080,10 @@ var init_assetsDestroyByAssetId = __esm(() => {
|
|
|
70812
71080
|
var args4, tool$assetsDestroyByAssetId;
|
|
70813
71081
|
var init_assetsDestroyByAssetId2 = __esm(() => {
|
|
70814
71082
|
init_assetsDestroyByAssetId();
|
|
70815
|
-
|
|
71083
|
+
init_destroybyassetidrequest();
|
|
70816
71084
|
init_tools();
|
|
70817
71085
|
args4 = {
|
|
70818
|
-
request:
|
|
71086
|
+
request: DestroyByAssetIdRequest$zodSchema.describe(`The asset to delete and related options.`)
|
|
70819
71087
|
};
|
|
70820
71088
|
tool$assetsDestroyByAssetId = {
|
|
70821
71089
|
name: "delete-asset",
|
|
@@ -71031,7 +71299,7 @@ var init_generatearchiveresponse = __esm(() => {
|
|
|
71031
71299
|
});
|
|
71032
71300
|
|
|
71033
71301
|
// src/models/generatearchiveop.ts
|
|
71034
|
-
var
|
|
71302
|
+
var Mode$zodSchema, TargetFormat$zodSchema, GenerateArchiveGlobals$zodSchema, AssetFolders$zodSchema, GenerateArchiveRequestBody$zodSchema, GenerateArchiveRequest$zodSchema, GenerateArchiveResponseResponse$zodSchema;
|
|
71035
71303
|
var init_generatearchiveop = __esm(() => {
|
|
71036
71304
|
init_zod();
|
|
71037
71305
|
init_base64();
|
|
@@ -71039,9 +71307,6 @@ var init_generatearchiveop = __esm(() => {
|
|
|
71039
71307
|
init_archiveresourcetype();
|
|
71040
71308
|
init_deliverytypeall();
|
|
71041
71309
|
init_generatearchiveresponse();
|
|
71042
|
-
GenerateArchiveGlobals$zodSchema = object({
|
|
71043
|
-
cloud_name: string2().describe("The cloud name of your product environment.").optional()
|
|
71044
|
-
});
|
|
71045
71310
|
Mode$zodSchema = _enum2([
|
|
71046
71311
|
"download",
|
|
71047
71312
|
"create",
|
|
@@ -71055,6 +71320,9 @@ create_and_download - Creates, stores, and delivers the archive file
|
|
|
71055
71320
|
"zip",
|
|
71056
71321
|
"tgz"
|
|
71057
71322
|
]).describe("The format of the generated archive.");
|
|
71323
|
+
GenerateArchiveGlobals$zodSchema = object({
|
|
71324
|
+
cloud_name: string2().describe("The cloud name of your product environment.").optional()
|
|
71325
|
+
});
|
|
71058
71326
|
AssetFolders$zodSchema = union([
|
|
71059
71327
|
array(string2()),
|
|
71060
71328
|
string2()
|
|
@@ -72544,8 +72812,10 @@ var CreateFolderResponse$zodSchema;
|
|
|
72544
72812
|
var init_createfolderresponse = __esm(() => {
|
|
72545
72813
|
init_zod();
|
|
72546
72814
|
CreateFolderResponse$zodSchema = object({
|
|
72547
|
-
|
|
72548
|
-
|
|
72815
|
+
created_at: exports_iso.datetime({ offset: true }).optional().describe("The timestamp when the folder was created."),
|
|
72816
|
+
external_id: string2().describe("The unique identifier for the folder."),
|
|
72817
|
+
name: string2().describe("The name of the folder."),
|
|
72818
|
+
path: string2().describe("The full path of the folder."),
|
|
72549
72819
|
success: boolean2().optional().describe("Whether the operation was successful.")
|
|
72550
72820
|
});
|
|
72551
72821
|
});
|
|
@@ -72563,8 +72833,8 @@ var init_createfolderop = __esm(() => {
|
|
|
72563
72833
|
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.")
|
|
72564
72834
|
});
|
|
72565
72835
|
CreateFolderResponseResponse$zodSchema = union([
|
|
72566
|
-
|
|
72567
|
-
|
|
72836
|
+
CreateFolderResponse$zodSchema,
|
|
72837
|
+
ApiError$zodSchema
|
|
72568
72838
|
]);
|
|
72569
72839
|
});
|
|
72570
72840
|
|
|
@@ -73193,8 +73463,530 @@ Renames or moves an entire folder (along with all assets it contains) to a new l
|
|
|
73193
73463
|
};
|
|
73194
73464
|
});
|
|
73195
73465
|
|
|
73466
|
+
// src/models/imageformat.ts
|
|
73467
|
+
var ImageFormat$zodSchema;
|
|
73468
|
+
var init_imageformat = __esm(() => {
|
|
73469
|
+
init_zod();
|
|
73470
|
+
ImageFormat$zodSchema = _enum2([
|
|
73471
|
+
"jpeg",
|
|
73472
|
+
"png",
|
|
73473
|
+
"webp"
|
|
73474
|
+
]).describe("Desired output image format. Optional; defaults to `png` when omitted.\nMapped to the closest format the chosen model supports — `webp` falls\nback to `png` on models that don't support it (e.g. FLUX.2 Pro), and the\nrequest is ignored entirely by models that don't expose a format option\n(e.g. Recraft).\n");
|
|
73475
|
+
});
|
|
73476
|
+
|
|
73477
|
+
// src/models/declarativeimagesize.ts
|
|
73478
|
+
var AspectRatio$zodSchema, Resolution$zodSchema, DeclarativeImageSize$zodSchema;
|
|
73479
|
+
var init_declarativeimagesize = __esm(() => {
|
|
73480
|
+
init_zod();
|
|
73481
|
+
AspectRatio$zodSchema = _enum2([
|
|
73482
|
+
"1:1",
|
|
73483
|
+
"16:9",
|
|
73484
|
+
"9:16",
|
|
73485
|
+
"4:3",
|
|
73486
|
+
"3:4"
|
|
73487
|
+
]).describe(`Output aspect ratio, width-to-height. Limited to the core ratios
|
|
73488
|
+
every model supports natively.
|
|
73489
|
+
`);
|
|
73490
|
+
Resolution$zodSchema = _enum2([
|
|
73491
|
+
"0.5K",
|
|
73492
|
+
"1K",
|
|
73493
|
+
"2K",
|
|
73494
|
+
"4K"
|
|
73495
|
+
]).describe("Output resolution tier, measured on the longest edge. Defaults to\n`1K` when omitted.\n* `0.5K`: ~512 px\n* `1K`: ~1024 px\n* `2K`: ~2048 px\n* `4K`: ~4096 px\n");
|
|
73496
|
+
DeclarativeImageSize$zodSchema = object({
|
|
73497
|
+
aspect_ratio: AspectRatio$zodSchema.describe(`Output aspect ratio, width-to-height. Limited to the core ratios
|
|
73498
|
+
every model supports natively.
|
|
73499
|
+
`),
|
|
73500
|
+
resolution: Resolution$zodSchema.optional().describe("Output resolution tier, measured on the longest edge. Defaults to\n`1K` when omitted.\n* `0.5K`: ~512 px\n* `1K`: ~1024 px\n* `2K`: ~2048 px\n* `4K`: ~4096 px\n")
|
|
73501
|
+
}).describe(`Declarative output size — an aspect ratio plus an optional resolution
|
|
73502
|
+
tier, resolved server-side to the nearest size the model supports.
|
|
73503
|
+
`);
|
|
73504
|
+
});
|
|
73505
|
+
|
|
73506
|
+
// src/models/dimensionsimagesize.ts
|
|
73507
|
+
var DimensionsImageSize$zodSchema;
|
|
73508
|
+
var init_dimensionsimagesize = __esm(() => {
|
|
73509
|
+
init_zod();
|
|
73510
|
+
DimensionsImageSize$zodSchema = object({
|
|
73511
|
+
height: int().describe("Output height in pixels."),
|
|
73512
|
+
width: int().describe("Output width in pixels.")
|
|
73513
|
+
}).describe("Exact output dimensions in pixels. Both `width` and `height` are required together.");
|
|
73514
|
+
});
|
|
73515
|
+
|
|
73516
|
+
// src/models/imagesize.ts
|
|
73517
|
+
var ImageSize$zodSchema;
|
|
73518
|
+
var init_imagesize = __esm(() => {
|
|
73519
|
+
init_zod();
|
|
73520
|
+
init_declarativeimagesize();
|
|
73521
|
+
init_dimensionsimagesize();
|
|
73522
|
+
ImageSize$zodSchema = union([
|
|
73523
|
+
DimensionsImageSize$zodSchema,
|
|
73524
|
+
DeclarativeImageSize$zodSchema
|
|
73525
|
+
]).describe("Desired output size, given in **one** of two mutually exclusive forms:\n\n * `DimensionsImageSize`: `width` and `height` in pixels, for precise\n control.\n * `DeclarativeImageSize`: `aspect_ratio` (and an optional `resolution`\n tier), resolved server-side to the closest size the chosen model\n supports. This is the portable form: most providers natively accept\n an aspect ratio plus a resolution tier rather than raw pixels.\n\nOmit `image_size` entirely to use the model's default size.\n");
|
|
73526
|
+
});
|
|
73527
|
+
|
|
73528
|
+
// src/models/modelbyfamily.ts
|
|
73529
|
+
var Family$zodSchema, Tier$zodSchema, ModelByFamily$zodSchema;
|
|
73530
|
+
var init_modelbyfamily = __esm(() => {
|
|
73531
|
+
init_zod();
|
|
73532
|
+
Family$zodSchema = _enum2([
|
|
73533
|
+
"flux",
|
|
73534
|
+
"recraft",
|
|
73535
|
+
"gpt-image",
|
|
73536
|
+
"nano-banana",
|
|
73537
|
+
"ideogram"
|
|
73538
|
+
]).describe("Model family:\n* `flux`: Photorealistic images (FLUX.2 Klein 9B / FLUX.2 Pro).\n* `recraft`: Vector and illustration (Recraft V3 / Recraft V4).\n* `gpt-image`: Campaign and marketing images (GPT Image 1 Mini / GPT Image 2).\n* `nano-banana`: General purpose generation (Nano Banana 1 / Nano Banana 2).\n* `ideogram`: Realism, text rendering, and artistic generation (Ideogram V4).\n");
|
|
73539
|
+
Tier$zodSchema = _enum2([
|
|
73540
|
+
"standard",
|
|
73541
|
+
"premium"
|
|
73542
|
+
]).describe("Quality tier within the family. Defaults to `standard` when omitted.");
|
|
73543
|
+
ModelByFamily$zodSchema = object({
|
|
73544
|
+
family: Family$zodSchema.describe("Model family:\n* `flux`: Photorealistic images (FLUX.2 Klein 9B / FLUX.2 Pro).\n* `recraft`: Vector and illustration (Recraft V3 / Recraft V4).\n* `gpt-image`: Campaign and marketing images (GPT Image 1 Mini / GPT Image 2).\n* `nano-banana`: General purpose generation (Nano Banana 1 / Nano Banana 2).\n* `ideogram`: Realism, text rendering, and artistic generation (Ideogram V4).\n"),
|
|
73545
|
+
tier: Tier$zodSchema.optional().describe("Quality tier within the family. Defaults to `standard` when omitted.")
|
|
73546
|
+
}).describe("Select a model by family and quality tier; a missing `tier` defaults to\n`standard`.\n");
|
|
73547
|
+
});
|
|
73548
|
+
|
|
73549
|
+
// src/models/modelbyid.ts
|
|
73550
|
+
var Id$zodSchema, ModelById$zodSchema;
|
|
73551
|
+
var init_modelbyid = __esm(() => {
|
|
73552
|
+
init_zod();
|
|
73553
|
+
Id$zodSchema = _enum2([
|
|
73554
|
+
"nano-banana-1",
|
|
73555
|
+
"nano-banana-2",
|
|
73556
|
+
"flux-2-klein-9b",
|
|
73557
|
+
"flux-2-pro",
|
|
73558
|
+
"recraft-v3",
|
|
73559
|
+
"recraft-v4",
|
|
73560
|
+
"gpt-image-1-mini",
|
|
73561
|
+
"gpt-image-2",
|
|
73562
|
+
"ideogram-v4-base",
|
|
73563
|
+
"ideogram-v4-turbo",
|
|
73564
|
+
"nano-banana-1-edit",
|
|
73565
|
+
"nano-banana-2-edit",
|
|
73566
|
+
"flux-2-klein-9b-edit",
|
|
73567
|
+
"flux-2-pro-edit",
|
|
73568
|
+
"recraft-v3-edit",
|
|
73569
|
+
"gpt-image-1-mini-edit",
|
|
73570
|
+
"gpt-image-2-edit"
|
|
73571
|
+
]).describe("Exact model identifier; overrides family/tier when provided. The\n`-edit` models accept reference images and are selectable only on\n`image_to_image`; the others only on `text_to_image`.\n");
|
|
73572
|
+
ModelById$zodSchema = object({
|
|
73573
|
+
id: Id$zodSchema.describe("Exact model identifier; overrides family/tier when provided. The\n`-edit` models accept reference images and are selectable only on\n`image_to_image`; the others only on `text_to_image`.\n")
|
|
73574
|
+
}).describe("Pin an exact model by ID, bypassing family/tier.");
|
|
73575
|
+
});
|
|
73576
|
+
|
|
73577
|
+
// src/models/modelselection.ts
|
|
73578
|
+
var ModelSelection$zodSchema;
|
|
73579
|
+
var init_modelselection = __esm(() => {
|
|
73580
|
+
init_zod();
|
|
73581
|
+
init_modelbyfamily();
|
|
73582
|
+
init_modelbyid();
|
|
73583
|
+
ModelSelection$zodSchema = union([
|
|
73584
|
+
ModelByFamily$zodSchema,
|
|
73585
|
+
ModelById$zodSchema
|
|
73586
|
+
]).describe("Selects the model, in one of two mutually exclusive forms (omit to use\nthe global default):\n * `ModelByFamily`: `family` (+ optional `tier`); the stable-over-time\n selector.\n * `ModelById`: an explicit `id`, pinning one exact model.\n");
|
|
73587
|
+
});
|
|
73588
|
+
|
|
73589
|
+
// src/models/managedassettarget.ts
|
|
73590
|
+
var ManagedAssetTargetTargetType$zodSchema, ManagedAssetTarget$zodSchema;
|
|
73591
|
+
var init_managedassettarget = __esm(() => {
|
|
73592
|
+
init_zod();
|
|
73593
|
+
ManagedAssetTargetTargetType$zodSchema = _enum2([
|
|
73594
|
+
"managed_asset"
|
|
73595
|
+
]).describe("Discriminator identifying this as a managed-asset target.");
|
|
73596
|
+
ManagedAssetTarget$zodSchema = object({
|
|
73597
|
+
public_id: string2().optional().describe("Public ID to store the asset under. Auto-assigned when omitted."),
|
|
73598
|
+
target_type: ManagedAssetTargetTargetType$zodSchema.describe("Discriminator identifying this as a managed-asset target."),
|
|
73599
|
+
upload_preset: string2().optional().describe("Upload preset to apply. Uses the product environment's default when omitted.")
|
|
73600
|
+
}).describe("Store the output as a permanent managed asset in your Cloudinary product environment (the default).");
|
|
73601
|
+
});
|
|
73602
|
+
|
|
73603
|
+
// src/models/temporarytarget.ts
|
|
73604
|
+
var TemporaryTargetTargetType$zodSchema, TemporaryTarget$zodSchema;
|
|
73605
|
+
var init_temporarytarget = __esm(() => {
|
|
73606
|
+
init_zod();
|
|
73607
|
+
TemporaryTargetTargetType$zodSchema = _enum2([
|
|
73608
|
+
"temporary"
|
|
73609
|
+
]).describe("Discriminator identifying this as a temporary target.");
|
|
73610
|
+
TemporaryTarget$zodSchema = object({
|
|
73611
|
+
target_type: TemporaryTargetTargetType$zodSchema.describe("Discriminator identifying this as a temporary target.")
|
|
73612
|
+
}).describe("Store the output as a short-lived asset on the upload service.");
|
|
73613
|
+
});
|
|
73614
|
+
|
|
73615
|
+
// src/models/target.ts
|
|
73616
|
+
var Target$zodSchema;
|
|
73617
|
+
var init_target = __esm(() => {
|
|
73618
|
+
init_zod();
|
|
73619
|
+
init_managedassettarget();
|
|
73620
|
+
init_temporarytarget();
|
|
73621
|
+
Target$zodSchema = union([
|
|
73622
|
+
ManagedAssetTarget$zodSchema.and(object({
|
|
73623
|
+
target_type: literal("managed_asset")
|
|
73624
|
+
}).transform((v2) => ({ target_type: v2.target_type }))),
|
|
73625
|
+
TemporaryTarget$zodSchema.and(object({
|
|
73626
|
+
target_type: literal("temporary")
|
|
73627
|
+
}).transform((v2) => ({ target_type: v2.target_type })))
|
|
73628
|
+
]).describe("Where to store the generated output, determined by `target_type`.\nOptional; defaults to a `managed_asset` target when omitted.\n");
|
|
73629
|
+
});
|
|
73630
|
+
|
|
73631
|
+
// src/models/generateimagerequest.ts
|
|
73632
|
+
var GenerateImageRequest$zodSchema;
|
|
73633
|
+
var init_generateimagerequest = __esm(() => {
|
|
73634
|
+
init_zod();
|
|
73635
|
+
init_imageformat();
|
|
73636
|
+
init_imagesize();
|
|
73637
|
+
init_modelselection();
|
|
73638
|
+
init_target();
|
|
73639
|
+
GenerateImageRequest$zodSchema = object({
|
|
73640
|
+
async: boolean2().default(false).describe(`Whether to perform the generation asynchronously. When true, the API
|
|
73641
|
+
returns immediately with a 202 and completes in the background. Once
|
|
73642
|
+
complete, a webhook notification is sent to the specified URL and/or to
|
|
73643
|
+
the URLs defined in the product environment's settings.
|
|
73644
|
+
`),
|
|
73645
|
+
format: ImageFormat$zodSchema.optional().describe("Desired output image format. Optional; defaults to `png` when omitted.\nMapped to the closest format the chosen model supports — `webp` falls\nback to `png` on models that don't support it (e.g. FLUX.2 Pro), and the\nrequest is ignored entirely by models that don't expose a format option\n(e.g. Recraft).\n"),
|
|
73646
|
+
image_size: ImageSize$zodSchema.optional().describe("Desired output size, given in **one** of two mutually exclusive forms:\n\n * `DimensionsImageSize`: `width` and `height` in pixels, for precise\n control.\n * `DeclarativeImageSize`: `aspect_ratio` (and an optional `resolution`\n tier), resolved server-side to the closest size the chosen model\n supports. This is the portable form: most providers natively accept\n an aspect ratio plus a resolution tier rather than raw pixels.\n\nOmit `image_size` entirely to use the model's default size.\n"),
|
|
73647
|
+
model: ModelSelection$zodSchema.optional().describe("Selects the model, in one of two mutually exclusive forms (omit to use\nthe global default):\n * `ModelByFamily`: `family` (+ optional `tier`); the stable-over-time\n selector.\n * `ModelById`: an explicit `id`, pinning one exact model.\n"),
|
|
73648
|
+
notification_url: string2().optional().describe("The webhook URL to notify when the generation is complete. Only relevant when `async` is set to true."),
|
|
73649
|
+
prompt: string2().describe("The text description of the image to generate."),
|
|
73650
|
+
seed: int().nullable().optional().describe(`Seed for reproducible generation. Supported by most models. Silently
|
|
73651
|
+
ignored by models that don't support it.
|
|
73652
|
+
`),
|
|
73653
|
+
target: Target$zodSchema.optional().describe("Where to store the generated output, determined by `target_type`.\nOptional; defaults to a `managed_asset` target when omitted.\n")
|
|
73654
|
+
}).describe("Parameters for an image-generation request. Only `prompt` is required;\nall other fields fall back to documented defaults.\n");
|
|
73655
|
+
});
|
|
73656
|
+
|
|
73657
|
+
// src/funcs/generationGenerateImage.ts
|
|
73658
|
+
function generationGenerateImage(client$, request, options) {
|
|
73659
|
+
return new APIPromise($do19(client$, request, options));
|
|
73660
|
+
}
|
|
73661
|
+
async function $do19(client$, request, options) {
|
|
73662
|
+
const parsed$ = safeParse4(request, (value$) => GenerateImageRequest$zodSchema.parse(value$), "Input validation failed");
|
|
73663
|
+
if (!parsed$.ok) {
|
|
73664
|
+
return [parsed$, { status: "invalid" }];
|
|
73665
|
+
}
|
|
73666
|
+
const payload$ = parsed$.value;
|
|
73667
|
+
const body$ = encodeJSON("body", payload$, { explode: true });
|
|
73668
|
+
const pathParams$ = {
|
|
73669
|
+
cloud_name: encodeSimple("cloud_name", client$._options.cloud_name, {
|
|
73670
|
+
explode: false,
|
|
73671
|
+
charEncoding: "percent"
|
|
73672
|
+
})
|
|
73673
|
+
};
|
|
73674
|
+
const path$ = pathToFunc("/v2/generate/{cloud_name}/text_to_image")(pathParams$);
|
|
73675
|
+
const headers$ = new Headers(compactMap({
|
|
73676
|
+
"Content-Type": "application/json",
|
|
73677
|
+
Accept: "application/json"
|
|
73678
|
+
}));
|
|
73679
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
73680
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
73681
|
+
const context = {
|
|
73682
|
+
options: client$._options,
|
|
73683
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
73684
|
+
operationID: "generate_image",
|
|
73685
|
+
oAuth2Scopes: null,
|
|
73686
|
+
resolvedSecurity: requestSecurity,
|
|
73687
|
+
securitySource: client$._options.security,
|
|
73688
|
+
retryConfig: options?.retries || client$._options.retryConfig || { strategy: "none" },
|
|
73689
|
+
retryCodes: options?.retryCodes || [
|
|
73690
|
+
"429",
|
|
73691
|
+
"500",
|
|
73692
|
+
"502",
|
|
73693
|
+
"503",
|
|
73694
|
+
"504"
|
|
73695
|
+
]
|
|
73696
|
+
};
|
|
73697
|
+
const requestRes = client$._createRequest(context, {
|
|
73698
|
+
security: requestSecurity,
|
|
73699
|
+
method: "POST",
|
|
73700
|
+
baseURL: options?.serverURL,
|
|
73701
|
+
path: path$,
|
|
73702
|
+
headers: headers$,
|
|
73703
|
+
body: body$,
|
|
73704
|
+
userAgent: client$._options.userAgent,
|
|
73705
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
73706
|
+
}, options);
|
|
73707
|
+
if (!requestRes.ok) {
|
|
73708
|
+
return [requestRes, { status: "invalid" }];
|
|
73709
|
+
}
|
|
73710
|
+
const req$ = requestRes.value;
|
|
73711
|
+
const doResult = await client$._do(req$, {
|
|
73712
|
+
context,
|
|
73713
|
+
errorCodes: [],
|
|
73714
|
+
retryConfig: context.retryConfig,
|
|
73715
|
+
retryCodes: context.retryCodes
|
|
73716
|
+
});
|
|
73717
|
+
if (!doResult.ok) {
|
|
73718
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
73719
|
+
}
|
|
73720
|
+
return [doResult, {
|
|
73721
|
+
status: "complete",
|
|
73722
|
+
request: req$,
|
|
73723
|
+
response: doResult.value
|
|
73724
|
+
}];
|
|
73725
|
+
}
|
|
73726
|
+
var init_generationGenerateImage = __esm(() => {
|
|
73727
|
+
init_encodings();
|
|
73728
|
+
init_primitives();
|
|
73729
|
+
init_schemas4();
|
|
73730
|
+
init_security();
|
|
73731
|
+
init_url();
|
|
73732
|
+
init_generateimagerequest();
|
|
73733
|
+
init_async();
|
|
73734
|
+
});
|
|
73735
|
+
|
|
73736
|
+
// src/mcp-server/tools/generationGenerateImage.ts
|
|
73737
|
+
var args18, tool$generationGenerateImage;
|
|
73738
|
+
var init_generationGenerateImage2 = __esm(() => {
|
|
73739
|
+
init_generationGenerateImage();
|
|
73740
|
+
init_generateimagerequest();
|
|
73741
|
+
init_tools();
|
|
73742
|
+
args18 = {
|
|
73743
|
+
request: GenerateImageRequest$zodSchema.describe(`A JSON object containing the generation request parameters.`)
|
|
73744
|
+
};
|
|
73745
|
+
tool$generationGenerateImage = {
|
|
73746
|
+
name: "generate-image",
|
|
73747
|
+
description: `Generate an image
|
|
73748
|
+
|
|
73749
|
+
Generate an image from a text prompt using AI models.
|
|
73750
|
+
|
|
73751
|
+
The model is selected via the optional \`model\` object:
|
|
73752
|
+
1. If \`model.id\` is provided, use that exact model.
|
|
73753
|
+
2. Else if \`model.family\` (+ optional \`model.tier\`) is provided, resolve via the model registry; a missing tier defaults to \`standard\`.
|
|
73754
|
+
3. If \`model\` is omitted, use the global default (nano-banana / premium, i.e. \`nano-banana-2\`).
|
|
73755
|
+
`,
|
|
73756
|
+
scopes: ["builder"],
|
|
73757
|
+
annotations: {
|
|
73758
|
+
title: "Generate an Image",
|
|
73759
|
+
destructiveHint: false,
|
|
73760
|
+
idempotentHint: false,
|
|
73761
|
+
openWorldHint: false,
|
|
73762
|
+
readOnlyHint: false
|
|
73763
|
+
},
|
|
73764
|
+
args: args18,
|
|
73765
|
+
tool: async (client, args19, ctx) => {
|
|
73766
|
+
const [result] = await generationGenerateImage(client, args19.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
73767
|
+
if (!result.ok) {
|
|
73768
|
+
return {
|
|
73769
|
+
content: [{ type: "text", text: result.error.message }],
|
|
73770
|
+
isError: true
|
|
73771
|
+
};
|
|
73772
|
+
}
|
|
73773
|
+
return formatResult(result.value);
|
|
73774
|
+
}
|
|
73775
|
+
};
|
|
73776
|
+
});
|
|
73777
|
+
|
|
73778
|
+
// src/models/managedassetreference.ts
|
|
73779
|
+
var ManagedAssetReferenceSourceType$zodSchema, ManagedAssetReference$zodSchema;
|
|
73780
|
+
var init_managedassetreference = __esm(() => {
|
|
73781
|
+
init_zod();
|
|
73782
|
+
ManagedAssetReferenceSourceType$zodSchema = _enum2([
|
|
73783
|
+
"managed_asset"
|
|
73784
|
+
]).describe("Discriminator identifying this as a managed-asset reference.");
|
|
73785
|
+
ManagedAssetReference$zodSchema = object({
|
|
73786
|
+
asset_id: string2().describe("Cloudinary asset ID of the reference image. READ permission is enforced."),
|
|
73787
|
+
source_type: ManagedAssetReferenceSourceType$zodSchema.describe("Discriminator identifying this as a managed-asset reference.")
|
|
73788
|
+
}).describe(`A reference to a managed asset in the caller's product environment, by
|
|
73789
|
+
asset ID.
|
|
73790
|
+
`);
|
|
73791
|
+
});
|
|
73792
|
+
|
|
73793
|
+
// src/models/urlreference.ts
|
|
73794
|
+
var UrlReferenceSourceType$zodSchema, UrlReference$zodSchema;
|
|
73795
|
+
var init_urlreference = __esm(() => {
|
|
73796
|
+
init_zod();
|
|
73797
|
+
UrlReferenceSourceType$zodSchema = _enum2([
|
|
73798
|
+
"url"
|
|
73799
|
+
]).describe("Discriminator identifying this as an external-URL reference.");
|
|
73800
|
+
UrlReference$zodSchema = object({
|
|
73801
|
+
source_type: UrlReferenceSourceType$zodSchema.describe("Discriminator identifying this as an external-URL reference."),
|
|
73802
|
+
url: string2().describe("HTTPS URL of the reference image.")
|
|
73803
|
+
}).describe("A reference to an external image by HTTPS URL.");
|
|
73804
|
+
});
|
|
73805
|
+
|
|
73806
|
+
// src/models/referenceimage.ts
|
|
73807
|
+
var ReferenceImage$zodSchema;
|
|
73808
|
+
var init_referenceimage = __esm(() => {
|
|
73809
|
+
init_zod();
|
|
73810
|
+
init_managedassetreference();
|
|
73811
|
+
init_urlreference();
|
|
73812
|
+
ReferenceImage$zodSchema = union([
|
|
73813
|
+
ManagedAssetReference$zodSchema.and(object({
|
|
73814
|
+
source_type: literal("managed_asset")
|
|
73815
|
+
}).transform((v2) => ({ source_type: v2.source_type }))),
|
|
73816
|
+
UrlReference$zodSchema.and(object({
|
|
73817
|
+
source_type: literal("url")
|
|
73818
|
+
}).transform((v2) => ({ source_type: v2.source_type })))
|
|
73819
|
+
]).describe("A single reference image, in **one** of two mutually exclusive forms\ndetermined by `source_type`:\n * `ManagedAssetReference`: a managed asset in the caller's product\n environment, by `asset_id` (read permission is checked).\n * `UrlReference`: an external image by HTTPS `url`.\n");
|
|
73820
|
+
});
|
|
73821
|
+
|
|
73822
|
+
// src/models/imagetoimagerequest.ts
|
|
73823
|
+
var ImageToImageRequest$zodSchema;
|
|
73824
|
+
var init_imagetoimagerequest = __esm(() => {
|
|
73825
|
+
init_zod();
|
|
73826
|
+
init_imageformat();
|
|
73827
|
+
init_imagesize();
|
|
73828
|
+
init_modelselection();
|
|
73829
|
+
init_referenceimage();
|
|
73830
|
+
init_target();
|
|
73831
|
+
ImageToImageRequest$zodSchema = object({
|
|
73832
|
+
async: boolean2().default(false).describe(`Whether to perform the generation asynchronously. When true, the API
|
|
73833
|
+
returns immediately with a 202 and completes in the background. Once
|
|
73834
|
+
complete, a webhook notification is sent to the specified URL and/or to
|
|
73835
|
+
the URLs defined in the product environment's settings.
|
|
73836
|
+
`),
|
|
73837
|
+
format: ImageFormat$zodSchema.optional().describe("Desired output image format. Optional; defaults to `png` when omitted.\nMapped to the closest format the chosen model supports — `webp` falls\nback to `png` on models that don't support it (e.g. FLUX.2 Pro), and the\nrequest is ignored entirely by models that don't expose a format option\n(e.g. Recraft).\n"),
|
|
73838
|
+
image_size: ImageSize$zodSchema.optional().describe("Desired output size, given in **one** of two mutually exclusive forms:\n\n * `DimensionsImageSize`: `width` and `height` in pixels, for precise\n control.\n * `DeclarativeImageSize`: `aspect_ratio` (and an optional `resolution`\n tier), resolved server-side to the closest size the chosen model\n supports. This is the portable form: most providers natively accept\n an aspect ratio plus a resolution tier rather than raw pixels.\n\nOmit `image_size` entirely to use the model's default size.\n"),
|
|
73839
|
+
model: ModelSelection$zodSchema.optional().describe("Selects the model, in one of two mutually exclusive forms (omit to use\nthe global default):\n * `ModelByFamily`: `family` (+ optional `tier`); the stable-over-time\n selector.\n * `ModelById`: an explicit `id`, pinning one exact model.\n"),
|
|
73840
|
+
notification_url: string2().optional().describe("The webhook URL to notify when the generation is complete. Only relevant when `async` is set to true."),
|
|
73841
|
+
prompt: string2().describe("The text instruction describing the desired edit / output."),
|
|
73842
|
+
reference_images: array(ReferenceImage$zodSchema).describe("Reference images that steer the generation, in order (1-indexed; the\nprompt may address them positionally as `[1]`, `[2]`, …). Each entry\nis either a managed asset (by `asset_id`) or an external `url`. The\nplatform accepts up to 4; a specific model may accept fewer (e.g.\nRecraft accepts 1) — exceeding the selected model's capacity returns\n400.\n"),
|
|
73843
|
+
seed: int().nullable().optional().describe(`Seed for reproducible generation. Supported by most models. Silently
|
|
73844
|
+
ignored by models that don't support it.
|
|
73845
|
+
`),
|
|
73846
|
+
target: Target$zodSchema.optional().describe("Where to store the generated output, determined by `target_type`.\nOptional; defaults to a `managed_asset` target when omitted.\n")
|
|
73847
|
+
}).describe("Parameters for an image-to-image (reference-guided) request. Both\n`prompt` (the edit instruction) and `reference_images` are required; all\nother fields fall back to the same defaults as `text_to_image`.\n");
|
|
73848
|
+
});
|
|
73849
|
+
|
|
73850
|
+
// src/funcs/generationGenerateImageFromImages.ts
|
|
73851
|
+
function generationGenerateImageFromImages(client$, request, options) {
|
|
73852
|
+
return new APIPromise($do20(client$, request, options));
|
|
73853
|
+
}
|
|
73854
|
+
async function $do20(client$, request, options) {
|
|
73855
|
+
const parsed$ = safeParse4(request, (value$) => ImageToImageRequest$zodSchema.parse(value$), "Input validation failed");
|
|
73856
|
+
if (!parsed$.ok) {
|
|
73857
|
+
return [parsed$, { status: "invalid" }];
|
|
73858
|
+
}
|
|
73859
|
+
const payload$ = parsed$.value;
|
|
73860
|
+
const body$ = encodeJSON("body", payload$, { explode: true });
|
|
73861
|
+
const pathParams$ = {
|
|
73862
|
+
cloud_name: encodeSimple("cloud_name", client$._options.cloud_name, {
|
|
73863
|
+
explode: false,
|
|
73864
|
+
charEncoding: "percent"
|
|
73865
|
+
})
|
|
73866
|
+
};
|
|
73867
|
+
const path$ = pathToFunc("/v2/generate/{cloud_name}/image_to_image")(pathParams$);
|
|
73868
|
+
const headers$ = new Headers(compactMap({
|
|
73869
|
+
"Content-Type": "application/json",
|
|
73870
|
+
Accept: "application/json"
|
|
73871
|
+
}));
|
|
73872
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
73873
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
73874
|
+
const context = {
|
|
73875
|
+
options: client$._options,
|
|
73876
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
73877
|
+
operationID: "generate_image_from_images",
|
|
73878
|
+
oAuth2Scopes: null,
|
|
73879
|
+
resolvedSecurity: requestSecurity,
|
|
73880
|
+
securitySource: client$._options.security,
|
|
73881
|
+
retryConfig: options?.retries || client$._options.retryConfig || { strategy: "none" },
|
|
73882
|
+
retryCodes: options?.retryCodes || [
|
|
73883
|
+
"429",
|
|
73884
|
+
"500",
|
|
73885
|
+
"502",
|
|
73886
|
+
"503",
|
|
73887
|
+
"504"
|
|
73888
|
+
]
|
|
73889
|
+
};
|
|
73890
|
+
const requestRes = client$._createRequest(context, {
|
|
73891
|
+
security: requestSecurity,
|
|
73892
|
+
method: "POST",
|
|
73893
|
+
baseURL: options?.serverURL,
|
|
73894
|
+
path: path$,
|
|
73895
|
+
headers: headers$,
|
|
73896
|
+
body: body$,
|
|
73897
|
+
userAgent: client$._options.userAgent,
|
|
73898
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
73899
|
+
}, options);
|
|
73900
|
+
if (!requestRes.ok) {
|
|
73901
|
+
return [requestRes, { status: "invalid" }];
|
|
73902
|
+
}
|
|
73903
|
+
const req$ = requestRes.value;
|
|
73904
|
+
const doResult = await client$._do(req$, {
|
|
73905
|
+
context,
|
|
73906
|
+
errorCodes: [],
|
|
73907
|
+
retryConfig: context.retryConfig,
|
|
73908
|
+
retryCodes: context.retryCodes
|
|
73909
|
+
});
|
|
73910
|
+
if (!doResult.ok) {
|
|
73911
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
73912
|
+
}
|
|
73913
|
+
return [doResult, {
|
|
73914
|
+
status: "complete",
|
|
73915
|
+
request: req$,
|
|
73916
|
+
response: doResult.value
|
|
73917
|
+
}];
|
|
73918
|
+
}
|
|
73919
|
+
var init_generationGenerateImageFromImages = __esm(() => {
|
|
73920
|
+
init_encodings();
|
|
73921
|
+
init_primitives();
|
|
73922
|
+
init_schemas4();
|
|
73923
|
+
init_security();
|
|
73924
|
+
init_url();
|
|
73925
|
+
init_imagetoimagerequest();
|
|
73926
|
+
init_async();
|
|
73927
|
+
});
|
|
73928
|
+
|
|
73929
|
+
// src/mcp-server/tools/generationGenerateImageFromImages.ts
|
|
73930
|
+
var args19, tool$generationGenerateImageFromImages;
|
|
73931
|
+
var init_generationGenerateImageFromImages2 = __esm(() => {
|
|
73932
|
+
init_generationGenerateImageFromImages();
|
|
73933
|
+
init_imagetoimagerequest();
|
|
73934
|
+
init_tools();
|
|
73935
|
+
args19 = {
|
|
73936
|
+
request: ImageToImageRequest$zodSchema.describe(`A JSON object containing the image-to-image generation request parameters.`)
|
|
73937
|
+
};
|
|
73938
|
+
tool$generationGenerateImageFromImages = {
|
|
73939
|
+
name: "generate-image-from-images",
|
|
73940
|
+
description: `Generate an image from reference images
|
|
73941
|
+
|
|
73942
|
+
Generate an image guided by one or more **reference images** — restyle,
|
|
73943
|
+
on-brand variants, character consistency, virtual try-on, edit/extend —
|
|
73944
|
+
steered by \`prompt\`.
|
|
73945
|
+
|
|
73946
|
+
Only edit-capable models are selectable here. The model is selected via
|
|
73947
|
+
the optional \`model\` object, exactly like \`text_to_image\`, but IDs are
|
|
73948
|
+
restricted to edit models:
|
|
73949
|
+
1. If \`model.id\` is provided, use that exact edit model.
|
|
73950
|
+
2. Else if \`model.family\` (+ optional \`model.tier\`) is provided, resolve
|
|
73951
|
+
|
|
73952
|
+
|
|
73953
|
+
|
|
73954
|
+
|
|
73955
|
+
|
|
73956
|
+
|
|
73957
|
+
|
|
73958
|
+
|
|
73959
|
+
to that family's edit model (e.g. \`nano-banana\` / \`premium\` →
|
|
73960
|
+
\`nano-banana-2-edit\`).
|
|
73961
|
+
3. If \`model\` is omitted, use the default edit model (\`nano-banana-2-edit\`).
|
|
73962
|
+
|
|
73963
|
+
Each reference image is either a stored managed asset (by \`asset_id\`,
|
|
73964
|
+
read-permission checked) or an external HTTPS \`url\`.
|
|
73965
|
+
`,
|
|
73966
|
+
scopes: ["builder"],
|
|
73967
|
+
annotations: {
|
|
73968
|
+
title: "Generate an Image from Reference Images",
|
|
73969
|
+
destructiveHint: false,
|
|
73970
|
+
idempotentHint: false,
|
|
73971
|
+
openWorldHint: false,
|
|
73972
|
+
readOnlyHint: false
|
|
73973
|
+
},
|
|
73974
|
+
args: args19,
|
|
73975
|
+
tool: async (client, args20, ctx) => {
|
|
73976
|
+
const [result] = await generationGenerateImageFromImages(client, args20.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
73977
|
+
if (!result.ok) {
|
|
73978
|
+
return {
|
|
73979
|
+
content: [{ type: "text", text: result.error.message }],
|
|
73980
|
+
isError: true
|
|
73981
|
+
};
|
|
73982
|
+
}
|
|
73983
|
+
return formatResult(result.value);
|
|
73984
|
+
}
|
|
73985
|
+
};
|
|
73986
|
+
});
|
|
73987
|
+
|
|
73196
73988
|
// src/models/searchparameters.ts
|
|
73197
|
-
var Type$zodSchema,
|
|
73989
|
+
var Type$zodSchema, AggregateEnum$zodSchema, WithField$zodSchema, SearchParametersRange$zodSchema, Aggregate$zodSchema, AggregateUnion$zodSchema, SearchParameters$zodSchema;
|
|
73198
73990
|
var init_searchparameters = __esm(() => {
|
|
73199
73991
|
init_zod();
|
|
73200
73992
|
init_directionenum();
|
|
@@ -73204,25 +73996,11 @@ var init_searchparameters = __esm(() => {
|
|
|
73204
73996
|
"video_pixels",
|
|
73205
73997
|
"duration"
|
|
73206
73998
|
]);
|
|
73207
|
-
SearchParametersRange$zodSchema = object({
|
|
73208
|
-
from: number2().optional().describe("Start of the range (inclusive). At least one of `from` / `to` is required."),
|
|
73209
|
-
key: string2().describe("A label for the bucket, returned in the aggregation response. 1–20 chars, alphanumeric plus `-` and `_`."),
|
|
73210
|
-
to: number2().optional().describe("End of the range (exclusive). At least one of `from` / `to` is required.")
|
|
73211
|
-
});
|
|
73212
|
-
Aggregate$zodSchema = object({
|
|
73213
|
-
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"),
|
|
73214
|
-
type: Type$zodSchema
|
|
73215
|
-
});
|
|
73216
73999
|
AggregateEnum$zodSchema = _enum2([
|
|
73217
74000
|
"format",
|
|
73218
74001
|
"resource_type",
|
|
73219
74002
|
"type"
|
|
73220
74003
|
]);
|
|
73221
|
-
AggregateUnion$zodSchema = union([
|
|
73222
|
-
array(AggregateEnum$zodSchema),
|
|
73223
|
-
array(lazy(() => Aggregate$zodSchema))
|
|
73224
|
-
]).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.
|
|
73225
|
-
`);
|
|
73226
74004
|
WithField$zodSchema = _enum2([
|
|
73227
74005
|
"context",
|
|
73228
74006
|
"tags",
|
|
@@ -73232,13 +74010,27 @@ var init_searchparameters = __esm(() => {
|
|
|
73232
74010
|
"quality_analysis",
|
|
73233
74011
|
"accessibility_analysis"
|
|
73234
74012
|
]);
|
|
74013
|
+
SearchParametersRange$zodSchema = object({
|
|
74014
|
+
from: number2().optional().describe("Start of the range (inclusive). At least one of `from` / `to` is required."),
|
|
74015
|
+
key: string2().describe("A label for the bucket, returned in the aggregation response. 1–20 chars, alphanumeric plus `-` and `_`."),
|
|
74016
|
+
to: number2().optional().describe("End of the range (exclusive). At least one of `from` / `to` is required.")
|
|
74017
|
+
});
|
|
74018
|
+
Aggregate$zodSchema = object({
|
|
74019
|
+
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"),
|
|
74020
|
+
type: Type$zodSchema
|
|
74021
|
+
});
|
|
74022
|
+
AggregateUnion$zodSchema = union([
|
|
74023
|
+
array(AggregateEnum$zodSchema),
|
|
74024
|
+
array(lazy(() => Aggregate$zodSchema))
|
|
74025
|
+
]).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.
|
|
74026
|
+
`);
|
|
73235
74027
|
SearchParameters$zodSchema = object({
|
|
73236
74028
|
aggregate: union([
|
|
73237
74029
|
array(AggregateEnum$zodSchema),
|
|
73238
74030
|
array(lazy(() => Aggregate$zodSchema))
|
|
73239
74031
|
]).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.
|
|
73240
74032
|
`),
|
|
73241
|
-
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 `
|
|
74033
|
+
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"`, `tags:"brand:openhaul"`, `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 (`uploaded_at>"2024-01-15"`, `created_at>"2026-01-01T00:00:00Z"`), or relative shorthand `Nh`, `Nd`, `Nw` (`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'),
|
|
73242
74034
|
fields: string2().optional().describe(`A comma-separated list of fields to include in the response.
|
|
73243
74035
|
Notes:
|
|
73244
74036
|
- 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).
|
|
@@ -73255,9 +74047,9 @@ Default: [{"created_at": "desc"}].
|
|
|
73255
74047
|
|
|
73256
74048
|
// src/funcs/searchSearchAssets.ts
|
|
73257
74049
|
function searchSearchAssets(client$, request, options) {
|
|
73258
|
-
return new APIPromise($
|
|
74050
|
+
return new APIPromise($do21(client$, request, options));
|
|
73259
74051
|
}
|
|
73260
|
-
async function $
|
|
74052
|
+
async function $do21(client$, request, options) {
|
|
73261
74053
|
const parsed$ = safeParse4(request, (value$) => SearchParameters$zodSchema.parse(value$), "Input validation failed");
|
|
73262
74054
|
if (!parsed$.ok) {
|
|
73263
74055
|
return [parsed$, { status: "invalid" }];
|
|
@@ -73333,12 +74125,12 @@ var init_searchSearchAssets = __esm(() => {
|
|
|
73333
74125
|
});
|
|
73334
74126
|
|
|
73335
74127
|
// src/mcp-server/tools/searchSearchAssets.ts
|
|
73336
|
-
var
|
|
74128
|
+
var args20, tool$searchSearchAssets;
|
|
73337
74129
|
var init_searchSearchAssets2 = __esm(() => {
|
|
73338
74130
|
init_searchSearchAssets();
|
|
73339
74131
|
init_searchparameters();
|
|
73340
74132
|
init_tools();
|
|
73341
|
-
|
|
74133
|
+
args20 = {
|
|
73342
74134
|
request: SearchParameters$zodSchema.describe(`The search query parameters.`)
|
|
73343
74135
|
};
|
|
73344
74136
|
tool$searchSearchAssets = {
|
|
@@ -73357,11 +74149,12 @@ Uses a Lucene-like query language to filter assets by descriptive attributes (\`
|
|
|
73357
74149
|
- **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\`.
|
|
73358
74150
|
- **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.
|
|
73359
74151
|
- **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).
|
|
73360
|
-
- **Dates**: ISO-8601 in quotes (\`uploaded_at>"2024-01-15"\`) or relative shorthand \`Nh\`, \`Nd\`, \`Nw
|
|
73361
|
-
- **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"\`.
|
|
74152
|
+
- **Dates**: ISO-8601 in quotes (\`uploaded_at>"2024-01-15"\`, \`created_at>"2026-01-01T00:00:00Z"\`) or relative shorthand \`Nh\`, \`Nd\`, \`Nw\` (\`uploaded_at>1d\`, \`created_at:[4w TO 1w]\`). Send raw \`<\`/\`>\`, never HTML-escaped.
|
|
74153
|
+
- **Quoting**: wrap any value containing a space, colon, or other reserved character (\`! ( ) { } [ ] ^ ~ ? \\ = & < > |\`) in double quotes, or escape each character with \`\\\`. Examples: \`tags:"service:mantels"\`, \`tags:"brand:openhaul"\`, \`aspect_ratio:"16:9"\`, \`folder:"My Folder"\`.
|
|
73362
74154
|
|
|
73363
74155
|
## Common mistakes
|
|
73364
74156
|
|
|
74157
|
+
- No months or years shorthand. \`1m\` and \`1y\` are not supported; use ISO dates: \`created_at>"2024-01-01"\` or \`created_at:["2024-01-01" TO "2024-04-01"]\`.
|
|
73365
74158
|
- 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.
|
|
73366
74159
|
- 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.
|
|
73367
74160
|
- \`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).
|
|
@@ -73406,9 +74199,9 @@ Uses a Lucene-like query language to filter assets by descriptive attributes (\`
|
|
|
73406
74199
|
_meta: {
|
|
73407
74200
|
ui: { resourceUri: appUri("asset-gallery", "search-assets") }
|
|
73408
74201
|
},
|
|
73409
|
-
args:
|
|
73410
|
-
tool: async (client,
|
|
73411
|
-
const [result] = await searchSearchAssets(client,
|
|
74202
|
+
args: args20,
|
|
74203
|
+
tool: async (client, args21, ctx) => {
|
|
74204
|
+
const [result] = await searchSearchAssets(client, args21.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
73412
74205
|
if (!result.ok) {
|
|
73413
74206
|
return {
|
|
73414
74207
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -73445,9 +74238,9 @@ var init_visualsearchparametersunion = __esm(() => {
|
|
|
73445
74238
|
|
|
73446
74239
|
// src/funcs/searchVisualSearchAssets.ts
|
|
73447
74240
|
function searchVisualSearchAssets(client$, request, options) {
|
|
73448
|
-
return new APIPromise($
|
|
74241
|
+
return new APIPromise($do22(client$, request, options));
|
|
73449
74242
|
}
|
|
73450
|
-
async function $
|
|
74243
|
+
async function $do22(client$, request, options) {
|
|
73451
74244
|
const parsed$ = safeParse4(request, (value$) => VisualSearchParametersUnion$zodSchema.parse(value$), "Input validation failed");
|
|
73452
74245
|
if (!parsed$.ok) {
|
|
73453
74246
|
return [parsed$, { status: "invalid" }];
|
|
@@ -73523,12 +74316,12 @@ var init_searchVisualSearchAssets = __esm(() => {
|
|
|
73523
74316
|
});
|
|
73524
74317
|
|
|
73525
74318
|
// src/mcp-server/tools/searchVisualSearchAssets.ts
|
|
73526
|
-
var
|
|
74319
|
+
var args21, tool$searchVisualSearchAssets;
|
|
73527
74320
|
var init_searchVisualSearchAssets2 = __esm(() => {
|
|
73528
74321
|
init_searchVisualSearchAssets();
|
|
73529
74322
|
init_visualsearchparametersunion();
|
|
73530
74323
|
init_tools();
|
|
73531
|
-
|
|
74324
|
+
args21 = {
|
|
73532
74325
|
request: VisualSearchParametersUnion$zodSchema.describe(`The visual search parameters.`)
|
|
73533
74326
|
};
|
|
73534
74327
|
tool$searchVisualSearchAssets = {
|
|
@@ -73548,9 +74341,364 @@ Returns a list of resources that are visually similar to a specified image. You
|
|
|
73548
74341
|
openWorldHint: false,
|
|
73549
74342
|
readOnlyHint: true
|
|
73550
74343
|
},
|
|
73551
|
-
args:
|
|
73552
|
-
tool: async (client,
|
|
73553
|
-
const [result] = await searchVisualSearchAssets(client,
|
|
74344
|
+
args: args21,
|
|
74345
|
+
tool: async (client, args22, ctx) => {
|
|
74346
|
+
const [result] = await searchVisualSearchAssets(client, args22.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
74347
|
+
if (!result.ok) {
|
|
74348
|
+
return {
|
|
74349
|
+
content: [{ type: "text", text: result.error.message }],
|
|
74350
|
+
isError: true
|
|
74351
|
+
};
|
|
74352
|
+
}
|
|
74353
|
+
return formatResult(result.value);
|
|
74354
|
+
}
|
|
74355
|
+
};
|
|
74356
|
+
});
|
|
74357
|
+
|
|
74358
|
+
// src/models/errorcategory.ts
|
|
74359
|
+
var ErrorCategory$zodSchema;
|
|
74360
|
+
var init_errorcategory = __esm(() => {
|
|
74361
|
+
init_zod();
|
|
74362
|
+
ErrorCategory$zodSchema = _enum2([
|
|
74363
|
+
"user_error",
|
|
74364
|
+
"auth_error",
|
|
74365
|
+
"server_error",
|
|
74366
|
+
"rate_limit_error"
|
|
74367
|
+
]).describe("Coarse classification of an error, primarily used by clients to decide whether to retry.\n* `user_error`: the request was invalid; do not retry without changes.\n* `auth_error`: authentication or authorization failed.\n* `server_error`: an unexpected server-side error; retrying may succeed.\n* `rate_limit_error`: quota or rate limit exceeded; retry later.\n");
|
|
74368
|
+
});
|
|
74369
|
+
|
|
74370
|
+
// src/models/error.ts
|
|
74371
|
+
var Details$zodSchema, ErrorT$zodSchema;
|
|
74372
|
+
var init_error = __esm(() => {
|
|
74373
|
+
init_zod();
|
|
74374
|
+
init_errorcategory();
|
|
74375
|
+
Details$zodSchema = object({}).describe("Additional structured context about the error, when available.");
|
|
74376
|
+
ErrorT$zodSchema = object({
|
|
74377
|
+
category: ErrorCategory$zodSchema.optional().describe("Coarse classification of an error, primarily used by clients to decide whether to retry.\n* `user_error`: the request was invalid; do not retry without changes.\n* `auth_error`: authentication or authorization failed.\n* `server_error`: an unexpected server-side error; retrying may succeed.\n* `rate_limit_error`: quota or rate limit exceeded; retry later.\n"),
|
|
74378
|
+
code: string2().optional().describe("Stable, machine-readable error code for programmatic handling."),
|
|
74379
|
+
details: lazy(() => Details$zodSchema).optional().describe("Additional structured context about the error, when available."),
|
|
74380
|
+
message: string2().optional().describe("Human-readable description of what went wrong.")
|
|
74381
|
+
}).describe("Details of an error, including a coarse category for retry logic, a stable error code, and a human-readable message.");
|
|
74382
|
+
});
|
|
74383
|
+
|
|
74384
|
+
// src/models/errorresponse.ts
|
|
74385
|
+
var ErrorResponse$zodSchema;
|
|
74386
|
+
var init_errorresponse = __esm(() => {
|
|
74387
|
+
init_zod();
|
|
74388
|
+
init_error();
|
|
74389
|
+
ErrorResponse$zodSchema = object({
|
|
74390
|
+
error: ErrorT$zodSchema.describe("Details of an error, including a coarse category for retry logic, a stable error code, and a human-readable message."),
|
|
74391
|
+
request_id: string2().describe("Unique identifier for this request, for correlation and support.")
|
|
74392
|
+
}).describe("Wrapper for error responses; includes the error object and a request_id for correlation.");
|
|
74393
|
+
});
|
|
74394
|
+
|
|
74395
|
+
// src/models/feature.ts
|
|
74396
|
+
var Feature$zodSchema;
|
|
74397
|
+
var init_feature = __esm(() => {
|
|
74398
|
+
init_zod();
|
|
74399
|
+
Feature$zodSchema = _enum2([
|
|
74400
|
+
"image_generation"
|
|
74401
|
+
]).describe("The add-on a quota applies to.");
|
|
74402
|
+
});
|
|
74403
|
+
|
|
74404
|
+
// src/models/addonquota.ts
|
|
74405
|
+
var AddonQuota$zodSchema;
|
|
74406
|
+
var init_addonquota = __esm(() => {
|
|
74407
|
+
init_zod();
|
|
74408
|
+
init_feature();
|
|
74409
|
+
AddonQuota$zodSchema = object({
|
|
74410
|
+
limit: int().nullable().describe("Maximum generations allowed per period."),
|
|
74411
|
+
remaining: int().nullable().describe("Generations remaining in the current period."),
|
|
74412
|
+
type: Feature$zodSchema.describe("The add-on a quota applies to."),
|
|
74413
|
+
used_by_request: int().nullable().describe("Number of generations consumed by this request.")
|
|
74414
|
+
}).describe("Quota usage for a single add-on.");
|
|
74415
|
+
});
|
|
74416
|
+
|
|
74417
|
+
// src/models/limits.ts
|
|
74418
|
+
var Limits$zodSchema;
|
|
74419
|
+
var init_limits = __esm(() => {
|
|
74420
|
+
init_zod();
|
|
74421
|
+
init_addonquota();
|
|
74422
|
+
Limits$zodSchema = object({
|
|
74423
|
+
addons_quota: array(AddonQuota$zodSchema).optional().describe("Per-add-on quota usage for this account.")
|
|
74424
|
+
}).describe("Rate limit information for the account's add-on quotas.");
|
|
74425
|
+
});
|
|
74426
|
+
|
|
74427
|
+
// src/models/ratelimitedresponse.ts
|
|
74428
|
+
var RateLimitedResponse$zodSchema;
|
|
74429
|
+
var init_ratelimitedresponse = __esm(() => {
|
|
74430
|
+
init_zod();
|
|
74431
|
+
init_error();
|
|
74432
|
+
init_limits();
|
|
74433
|
+
RateLimitedResponse$zodSchema = object({
|
|
74434
|
+
error: ErrorT$zodSchema.describe("Details of an error, including a coarse category for retry logic, a stable error code, and a human-readable message."),
|
|
74435
|
+
limits: Limits$zodSchema.optional().describe("Rate limit information for the account's add-on quotas."),
|
|
74436
|
+
request_id: string2().describe("Unique identifier for this request, for correlation and support.")
|
|
74437
|
+
}).describe("Rate limited.");
|
|
74438
|
+
});
|
|
74439
|
+
|
|
74440
|
+
// src/models/model.ts
|
|
74441
|
+
var Model$zodSchema;
|
|
74442
|
+
var init_model = __esm(() => {
|
|
74443
|
+
init_zod();
|
|
74444
|
+
Model$zodSchema = object({
|
|
74445
|
+
family: string2().describe("The model family used."),
|
|
74446
|
+
id: string2().describe("The exact model identifier used for generation."),
|
|
74447
|
+
tier: string2().describe("The quality tier used.")
|
|
74448
|
+
}).describe("Identifies the model that produced a generation result.");
|
|
74449
|
+
});
|
|
74450
|
+
|
|
74451
|
+
// src/models/managedassetstorage.ts
|
|
74452
|
+
var ManagedAssetStorageStorageType$zodSchema, ManagedAssetStorageResourceType$zodSchema, ManagedAssetStorage$zodSchema;
|
|
74453
|
+
var init_managedassetstorage = __esm(() => {
|
|
74454
|
+
init_zod();
|
|
74455
|
+
ManagedAssetStorageStorageType$zodSchema = _enum2([
|
|
74456
|
+
"managed_asset"
|
|
74457
|
+
]).describe("Discriminator identifying this as managed-asset storage.");
|
|
74458
|
+
ManagedAssetStorageResourceType$zodSchema = _enum2([
|
|
74459
|
+
"image",
|
|
74460
|
+
"video",
|
|
74461
|
+
"raw"
|
|
74462
|
+
]).describe("Cloudinary resource type of the stored asset.");
|
|
74463
|
+
ManagedAssetStorage$zodSchema = object({
|
|
74464
|
+
asset_id: string2().optional().describe("Cloudinary asset ID — a stable, globally-unique reference to the asset."),
|
|
74465
|
+
public_id: string2().describe("Public ID of the stored asset."),
|
|
74466
|
+
resource_type: ManagedAssetStorageResourceType$zodSchema.describe("Cloudinary resource type of the stored asset."),
|
|
74467
|
+
secure_url: string2().describe("The URL to fetch the generated asset."),
|
|
74468
|
+
storage_type: ManagedAssetStorageStorageType$zodSchema.describe("Discriminator identifying this as managed-asset storage."),
|
|
74469
|
+
type: string2().describe("Cloudinary delivery type of the stored asset (e.g. `upload`, `private`, `authenticated`)."),
|
|
74470
|
+
version: int().describe("Version of the stored asset.")
|
|
74471
|
+
}).describe("A generated asset stored as a permanent managed asset. Reference it in\nother Cloudinary APIs by `asset_id`, or by the\n`resource_type` / `type` / `public_id` triple.\n");
|
|
74472
|
+
});
|
|
74473
|
+
|
|
74474
|
+
// src/models/temporarystorage.ts
|
|
74475
|
+
var TemporaryStorageStorageType$zodSchema, TemporaryStorage$zodSchema;
|
|
74476
|
+
var init_temporarystorage = __esm(() => {
|
|
74477
|
+
init_zod();
|
|
74478
|
+
TemporaryStorageStorageType$zodSchema = _enum2([
|
|
74479
|
+
"temporary"
|
|
74480
|
+
]).describe("Discriminator identifying this as temporary storage.");
|
|
74481
|
+
TemporaryStorage$zodSchema = object({
|
|
74482
|
+
expires_at: exports_iso.datetime({ offset: true }).describe("Time in UTC when secure_url stops being valid."),
|
|
74483
|
+
secure_url: string2().describe("The URL to fetch the generated asset."),
|
|
74484
|
+
storage_type: TemporaryStorageStorageType$zodSchema.describe("Discriminator identifying this as temporary storage.")
|
|
74485
|
+
}).describe("A generated asset stored as a short-lived asset on the upload service.");
|
|
74486
|
+
});
|
|
74487
|
+
|
|
74488
|
+
// src/models/storage.ts
|
|
74489
|
+
var Storage$zodSchema;
|
|
74490
|
+
var init_storage = __esm(() => {
|
|
74491
|
+
init_zod();
|
|
74492
|
+
init_managedassetstorage();
|
|
74493
|
+
init_temporarystorage();
|
|
74494
|
+
Storage$zodSchema = union([
|
|
74495
|
+
ManagedAssetStorage$zodSchema.and(object({
|
|
74496
|
+
storage_type: literal("managed_asset")
|
|
74497
|
+
}).transform((v2) => ({ storage_type: v2.storage_type }))),
|
|
74498
|
+
TemporaryStorage$zodSchema.and(object({
|
|
74499
|
+
storage_type: literal("temporary")
|
|
74500
|
+
}).transform((v2) => ({ storage_type: v2.storage_type })))
|
|
74501
|
+
]).describe("Where a generated asset is stored — mirrors the request `target`,\ndetermined by `storage_type`. `secure_url` is always present.\n");
|
|
74502
|
+
});
|
|
74503
|
+
|
|
74504
|
+
// src/models/generatedasset.ts
|
|
74505
|
+
var Format$zodSchema, GeneratedAsset$zodSchema;
|
|
74506
|
+
var init_generatedasset = __esm(() => {
|
|
74507
|
+
init_zod();
|
|
74508
|
+
init_model();
|
|
74509
|
+
init_storage();
|
|
74510
|
+
Format$zodSchema = _enum2([
|
|
74511
|
+
"png",
|
|
74512
|
+
"jpeg",
|
|
74513
|
+
"webp"
|
|
74514
|
+
]).describe("The image format of the stored asset.");
|
|
74515
|
+
GeneratedAsset$zodSchema = object({
|
|
74516
|
+
bytes: int().optional().describe("The size of the generated image in bytes."),
|
|
74517
|
+
created_at: exports_iso.datetime({ offset: true }).optional().describe("The timestamp when the image was generated."),
|
|
74518
|
+
format: Format$zodSchema.optional().describe("The image format of the stored asset."),
|
|
74519
|
+
height: int().optional().describe("The height of the generated image in pixels; zero if the model doesn't provide dimensions."),
|
|
74520
|
+
model: Model$zodSchema.optional().describe("Identifies the model that produced a generation result."),
|
|
74521
|
+
seed: int().nullable().optional().describe(`The seed used for generation. Echoes input or returns the model-generated seed.
|
|
74522
|
+
Null when the model doesn't support seeds.
|
|
74523
|
+
`),
|
|
74524
|
+
storage: Storage$zodSchema.describe("Where a generated asset is stored — mirrors the request `target`,\ndetermined by `storage_type`. `secure_url` is always present.\n"),
|
|
74525
|
+
width: int().optional().describe("The width of the generated image in pixels; zero if the model doesn't provide dimensions.")
|
|
74526
|
+
}).describe("A generated asset: where it is stored (`storage`) plus its media\nmetadata. The media fields are populated once the task completes; an\nin-progress asset carries only `storage`.\n");
|
|
74527
|
+
});
|
|
74528
|
+
|
|
74529
|
+
// src/models/taskstatus.ts
|
|
74530
|
+
var TaskStatus$zodSchema;
|
|
74531
|
+
var init_taskstatus = __esm(() => {
|
|
74532
|
+
init_zod();
|
|
74533
|
+
TaskStatus$zodSchema = _enum2([
|
|
74534
|
+
"pending",
|
|
74535
|
+
"processing",
|
|
74536
|
+
"completed",
|
|
74537
|
+
"failed"
|
|
74538
|
+
]).describe("The status of an async generation task.\n* `pending`: accepted and queued, not yet started.\n* `processing`: generation is in progress.\n* `completed`: generation finished; `result` is populated.\n* `failed`: generation did not complete successfully.\n");
|
|
74539
|
+
});
|
|
74540
|
+
|
|
74541
|
+
// src/models/task.ts
|
|
74542
|
+
var TaskResult$zodSchema, Task$zodSchema;
|
|
74543
|
+
var init_task = __esm(() => {
|
|
74544
|
+
init_zod();
|
|
74545
|
+
init_generatedasset();
|
|
74546
|
+
init_limits();
|
|
74547
|
+
init_taskstatus();
|
|
74548
|
+
TaskResult$zodSchema = object({
|
|
74549
|
+
assets: array(GeneratedAsset$zodSchema).describe("The generated assets. Currently a single asset is returned.")
|
|
74550
|
+
}).describe("The generated assets. Populated once `status` is `completed`.\n");
|
|
74551
|
+
Task$zodSchema = object({
|
|
74552
|
+
limits: Limits$zodSchema.optional().describe("Rate limit information for the account's add-on quotas."),
|
|
74553
|
+
result: lazy(() => TaskResult$zodSchema).nullable().optional().describe("The generated assets. Populated once `status` is `completed`.\n"),
|
|
74554
|
+
status: TaskStatus$zodSchema.describe("The status of an async generation task.\n* `pending`: accepted and queued, not yet started.\n* `processing`: generation is in progress.\n* `completed`: generation finished; `result` is populated.\n* `failed`: generation did not complete successfully.\n"),
|
|
74555
|
+
task_id: string2().describe("Identifier for the async generation task. Use it to poll `GET /generate/{cloud_name}/tasks/{task_id}`.")
|
|
74556
|
+
}).describe("An async generation task. Returned when a generation is accepted (202)\nand from GET /tasks/{task_id} as it progresses. The `result` is filled\nin once `status` is `completed`.\n");
|
|
74557
|
+
});
|
|
74558
|
+
|
|
74559
|
+
// src/models/taskresponse.ts
|
|
74560
|
+
var TaskResponse$zodSchema;
|
|
74561
|
+
var init_taskresponse = __esm(() => {
|
|
74562
|
+
init_zod();
|
|
74563
|
+
init_task();
|
|
74564
|
+
TaskResponse$zodSchema = object({
|
|
74565
|
+
data: Task$zodSchema.optional().describe("An async generation task. Returned when a generation is accepted (202)\nand from GET /tasks/{task_id} as it progresses. The `result` is filled\nin once `status` is `completed`.\n"),
|
|
74566
|
+
request_id: string2().describe("Unique identifier for this request, for correlation and support.")
|
|
74567
|
+
}).describe(`Envelope for an async generation task — returned by the accepted (202)
|
|
74568
|
+
response and by GET /tasks/{task_id}.
|
|
74569
|
+
`);
|
|
74570
|
+
});
|
|
74571
|
+
|
|
74572
|
+
// src/models/getgenerationtaskstatusop.ts
|
|
74573
|
+
var GetGenerationTaskStatusGlobals$zodSchema, GetGenerationTaskStatusRequest$zodSchema, GetGenerationTaskStatusResponse$zodSchema;
|
|
74574
|
+
var init_getgenerationtaskstatusop = __esm(() => {
|
|
74575
|
+
init_zod();
|
|
74576
|
+
init_errorresponse();
|
|
74577
|
+
init_ratelimitedresponse();
|
|
74578
|
+
init_taskresponse();
|
|
74579
|
+
GetGenerationTaskStatusGlobals$zodSchema = object({
|
|
74580
|
+
cloud_name: string2().describe("The cloud name of your product environment.").optional()
|
|
74581
|
+
});
|
|
74582
|
+
GetGenerationTaskStatusRequest$zodSchema = object({
|
|
74583
|
+
task_id: string2().describe("The ID of the generation task.")
|
|
74584
|
+
});
|
|
74585
|
+
GetGenerationTaskStatusResponse$zodSchema = union([
|
|
74586
|
+
ErrorResponse$zodSchema,
|
|
74587
|
+
RateLimitedResponse$zodSchema,
|
|
74588
|
+
TaskResponse$zodSchema
|
|
74589
|
+
]);
|
|
74590
|
+
});
|
|
74591
|
+
|
|
74592
|
+
// src/funcs/tasksGetGenerationTaskStatus.ts
|
|
74593
|
+
function tasksGetGenerationTaskStatus(client$, task_id, options) {
|
|
74594
|
+
return new APIPromise($do23(client$, task_id, options));
|
|
74595
|
+
}
|
|
74596
|
+
async function $do23(client$, task_id, options) {
|
|
74597
|
+
const input$ = {
|
|
74598
|
+
task_id
|
|
74599
|
+
};
|
|
74600
|
+
const parsed$ = safeParse4(input$, (value$) => GetGenerationTaskStatusRequest$zodSchema.parse(value$), "Input validation failed");
|
|
74601
|
+
if (!parsed$.ok) {
|
|
74602
|
+
return [parsed$, { status: "invalid" }];
|
|
74603
|
+
}
|
|
74604
|
+
const payload$ = parsed$.value;
|
|
74605
|
+
const body$ = null;
|
|
74606
|
+
const pathParams$ = {
|
|
74607
|
+
cloud_name: encodeSimple("cloud_name", client$._options.cloud_name, {
|
|
74608
|
+
explode: false,
|
|
74609
|
+
charEncoding: "percent"
|
|
74610
|
+
}),
|
|
74611
|
+
task_id: encodeSimple("task_id", payload$.task_id, {
|
|
74612
|
+
explode: false,
|
|
74613
|
+
charEncoding: "percent"
|
|
74614
|
+
})
|
|
74615
|
+
};
|
|
74616
|
+
const path$ = pathToFunc("/v2/generate/{cloud_name}/tasks/{task_id}")(pathParams$);
|
|
74617
|
+
const headers$ = new Headers(compactMap({
|
|
74618
|
+
Accept: "application/json"
|
|
74619
|
+
}));
|
|
74620
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
74621
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
74622
|
+
const context = {
|
|
74623
|
+
options: client$._options,
|
|
74624
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
74625
|
+
operationID: "get_generation_task_status",
|
|
74626
|
+
oAuth2Scopes: null,
|
|
74627
|
+
resolvedSecurity: requestSecurity,
|
|
74628
|
+
securitySource: client$._options.security,
|
|
74629
|
+
retryConfig: options?.retries || client$._options.retryConfig || { strategy: "none" },
|
|
74630
|
+
retryCodes: options?.retryCodes || [
|
|
74631
|
+
"429",
|
|
74632
|
+
"500",
|
|
74633
|
+
"502",
|
|
74634
|
+
"503",
|
|
74635
|
+
"504"
|
|
74636
|
+
]
|
|
74637
|
+
};
|
|
74638
|
+
const requestRes = client$._createRequest(context, {
|
|
74639
|
+
security: requestSecurity,
|
|
74640
|
+
method: "GET",
|
|
74641
|
+
baseURL: options?.serverURL,
|
|
74642
|
+
path: path$,
|
|
74643
|
+
headers: headers$,
|
|
74644
|
+
body: body$,
|
|
74645
|
+
userAgent: client$._options.userAgent,
|
|
74646
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
74647
|
+
}, options);
|
|
74648
|
+
if (!requestRes.ok) {
|
|
74649
|
+
return [requestRes, { status: "invalid" }];
|
|
74650
|
+
}
|
|
74651
|
+
const req$ = requestRes.value;
|
|
74652
|
+
const doResult = await client$._do(req$, {
|
|
74653
|
+
context,
|
|
74654
|
+
errorCodes: [],
|
|
74655
|
+
retryConfig: context.retryConfig,
|
|
74656
|
+
retryCodes: context.retryCodes
|
|
74657
|
+
});
|
|
74658
|
+
if (!doResult.ok) {
|
|
74659
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
74660
|
+
}
|
|
74661
|
+
return [doResult, {
|
|
74662
|
+
status: "complete",
|
|
74663
|
+
request: req$,
|
|
74664
|
+
response: doResult.value
|
|
74665
|
+
}];
|
|
74666
|
+
}
|
|
74667
|
+
var init_tasksGetGenerationTaskStatus = __esm(() => {
|
|
74668
|
+
init_encodings();
|
|
74669
|
+
init_primitives();
|
|
74670
|
+
init_schemas4();
|
|
74671
|
+
init_security();
|
|
74672
|
+
init_url();
|
|
74673
|
+
init_getgenerationtaskstatusop();
|
|
74674
|
+
init_async();
|
|
74675
|
+
});
|
|
74676
|
+
|
|
74677
|
+
// src/mcp-server/tools/tasksGetGenerationTaskStatus.ts
|
|
74678
|
+
var args22, tool$tasksGetGenerationTaskStatus;
|
|
74679
|
+
var init_tasksGetGenerationTaskStatus2 = __esm(() => {
|
|
74680
|
+
init_zod();
|
|
74681
|
+
init_tasksGetGenerationTaskStatus();
|
|
74682
|
+
init_tools();
|
|
74683
|
+
args22 = {
|
|
74684
|
+
task_id: string2().describe("The ID of the generation task.")
|
|
74685
|
+
};
|
|
74686
|
+
tool$tasksGetGenerationTaskStatus = {
|
|
74687
|
+
name: "get-generation-task",
|
|
74688
|
+
description: `Get a generation task
|
|
74689
|
+
|
|
74690
|
+
Get the status of a generation task.`,
|
|
74691
|
+
scopes: ["builder"],
|
|
74692
|
+
annotations: {
|
|
74693
|
+
title: "Get a Generation Task",
|
|
74694
|
+
destructiveHint: false,
|
|
74695
|
+
idempotentHint: true,
|
|
74696
|
+
openWorldHint: false,
|
|
74697
|
+
readOnlyHint: true
|
|
74698
|
+
},
|
|
74699
|
+
args: args22,
|
|
74700
|
+
tool: async (client, args23, ctx) => {
|
|
74701
|
+
const [result] = await tasksGetGenerationTaskStatus(client, args23.task_id, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
73554
74702
|
if (!result.ok) {
|
|
73555
74703
|
return {
|
|
73556
74704
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -73613,9 +74761,9 @@ var init_uploadop = __esm(() => {
|
|
|
73613
74761
|
|
|
73614
74762
|
// src/funcs/uploadUpload.ts
|
|
73615
74763
|
function uploadUpload(client$, resource_type, upload_request, options) {
|
|
73616
|
-
return new APIPromise($
|
|
74764
|
+
return new APIPromise($do24(client$, resource_type, upload_request, options));
|
|
73617
74765
|
}
|
|
73618
|
-
async function $
|
|
74766
|
+
async function $do24(client$, resource_type, upload_request, options) {
|
|
73619
74767
|
const input$ = {
|
|
73620
74768
|
resource_type,
|
|
73621
74769
|
upload_request
|
|
@@ -73699,13 +74847,13 @@ var init_uploadUpload = __esm(() => {
|
|
|
73699
74847
|
});
|
|
73700
74848
|
|
|
73701
74849
|
// src/mcp-server/tools/uploadUpload.ts
|
|
73702
|
-
var
|
|
74850
|
+
var args23, tool$uploadUpload;
|
|
73703
74851
|
var init_uploadUpload2 = __esm(() => {
|
|
73704
74852
|
init_uploadUpload();
|
|
73705
74853
|
init_uploadrequest();
|
|
73706
74854
|
init_uploadresourcetype();
|
|
73707
74855
|
init_tools();
|
|
73708
|
-
|
|
74856
|
+
args23 = {
|
|
73709
74857
|
resource_type: UploadResourceType$zodSchema.default("auto").describe(`The type of resource (image, video, raw, or auto).`),
|
|
73710
74858
|
upload_request: UploadRequest$zodSchema.describe(`The file to upload and associated parameters.`)
|
|
73711
74859
|
};
|
|
@@ -73739,9 +74887,9 @@ Transform media files using transformation syntax in delivery URLs, which create
|
|
|
73739
74887
|
_meta: {
|
|
73740
74888
|
ui: { resourceUri: appUri("asset-upload", "upload-asset") }
|
|
73741
74889
|
},
|
|
73742
|
-
args:
|
|
73743
|
-
tool: async (client,
|
|
73744
|
-
const [result] = await uploadUpload(client,
|
|
74890
|
+
args: args23,
|
|
74891
|
+
tool: async (client, args24, ctx) => {
|
|
74892
|
+
const [result] = await uploadUpload(client, args24.resource_type, args24.upload_request, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
73745
74893
|
if (!result.ok) {
|
|
73746
74894
|
return {
|
|
73747
74895
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -73754,7 +74902,7 @@ Transform media files using transformation syntax in delivery URLs, which create
|
|
|
73754
74902
|
});
|
|
73755
74903
|
|
|
73756
74904
|
// src/models/usageresponse.ts
|
|
73757
|
-
var Transformations$zodSchema, Objects$zodSchema, Bandwidth$zodSchema,
|
|
74905
|
+
var Transformations$zodSchema, Objects$zodSchema, Bandwidth$zodSchema, UsageResponseStorage$zodSchema, Impressions$zodSchema, SecondsDelivered$zodSchema, MediaLimits$zodSchema, UsageResponse$zodSchema;
|
|
73758
74906
|
var init_usageresponse = __esm(() => {
|
|
73759
74907
|
init_zod();
|
|
73760
74908
|
Transformations$zodSchema = object({
|
|
@@ -73770,7 +74918,7 @@ var init_usageresponse = __esm(() => {
|
|
|
73770
74918
|
usage: int().optional().describe("Bandwidth used in bytes"),
|
|
73771
74919
|
used_percent: number2().optional().describe("Percentage of bandwidth limit used")
|
|
73772
74920
|
});
|
|
73773
|
-
|
|
74921
|
+
UsageResponseStorage$zodSchema = object({
|
|
73774
74922
|
limit: int().optional().describe("Storage limit for the plan"),
|
|
73775
74923
|
usage: int().optional().describe("Storage used in bytes"),
|
|
73776
74924
|
used_percent: number2().optional().describe("Percentage of storage limit used")
|
|
@@ -73800,7 +74948,7 @@ var init_usageresponse = __esm(() => {
|
|
|
73800
74948
|
requests: int().optional().describe("Number of requests made"),
|
|
73801
74949
|
resources: int().optional().describe("Number of resources stored"),
|
|
73802
74950
|
seconds_delivered: lazy(() => SecondsDelivered$zodSchema).optional(),
|
|
73803
|
-
storage: lazy(() =>
|
|
74951
|
+
storage: lazy(() => UsageResponseStorage$zodSchema).optional(),
|
|
73804
74952
|
transformations: lazy(() => Transformations$zodSchema).optional()
|
|
73805
74953
|
});
|
|
73806
74954
|
});
|
|
@@ -73825,9 +74973,9 @@ var init_getusageop = __esm(() => {
|
|
|
73825
74973
|
|
|
73826
74974
|
// src/funcs/usageGetUsage.ts
|
|
73827
74975
|
function usageGetUsage(client$, date6, options) {
|
|
73828
|
-
return new APIPromise($
|
|
74976
|
+
return new APIPromise($do25(client$, date6, options));
|
|
73829
74977
|
}
|
|
73830
|
-
async function $
|
|
74978
|
+
async function $do25(client$, date6, options) {
|
|
73831
74979
|
const input$ = {
|
|
73832
74980
|
date: date6
|
|
73833
74981
|
};
|
|
@@ -73909,12 +75057,12 @@ var init_usageGetUsage = __esm(() => {
|
|
|
73909
75057
|
});
|
|
73910
75058
|
|
|
73911
75059
|
// src/mcp-server/tools/usageGetUsage.ts
|
|
73912
|
-
var
|
|
75060
|
+
var args24, tool$usageGetUsage;
|
|
73913
75061
|
var init_usageGetUsage2 = __esm(() => {
|
|
73914
75062
|
init_zod();
|
|
73915
75063
|
init_usageGetUsage();
|
|
73916
75064
|
init_tools();
|
|
73917
|
-
|
|
75065
|
+
args24 = {
|
|
73918
75066
|
date: string2().date().describe("The date for which to retrieve usage details (YYYY-MM-DD). If not specified, returns the current usage.").optional()
|
|
73919
75067
|
};
|
|
73920
75068
|
tool$usageGetUsage = {
|
|
@@ -73930,9 +75078,9 @@ A report on the status of product environment usage, including storage, credits,
|
|
|
73930
75078
|
openWorldHint: false,
|
|
73931
75079
|
readOnlyHint: true
|
|
73932
75080
|
},
|
|
73933
|
-
args:
|
|
73934
|
-
tool: async (client,
|
|
73935
|
-
const [result] = await usageGetUsage(client,
|
|
75081
|
+
args: args24,
|
|
75082
|
+
tool: async (client, args25, ctx) => {
|
|
75083
|
+
const [result] = await usageGetUsage(client, args25.date, { fetchOptions: { signal: ctx.signal } }).$inspect();
|
|
73936
75084
|
if (!result.ok) {
|
|
73937
75085
|
return {
|
|
73938
75086
|
content: [{ type: "text", text: result.error.message }],
|
|
@@ -73948,7 +75096,7 @@ A report on the status of product environment usage, including storage, credits,
|
|
|
73948
75096
|
function createMCPServer(deps) {
|
|
73949
75097
|
const server = new McpServer({
|
|
73950
75098
|
name: "CloudinaryAssetMgmt",
|
|
73951
|
-
version: "0.
|
|
75099
|
+
version: "0.10.0"
|
|
73952
75100
|
});
|
|
73953
75101
|
const getClient = deps.getSDK || (() => new CloudinaryAssetMgmtCore({
|
|
73954
75102
|
security: deps.security,
|
|
@@ -73958,9 +75106,9 @@ function createMCPServer(deps) {
|
|
|
73958
75106
|
region: deps.region,
|
|
73959
75107
|
host: deps.host,
|
|
73960
75108
|
debugLogger: deps.logger.level === "debug" ? {
|
|
73961
|
-
log: (...
|
|
73962
|
-
group: (...
|
|
73963
|
-
groupEnd: (...
|
|
75109
|
+
log: (...args25) => console.log(...args25),
|
|
75110
|
+
group: (...args25) => console.group(...args25),
|
|
75111
|
+
groupEnd: (...args25) => console.groupEnd(...args25)
|
|
73964
75112
|
} : undefined
|
|
73965
75113
|
}));
|
|
73966
75114
|
const scopes = new Set(deps.scopes);
|
|
@@ -73991,6 +75139,9 @@ function createMCPServer(deps) {
|
|
|
73991
75139
|
tool(tool$foldersSearchFolders);
|
|
73992
75140
|
tool(tool$searchSearchAssets);
|
|
73993
75141
|
tool(tool$searchVisualSearchAssets);
|
|
75142
|
+
tool(tool$generationGenerateImage);
|
|
75143
|
+
tool(tool$generationGenerateImageFromImages);
|
|
75144
|
+
tool(tool$tasksGetGenerationTaskStatus);
|
|
73994
75145
|
if (deps.dynamic) {
|
|
73995
75146
|
registerDynamicTools(deps.logger, server, getClient, toolMap, scopes);
|
|
73996
75147
|
}
|
|
@@ -74020,8 +75171,11 @@ var init_server2 = __esm(() => {
|
|
|
74020
75171
|
init_foldersDestroyFolder2();
|
|
74021
75172
|
init_foldersSearchFolders2();
|
|
74022
75173
|
init_foldersUpdateFolder2();
|
|
75174
|
+
init_generationGenerateImage2();
|
|
75175
|
+
init_generationGenerateImageFromImages2();
|
|
74023
75176
|
init_searchSearchAssets2();
|
|
74024
75177
|
init_searchVisualSearchAssets2();
|
|
75178
|
+
init_tasksGetGenerationTaskStatus2();
|
|
74025
75179
|
init_uploadUpload2();
|
|
74026
75180
|
init_usageGetUsage2();
|
|
74027
75181
|
});
|
|
@@ -74165,7 +75319,7 @@ Lists the folders that match the specified search expression. Limited to 2000 re
|
|
|
74165
75319
|
},
|
|
74166
75320
|
{
|
|
74167
75321
|
name: "search-assets",
|
|
74168
|
-
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
|
|
75322
|
+
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\"`, `created_at>\"2026-01-01T00:00:00Z\"`) or relative shorthand `Nh`, `Nd`, `Nw` (`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\"`, `tags:\"brand:openhaul\"`, `aspect_ratio:\"16:9\"`, `folder:\"My Folder\"`.\n\n## Common mistakes\n\n- No months or years shorthand. `1m` and `1y` are not supported; use ISO dates: `created_at>\"2024-01-01\"` or `created_at:[\"2024-01-01\" TO \"2024-04-01\"]`.\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<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"
|
|
74169
75323
|
},
|
|
74170
75324
|
{
|
|
74171
75325
|
name: "visual-search-assets",
|
|
@@ -74176,6 +75330,20 @@ Returns a list of resources that are visually similar to a specified image. You
|
|
|
74176
75330
|
- Specify the asset ID of an existing image
|
|
74177
75331
|
- Provide a textual description
|
|
74178
75332
|
`
|
|
75333
|
+
},
|
|
75334
|
+
{
|
|
75335
|
+
name: "generate-image",
|
|
75336
|
+
description: "Generate an image\n\nGenerate an image from a text prompt using AI models.\n\nThe model is selected via the optional `model` object:\n1. If `model.id` is provided, use that exact model.\n2. Else if `model.family` (+ optional `model.tier`) is provided, resolve via the model registry; a missing tier defaults to `standard`.\n3. If `model` is omitted, use the global default (nano-banana / premium, i.e. `nano-banana-2`).\n"
|
|
75337
|
+
},
|
|
75338
|
+
{
|
|
75339
|
+
name: "generate-image-from-images",
|
|
75340
|
+
description: "Generate an image from reference images\n\nGenerate an image guided by one or more **reference images** — restyle,\non-brand variants, character consistency, virtual try-on, edit/extend —\nsteered by `prompt`.\n\nOnly edit-capable models are selectable here. The model is selected via\nthe optional `model` object, exactly like `text_to_image`, but IDs are\nrestricted to edit models:\n1. If `model.id` is provided, use that exact edit model.\n2. Else if `model.family` (+ optional `model.tier`) is provided, resolve\n\n\n\n\n\n\n\n\n to that family's edit model (e.g. `nano-banana` / `premium` →\n `nano-banana-2-edit`).\n3. If `model` is omitted, use the default edit model (`nano-banana-2-edit`).\n\nEach reference image is either a stored managed asset (by `asset_id`,\nread-permission checked) or an external HTTPS `url`.\n"
|
|
75341
|
+
},
|
|
75342
|
+
{
|
|
75343
|
+
name: "get-generation-task",
|
|
75344
|
+
description: `Get a generation task
|
|
75345
|
+
|
|
75346
|
+
Get the status of a generation task.`
|
|
74179
75347
|
},
|
|
74180
75348
|
{
|
|
74181
75349
|
name: "get-tx-reference",
|
|
@@ -75130,7 +76298,7 @@ http_headers = { "api-key" = "YOUR_API_KEY", "api-secret" = "YOUR_API_SECRET", "
|
|
|
75130
76298
|
<h1>Instructions</h1>
|
|
75131
76299
|
<p>One-click installation for Claude Desktop users</p>
|
|
75132
76300
|
<div class="instruction-item">
|
|
75133
|
-
<a href="https://github.com/cloudinary/asset-management-mcp/releases/download/v0.
|
|
76301
|
+
<a href="https://github.com/cloudinary/asset-management-mcp/releases/download/v0.10.0/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
|
|
75134
76302
|
\uD83D\uDCE5 Download MCP Bundle
|
|
75135
76303
|
</a>
|
|
75136
76304
|
</div>
|
|
@@ -77074,7 +78242,7 @@ var routes = ln({
|
|
|
77074
78242
|
var app = _e(routes, {
|
|
77075
78243
|
name: "mcp",
|
|
77076
78244
|
versionInfo: {
|
|
77077
|
-
currentVersion: "0.
|
|
78245
|
+
currentVersion: "0.10.0"
|
|
77078
78246
|
}
|
|
77079
78247
|
});
|
|
77080
78248
|
Yt(app, process4.argv.slice(2), buildContext(process4));
|
|
@@ -77082,5 +78250,5 @@ export {
|
|
|
77082
78250
|
app
|
|
77083
78251
|
};
|
|
77084
78252
|
|
|
77085
|
-
//# debugId=
|
|
78253
|
+
//# debugId=F2E22CE70DACAAF964756E2164756E21
|
|
77086
78254
|
//# sourceMappingURL=mcp-server.js.map
|