From 2896d62f0e23f22d8f79d017e0056fe725fd479d Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Mon, 1 Jun 2026 00:55:38 +0000 Subject: [PATCH] =?UTF-8?q?##=20Mcp-typescript=20SDK=20Changes:=20*=20`Clo?= =?UTF-8?q?udinaryEnvConfig.upload=5Fpresets.createUploadPreset()`:=20=20`?= =?UTF-8?q?request`=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20?= =?UTF-8?q?`CloudinaryEnvConfig.upload=5Fpresets.listUploadPresets()`:=20?= =?UTF-8?q?=20=20*=20=20`request`=20**Changed**=20(Breaking=20=E2=9A=A0?= =?UTF-8?q?=EF=B8=8F)=20=20=20*=20=20`response`=20**Changed**=20(Breaking?= =?UTF-8?q?=20=E2=9A=A0=EF=B8=8F)=20*=20`CloudinaryEnvConfig.upload=5Fpres?= =?UTF-8?q?ets.getUploadPreset()`:=20=20`response`=20**Changed**=20(Breaki?= =?UTF-8?q?ng=20=E2=9A=A0=EF=B8=8F)=20*=20`CloudinaryEnvConfig.upload=5Fpr?= =?UTF-8?q?esets.updateUploadPreset()`:=20=20`request`=20**Changed**=20(Br?= =?UTF-8?q?eaking=20=E2=9A=A0=EF=B8=8F)=20*=20`CloudinaryEnvConfig.upload?= =?UTF-8?q?=5Fmappings.listUploadMappings()`:=20=20`response`=20**Changed*?= =?UTF-8?q?*=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`CloudinaryEnvConfig.?= =?UTF-8?q?triggers.listTrigger()`:=20=20=20*=20=20`request.event=5Ftype`?= =?UTF-8?q?=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20=20=20*=20?= =?UTF-8?q?=20`response.triggers[].event=5Ftype`=20**Changed**=20(Breaking?= =?UTF-8?q?=20=E2=9A=A0=EF=B8=8F)=20*=20`CloudinaryEnvConfig.triggers.crea?= =?UTF-8?q?teTrigger()`:=20=20=20*=20=20`request.event=5Ftype`=20**Changed?= =?UTF-8?q?**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20=20=20*=20=20`response.e?= =?UTF-8?q?vent=5Ftype`=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20?= =?UTF-8?q?*=20`CloudinaryEnvConfig.triggers.updateTrigger()`:=20=20`reque?= =?UTF-8?q?st`=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`Clou?= =?UTF-8?q?dinaryEnvConfig.triggers.testTrigger()`:=20=20`request`=20**Cha?= =?UTF-8?q?nged**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`CloudinaryEnvCo?= =?UTF-8?q?nfig.transformations.createTransformation()`:=20=20`response.me?= =?UTF-8?q?ssage`=20**Changed**=20*=20`CloudinaryEnvConfig.transformations?= =?UTF-8?q?.updateTransformation()`:=20=20`response.message`=20**Changed**?= =?UTF-8?q?=20*=20`CloudinaryEnvConfig.transformations.deleteTransformatio?= =?UTF-8?q?n()`:=20=20`response.message`=20**Changed**?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .speakeasy/gen.lock | 531 +++++++++++------- .speakeasy/gen.yaml | 3 +- .speakeasy/workflow.lock | 12 +- README.md | 8 +- RELEASES.md | 10 +- manifest.json | 12 +- package-lock.json | 18 +- package.json | 4 +- .../transformationsCreateTransformation.ts | 2 +- .../transformationsListTransformations.ts | 2 +- .../transformationsUpdateTransformation.ts | 4 +- src/funcs/triggersCreateTrigger.ts | 2 +- src/funcs/triggersListTrigger.ts | 7 +- src/funcs/triggersTestTrigger.ts | 22 +- src/funcs/triggersUpdateTrigger.ts | 22 +- .../uploadMappingsCreateUploadMapping.ts | 14 +- .../uploadMappingsReplaceUploadMappings.ts | 2 +- .../uploadMappingsUpdateUploadMapping.ts | 14 +- src/funcs/uploadPresetsCreateUploadPreset.ts | 12 +- src/funcs/uploadPresetsListUploadPresets.ts | 11 +- src/funcs/uploadPresetsUpdateUploadPreset.ts | 14 +- src/landing-page.ts | 12 +- src/lib/config.ts | 8 +- src/lib/encodings.ts | 36 +- src/lib/files.ts | 22 + src/lib/sdks.ts | 2 - src/lib/security.ts | 16 +- src/mcp-server/build.mts | 29 +- src/mcp-server/cli/serve/command.ts | 9 +- src/mcp-server/cli/serve/impl.ts | 4 +- src/mcp-server/cli/start/command.ts | 9 +- src/mcp-server/cli/start/impl.ts | 3 + src/mcp-server/flags.ts | 1 + src/mcp-server/mcp-server.ts | 2 +- src/mcp-server/server.ts | 10 +- src/mcp-server/tools.ts | 93 ++- ...streamingProfilesCreateStreamingProfile.ts | 4 +- ...streamingProfilesDeleteStreamingProfile.ts | 2 +- .../streamingProfilesGetStreamingProfile.ts | 2 +- ...streamingProfilesUpdateStreamingProfile.ts | 6 +- .../transformationsCreateTransformation.ts | 8 +- .../transformationsListTransformations.ts | 2 +- .../transformationsUpdateTransformation.ts | 8 +- src/mcp-server/tools/triggersCreateTrigger.ts | 6 +- src/mcp-server/tools/triggersDeleteTrigger.ts | 2 +- src/mcp-server/tools/triggersListTrigger.ts | 10 +- src/mcp-server/tools/triggersTestTrigger.ts | 12 +- src/mcp-server/tools/triggersUpdateTrigger.ts | 10 +- .../uploadMappingsCreateUploadMapping.ts | 6 +- .../uploadMappingsUpdateUploadMapping.ts | 8 +- .../tools/uploadPresetsCreateUploadPreset.ts | 6 +- .../tools/uploadPresetsDeleteUploadPreset.ts | 2 +- .../tools/uploadPresetsGetUploadPreset.ts | 2 +- .../tools/uploadPresetsListUploadPresets.ts | 18 +- .../tools/uploadPresetsUpdateUploadPreset.ts | 10 +- src/models/accesscontrolitem.ts | 50 +- src/models/assetdeliverytype.ts | 21 + src/models/createrequest.ts | 6 +- src/models/createstreamingprofileop.ts | 21 +- src/models/createtransformationop.ts | 27 +- src/models/createtriggerop.ts | 8 - src/models/createtriggerrequest.ts | 16 + src/models/createuploadmappingop.ts | 34 +- src/models/createuploadpresetop.ts | 27 +- src/models/deletestreamingprofileop.ts | 23 +- src/models/deletetransformationop.ts | 21 +- src/models/deletetriggerop.ts | 21 +- src/models/deleteuploadmappingop.ts | 23 +- src/models/deleteuploadpresetop.ts | 25 +- src/models/directionenum.ts | 23 + src/models/eventtype.ts | 75 +++ src/models/getstreamingprofileop.ts | 23 +- src/models/getstreamingprofilesop.ts | 23 +- src/models/getuploadpresetop.ts | 11 +- src/models/listtransformationsop.ts | 9 +- src/models/listtriggerop.ts | 31 +- src/models/listuploadmappingsop.ts | 29 +- src/models/listuploadpresetsop.ts | 60 +- src/models/manageddeliverytype.ts | 27 + src/models/messageresponse.ts | 11 + src/models/replaceuploadmappingsop.ts | 36 +- src/models/replaceuploadmappingsrequest.ts | 19 + src/models/responsivebreakpoint.ts | 36 ++ src/models/streamingprofile.ts | 21 +- src/models/streamingprofilecreate.ts | 10 +- src/models/streamingprofiledataresponse.ts | 17 + src/models/streamingprofilelistresponse.ts | 17 + src/models/streamingprofileupdate.ts | 8 +- src/models/streamingprofileupdateresponse.ts | 21 + src/models/structuredmetadataparam.ts | 27 + src/models/structuredmetadatavalue.ts | 15 + src/models/tagsparam.ts | 15 + src/models/testtriggerop.ts | 69 +-- src/models/testtriggerrequest.ts | 22 + src/models/testtriggerresponse.ts | 22 + src/models/transformationinfo.ts | 16 +- ...ponse.ts => transformationlistresponse.ts} | 6 +- src/models/triggerinfo.ts | 7 +- src/models/triggerlistresponse.ts | 22 + src/models/updaterequest.ts | 8 +- src/models/updatestreamingprofileop.ts | 33 +- src/models/updatetransformationop.ts | 25 +- src/models/updatetriggerop.ts | 46 +- src/models/updatetriggerrequest.ts | 14 + src/models/updateuploadmappingop.ts | 32 +- src/models/updateuploadpresetop.ts | 36 +- src/models/uploaddeliverytype.ts | 24 + src/models/uploadmapping.ts | 10 +- src/models/uploadmappingcreateresponse.ts | 19 + src/models/uploadmappinginput.ts | 13 + src/models/uploadmappinglistresponse.ts | 27 + src/models/uploadmappingmutationresponse.ts | 17 + src/models/uploadpreset.ts | 259 --------- src/models/uploadpresetcreateresponse.ts | 21 + src/models/uploadpresetdetail.ts | 35 ++ src/models/uploadpresetinput.ts | 413 ++++++++++++++ src/models/uploadpresetlistresponse.ts | 23 + src/models/uploadpresetmutationresponse.ts | 21 + src/models/uploadpresetparsedsettings.ts | 368 ++++++++++++ src/models/uploadpresetsummary.ts | 44 ++ src/tool-names.ts | 10 +- src/types/bigint.ts | 35 +- 122 files changed, 2529 insertions(+), 1161 deletions(-) create mode 100644 src/models/assetdeliverytype.ts create mode 100644 src/models/createtriggerrequest.ts create mode 100644 src/models/directionenum.ts create mode 100644 src/models/eventtype.ts create mode 100644 src/models/manageddeliverytype.ts create mode 100644 src/models/messageresponse.ts create mode 100644 src/models/replaceuploadmappingsrequest.ts create mode 100644 src/models/responsivebreakpoint.ts create mode 100644 src/models/streamingprofiledataresponse.ts create mode 100644 src/models/streamingprofilelistresponse.ts create mode 100644 src/models/streamingprofileupdateresponse.ts create mode 100644 src/models/structuredmetadataparam.ts create mode 100644 src/models/structuredmetadatavalue.ts create mode 100644 src/models/tagsparam.ts create mode 100644 src/models/testtriggerrequest.ts create mode 100644 src/models/testtriggerresponse.ts rename src/models/{listresponse.ts => transformationlistresponse.ts} (74%) create mode 100644 src/models/triggerlistresponse.ts create mode 100644 src/models/updatetriggerrequest.ts create mode 100644 src/models/uploaddeliverytype.ts create mode 100644 src/models/uploadmappingcreateresponse.ts create mode 100644 src/models/uploadmappinginput.ts create mode 100644 src/models/uploadmappinglistresponse.ts create mode 100644 src/models/uploadmappingmutationresponse.ts delete mode 100644 src/models/uploadpreset.ts create mode 100644 src/models/uploadpresetcreateresponse.ts create mode 100644 src/models/uploadpresetdetail.ts create mode 100644 src/models/uploadpresetinput.ts create mode 100644 src/models/uploadpresetlistresponse.ts create mode 100644 src/models/uploadpresetmutationresponse.ts create mode 100644 src/models/uploadpresetparsedsettings.ts create mode 100644 src/models/uploadpresetsummary.ts diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index b99c04d..668a4c5 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,30 +1,30 @@ lockVersion: 2.0.0 id: adf202e9-d85f-4433-b00e-5c7aa0b54b64 management: - docChecksum: 06a34ac4d809700933dfa6abfd6cb061 - docVersion: 0.4.0 - speakeasyVersion: 1.755.1 - generationVersion: 2.865.2 - releaseVersion: 0.6.0 - configChecksum: 6253351f5e294a7f7a12b4e1a5a35e8c + docChecksum: c73538b4d21d62b1f18e53edfda022d3 + docVersion: 0.5.5 + speakeasyVersion: 1.768.2 + generationVersion: 2.889.1 + releaseVersion: 0.7.0 + configChecksum: 1573dce421e608d4d937983851fb9274 repoURL: https://github.com/cloudinary/environment-config-mcp.git installationURL: https://github.com/cloudinary/environment-config-mcp published: true persistentEdits: - generation_id: b2e95133-9d15-4424-b956-a64550cf7b4b - pristine_commit_hash: b50bb1919807fc5d99ac2a0672b32d79d4d613aa - pristine_tree_hash: a17ff6388d0d3d85a67b71e4227d5792ddbbc7e0 + generation_id: d90c209a-4cc2-451c-9c9f-5e4040508925 + pristine_commit_hash: 4cdc08bc6c650567e6b107146650c09a27d93451 + pristine_tree_hash: 19e238d7ec326f47011efcce0a010221a9313b32 features: mcp-typescript: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.2 - core: 1.2.22 + core: 1.2.29 customSecuritySchemes: 0.1.1 defaultEnabledRetries: 0.1.0 deprecations: 0.1.0 enumUnions: 0.1.0 flattening: 0.1.0 - globalSecurity: 0.1.2 + globalSecurity: 0.1.3 globalSecurityCallbacks: 0.0.0 globalServerURLs: 0.1.2 globals: 0.1.0 @@ -53,12 +53,12 @@ trackedFiles: pristine_git_object: 4f9e60a9462fc4def738d60c3aaadf8232ef185f manifest.json: id: ca642a226869 - last_write_checksum: sha1:a708ef85647beb112ee48ec99f33f89e05e38f83 - pristine_git_object: d04f47b5a0a2bb108f3d319dc7403995d3001cc6 + last_write_checksum: sha1:20d042a9cc2132093e294f5a875e6bd49ee32f46 + pristine_git_object: 735c38f6d8b6ca408ce64c10623c27bada41e59f package.json: id: 7030d0b2f71b - last_write_checksum: sha1:9c175e4c8faed7e5310499402b0406ffcfeb0955 - pristine_git_object: ad939d0657805878fd4676027cc74c1282ce22ad + last_write_checksum: sha1:6b4697f50dde2d25203e60d23644ce059b5befa0 + pristine_git_object: f6f7e2b69d4fc3d48bc3b7910363007e4da3d676 src/core.ts: id: f431fdbcd144 last_write_checksum: sha1:ba493596a9cbb5dced25a9e59218d020cbe6ef24 @@ -85,8 +85,8 @@ trackedFiles: pristine_git_object: c768ea2e3c9349c0cc517dab1fd81b198d159884 src/funcs/transformationsCreateTransformation.ts: id: 2c4336f77686 - last_write_checksum: sha1:da124650681d2b3d5f0c0914895c07f726a60657 - pristine_git_object: 430c9cb1b1e5113e2ed870f7c8a34202da45744a + last_write_checksum: sha1:b0a35ea0c1a11c9768f756e7f81de5235db70238 + pristine_git_object: db347c67d5381103545704c8dd79dc5d14857154 src/funcs/transformationsDeleteTransformation.ts: id: e600e3616bcb last_write_checksum: sha1:f3b0479433b9411925555182a43b8477a89593d4 @@ -97,36 +97,36 @@ trackedFiles: pristine_git_object: 40b3de5bcc4e3e98fb664d0710ffde60e4942cdd src/funcs/transformationsListTransformations.ts: id: b64abebcb1a2 - last_write_checksum: sha1:c4ae2a9743284f997835b36e20e8895c1a560e90 - pristine_git_object: 924bb1fab410241cfaff25b84253177d691c6ab1 + last_write_checksum: sha1:37307dbb9e477bc4473fe4cf73d354875d6fd19a + pristine_git_object: 841d19ef080a8685877e49daeac198bf9a2c66bb src/funcs/transformationsUpdateTransformation.ts: id: ba95ff8504ef - last_write_checksum: sha1:e8bc05916099ef1f493580cd9be35132346c28c2 - pristine_git_object: 876ca8883829d5875069cb6b5350976e167c5289 + last_write_checksum: sha1:7786879fad30b50e4af46e3059ec8135d2f0218b + pristine_git_object: b33928b3942692f7ffda3afb7145ee9ddb08dfce src/funcs/triggersCreateTrigger.ts: id: 399625091af6 - last_write_checksum: sha1:a671c6c6d96e39db31e6dce983da1764b640d1da - pristine_git_object: ede09819ebd21b2ec6bdcdc3de9e8a910fd31473 + last_write_checksum: sha1:de4b2e7d8cd620e13193fe8095ba1401ba811648 + pristine_git_object: cda8afbb013168b9de4a55596af7a0c92d5ba93f src/funcs/triggersDeleteTrigger.ts: id: 9cb06fc17d4c last_write_checksum: sha1:f4c5a1d2a090b17eb4735b7f14862245e3cce913 pristine_git_object: 00588daadc8fe547f45eb5efe93486c35ab26a47 src/funcs/triggersListTrigger.ts: id: 798ff65f8fb5 - last_write_checksum: sha1:b909ef43624742091f7997078b7ad136aef41e82 - pristine_git_object: d9665b9bfa5a4d9626b80d05eca2118f0cee5b4d + last_write_checksum: sha1:d6cc580f352069ffd3c6fcea9beaeb3f597b5683 + pristine_git_object: c84f1f093697d7393730c3e48e5b5ce170fb9b87 src/funcs/triggersTestTrigger.ts: id: 357b7e229f18 - last_write_checksum: sha1:7f2b9490ffe595cb8d7f932d5b0327d68e794479 - pristine_git_object: e6405472db992c17964b7d473535df460ca338d3 + last_write_checksum: sha1:e626451d3bdb11e2800019271c694b3d288a67be + pristine_git_object: 99db09991be68ad9587cb91a1c78f3b7c2bbd39f src/funcs/triggersUpdateTrigger.ts: id: fce1cc453765 - last_write_checksum: sha1:70b98d866457657d6cbeca57c5e538099e8f5961 - pristine_git_object: 56c59fc6b5ab1bdcfd726ff4d573838622d7df8e + last_write_checksum: sha1:6eae6d9e4148c4815777bdf8e599b9034b7cca35 + pristine_git_object: 087acf6d4ecd5e1da3deb756385f8adb881d7065 src/funcs/uploadMappingsCreateUploadMapping.ts: id: 585a0715a85a - last_write_checksum: sha1:014136afbec3a3f3cbb6c63a0e88e7a8650ea890 - pristine_git_object: 4b64d19a688d618ef4bbad447d683ea12f2a67e3 + last_write_checksum: sha1:1e5677e0dcb7c5966a65ad1ea792b6d9dc005d6e + pristine_git_object: 1e40627697d2d05c4d69fab05f40d54dfdbed1cd src/funcs/uploadMappingsDeleteUploadMapping.ts: id: b191a0a7d4d1 last_write_checksum: sha1:b1008744ae943b901db45bfff960375b8317fb90 @@ -137,16 +137,16 @@ trackedFiles: pristine_git_object: 1c878cf96d8b8dffa4a0dc2074233d56e96f5d85 src/funcs/uploadMappingsReplaceUploadMappings.ts: id: 2f118607caec - last_write_checksum: sha1:0e24856d4b6b06adbe470658c0a7bf2d5a1a656b - pristine_git_object: 2326b8ef5084d682facf6088e3e8c9b7ed466e16 + last_write_checksum: sha1:224d6e7cf0edac4ba2781532ef5e70b2d23500eb + pristine_git_object: b3507f562bc61a9898a22bd8a85e73d2631a84da src/funcs/uploadMappingsUpdateUploadMapping.ts: id: 53a3ae117feb - last_write_checksum: sha1:d6d760d34d4f941be5b0037b33d88ece3480db4f - pristine_git_object: 1eec83b70e672b94756df91609a0211fb308fdc3 + last_write_checksum: sha1:d6e50f8c99476a4e4866262868bcf2df489c6b83 + pristine_git_object: 8cff1704df725fded60128897c980a190603a47a src/funcs/uploadPresetsCreateUploadPreset.ts: id: df8849f9c06a - last_write_checksum: sha1:33d75f62091750f7cdc534d119da3af8e2182864 - pristine_git_object: 9a13622a18ed52a9de9500cb5c5698d5b26f9eb6 + last_write_checksum: sha1:7f8e94ea0472571cb4749dd677258b82e5539483 + pristine_git_object: 7424eaa2ff45b9ff48fb1d5c2c797be797749016 src/funcs/uploadPresetsDeleteUploadPreset.ts: id: 4e4fa08293a4 last_write_checksum: sha1:c15014d700743f372628b601c525992856e8f8ee @@ -157,12 +157,12 @@ trackedFiles: pristine_git_object: 3a19f01a38326d5c5f4276a3e074f122395ded94 src/funcs/uploadPresetsListUploadPresets.ts: id: 72eb9fe01a8b - last_write_checksum: sha1:05a9465172edeb89c9635df026012fb55eb0953f - pristine_git_object: ca67b155e7144c09ac3b6fdd42b86e653df7e7ef + last_write_checksum: sha1:c9cc4301a1bf9e93b5bbb46ca00c1cd1375ac755 + pristine_git_object: ea2e81e48c99a3cf178b748cda330f5618db0c13 src/funcs/uploadPresetsUpdateUploadPreset.ts: id: fd0de75c67bd - last_write_checksum: sha1:f8f8338c71ce402936f385ecdb089715b8ce0d94 - pristine_git_object: 9ca956ce798830da0fa8676918e7aab5c9a30fa9 + last_write_checksum: sha1:61b9a3f2bf7818a5b25f97a419b1e5266a94f9de + pristine_git_object: b90c11dedaa78d20e0387551bf8667f716173167 src/hooks/hooks.ts: id: a2463fc6f69b last_write_checksum: sha1:327ed0fa581be991d633155a30a13e502caa80ef @@ -177,32 +177,32 @@ trackedFiles: pristine_git_object: 9c36bf01332084f735909a71036c3544cc4c7e3a src/landing-page.ts: id: ef64a6ee46d7 - last_write_checksum: sha1:662e90892999014a534bdace7b398b97536fb5ba - pristine_git_object: a03d8ff7e2f937796553c16bb907678ff2e15edf + last_write_checksum: sha1:0f201a8de266b234d4362d7ed52182b7e6191934 + pristine_git_object: 85dfcdd021afbb8d11482dc7fc30338c68aa04f3 src/lib/base64.ts: id: "598522066688" last_write_checksum: sha1:e9f04a037018040361043104960982f7c22db52d pristine_git_object: d4bd8b341290e7a828a171d840bd0b0fff7c7cd7 src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:29927d6b5d40bb43689f68d0862c90684a6ba935 - pristine_git_object: b18e4b8558e1f496cb7e975a8bc4b67f4257bc82 + last_write_checksum: sha1:d2c74468e6b1e7231b06b9a6a859aad8e873100e + pristine_git_object: 9409a6b9440f5132e0df88172b7d9d50bef1e6c0 src/lib/dlv.ts: id: b1988214835a last_write_checksum: sha1:1dd3e3fbb4550c4bf31f5ef997faff355d6f3250 pristine_git_object: e81091f5e536f82739f71379b1fddc2d147c49e2 src/lib/encodings.ts: id: 3bd8ead98afd - last_write_checksum: sha1:ecc418096148bd0a91ca92fd5cd732d7e01e806b - pristine_git_object: c769289fec267954248871163847262f065f1e8b + last_write_checksum: sha1:2bac07b55d30cf8618729e656b8becffc315fbdb + pristine_git_object: caa16bb379e5680ab114b44f6e3e5f0a2c836be3 src/lib/env.ts: id: c52972a3b198 last_write_checksum: sha1:69b6f701c443133139651cf64fbd54fe2bc5357f pristine_git_object: 40c8651cc97a272072ea6c5a1b4d2ab086f07e70 src/lib/files.ts: id: e5efa54fcb95 - last_write_checksum: sha1:d0f325f445b8d22e7d73baf052c585ec2dd24841 - pristine_git_object: 0344cd046d033f9e8a55de02f7935c5cec5dc30b + last_write_checksum: sha1:795c14026405d547bfc47012f7ad9666e530fa7f + pristine_git_object: 6ca6b37d35a12448da176ee2517cc036db12c81c src/lib/http.ts: id: 63a80782d37e last_write_checksum: sha1:797cbf16d3c7c4d62d3ba0eedb08617524938457 @@ -233,40 +233,40 @@ trackedFiles: pristine_git_object: 542d9972403c5bc4aa70619f8c4b0af3ef2ce679 src/lib/sdks.ts: id: 8a6d91f1218d - last_write_checksum: sha1:106de7879e59856acdb17f959e9ee758fc61b3a2 - pristine_git_object: 3f69f7ae4a1e5d0711578ddf34f65c86051e65b8 + last_write_checksum: sha1:f700822ff5e32383a603ba60453aa36600596baf + pristine_git_object: f30f835fcc61405e2474ab67e394c817efe55eec src/lib/security.ts: id: 0502afa7922e - last_write_checksum: sha1:146ebef93a9f0e1a8186f38b188d13fae8eaae9d - pristine_git_object: 8eefaf4b67df452517a590c5e2ab2109ea064d85 + last_write_checksum: sha1:53214b9aa59f4dab444b6941835938673e540758 + pristine_git_object: ba1aef127545a0bb98f592f7b92c31e88458d9a0 src/lib/url.ts: id: b0057e24ed76 last_write_checksum: sha1:9550819577dc1e514e61496167aefcc137238aaf pristine_git_object: 6bc6356e222c4f2c20fda5616e00be6dadfa80f8 src/mcp-server/build.mts: id: f7a2ed2de4d7 - last_write_checksum: sha1:9f98fe2b333bd6211cfffa008a9b6ee95d523596 - pristine_git_object: e8114fbaed6521c628b7cf58a22cdb65e61a5483 + last_write_checksum: sha1:fc08ccde7b8703a94411bb37b97ba5dd51a686db + pristine_git_object: 1cdf8979378936f964a3c0e6275b7e7a5689a14c src/mcp-server/cli.ts: id: 4ade0ef98b00 last_write_checksum: sha1:7331efddde881832342fa8779d23be7445d4480c pristine_git_object: b878d8de9f2a0275c3cdbfdcaed48a31092e558a src/mcp-server/cli/serve/command.ts: id: 7cd4394c80e8 - last_write_checksum: sha1:29cec58b71b4a9884de25c7719ae0523ee83c7bb - pristine_git_object: 2b45a28bf194928673f10f99001e285905931f28 + last_write_checksum: sha1:8d2173df052c559b60a4684afae4af9ef15f4de5 + pristine_git_object: a3fea5610905758b1f7c35c558dba7f1bef14ce8 src/mcp-server/cli/serve/impl.ts: id: 03e83f226068 - last_write_checksum: sha1:900c45e8decc321e23b87e80f1384a06993192ef - pristine_git_object: 75ff1185a8610eca58fbf96175780374deacdbc3 + last_write_checksum: sha1:e6f98a1f16a56ccc8c760ee692387cc880dee7b7 + pristine_git_object: 4f96eaa752ea5da7929be23a8800fe86e04b1893 src/mcp-server/cli/start/command.ts: id: b3e53408ccb4 - last_write_checksum: sha1:e2306d4cf7a3197e1ee71d5e3554bcca624376ca - pristine_git_object: afbaa4146284360f962ba16b11b926a0c12ba5b5 + last_write_checksum: sha1:c37afd4c198096201023ae310d4f43cd58ae2295 + pristine_git_object: 5d5da6164d26091d6a6973aeaaa4f415b4a1da08 src/mcp-server/cli/start/impl.ts: id: 37494f674015 - last_write_checksum: sha1:2b49a4cb132a10521f0cf999a6efc7eecb689bc8 - pristine_git_object: 58290090be2b5e715358085f714c648951f34b18 + last_write_checksum: sha1:91579ca7b71c69ded94efbe699d55557b0d5e733 + pristine_git_object: 2abb8056bc689c9c0d1a968730f8e2f19a3254ce src/mcp-server/console-logger.ts: id: 57aff4ff2e15 last_write_checksum: sha1:0c4b9b7c79ad0a81359210cb31b9ee4d887d5de1 @@ -277,12 +277,12 @@ trackedFiles: pristine_git_object: 78394e413ea070824f370b829eaf1416883e6680 src/mcp-server/flags.ts: id: 0167e624a516 - last_write_checksum: sha1:8072cc5426431fd9dded9c3780ffbbb403609852 - pristine_git_object: 3eb7f532a0c29285b3f63805e42d101e11eb5b4c + last_write_checksum: sha1:08b24ec1558a550a5590dd928e50a326e3ceaf57 + pristine_git_object: 441c1ce08678d15726f06f8692d00bd4f8daa5c0 src/mcp-server/mcp-server.ts: id: aabbc4ab07c1 - last_write_checksum: sha1:18d6f1dfaa22d75d8594d97642a77b10d51cabc6 - pristine_git_object: 68d8c1cbf342d3654ef085a279f96f4222850101 + last_write_checksum: sha1:e4747bec99529702299dd0cfe034b7226d2601f8 + pristine_git_object: 95273326d3b23de06a0934eb8cd273f34e404c5e src/mcp-server/prompts.ts: id: 26f3d73cbf31 last_write_checksum: sha1:8f4d37f6e33d3318b5c21076442c9ccd3eb058e7 @@ -297,40 +297,40 @@ trackedFiles: pristine_git_object: bc628748008f07f8d0fd75220d5015c46817b946 src/mcp-server/server.ts: id: 2784dd48e82a - last_write_checksum: sha1:994daf6e6cd6415dfcf81df7902b03307f8c4f74 - pristine_git_object: 9e7adaf4995109e84fab33c9790d8e5a14aab6de + last_write_checksum: sha1:85c48bdece1957dbf838809568dd0e21c91d81d7 + pristine_git_object: e22cfa6b8283e1f162eeefc160c1a342d57e73bc src/mcp-server/shared.ts: id: 074e80d4be1e last_write_checksum: sha1:19c9034032819a14f15c430de4350c8aba99d725 pristine_git_object: bb74a74788ebd7d11262f5f63b8fdd29ab817f48 src/mcp-server/tools.ts: id: 654d5d1f2062 - last_write_checksum: sha1:f0958bd67017303a91d5d89117af393060c4c1bd - pristine_git_object: 31909150e69e6892546a79c85a23467b5b07e279 + last_write_checksum: sha1:548943033553e9aadaa7026b217d93f8a01ac0e6 + pristine_git_object: bb4188d10d5ac1d8a3cee805de605ed6c53ee5d6 src/mcp-server/tools/streamingProfilesCreateStreamingProfile.ts: id: bdb92e282dcf - last_write_checksum: sha1:5792c2248c385b7566fe9883c673bca1c16b6903 - pristine_git_object: e663caca1b4c1936aeb7c09548be570c537e6fa2 + last_write_checksum: sha1:e5b0bc249bed611c15524e744df5270289805113 + pristine_git_object: 8df32378919a22fe1253b70a914046f09de2b920 src/mcp-server/tools/streamingProfilesDeleteStreamingProfile.ts: id: b4e9f3eb3ca7 - last_write_checksum: sha1:27a2c1fa883aaf2faf44a596f2a873a3bd85a472 - pristine_git_object: b0acbd314034d4e68a1c6702ab14167a473c73e1 + last_write_checksum: sha1:23101186655a31a8be049f5bc48dd394d9a61b16 + pristine_git_object: 3e3d149ba5b5f2770bab8eabfc1996348b214623 src/mcp-server/tools/streamingProfilesGetStreamingProfile.ts: id: 418409851acf - last_write_checksum: sha1:7e1b0a888dbb52012ed6a24bcb03a7c6a1ec547f - pristine_git_object: f0aee2f7352741e1ebe9daf54cb1e2d7694728fd + last_write_checksum: sha1:6f71e256b5125b7e6adfa0c6ade63dd88b762344 + pristine_git_object: c1e87514b1ca8d2246d5b40179302f6d7e1006f1 src/mcp-server/tools/streamingProfilesGetStreamingProfiles.ts: id: c64630f2ba2d last_write_checksum: sha1:b153e0573ad24f7b6829ed53ea64bc033c2f46b3 pristine_git_object: b63aefa92ba45d703288e834afd77c9fb5ae61e4 src/mcp-server/tools/streamingProfilesUpdateStreamingProfile.ts: id: 4e34c78fa055 - last_write_checksum: sha1:15d332c6dc6e8089b7b5c001589237f0eae5a2de - pristine_git_object: 7a3bb845aa72ca1a399cc1599442f5280b7f861c + last_write_checksum: sha1:ec9be178e29661d325b9597ed2cb66e726540a08 + pristine_git_object: 5a9046a26b3f557af696e822a572913e27b24f8e src/mcp-server/tools/transformationsCreateTransformation.ts: id: 8325647b37f6 - last_write_checksum: sha1:8647838ba229431dee8bca1742f13dcdd4cabaee - pristine_git_object: bd18093095021a0e47bab0f811e7c805acdeff86 + last_write_checksum: sha1:f9aaa4779c8be039409fa0d8bd6bb0842ea43af2 + pristine_git_object: eb119bfe6c2a8044c12a620b63ac85fbcc099581 src/mcp-server/tools/transformationsDeleteTransformation.ts: id: 3c089fceea5e last_write_checksum: sha1:5b702df0bef3a5008448c49fd9463189ec7bf82b @@ -341,36 +341,36 @@ trackedFiles: pristine_git_object: 241ebb0d1027ef9dbce562eb98635321b544c2ea src/mcp-server/tools/transformationsListTransformations.ts: id: 86830305f9cf - last_write_checksum: sha1:25863acc13e0bc74269571b7fedba2238e0fefad - pristine_git_object: 45fc30ec84005ca58d6f259897271bd17cba358d + last_write_checksum: sha1:9562cf7529e489a1b0fd67dc2cd09241b19045e6 + pristine_git_object: 7b6b146bebc0bcd9286511dc0823373c772750ba src/mcp-server/tools/transformationsUpdateTransformation.ts: id: 8051ff62d868 - last_write_checksum: sha1:499931449b1d66b69b7f0dde1e79c7eb8b0ab78c - pristine_git_object: aa04c540a522341ce65d127eaa984ba4c15c5996 + last_write_checksum: sha1:ce97a0932be47e4e63b639372566164a8fced391 + pristine_git_object: ee17f25d3ae457e32de68ecbec6eaee04879db4f src/mcp-server/tools/triggersCreateTrigger.ts: id: 841868a185b7 - last_write_checksum: sha1:36f4601438a9646824ec04deb76e52c45b440ed1 - pristine_git_object: 0c46966f232ccf14d1011bf34f113063f066c8d4 + last_write_checksum: sha1:933a9825aa513262c188633bcf8d265afe86a6b2 + pristine_git_object: 334da4be448baf1fd1224f9bfb1ae2dafdec4c9e src/mcp-server/tools/triggersDeleteTrigger.ts: id: 36d23c68493b - last_write_checksum: sha1:aedb3246ff6840e0897c76bf26ed72f353561f0d - pristine_git_object: ff7f80685d38b39a12065726ec222792eaa2a544 + last_write_checksum: sha1:0d293a9dc552242a20187f689fc806a2cf5cd8f6 + pristine_git_object: d200acee8ce9335f5e14f8919f90670c563c7d59 src/mcp-server/tools/triggersListTrigger.ts: id: 5b10585d5fca - last_write_checksum: sha1:1b5f64a13c165262243636aec87536a8ca9743aa - pristine_git_object: af27013db48246ed419e14f2446ebb8f42883739 + last_write_checksum: sha1:4a7b8245b4240128548090c4c9d4e67e09d594b5 + pristine_git_object: a62f1284c5f34ede16589eb2f15950edd977e4f9 src/mcp-server/tools/triggersTestTrigger.ts: id: b6710d7af609 - last_write_checksum: sha1:b1ac236281bfc76edce8aa89e20ed950bec8fd28 - pristine_git_object: ac18a27fb62860cd54cedb36170fff0dab794557 + last_write_checksum: sha1:e63d93b8fdfcd503c5b543a4f5b1749b7c71973a + pristine_git_object: 6b56194fdacd74113e89cef14de6a764af70ebf4 src/mcp-server/tools/triggersUpdateTrigger.ts: id: 0bedcb0b91e0 - last_write_checksum: sha1:9e0da06ae38405eefdde4d7e1325b42bc9bd864e - pristine_git_object: a9bb394caf8e58d4eb1f2b4facd428c4a0b4bd36 + last_write_checksum: sha1:b31da5dbd242d48e8e817cf4da0dcac2d36591d7 + pristine_git_object: 6f25b32dc83d3504c86e257d62b8827dcbd5d8f6 src/mcp-server/tools/uploadMappingsCreateUploadMapping.ts: id: 91d3a6b88c2e - last_write_checksum: sha1:8b39f3e5befc94f0398d809234c87f242eaf0d1e - pristine_git_object: c7664779cba5b83281e8619ae15ee1441f1a523f + last_write_checksum: sha1:a43d4949c65f8a23f6ab56ae2f332b4d72e3e1e8 + pristine_git_object: 1a94e00fe6b75e200527c21a56b3ba8e89112065 src/mcp-server/tools/uploadMappingsDeleteUploadMapping.ts: id: e0910cc98ac5 last_write_checksum: sha1:214171972c6f1199a1911cfbaa7b244fd2d6c15b @@ -381,80 +381,92 @@ trackedFiles: pristine_git_object: f7734f07e011a19899179a56aba6399da5d0ddfa src/mcp-server/tools/uploadMappingsUpdateUploadMapping.ts: id: 93f301e2ef80 - last_write_checksum: sha1:974457069fd0b7aed00d38911ffc3294d1a42826 - pristine_git_object: c44c5f178e3dc6439e8557fa092f168debc8f9b5 + last_write_checksum: sha1:971bd488d93743ef09a0bcdca29bc1ad6d6ccb8f + pristine_git_object: faab4be6a1dae8850185c0ce6405e303607664a1 src/mcp-server/tools/uploadPresetsCreateUploadPreset.ts: id: cbfced083eca - last_write_checksum: sha1:42ae83c06f6fe4fae376cd18413fbb0ce4570967 - pristine_git_object: 32b9d1a8362595e58bd7c6b806ee02e8125d3fb2 + last_write_checksum: sha1:91d1e805ae78a894d518ce7fdcb98ac51cb7ab25 + pristine_git_object: 06de848f154d701de503706718d67f0edec21eb6 src/mcp-server/tools/uploadPresetsDeleteUploadPreset.ts: id: 1c8ec47f5378 - last_write_checksum: sha1:852b126d3f368e5fbf7adc808950d6cf3d624d4f - pristine_git_object: 6fbf699d74e390e7d52c69482051389c48c2537d + last_write_checksum: sha1:0fa4bf866206c58947660ea974b55e0aec791770 + pristine_git_object: 608b519781177f387be5d2aca32e8e56931c4d56 src/mcp-server/tools/uploadPresetsGetUploadPreset.ts: id: f2f3e3d10f66 - last_write_checksum: sha1:2ef595952704864bcd2243c8d2ada93264e9a614 - pristine_git_object: 8614b6b0b8b8894c8ebc67ee64efc12368a9ddf8 + last_write_checksum: sha1:7d91a4d4195c0455ee06de3a76a40523dd066e3a + pristine_git_object: 5f9708cb7105aa99153c6a2945bb4ed38c62cf33 src/mcp-server/tools/uploadPresetsListUploadPresets.ts: id: 798d000ef5fd - last_write_checksum: sha1:ab5b0716be2a5a27401539ca6455c3f1a9368b65 - pristine_git_object: 3136e21385aa4e8295686d1ed45b0be8db13fdfd + last_write_checksum: sha1:ea83a7a9eec74533ac85152679eeca87f120c8b3 + pristine_git_object: aee59005de05ced5722446948705a4f8b688ef7b src/mcp-server/tools/uploadPresetsUpdateUploadPreset.ts: id: 400f04c7187f - last_write_checksum: sha1:5103c53604aadde052f4725b4868983dfee42934 - pristine_git_object: 85b2d4398f7c13d94d4d89b02f5eeb0426c44bf9 + last_write_checksum: sha1:86e38acbb60326c7fde902faf1edc6a8fc26c8f7 + pristine_git_object: d92c74e5fd5d052704c7d2aabc2f8aaca4cf7def src/models/accesscontrolitem.ts: id: b3d5a7a42328 - last_write_checksum: sha1:a11655bfc63ae3dba27dd2f3e45cecd20403518f - pristine_git_object: 92d855c3458d627e9466cef90f25a7df86c4e355 + last_write_checksum: sha1:5a6e5be04d9f60ec992276f359dbcf94269c5d83 + pristine_git_object: 0f49fe0a97272302724b5a89e81303ca7312ce13 src/models/apierror.ts: id: ba8cfc219d76 last_write_checksum: sha1:a243d712cc66f6e61ea7015363c18be5524924dc pristine_git_object: 634436de9b0b8f6aa15dd0091073243d760f60c0 + src/models/assetdeliverytype.ts: + id: bf0f7e855303 + last_write_checksum: sha1:69af357314d13ec9a74d45ed6c9b441990695023 + pristine_git_object: ec8e2931757610f4ed1ef88fd1cfb1428a12f738 src/models/createrequest.ts: id: 2a84f278b6b5 - last_write_checksum: sha1:92364fcea1b84510462e433cd9ea870403f866c5 - pristine_git_object: 60f74a867ad9909c7afd0545391775d408816340 + last_write_checksum: sha1:b60ea2ea03bd5fdd7fd978605c87654b101e40e6 + pristine_git_object: 6afc733c50ca99da23491d85a2a9bcfc31a5e6f6 src/models/createstreamingprofileop.ts: id: f7e150ddbf2a - last_write_checksum: sha1:709b68b69bcbc4e04e8dd836ea9dfb702778078c - pristine_git_object: a7d39e0d88d041273173ac59feda31a6abdb3e8d + last_write_checksum: sha1:344c57459bd5939c96dde83bb8a0239e45e5851f + pristine_git_object: cdd2e87549cfbde4adaa03142f5a9093d4ed9d08 src/models/createtransformationop.ts: id: 6c719b74f5ac - last_write_checksum: sha1:b97e71c2c7918d3eb2fef1100d75c61e2abdf10a - pristine_git_object: 46416fd2cb9dfc06de3a8ca6d6157f208655d2eb + last_write_checksum: sha1:de973da307fa133d48156812254a3193978293f8 + pristine_git_object: cc760284b9f50241d7ecfb67cad8eeb611c84f6a src/models/createtriggerop.ts: id: 0ae4f942466c - last_write_checksum: sha1:d15dbbdac724cfcd40b6a13319ad32479f1897aa - pristine_git_object: a8c62a9fe3b2d5bf67f242094c10a1630f6071d5 + last_write_checksum: sha1:3904c87ceea7b201676d7b2c1873f5a29c00afbb + pristine_git_object: 76d0569c3b98ff9b2bc74044ddd34a8159c0726a + src/models/createtriggerrequest.ts: + id: d357c60f3b29 + last_write_checksum: sha1:da774ebe23a1229bd3943495bb512ad86c5fae1c + pristine_git_object: 19cc61da199bbea633c9f7f405df475be5a7195a src/models/createuploadmappingop.ts: id: 22d33f0b415c - last_write_checksum: sha1:6504fffc4372e95b00d5836e92a3a9e2f684f53e - pristine_git_object: 58a7582a4568982c00b089294d2b2b3e499e59cf + last_write_checksum: sha1:e0062b6543fae47afb8e5c34aff7c625c2e081de + pristine_git_object: ff9655f8f10e51b608ba51a0988ec42a454284c6 src/models/createuploadpresetop.ts: id: 3110e63ed474 - last_write_checksum: sha1:2a7abbc3489aba99852f254165a19199cb2cb4f9 - pristine_git_object: 2f8fed60edff5073d492123c99edcd65ab25dc96 + last_write_checksum: sha1:a16d299d96d22c1725404831bd5f338b7e99e7c3 + pristine_git_object: 7a78995dba4a7e91a24004921dc2de2cb23c722f src/models/deletestreamingprofileop.ts: id: 7ffb5907b7c0 - last_write_checksum: sha1:aa50ebb2643b0c955884f0bf9e6d7b8ceb251062 - pristine_git_object: 128d6250ec7b69d5fc743c0d57374b0ffaa462ff + last_write_checksum: sha1:6b87edce4ed37ddea2f09e7bc2a15580ea17656d + pristine_git_object: d1c4a334c3be837029a35bccdbb28037e0ad3ce0 src/models/deletetransformationop.ts: id: 006255c57733 - last_write_checksum: sha1:5593d2da5b1ed857fb3a1f8a3ff32ce568fb78a5 - pristine_git_object: ef1bab52334ce5311604f83836d8a49f040baf87 + last_write_checksum: sha1:cac6485bd3b706722b2a85a293c39db09988c124 + pristine_git_object: 27cab1c23ec0ded66145a7f94e2ed62c733455ea src/models/deletetriggerop.ts: id: 31d557939519 - last_write_checksum: sha1:0f8f944487156d7e9944761deb1e537ad88a259c - pristine_git_object: 717e0e6700df09d372d9da278b0f41366e9137f6 + last_write_checksum: sha1:40af9024bf9f14bebb8f8cf7987345249458ffd7 + pristine_git_object: f7991cf5186e853bdba517711d4505780674e17c src/models/deleteuploadmappingop.ts: id: e7a037903731 - last_write_checksum: sha1:00213faf4293c1b9a3e797737d54feb63e7be366 - pristine_git_object: 0f4ecc4e43bbc98bb98694238cc7f5157be2a8e6 + last_write_checksum: sha1:880e4ce1f6c5449cc4e057d010eb0c74172f433c + pristine_git_object: 49be76e9302c09e5e86f12fe99f9a67493b4e518 src/models/deleteuploadpresetop.ts: id: a1677fa19048 - last_write_checksum: sha1:84a0eec4f722637a1712bd4df508b6a2574b5dd4 - pristine_git_object: 5f91061f57fe2004ebf1182616f570e8cc42366d + last_write_checksum: sha1:3fb7d9125c96d133db53811ddf96460df15ab85c + pristine_git_object: 432f2969773457a09e54aceeca48a90b62acf3cb + src/models/directionenum.ts: + id: 5fed402df411 + last_write_checksum: sha1:0a8bb2d57e6e8b9b83fee3e26e673c523da166c4 + pristine_git_object: e6d1a7f386b3b2440ac6b2f1aace4f737cf7e8aa src/models/errors/apierror.ts: id: e2280e075454 last_write_checksum: sha1:1a4199dec47757c19b2e88dbd767d7f24ab9522a @@ -467,46 +479,62 @@ trackedFiles: id: fb6b2b49c445 last_write_checksum: sha1:ce8bb73a1243f8ea8fa3b71a181e586e29dd02c9 pristine_git_object: 7749cf32c29ba2d44124253d9f07fbb1913b89f6 + src/models/eventtype.ts: + id: 7677f346b646 + last_write_checksum: sha1:1ab8fe629a073b8b039cf090f3e8734065e3de81 + pristine_git_object: 9e3652d54945dd17948323b29a72e5049c1e8ff1 src/models/getstreamingprofileop.ts: id: eca5fc74daf0 - last_write_checksum: sha1:a29d99ebc8b21a00b81adda18883767eee888829 - pristine_git_object: b05ef81acdda465b6d5bfa2a3f31f82fc6aba336 + last_write_checksum: sha1:ddcf8d2152d8277d4f16d5bac4e7789f31a44b3c + pristine_git_object: 22ff34242b4d9b58e26a5ee2076643c3a77f524b src/models/getstreamingprofilesop.ts: id: e3531de3df84 - last_write_checksum: sha1:d6d373d960b04ffd40842a78659143b26e4d2430 - pristine_git_object: 33dfd837b7808f45d7e9116c4da1941b5c3e23c5 + last_write_checksum: sha1:e6e8b989c1c9cb4f4dabd40a77b4f3c5515e7221 + pristine_git_object: a693904776d931934408bf1a79a3dd5845d665a1 src/models/gettransformationop.ts: id: 912df5a8ecfa last_write_checksum: sha1:199cedfc153385580f268782b83b3473c4cec7ba pristine_git_object: 81d0c7dc50f7c38cfc9bf250076632042e0ae2f4 src/models/getuploadpresetop.ts: id: a8dfe05f561d - last_write_checksum: sha1:237f281f7d258396930694d4098ffe112ee1affd - pristine_git_object: ba9aa3a6561cdd55daada4af7375c9dff32ca524 - src/models/listresponse.ts: - id: 632309be6dea - last_write_checksum: sha1:9ec09450d626a531277992b7626cfe20387e6209 - pristine_git_object: 922e36449c574609a75a359b10ad1dc2d2a806d5 + last_write_checksum: sha1:6af81813074cb63d7eda4f730bcb7ad7a1a3ac4e + pristine_git_object: cda38a178dfd397db4878e3915cf7ee5779da87e src/models/listtransformationsop.ts: id: 02cd6e6c735b - last_write_checksum: sha1:e3be87880b1c0d63f7ce46576f4046f1cc1d783f - pristine_git_object: 5e7f182bc34561f7386b59ca7ad45979c02f312e + last_write_checksum: sha1:e0005debcafdb28c21d7cbd1196d862e4b6afc00 + pristine_git_object: 5c184ad709c92f740c87c81685e7974bf19e0fcc src/models/listtriggerop.ts: id: c0482804e2bf - last_write_checksum: sha1:aaa9d9011eab5cc6b19ab55662ea088ba0b68adb - pristine_git_object: 80b3ebb6568c71bb40bea4ee54d3ed0959ef0980 + last_write_checksum: sha1:1ca4a401bb6740aa128ad8342ea051c854c00d0b + pristine_git_object: 5d15b59427992cb8d88f9123bc30bc3426823183 src/models/listuploadmappingsop.ts: id: 3dec8dda00b1 - last_write_checksum: sha1:4637a254359fd9614f5e1e27466c7027eebc682a - pristine_git_object: 878fa60274eddcce861f9b5bc12bc5d366eb8bcc + last_write_checksum: sha1:66aeb5545f08b33749d94db545dea5af2b671462 + pristine_git_object: 34b6713431691c32b17f25562077675248630523 src/models/listuploadpresetsop.ts: id: 5c9f76d10c5e - last_write_checksum: sha1:0952a21ceb150d70828b77bf46fcac5995e9b371 - pristine_git_object: 84ed4cd890ac114161728df3432f39e290f78fb1 + last_write_checksum: sha1:92406d197ba5612735b74123d9dd1c4b70b38d9e + pristine_git_object: 4070a34096dc0e1c1c2dda46cbaf3c4ea3905993 + src/models/manageddeliverytype.ts: + id: a3bf36714875 + last_write_checksum: sha1:e97a1b77ee5d6359027451a0cf86c657174667f7 + pristine_git_object: df7076223e5e503041f2e46d89ceda1d9c5bc536 + src/models/messageresponse.ts: + id: fafc9db00f76 + last_write_checksum: sha1:cc7ac5ab264043f7aec881cb7321119088e96869 + pristine_git_object: ff1413093657cd37b449eb4c693f7a7ae30dc707 src/models/replaceuploadmappingsop.ts: id: 7b1ca2a90c4a - last_write_checksum: sha1:bb89ba5a5904140f243cde252792d39f1b8c1c33 - pristine_git_object: 0cfffc0ccdd0194367718962166c133cdd3f3755 + last_write_checksum: sha1:b435da8afff9f3148d5f904ddfc2aa0b430d6f1a + pristine_git_object: 9b5386da9780c1219e4d56e200b34f50ab3b3b2c + src/models/replaceuploadmappingsrequest.ts: + id: dc5c93bb7238 + last_write_checksum: sha1:5fa5b621bdfaf520ed15c72d5d0d8e9a91a96401 + pristine_git_object: 0df26835cc0b4b54c30134ea7b2c7eb2c7ae81cc + src/models/responsivebreakpoint.ts: + id: eee6fc74c73a + last_write_checksum: sha1:54d9ca1209c72cf7e63e8959647350c1cb6aa879 + pristine_git_object: 82d377e3489e7b71ea63ba6f3f00996555e076ef src/models/schemecloudinaryauth.ts: id: 12cfe3c34e03 last_write_checksum: sha1:2bca4701aa32085d39bfd71b03d231416810311f @@ -517,80 +545,168 @@ trackedFiles: pristine_git_object: dff194aeeb96cac232d0c04f935fd0558aab88db src/models/streamingprofile.ts: id: defd34126ead - last_write_checksum: sha1:1bb024277e92977e77355f237906ecef895d7a7e - pristine_git_object: 50abd515aef005ee04ef923e70f3ee8cf54fd7c3 + last_write_checksum: sha1:334463eaafd1157e74f182a85e86babd0549b07c + pristine_git_object: 053dab0981532b5c32bb8e2512945f4a3c3a8eb2 src/models/streamingprofilecreate.ts: id: ce514e4b1e49 - last_write_checksum: sha1:1fe1a5178fbde5a904f41d9f54a1a98cf9b85a26 - pristine_git_object: 09246534daf7687448d48fc99ce3f7d4203dc16d + last_write_checksum: sha1:6ef9026013b68882fea428d708c1e07fdb267a32 + pristine_git_object: 616eda97c2064508cfb2a37c248da575fa492329 + src/models/streamingprofiledataresponse.ts: + id: 609e3fa414d6 + last_write_checksum: sha1:7ad6e02a9f56de6af7126311b8ce154edf8aab19 + pristine_git_object: e172c2c4ef3efa9aa8355f66874f612309585434 + src/models/streamingprofilelistresponse.ts: + id: 8821eb4db77d + last_write_checksum: sha1:955d4a7f8f8fc8b4a150f7cc4f3e1cf6421b674b + pristine_git_object: b84162f12cc28c66123e7318896c905f5672f916 src/models/streamingprofileupdate.ts: id: 07981c041395 - last_write_checksum: sha1:7d6345b5703c08331e506cf7913239f2ccb1e54d - pristine_git_object: 62e7540dd8910b72c83148f28d12cd70201869d1 + last_write_checksum: sha1:01a77e989992312b8ecf3bdef9ae424612eb80c7 + pristine_git_object: 6e29fa1af76eabd1c2f7555feafbbff0b5e4fd4d + src/models/streamingprofileupdateresponse.ts: + id: 6962b7b3d941 + last_write_checksum: sha1:b43ae8f4d7b1df0d31a1f4030df418cffd9a6cb0 + pristine_git_object: 99a0783b1b2f0492d01e6a601a1676cc6b34cd97 + src/models/structuredmetadataparam.ts: + id: 0c4163b8e5ca + last_write_checksum: sha1:125346cdbbb25cb4e9f7e6598c59cedd36a8d146 + pristine_git_object: 74fb0c3f9b221df9447e154afb066c5637a71c13 + src/models/structuredmetadatavalue.ts: + id: 6f1bf43c7b12 + last_write_checksum: sha1:2921bac437b9827dd8f47a97d7ba54d25c37f337 + pristine_git_object: 0a6534f6c1149aa7ac7426e7e904a054fedfed9a + src/models/tagsparam.ts: + id: 9512eede1b4a + last_write_checksum: sha1:c799911a34b1c559965bcb8dc1ac1fb97f8e7810 + pristine_git_object: 029f751734149481485c81f605eb05a11402cd62 src/models/testtriggerop.ts: id: 29879e5237e5 - last_write_checksum: sha1:4547d4c7d44adeaadd4fed4e5855c66aea038f5c - pristine_git_object: 12ec9b69548abf71977437872f123a2728e3edbd + last_write_checksum: sha1:9ad85da45fe1622b8cd4b1704fd9285f18ac4e97 + pristine_git_object: ee9a9177b55a8edd87b3da415910498b44833acc + src/models/testtriggerrequest.ts: + id: 841a617c3c67 + last_write_checksum: sha1:5f062cbdd686ab32009bc46ed28d039a30eb6c33 + pristine_git_object: cc4f1619e8f0d06e4730aecfe2d2f87ba8054fe0 + src/models/testtriggerresponse.ts: + id: b985c4059dd2 + last_write_checksum: sha1:0d3101d68997ef1b7996f148272a33dd862da9e5 + pristine_git_object: c52b0ec864abcaef75dee89546f03adce4e952c9 src/models/transformationinfo.ts: id: 740181f27910 - last_write_checksum: sha1:bd8481fab57d79b81b7cf1f49a60749bf74aaf27 - pristine_git_object: aef7edef8c57c74e4b9d9089095c5ea93171fbed + last_write_checksum: sha1:9a4180bbabe4bca3c8a07d42f50e9ddc821227b2 + pristine_git_object: 2c0cc7be2f48a29b564b08521920250beb7aa077 + src/models/transformationlistresponse.ts: + id: 2933e1ecf371 + last_write_checksum: sha1:4f345b1b5cdf49128f7aa1d6203016fc8b29425b + pristine_git_object: 0116adea8de213c75ea0dc219f75567f48933289 src/models/transformationsummary.ts: id: c57bc44fe499 last_write_checksum: sha1:3531d0b31310db79bfd6af1e494a69e1f458c4a8 pristine_git_object: c487aa2caeed97990fe8bdb8a4ca81b1e06aebe6 src/models/triggerinfo.ts: id: 995e9c83c48f - last_write_checksum: sha1:72f2a33e53f5b00b7ede901772e67fb12ee3b025 - pristine_git_object: cd059cf48c56d1b8c2f753b11e79ce2202708b1c + last_write_checksum: sha1:f7a2fb6f18c252b380b2995da599e7814e7fb6b7 + pristine_git_object: bcb7bbe48d83067ce6e7ad244d0ad74643ffd4b8 + src/models/triggerlistresponse.ts: + id: 2618726e940e + last_write_checksum: sha1:15207d188584c7bb04035a678e8d3224567059b0 + pristine_git_object: 6a7380071e78086e42ebb7571d4a758e589fd98d src/models/updaterequest.ts: id: adf3ff99f4bd - last_write_checksum: sha1:8371f4e42119092487dedd0899129787cf257c78 - pristine_git_object: d7d324857c19a6f874fffd4db5df21d87f36d371 + last_write_checksum: sha1:78b7c1022a3022bb19a263ac8f676a027d1366f4 + pristine_git_object: cfd31145cd84c205796d31c146484189f050bdb7 src/models/updatestreamingprofileop.ts: id: 2024d97cf5c0 - last_write_checksum: sha1:9cf3318345e99395a0fa27014e8d66ee49dd8cb2 - pristine_git_object: d569834dd33a978ef520bfe615f638fb9066a505 + last_write_checksum: sha1:9625f3ad1bc97f136f313a5e082ab27d93dd4395 + pristine_git_object: 97bd8091d0915db295349912bbef27691dd95353 src/models/updatetransformationop.ts: id: 7a20d3005e9d - last_write_checksum: sha1:91dc4e9b7cadf0a31d408b4f9172a520db39e751 - pristine_git_object: ebeb0c6b5c011be2a840978658eba9aad1030b95 + last_write_checksum: sha1:f99a90a74280bd8bfe9705ae5f2a164dece1fd0a + pristine_git_object: b813873dd40fbb56225811aade2a151a98a71393 src/models/updatetriggerop.ts: id: 377859f3f79a - last_write_checksum: sha1:05ce78068b864ac3b67212a62ee0be87bd7f1a5a - pristine_git_object: 718044a9182e75dcc767c32ca2308389b9bc22a7 + last_write_checksum: sha1:f89abcd64f5c046aa0d4d2ed40dcf7533397dc78 + pristine_git_object: 2d7040be150b2b04d35d4d13a02ee83e1422246f + src/models/updatetriggerrequest.ts: + id: 73ac5de52252 + last_write_checksum: sha1:0c7556259f22e0e9d33ba7e320a8cb7e1b089494 + pristine_git_object: 4abe029717005fbf1c78eef8a0e9523b5237883e src/models/updateuploadmappingop.ts: id: d502659f7b62 - last_write_checksum: sha1:13a931f2b1ac78a99a3e7599de48345df2c50666 - pristine_git_object: a97e46d7167ed3e1f4eb4afda27471eaba1da883 + last_write_checksum: sha1:744bb35c2102b39cedd6f690eff67b880cb17c2c + pristine_git_object: b592c1e89ba5d8812f0b7ae24b4ffe9d9defd409 src/models/updateuploadpresetop.ts: id: 581514dadc99 - last_write_checksum: sha1:26b029dff4d44245511b09d774eb6751eec3a0b0 - pristine_git_object: db96453bb02f41c13a97981155377816d5f5565f + last_write_checksum: sha1:d55e3f2cb8bbadf704cfd635e918dab5412b7046 + pristine_git_object: e36e44c033bdb061b3747e69fa1a98108aaa6ae0 + src/models/uploaddeliverytype.ts: + id: af7a36564eab + last_write_checksum: sha1:7bd08ad136eb40836a2c327eb60904295d596acf + pristine_git_object: 96947e64f9f32545660240a3e1ca8946528b5994 src/models/uploadmapping.ts: id: c798baf7863e - last_write_checksum: sha1:e178084f7c6aa61d0387a76fa886363c8d35427c - pristine_git_object: eed0e55669278801cd6d269246b93a235fa2fb1f - src/models/uploadpreset.ts: - id: bcdda6e5ea45 - last_write_checksum: sha1:d058167fda409fe497ea12171a81507b8a48ad1c - pristine_git_object: 2e6d7fe902cc7c0904c4b8f0553537985106e975 + last_write_checksum: sha1:d1ce6466618984b7d05cf7e52d720e1288600d8a + pristine_git_object: ffabf4b6d300db18b0cdfd72c0b072d49b05f31e + src/models/uploadmappingcreateresponse.ts: + id: b516d68684cf + last_write_checksum: sha1:d0fa0728a929793e40f8f5dcd3ca2499b52a14a1 + pristine_git_object: 4b0fc69bef855fa4e3a00681186cab7f40a9f8ce + src/models/uploadmappinginput.ts: + id: 1820206fdf2f + last_write_checksum: sha1:621c581c2d539ebe5af2c52bfabfc9cb3d814553 + pristine_git_object: 08532bc10fef7728acf4bf9286f58a20203006b9 + src/models/uploadmappinglistresponse.ts: + id: de87da16b2ec + last_write_checksum: sha1:4c4c172a700db0cfbcde65ee123c99f5af9d6faf + pristine_git_object: 9518fff41251505d78713ab4177c1d5c8b87a05c + src/models/uploadmappingmutationresponse.ts: + id: 8c15fa5d0ffb + last_write_checksum: sha1:c229ee2ece1d177d9cde8045904c7c2d18431346 + pristine_git_object: 94fe0dd63df871a29fb2248586b661da68313e2d + src/models/uploadpresetcreateresponse.ts: + id: 241bb386b6ef + last_write_checksum: sha1:9e71cc13c6c5a1420caafe057c4d7e4a3e137b61 + pristine_git_object: 70077e6d77ebdad103c9a4533960503d89a387d1 + src/models/uploadpresetdetail.ts: + id: e5008f980d4f + last_write_checksum: sha1:d735f321eabd456873463aa9d52f2e10d44f8515 + pristine_git_object: 18b725ae228ad4e7bf5c19b39c1dd1af36b3bd3e + src/models/uploadpresetinput.ts: + id: fcf7aec9bc10 + last_write_checksum: sha1:0a59e9d895c8d56139f00edbb20fd19381c945c5 + pristine_git_object: 6733f1e6b59c553f32a21c09af073e51481ae635 + src/models/uploadpresetlistresponse.ts: + id: 2f4075213ce6 + last_write_checksum: sha1:9b739da84622ef5b478038ee820de082c8776596 + pristine_git_object: 79f1903cb901c026cccab022af1e9d30e2088e88 + src/models/uploadpresetmutationresponse.ts: + id: 1485e4e32a53 + last_write_checksum: sha1:30f378f47d19e25b4883b8a807c3b3c4463bf2ab + pristine_git_object: f1660547423bd7671a834b24a7cff810baf8245b + src/models/uploadpresetparsedsettings.ts: + id: 4d89e7e1dd72 + last_write_checksum: sha1:c2611016e26a7b5a7c102b38cfe0b6e1c28d8f58 + pristine_git_object: df552b85bc6c09f50b5ee2018911888c316830dd + src/models/uploadpresetsummary.ts: + id: 4e002a63b07b + last_write_checksum: sha1:08d9e96164a4594ef32ae1c785b5f5ae71acc631 + pristine_git_object: 7feceb0ec80fef596f81a12e63107329d1a098ba src/models/uritype.ts: id: e735fed0d13e last_write_checksum: sha1:e6fe90bd1c1f95c8fc4b9b7a912aa915d933f0e1 pristine_git_object: 5eae9469d0a1b63da4c02fd19e0e1070972ab440 src/tool-names.ts: id: a9977280f9eb - last_write_checksum: sha1:5378b0dad58935c6ea0e61254e63bb8fea4c2bd3 - pristine_git_object: 4725f567cd26f4c33f84a96a54f5919d4962f726 + last_write_checksum: sha1:d3964b004bedcf41954b9f0b485ccbeed3ab0891 + pristine_git_object: e4913d4e10f242c3e3214ac20b49129a13ce5769 src/types/async.ts: id: fac8da972f86 last_write_checksum: sha1:3ff07b3feaf390ec1aeb18ff938e139c6c4a9585 pristine_git_object: 689dba5de50e8769e5f3bb913e3f42a146d15bc1 src/types/bigint.ts: id: 3ca6e3280e43 - last_write_checksum: sha1:58178437a7d38f022b5d9bef691ba5539fad4655 - pristine_git_object: f32ee5fe6a2dbf82bd2d1ec7c17cd2987bcff1d6 + last_write_checksum: sha1:ebf6d4b27fc3aa7ff76dbedae9a19fb7f39e5dc7 + pristine_git_object: 91c22c4052617269c44ed145d678d39d8eb24a4d src/types/blobs.ts: id: f8ab9b326c86 last_write_checksum: sha1:9cc86e0e9420999afb48d53c57d71584be745fd7 @@ -669,7 +785,7 @@ examples: application/json: {"transformation": "w_100,h_150,c_fill,g_auto", "allowed_for_strict": true} responses: "200": - application/json: {} + application/json: {"message": "updated"} "400": application/json: {"error": {"message": ""}} updateTransformation: @@ -682,7 +798,7 @@ examples: application/json: {"unsafe_update": "w_200,h_200,c_fill,g_face", "allowed_for_strict": true} responses: "200": - application/json: {} + application/json: {"message": "updated"} "400": application/json: {"error": {"message": ""}} string: @@ -694,7 +810,7 @@ examples: application/json: {"unsafe_update": "w_200,h_200,c_fill,g_face", "allowed_for_strict": true} responses: "200": - application/json: {} + application/json: {"message": "updated"} "400": application/json: {"error": {"message": ""}} speakeasy-default-update-transformation: @@ -706,7 +822,7 @@ examples: application/json: {"unsafe_update": "w_200,h_200,c_fill,g_face", "allowed_for_strict": true} responses: "200": - application/json: {} + application/json: {"message": "updated"} "400": application/json: {"error": {"message": ""}} deleteTransformation: @@ -719,7 +835,7 @@ examples: invalidate: true responses: "200": - application/json: {} + application/json: {"message": "updated"} "400": application/json: {"error": {"message": ""}} string: @@ -731,7 +847,7 @@ examples: invalidate: true responses: "200": - application/json: {} + application/json: {"message": "updated"} "400": application/json: {"error": {"message": ""}} speakeasy-default-delete-transformation: @@ -743,7 +859,7 @@ examples: invalidate: true responses: "200": - application/json: {} + application/json: {"message": "updated"} "400": application/json: {"error": {"message": ""}} createUploadPreset: @@ -752,11 +868,11 @@ examples: path: cloud_name: "" requestBody: - application/json: {"auto_transcription": true, "colors": false, "headers": "X-Robots-Tag: noindex", "moderation": "aws_rek|duplicate:0|perception_point|manual", "categorization": "google_tagging", "ocr": "adv_ocr", "raw_convert": "google_speech:vtt:en-US", "background_removal": "cloudinary_ai", "format": "jpg", "allowed_formats": "mp4,ogv,jpg,png,pdf", "auto_tagging": 0.5, "access_control": [{"access_type": "token", "key": "prod2024"}, {"access_type": "anonymous", "start": "2024-03-15T09:00:00Z", "end": "2024-06-30T23:59:59Z"}], "detection": "coco_v2"} - application/x-www-form-urlencoded: {"auto_transcription": true, "colors": false, "headers": "X-Robots-Tag: noindex", "moderation": "aws_rek|duplicate:0|perception_point|manual", "categorization": "google_tagging", "ocr": "adv_ocr", "raw_convert": "google_speech:vtt:en-US", "background_removal": "cloudinary_ai", "format": "jpg", "allowed_formats": "mp4,ogv,jpg,png,pdf", "auto_tagging": 0.5, "access_control": [{"access_type": "token", "key": "prod2024"}, {"access_type": "anonymous", "start": "2024-03-15T09:00:00Z", "end": "2024-06-30T23:59:59Z"}], "detection": "coco_v2"} + application/json: {"auto_tagging": 0.5, "auto_transcription": true, "access_control": [{"access_type": "token", "key": "prod2024"}, {"access_type": "anonymous", "start": "2024-03-15T09:00:00Z", "end": "2024-06-30T23:59:59Z"}], "background_removal": "cloudinary_ai", "categorization": "google_tagging", "colors": false, "detection": "coco_v2", "format": "jpg", "metadata": "in_stock_id=50|color_id=[\"green\",\"red\"]", "clear_invalid": false, "moderation": "aws_rek|duplicate:0|perception_point|manual", "ocr": "adv_ocr", "raw_convert": "google_speech:vtt:en-US", "regions": "{\"face\": [[100, 200], [300, 400]], \"body\": [[50, 60], [70, 80], [90, 100]]}", "tags": "animal,dog", "context": "alt=My image|caption=Nice photo", "allowed_formats": "mp4,ogv,jpg,png,pdf", "headers": "X-Robots-Tag: noindex", "face_coordinates": "10,20,150,130|213,345,82,61", "custom_coordinates": "10,20,150,130"} + application/x-www-form-urlencoded: {"auto_tagging": 0.5, "auto_transcription": true, "access_control": [{"access_type": "token", "key": "prod2024"}, {"access_type": "anonymous", "start": "2024-03-15T09:00:00Z", "end": "2024-06-30T23:59:59Z"}], "background_removal": "cloudinary_ai", "categorization": "google_tagging", "colors": false, "detection": "coco_v2", "format": "jpg", "metadata": "in_stock_id=50|color_id=[\"green\",\"red\"]", "clear_invalid": false, "moderation": "aws_rek|duplicate:0|perception_point|manual", "ocr": "adv_ocr", "raw_convert": "google_speech:vtt:en-US", "regions": "{\"face\": [[100, 200], [300, 400]], \"body\": [[50, 60], [70, 80], [90, 100]]}", "tags": "animal,dog", "context": "alt=My image|caption=Nice photo", "allowed_formats": "mp4,ogv,jpg,png,pdf", "headers": "X-Robots-Tag: noindex", "face_coordinates": "10,20,150,130|213,345,82,61", "custom_coordinates": "10,20,150,130"} responses: "200": - application/json: {"name": "", "message": "", "external_id": ""} + application/json: {"message": "", "name": "", "external_id": ""} "400": application/json: {"error": {"message": ""}} listUploadPresets: @@ -764,9 +880,11 @@ examples: parameters: path: cloud_name: "" + query: + max_results: 10 responses: "200": - application/json: {"presets": [{"auto_transcription": true, "colors": false, "headers": "X-Robots-Tag: noindex", "moderation": "aws_rek|duplicate:0|perception_point|manual", "categorization": "google_tagging", "ocr": "adv_ocr", "raw_convert": "google_speech:vtt:en-US", "background_removal": "cloudinary_ai", "format": "jpg", "allowed_formats": "mp4,ogv,jpg,png,pdf", "auto_tagging": 0.5, "access_control": [{"access_type": "token", "key": "prod2024"}, {"access_type": "anonymous", "start": "2024-03-15T09:00:00Z", "end": "2024-06-30T23:59:59Z"}], "detection": "coco_v2"}]} + application/json: {"presets": [{"name": "my_preset", "external_id": "84fbfd12-d00a-4c5b-8e92-05dbac244d43"}]} "400": application/json: {"error": {"message": ""}} getUploadPreset: @@ -777,7 +895,7 @@ examples: cloud_name: "" responses: "200": - application/json: {"auto_transcription": true, "colors": false, "headers": "X-Robots-Tag: noindex", "moderation": "aws_rek|duplicate:0|perception_point|manual", "categorization": "google_tagging", "ocr": "adv_ocr", "raw_convert": "google_speech:vtt:en-US", "background_removal": "cloudinary_ai", "format": "jpg", "allowed_formats": "mp4,ogv,jpg,png,pdf", "auto_tagging": 0.5, "access_control": [{"access_type": "token", "key": "prod2024"}, {"access_type": "anonymous", "start": "2024-03-15T09:00:00Z", "end": "2024-06-30T23:59:59Z"}], "detection": "coco_v2"} + application/json: {"name": "my_preset", "settings": {"auto_tagging": 0.5, "auto_transcription": true, "access_control": [{"access_type": "token", "key": "prod2024"}, {"access_type": "anonymous", "start": "2024-03-15T09:00:00Z", "end": "2024-06-30T23:59:59Z"}], "background_removal": "cloudinary_ai", "categorization": "google_tagging", "colors": false, "detection": "coco_v2", "format": "jpg", "metadata": "in_stock_id=50|color_id=[\"green\",\"red\"]", "clear_invalid": false, "moderation": "aws_rek|duplicate:0|perception_point|manual", "ocr": "adv_ocr", "raw_convert": "google_speech:vtt:en-US", "regions": "{\"face\": [[100, 200], [300, 400]], \"body\": [[50, 60], [70, 80], [90, 100]]}", "tags": ["tag1", "tag2"], "context": {"alt": "My image", "caption": "Nice photo"}, "eager": [[{"width": 100, "height": 100, "crop": "thumb"}]], "allowed_formats": ["jpg", "png", "gif"]}, "external_id": "4d92a1bc-25c8-4f5a-a763-1b7dc169fd5a"} "400": application/json: {"error": {"message": ""}} updateUploadPreset: @@ -787,8 +905,8 @@ examples: name: "" cloud_name: "" requestBody: - application/json: {"auto_transcription": true, "colors": false, "headers": "X-Robots-Tag: noindex", "moderation": "aws_rek|duplicate:0|perception_point|manual", "categorization": "google_tagging", "ocr": "adv_ocr", "raw_convert": "google_speech:vtt:en-US", "background_removal": "cloudinary_ai", "format": "jpg", "allowed_formats": "mp4,ogv,jpg,png,pdf", "auto_tagging": 0.5, "access_control": [{"access_type": "token", "key": "prod2024"}, {"access_type": "anonymous", "start": "2024-03-15T09:00:00Z", "end": "2024-06-30T23:59:59Z"}], "detection": "coco_v2"} - application/x-www-form-urlencoded: {"auto_transcription": true, "colors": false, "headers": "X-Robots-Tag: noindex", "moderation": "aws_rek|duplicate:0|perception_point|manual", "categorization": "google_tagging", "ocr": "adv_ocr", "raw_convert": "google_speech:vtt:en-US", "background_removal": "cloudinary_ai", "format": "jpg", "allowed_formats": "mp4,ogv,jpg,png,pdf", "auto_tagging": 0.5, "access_control": [{"access_type": "token", "key": "prod2024"}, {"access_type": "anonymous", "start": "2024-03-15T09:00:00Z", "end": "2024-06-30T23:59:59Z"}], "detection": "coco_v2"} + application/json: {"auto_tagging": 0.5, "auto_transcription": true, "access_control": [{"access_type": "token", "key": "prod2024"}, {"access_type": "anonymous", "start": "2024-03-15T09:00:00Z", "end": "2024-06-30T23:59:59Z"}], "background_removal": "cloudinary_ai", "categorization": "google_tagging", "colors": false, "detection": "coco_v2", "format": "jpg", "metadata": "in_stock_id=50|color_id=[\"green\",\"red\"]", "clear_invalid": false, "moderation": "aws_rek|duplicate:0|perception_point|manual", "ocr": "adv_ocr", "raw_convert": "google_speech:vtt:en-US", "regions": "{\"face\": [[100, 200], [300, 400]], \"body\": [[50, 60], [70, 80], [90, 100]]}", "tags": "animal,dog", "context": "alt=My image|caption=Nice photo", "allowed_formats": "mp4,ogv,jpg,png,pdf", "headers": "X-Robots-Tag: noindex", "face_coordinates": "10,20,150,130|213,345,82,61", "custom_coordinates": "10,20,150,130"} + application/x-www-form-urlencoded: {"auto_tagging": 0.5, "auto_transcription": true, "access_control": [{"access_type": "token", "key": "prod2024"}, {"access_type": "anonymous", "start": "2024-03-15T09:00:00Z", "end": "2024-06-30T23:59:59Z"}], "background_removal": "cloudinary_ai", "categorization": "google_tagging", "colors": false, "detection": "coco_v2", "format": "jpg", "metadata": "in_stock_id=50|color_id=[\"green\",\"red\"]", "clear_invalid": false, "moderation": "aws_rek|duplicate:0|perception_point|manual", "ocr": "adv_ocr", "raw_convert": "google_speech:vtt:en-US", "regions": "{\"face\": [[100, 200], [300, 400]], \"body\": [[50, 60], [70, 80], [90, 100]]}", "tags": "animal,dog", "context": "alt=My image|caption=Nice photo", "allowed_formats": "mp4,ogv,jpg,png,pdf", "headers": "X-Robots-Tag: noindex", "face_coordinates": "10,20,150,130|213,345,82,61", "custom_coordinates": "10,20,150,130"} responses: "200": application/json: {"message": "", "external_id": ""} @@ -884,7 +1002,7 @@ examples: application/json: {"uri": "https://trigger.site/124", "event_type": "upload"} responses: "201": - application/json: {"id": "c2c822dd1aa41ba6d81299df8b5ae949", "product_environment_id": "7fabb2ff3d687d05b63134cf8fa006ba16", "uri_type": "flow", "uri": "http://example.com", "event_type": "all", "created_at": "2025-05-13T09:40:29+00:00", "updated_at": "2025-05-13T09:40:29+00:00"} + application/json: {"id": "c2c822dd1aa41ba6d81299df8b5ae949", "product_environment_id": "7fabb2ff3d687d05b63134cf8fa006ba16", "uri_type": "flow", "uri": "http://example.com", "created_at": "2025-05-13T09:40:29+00:00", "updated_at": "2025-05-13T09:40:29+00:00"} "400": application/json: {"error": {"message": ""}} updateTrigger: @@ -994,14 +1112,7 @@ examples: "400": application/json: {"error": {"message": ""}} examplesVersion: 1.0.2 -releaseNotes: | - ## Mcp-typescript SDK Changes: - * `CloudinaryEnvConfig.transformations.getTransformation()`: `response.info[]` **Changed** (Breaking ⚠️) - * `CloudinaryEnvConfig.upload_presets.createUploadPreset()`: `request` **Changed** (Breaking ⚠️) - * `CloudinaryEnvConfig.upload_presets.listUploadPresets()`: `response.presets[]` **Changed** (Breaking ⚠️) - * `CloudinaryEnvConfig.upload_presets.getUploadPreset()`: `response` **Changed** (Breaking ⚠️) - * `CloudinaryEnvConfig.upload_presets.updateUploadPreset()`: `request.upload_preset` **Changed** (Breaking ⚠️) - * `CloudinaryEnvConfig.triggers.testTrigger()`: **Added** +releaseNotes: "## Mcp-typescript SDK Changes:\n* `CloudinaryEnvConfig.upload_presets.createUploadPreset()`: `request` **Changed** (Breaking ⚠️)\n* `CloudinaryEnvConfig.upload_presets.listUploadPresets()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `CloudinaryEnvConfig.upload_presets.getUploadPreset()`: `response` **Changed** (Breaking ⚠️)\n* `CloudinaryEnvConfig.upload_presets.updateUploadPreset()`: `request` **Changed** (Breaking ⚠️)\n* `CloudinaryEnvConfig.upload_mappings.listUploadMappings()`: `response` **Changed** (Breaking ⚠️)\n* `CloudinaryEnvConfig.triggers.listTrigger()`: \n * `request.event_type` **Changed** (Breaking ⚠️)\n * `response.triggers[].event_type` **Changed** (Breaking ⚠️)\n* `CloudinaryEnvConfig.triggers.createTrigger()`: \n * `request.event_type` **Changed** (Breaking ⚠️)\n * `response.event_type` **Changed** (Breaking ⚠️)\n* `CloudinaryEnvConfig.triggers.updateTrigger()`: `request` **Changed** (Breaking ⚠️)\n* `CloudinaryEnvConfig.triggers.testTrigger()`: `request` **Changed** (Breaking ⚠️)\n* `CloudinaryEnvConfig.transformations.createTransformation()`: `response.message` **Changed**\n* `CloudinaryEnvConfig.transformations.updateTransformation()`: `response.message` **Changed**\n* `CloudinaryEnvConfig.transformations.deleteTransformation()`: `response.message` **Changed**\n" generatedFiles: - .dxtignore - .gitattributes diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 2926bf1..c69a9f7 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -31,7 +31,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: false mcp-typescript: - version: 0.6.0 + version: 0.7.0 additionalDependencies: dependencies: {} devDependencies: {} @@ -56,6 +56,7 @@ mcp-typescript: enableReactQuery: false enumFormat: union envVarPrefix: CLOUDINARY + fixEnumNameSanitization: false flattenGlobalSecurity: true flatteningOrder: parameters-first formStringArrayEncodeMode: encoded-string diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 281ac1c..3343b83 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,18 +1,18 @@ -speakeasyVersion: 1.755.1 +speakeasyVersion: 1.768.2 sources: CloudinaryEnvConfig-MCP-OAS: sourceNamespace: cloudinary-env-config-mcp-oas - sourceRevisionDigest: sha256:db829e6bf09523789e58c6b1d38767772afc1a0e3612e7d1e30a86f3983ee4b4 - sourceBlobDigest: sha256:2b79ac215d5147f5d4c321e98e6f8f4f41527d81bfe5aa9c2af0d85e30efec14 + sourceRevisionDigest: sha256:ec5b0605da0f38c006fbccedf8425483eadfe3c245ce303b4fa3452f01382ebc + sourceBlobDigest: sha256:4645118dc42e1a7ddc2e0af03902fa8b0e940365a9f8185b21dad52545e3e4b8 tags: - latest - - 0.4.0 + - 0.5.5 targets: cloudinary-env-config-mcp: source: CloudinaryEnvConfig-MCP-OAS sourceNamespace: cloudinary-env-config-mcp-oas - sourceRevisionDigest: sha256:db829e6bf09523789e58c6b1d38767772afc1a0e3612e7d1e30a86f3983ee4b4 - sourceBlobDigest: sha256:2b79ac215d5147f5d4c321e98e6f8f4f41527d81bfe5aa9c2af0d85e30efec14 + sourceRevisionDigest: sha256:ec5b0605da0f38c006fbccedf8425483eadfe3c245ce303b4fa3452f01382ebc + sourceBlobDigest: sha256:4645118dc42e1a7ddc2e0af03902fa8b0e940365a9f8185b21dad52545e3e4b8 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 8d1738d..3ce589a 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,9 @@
Claude Desktop -Install the MCP server as a Desktop Extension using the pre-built [`mcp-server.mcpb`](https://github.com/cloudinary/environment-config-mcp/releases/download/v0.6.0/mcp-server.mcpb) file: +Install the MCP server as a Desktop Extension using the pre-built [`mcp-server.mcpb`](https://github.com/cloudinary/environment-config-mcp/releases/download/v0.7.0/mcp-server.mcpb) file: -Simply drag and drop the [`mcp-server.mcpb`](https://github.com/cloudinary/environment-config-mcp/releases/download/v0.6.0/mcp-server.mcpb) file onto Claude Desktop to install the extension. +Simply drag and drop the [`mcp-server.mcpb`](https://github.com/cloudinary/environment-config-mcp/releases/download/v0.7.0/mcp-server.mcpb) file onto Claude Desktop to install the extension. The MCP bundle package includes the MCP server and all necessary configuration. Once installed, the server will be available without additional setup. @@ -332,8 +332,8 @@ To enable dynamic mode, pass the `--mode dynamic` flag when starting your server In dynamic mode, the server registers only the following meta-tools instead of every individual tool: - **`list_tools`**: Lists all available tools with their names and descriptions. -- **`describe_tool`**: Returns the input schema for one or more tools by name. -- **`execute_tool`**: Executes a tool by name with the provided input parameters. +- **`describe_tool_input`**: Returns the input schema for one or more tools by name. +- **`execute_tool`**: Executes a tool by name with its arguments. - **`list_scopes`**: Lists the scopes available on the server. This approach significantly reduces the number of tokens sent to the LLM on each request, which is especially useful for servers with a large number of tools. diff --git a/RELEASES.md b/RELEASES.md index 7e98bd1..7a23e0f 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -6,4 +6,12 @@ Based on: - OpenAPI Doc - Speakeasy CLI 1.755.1 (2.865.2) https://github.com/speakeasy-api/speakeasy ### Generated -- [mcp-typescript v0.6.0] . \ No newline at end of file +- [mcp-typescript v0.6.0] . + +## 2026-06-01 00:54:44 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.768.2 (2.889.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [mcp-typescript v0.7.0] . \ No newline at end of file diff --git a/manifest.json b/manifest.json index d04f47b..735c38f 100644 --- a/manifest.json +++ b/manifest.json @@ -79,11 +79,11 @@ "type": "string" } }, - "version": "0.6.0", + "version": "0.7.0", "tools": [ { "name": "list-transformations", - "description": "Lists all transformation definitions in your account (including named transformations\n\nRetrieves a list of all transformations, which can be filtered to show either only named or unnamed transformations.\n" + "description": "Lists all transformation definitions in your account, including named transformations\n\nRetrieves a list of all transformations, which can be filtered to show either only named or unnamed transformations.\n" }, { "name": "get-transformation-details", @@ -91,11 +91,11 @@ }, { "name": "create-transformation", - "description": "Creates a new named transformation (assigning a custom name to a set of transformation\n\nCreates a new named transformation with the given name and transformation string.\n" + "description": "Creates a new named transformation by assigning a custom name to a set of transformation parameters\n\nCreates a new named transformation with the given name and transformation string.\n" }, { "name": "update-transformation", - "description": "Updates the definition of an existing named transformation\n\nUpdate an existing named or unnamed transformation.\n" + "description": "Updates the definition of an existing transformation\n\nUpdates a named or unnamed transformation.\n" }, { "name": "delete-transformation", @@ -131,7 +131,7 @@ }, { "name": "update-upload-mapping", - "description": "Updates an existing upload mapping by changing its remote URL template for a given\n\nUpdates the URL template for an existing folder mapping" + "description": "Updates an existing upload mapping by changing its remote URL template for a given folder\n\nUpdates the URL template for an existing folder mapping" }, { "name": "delete-upload-mapping", @@ -139,7 +139,7 @@ }, { "name": "list-triggers", - "description": "Lists all webhook notification triggers configured for your product environmentcloudinary\n\nRetrieves a list of all event triggers and notifications within your product environment.\n" + "description": "Lists all webhook notification triggers configured for your product environment\n\nRetrieves a list of all event triggers and notifications within your product environment.\n" }, { "name": "create-trigger", diff --git a/package-lock.json b/package-lock.json index c1777ee..cf9806c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,15 @@ { "name": "@cloudinary/environment-config-mcp", - "version": "0.6.0", + "version": "0.7.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@cloudinary/environment-config-mcp", - "version": "0.6.0", + "version": "0.7.0", "dependencies": { "@modelcontextprotocol/sdk": "1.26.0", "@stricli/core": "^1.1.2", - "bun": "^1.2.12", "express": "^5.1.0", "zod": "^4.0.0" }, @@ -24,6 +23,7 @@ "@types/bun": "^1.2.13", "@types/express": "^5.0.1", "@types/node": "^18.19.3", + "bun": "^1.2.12", "eslint": "^9.26.0", "globals": "^16.0.0", "typescript": "~5.8.3", @@ -601,6 +601,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -614,6 +615,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -627,6 +629,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -640,6 +643,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -653,6 +657,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -666,6 +671,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -679,6 +685,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -692,6 +699,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -705,6 +713,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -718,6 +727,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -731,6 +741,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1316,6 +1327,7 @@ "arm64", "x64" ], + "dev": true, "hasInstallScript": true, "license": "MIT", "os": [ diff --git a/package.json b/package.json index ad939d0..f6f7e2b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cloudinary/environment-config-mcp", - "version": "0.6.0", + "version": "0.7.0", "author": "Cloudinary", "type": "module", "sideEffects": false, @@ -22,7 +22,6 @@ "dependencies": { "@modelcontextprotocol/sdk": "1.26.0", "@stricli/core": "^1.1.2", - "bun": "^1.2.12", "express": "^5.1.0", "zod": "^4.0.0" }, @@ -35,6 +34,7 @@ "@types/bun": "^1.2.13", "@types/express": "^5.0.1", "@types/node": "^18.19.3", + "bun": "^1.2.12", "eslint": "^9.26.0", "globals": "^16.0.0", "typescript": "~5.8.3", diff --git a/src/funcs/transformationsCreateTransformation.ts b/src/funcs/transformationsCreateTransformation.ts index 430c9cb..db347c6 100644 --- a/src/funcs/transformationsCreateTransformation.ts +++ b/src/funcs/transformationsCreateTransformation.ts @@ -27,7 +27,7 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Creates a new named transformation (assigning a custom name to a set of transformation + * Creates a new named transformation by assigning a custom name to a set of transformation parameters * * @remarks * Creates a new named transformation with the given name and transformation string. diff --git a/src/funcs/transformationsListTransformations.ts b/src/funcs/transformationsListTransformations.ts index 924bb1f..841d19e 100644 --- a/src/funcs/transformationsListTransformations.ts +++ b/src/funcs/transformationsListTransformations.ts @@ -26,7 +26,7 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Lists all transformation definitions in your account (including named transformations + * Lists all transformation definitions in your account, including named transformations * * @remarks * Retrieves a list of all transformations, which can be filtered to show either only named or unnamed transformations. diff --git a/src/funcs/transformationsUpdateTransformation.ts b/src/funcs/transformationsUpdateTransformation.ts index 876ca88..b33928b 100644 --- a/src/funcs/transformationsUpdateTransformation.ts +++ b/src/funcs/transformationsUpdateTransformation.ts @@ -27,10 +27,10 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Updates the definition of an existing named transformation + * Updates the definition of an existing transformation * * @remarks - * Update an existing named or unnamed transformation. + * Updates a named or unnamed transformation. */ export function transformationsUpdateTransformation( client$: CloudinaryEnvConfigCore, diff --git a/src/funcs/triggersCreateTrigger.ts b/src/funcs/triggersCreateTrigger.ts index ede0981..cda8afb 100644 --- a/src/funcs/triggersCreateTrigger.ts +++ b/src/funcs/triggersCreateTrigger.ts @@ -12,7 +12,7 @@ import { pathToFunc } from "../lib/url.js"; import { CreateTriggerRequest, CreateTriggerRequest$zodSchema, -} from "../models/createtriggerop.js"; +} from "../models/createtriggerrequest.js"; import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, diff --git a/src/funcs/triggersListTrigger.ts b/src/funcs/triggersListTrigger.ts index d9665b9..c84f1f0 100644 --- a/src/funcs/triggersListTrigger.ts +++ b/src/funcs/triggersListTrigger.ts @@ -18,6 +18,7 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { EventType } from "../models/eventtype.js"; import { ListTriggerRequest, ListTriggerRequest$zodSchema, @@ -26,14 +27,14 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Lists all webhook notification triggers configured for your product environmentcloudinary + * Lists all webhook notification triggers configured for your product environment * * @remarks * Retrieves a list of all event triggers and notifications within your product environment. */ export function triggersListTrigger( client$: CloudinaryEnvConfigCore, - event_type?: string | undefined, + event_type?: EventType | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -56,7 +57,7 @@ export function triggersListTrigger( async function $do( client$: CloudinaryEnvConfigCore, - event_type?: string | undefined, + event_type?: EventType | undefined, options?: RequestOptions, ): Promise< [ diff --git a/src/funcs/triggersTestTrigger.ts b/src/funcs/triggersTestTrigger.ts index e640547..99db099 100644 --- a/src/funcs/triggersTestTrigger.ts +++ b/src/funcs/triggersTestTrigger.ts @@ -19,10 +19,10 @@ import { } from "../models/errors/httpclienterrors.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { - TestTriggerRequest, - TestTriggerRequest$zodSchema, - TestTriggerRequestBody, + TestTriggerRequestRequest, + TestTriggerRequestRequest$zodSchema, } from "../models/testtriggerop.js"; +import { TestTriggerRequest } from "../models/testtriggerrequest.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -36,7 +36,7 @@ import { Result } from "../types/fp.js"; export function triggersTestTrigger( client$: CloudinaryEnvConfigCore, id: string, - RequestBody?: TestTriggerRequestBody | undefined, + test_trigger_request?: TestTriggerRequest | undefined, options?: RequestOptions, ): APIPromise< Result< @@ -53,7 +53,7 @@ export function triggersTestTrigger( return new APIPromise($do( client$, id, - RequestBody, + test_trigger_request, options, )); } @@ -61,7 +61,7 @@ export function triggersTestTrigger( async function $do( client$: CloudinaryEnvConfigCore, id: string, - RequestBody?: TestTriggerRequestBody | undefined, + test_trigger_request?: TestTriggerRequest | undefined, options?: RequestOptions, ): Promise< [ @@ -78,21 +78,23 @@ async function $do( APICall, ] > { - const input$: TestTriggerRequest = { + const input$: TestTriggerRequestRequest = { id: id, - RequestBody: RequestBody, + test_trigger_request: test_trigger_request, }; const parsed$ = safeParse( input$, - (value$) => TestTriggerRequest$zodSchema.parse(value$), + (value$) => TestTriggerRequestRequest$zodSchema.parse(value$), "Input validation failed", ); if (!parsed$.ok) { return [parsed$, { status: "invalid" }]; } const payload$ = parsed$.value; - const body$ = encodeJSON("body", payload$.RequestBody, { explode: true }); + const body$ = encodeJSON("body", payload$.test_trigger_request, { + explode: true, + }); const pathParams$ = { cloud_name: encodeSimple("cloud_name", client$._options.cloud_name, { diff --git a/src/funcs/triggersUpdateTrigger.ts b/src/funcs/triggersUpdateTrigger.ts index 56c59fc..087acf6 100644 --- a/src/funcs/triggersUpdateTrigger.ts +++ b/src/funcs/triggersUpdateTrigger.ts @@ -19,10 +19,10 @@ import { } from "../models/errors/httpclienterrors.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { - UpdateTriggerRequest, - UpdateTriggerRequest$zodSchema, - UpdateTriggerRequestBody, + UpdateTriggerRequestRequest, + UpdateTriggerRequestRequest$zodSchema, } from "../models/updatetriggerop.js"; +import { UpdateTriggerRequest } from "../models/updatetriggerrequest.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -35,7 +35,7 @@ import { Result } from "../types/fp.js"; export function triggersUpdateTrigger( client$: CloudinaryEnvConfigCore, id: string, - RequestBody: UpdateTriggerRequestBody, + update_trigger_request: UpdateTriggerRequest, options?: RequestOptions, ): APIPromise< Result< @@ -52,7 +52,7 @@ export function triggersUpdateTrigger( return new APIPromise($do( client$, id, - RequestBody, + update_trigger_request, options, )); } @@ -60,7 +60,7 @@ export function triggersUpdateTrigger( async function $do( client$: CloudinaryEnvConfigCore, id: string, - RequestBody: UpdateTriggerRequestBody, + update_trigger_request: UpdateTriggerRequest, options?: RequestOptions, ): Promise< [ @@ -77,21 +77,23 @@ async function $do( APICall, ] > { - const input$: UpdateTriggerRequest = { + const input$: UpdateTriggerRequestRequest = { id: id, - RequestBody: RequestBody, + update_trigger_request: update_trigger_request, }; const parsed$ = safeParse( input$, - (value$) => UpdateTriggerRequest$zodSchema.parse(value$), + (value$) => UpdateTriggerRequestRequest$zodSchema.parse(value$), "Input validation failed", ); if (!parsed$.ok) { return [parsed$, { status: "invalid" }]; } const payload$ = parsed$.value; - const body$ = encodeJSON("body", payload$.RequestBody, { explode: true }); + const body$ = encodeJSON("body", payload$.update_trigger_request, { + explode: true, + }); const pathParams$ = { cloud_name: encodeSimple("cloud_name", client$._options.cloud_name, { diff --git a/src/funcs/uploadMappingsCreateUploadMapping.ts b/src/funcs/uploadMappingsCreateUploadMapping.ts index 4b64d19..1e40627 100644 --- a/src/funcs/uploadMappingsCreateUploadMapping.ts +++ b/src/funcs/uploadMappingsCreateUploadMapping.ts @@ -9,10 +9,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; -import { - CreateUploadMappingRequest, - CreateUploadMappingRequest$zodSchema, -} from "../models/createuploadmappingop.js"; import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, @@ -22,6 +18,10 @@ import { UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { + UploadMappingInput, + UploadMappingInput$zodSchema, +} from "../models/uploadmappinginput.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -33,7 +33,7 @@ import { Result } from "../types/fp.js"; */ export function uploadMappingsCreateUploadMapping( client$: CloudinaryEnvConfigCore, - request: CreateUploadMappingRequest, + request: UploadMappingInput, options?: RequestOptions, ): APIPromise< Result< @@ -56,7 +56,7 @@ export function uploadMappingsCreateUploadMapping( async function $do( client$: CloudinaryEnvConfigCore, - request: CreateUploadMappingRequest, + request: UploadMappingInput, options?: RequestOptions, ): Promise< [ @@ -75,7 +75,7 @@ async function $do( > { const parsed$ = safeParse( request, - (value$) => CreateUploadMappingRequest$zodSchema.parse(value$), + (value$) => UploadMappingInput$zodSchema.parse(value$), "Input validation failed", ); if (!parsed$.ok) { diff --git a/src/funcs/uploadMappingsReplaceUploadMappings.ts b/src/funcs/uploadMappingsReplaceUploadMappings.ts index 2326b8e..b3507f5 100644 --- a/src/funcs/uploadMappingsReplaceUploadMappings.ts +++ b/src/funcs/uploadMappingsReplaceUploadMappings.ts @@ -21,7 +21,7 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { ReplaceUploadMappingsRequest, ReplaceUploadMappingsRequest$zodSchema, -} from "../models/replaceuploadmappingsop.js"; +} from "../models/replaceuploadmappingsrequest.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; diff --git a/src/funcs/uploadMappingsUpdateUploadMapping.ts b/src/funcs/uploadMappingsUpdateUploadMapping.ts index 1eec83b..8cff170 100644 --- a/src/funcs/uploadMappingsUpdateUploadMapping.ts +++ b/src/funcs/uploadMappingsUpdateUploadMapping.ts @@ -19,21 +19,21 @@ import { } from "../models/errors/httpclienterrors.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { - UpdateUploadMappingRequest, - UpdateUploadMappingRequest$zodSchema, -} from "../models/updateuploadmappingop.js"; + UploadMappingInput, + UploadMappingInput$zodSchema, +} from "../models/uploadmappinginput.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Updates an existing upload mapping by changing its remote URL template for a given + * Updates an existing upload mapping by changing its remote URL template for a given folder * * @remarks * Updates the URL template for an existing folder mapping */ export function uploadMappingsUpdateUploadMapping( client$: CloudinaryEnvConfigCore, - request: UpdateUploadMappingRequest, + request: UploadMappingInput, options?: RequestOptions, ): APIPromise< Result< @@ -56,7 +56,7 @@ export function uploadMappingsUpdateUploadMapping( async function $do( client$: CloudinaryEnvConfigCore, - request: UpdateUploadMappingRequest, + request: UploadMappingInput, options?: RequestOptions, ): Promise< [ @@ -75,7 +75,7 @@ async function $do( > { const parsed$ = safeParse( request, - (value$) => UpdateUploadMappingRequest$zodSchema.parse(value$), + (value$) => UploadMappingInput$zodSchema.parse(value$), "Input validation failed", ); if (!parsed$.ok) { diff --git a/src/funcs/uploadPresetsCreateUploadPreset.ts b/src/funcs/uploadPresetsCreateUploadPreset.ts index 9a13622..7424eaa 100644 --- a/src/funcs/uploadPresetsCreateUploadPreset.ts +++ b/src/funcs/uploadPresetsCreateUploadPreset.ts @@ -19,9 +19,9 @@ import { } from "../models/errors/httpclienterrors.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { - UploadPreset, - UploadPreset$zodSchema, -} from "../models/uploadpreset.js"; + UploadPresetInput, + UploadPresetInput$zodSchema, +} from "../models/uploadpresetinput.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -30,7 +30,7 @@ import { Result } from "../types/fp.js"; */ export function uploadPresetsCreateUploadPreset( client$: CloudinaryEnvConfigCore, - request: UploadPreset, + request: UploadPresetInput, options?: RequestOptions, ): APIPromise< Result< @@ -53,7 +53,7 @@ export function uploadPresetsCreateUploadPreset( async function $do( client$: CloudinaryEnvConfigCore, - request: UploadPreset, + request: UploadPresetInput, options?: RequestOptions, ): Promise< [ @@ -72,7 +72,7 @@ async function $do( > { const parsed$ = safeParse( request, - (value$) => UploadPreset$zodSchema.parse(value$), + (value$) => UploadPresetInput$zodSchema.parse(value$), "Input validation failed", ); if (!parsed$.ok) { diff --git a/src/funcs/uploadPresetsListUploadPresets.ts b/src/funcs/uploadPresetsListUploadPresets.ts index ca67b15..ea2e81e 100644 --- a/src/funcs/uploadPresetsListUploadPresets.ts +++ b/src/funcs/uploadPresetsListUploadPresets.ts @@ -9,6 +9,7 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { DirectionEnum } from "../models/directionenum.js"; import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, @@ -19,7 +20,6 @@ import { } from "../models/errors/httpclienterrors.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { - Direction, ListUploadPresetsRequest, ListUploadPresetsRequest$zodSchema, OrderBy, @@ -33,7 +33,8 @@ import { Result } from "../types/fp.js"; export function uploadPresetsListUploadPresets( client$: CloudinaryEnvConfigCore, order_by?: OrderBy | undefined, - direction?: Direction | undefined, + direction?: DirectionEnum | undefined, + max_results?: number | undefined, next_cursor?: string | undefined, options?: RequestOptions, ): APIPromise< @@ -52,6 +53,7 @@ export function uploadPresetsListUploadPresets( client$, order_by, direction, + max_results, next_cursor, options, )); @@ -60,7 +62,8 @@ export function uploadPresetsListUploadPresets( async function $do( client$: CloudinaryEnvConfigCore, order_by?: OrderBy | undefined, - direction?: Direction | undefined, + direction?: DirectionEnum | undefined, + max_results?: number | undefined, next_cursor?: string | undefined, options?: RequestOptions, ): Promise< @@ -81,6 +84,7 @@ async function $do( const input$: ListUploadPresetsRequest | undefined = { order_by: order_by, direction: direction, + max_results: max_results, next_cursor: next_cursor, }; @@ -106,6 +110,7 @@ async function $do( ); const query$ = encodeFormQuery({ "direction": payload$?.direction, + "max_results": payload$?.max_results, "next_cursor": payload$?.next_cursor, "order_by": payload$?.order_by, }); diff --git a/src/funcs/uploadPresetsUpdateUploadPreset.ts b/src/funcs/uploadPresetsUpdateUploadPreset.ts index 9ca956c..b90c11d 100644 --- a/src/funcs/uploadPresetsUpdateUploadPreset.ts +++ b/src/funcs/uploadPresetsUpdateUploadPreset.ts @@ -22,7 +22,7 @@ import { UpdateUploadPresetRequest, UpdateUploadPresetRequest$zodSchema, } from "../models/updateuploadpresetop.js"; -import { UploadPreset } from "../models/uploadpreset.js"; +import { UploadPresetInput } from "../models/uploadpresetinput.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -32,7 +32,7 @@ import { Result } from "../types/fp.js"; export function uploadPresetsUpdateUploadPreset( client$: CloudinaryEnvConfigCore, name: string, - upload_preset: UploadPreset, + upload_preset_input: UploadPresetInput, options?: RequestOptions, ): APIPromise< Result< @@ -49,7 +49,7 @@ export function uploadPresetsUpdateUploadPreset( return new APIPromise($do( client$, name, - upload_preset, + upload_preset_input, options, )); } @@ -57,7 +57,7 @@ export function uploadPresetsUpdateUploadPreset( async function $do( client$: CloudinaryEnvConfigCore, name: string, - upload_preset: UploadPreset, + upload_preset_input: UploadPresetInput, options?: RequestOptions, ): Promise< [ @@ -76,7 +76,7 @@ async function $do( > { const input$: UpdateUploadPresetRequest = { name: name, - upload_preset: upload_preset, + upload_preset_input: upload_preset_input, }; const parsed$ = safeParse( @@ -88,7 +88,9 @@ async function $do( return [parsed$, { status: "invalid" }]; } const payload$ = parsed$.value; - const body$ = encodeJSON("body", payload$.upload_preset, { explode: true }); + const body$ = encodeJSON("body", payload$.upload_preset_input, { + explode: true, + }); const pathParams$ = { cloud_name: encodeSimple("cloud_name", client$._options.cloud_name, { diff --git a/src/landing-page.ts b/src/landing-page.ts index a03d8ff..85dfcdd 100644 --- a/src/landing-page.ts +++ b/src/landing-page.ts @@ -18,8 +18,14 @@ export function landingPage(req: Request): Response { // express wrapper export function landingPageExpress(req: ExpressRequest, res: ExpressResponse) { - const origin = new URL(req.host).href; - res.type("html").send(landingPageHTML(origin)); + const proto = req.get("x-forwarded-proto")?.split(",")[0]?.trim() + || req.protocol; + const host = req.get("host"); + if (!host) { + res.status(400).send("Missing Host header"); + return; + } + res.type("html").send(landingPageHTML(`${proto}://${host}`)); } export function landingPageHTML(origin: string): string { @@ -932,7 +938,7 @@ http_headers = { "api-key" = "YOUR_API_KEY", "api-secret" = "YOUR_API_SECRET", "

Instructions

One-click installation for Claude Desktop users

diff --git a/src/lib/config.ts b/src/lib/config.ts index b18e4b8..9409a6b 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -111,9 +111,9 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", - openapiDocVersion: "0.4.0", - sdkVersion: "0.6.0", - genVersion: "2.865.2", + openapiDocVersion: "0.5.5", + sdkVersion: "0.7.0", + genVersion: "2.889.1", userAgent: - "speakeasy-sdk/mcp-typescript 0.6.0 2.865.2 0.4.0 @cloudinary/environment-config-mcp", + "speakeasy-sdk/mcp-typescript 0.7.0 2.889.1 0.5.5 @cloudinary/environment-config-mcp", } as const; diff --git a/src/lib/encodings.ts b/src/lib/encodings.ts index c769289..caa16bb 100644 --- a/src/lib/encodings.ts +++ b/src/lib/encodings.ts @@ -474,6 +474,23 @@ export const encodeSpaceDelimitedQuery = queryEncoder(encodeSpaceDelimited); export const encodePipeDelimitedQuery = queryEncoder(encodePipeDelimited); export const encodeDeepObjectQuery = queryEncoder(encodeDeepObject); +function isBlobLike(val: unknown): val is Blob { + if (val instanceof Blob) { + return true; + } + + if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) { + return false; + } + + const tag = val[Symbol.toStringTag]; + if (tag !== "Blob" && tag !== "File") { + return false; + } + + return "stream" in val && typeof val.stream === "function"; +} + export function appendForm( fd: FormData, key: string, @@ -482,11 +499,22 @@ export function appendForm( ): void { if (value == null) { return; - } else if (value instanceof Blob && fileName) { - fd.append(key, value, fileName); - } else if (value instanceof Blob) { - fd.append(key, value); + } else if (isBlobLike(value)) { + if (fileName) { + fd.append(key, value as Blob, fileName); + } else { + fd.append(key, value as Blob); + } } else { fd.append(key, String(value)); } } + +export async function normalizeBlob( + value: Pick, +): Promise { + if (value instanceof Blob) { + return value; + } + return new Blob([await value.arrayBuffer()], { type: value.type }); +} diff --git a/src/lib/files.ts b/src/lib/files.ts index 0344cd0..6ca6b37 100644 --- a/src/lib/files.ts +++ b/src/lib/files.ts @@ -80,3 +80,25 @@ export function getContentTypeFromFileName(fileName: string): string | null { return mimeTypes[ext] || null; } + +/** + * Creates a Blob from file content with the given MIME type. + * + * Node.js Buffers are Uint8Array subclasses that may share a pooled + * ArrayBuffer (byteOffset > 0, byteLength < buffer.byteLength). Passing + * such a Buffer directly to `new Blob([buf])` can include the entire + * underlying pool on some runtimes, producing a Blob with extra bytes + * that corrupts multipart uploads. + * + * Copying into a standalone Uint8Array ensures the Blob receives only the + * intended bytes regardless of runtime behaviour. + */ +export function bytesToBlob( + content: Uint8Array | ArrayBuffer | Blob | string, + contentType: string, +): Blob { + if (content instanceof Uint8Array) { + return new Blob([new Uint8Array(content)], { type: contentType }); + } + return new Blob([content as BlobPart], { type: contentType }); +} diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index 3f69f7a..f30f835 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -383,8 +383,6 @@ async function logResponse( break; case matchContentType(res, "application/jsonl") || jsonlLikeContentTypeRE.test(ct): - logger.log(await res.clone().text()); - break; case matchContentType(res, "text/event-stream"): logger.log(`<${contentType}>`); break; diff --git a/src/lib/security.ts b/src/lib/security.ts index 8eefaf4..ba1aef1 100644 --- a/src/lib/security.ts +++ b/src/lib/security.ts @@ -240,8 +240,9 @@ function applyBearer( } export function resolveGlobalSecurity( security: Partial | null | undefined, + allowedFields?: number[], ): SecurityState | null { - return resolveSecurity( + let inputs: SecurityInput[][] = [ [ { type: "http:custom", @@ -260,7 +261,18 @@ export function resolveGlobalSecurity( value: security?.oauth2 || env().CLOUDINARY_OAUTH2, }, ], - ); + ]; + + if (allowedFields) { + inputs = allowedFields.map((i) => { + if (i < 0 || i >= inputs.length) { + throw new RangeError(`invalid allowedFields index ${i}`); + } + return inputs[i]!; + }); + } + + return resolveSecurity(...inputs); } export async function extractSecurity< diff --git a/src/mcp-server/build.mts b/src/mcp-server/build.mts index e8114fb..1cdf897 100644 --- a/src/mcp-server/build.mts +++ b/src/mcp-server/build.mts @@ -1,7 +1,7 @@ /// import { build } from "bun"; -import { chmod, readFile, writeFile } from "node:fs/promises"; +import { chmod, cp, mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises"; import { packExtension } from "@anthropic-ai/mcpb"; import { join } from "node:path"; import { createMCPServer } from "./server.ts"; @@ -45,10 +45,10 @@ export const toolNames: Array<{ name: string; description: string }>= ${JSON.str await build({ entrypoints: [entrypoint], outdir: destinationDir, - sourcemap: "linked", + sourcemap: shouldPack ? "none" : "linked", target: "node", format: "esm", - minify: false, + minify: shouldPack, throw: true, banner: "#!/usr/bin/env node", }); @@ -59,11 +59,32 @@ export const toolNames: Array<{ name: string; description: string }>= ${JSON.str // Build the MCP bundle file if (shouldPack) { + // Stage only the files needed for distribution to avoid bloated bundles. + // Without this, packExtension would include node_modules and source files. + const stageDir = ".mcpb-stage"; + await mkdir(join(stageDir, "bin"), { recursive: true }); + await cp( + join(destinationDir, "mcp-server.js"), + join(stageDir, "bin", "mcp-server.js"), + ); + await cp("manifest.json", join(stageDir, "manifest.json")); + + // Copy icon and screenshot assets if they exist + const assetExts = [".png", ".jpg", ".jpeg", ".gif", ".webp"]; + for (const file of await readdir(".")) { + if (assetExts.some((ext) => file.toLowerCase().endsWith(ext))) { + await cp(file, join(stageDir, file)); + } + } + await packExtension({ - extensionPath: ".", + extensionPath: stageDir, outputPath: "./mcp-server.mcpb", silent: false, }); + + // Clean up staging directory + await rm(stageDir, { recursive: true, force: true }); } } diff --git a/src/mcp-server/cli/serve/command.ts b/src/mcp-server/cli/serve/command.ts index 2b45a28..a3fea56 100644 --- a/src/mcp-server/cli/serve/command.ts +++ b/src/mcp-server/cli/serve/command.ts @@ -41,10 +41,17 @@ export const serveCommand = buildCommand({ mode: { kind: "enum", brief: - "Server mode (dynamic: expose list_tools, describe_tool, and execute_tool instead of individual tools)", + "Server mode (dynamic: expose list_tools, describe_tool_input, and execute_tool instead of individual tools)", values: ["dynamic"], optional: true, }, + "tool-annotations": { + kind: "parsed", + brief: + "Filter tools by annotations (comma-separated: readOnly, destructive, idempotent, openWorld). Listed = required true, unlisted = required false.", + optional: true, + parse: (value) => value.split(",").map(s => s.trim()), + }, scope: { kind: "enum", brief: "Mount tools/resources that match given scope (repeatable flag)", diff --git a/src/mcp-server/cli/serve/impl.ts b/src/mcp-server/cli/serve/impl.ts index 75ff118..4f96eaa 100644 --- a/src/mcp-server/cli/serve/impl.ts +++ b/src/mcp-server/cli/serve/impl.ts @@ -12,6 +12,7 @@ import { } from "../../console-logger.js"; import { MCPServerFlags } from "../../flags.js"; import { createMCPServer } from "../../server.js"; +import { buildAnnotationFilter } from "../../tools.js"; import { buildSDK } from "../../tools.js"; import { landingPageExpress } from "../../../landing-page.js"; @@ -39,7 +40,7 @@ async function startStreamableHTTP(cliFlags: ServeCommandFlags) { app.use((req, res, next) => { res.header("Access-Control-Allow-Origin", "*"); res.header("Access-Control-Allow-Methods", "GET, POST, OPTIONS"); - res.header("Access-Control-Allow-Headers", "Content-Type, *"); + res.header("Access-Control-Allow-Headers", "*"); if (req.method === "OPTIONS") { res.sendStatus(204); return; @@ -65,6 +66,7 @@ async function startStreamableHTTP(cliFlags: ServeCommandFlags) { logger, allowedTools: cliFlags.tool, dynamic: cliFlags.mode === "dynamic", + annotationFilter: buildAnnotationFilter(cliFlags["tool-annotations"]), scopes: cliFlags.scope, serverURL: cliFlags["server-url"], getSDK: () => diff --git a/src/mcp-server/cli/start/command.ts b/src/mcp-server/cli/start/command.ts index afbaa41..5d5da61 100644 --- a/src/mcp-server/cli/start/command.ts +++ b/src/mcp-server/cli/start/command.ts @@ -41,10 +41,17 @@ export const startCommand = buildCommand({ mode: { kind: "enum", brief: - "Server mode (dynamic: expose list_tools, describe_tool, and execute_tool instead of individual tools)", + "Server mode (dynamic: expose list_tools, describe_tool_input, and execute_tool instead of individual tools)", values: ["dynamic"], optional: true, }, + "tool-annotations": { + kind: "parsed", + brief: + "Filter tools by annotations (comma-separated: readOnly, destructive, idempotent, openWorld). Listed = required true, unlisted = required false.", + optional: true, + parse: (value) => value.split(",").map(s => s.trim()), + }, scope: { kind: "enum", brief: "Mount tools/resources that match given scope (repeatable flag)", diff --git a/src/mcp-server/cli/start/impl.ts b/src/mcp-server/cli/start/impl.ts index 5829009..2abb805 100644 --- a/src/mcp-server/cli/start/impl.ts +++ b/src/mcp-server/cli/start/impl.ts @@ -12,6 +12,7 @@ import { } from "../../console-logger.js"; import { MCPServerFlags } from "../../flags.js"; import { createMCPServer } from "../../server.js"; +import { buildAnnotationFilter } from "../../tools.js"; import { landingPageExpress } from "../../../landing-page.js"; @@ -52,6 +53,7 @@ async function startStdio(flags: StartCommandFlags) { logger, allowedTools: flags.tool, dynamic: flags.mode === "dynamic", + annotationFilter: buildAnnotationFilter(flags["tool-annotations"]), scopes: flags.scope, security: { cloudinaryAuth: flags["api-key"] != null && flags["api-secret"] != null @@ -116,6 +118,7 @@ async function startSSE(cliFlags: StartCommandFlags) { logger, allowedTools: flags.tool, dynamic: flags.mode === "dynamic", + annotationFilter: buildAnnotationFilter(flags["tool-annotations"]), scopes: flags.scope, security: { cloudinaryAuth: flags["api-key"] != null && flags["api-secret"] != null diff --git a/src/mcp-server/flags.ts b/src/mcp-server/flags.ts index 3eb7f53..441c1ce 100644 --- a/src/mcp-server/flags.ts +++ b/src/mcp-server/flags.ts @@ -12,6 +12,7 @@ import { MCPScope } from "./scopes.js"; export interface MCPServerFlags { readonly tool?: string[]; readonly mode?: "dynamic" | undefined; + readonly "tool-annotations"?: string[] | undefined; readonly scope?: MCPScope[]; readonly "api-key"?: string | undefined; readonly "api-secret"?: string | undefined; diff --git a/src/mcp-server/mcp-server.ts b/src/mcp-server/mcp-server.ts index 68d8c1c..9527332 100644 --- a/src/mcp-server/mcp-server.ts +++ b/src/mcp-server/mcp-server.ts @@ -21,7 +21,7 @@ const routes = buildRouteMap({ export const app = buildApplication(routes, { name: "mcp", versionInfo: { - currentVersion: "0.6.0", + currentVersion: "0.7.0", }, }); diff --git a/src/mcp-server/server.ts b/src/mcp-server/server.ts index 9e7adaf..e22cfa6 100644 --- a/src/mcp-server/server.ts +++ b/src/mcp-server/server.ts @@ -12,7 +12,11 @@ import { createRegisterResourceTemplate, } from "./resources.js"; import { MCPScope } from "./scopes.js"; -import { createRegisterTool, registerDynamicTools } from "./tools.js"; +import { + createRegisterTool, + MCPToolAnnotationFilter, + registerDynamicTools, +} from "./tools.js"; import { tool$streamingProfilesCreateStreamingProfile } from "./tools/streamingProfilesCreateStreamingProfile.js"; import { tool$streamingProfilesDeleteStreamingProfile } from "./tools/streamingProfilesDeleteStreamingProfile.js"; import { tool$streamingProfilesGetStreamingProfile } from "./tools/streamingProfilesGetStreamingProfile.js"; @@ -43,6 +47,7 @@ export function createMCPServer(deps: { allowedTools?: string[] | undefined; dynamic?: boolean | undefined; scopes?: MCPScope[] | undefined; + annotationFilter?: MCPToolAnnotationFilter | undefined; getSDK?: () => CloudinaryEnvConfigCore; serverURL?: string | undefined; security?: SDKOptions["security"] | undefined; @@ -53,7 +58,7 @@ export function createMCPServer(deps: { }) { const server = new McpServer({ name: "CloudinaryEnvConfig", - version: "0.6.0", + version: "0.7.0", }); const getClient = deps.getSDK || (() => @@ -83,6 +88,7 @@ export function createMCPServer(deps: { scopes, allowedTools, deps.dynamic, + deps.annotationFilter, ); const resource = createRegisterResource( deps.logger, diff --git a/src/mcp-server/tools.ts b/src/mcp-server/tools.ts index 3190915..bb4188d 100644 --- a/src/mcp-server/tools.ts +++ b/src/mcp-server/tools.ts @@ -21,6 +21,50 @@ import { MCPServerFlags } from "./flags.js"; import { MCPScope, mcpScopes } from "./scopes.js"; import { valueToBase64 } from "./shared.js"; +export type MCPToolAnnotationFilter = { + readOnlyHint?: boolean; + destructiveHint?: boolean; + idempotentHint?: boolean; + openWorldHint?: boolean; +}; + +const VALID_ANNOTATIONS = [ + "readOnly", + "destructive", + "idempotent", + "openWorld", +] as const; +type AnnotationName = typeof VALID_ANNOTATIONS[number]; + +const annotationToKey: Record = { + readOnly: "readOnlyHint", + destructive: "destructiveHint", + idempotent: "idempotentHint", + openWorld: "openWorldHint", +}; + +export function buildAnnotationFilter( + annotations: string[] | undefined, +): MCPToolAnnotationFilter { + const filter: MCPToolAnnotationFilter = {}; + if (!annotations || annotations.length === 0) { + return filter; + } + for (const a of annotations) { + if (!VALID_ANNOTATIONS.includes(a as AnnotationName)) { + throw new Error( + `Invalid annotation filter: "${a}". Valid values are: ${ + VALID_ANNOTATIONS.join(", ") + }`, + ); + } + } + for (const name of VALID_ANNOTATIONS) { + filter[annotationToKey[name]] = annotations.includes(name); + } + return filter; +} + export type ToolDefinition< Args extends undefined | ZodRawShapeCompat = undefined, > = Args extends ZodRawShapeCompat ? { @@ -91,6 +135,7 @@ export function createRegisterTool( allowedScopes: Set, allowedTools?: Set, dynamic?: boolean, + annotationFilter?: MCPToolAnnotationFilter, ): [ (tool: ToolDefinition) => void, Array<{ name: string; description: string }>, @@ -120,6 +165,34 @@ export function createRegisterTool( return; } + if (annotationFilter) { + const a = tool.annotations; + if ( + annotationFilter.readOnlyHint !== undefined + && a.readOnlyHint !== annotationFilter.readOnlyHint + ) { + return; + } + if ( + annotationFilter.destructiveHint !== undefined + && a.destructiveHint !== annotationFilter.destructiveHint + ) { + return; + } + if ( + annotationFilter.idempotentHint !== undefined + && a.idempotentHint !== annotationFilter.idempotentHint + ) { + return; + } + if ( + annotationFilter.openWorldHint !== undefined + && a.openWorldHint !== annotationFilter.openWorldHint + ) { + return; + } + } + toolMap.set( tool.name, tool as ToolDefinition, @@ -286,16 +359,16 @@ export function registerDynamicTools( return { content: [{ type: "text", text: parts.join("\n\n") }] }; }); - logger.debug("Registered dynamic meta-tool", { name: "describe_tool" }); + logger.debug("Registered dynamic meta-tool", { name: "describe_tool_input" }); // 3. execute_tool server.registerTool("execute_tool", { description: - "Execute a tool by name with the provided input parameters. If executing a given tool for the first time, it is recommended to call describe_tool_input first to understand the expected input schema.", + "Execute a tool by name with its arguments. If executing a given tool for the first time, it is recommended to call describe_tool_input first to understand the expected `arguments` shape.", inputSchema: { - tool_name: z.string().describe("The name of the tool to execute"), - input: z.record(z.string(), z.unknown()).optional().describe( - "Input parameters for the tool as a JSON object", + name: z.string().describe("The name of the tool to execute"), + arguments: z.looseObject({}).optional().describe( + "Arguments for the target tool as a JSON object, matching the schema returned by describe_tool_input.", ), }, annotations: { @@ -306,17 +379,17 @@ export function registerDynamicTools( openWorldHint: true, }, }, async (args, ctx) => { - const def = toolMap.get(args.tool_name); + const def = toolMap.get(args.name); if (!def) { return { - content: [{ type: "text", text: `Unknown tool: ${args.tool_name}` }], + content: [{ type: "text", text: `Unknown tool: ${args.name}` }], isError: true, }; } let validatedInput: Record = {}; if (def.args) { - const vres = z.object(def.args).safeParse(args.input ?? {}); + const vres = z.object(def.args).safeParse(args.arguments ?? {}); if (vres.success) { validatedInput = vres.data; } else { @@ -326,7 +399,7 @@ export function registerDynamicTools( content: [{ type: "text", text: - `Invalid input for tool ${args.tool_name}:\n\n${issues}\n`, + `Invalid input for tool ${args.name}:\n\n${issues}\n`, }], isError: true, }; @@ -344,7 +417,7 @@ export function registerDynamicTools( return { content: [{ type: "text", - text: `Error executing tool ${args.tool_name}: ${message}`, + text: `Error executing tool ${args.name}: ${message}`, }], isError: true, }; diff --git a/src/mcp-server/tools/streamingProfilesCreateStreamingProfile.ts b/src/mcp-server/tools/streamingProfilesCreateStreamingProfile.ts index e663cac..8df3237 100644 --- a/src/mcp-server/tools/streamingProfilesCreateStreamingProfile.ts +++ b/src/mcp-server/tools/streamingProfilesCreateStreamingProfile.ts @@ -7,7 +7,9 @@ import { StreamingProfileCreate$zodSchema } from "../../models/streamingprofilec import { formatResult, ToolDefinition } from "../tools.js"; const args = { - request: StreamingProfileCreate$zodSchema, + request: StreamingProfileCreate$zodSchema.describe( + `The streaming profile configuration.`, + ), }; export const tool$streamingProfilesCreateStreamingProfile: ToolDefinition< diff --git a/src/mcp-server/tools/streamingProfilesDeleteStreamingProfile.ts b/src/mcp-server/tools/streamingProfilesDeleteStreamingProfile.ts index b0acbd3..3e3d149 100644 --- a/src/mcp-server/tools/streamingProfilesDeleteStreamingProfile.ts +++ b/src/mcp-server/tools/streamingProfilesDeleteStreamingProfile.ts @@ -7,7 +7,7 @@ import { streamingProfilesDeleteStreamingProfile } from "../../funcs/streamingPr import { formatResult, ToolDefinition } from "../tools.js"; const args = { - name: z.string(), + name: z.string().describe("The name of the streaming profile."), }; export const tool$streamingProfilesDeleteStreamingProfile: ToolDefinition< diff --git a/src/mcp-server/tools/streamingProfilesGetStreamingProfile.ts b/src/mcp-server/tools/streamingProfilesGetStreamingProfile.ts index f0aee2f..c1e8751 100644 --- a/src/mcp-server/tools/streamingProfilesGetStreamingProfile.ts +++ b/src/mcp-server/tools/streamingProfilesGetStreamingProfile.ts @@ -7,7 +7,7 @@ import { streamingProfilesGetStreamingProfile } from "../../funcs/streamingProfi import { formatResult, ToolDefinition } from "../tools.js"; const args = { - name: z.string(), + name: z.string().describe("The name of the streaming profile."), }; export const tool$streamingProfilesGetStreamingProfile: ToolDefinition< diff --git a/src/mcp-server/tools/streamingProfilesUpdateStreamingProfile.ts b/src/mcp-server/tools/streamingProfilesUpdateStreamingProfile.ts index 7a3bb84..5a9046a 100644 --- a/src/mcp-server/tools/streamingProfilesUpdateStreamingProfile.ts +++ b/src/mcp-server/tools/streamingProfilesUpdateStreamingProfile.ts @@ -8,8 +8,10 @@ import { StreamingProfileUpdate$zodSchema } from "../../models/streamingprofileu import { formatResult, ToolDefinition } from "../tools.js"; const args = { - name: z.string(), - streaming_profile_update: StreamingProfileUpdate$zodSchema, + name: z.string().describe("The name of the streaming profile."), + streaming_profile_update: StreamingProfileUpdate$zodSchema.describe( + `The updated streaming profile configuration.`, + ), }; export const tool$streamingProfilesUpdateStreamingProfile: ToolDefinition< diff --git a/src/mcp-server/tools/transformationsCreateTransformation.ts b/src/mcp-server/tools/transformationsCreateTransformation.ts index bd18093..eb119bf 100644 --- a/src/mcp-server/tools/transformationsCreateTransformation.ts +++ b/src/mcp-server/tools/transformationsCreateTransformation.ts @@ -9,9 +9,11 @@ import { formatResult, ToolDefinition } from "../tools.js"; const args = { transformation: z.string().describe( - "The valid transformation name to create.\n", + "The valid transformation name to create.", + ), + create_request: CreateRequest$zodSchema.describe( + `The named transformation definition.`, ), - create_request: CreateRequest$zodSchema, }; export const tool$transformationsCreateTransformation: ToolDefinition< @@ -19,7 +21,7 @@ export const tool$transformationsCreateTransformation: ToolDefinition< > = { name: "create-transformation", description: - `Creates a new named transformation (assigning a custom name to a set of transformation + `Creates a new named transformation by assigning a custom name to a set of transformation parameters Creates a new named transformation with the given name and transformation string. `, diff --git a/src/mcp-server/tools/transformationsListTransformations.ts b/src/mcp-server/tools/transformationsListTransformations.ts index 45fc30e..7b6b146 100644 --- a/src/mcp-server/tools/transformationsListTransformations.ts +++ b/src/mcp-server/tools/transformationsListTransformations.ts @@ -23,7 +23,7 @@ export const tool$transformationsListTransformations: ToolDefinition< > = { name: "list-transformations", description: - `Lists all transformation definitions in your account (including named transformations + `Lists all transformation definitions in your account, including named transformations Retrieves a list of all transformations, which can be filtered to show either only named or unnamed transformations. `, diff --git a/src/mcp-server/tools/transformationsUpdateTransformation.ts b/src/mcp-server/tools/transformationsUpdateTransformation.ts index aa04c54..ee17f25 100644 --- a/src/mcp-server/tools/transformationsUpdateTransformation.ts +++ b/src/mcp-server/tools/transformationsUpdateTransformation.ts @@ -11,16 +11,18 @@ const args = { transformation: z.string().describe( "The transformation identifier. Can be either a named transformation (e.g., 'small_profile_thumbnail') or a transformation string (e.g., 'w_100,h_150,c_fill,g_auto').\n", ), - update_request: UpdateRequest$zodSchema, + update_request: UpdateRequest$zodSchema.describe( + `The updated transformation definition.`, + ), }; export const tool$transformationsUpdateTransformation: ToolDefinition< typeof args > = { name: "update-transformation", - description: `Updates the definition of an existing named transformation + description: `Updates the definition of an existing transformation -Update an existing named or unnamed transformation. +Updates a named or unnamed transformation. `, scopes: ["admin"], annotations: { diff --git a/src/mcp-server/tools/triggersCreateTrigger.ts b/src/mcp-server/tools/triggersCreateTrigger.ts index 0c46966..334da4b 100644 --- a/src/mcp-server/tools/triggersCreateTrigger.ts +++ b/src/mcp-server/tools/triggersCreateTrigger.ts @@ -3,11 +3,13 @@ */ import { triggersCreateTrigger } from "../../funcs/triggersCreateTrigger.js"; -import { CreateTriggerRequest$zodSchema } from "../../models/createtriggerop.js"; +import { CreateTriggerRequest$zodSchema } from "../../models/createtriggerrequest.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { - request: CreateTriggerRequest$zodSchema, + request: CreateTriggerRequest$zodSchema.describe( + `The webhook notification trigger to create.`, + ), }; export const tool$triggersCreateTrigger: ToolDefinition = { diff --git a/src/mcp-server/tools/triggersDeleteTrigger.ts b/src/mcp-server/tools/triggersDeleteTrigger.ts index ff7f806..d200ace 100644 --- a/src/mcp-server/tools/triggersDeleteTrigger.ts +++ b/src/mcp-server/tools/triggersDeleteTrigger.ts @@ -7,7 +7,7 @@ import { triggersDeleteTrigger } from "../../funcs/triggersDeleteTrigger.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { - id: z.string(), + id: z.string().describe("The ID of the trigger."), }; export const tool$triggersDeleteTrigger: ToolDefinition = { diff --git a/src/mcp-server/tools/triggersListTrigger.ts b/src/mcp-server/tools/triggersListTrigger.ts index af27013..a62f128 100644 --- a/src/mcp-server/tools/triggersListTrigger.ts +++ b/src/mcp-server/tools/triggersListTrigger.ts @@ -2,20 +2,20 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; import { triggersListTrigger } from "../../funcs/triggersListTrigger.js"; +import { EventType$zodSchema } from "../../models/eventtype.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { - event_type: z.string().describe( - "The type of event that will trigger the notification response.", - ).optional(), + event_type: EventType$zodSchema.optional().describe( + `The type of event that will trigger the notification response.`, + ), }; export const tool$triggersListTrigger: ToolDefinition = { name: "list-triggers", description: - `Lists all webhook notification triggers configured for your product environmentcloudinary + `Lists all webhook notification triggers configured for your product environment Retrieves a list of all event triggers and notifications within your product environment. `, diff --git a/src/mcp-server/tools/triggersTestTrigger.ts b/src/mcp-server/tools/triggersTestTrigger.ts index ac18a27..6b56194 100644 --- a/src/mcp-server/tools/triggersTestTrigger.ts +++ b/src/mcp-server/tools/triggersTestTrigger.ts @@ -4,12 +4,14 @@ import * as z from "zod"; import { triggersTestTrigger } from "../../funcs/triggersTestTrigger.js"; -import { TestTriggerRequestBody$zodSchema } from "../../models/testtriggerop.js"; +import { TestTriggerRequest$zodSchema } from "../../models/testtriggerrequest.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { - id: z.string(), - RequestBody: TestTriggerRequestBody$zodSchema.optional(), + id: z.string().describe("The ID of the trigger to test."), + test_trigger_request: TestTriggerRequest$zodSchema.optional().describe( + `The test data for the trigger.`, + ), }; export const tool$triggersTestTrigger: ToolDefinition = { @@ -23,7 +25,7 @@ Use this endpoint to verify that a trigger's filter will match expected events. annotations: { "title": "Test Trigger Filter", "destructiveHint": false, - "idempotentHint": false, + "idempotentHint": true, "openWorldHint": false, "readOnlyHint": true, }, @@ -32,7 +34,7 @@ Use this endpoint to verify that a trigger's filter will match expected events. const [result] = await triggersTestTrigger( client, args.id, - args.RequestBody, + args.test_trigger_request, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); diff --git a/src/mcp-server/tools/triggersUpdateTrigger.ts b/src/mcp-server/tools/triggersUpdateTrigger.ts index a9bb394..6f25b32 100644 --- a/src/mcp-server/tools/triggersUpdateTrigger.ts +++ b/src/mcp-server/tools/triggersUpdateTrigger.ts @@ -4,12 +4,14 @@ import * as z from "zod"; import { triggersUpdateTrigger } from "../../funcs/triggersUpdateTrigger.js"; -import { UpdateTriggerRequestBody$zodSchema } from "../../models/updatetriggerop.js"; +import { UpdateTriggerRequest$zodSchema } from "../../models/updatetriggerrequest.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { - id: z.string(), - RequestBody: UpdateTriggerRequestBody$zodSchema, + id: z.string().describe("The ID of the trigger."), + update_trigger_request: UpdateTriggerRequest$zodSchema.describe( + `The updated trigger configuration.`, + ), }; export const tool$triggersUpdateTrigger: ToolDefinition = { @@ -31,7 +33,7 @@ Updates a notification URL for a trigger.`, const [result] = await triggersUpdateTrigger( client, args.id, - args.RequestBody, + args.update_trigger_request, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); diff --git a/src/mcp-server/tools/uploadMappingsCreateUploadMapping.ts b/src/mcp-server/tools/uploadMappingsCreateUploadMapping.ts index c766477..1a94e00 100644 --- a/src/mcp-server/tools/uploadMappingsCreateUploadMapping.ts +++ b/src/mcp-server/tools/uploadMappingsCreateUploadMapping.ts @@ -3,11 +3,13 @@ */ import { uploadMappingsCreateUploadMapping } from "../../funcs/uploadMappingsCreateUploadMapping.js"; -import { CreateUploadMappingRequest$zodSchema } from "../../models/createuploadmappingop.js"; +import { UploadMappingInput$zodSchema } from "../../models/uploadmappinginput.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { - request: CreateUploadMappingRequest$zodSchema, + request: UploadMappingInput$zodSchema.describe( + `The upload mapping folder and URL template.`, + ), }; export const tool$uploadMappingsCreateUploadMapping: ToolDefinition< diff --git a/src/mcp-server/tools/uploadMappingsUpdateUploadMapping.ts b/src/mcp-server/tools/uploadMappingsUpdateUploadMapping.ts index c44c5f1..faab4be 100644 --- a/src/mcp-server/tools/uploadMappingsUpdateUploadMapping.ts +++ b/src/mcp-server/tools/uploadMappingsUpdateUploadMapping.ts @@ -3,11 +3,13 @@ */ import { uploadMappingsUpdateUploadMapping } from "../../funcs/uploadMappingsUpdateUploadMapping.js"; -import { UpdateUploadMappingRequest$zodSchema } from "../../models/updateuploadmappingop.js"; +import { UploadMappingInput$zodSchema } from "../../models/uploadmappinginput.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { - request: UpdateUploadMappingRequest$zodSchema, + request: UploadMappingInput$zodSchema.describe( + `The updated upload mapping folder and URL template.`, + ), }; export const tool$uploadMappingsUpdateUploadMapping: ToolDefinition< @@ -15,7 +17,7 @@ export const tool$uploadMappingsUpdateUploadMapping: ToolDefinition< > = { name: "update-upload-mapping", description: - `Updates an existing upload mapping by changing its remote URL template for a given + `Updates an existing upload mapping by changing its remote URL template for a given folder Updates the URL template for an existing folder mapping`, scopes: ["builder"], diff --git a/src/mcp-server/tools/uploadPresetsCreateUploadPreset.ts b/src/mcp-server/tools/uploadPresetsCreateUploadPreset.ts index 32b9d1a..06de848 100644 --- a/src/mcp-server/tools/uploadPresetsCreateUploadPreset.ts +++ b/src/mcp-server/tools/uploadPresetsCreateUploadPreset.ts @@ -3,11 +3,13 @@ */ import { uploadPresetsCreateUploadPreset } from "../../funcs/uploadPresetsCreateUploadPreset.js"; -import { UploadPreset$zodSchema } from "../../models/uploadpreset.js"; +import { UploadPresetInput$zodSchema } from "../../models/uploadpresetinput.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { - request: UploadPreset$zodSchema, + request: UploadPresetInput$zodSchema.describe( + `The upload preset configuration.`, + ), }; export const tool$uploadPresetsCreateUploadPreset: ToolDefinition = diff --git a/src/mcp-server/tools/uploadPresetsDeleteUploadPreset.ts b/src/mcp-server/tools/uploadPresetsDeleteUploadPreset.ts index 6fbf699..608b519 100644 --- a/src/mcp-server/tools/uploadPresetsDeleteUploadPreset.ts +++ b/src/mcp-server/tools/uploadPresetsDeleteUploadPreset.ts @@ -7,7 +7,7 @@ import { uploadPresetsDeleteUploadPreset } from "../../funcs/uploadPresetsDelete import { formatResult, ToolDefinition } from "../tools.js"; const args = { - name: z.string(), + name: z.string().describe("The name of the upload preset."), }; export const tool$uploadPresetsDeleteUploadPreset: ToolDefinition = diff --git a/src/mcp-server/tools/uploadPresetsGetUploadPreset.ts b/src/mcp-server/tools/uploadPresetsGetUploadPreset.ts index 8614b6b..5f9708c 100644 --- a/src/mcp-server/tools/uploadPresetsGetUploadPreset.ts +++ b/src/mcp-server/tools/uploadPresetsGetUploadPreset.ts @@ -7,7 +7,7 @@ import { uploadPresetsGetUploadPreset } from "../../funcs/uploadPresetsGetUpload import { formatResult, ToolDefinition } from "../tools.js"; const args = { - name: z.string(), + name: z.string().describe("The name of the upload preset."), }; export const tool$uploadPresetsGetUploadPreset: ToolDefinition = { diff --git a/src/mcp-server/tools/uploadPresetsListUploadPresets.ts b/src/mcp-server/tools/uploadPresetsListUploadPresets.ts index 3136e21..aee5900 100644 --- a/src/mcp-server/tools/uploadPresetsListUploadPresets.ts +++ b/src/mcp-server/tools/uploadPresetsListUploadPresets.ts @@ -4,15 +4,20 @@ import * as z from "zod"; import { uploadPresetsListUploadPresets } from "../../funcs/uploadPresetsListUploadPresets.js"; -import { - Direction$zodSchema, - OrderBy$zodSchema, -} from "../../models/listuploadpresetsop.js"; +import { DirectionEnum$zodSchema } from "../../models/directionenum.js"; +import { OrderBy$zodSchema } from "../../models/listuploadpresetsop.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { - order_by: OrderBy$zodSchema.optional(), - direction: Direction$zodSchema.optional(), + order_by: OrderBy$zodSchema.optional().describe( + `The field to sort presets by.`, + ), + direction: DirectionEnum$zodSchema.optional().describe( + `The sort direction for the results. Default is "desc".`, + ), + max_results: z.int().default(10).describe( + "The maximum number of results to return. Default is 10.", + ), next_cursor: z.string().describe( "The cursor for pagination. Use the next_cursor value from a previous response to get the next page of results.", ).optional(), @@ -36,6 +41,7 @@ export const tool$uploadPresetsListUploadPresets: ToolDefinition = client, args.order_by, args.direction, + args.max_results, args.next_cursor, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); diff --git a/src/mcp-server/tools/uploadPresetsUpdateUploadPreset.ts b/src/mcp-server/tools/uploadPresetsUpdateUploadPreset.ts index 85b2d43..d92c74e 100644 --- a/src/mcp-server/tools/uploadPresetsUpdateUploadPreset.ts +++ b/src/mcp-server/tools/uploadPresetsUpdateUploadPreset.ts @@ -4,12 +4,14 @@ import * as z from "zod"; import { uploadPresetsUpdateUploadPreset } from "../../funcs/uploadPresetsUpdateUploadPreset.js"; -import { UploadPreset$zodSchema } from "../../models/uploadpreset.js"; +import { UploadPresetInput$zodSchema } from "../../models/uploadpresetinput.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { - name: z.string(), - upload_preset: UploadPreset$zodSchema, + name: z.string().describe("The name of the upload preset."), + upload_preset_input: UploadPresetInput$zodSchema.describe( + `The updated upload preset configuration.`, + ), }; export const tool$uploadPresetsUpdateUploadPreset: ToolDefinition = @@ -29,7 +31,7 @@ export const tool$uploadPresetsUpdateUploadPreset: ToolDefinition = const [result] = await uploadPresetsUpdateUploadPreset( client, args.name, - args.upload_preset, + args.upload_preset_input, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); diff --git a/src/models/accesscontrolitem.ts b/src/models/accesscontrolitem.ts index 92d855c..0f49fe0 100644 --- a/src/models/accesscontrolitem.ts +++ b/src/models/accesscontrolitem.ts @@ -22,22 +22,60 @@ export const AccessType$zodSchema = z.enum([ "anonymous", ]).describe("The type of access control to apply to the asset."); +/** + * The start date and time when anonymous access becomes available. Accepts ISO 8601 string or Unix timestamp. + */ +export type Start = string | number; + +export const Start$zodSchema: z.ZodType = z.union([ + z.string(), + z.int(), +]).describe( + "The start date and time when anonymous access becomes available. Accepts ISO 8601 string or Unix timestamp.", +); + +/** + * The end date and time when anonymous access expires. Accepts ISO 8601 string or Unix timestamp. + */ +export type End = string | number; + +export const End$zodSchema: z.ZodType = z.union([ + z.string(), + z.int(), +]).describe( + "The end date and time when anonymous access expires. Accepts ISO 8601 string or Unix timestamp.", +); + /** * Access control rule that defines when and how the asset can be accessed. */ export type AccessControlItem = { access_type: AccessType; key?: string | undefined; - start?: string | undefined; - end?: string | undefined; + start?: string | number | undefined; + end?: string | number | undefined; }; export const AccessControlItem$zodSchema: z.ZodType = z .object({ - access_type: AccessType$zodSchema, - end: z.string().optional(), - key: z.string().optional(), - start: z.string().optional(), + access_type: AccessType$zodSchema.describe( + "The type of access control to apply to the asset.", + ), + end: z.union([ + z.string(), + z.int(), + ]).optional().describe( + "The end date and time when anonymous access expires. Accepts ISO 8601 string or Unix timestamp.", + ), + key: z.string().optional().describe( + "The authentication key identifier for token-based access. Default key is used if not specified or if set to 'default'.", + ), + start: z.union([ + z.string(), + z.int(), + ]).optional().describe( + "The start date and time when anonymous access becomes available. Accepts ISO 8601 string or Unix timestamp.", + ), }).describe( "Access control rule that defines when and how the asset can be accessed.", ); diff --git a/src/models/assetdeliverytype.ts b/src/models/assetdeliverytype.ts new file mode 100644 index 0000000..ec8e293 --- /dev/null +++ b/src/models/assetdeliverytype.ts @@ -0,0 +1,21 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +/** + * Static asset delivery type. + */ +export const AssetDeliveryType = { + Asset: "asset", +} as const; +/** + * Static asset delivery type. + */ +export type AssetDeliveryType = ClosedEnum; + +export const AssetDeliveryType$zodSchema = z.enum([ + "asset", +]).describe("Static asset delivery type."); diff --git a/src/models/createrequest.ts b/src/models/createrequest.ts index 60f74a8..6afc733 100644 --- a/src/models/createrequest.ts +++ b/src/models/createrequest.ts @@ -10,6 +10,8 @@ export type CreateRequest = { }; export const CreateRequest$zodSchema: z.ZodType = z.object({ - allowed_for_strict: z.boolean().optional(), - transformation: z.string(), + allowed_for_strict: z.boolean().optional().describe( + "Whether to allow this named transformation when strict transformations are enabled. Strict transformations prevent transformations from being dynamically applied to media assets.\n", + ), + transformation: z.string().describe("A valid transformation string."), }); diff --git a/src/models/createstreamingprofileop.ts b/src/models/createstreamingprofileop.ts index a7d39e0..cdd2e87 100644 --- a/src/models/createstreamingprofileop.ts +++ b/src/models/createstreamingprofileop.ts @@ -5,9 +5,9 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; import { - StreamingProfile, - StreamingProfile$zodSchema, -} from "./streamingprofile.js"; + StreamingProfileDataResponse, + StreamingProfileDataResponse$zodSchema, +} from "./streamingprofiledataresponse.js"; export type CreateStreamingProfileGlobals = { cloud_name?: string | undefined }; @@ -18,24 +18,13 @@ export const CreateStreamingProfileGlobals$zodSchema: z.ZodType< .optional(), }); -/** - * Streaming profile created - */ -export type CreateStreamingProfileResponseBody = { data: StreamingProfile }; - -export const CreateStreamingProfileResponseBody$zodSchema: z.ZodType< - CreateStreamingProfileResponseBody -> = z.object({ - data: StreamingProfile$zodSchema, -}).describe("Streaming profile created"); - export type CreateStreamingProfileResponse = - | CreateStreamingProfileResponseBody + | StreamingProfileDataResponse | ApiError; export const CreateStreamingProfileResponse$zodSchema: z.ZodType< CreateStreamingProfileResponse > = z.union([ - z.lazy(() => CreateStreamingProfileResponseBody$zodSchema), + StreamingProfileDataResponse$zodSchema, ApiError$zodSchema, ]); diff --git a/src/models/createtransformationop.ts b/src/models/createtransformationop.ts index 46416fd..cc76028 100644 --- a/src/models/createtransformationop.ts +++ b/src/models/createtransformationop.ts @@ -5,6 +5,10 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; import { CreateRequest, CreateRequest$zodSchema } from "./createrequest.js"; +import { + MessageResponse, + MessageResponse$zodSchema, +} from "./messageresponse.js"; export type CreateTransformationGlobals = { cloud_name?: string | undefined }; @@ -23,30 +27,19 @@ export type CreateTransformationRequest = { export const CreateTransformationRequest$zodSchema: z.ZodType< CreateTransformationRequest > = z.object({ - create_request: CreateRequest$zodSchema, + create_request: CreateRequest$zodSchema.describe( + "The named transformation definition.", + ), transformation: z.string().describe( - "The valid transformation name to create.\n", + "The valid transformation name to create.", ), }); -/** - * Transformation created - */ -export type CreateTransformationResponseBody = { message?: string | undefined }; - -export const CreateTransformationResponseBody$zodSchema: z.ZodType< - CreateTransformationResponseBody -> = z.object({ - message: z.string().optional(), -}).describe("Transformation created"); - -export type CreateTransformationResponse = - | ApiError - | CreateTransformationResponseBody; +export type CreateTransformationResponse = MessageResponse | ApiError; export const CreateTransformationResponse$zodSchema: z.ZodType< CreateTransformationResponse > = z.union([ + MessageResponse$zodSchema, ApiError$zodSchema, - z.lazy(() => CreateTransformationResponseBody$zodSchema), ]); diff --git a/src/models/createtriggerop.ts b/src/models/createtriggerop.ts index a8c62a9..76d0569 100644 --- a/src/models/createtriggerop.ts +++ b/src/models/createtriggerop.ts @@ -15,14 +15,6 @@ export const CreateTriggerGlobals$zodSchema: z.ZodType = z ).optional(), }); -export type CreateTriggerRequest = { uri: string; event_type: string }; - -export const CreateTriggerRequest$zodSchema: z.ZodType = z - .object({ - event_type: z.string(), - uri: z.string(), - }); - export type CreateTriggerResponse = TriggerInfo | ApiError; export const CreateTriggerResponse$zodSchema: z.ZodType = diff --git a/src/models/createtriggerrequest.ts b/src/models/createtriggerrequest.ts new file mode 100644 index 0000000..19cc61d --- /dev/null +++ b/src/models/createtriggerrequest.ts @@ -0,0 +1,16 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { EventType, EventType$zodSchema } from "./eventtype.js"; + +export type CreateTriggerRequest = { uri: string; event_type: EventType }; + +export const CreateTriggerRequest$zodSchema: z.ZodType = z + .object({ + event_type: EventType$zodSchema.describe("The type of notification event."), + uri: z.string().describe( + "The URL that will receive the notification response.", + ), + }); diff --git a/src/models/createuploadmappingop.ts b/src/models/createuploadmappingop.ts index 58a7582..ff9655f 100644 --- a/src/models/createuploadmappingop.ts +++ b/src/models/createuploadmappingop.ts @@ -4,6 +4,10 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; +import { + UploadMappingCreateResponse, + UploadMappingCreateResponse$zodSchema, +} from "./uploadmappingcreateresponse.js"; export type CreateUploadMappingGlobals = { cloud_name?: string | undefined }; @@ -14,39 +18,13 @@ export const CreateUploadMappingGlobals$zodSchema: z.ZodType< .optional(), }); -export type CreateUploadMappingRequest = { folder: string; template: string }; - -export const CreateUploadMappingRequest$zodSchema: z.ZodType< - CreateUploadMappingRequest -> = z.object({ - folder: z.string(), - template: z.string(), -}); - -/** - * Upload mapping created successfully - */ -export type CreateUploadMappingResponseBody = { - message: string; - folder: string; - external_id: string; -}; - -export const CreateUploadMappingResponseBody$zodSchema: z.ZodType< - CreateUploadMappingResponseBody -> = z.object({ - external_id: z.string(), - folder: z.string(), - message: z.string(), -}).describe("Upload mapping created successfully"); - export type CreateUploadMappingResponse = - | CreateUploadMappingResponseBody + | UploadMappingCreateResponse | ApiError; export const CreateUploadMappingResponse$zodSchema: z.ZodType< CreateUploadMappingResponse > = z.union([ - z.lazy(() => CreateUploadMappingResponseBody$zodSchema), + UploadMappingCreateResponse$zodSchema, ApiError$zodSchema, ]); diff --git a/src/models/createuploadpresetop.ts b/src/models/createuploadpresetop.ts index 2f8fed6..7a78995 100644 --- a/src/models/createuploadpresetop.ts +++ b/src/models/createuploadpresetop.ts @@ -4,6 +4,10 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; +import { + UploadPresetCreateResponse, + UploadPresetCreateResponse$zodSchema, +} from "./uploadpresetcreateresponse.js"; export type CreateUploadPresetGlobals = { cloud_name?: string | undefined }; @@ -14,30 +18,11 @@ export const CreateUploadPresetGlobals$zodSchema: z.ZodType< .optional(), }); -/** - * upload preset created - */ -export type CreateUploadPresetResponseBody = { - name: string; - message: string; - external_id: string; -}; - -export const CreateUploadPresetResponseBody$zodSchema: z.ZodType< - CreateUploadPresetResponseBody -> = z.object({ - external_id: z.string(), - message: z.string(), - name: z.string(), -}).describe("upload preset created"); - -export type CreateUploadPresetResponse = - | CreateUploadPresetResponseBody - | ApiError; +export type CreateUploadPresetResponse = UploadPresetCreateResponse | ApiError; export const CreateUploadPresetResponse$zodSchema: z.ZodType< CreateUploadPresetResponse > = z.union([ - z.lazy(() => CreateUploadPresetResponseBody$zodSchema), + UploadPresetCreateResponse$zodSchema, ApiError$zodSchema, ]); diff --git a/src/models/deletestreamingprofileop.ts b/src/models/deletestreamingprofileop.ts index 128d625..d1c4a33 100644 --- a/src/models/deletestreamingprofileop.ts +++ b/src/models/deletestreamingprofileop.ts @@ -4,6 +4,10 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; +import { + MessageResponse, + MessageResponse$zodSchema, +} from "./messageresponse.js"; export type DeleteStreamingProfileGlobals = { cloud_name?: string | undefined }; @@ -19,27 +23,14 @@ export type DeleteStreamingProfileRequest = { name: string }; export const DeleteStreamingProfileRequest$zodSchema: z.ZodType< DeleteStreamingProfileRequest > = z.object({ - name: z.string(), + name: z.string().describe("The name of the streaming profile."), }); -/** - * Streaming profile deleted or reverted - */ -export type DeleteStreamingProfileResponseBody = { message: string }; - -export const DeleteStreamingProfileResponseBody$zodSchema: z.ZodType< - DeleteStreamingProfileResponseBody -> = z.object({ - message: z.string(), -}).describe("Streaming profile deleted or reverted"); - -export type DeleteStreamingProfileResponse = - | DeleteStreamingProfileResponseBody - | ApiError; +export type DeleteStreamingProfileResponse = MessageResponse | ApiError; export const DeleteStreamingProfileResponse$zodSchema: z.ZodType< DeleteStreamingProfileResponse > = z.union([ - z.lazy(() => DeleteStreamingProfileResponseBody$zodSchema), + MessageResponse$zodSchema, ApiError$zodSchema, ]); diff --git a/src/models/deletetransformationop.ts b/src/models/deletetransformationop.ts index ef1bab5..27cab1c 100644 --- a/src/models/deletetransformationop.ts +++ b/src/models/deletetransformationop.ts @@ -4,6 +4,10 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; +import { + MessageResponse, + MessageResponse$zodSchema, +} from "./messageresponse.js"; export type DeleteTransformationGlobals = { cloud_name?: string | undefined }; @@ -30,24 +34,11 @@ export const DeleteTransformationRequest$zodSchema: z.ZodType< ), }); -/** - * Transformation deleted - */ -export type DeleteTransformationResponseBody = { message?: string | undefined }; - -export const DeleteTransformationResponseBody$zodSchema: z.ZodType< - DeleteTransformationResponseBody -> = z.object({ - message: z.string().optional(), -}).describe("Transformation deleted"); - -export type DeleteTransformationResponse = - | ApiError - | DeleteTransformationResponseBody; +export type DeleteTransformationResponse = MessageResponse | ApiError; export const DeleteTransformationResponse$zodSchema: z.ZodType< DeleteTransformationResponse > = z.union([ + MessageResponse$zodSchema, ApiError$zodSchema, - z.lazy(() => DeleteTransformationResponseBody$zodSchema), ]); diff --git a/src/models/deletetriggerop.ts b/src/models/deletetriggerop.ts index 717e0e6..f7991cf 100644 --- a/src/models/deletetriggerop.ts +++ b/src/models/deletetriggerop.ts @@ -4,6 +4,10 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; +import { + MessageResponse, + MessageResponse$zodSchema, +} from "./messageresponse.js"; export type DeleteTriggerGlobals = { cloud_name?: string | undefined }; @@ -18,24 +22,13 @@ export type DeleteTriggerRequest = { id: string }; export const DeleteTriggerRequest$zodSchema: z.ZodType = z .object({ - id: z.string(), + id: z.string().describe("The ID of the trigger."), }); -/** - * Trigger deleted successfully - */ -export type DeleteTriggerResponseBody = { message: string }; - -export const DeleteTriggerResponseBody$zodSchema: z.ZodType< - DeleteTriggerResponseBody -> = z.object({ - message: z.string(), -}).describe("Trigger deleted successfully"); - -export type DeleteTriggerResponse = DeleteTriggerResponseBody | ApiError; +export type DeleteTriggerResponse = MessageResponse | ApiError; export const DeleteTriggerResponse$zodSchema: z.ZodType = z.union([ - z.lazy(() => DeleteTriggerResponseBody$zodSchema), + MessageResponse$zodSchema, ApiError$zodSchema, ]); diff --git a/src/models/deleteuploadmappingop.ts b/src/models/deleteuploadmappingop.ts index 0f4ecc4..49be76e 100644 --- a/src/models/deleteuploadmappingop.ts +++ b/src/models/deleteuploadmappingop.ts @@ -4,6 +4,10 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; +import { + UploadMappingMutationResponse, + UploadMappingMutationResponse$zodSchema, +} from "./uploadmappingmutationresponse.js"; export type DeleteUploadMappingGlobals = { cloud_name?: string | undefined }; @@ -22,28 +26,13 @@ export const DeleteUploadMappingRequest$zodSchema: z.ZodType< folder: z.string().describe("The folder name of the mapping to delete"), }); -/** - * Upload mapping deleted successfully - */ -export type DeleteUploadMappingResponseBody = { - message: string; - external_id: string; -}; - -export const DeleteUploadMappingResponseBody$zodSchema: z.ZodType< - DeleteUploadMappingResponseBody -> = z.object({ - external_id: z.string(), - message: z.string(), -}).describe("Upload mapping deleted successfully"); - export type DeleteUploadMappingResponse = - | DeleteUploadMappingResponseBody + | UploadMappingMutationResponse | ApiError; export const DeleteUploadMappingResponse$zodSchema: z.ZodType< DeleteUploadMappingResponse > = z.union([ - z.lazy(() => DeleteUploadMappingResponseBody$zodSchema), + UploadMappingMutationResponse$zodSchema, ApiError$zodSchema, ]); diff --git a/src/models/deleteuploadpresetop.ts b/src/models/deleteuploadpresetop.ts index 5f91061..432f296 100644 --- a/src/models/deleteuploadpresetop.ts +++ b/src/models/deleteuploadpresetop.ts @@ -4,6 +4,10 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; +import { + UploadPresetMutationResponse, + UploadPresetMutationResponse$zodSchema, +} from "./uploadpresetmutationresponse.js"; export type DeleteUploadPresetGlobals = { cloud_name?: string | undefined }; @@ -19,31 +23,16 @@ export type DeleteUploadPresetRequest = { name: string }; export const DeleteUploadPresetRequest$zodSchema: z.ZodType< DeleteUploadPresetRequest > = z.object({ - name: z.string(), + name: z.string().describe("The name of the upload preset."), }); -/** - * upload preset deleted - */ -export type DeleteUploadPresetResponseBody = { - message: string; - external_id: string; -}; - -export const DeleteUploadPresetResponseBody$zodSchema: z.ZodType< - DeleteUploadPresetResponseBody -> = z.object({ - external_id: z.string(), - message: z.string(), -}).describe("upload preset deleted"); - export type DeleteUploadPresetResponse = - | DeleteUploadPresetResponseBody + | UploadPresetMutationResponse | ApiError; export const DeleteUploadPresetResponse$zodSchema: z.ZodType< DeleteUploadPresetResponse > = z.union([ - z.lazy(() => DeleteUploadPresetResponseBody$zodSchema), + UploadPresetMutationResponse$zodSchema, ApiError$zodSchema, ]); diff --git a/src/models/directionenum.ts b/src/models/directionenum.ts new file mode 100644 index 0000000..e6d1a7f --- /dev/null +++ b/src/models/directionenum.ts @@ -0,0 +1,23 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +/** + * Sort direction. + */ +export const DirectionEnum = { + Asc: "asc", + Desc: "desc", +} as const; +/** + * Sort direction. + */ +export type DirectionEnum = ClosedEnum; + +export const DirectionEnum$zodSchema = z.enum([ + "asc", + "desc", +]).describe("Sort direction."); diff --git a/src/models/eventtype.ts b/src/models/eventtype.ts new file mode 100644 index 0000000..9e3652d --- /dev/null +++ b/src/models/eventtype.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +/** + * The type of notification event. + */ +export const EventType = { + All: "all", + AccessControlChanged: "access_control_changed", + BulkRefreshAutoFetch: "bulk_refresh_auto_fetch", + CreateFolder: "create_folder", + Delete: "delete", + DeleteByToken: "delete_by_token", + DeleteFolder: "delete_folder", + Eager: "eager", + Error: "error", + Explode: "explode", + GenerateArchive: "generate_archive", + Info: "info", + InvalidateCustomCdn: "invalidate_custom_cdn", + Moderation: "moderation", + ModerationSummary: "moderation_summary", + Move: "move", + MoveOrRenameAssetFolder: "move_or_rename_asset_folder", + Multi: "multi", + Publish: "publish", + Rename: "rename", + Report: "report", + ResourceContextChanged: "resource_context_changed", + ResourceDisplayNameChanged: "resource_display_name_changed", + ResourceMetadataChanged: "resource_metadata_changed", + ResourceTagsChanged: "resource_tags_changed", + RestoreAssetVersion: "restore_asset_version", + Sprite: "sprite", + Upload: "upload", +} as const; +/** + * The type of notification event. + */ +export type EventType = ClosedEnum; + +export const EventType$zodSchema = z.enum([ + "all", + "access_control_changed", + "bulk_refresh_auto_fetch", + "create_folder", + "delete", + "delete_by_token", + "delete_folder", + "eager", + "error", + "explode", + "generate_archive", + "info", + "invalidate_custom_cdn", + "moderation", + "moderation_summary", + "move", + "move_or_rename_asset_folder", + "multi", + "publish", + "rename", + "report", + "resource_context_changed", + "resource_display_name_changed", + "resource_metadata_changed", + "resource_tags_changed", + "restore_asset_version", + "sprite", + "upload", +]).describe("The type of notification event."); diff --git a/src/models/getstreamingprofileop.ts b/src/models/getstreamingprofileop.ts index b05ef81..22ff342 100644 --- a/src/models/getstreamingprofileop.ts +++ b/src/models/getstreamingprofileop.ts @@ -5,9 +5,9 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; import { - StreamingProfile, - StreamingProfile$zodSchema, -} from "./streamingprofile.js"; + StreamingProfileDataResponse, + StreamingProfileDataResponse$zodSchema, +} from "./streamingprofiledataresponse.js"; export type GetStreamingProfileGlobals = { cloud_name?: string | undefined }; @@ -23,27 +23,16 @@ export type GetStreamingProfileRequest = { name: string }; export const GetStreamingProfileRequest$zodSchema: z.ZodType< GetStreamingProfileRequest > = z.object({ - name: z.string(), + name: z.string().describe("The name of the streaming profile."), }); -/** - * Streaming profile retrieved - */ -export type GetStreamingProfileResponseBody = { data: StreamingProfile }; - -export const GetStreamingProfileResponseBody$zodSchema: z.ZodType< - GetStreamingProfileResponseBody -> = z.object({ - data: StreamingProfile$zodSchema, -}).describe("Streaming profile retrieved"); - export type GetStreamingProfileResponse = - | GetStreamingProfileResponseBody + | StreamingProfileDataResponse | ApiError; export const GetStreamingProfileResponse$zodSchema: z.ZodType< GetStreamingProfileResponse > = z.union([ - z.lazy(() => GetStreamingProfileResponseBody$zodSchema), + StreamingProfileDataResponse$zodSchema, ApiError$zodSchema, ]); diff --git a/src/models/getstreamingprofilesop.ts b/src/models/getstreamingprofilesop.ts index 33dfd83..a693904 100644 --- a/src/models/getstreamingprofilesop.ts +++ b/src/models/getstreamingprofilesop.ts @@ -5,9 +5,9 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; import { - StreamingProfile, - StreamingProfile$zodSchema, -} from "./streamingprofile.js"; + StreamingProfileListResponse, + StreamingProfileListResponse$zodSchema, +} from "./streamingprofilelistresponse.js"; export type GetStreamingProfilesGlobals = { cloud_name?: string | undefined }; @@ -24,26 +24,13 @@ export const GetStreamingProfilesRequest$zodSchema: z.ZodType< GetStreamingProfilesRequest > = z.object({}); -/** - * Streaming profiles retrieved - */ -export type GetStreamingProfilesResponseBody = { - data: Array; -}; - -export const GetStreamingProfilesResponseBody$zodSchema: z.ZodType< - GetStreamingProfilesResponseBody -> = z.object({ - data: z.array(StreamingProfile$zodSchema), -}).describe("Streaming profiles retrieved"); - export type GetStreamingProfilesResponse = - | GetStreamingProfilesResponseBody + | StreamingProfileListResponse | ApiError; export const GetStreamingProfilesResponse$zodSchema: z.ZodType< GetStreamingProfilesResponse > = z.union([ - z.lazy(() => GetStreamingProfilesResponseBody$zodSchema), + StreamingProfileListResponse$zodSchema, ApiError$zodSchema, ]); diff --git a/src/models/getuploadpresetop.ts b/src/models/getuploadpresetop.ts index ba9aa3a..cda38a1 100644 --- a/src/models/getuploadpresetop.ts +++ b/src/models/getuploadpresetop.ts @@ -4,7 +4,10 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; -import { UploadPreset, UploadPreset$zodSchema } from "./uploadpreset.js"; +import { + UploadPresetDetail, + UploadPresetDetail$zodSchema, +} from "./uploadpresetdetail.js"; export type GetUploadPresetGlobals = { cloud_name?: string | undefined }; @@ -20,14 +23,14 @@ export type GetUploadPresetRequest = { name: string }; export const GetUploadPresetRequest$zodSchema: z.ZodType< GetUploadPresetRequest > = z.object({ - name: z.string(), + name: z.string().describe("The name of the upload preset."), }); -export type GetUploadPresetResponse = ApiError | UploadPreset; +export type GetUploadPresetResponse = UploadPresetDetail | ApiError; export const GetUploadPresetResponse$zodSchema: z.ZodType< GetUploadPresetResponse > = z.union([ + UploadPresetDetail$zodSchema, ApiError$zodSchema, - UploadPreset$zodSchema, ]); diff --git a/src/models/listtransformationsop.ts b/src/models/listtransformationsop.ts index 5e7f182..5c184ad 100644 --- a/src/models/listtransformationsop.ts +++ b/src/models/listtransformationsop.ts @@ -4,7 +4,10 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; -import { ListResponse, ListResponse$zodSchema } from "./listresponse.js"; +import { + TransformationListResponse, + TransformationListResponse$zodSchema, +} from "./transformationlistresponse.js"; export type ListTransformationsGlobals = { cloud_name?: string | undefined }; @@ -35,11 +38,11 @@ export const ListTransformationsRequest$zodSchema: z.ZodType< ).optional(), }); -export type ListTransformationsResponse = ApiError | ListResponse; +export type ListTransformationsResponse = ApiError | TransformationListResponse; export const ListTransformationsResponse$zodSchema: z.ZodType< ListTransformationsResponse > = z.union([ ApiError$zodSchema, - ListResponse$zodSchema, + TransformationListResponse$zodSchema, ]); diff --git a/src/models/listtriggerop.ts b/src/models/listtriggerop.ts index 80b3ebb..5d15b59 100644 --- a/src/models/listtriggerop.ts +++ b/src/models/listtriggerop.ts @@ -4,7 +4,11 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; -import { TriggerInfo, TriggerInfo$zodSchema } from "./triggerinfo.js"; +import { EventType, EventType$zodSchema } from "./eventtype.js"; +import { + TriggerListResponse, + TriggerListResponse$zodSchema, +} from "./triggerlistresponse.js"; export type ListTriggerGlobals = { cloud_name?: string | undefined }; @@ -15,34 +19,19 @@ export const ListTriggerGlobals$zodSchema: z.ZodType = z ).optional(), }); -export type ListTriggerRequest = { event_type?: string | undefined }; +export type ListTriggerRequest = { event_type?: EventType | undefined }; export const ListTriggerRequest$zodSchema: z.ZodType = z .object({ - event_type: z.string().describe( + event_type: EventType$zodSchema.optional().describe( "The type of event that will trigger the notification response.", - ).optional(), + ), }); -/** - * List response - */ -export type ListTriggerResponseBody = { - triggers: Array; - total: number; -}; - -export const ListTriggerResponseBody$zodSchema: z.ZodType< - ListTriggerResponseBody -> = z.object({ - total: z.int(), - triggers: z.array(TriggerInfo$zodSchema), -}).describe("List response"); - -export type ListTriggerResponse = ListTriggerResponseBody | ApiError; +export type ListTriggerResponse = TriggerListResponse | ApiError; export const ListTriggerResponse$zodSchema: z.ZodType = z .union([ - z.lazy(() => ListTriggerResponseBody$zodSchema), + TriggerListResponse$zodSchema, ApiError$zodSchema, ]); diff --git a/src/models/listuploadmappingsop.ts b/src/models/listuploadmappingsop.ts index 878fa60..34b6713 100644 --- a/src/models/listuploadmappingsop.ts +++ b/src/models/listuploadmappingsop.ts @@ -5,6 +5,10 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; import { UploadMapping, UploadMapping$zodSchema } from "./uploadmapping.js"; +import { + UploadMappingListResponse, + UploadMappingListResponse$zodSchema, +} from "./uploadmappinglistresponse.js"; export type ListUploadMappingsGlobals = { cloud_name?: string | undefined }; @@ -35,37 +39,24 @@ export const ListUploadMappingsRequest$zodSchema: z.ZodType< ).optional(), }); -/** - * List response - */ -export type ResponseBody = { - mappings: Array; - total_entries: number; - next_cursor?: string | undefined; -}; - -export const ResponseBody$zodSchema: z.ZodType = z.object({ - mappings: z.array(UploadMapping$zodSchema), - next_cursor: z.string().optional(), - total_entries: z.int(), -}).describe("List response"); - /** * Upload mappings retrieved successfully */ -export type ListUploadMappingsResponseBody = UploadMapping | ResponseBody; +export type ListUploadMappingsResponseBody = + | UploadMapping + | UploadMappingListResponse; export const ListUploadMappingsResponseBody$zodSchema: z.ZodType< ListUploadMappingsResponseBody > = z.union([ UploadMapping$zodSchema, - z.lazy(() => ResponseBody$zodSchema), + UploadMappingListResponse$zodSchema, ]).describe("Upload mappings retrieved successfully"); export type ListUploadMappingsResponse = | ApiError | UploadMapping - | ResponseBody; + | UploadMappingListResponse; export const ListUploadMappingsResponse$zodSchema: z.ZodType< ListUploadMappingsResponse @@ -73,6 +64,6 @@ export const ListUploadMappingsResponse$zodSchema: z.ZodType< ApiError$zodSchema, z.union([ UploadMapping$zodSchema, - z.lazy(() => ResponseBody$zodSchema), + UploadMappingListResponse$zodSchema, ]), ]); diff --git a/src/models/listuploadpresetsop.ts b/src/models/listuploadpresetsop.ts index 84ed4cd..4070a34 100644 --- a/src/models/listuploadpresetsop.ts +++ b/src/models/listuploadpresetsop.ts @@ -5,7 +5,11 @@ import * as z from "zod"; import { ClosedEnum } from "../types/enums.js"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; -import { UploadPreset, UploadPreset$zodSchema } from "./uploadpreset.js"; +import { DirectionEnum, DirectionEnum$zodSchema } from "./directionenum.js"; +import { + UploadPresetListResponse, + UploadPresetListResponse$zodSchema, +} from "./uploadpresetlistresponse.js"; export type ListUploadPresetsGlobals = { cloud_name?: string | undefined }; @@ -16,64 +20,54 @@ export const ListUploadPresetsGlobals$zodSchema: z.ZodType< .optional(), }); +/** + * The field to sort presets by. + */ export const OrderBy = { Name: "name", Id: "id", - UpdatedAt: "updated_at", + CreatedAt: "created_at", } as const; +/** + * The field to sort presets by. + */ export type OrderBy = ClosedEnum; export const OrderBy$zodSchema = z.enum([ "name", "id", - "updated_at", -]); - -export const Direction = { - Asc: "asc", - Desc: "desc", -} as const; -export type Direction = ClosedEnum; - -export const Direction$zodSchema = z.enum([ - "asc", - "desc", -]); + "created_at", +]).describe("The field to sort presets by."); export type ListUploadPresetsRequest = { order_by?: OrderBy | undefined; - direction?: Direction | undefined; + direction?: DirectionEnum | undefined; + max_results?: number | undefined; next_cursor?: string | undefined; }; export const ListUploadPresetsRequest$zodSchema: z.ZodType< ListUploadPresetsRequest > = z.object({ - direction: Direction$zodSchema.optional(), + direction: DirectionEnum$zodSchema.optional().describe( + "The sort direction for the results. Default is \"desc\".", + ), + max_results: z.int().default(10).describe( + "The maximum number of results to return. Default is 10.", + ), next_cursor: z.string().describe( "The cursor for pagination. Use the next_cursor value from a previous response to get the next page of results.", ).optional(), - order_by: OrderBy$zodSchema.optional(), + order_by: OrderBy$zodSchema.optional().describe( + "The field to sort presets by.", + ), }); -/** - * upload presets retrieved - */ -export type ListUploadPresetsResponseBody = { presets: Array }; - -export const ListUploadPresetsResponseBody$zodSchema: z.ZodType< - ListUploadPresetsResponseBody -> = z.object({ - presets: z.array(UploadPreset$zodSchema), -}).describe("upload presets retrieved"); - -export type ListUploadPresetsResponse = - | ListUploadPresetsResponseBody - | ApiError; +export type ListUploadPresetsResponse = UploadPresetListResponse | ApiError; export const ListUploadPresetsResponse$zodSchema: z.ZodType< ListUploadPresetsResponse > = z.union([ - z.lazy(() => ListUploadPresetsResponseBody$zodSchema), + UploadPresetListResponse$zodSchema, ApiError$zodSchema, ]); diff --git a/src/models/manageddeliverytype.ts b/src/models/manageddeliverytype.ts new file mode 100644 index 0000000..df70762 --- /dev/null +++ b/src/models/manageddeliverytype.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; + +/** + * Managed delivery types for assets uploaded and stored by Cloudinary. + */ +export const ManagedDeliveryType = { + Upload: "upload", + Private: "private", + Authenticated: "authenticated", +} as const; +/** + * Managed delivery types for assets uploaded and stored by Cloudinary. + */ +export type ManagedDeliveryType = ClosedEnum; + +export const ManagedDeliveryType$zodSchema = z.enum([ + "upload", + "private", + "authenticated", +]).describe( + "Managed delivery types for assets uploaded and stored by Cloudinary.", +); diff --git a/src/models/messageresponse.ts b/src/models/messageresponse.ts new file mode 100644 index 0000000..ff14130 --- /dev/null +++ b/src/models/messageresponse.ts @@ -0,0 +1,11 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type MessageResponse = { message: string }; + +export const MessageResponse$zodSchema: z.ZodType = z.object({ + message: z.string().describe("A human-readable status message."), +}); diff --git a/src/models/replaceuploadmappingsop.ts b/src/models/replaceuploadmappingsop.ts index 0cfffc0..9b5386d 100644 --- a/src/models/replaceuploadmappingsop.ts +++ b/src/models/replaceuploadmappingsop.ts @@ -4,6 +4,10 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; +import { + MessageResponse, + MessageResponse$zodSchema, +} from "./messageresponse.js"; export type ReplaceUploadMappingsGlobals = { cloud_name?: string | undefined }; @@ -14,39 +18,11 @@ export const ReplaceUploadMappingsGlobals$zodSchema: z.ZodType< .optional(), }); -export type Mapping = { folder: string; template: string }; - -export const Mapping$zodSchema: z.ZodType = z.object({ - folder: z.string(), - template: z.string(), -}); - -export type ReplaceUploadMappingsRequest = { mappings: Array }; - -export const ReplaceUploadMappingsRequest$zodSchema: z.ZodType< - ReplaceUploadMappingsRequest -> = z.object({ - mappings: z.array(z.lazy(() => Mapping$zodSchema)), -}); - -/** - * upload mappings replaced - */ -export type ReplaceUploadMappingsResponseBody = { message: string }; - -export const ReplaceUploadMappingsResponseBody$zodSchema: z.ZodType< - ReplaceUploadMappingsResponseBody -> = z.object({ - message: z.string(), -}).describe("upload mappings replaced"); - -export type ReplaceUploadMappingsResponse = - | ReplaceUploadMappingsResponseBody - | ApiError; +export type ReplaceUploadMappingsResponse = MessageResponse | ApiError; export const ReplaceUploadMappingsResponse$zodSchema: z.ZodType< ReplaceUploadMappingsResponse > = z.union([ - z.lazy(() => ReplaceUploadMappingsResponseBody$zodSchema), + MessageResponse$zodSchema, ApiError$zodSchema, ]); diff --git a/src/models/replaceuploadmappingsrequest.ts b/src/models/replaceuploadmappingsrequest.ts new file mode 100644 index 0000000..0df2683 --- /dev/null +++ b/src/models/replaceuploadmappingsrequest.ts @@ -0,0 +1,19 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + UploadMappingInput, + UploadMappingInput$zodSchema, +} from "./uploadmappinginput.js"; + +export type ReplaceUploadMappingsRequest = { + mappings: Array; +}; + +export const ReplaceUploadMappingsRequest$zodSchema: z.ZodType< + ReplaceUploadMappingsRequest +> = z.object({ + mappings: z.array(UploadMappingInput$zodSchema), +}); diff --git a/src/models/responsivebreakpoint.ts b/src/models/responsivebreakpoint.ts new file mode 100644 index 0000000..82d377e --- /dev/null +++ b/src/models/responsivebreakpoint.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ResponsiveBreakpoint = { + create_derived?: boolean | undefined; + max_width?: number | undefined; + min_width?: number | undefined; + bytes_step?: number | undefined; + max_images?: number | undefined; + transformation?: string | undefined; +}; + +export const ResponsiveBreakpoint$zodSchema: z.ZodType = z + .object({ + bytes_step: z.int().optional().describe( + "The minimum byte size difference between consecutive breakpoint images.", + ), + create_derived: z.boolean().optional().describe( + "Whether to generate and store the derived images. Default is true.", + ), + max_images: z.int().optional().describe( + "The maximum number of breakpoint images to generate.", + ), + max_width: z.int().optional().describe( + "The maximum width for responsive breakpoint images.", + ), + min_width: z.int().optional().describe( + "The minimum width for responsive breakpoint images.", + ), + transformation: z.string().optional().describe( + "A transformation string to apply before generating breakpoints.", + ), + }); diff --git a/src/models/streamingprofile.ts b/src/models/streamingprofile.ts index 50abd51..053dab0 100644 --- a/src/models/streamingprofile.ts +++ b/src/models/streamingprofile.ts @@ -9,7 +9,9 @@ export type Representation = { }; export const Representation$zodSchema: z.ZodType = z.object({ - transformation: z.array(z.record(z.string(), z.any())).optional(), + transformation: z.array(z.record(z.string(), z.any())).optional().describe( + "The transformation parameters for this representation", + ), }); export type StreamingProfile = { @@ -22,10 +24,17 @@ export type StreamingProfile = { export const StreamingProfile$zodSchema: z.ZodType = z.object( { - display_name: z.string().nullable().optional(), - external_id: z.string(), - name: z.string(), - predefined: z.boolean(), - representations: z.array(z.lazy(() => Representation$zodSchema)).optional(), + display_name: z.string().nullable().optional().describe( + "The display name of the streaming profile", + ), + external_id: z.string().describe( + "The unique identifier of the streaming profile", + ), + name: z.string().describe("The name of the streaming profile"), + predefined: z.boolean().describe( + "Whether this is a predefined streaming profile", + ), + representations: z.array(z.lazy(() => Representation$zodSchema)).optional() + .describe("The list of representations in the streaming profile"), }, ); diff --git a/src/models/streamingprofilecreate.ts b/src/models/streamingprofilecreate.ts index 0924653..616eda9 100644 --- a/src/models/streamingprofilecreate.ts +++ b/src/models/streamingprofilecreate.ts @@ -13,7 +13,11 @@ export type StreamingProfileCreate = { export const StreamingProfileCreate$zodSchema: z.ZodType< StreamingProfileCreate > = z.object({ - display_name: z.string().nullable().optional(), - name: z.string(), - representations: z.string(), + display_name: z.string().nullable().optional().describe( + "The display name of the streaming profile", + ), + name: z.string().describe("The name of the streaming profile"), + representations: z.string().describe( + "A JSON string containing the list of representations with transformation parameters as strings", + ), }); diff --git a/src/models/streamingprofiledataresponse.ts b/src/models/streamingprofiledataresponse.ts new file mode 100644 index 0000000..e172c2c --- /dev/null +++ b/src/models/streamingprofiledataresponse.ts @@ -0,0 +1,17 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + StreamingProfile, + StreamingProfile$zodSchema, +} from "./streamingprofile.js"; + +export type StreamingProfileDataResponse = { data: StreamingProfile }; + +export const StreamingProfileDataResponse$zodSchema: z.ZodType< + StreamingProfileDataResponse +> = z.object({ + data: StreamingProfile$zodSchema, +}); diff --git a/src/models/streamingprofilelistresponse.ts b/src/models/streamingprofilelistresponse.ts new file mode 100644 index 0000000..b84162f --- /dev/null +++ b/src/models/streamingprofilelistresponse.ts @@ -0,0 +1,17 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + StreamingProfile, + StreamingProfile$zodSchema, +} from "./streamingprofile.js"; + +export type StreamingProfileListResponse = { data: Array }; + +export const StreamingProfileListResponse$zodSchema: z.ZodType< + StreamingProfileListResponse +> = z.object({ + data: z.array(StreamingProfile$zodSchema), +}); diff --git a/src/models/streamingprofileupdate.ts b/src/models/streamingprofileupdate.ts index 62e7540..6e29fa1 100644 --- a/src/models/streamingprofileupdate.ts +++ b/src/models/streamingprofileupdate.ts @@ -12,6 +12,10 @@ export type StreamingProfileUpdate = { export const StreamingProfileUpdate$zodSchema: z.ZodType< StreamingProfileUpdate > = z.object({ - display_name: z.string().nullable().optional(), - representations: z.string(), + display_name: z.string().nullable().optional().describe( + "The display name of the streaming profile", + ), + representations: z.string().describe( + "A JSON string containing the list of representations with transformation parameters as strings", + ), }); diff --git a/src/models/streamingprofileupdateresponse.ts b/src/models/streamingprofileupdateresponse.ts new file mode 100644 index 0000000..99a0783 --- /dev/null +++ b/src/models/streamingprofileupdateresponse.ts @@ -0,0 +1,21 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + StreamingProfile, + StreamingProfile$zodSchema, +} from "./streamingprofile.js"; + +export type StreamingProfileUpdateResponse = { + message: string; + data: StreamingProfile; +}; + +export const StreamingProfileUpdateResponse$zodSchema: z.ZodType< + StreamingProfileUpdateResponse +> = z.object({ + data: StreamingProfile$zodSchema, + message: z.string(), +}); diff --git a/src/models/structuredmetadataparam.ts b/src/models/structuredmetadataparam.ts new file mode 100644 index 0000000..74fb0c3 --- /dev/null +++ b/src/models/structuredmetadataparam.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + StructuredMetadataValue, + StructuredMetadataValue$zodSchema, +} from "./structuredmetadatavalue.js"; + +/** + * A pipe-separated list or a map of custom metadata fields (by external_id) and the values to assign to each of them. The = " and | characters can be supported as values when escaped with a prepended backslash (\). For a multi-select field, you can set a maximum of 3000 different metadata values on an asset. + * + * @remarks + */ +export type StructuredMetadataParam = string | { + [k: string]: StructuredMetadataValue; +}; + +export const StructuredMetadataParam$zodSchema: z.ZodType< + StructuredMetadataParam +> = z.union([ + z.string(), + z.record(z.string(), StructuredMetadataValue$zodSchema), +]).describe( + "A pipe-separated list or a map of custom metadata fields (by external_id) and the values to assign to each of them. The = \" and | characters can be supported as values when escaped with a prepended backslash (\\). For a multi-select field, you can set a maximum of 3000 different metadata values on an asset.\n", +); diff --git a/src/models/structuredmetadatavalue.ts b/src/models/structuredmetadatavalue.ts new file mode 100644 index 0000000..0a6534f --- /dev/null +++ b/src/models/structuredmetadatavalue.ts @@ -0,0 +1,15 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type StructuredMetadataValue = string | number | Array; + +export const StructuredMetadataValue$zodSchema: z.ZodType< + StructuredMetadataValue +> = z.union([ + z.string(), + z.int(), + z.array(z.string()), +]); diff --git a/src/models/tagsparam.ts b/src/models/tagsparam.ts new file mode 100644 index 0000000..029f751 --- /dev/null +++ b/src/models/tagsparam.ts @@ -0,0 +1,15 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * A comma-separated list of tag names, or an array of tag names. + */ +export type TagsParam = string | Array; + +export const TagsParam$zodSchema: z.ZodType = z.union([ + z.string(), + z.array(z.string()), +]).describe("A comma-separated list of tag names, or an array of tag names."); diff --git a/src/models/testtriggerop.ts b/src/models/testtriggerop.ts index 12ec9b6..ee9a917 100644 --- a/src/models/testtriggerop.ts +++ b/src/models/testtriggerop.ts @@ -4,6 +4,14 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; +import { + TestTriggerRequest, + TestTriggerRequest$zodSchema, +} from "./testtriggerrequest.js"; +import { + TestTriggerResponse, + TestTriggerResponse$zodSchema, +} from "./testtriggerresponse.js"; export type TestTriggerGlobals = { cloud_name?: string | undefined }; @@ -14,54 +22,25 @@ export const TestTriggerGlobals$zodSchema: z.ZodType = z ).optional(), }); -/** - * Sample notification data to evaluate the filter against. - */ -export type SampleData = {}; - -export const SampleData$zodSchema: z.ZodType = z.object({}) - .describe("Sample notification data to evaluate the filter against."); - -export type TestTriggerRequestBody = { sample_data?: SampleData | undefined }; - -export const TestTriggerRequestBody$zodSchema: z.ZodType< - TestTriggerRequestBody -> = z.object({ - sample_data: z.lazy(() => SampleData$zodSchema).optional(), -}); - -export type TestTriggerRequest = { +export type TestTriggerRequestRequest = { id: string; - RequestBody?: TestTriggerRequestBody | undefined; + test_trigger_request?: TestTriggerRequest | undefined; }; -export const TestTriggerRequest$zodSchema: z.ZodType = z - .object({ - RequestBody: z.lazy(() => TestTriggerRequestBody$zodSchema).optional(), - id: z.string(), - }); - -/** - * Test completed successfully - */ -export type TestTriggerResponseBody = { - trigger_id: string; - filter_present: boolean; - filter_result: boolean; -}; - -export const TestTriggerResponseBody$zodSchema: z.ZodType< - TestTriggerResponseBody +export const TestTriggerRequestRequest$zodSchema: z.ZodType< + TestTriggerRequestRequest > = z.object({ - filter_present: z.boolean(), - filter_result: z.boolean(), - trigger_id: z.string(), -}).describe("Test completed successfully"); + id: z.string().describe("The ID of the trigger to test."), + test_trigger_request: TestTriggerRequest$zodSchema.optional().describe( + "The test data for the trigger.", + ), +}); -export type TestTriggerResponse = TestTriggerResponseBody | ApiError; +export type TestTriggerResponseResponse = TestTriggerResponse | ApiError; -export const TestTriggerResponse$zodSchema: z.ZodType = z - .union([ - z.lazy(() => TestTriggerResponseBody$zodSchema), - ApiError$zodSchema, - ]); +export const TestTriggerResponseResponse$zodSchema: z.ZodType< + TestTriggerResponseResponse +> = z.union([ + TestTriggerResponse$zodSchema, + ApiError$zodSchema, +]); diff --git a/src/models/testtriggerrequest.ts b/src/models/testtriggerrequest.ts new file mode 100644 index 0000000..cc4f161 --- /dev/null +++ b/src/models/testtriggerrequest.ts @@ -0,0 +1,22 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * Sample notification data to evaluate the filter against. + */ +export type SampleData = {}; + +export const SampleData$zodSchema: z.ZodType = z.object({}) + .describe("Sample notification data to evaluate the filter against."); + +export type TestTriggerRequest = { sample_data?: SampleData | undefined }; + +export const TestTriggerRequest$zodSchema: z.ZodType = z + .object({ + sample_data: z.lazy(() => SampleData$zodSchema).optional().describe( + "Sample notification data to evaluate the filter against.", + ), + }); diff --git a/src/models/testtriggerresponse.ts b/src/models/testtriggerresponse.ts new file mode 100644 index 0000000..c52b0ec --- /dev/null +++ b/src/models/testtriggerresponse.ts @@ -0,0 +1,22 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type TestTriggerResponse = { + trigger_id: string; + filter_present: boolean; + filter_result: boolean; +}; + +export const TestTriggerResponse$zodSchema: z.ZodType = z + .object({ + filter_present: z.boolean().describe( + "Whether the trigger has a filter configured.", + ), + filter_result: z.boolean().describe( + "Result of evaluating the filter against sample_data (true if no filter).", + ), + trigger_id: z.string().describe("The ID of the trigger that was tested."), + }); diff --git a/src/models/transformationinfo.ts b/src/models/transformationinfo.ts index aef7ede..2c0cc7b 100644 --- a/src/models/transformationinfo.ts +++ b/src/models/transformationinfo.ts @@ -41,11 +41,15 @@ export const Info$zodSchema: z.ZodType = z.object({ height: z.union([ z.int(), z.string(), - ]).optional(), + ]).optional().describe( + "Height - integer pixels or string variable reference (e.g., \"$h\")", + ), width: z.union([ z.int(), z.string(), - ]).optional(), + ]).optional().describe( + "Width - integer pixels or string variable reference (e.g., \"$w\")", + ), }); export type Derived = { @@ -82,9 +86,13 @@ export type TransformationInfo = { export const TransformationInfo$zodSchema: z.ZodType = z .object({ - allowed_for_strict: z.boolean().optional(), + allowed_for_strict: z.boolean().optional().describe( + "Whether to allow this named transformation when [strict transformations](https://cloudinary.com/documentation/control_access_to_media#strict_transformations) are enabled.\n", + ), derived: z.array(z.lazy(() => Derived$zodSchema)).optional(), - info: z.array(z.lazy(() => Info$zodSchema)).optional(), + info: z.array(z.lazy(() => Info$zodSchema)).optional().describe( + "API transformation parameters", + ), name: z.string().optional(), named: z.boolean().optional(), next_cursor: z.string().optional(), diff --git a/src/models/listresponse.ts b/src/models/transformationlistresponse.ts similarity index 74% rename from src/models/listresponse.ts rename to src/models/transformationlistresponse.ts index 922e364..0116ade 100644 --- a/src/models/listresponse.ts +++ b/src/models/transformationlistresponse.ts @@ -8,12 +8,14 @@ import { TransformationSummary$zodSchema, } from "./transformationsummary.js"; -export type ListResponse = { +export type TransformationListResponse = { transformations?: Array | undefined; next_cursor?: string | null | undefined; }; -export const ListResponse$zodSchema: z.ZodType = z.object({ +export const TransformationListResponse$zodSchema: z.ZodType< + TransformationListResponse +> = z.object({ next_cursor: z.string().nullable().optional(), transformations: z.array(TransformationSummary$zodSchema).optional(), }); diff --git a/src/models/triggerinfo.ts b/src/models/triggerinfo.ts index cd059cf..bcb7bbe 100644 --- a/src/models/triggerinfo.ts +++ b/src/models/triggerinfo.ts @@ -3,6 +3,7 @@ */ import * as z from "zod"; +import { EventType, EventType$zodSchema } from "./eventtype.js"; import { UriType, UriType$zodSchema } from "./uritype.js"; export type TriggerInfo = { @@ -10,14 +11,16 @@ export type TriggerInfo = { product_environment_id?: string | undefined; uri_type: UriType; uri: string; - event_type?: string | undefined; + event_type?: EventType | undefined; created_at?: string | undefined; updated_at?: string | undefined; }; export const TriggerInfo$zodSchema: z.ZodType = z.object({ created_at: z.iso.datetime({ offset: true }).optional(), - event_type: z.string().optional(), + event_type: EventType$zodSchema.optional().describe( + "The type of notification event.", + ), id: z.string().optional(), product_environment_id: z.string().optional(), updated_at: z.iso.datetime({ offset: true }).optional(), diff --git a/src/models/triggerlistresponse.ts b/src/models/triggerlistresponse.ts new file mode 100644 index 0000000..6a73800 --- /dev/null +++ b/src/models/triggerlistresponse.ts @@ -0,0 +1,22 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { TriggerInfo, TriggerInfo$zodSchema } from "./triggerinfo.js"; + +/** + * List response for triggers. + */ +export type TriggerListResponse = { + triggers: Array; + total: number; +}; + +export const TriggerListResponse$zodSchema: z.ZodType = z + .object({ + total: z.int().describe("Total number of triggers."), + triggers: z.array(TriggerInfo$zodSchema).describe( + "List of trigger objects.", + ), + }).describe("List response for triggers."); diff --git a/src/models/updaterequest.ts b/src/models/updaterequest.ts index d7d3248..cfd3114 100644 --- a/src/models/updaterequest.ts +++ b/src/models/updaterequest.ts @@ -10,6 +10,10 @@ export type UpdateRequest = { }; export const UpdateRequest$zodSchema: z.ZodType = z.object({ - allowed_for_strict: z.boolean().optional(), - unsafe_update: z.string().optional(), + allowed_for_strict: z.boolean().optional().describe( + "Whether to allow this named transformation when strict transformations are enabled. Strict transformations prevent transformations from being dynamically applied to media assets.\n", + ), + unsafe_update: z.string().optional().describe( + "Required when modifying the transformation parameters of an existing named transformation. The new transformation definition for the named transformation.\nBecause the changed definition can be unsafe for (significantly change) assets in production, the change is applied only to newly generated derived assets that reference this named transformation.\n\nTo apply the change to existing derived assets using this named transformation, invalidate them so that they'll be regenerated with the new definition when next requested.\n", + ), }); diff --git a/src/models/updatestreamingprofileop.ts b/src/models/updatestreamingprofileop.ts index d569834..97bd809 100644 --- a/src/models/updatestreamingprofileop.ts +++ b/src/models/updatestreamingprofileop.ts @@ -4,14 +4,14 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; -import { - StreamingProfile, - StreamingProfile$zodSchema, -} from "./streamingprofile.js"; import { StreamingProfileUpdate, StreamingProfileUpdate$zodSchema, } from "./streamingprofileupdate.js"; +import { + StreamingProfileUpdateResponse, + StreamingProfileUpdateResponse$zodSchema, +} from "./streamingprofileupdateresponse.js"; export type UpdateStreamingProfileGlobals = { cloud_name?: string | undefined }; @@ -30,32 +30,19 @@ export type UpdateStreamingProfileRequest = { export const UpdateStreamingProfileRequest$zodSchema: z.ZodType< UpdateStreamingProfileRequest > = z.object({ - name: z.string(), - streaming_profile_update: StreamingProfileUpdate$zodSchema, + name: z.string().describe("The name of the streaming profile."), + streaming_profile_update: StreamingProfileUpdate$zodSchema.describe( + "The updated streaming profile configuration.", + ), }); -/** - * Streaming profile updated - */ -export type UpdateStreamingProfileResponseBody = { - message: string; - data: StreamingProfile; -}; - -export const UpdateStreamingProfileResponseBody$zodSchema: z.ZodType< - UpdateStreamingProfileResponseBody -> = z.object({ - data: StreamingProfile$zodSchema, - message: z.string(), -}).describe("Streaming profile updated"); - export type UpdateStreamingProfileResponse = - | UpdateStreamingProfileResponseBody + | StreamingProfileUpdateResponse | ApiError; export const UpdateStreamingProfileResponse$zodSchema: z.ZodType< UpdateStreamingProfileResponse > = z.union([ - z.lazy(() => UpdateStreamingProfileResponseBody$zodSchema), + StreamingProfileUpdateResponse$zodSchema, ApiError$zodSchema, ]); diff --git a/src/models/updatetransformationop.ts b/src/models/updatetransformationop.ts index ebeb0c6..b813873 100644 --- a/src/models/updatetransformationop.ts +++ b/src/models/updatetransformationop.ts @@ -4,6 +4,10 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; +import { + MessageResponse, + MessageResponse$zodSchema, +} from "./messageresponse.js"; import { UpdateRequest, UpdateRequest$zodSchema } from "./updaterequest.js"; export type UpdateTransformationGlobals = { cloud_name?: string | undefined }; @@ -26,27 +30,16 @@ export const UpdateTransformationRequest$zodSchema: z.ZodType< transformation: z.string().describe( "The transformation identifier. Can be either a named transformation (e.g., 'small_profile_thumbnail') or a transformation string (e.g., 'w_100,h_150,c_fill,g_auto').\n", ), - update_request: UpdateRequest$zodSchema, + update_request: UpdateRequest$zodSchema.describe( + "The updated transformation definition.", + ), }); -/** - * Transformation updated - */ -export type UpdateTransformationResponseBody = { message?: string | undefined }; - -export const UpdateTransformationResponseBody$zodSchema: z.ZodType< - UpdateTransformationResponseBody -> = z.object({ - message: z.string().optional(), -}).describe("Transformation updated"); - -export type UpdateTransformationResponse = - | ApiError - | UpdateTransformationResponseBody; +export type UpdateTransformationResponse = MessageResponse | ApiError; export const UpdateTransformationResponse$zodSchema: z.ZodType< UpdateTransformationResponse > = z.union([ + MessageResponse$zodSchema, ApiError$zodSchema, - z.lazy(() => UpdateTransformationResponseBody$zodSchema), ]); diff --git a/src/models/updatetriggerop.ts b/src/models/updatetriggerop.ts index 718044a..2d7040b 100644 --- a/src/models/updatetriggerop.ts +++ b/src/models/updatetriggerop.ts @@ -4,6 +4,14 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; +import { + MessageResponse, + MessageResponse$zodSchema, +} from "./messageresponse.js"; +import { + UpdateTriggerRequest, + UpdateTriggerRequest$zodSchema, +} from "./updatetriggerrequest.js"; export type UpdateTriggerGlobals = { cloud_name?: string | undefined }; @@ -14,40 +22,24 @@ export const UpdateTriggerGlobals$zodSchema: z.ZodType = z ).optional(), }); -export type UpdateTriggerRequestBody = { new_uri: string }; - -export const UpdateTriggerRequestBody$zodSchema: z.ZodType< - UpdateTriggerRequestBody -> = z.object({ - new_uri: z.string(), -}); - -export type UpdateTriggerRequest = { +export type UpdateTriggerRequestRequest = { id: string; - RequestBody: UpdateTriggerRequestBody; + update_trigger_request: UpdateTriggerRequest; }; -export const UpdateTriggerRequest$zodSchema: z.ZodType = z - .object({ - RequestBody: z.lazy(() => UpdateTriggerRequestBody$zodSchema), - id: z.string(), - }); - -/** - * Trigger updated successfully - */ -export type UpdateTriggerResponseBody = { message: string }; - -export const UpdateTriggerResponseBody$zodSchema: z.ZodType< - UpdateTriggerResponseBody +export const UpdateTriggerRequestRequest$zodSchema: z.ZodType< + UpdateTriggerRequestRequest > = z.object({ - message: z.string(), -}).describe("Trigger updated successfully"); + id: z.string().describe("The ID of the trigger."), + update_trigger_request: UpdateTriggerRequest$zodSchema.describe( + "The updated trigger configuration.", + ), +}); -export type UpdateTriggerResponse = UpdateTriggerResponseBody | ApiError; +export type UpdateTriggerResponse = MessageResponse | ApiError; export const UpdateTriggerResponse$zodSchema: z.ZodType = z.union([ - z.lazy(() => UpdateTriggerResponseBody$zodSchema), + MessageResponse$zodSchema, ApiError$zodSchema, ]); diff --git a/src/models/updatetriggerrequest.ts b/src/models/updatetriggerrequest.ts new file mode 100644 index 0000000..4abe029 --- /dev/null +++ b/src/models/updatetriggerrequest.ts @@ -0,0 +1,14 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type UpdateTriggerRequest = { new_uri: string }; + +export const UpdateTriggerRequest$zodSchema: z.ZodType = z + .object({ + new_uri: z.string().describe( + "The updated URL that will receive the notification response.", + ), + }); diff --git a/src/models/updateuploadmappingop.ts b/src/models/updateuploadmappingop.ts index a97e46d..b592c1e 100644 --- a/src/models/updateuploadmappingop.ts +++ b/src/models/updateuploadmappingop.ts @@ -4,6 +4,10 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; +import { + UploadMappingMutationResponse, + UploadMappingMutationResponse$zodSchema, +} from "./uploadmappingmutationresponse.js"; export type UpdateUploadMappingGlobals = { cloud_name?: string | undefined }; @@ -14,37 +18,13 @@ export const UpdateUploadMappingGlobals$zodSchema: z.ZodType< .optional(), }); -export type UpdateUploadMappingRequest = { folder: string; template: string }; - -export const UpdateUploadMappingRequest$zodSchema: z.ZodType< - UpdateUploadMappingRequest -> = z.object({ - folder: z.string(), - template: z.string(), -}); - -/** - * Upload mapping updated successfully - */ -export type UpdateUploadMappingResponseBody = { - message: string; - external_id: string; -}; - -export const UpdateUploadMappingResponseBody$zodSchema: z.ZodType< - UpdateUploadMappingResponseBody -> = z.object({ - external_id: z.string(), - message: z.string(), -}).describe("Upload mapping updated successfully"); - export type UpdateUploadMappingResponse = - | UpdateUploadMappingResponseBody + | UploadMappingMutationResponse | ApiError; export const UpdateUploadMappingResponse$zodSchema: z.ZodType< UpdateUploadMappingResponse > = z.union([ - z.lazy(() => UpdateUploadMappingResponseBody$zodSchema), + UploadMappingMutationResponse$zodSchema, ApiError$zodSchema, ]); diff --git a/src/models/updateuploadpresetop.ts b/src/models/updateuploadpresetop.ts index db96453..e36e44c 100644 --- a/src/models/updateuploadpresetop.ts +++ b/src/models/updateuploadpresetop.ts @@ -4,7 +4,14 @@ import * as z from "zod"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; -import { UploadPreset, UploadPreset$zodSchema } from "./uploadpreset.js"; +import { + UploadPresetInput, + UploadPresetInput$zodSchema, +} from "./uploadpresetinput.js"; +import { + UploadPresetMutationResponse, + UploadPresetMutationResponse$zodSchema, +} from "./uploadpresetmutationresponse.js"; export type UpdateUploadPresetGlobals = { cloud_name?: string | undefined }; @@ -17,38 +24,25 @@ export const UpdateUploadPresetGlobals$zodSchema: z.ZodType< export type UpdateUploadPresetRequest = { name: string; - upload_preset: UploadPreset; + upload_preset_input: UploadPresetInput; }; export const UpdateUploadPresetRequest$zodSchema: z.ZodType< UpdateUploadPresetRequest > = z.object({ - name: z.string(), - upload_preset: UploadPreset$zodSchema, + name: z.string().describe("The name of the upload preset."), + upload_preset_input: UploadPresetInput$zodSchema.describe( + "The updated upload preset configuration.", + ), }); -/** - * upload preset updated - */ -export type UpdateUploadPresetResponseBody = { - message: string; - external_id: string; -}; - -export const UpdateUploadPresetResponseBody$zodSchema: z.ZodType< - UpdateUploadPresetResponseBody -> = z.object({ - external_id: z.string(), - message: z.string(), -}).describe("upload preset updated"); - export type UpdateUploadPresetResponse = - | UpdateUploadPresetResponseBody + | UploadPresetMutationResponse | ApiError; export const UpdateUploadPresetResponse$zodSchema: z.ZodType< UpdateUploadPresetResponse > = z.union([ - z.lazy(() => UpdateUploadPresetResponseBody$zodSchema), + UploadPresetMutationResponse$zodSchema, ApiError$zodSchema, ]); diff --git a/src/models/uploaddeliverytype.ts b/src/models/uploaddeliverytype.ts new file mode 100644 index 0000000..96947e6 --- /dev/null +++ b/src/models/uploaddeliverytype.ts @@ -0,0 +1,24 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + AssetDeliveryType, + AssetDeliveryType$zodSchema, +} from "./assetdeliverytype.js"; +import { + ManagedDeliveryType, + ManagedDeliveryType$zodSchema, +} from "./manageddeliverytype.js"; + +/** + * Delivery types accepted by upload and rename operations. + */ +export type UploadDeliveryType = ManagedDeliveryType | AssetDeliveryType; + +export const UploadDeliveryType$zodSchema: z.ZodType = z + .union([ + ManagedDeliveryType$zodSchema, + AssetDeliveryType$zodSchema, + ]).describe("Delivery types accepted by upload and rename operations."); diff --git a/src/models/uploadmapping.ts b/src/models/uploadmapping.ts index eed0e55..ffabf4b 100644 --- a/src/models/uploadmapping.ts +++ b/src/models/uploadmapping.ts @@ -15,8 +15,10 @@ export type UploadMapping = { }; export const UploadMapping$zodSchema: z.ZodType = z.object({ - external_id: z.string(), - folder: z.string(), - template: z.string(), - upload_preset_name: z.string().nullable().optional(), + external_id: z.string().describe("Unique identifier for the mapping"), + folder: z.string().describe("The folder name"), + template: z.string().describe("The template URL"), + upload_preset_name: z.string().nullable().optional().describe( + "Name of an upload preset if one is associated", + ), }).describe("Represents an upload mapping"); diff --git a/src/models/uploadmappingcreateresponse.ts b/src/models/uploadmappingcreateresponse.ts new file mode 100644 index 0000000..4b0fc69 --- /dev/null +++ b/src/models/uploadmappingcreateresponse.ts @@ -0,0 +1,19 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type UploadMappingCreateResponse = { + message: string; + folder: string; + external_id: string; +}; + +export const UploadMappingCreateResponse$zodSchema: z.ZodType< + UploadMappingCreateResponse +> = z.object({ + external_id: z.string().describe("Unique identifier for the mapping."), + folder: z.string().describe("The folder name that was created."), + message: z.string(), +}); diff --git a/src/models/uploadmappinginput.ts b/src/models/uploadmappinginput.ts new file mode 100644 index 0000000..08532bc --- /dev/null +++ b/src/models/uploadmappinginput.ts @@ -0,0 +1,13 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type UploadMappingInput = { folder: string; template: string }; + +export const UploadMappingInput$zodSchema: z.ZodType = z + .object({ + folder: z.string().describe("The folder name for the mapping."), + template: z.string().describe("The template URL."), + }); diff --git a/src/models/uploadmappinglistresponse.ts b/src/models/uploadmappinglistresponse.ts new file mode 100644 index 0000000..9518fff --- /dev/null +++ b/src/models/uploadmappinglistresponse.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { UploadMapping, UploadMapping$zodSchema } from "./uploadmapping.js"; + +/** + * List response for upload mappings. + */ +export type UploadMappingListResponse = { + mappings: Array; + total_entries: number; + next_cursor?: string | undefined; +}; + +export const UploadMappingListResponse$zodSchema: z.ZodType< + UploadMappingListResponse +> = z.object({ + mappings: z.array(UploadMapping$zodSchema).describe( + "Array of upload mapping objects.", + ), + next_cursor: z.string().optional().describe( + "Cursor for getting the next page of results.", + ), + total_entries: z.int().describe("Total number of mappings."), +}).describe("List response for upload mappings."); diff --git a/src/models/uploadmappingmutationresponse.ts b/src/models/uploadmappingmutationresponse.ts new file mode 100644 index 0000000..94fe0dd --- /dev/null +++ b/src/models/uploadmappingmutationresponse.ts @@ -0,0 +1,17 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type UploadMappingMutationResponse = { + message: string; + external_id: string; +}; + +export const UploadMappingMutationResponse$zodSchema: z.ZodType< + UploadMappingMutationResponse +> = z.object({ + external_id: z.string().describe("Unique identifier of the mapping."), + message: z.string(), +}); diff --git a/src/models/uploadpreset.ts b/src/models/uploadpreset.ts deleted file mode 100644 index 2e6d7fe..0000000 --- a/src/models/uploadpreset.ts +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { ClosedEnum } from "../types/enums.js"; -import { - AccessControlItem, - AccessControlItem$zodSchema, -} from "./accesscontrolitem.js"; - -/** - * Configuration object for automatic video transcription with translation options. - */ -export type AutoTranscription = { translate?: Array | undefined }; - -export const AutoTranscription$zodSchema: z.ZodType = z - .object({ - translate: z.array(z.string()).optional(), - }).describe( - "Configuration object for automatic video transcription with translation options.", - ); - -export type AutoTranscriptionUnion = boolean | AutoTranscription; - -export const AutoTranscriptionUnion$zodSchema: z.ZodType< - AutoTranscriptionUnion -> = z.union([ - z.boolean(), - z.lazy(() => AutoTranscription$zodSchema), -]); - -export type ResponsiveBreakpoint = { - create_derived?: boolean | undefined; - max_width?: number | undefined; - min_width?: number | undefined; - bytes_step?: number | undefined; - max_images?: number | undefined; - transformation?: string | undefined; -}; - -export const ResponsiveBreakpoint$zodSchema: z.ZodType = z - .object({ - bytes_step: z.int().optional(), - create_derived: z.boolean().optional(), - max_images: z.int().optional(), - max_width: z.int().optional(), - min_width: z.int().optional(), - transformation: z.string().optional(), - }); - -/** - * The delivery type that defines if and how the uploaded asset is available for public delivery. By default, all uploaded assets are public (upload). Possible values are upload, authenticated, private or asset. - */ -export const Type = { - Upload: "upload", - Authenticated: "authenticated", - Private: "private", - Asset: "asset", -} as const; -/** - * The delivery type that defines if and how the uploaded asset is available for public delivery. By default, all uploaded assets are public (upload). Possible values are upload, authenticated, private or asset. - */ -export type Type = ClosedEnum; - -export const Type$zodSchema = z.enum([ - "upload", - "authenticated", - "private", - "asset", -]).describe( - "The delivery type that defines if and how the uploaded asset is available for public delivery. By default, all uploaded assets are public (upload). Possible values are upload, authenticated, private or asset.", -); - -/** - * Allows the asset to behave as if it's of the authenticated 'type' (see above) while still using the default 'upload' type in delivery URLs. The asset can later be made public by changing its access_mode via the Admin API, without having to update any delivery URLs. Valid values: public, and authenticated. - * - * @remarks - * - * @deprecated enum: The access_mode parameter is no longer supported. To restrict access to assets, you can use the access_control parameter.. Use access_control instead. - */ -export const AccessMode = { - Public: "public", - Authenticated: "authenticated", -} as const; -/** - * Allows the asset to behave as if it's of the authenticated 'type' (see above) while still using the default 'upload' type in delivery URLs. The asset can later be made public by changing its access_mode via the Admin API, without having to update any delivery URLs. Valid values: public, and authenticated. - * - * @remarks - * - * @deprecated enum: The access_mode parameter is no longer supported. To restrict access to assets, you can use the access_control parameter.. Use access_control instead. - */ -export type AccessMode = ClosedEnum; - -export const AccessMode$zodSchema = z.enum([ - "public", - "authenticated", -]).describe( - "Allows the asset to behave as if it's of the authenticated 'type' (see above) while still using the default 'upload' type in delivery URLs. The asset can later be made public by changing its access_mode via the Admin API, without having to update any delivery URLs. Valid values: public, and authenticated.\n", -); - -export const ParameterWhitelistEnum = { - None: "none", -} as const; -export type ParameterWhitelistEnum = ClosedEnum; - -export const ParameterWhitelistEnum$zodSchema = z.enum([ - "none", -]); - -/** - * The parameters that are allowed be used in an upload request utilizing this preset. If not specified or empty array, all parameters are allowed. If "none", no parameters are allowed. - * - * @remarks - */ -export type ParameterWhitelist = Array | ParameterWhitelistEnum; - -export const ParameterWhitelist$zodSchema: z.ZodType = z - .union([ - z.array(z.string()), - ParameterWhitelistEnum$zodSchema, - ]).describe( - "The parameters that are allowed be used in an upload request utilizing this preset. If not specified or empty array, all parameters are allowed. If \"none\", no parameters are allowed.\n", - ); - -export type UploadPreset = { - accessibility_analysis?: boolean | undefined; - asset_folder?: string | undefined; - async?: boolean | undefined; - auto_chaptering?: boolean | undefined; - auto_transcription?: boolean | AutoTranscription | undefined; - cinemagraph_analysis?: boolean | undefined; - colors?: boolean | undefined; - context?: string | undefined; - custom_coordinates?: string | undefined; - display_name?: string | undefined; - eager?: string | undefined; - eager_async?: boolean | undefined; - eager_notification_url?: string | undefined; - face_coordinates?: string | undefined; - faces?: boolean | undefined; - headers?: string | undefined; - invalidate?: boolean | undefined; - media_metadata?: boolean | undefined; - metadata?: string | undefined; - moderation?: string | undefined; - notification_url?: string | undefined; - phash?: boolean | undefined; - quality_analysis?: boolean | undefined; - regions?: string | undefined; - responsive_breakpoints?: Array | undefined; - tags?: string | undefined; - callback?: string | undefined; - backup?: boolean | undefined; - discard_original_filename?: boolean | undefined; - overwrite?: boolean | undefined; - return_delete_token?: boolean | undefined; - type?: Type | undefined; - access_mode?: AccessMode | undefined; - categorization?: string | undefined; - ocr?: string | undefined; - raw_convert?: string | undefined; - background_removal?: string | undefined; - public_id?: string | undefined; - transformation?: string | undefined; - format?: string | undefined; - proxy?: string | undefined; - folder?: string | undefined; - allowed_formats?: string | undefined; - auto_tagging?: number | undefined; - access_control?: Array | undefined; - eval?: string | undefined; - detection?: string | undefined; - filename_override?: string | undefined; - public_id_prefix?: string | undefined; - use_asset_folder_as_public_id_prefix?: boolean | undefined; - unique_display_name?: boolean | undefined; - visual_search?: boolean | undefined; - use_filename_as_display_name?: boolean | undefined; - use_filename?: boolean | undefined; - unique_filename?: boolean | undefined; - upload_preset?: string | undefined; - on_success?: string | undefined; - name?: string | undefined; - disallow_public_id?: boolean | undefined; - unsigned?: boolean | undefined; - parameter_whitelist?: Array | ParameterWhitelistEnum | undefined; -}; - -export const UploadPreset$zodSchema: z.ZodType = z.object({ - access_control: z.array(AccessControlItem$zodSchema).optional(), - access_mode: AccessMode$zodSchema.optional(), - accessibility_analysis: z.boolean().optional(), - allowed_formats: z.string().optional(), - asset_folder: z.string().optional(), - async: z.boolean().optional(), - auto_chaptering: z.boolean().optional(), - auto_tagging: z.number().optional(), - auto_transcription: z.union([ - z.boolean(), - z.lazy(() => AutoTranscription$zodSchema), - ]).optional(), - background_removal: z.string().optional(), - backup: z.boolean().optional(), - callback: z.string().optional(), - categorization: z.string().optional(), - cinemagraph_analysis: z.boolean().optional(), - colors: z.boolean().default(false), - context: z.string().optional(), - custom_coordinates: z.string().optional(), - detection: z.string().optional(), - disallow_public_id: z.boolean().optional(), - discard_original_filename: z.boolean().optional(), - display_name: z.string().optional(), - eager: z.string().optional(), - eager_async: z.boolean().optional(), - eager_notification_url: z.string().optional(), - eval: z.string().optional(), - face_coordinates: z.string().optional(), - faces: z.boolean().optional(), - filename_override: z.string().optional(), - folder: z.string().optional(), - format: z.string().optional(), - headers: z.string().optional(), - invalidate: z.boolean().optional(), - media_metadata: z.boolean().optional(), - metadata: z.string().optional(), - moderation: z.string().optional(), - name: z.string().optional(), - notification_url: z.string().optional(), - ocr: z.string().optional(), - on_success: z.string().optional(), - overwrite: z.boolean().optional(), - parameter_whitelist: z.union([ - z.array(z.string()), - ParameterWhitelistEnum$zodSchema, - ]).optional(), - phash: z.boolean().optional(), - proxy: z.string().optional(), - public_id: z.string().optional(), - public_id_prefix: z.string().optional(), - quality_analysis: z.boolean().optional(), - raw_convert: z.string().optional(), - regions: z.string().optional(), - responsive_breakpoints: z.array(z.lazy(() => ResponsiveBreakpoint$zodSchema)) - .optional(), - return_delete_token: z.boolean().optional(), - tags: z.string().optional(), - transformation: z.string().optional(), - type: Type$zodSchema.optional(), - unique_display_name: z.boolean().optional(), - unique_filename: z.boolean().optional(), - unsigned: z.boolean().optional(), - upload_preset: z.string().optional(), - use_asset_folder_as_public_id_prefix: z.boolean().optional(), - use_filename: z.boolean().optional(), - use_filename_as_display_name: z.boolean().optional(), - visual_search: z.boolean().optional(), -}); diff --git a/src/models/uploadpresetcreateresponse.ts b/src/models/uploadpresetcreateresponse.ts new file mode 100644 index 0000000..70077e6 --- /dev/null +++ b/src/models/uploadpresetcreateresponse.ts @@ -0,0 +1,21 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type UploadPresetCreateResponse = { + message: string; + name: string; + external_id: string; +}; + +export const UploadPresetCreateResponse$zodSchema: z.ZodType< + UploadPresetCreateResponse +> = z.object({ + external_id: z.string().describe( + "The unique identifier for the upload preset.", + ), + message: z.string().describe("The result message."), + name: z.string().describe("The name of the created upload preset."), +}); diff --git a/src/models/uploadpresetdetail.ts b/src/models/uploadpresetdetail.ts new file mode 100644 index 0000000..18b725a --- /dev/null +++ b/src/models/uploadpresetdetail.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + UploadPresetParsedSettings, + UploadPresetParsedSettings$zodSchema, +} from "./uploadpresetparsedsettings.js"; + +/** + * An upload preset as returned by the GET endpoint. Settings values are parsed into their proper types (e.g., tags become arrays, context becomes an object, booleans become true booleans). + */ +export type UploadPresetDetail = { + name: string; + unsigned?: boolean | undefined; + settings?: UploadPresetParsedSettings | undefined; + external_id: string; +}; + +export const UploadPresetDetail$zodSchema: z.ZodType = z + .object({ + external_id: z.string().describe( + "The unique identifier for the upload preset.", + ), + name: z.string().describe("The name of the upload preset."), + settings: UploadPresetParsedSettings$zodSchema.optional().describe( + "Parsed preset configuration settings. Composed from base parameters (stable types) plus parsed serializable fields (arrays/objects instead of strings).", + ), + unsigned: z.boolean().optional().describe( + "Whether the upload preset allows unsigned uploads.", + ), + }).describe( + "An upload preset as returned by the GET endpoint. Settings values are parsed into their proper types (e.g., tags become arrays, context becomes an object, booleans become true booleans).", + ); diff --git a/src/models/uploadpresetinput.ts b/src/models/uploadpresetinput.ts new file mode 100644 index 0000000..6733f1e --- /dev/null +++ b/src/models/uploadpresetinput.ts @@ -0,0 +1,413 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; +import { + AccessControlItem, + AccessControlItem$zodSchema, +} from "./accesscontrolitem.js"; +import { + ResponsiveBreakpoint, + ResponsiveBreakpoint$zodSchema, +} from "./responsivebreakpoint.js"; +import { + StructuredMetadataParam, + StructuredMetadataParam$zodSchema, +} from "./structuredmetadataparam.js"; +import { TagsParam, TagsParam$zodSchema } from "./tagsparam.js"; +import { + UploadDeliveryType, + UploadDeliveryType$zodSchema, +} from "./uploaddeliverytype.js"; + +/** + * Configuration object for automatic video transcription with translation options. + */ +export type UploadPresetInputAutoTranscription = { + translate?: Array | undefined; +}; + +export const UploadPresetInputAutoTranscription$zodSchema: z.ZodType< + UploadPresetInputAutoTranscription +> = z.object({ + translate: z.array(z.string()).optional().describe( + "Array of target language codes for transcription translation.", + ), +}).describe( + "Configuration object for automatic video transcription with translation options.", +); + +export type UploadPresetInputAutoTranscriptionUnion = + | boolean + | UploadPresetInputAutoTranscription; + +export const UploadPresetInputAutoTranscriptionUnion$zodSchema: z.ZodType< + UploadPresetInputAutoTranscriptionUnion +> = z.union([ + z.boolean(), + z.lazy(() => UploadPresetInputAutoTranscription$zodSchema), +]); + +/** + * 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. + * + * @remarks + * + * @deprecated enum: The access_mode parameter is no longer supported. To restrict access to assets, you can use the access_control parameter.. Use access_control instead. + */ +export const UploadPresetInputAccessMode = { + Public: "public", + Authenticated: "authenticated", +} as const; +/** + * 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. + * + * @remarks + * + * @deprecated enum: The access_mode parameter is no longer supported. To restrict access to assets, you can use the access_control parameter.. Use access_control instead. + */ +export type UploadPresetInputAccessMode = ClosedEnum< + typeof UploadPresetInputAccessMode +>; + +export const UploadPresetInputAccessMode$zodSchema = z.enum([ + "public", + "authenticated", +]).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.\n", +); + +/** + * Named region coordinate groups for cropping with region gravity. + * + * @remarks + * Can be a JSON-encoded string or an object. Each region name may contain + * only letters, numbers, or hyphens, and must have at least two coordinate pairs. + */ +export type UploadPresetInputRegions = string | { + [k: string]: Array>; +}; + +export const UploadPresetInputRegions$zodSchema: z.ZodType< + UploadPresetInputRegions +> = z.union([ + z.string(), + z.record(z.string(), z.array(z.array(z.int()))), +]).describe( + "Named region coordinate groups for cropping with region gravity.\nCan be a JSON-encoded string or an object. Each region name may contain\nonly letters, numbers, or hyphens, and must have at least two coordinate pairs.\n", +); + +/** + * Settings to automatically generate breakpoints for responsive images. + */ +export type UploadPresetInputResponsiveBreakpoints = + | Array + | ResponsiveBreakpoint; + +export const UploadPresetInputResponsiveBreakpoints$zodSchema: z.ZodType< + UploadPresetInputResponsiveBreakpoints +> = z.union([ + z.array(ResponsiveBreakpoint$zodSchema), + ResponsiveBreakpoint$zodSchema, +]).describe( + "Settings to automatically generate breakpoints for responsive images.", +); + +export const ParameterWhitelistEnum = { + None: "none", +} as const; +export type ParameterWhitelistEnum = ClosedEnum; + +export const ParameterWhitelistEnum$zodSchema = z.enum([ + "none", +]); + +/** + * The parameters that are allowed to be used in an upload request utilizing this preset. If not specified or empty array, all parameters are allowed. If "none", no parameters are allowed. + * + * @remarks + */ +export type ParameterWhitelist = Array | ParameterWhitelistEnum; + +export const ParameterWhitelist$zodSchema: z.ZodType = z + .union([ + z.array(z.string()), + ParameterWhitelistEnum$zodSchema, + ]).describe( + "The parameters that are allowed to be used in an upload request utilizing this preset. If not specified or empty array, all parameters are allowed. If \"none\", no parameters are allowed.\n", + ); + +/** + * Upload preset configuration for create/update. Settings are sent as top-level string-encoded properties. + */ +export type UploadPresetInput = { + accessibility_analysis?: boolean | undefined; + asset_folder?: string | undefined; + async?: boolean | undefined; + auto_chaptering?: boolean | undefined; + auto_tagging?: number | undefined; + auto_transcription?: boolean | UploadPresetInputAutoTranscription | undefined; + access_control?: Array | undefined; + access_mode?: UploadPresetInputAccessMode | undefined; + backup?: boolean | undefined; + background_removal?: string | undefined; + callback?: string | undefined; + categorization?: string | undefined; + cinemagraph_analysis?: boolean | undefined; + colors?: boolean | undefined; + detection?: string | undefined; + discard_original_filename?: boolean | undefined; + display_name?: string | undefined; + eager_async?: boolean | undefined; + eager_notification_url?: string | undefined; + eval?: string | undefined; + faces?: boolean | undefined; + filename_override?: string | undefined; + folder?: string | undefined; + format?: string | undefined; + invalidate?: boolean | undefined; + media_metadata?: boolean | undefined; + metadata?: StructuredMetadataParam | undefined; + clear_invalid?: boolean | undefined; + moderation?: string | undefined; + notification_url?: string | undefined; + ocr?: string | undefined; + on_success?: string | undefined; + overwrite?: boolean | undefined; + phash?: boolean | undefined; + proxy?: string | undefined; + public_id?: string | undefined; + public_id_prefix?: string | undefined; + quality_analysis?: boolean | undefined; + raw_convert?: string | undefined; + regions?: string | { [k: string]: Array> } | undefined; + responsive_breakpoints?: + | Array + | ResponsiveBreakpoint + | undefined; + return_delete_token?: boolean | undefined; + upload_preset?: string | undefined; + use_asset_folder_as_public_id_prefix?: boolean | undefined; + use_filename?: boolean | undefined; + use_filename_as_display_name?: boolean | undefined; + unique_display_name?: boolean | undefined; + unique_filename?: boolean | undefined; + visual_search?: boolean | undefined; + tags?: TagsParam | undefined; + context?: string | undefined; + eager?: string | undefined; + transformation?: string | undefined; + allowed_formats?: string | undefined; + headers?: string | undefined; + face_coordinates?: string | undefined; + custom_coordinates?: string | undefined; + type?: UploadDeliveryType | undefined; + name?: string | undefined; + disallow_public_id?: boolean | undefined; + unsigned?: boolean | undefined; + parameter_whitelist?: Array | ParameterWhitelistEnum | undefined; +}; + +export const UploadPresetInput$zodSchema: z.ZodType = z + .object({ + access_control: z.array(AccessControlItem$zodSchema).optional().describe( + "Restricts access to the asset by specifying one or more access types.\nThe asset is restricted unless at least one listed access type is valid.\n", + ), + access_mode: UploadPresetInputAccessMode$zodSchema.optional().describe( + "Deprecated. Use access_control instead. Allows the asset to behave as if it's of the authenticated delivery type while still using the default 'upload' type in delivery URLs. The asset can later be made public by changing its access_mode via the Admin API, without having to update any delivery URLs.\n", + ), + accessibility_analysis: z.boolean().optional().describe( + "Whether to return accessibility analysis values for the image.", + ), + allowed_formats: z.string().optional().describe( + "A comma-separated list of file formats that are allowed for uploading. Files of other types will be rejected. The formats can be any combination of image types, video formats or raw file extensions.\nNote: You can also add the `format` parameter to convert other file types instead of rejecting them. In this case, only files that would normally be rejected are converted, any file format allowed for upload won't be converted.\n", + ), + asset_folder: z.string().optional().describe( + "The asset folder to assign to the asset.", + ), + async: z.boolean().optional().describe( + "When set to true, returns the uploaded asset's public_id immediately in the response, before the upload is completed (asynchronously). Default: false.\n", + ), + auto_chaptering: z.boolean().optional().describe( + "Whether to trigger automatic generation of video chapters. Chapters will be generated and saved as a .vtt file with -chapters appended to the public ID of the video. You can enable chapters as part of the Cloudinary Video Player. Relevant for videos only.", + ), + auto_tagging: z.number().optional().describe( + "Automatically assigns tags to an asset according to detected objects or categories with a confidence score higher than the specified value.\nUse together with the detection parameter for:\n- Cloudinary AI Content Analysis\n- Amazon Rekognition Celebrity Detection\nUse together with the categorization parameter for:\n- Google Automatic Video Tagging\n- Google Auto Tagging\n- Imagga Auto Tagging\n- Amazon Rekognition Auto Tagging\n", + ), + auto_transcription: z.union([ + z.boolean(), + z.lazy(() => UploadPresetInputAutoTranscription$zodSchema), + ]).optional(), + background_removal: z.string().optional().describe( + "Automatically remove the background of an image using an add-on.\n- Set to cloudinary_ai to use the deep-learning based Cloudinary AI Background Removal add-on.\n Optionally append a template suffix (e.g., cloudinary_ai:fine_edges).\n- Note: this feature has been superseded by background removal on the fly.\n- Set to pixelz to use the human-powered Pixelz Remove-The-Background Editing add-on service.\nRelevant for images only.\n", + ), + backup: z.boolean().optional().describe( + "Whether to backup the uploaded asset. When set to true, backs up uploaded assets to a secondary storage bucket.", + ), + callback: z.string().optional().describe( + "A URL to redirect to after the upload/explicit is completed instead of returning the upload response.\nSigned upload result parameters are added to the callback URL. This parameter is ignored for XHR (Ajax XMLHttpRequest) or JavaScript Fetch API upload requests.\nNote: This parameter is relevant for direct uploads from a form in the browser. It is automatically set if you perform direct upload from the browser using Cloudinary's SDKs and the jQuery plugin.\n", + ), + categorization: z.string().optional().describe( + "A comma-separated list of the categorization add-ons to run on the asset.\nSet to google_tagging, google_video_tagging, imagga_tagging and/or aws_rek_tagging\nto automatically classify the scenes of the uploaded asset.\nOptionally append a language code suffix (e.g., google_tagging:fr).\n", + ), + cinemagraph_analysis: z.boolean().optional().describe( + "Whether to return a cinemagraph analysis value for the media asset between 0 and 1, where 0 means the asset is not a cinemagraph and 1 means the asset is a cinemagraph. Relevant for animated images and video only. A static image will return 0.", + ), + clear_invalid: z.boolean().default(false).describe( + "Whether to clear metadata field values that have become invalid due to a change in metadata rules. If false, the API returns an error if any existing metadata value is no longer valid. Default: false.", + ), + colors: z.boolean().default(false).describe( + "Whether to retrieve predominant colors & color histogram of the uploaded image. Note: If all returned colors are opaque, then 6-digit RGB hex values are returned. If one or more colors contain an alpha channel, then 8-digit RGBA hex quadruplet values are returned.", + ), + context: z.string().optional().describe( + "A pipe-separated list of key-value pairs of general textual context metadata to attach to the asset (e.g., \"alt=My image|caption=Nice photo\"). The =, \", and | characters can be escaped with a prepending backslash (\\).", + ), + custom_coordinates: z.string().optional().describe( + "Custom coordinates as comma-separated values, with multiple coordinates separated by pipes.", + ), + detection: z.string().optional().describe( + "Invokes the relevant add-on to return a list of detected content.\nSet to:\n- _[] (e.g. coco_v2) to return a list of detected content using the Cloudinary AI Content Analysis add-on. Can be used together with the auto_tagging parameter to apply tags automatically.\n- captioning to analyze an image and suggest a caption based on the image's contents.\n- iqa to analyze the quality of an image.\n- watermark-detection to detect watermarks in an image.\n- adv_face to return a list of facial attributes using the Advanced Facial Attribute Detection add-on.\n- aws_rek_face to return a list of detected celebrities and facial attributes using the Amazon Rekognition Celebrity Detection add-on. Can be used together with the auto_tagging parameter to apply tags automatically.\n", + ), + disallow_public_id: z.boolean().optional().describe( + "When using unsigned upload with an upload preset, this parameter prevents specifying a public ID. Relevant only for unsigned upload presets.\n", + ), + discard_original_filename: z.boolean().optional().describe( + "Whether to discard the name of the original uploaded file. Relevant when delivering assets as attachments (setting the flag disposition:attachment in delivery URLs).", + ), + display_name: z.string().optional().describe( + "A display name for the asset.", + ), + eager: z.string().optional().describe( + "A list of transformations to eagerly generate for the asset. Accepts either a single transformation or a pipe-separated list of transformations.", + ), + eager_async: z.boolean().optional().describe( + "Whether to generate the eager transformations asynchronously in the background after the upload request is completed rather than before the upload is completed.", + ), + eager_notification_url: z.string().optional().describe( + "A URL to notify when eager transformations are completed.", + ), + eval: z.string().optional().describe( + "Allows you to modify upload parameters by specifying custom logic with JavaScript. This can be useful for conditionally adding tags, contextual metadata, structured metadata or eager transformations depending on specific criteria of the uploaded file.", + ), + face_coordinates: z.string().optional().describe( + "Face coordinates as comma-separated values, with multiple faces separated by pipes.", + ), + faces: z.boolean().optional().describe( + "Whether to detect faces in the asset.", + ), + filename_override: z.string().optional().describe( + "Overrides the originally uploaded asset's file name in downloads that use flags like fl_attachment or fl_force_original.", + ), + folder: z.string().optional().describe( + "Folder name where the uploaded asset will be stored. This parameter applies when using the Admin API, or when specifying the upload preset for unsigned uploading with the Upload API.", + ), + format: z.string().optional().describe( + "An optional format to convert the uploaded asset to before saving in the cloud.", + ), + headers: z.string().optional().describe( + "An HTTP header or a list of headers lines for adding as response HTTP headers when delivering the asset to your users. Supported headers: Link, Authorization, X-Robots-Tag.\n", + ), + invalidate: z.boolean().optional().describe( + "Whether to invalidate CDN cache copies of a previously uploaded asset that shares the same public ID. Default: false.\n", + ), + media_metadata: z.boolean().optional().describe( + "Whether to return IPTC, XMP, and detailed Exif metadata of the uploaded asset in the response.\nSupported for images, video, and audio.\n- Returned metadata for images includes: PixelsPerUnitX, PixelsPerUnitY, PixelUnits, Colorspace, and DPI.\n- Returned metadata for audio and video includes: audio_codec, audio_bit_rate, audio_frequency, channels, channel_layout.\n- Additional metadata for video includes: pix_format, codec, level, profile, video_bit_rate, dar.\n", + ), + metadata: StructuredMetadataParam$zodSchema.optional().describe( + "A pipe-separated list or a map of custom metadata fields (by external_id) and the values to assign to each of them. The = \" and | characters can be supported as values when escaped with a prepended backslash (\\). For a multi-select field, you can set a maximum of 3000 different metadata values on an asset.\n", + ), + moderation: z.string().optional().describe( + "For all asset types, set to:\n- manual to add the uploaded asset to a list of pending assets that can be moderated using the Admin API or the Cloudinary Console.\n- perception_point to automatically moderate the uploaded asset using the Perception Point Malware Detection add-on.\n\nFor images only, set to:\n- webpurify to automatically moderate the uploaded image using the WebPurify Image Moderation add-on.\n- aws_rek to automatically moderate the uploaded image using the Amazon Rekognition AI Moderation add-on.\n- duplicate: to detect if the same or a similar image already exists using the Cloudinary Duplicate Image Detection add-on. Set threshold to a float greater than 0 and less than or equal to 1.0 to specify how similar an image needs to be in order to be considered a duplicate. Set threshold to 0 to add an image to the index of images that are searched when duplicate detection is invoked for another image.\n\nFor videos only, set to:\n- aws_rek_video to automatically moderate the uploaded video using the Amazon Rekognition Video Moderation add-on.\n- google_video_moderation automatically moderate the uploaded video using the Google AI Video Moderation add-on.\n\nTo request multiple moderations in a single API call:\n- Send the desired list of moderations as a pipe-separated string with manual moderation, if relevant, being last.\n\nNote: Rejected assets are automatically invalidated on the CDN within approximately ten minutes.\n", + ), + name: z.string().optional().describe( + "The name of the upload preset. If not provided on create, a random name is generated.", + ), + notification_url: z.string().optional().describe( + "A URL to notify when the asset is ready.", + ), + ocr: z.string().optional().describe( + "Set to adv_ocr to extract all text elements in an image as well as the bounding box\ncoordinates of each detected element using the OCR text detection and extraction add-on.\nOptionally append options (e.g., adv_ocr:document).\n", + ), + on_success: z.string().optional().describe( + "Allows you to update an asset by specifying custom logic with JavaScript that is executed after the upload to Cloudinary is completed successfully. This can be useful for conditionally adding tags, contextual metadata, and structured metadata, depending on the results of using the detection parameter on upload.", + ), + overwrite: z.boolean().optional().describe( + "Whether to overwrite existing assets with the same public ID. When set to false, return immediately if an asset with the same public ID already exists. Default: true (when using unsigned upload, the default is false and cannot be changed to true).\n", + ), + parameter_whitelist: z.union([ + z.array(z.string()), + ParameterWhitelistEnum$zodSchema, + ]).optional().describe( + "The parameters that are allowed to be used in an upload request utilizing this preset. If not specified or empty array, all parameters are allowed. If \"none\", no parameters are allowed.\n", + ), + phash: z.boolean().optional().describe( + "Whether to return the perceptual hash (pHash) on the uploaded image for image similarity detection.\n", + ), + proxy: z.string().optional().describe( + "A proxy to use for fetching remote URLs. The format should be http://hostname:port.", + ), + public_id: z.string().optional().describe( + "The identifier that is used for accessing the uploaded asset. If not specified, a unique ID is generated automatically.", + ), + public_id_prefix: z.string().optional().describe( + "A string or path that's automatically prepended to the public_id with a forward slash. The value can contain the same characters as the public_id including additional forward slashes. This prefix can be useful to provide context and improve the SEO of an asset's filename in the delivery URL, but the value does not impact the location where the asset is stored.", + ), + quality_analysis: z.boolean().optional().describe( + "Whether to return a quality analysis value for the image between 0 and 1, where 0 means the image is blurry and out of focus and 1 means the image is sharp and in focus. Relevant for images only.", + ), + raw_convert: z.string().optional().describe( + "Generates a related file based on the uploaded file.\n- Set to aspose to automatically create a PDF or other image format from a raw Office document using the Aspose Document Conversion add-on. (Asynchronous)\n- Set to google_speech to instruct the Google AI Video Transcription add-on to generate an automatic transcript raw file from an uploaded video. (Asynchronous)\n- Set to extract_text to extract all the text from a PDF file and store it in a raw JSON file with a public ID in the format: [pdf_public_id].extract_text.json. The full URL of the generated JSON file is included in the API response. Unlike the above raw_convert options, this option doesn't require registering for an add-on.(Synchronous)\n- Set to azure_video_indexer to generate AI-powered video insights from Microsoft Azure. (Asynchronous)\n", + ), + regions: z.union([ + z.string(), + z.record(z.string(), z.array(z.array(z.int()))), + ]).optional().describe( + "Named region coordinate groups for cropping with region gravity.\nCan be a JSON-encoded string or an object. Each region name may contain\nonly letters, numbers, or hyphens, and must have at least two coordinate pairs.\n", + ), + responsive_breakpoints: z.union([ + z.array(ResponsiveBreakpoint$zodSchema), + ResponsiveBreakpoint$zodSchema, + ]).optional().describe( + "Settings to automatically generate breakpoints for responsive images.", + ), + return_delete_token: z.boolean().optional().describe( + "Whether to return a deletion token in the upload response. The token can be used to delete the uploaded asset within approximately 10 minutes using an unauthenticated API call.", + ), + tags: TagsParam$zodSchema.optional().describe( + "A comma-separated list of tag names, or an array of tag names.", + ), + transformation: z.string().optional().describe( + "An incoming transformation to run on the uploaded asset before its storage. In contrast to eager, this parameter is applied before the file is stored.", + ), + type: UploadDeliveryType$zodSchema.optional().describe( + "The delivery type that defines if and how the uploaded asset is available for public delivery. By default, all uploaded assets are public (upload).", + ), + unique_display_name: z.boolean().optional().describe( + "Whether the display name should be unique.", + ), + unique_filename: z.boolean().optional().describe( + "When set to false and used together with use_filename, if an asset with the same file name already exists, no random characters are appended to the file name. Instead, the asset is overwritten. Default: true (random characters are added to the file name if needed).\n", + ), + unsigned: z.boolean().optional().describe( + "Whether the upload preset allows unsigned uploads.", + ), + upload_preset: z.string().optional().describe( + "Name of an upload preset that you defined for your Cloudinary product environment. An upload preset consists of upload parameters centrally managed using the Admin API or from the Upload Presets page of the Console Settings.", + ), + use_asset_folder_as_public_id_prefix: z.boolean().optional().describe( + "Whether to add the asset_folder value as a prefix to the public_id value (prepended with a forward slash). This ensures that the public ID path will always match the initial asset folder, and can help to retain the behavior that previously existed in fixed folder mode. However, keep in mind that even when this option is used during upload, an asset with a certain public ID path can later be moved to a completely different asset folder hierarchy without impacting the public ID. This option only ensures path matching for the initial upload. Relevant only when public_id_prefix (or folder) has not been separately specified.", + ), + use_filename: z.boolean().optional().describe( + "Whether to use the original file name of the uploaded asset if available for the public ID. The file name is normalized and random characters are appended to ensure uniqueness if the file name already exists. Default: false.\n", + ), + use_filename_as_display_name: z.boolean().optional().describe( + "Whether to automatically assign the original filename of the uploaded asset as the asset's display name. Relevant only if the display_name parameter isn't set.", + ), + visual_search: z.boolean().optional().describe( + "Whether to index the image for use with visual searches. Relevant for images only.", + ), + }).describe( + "Upload preset configuration for create/update. Settings are sent as top-level string-encoded properties.", + ); diff --git a/src/models/uploadpresetlistresponse.ts b/src/models/uploadpresetlistresponse.ts new file mode 100644 index 0000000..79f1903 --- /dev/null +++ b/src/models/uploadpresetlistresponse.ts @@ -0,0 +1,23 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + UploadPresetSummary, + UploadPresetSummary$zodSchema, +} from "./uploadpresetsummary.js"; + +export type UploadPresetListResponse = { + presets: Array; + next_cursor?: string | null | undefined; +}; + +export const UploadPresetListResponse$zodSchema: z.ZodType< + UploadPresetListResponse +> = z.object({ + next_cursor: z.string().nullable().optional().describe( + "Cursor for the next page of results.", + ), + presets: z.array(UploadPresetSummary$zodSchema), +}); diff --git a/src/models/uploadpresetmutationresponse.ts b/src/models/uploadpresetmutationresponse.ts new file mode 100644 index 0000000..f166054 --- /dev/null +++ b/src/models/uploadpresetmutationresponse.ts @@ -0,0 +1,21 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type UploadPresetMutationResponse = { + message: string; + external_id: string; +}; + +export const UploadPresetMutationResponse$zodSchema: z.ZodType< + UploadPresetMutationResponse +> = z.object({ + external_id: z.string().describe( + "The unique identifier for the upload preset.", + ), + message: z.string().describe( + "The result message (e.g., \"updated\" or \"deleted\").", + ), +}); diff --git a/src/models/uploadpresetparsedsettings.ts b/src/models/uploadpresetparsedsettings.ts new file mode 100644 index 0000000..df552b8 --- /dev/null +++ b/src/models/uploadpresetparsedsettings.ts @@ -0,0 +1,368 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../types/enums.js"; +import { + AccessControlItem, + AccessControlItem$zodSchema, +} from "./accesscontrolitem.js"; +import { + ResponsiveBreakpoint, + ResponsiveBreakpoint$zodSchema, +} from "./responsivebreakpoint.js"; +import { + StructuredMetadataParam, + StructuredMetadataParam$zodSchema, +} from "./structuredmetadataparam.js"; +import { + UploadDeliveryType, + UploadDeliveryType$zodSchema, +} from "./uploaddeliverytype.js"; + +/** + * Configuration object for automatic video transcription with translation options. + */ +export type UploadPresetParsedSettingsAutoTranscription = { + translate?: Array | undefined; +}; + +export const UploadPresetParsedSettingsAutoTranscription$zodSchema: z.ZodType< + UploadPresetParsedSettingsAutoTranscription +> = z.object({ + translate: z.array(z.string()).optional().describe( + "Array of target language codes for transcription translation.", + ), +}).describe( + "Configuration object for automatic video transcription with translation options.", +); + +export type UploadPresetParsedSettingsAutoTranscriptionUnion = + | boolean + | UploadPresetParsedSettingsAutoTranscription; + +export const UploadPresetParsedSettingsAutoTranscriptionUnion$zodSchema: + z.ZodType = z.union([ + z.boolean(), + z.lazy(() => UploadPresetParsedSettingsAutoTranscription$zodSchema), + ]); + +/** + * 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. + * + * @remarks + * + * @deprecated enum: The access_mode parameter is no longer supported. To restrict access to assets, you can use the access_control parameter.. Use access_control instead. + */ +export const UploadPresetParsedSettingsAccessMode = { + Public: "public", + Authenticated: "authenticated", +} as const; +/** + * 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. + * + * @remarks + * + * @deprecated enum: The access_mode parameter is no longer supported. To restrict access to assets, you can use the access_control parameter.. Use access_control instead. + */ +export type UploadPresetParsedSettingsAccessMode = ClosedEnum< + typeof UploadPresetParsedSettingsAccessMode +>; + +export const UploadPresetParsedSettingsAccessMode$zodSchema = z.enum([ + "public", + "authenticated", +]).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.\n", +); + +/** + * Named region coordinate groups for cropping with region gravity. + * + * @remarks + * Can be a JSON-encoded string or an object. Each region name may contain + * only letters, numbers, or hyphens, and must have at least two coordinate pairs. + */ +export type UploadPresetParsedSettingsRegions = string | { + [k: string]: Array>; +}; + +export const UploadPresetParsedSettingsRegions$zodSchema: z.ZodType< + UploadPresetParsedSettingsRegions +> = z.union([ + z.string(), + z.record(z.string(), z.array(z.array(z.int()))), +]).describe( + "Named region coordinate groups for cropping with region gravity.\nCan be a JSON-encoded string or an object. Each region name may contain\nonly letters, numbers, or hyphens, and must have at least two coordinate pairs.\n", +); + +/** + * Settings to automatically generate breakpoints for responsive images. + */ +export type UploadPresetParsedSettingsResponsiveBreakpoints = + | Array + | ResponsiveBreakpoint; + +export const UploadPresetParsedSettingsResponsiveBreakpoints$zodSchema: + z.ZodType = z.union([ + z.array(ResponsiveBreakpoint$zodSchema), + ResponsiveBreakpoint$zodSchema, + ]).describe( + "Settings to automatically generate breakpoints for responsive images.", + ); + +/** + * Parsed preset configuration settings. Composed from base parameters (stable types) plus parsed serializable fields (arrays/objects instead of strings). + */ +export type UploadPresetParsedSettings = { + accessibility_analysis?: boolean | undefined; + asset_folder?: string | undefined; + async?: boolean | undefined; + auto_chaptering?: boolean | undefined; + auto_tagging?: number | undefined; + auto_transcription?: + | boolean + | UploadPresetParsedSettingsAutoTranscription + | undefined; + access_control?: Array | undefined; + access_mode?: UploadPresetParsedSettingsAccessMode | undefined; + backup?: boolean | undefined; + background_removal?: string | undefined; + callback?: string | undefined; + categorization?: string | undefined; + cinemagraph_analysis?: boolean | undefined; + colors?: boolean | undefined; + detection?: string | undefined; + discard_original_filename?: boolean | undefined; + display_name?: string | undefined; + eager_async?: boolean | undefined; + eager_notification_url?: string | undefined; + eval?: string | undefined; + faces?: boolean | undefined; + filename_override?: string | undefined; + folder?: string | undefined; + format?: string | undefined; + invalidate?: boolean | undefined; + media_metadata?: boolean | undefined; + metadata?: StructuredMetadataParam | undefined; + clear_invalid?: boolean | undefined; + moderation?: string | undefined; + notification_url?: string | undefined; + ocr?: string | undefined; + on_success?: string | undefined; + overwrite?: boolean | undefined; + phash?: boolean | undefined; + proxy?: string | undefined; + public_id?: string | undefined; + public_id_prefix?: string | undefined; + quality_analysis?: boolean | undefined; + raw_convert?: string | undefined; + regions?: string | { [k: string]: Array> } | undefined; + responsive_breakpoints?: + | Array + | ResponsiveBreakpoint + | undefined; + return_delete_token?: boolean | undefined; + upload_preset?: string | undefined; + use_asset_folder_as_public_id_prefix?: boolean | undefined; + use_filename?: boolean | undefined; + use_filename_as_display_name?: boolean | undefined; + unique_display_name?: boolean | undefined; + unique_filename?: boolean | undefined; + visual_search?: boolean | undefined; + tags?: Array | null | undefined; + context?: { [k: string]: string } | null | undefined; + eager?: Array> | undefined; + transformation?: Array<{ [k: string]: any }> | undefined; + allowed_formats?: Array | undefined; + headers?: { [k: string]: string } | undefined; + face_coordinates?: Array> | undefined; + custom_coordinates?: Array> | undefined; + type?: UploadDeliveryType | undefined; +}; + +export const UploadPresetParsedSettings$zodSchema: z.ZodType< + UploadPresetParsedSettings +> = z.object({ + access_control: z.array(AccessControlItem$zodSchema).optional().describe( + "Restricts access to the asset by specifying one or more access types.\nThe asset is restricted unless at least one listed access type is valid.\n", + ), + access_mode: UploadPresetParsedSettingsAccessMode$zodSchema.optional() + .describe( + "Deprecated. Use access_control instead. Allows the asset to behave as if it's of the authenticated delivery type while still using the default 'upload' type in delivery URLs. The asset can later be made public by changing its access_mode via the Admin API, without having to update any delivery URLs.\n", + ), + accessibility_analysis: z.boolean().optional().describe( + "Whether to return accessibility analysis values for the image.", + ), + allowed_formats: z.array(z.string()).optional().describe( + "Parsed list of allowed file formats.", + ), + asset_folder: z.string().optional().describe( + "The asset folder to assign to the asset.", + ), + async: z.boolean().optional().describe( + "When set to true, returns the uploaded asset's public_id immediately in the response, before the upload is completed (asynchronously). Default: false.\n", + ), + auto_chaptering: z.boolean().optional().describe( + "Whether to trigger automatic generation of video chapters. Chapters will be generated and saved as a .vtt file with -chapters appended to the public ID of the video. You can enable chapters as part of the Cloudinary Video Player. Relevant for videos only.", + ), + auto_tagging: z.number().optional().describe( + "Automatically assigns tags to an asset according to detected objects or categories with a confidence score higher than the specified value.\nUse together with the detection parameter for:\n- Cloudinary AI Content Analysis\n- Amazon Rekognition Celebrity Detection\nUse together with the categorization parameter for:\n- Google Automatic Video Tagging\n- Google Auto Tagging\n- Imagga Auto Tagging\n- Amazon Rekognition Auto Tagging\n", + ), + auto_transcription: z.union([ + z.boolean(), + z.lazy(() => UploadPresetParsedSettingsAutoTranscription$zodSchema), + ]).optional(), + background_removal: z.string().optional().describe( + "Automatically remove the background of an image using an add-on.\n- Set to cloudinary_ai to use the deep-learning based Cloudinary AI Background Removal add-on.\n Optionally append a template suffix (e.g., cloudinary_ai:fine_edges).\n- Note: this feature has been superseded by background removal on the fly.\n- Set to pixelz to use the human-powered Pixelz Remove-The-Background Editing add-on service.\nRelevant for images only.\n", + ), + backup: z.boolean().optional().describe( + "Whether to backup the uploaded asset. When set to true, backs up uploaded assets to a secondary storage bucket.", + ), + callback: z.string().optional().describe( + "A URL to redirect to after the upload/explicit is completed instead of returning the upload response.\nSigned upload result parameters are added to the callback URL. This parameter is ignored for XHR (Ajax XMLHttpRequest) or JavaScript Fetch API upload requests.\nNote: This parameter is relevant for direct uploads from a form in the browser. It is automatically set if you perform direct upload from the browser using Cloudinary's SDKs and the jQuery plugin.\n", + ), + categorization: z.string().optional().describe( + "A comma-separated list of the categorization add-ons to run on the asset.\nSet to google_tagging, google_video_tagging, imagga_tagging and/or aws_rek_tagging\nto automatically classify the scenes of the uploaded asset.\nOptionally append a language code suffix (e.g., google_tagging:fr).\n", + ), + cinemagraph_analysis: z.boolean().optional().describe( + "Whether to return a cinemagraph analysis value for the media asset between 0 and 1, where 0 means the asset is not a cinemagraph and 1 means the asset is a cinemagraph. Relevant for animated images and video only. A static image will return 0.", + ), + clear_invalid: z.boolean().default(false).describe( + "Whether to clear metadata field values that have become invalid due to a change in metadata rules. If false, the API returns an error if any existing metadata value is no longer valid. Default: false.", + ), + colors: z.boolean().default(false).describe( + "Whether to retrieve predominant colors & color histogram of the uploaded image. Note: If all returned colors are opaque, then 6-digit RGB hex values are returned. If one or more colors contain an alpha channel, then 8-digit RGBA hex quadruplet values are returned.", + ), + context: z.record(z.string(), z.string()).nullable().optional().describe( + "Parsed contextual metadata as key-value pairs.", + ), + custom_coordinates: z.array(z.array(z.number())).optional().describe( + "Parsed custom coordinate rectangles.", + ), + detection: z.string().optional().describe( + "Invokes the relevant add-on to return a list of detected content.\nSet to:\n- _[] (e.g. coco_v2) to return a list of detected content using the Cloudinary AI Content Analysis add-on. Can be used together with the auto_tagging parameter to apply tags automatically.\n- captioning to analyze an image and suggest a caption based on the image's contents.\n- iqa to analyze the quality of an image.\n- watermark-detection to detect watermarks in an image.\n- adv_face to return a list of facial attributes using the Advanced Facial Attribute Detection add-on.\n- aws_rek_face to return a list of detected celebrities and facial attributes using the Amazon Rekognition Celebrity Detection add-on. Can be used together with the auto_tagging parameter to apply tags automatically.\n", + ), + discard_original_filename: z.boolean().optional().describe( + "Whether to discard the name of the original uploaded file. Relevant when delivering assets as attachments (setting the flag disposition:attachment in delivery URLs).", + ), + display_name: z.string().optional().describe("A display name for the asset."), + eager: z.array(z.array(z.record(z.string(), z.any()))).optional().describe( + "Parsed eager transformations. Each item is an array of transformation step objects.", + ), + eager_async: z.boolean().optional().describe( + "Whether to generate the eager transformations asynchronously in the background after the upload request is completed rather than before the upload is completed.", + ), + eager_notification_url: z.string().optional().describe( + "A URL to notify when eager transformations are completed.", + ), + eval: z.string().optional().describe( + "Allows you to modify upload parameters by specifying custom logic with JavaScript. This can be useful for conditionally adding tags, contextual metadata, structured metadata or eager transformations depending on specific criteria of the uploaded file.", + ), + face_coordinates: z.array(z.array(z.number())).optional().describe( + "Parsed face coordinate rectangles.", + ), + faces: z.boolean().optional().describe( + "Whether to detect faces in the asset.", + ), + filename_override: z.string().optional().describe( + "Overrides the originally uploaded asset's file name in downloads that use flags like fl_attachment or fl_force_original.", + ), + folder: z.string().optional().describe( + "Folder name where the uploaded asset will be stored. This parameter applies when using the Admin API, or when specifying the upload preset for unsigned uploading with the Upload API.", + ), + format: z.string().optional().describe( + "An optional format to convert the uploaded asset to before saving in the cloud.", + ), + headers: z.record(z.string(), z.string()).optional().describe( + "Parsed custom HTTP headers as key-value pairs.", + ), + invalidate: z.boolean().optional().describe( + "Whether to invalidate CDN cache copies of a previously uploaded asset that shares the same public ID. Default: false.\n", + ), + media_metadata: z.boolean().optional().describe( + "Whether to return IPTC, XMP, and detailed Exif metadata of the uploaded asset in the response.\nSupported for images, video, and audio.\n- Returned metadata for images includes: PixelsPerUnitX, PixelsPerUnitY, PixelUnits, Colorspace, and DPI.\n- Returned metadata for audio and video includes: audio_codec, audio_bit_rate, audio_frequency, channels, channel_layout.\n- Additional metadata for video includes: pix_format, codec, level, profile, video_bit_rate, dar.\n", + ), + metadata: StructuredMetadataParam$zodSchema.optional().describe( + "A pipe-separated list or a map of custom metadata fields (by external_id) and the values to assign to each of them. The = \" and | characters can be supported as values when escaped with a prepended backslash (\\). For a multi-select field, you can set a maximum of 3000 different metadata values on an asset.\n", + ), + moderation: z.string().optional().describe( + "For all asset types, set to:\n- manual to add the uploaded asset to a list of pending assets that can be moderated using the Admin API or the Cloudinary Console.\n- perception_point to automatically moderate the uploaded asset using the Perception Point Malware Detection add-on.\n\nFor images only, set to:\n- webpurify to automatically moderate the uploaded image using the WebPurify Image Moderation add-on.\n- aws_rek to automatically moderate the uploaded image using the Amazon Rekognition AI Moderation add-on.\n- duplicate: to detect if the same or a similar image already exists using the Cloudinary Duplicate Image Detection add-on. Set threshold to a float greater than 0 and less than or equal to 1.0 to specify how similar an image needs to be in order to be considered a duplicate. Set threshold to 0 to add an image to the index of images that are searched when duplicate detection is invoked for another image.\n\nFor videos only, set to:\n- aws_rek_video to automatically moderate the uploaded video using the Amazon Rekognition Video Moderation add-on.\n- google_video_moderation automatically moderate the uploaded video using the Google AI Video Moderation add-on.\n\nTo request multiple moderations in a single API call:\n- Send the desired list of moderations as a pipe-separated string with manual moderation, if relevant, being last.\n\nNote: Rejected assets are automatically invalidated on the CDN within approximately ten minutes.\n", + ), + notification_url: z.string().optional().describe( + "A URL to notify when the asset is ready.", + ), + ocr: z.string().optional().describe( + "Set to adv_ocr to extract all text elements in an image as well as the bounding box\ncoordinates of each detected element using the OCR text detection and extraction add-on.\nOptionally append options (e.g., adv_ocr:document).\n", + ), + on_success: z.string().optional().describe( + "Allows you to update an asset by specifying custom logic with JavaScript that is executed after the upload to Cloudinary is completed successfully. This can be useful for conditionally adding tags, contextual metadata, and structured metadata, depending on the results of using the detection parameter on upload.", + ), + overwrite: z.boolean().optional().describe( + "Whether to overwrite existing assets with the same public ID. When set to false, return immediately if an asset with the same public ID already exists. Default: true (when using unsigned upload, the default is false and cannot be changed to true).\n", + ), + phash: z.boolean().optional().describe( + "Whether to return the perceptual hash (pHash) on the uploaded image for image similarity detection.\n", + ), + proxy: z.string().optional().describe( + "A proxy to use for fetching remote URLs. The format should be http://hostname:port.", + ), + public_id: z.string().optional().describe( + "The identifier that is used for accessing the uploaded asset. If not specified, a unique ID is generated automatically.", + ), + public_id_prefix: z.string().optional().describe( + "A string or path that's automatically prepended to the public_id with a forward slash. The value can contain the same characters as the public_id including additional forward slashes. This prefix can be useful to provide context and improve the SEO of an asset's filename in the delivery URL, but the value does not impact the location where the asset is stored.", + ), + quality_analysis: z.boolean().optional().describe( + "Whether to return a quality analysis value for the image between 0 and 1, where 0 means the image is blurry and out of focus and 1 means the image is sharp and in focus. Relevant for images only.", + ), + raw_convert: z.string().optional().describe( + "Generates a related file based on the uploaded file.\n- Set to aspose to automatically create a PDF or other image format from a raw Office document using the Aspose Document Conversion add-on. (Asynchronous)\n- Set to google_speech to instruct the Google AI Video Transcription add-on to generate an automatic transcript raw file from an uploaded video. (Asynchronous)\n- Set to extract_text to extract all the text from a PDF file and store it in a raw JSON file with a public ID in the format: [pdf_public_id].extract_text.json. The full URL of the generated JSON file is included in the API response. Unlike the above raw_convert options, this option doesn't require registering for an add-on.(Synchronous)\n- Set to azure_video_indexer to generate AI-powered video insights from Microsoft Azure. (Asynchronous)\n", + ), + regions: z.union([ + z.string(), + z.record(z.string(), z.array(z.array(z.int()))), + ]).optional().describe( + "Named region coordinate groups for cropping with region gravity.\nCan be a JSON-encoded string or an object. Each region name may contain\nonly letters, numbers, or hyphens, and must have at least two coordinate pairs.\n", + ), + responsive_breakpoints: z.union([ + z.array(ResponsiveBreakpoint$zodSchema), + ResponsiveBreakpoint$zodSchema, + ]).optional().describe( + "Settings to automatically generate breakpoints for responsive images.", + ), + return_delete_token: z.boolean().optional().describe( + "Whether to return a deletion token in the upload response. The token can be used to delete the uploaded asset within approximately 10 minutes using an unauthenticated API call.", + ), + tags: z.array(z.string()).nullable().optional().describe("Parsed tag names."), + transformation: z.array(z.record(z.string(), z.any())).optional().describe( + "Parsed incoming transformation steps.", + ), + type: UploadDeliveryType$zodSchema.optional().describe( + "The delivery type that defines if and how the uploaded asset is available for public delivery. By default, all uploaded assets are public (upload).", + ), + unique_display_name: z.boolean().optional().describe( + "Whether the display name should be unique.", + ), + unique_filename: z.boolean().optional().describe( + "When set to false and used together with use_filename, if an asset with the same file name already exists, no random characters are appended to the file name. Instead, the asset is overwritten. Default: true (random characters are added to the file name if needed).\n", + ), + upload_preset: z.string().optional().describe( + "Name of an upload preset that you defined for your Cloudinary product environment. An upload preset consists of upload parameters centrally managed using the Admin API or from the Upload Presets page of the Console Settings.", + ), + use_asset_folder_as_public_id_prefix: z.boolean().optional().describe( + "Whether to add the asset_folder value as a prefix to the public_id value (prepended with a forward slash). This ensures that the public ID path will always match the initial asset folder, and can help to retain the behavior that previously existed in fixed folder mode. However, keep in mind that even when this option is used during upload, an asset with a certain public ID path can later be moved to a completely different asset folder hierarchy without impacting the public ID. This option only ensures path matching for the initial upload. Relevant only when public_id_prefix (or folder) has not been separately specified.", + ), + use_filename: z.boolean().optional().describe( + "Whether to use the original file name of the uploaded asset if available for the public ID. The file name is normalized and random characters are appended to ensure uniqueness if the file name already exists. Default: false.\n", + ), + use_filename_as_display_name: z.boolean().optional().describe( + "Whether to automatically assign the original filename of the uploaded asset as the asset's display name. Relevant only if the display_name parameter isn't set.", + ), + visual_search: z.boolean().optional().describe( + "Whether to index the image for use with visual searches. Relevant for images only.", + ), +}).describe( + "Parsed preset configuration settings. Composed from base parameters (stable types) plus parsed serializable fields (arrays/objects instead of strings).", +); diff --git a/src/models/uploadpresetsummary.ts b/src/models/uploadpresetsummary.ts new file mode 100644 index 0000000..7feceb0 --- /dev/null +++ b/src/models/uploadpresetsummary.ts @@ -0,0 +1,44 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type Settings = string | boolean; + +export const Settings$zodSchema: z.ZodType = z.union([ + z.string(), + z.boolean(), +]); + +/** + * An upload preset as returned in list responses. Most settings values are raw strings, but some boolean fields may be returned as native booleans. + */ +export type UploadPresetSummary = { + name: string; + unsigned?: boolean | undefined; + settings?: { [k: string]: string | boolean } | undefined; + external_id: string; +}; + +export const UploadPresetSummary$zodSchema: z.ZodType = z + .object({ + external_id: z.string().describe( + "The unique identifier for the upload preset.", + ), + name: z.string().describe("The name of the upload preset."), + settings: z.record( + z.string(), + z.union([ + z.string(), + z.boolean(), + ]), + ).optional().describe( + "Preset configuration settings. Most values are strings (e.g., tags are comma-separated, context is pipe-separated key=value pairs), but some boolean fields may be returned as native booleans.", + ), + unsigned: z.boolean().optional().describe( + "Whether the upload preset allows unsigned uploads.", + ), + }).describe( + "An upload preset as returned in list responses. Most settings values are raw strings, but some boolean fields may be returned as native booleans.", + ); diff --git a/src/tool-names.ts b/src/tool-names.ts index 4725f56..e4913d4 100644 --- a/src/tool-names.ts +++ b/src/tool-names.ts @@ -2,7 +2,7 @@ export const toolNames: Array<{ name: string; description: string }>= [ { "name": "list-transformations", - "description": "Lists all transformation definitions in your account (including named transformations\n\nRetrieves a list of all transformations, which can be filtered to show either only named or unnamed transformations.\n" + "description": "Lists all transformation definitions in your account, including named transformations\n\nRetrieves a list of all transformations, which can be filtered to show either only named or unnamed transformations.\n" }, { "name": "get-transformation-details", @@ -10,11 +10,11 @@ export const toolNames: Array<{ name: string; description: string }>= [ }, { "name": "create-transformation", - "description": "Creates a new named transformation (assigning a custom name to a set of transformation\n\nCreates a new named transformation with the given name and transformation string.\n" + "description": "Creates a new named transformation by assigning a custom name to a set of transformation parameters\n\nCreates a new named transformation with the given name and transformation string.\n" }, { "name": "update-transformation", - "description": "Updates the definition of an existing named transformation\n\nUpdate an existing named or unnamed transformation.\n" + "description": "Updates the definition of an existing transformation\n\nUpdates a named or unnamed transformation.\n" }, { "name": "delete-transformation", @@ -50,7 +50,7 @@ export const toolNames: Array<{ name: string; description: string }>= [ }, { "name": "update-upload-mapping", - "description": "Updates an existing upload mapping by changing its remote URL template for a given\n\nUpdates the URL template for an existing folder mapping" + "description": "Updates an existing upload mapping by changing its remote URL template for a given folder\n\nUpdates the URL template for an existing folder mapping" }, { "name": "delete-upload-mapping", @@ -58,7 +58,7 @@ export const toolNames: Array<{ name: string; description: string }>= [ }, { "name": "list-triggers", - "description": "Lists all webhook notification triggers configured for your product environmentcloudinary\n\nRetrieves a list of all event triggers and notifications within your product environment.\n" + "description": "Lists all webhook notification triggers configured for your product environment\n\nRetrieves a list of all event triggers and notifications within your product environment.\n" }, { "name": "create-trigger", diff --git a/src/types/bigint.ts b/src/types/bigint.ts index f32ee5f..91c22c4 100644 --- a/src/types/bigint.ts +++ b/src/types/bigint.ts @@ -24,23 +24,24 @@ export function bigint(): z.ZodType { } export function bigintOptional(): z.ZodType { - return z.union([ - z.bigint().transform((v) => String(v)), - z.string().transform((v, ctx) => { - try { - return BigInt(v); - } catch { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: "Invalid bigint value", - }); - return z.NEVER; - } - }), - z.number().transform((v) => BigInt(Math.trunc(v))), - z.undefined(), - z.null().transform(() => undefined), - ]); + return z + .union([ + z.bigint().transform((v) => String(v)), + z.string().transform((v, ctx) => { + try { + return BigInt(v); + } catch { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Invalid bigint value", + }); + return z.NEVER; + } + }), + z.number().transform((v) => BigInt(Math.trunc(v))), + z.null().transform(() => undefined), + ]) + .optional(); } export function bigintNullable(): z.ZodType {