From 0a07ccac2302d8688ac1be50d3eff8c2e60bf80f Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Mon, 28 Sep 2026 22:14:17 +0000 Subject: [PATCH 1/3] ## Typescript SDK Changes: * `openrouter.privateEndpoints.list()`: **Added** * `openrouter.privateEndpoints.create()`: **Added** * `openrouter.privateEndpoints.delete()`: **Added** * `openrouter.privateEndpoints.get()`: **Added** * `openrouter.privateEndpoints.update()`: **Added** * `openrouter.privateEndpoints.activate()`: **Added** * `openrouter.privateEndpoints.disable()`: **Added** * `openrouter.privateEndpoints.enable()`: **Added** * `openrouter.privateEndpoints.updatePricing()`: **Added** * `openrouter.privateEndpoints.validate()`: **Added** --- .speakeasy/gen.lock | 685 +++++++- .speakeasy/gen.yaml | 2 +- .speakeasy/out.openapi.yaml | 1551 +++++++++++++++++ .speakeasy/workflow.lock | 10 +- RELEASES.md | 12 +- docs/models/createprivateendpointrequest.mdx | 28 + ...teprivateendpointrequestdeclaredregion.mdx | 21 + ...teendpointvalidationfailedresponsedata.mdx | 39 + ...eendpointvalidationfailedresponseerror.mdx | 21 + docs/models/deleteprivateendpointresponse.mdx | 21 + .../deleteprivateendpointresponsedata.mdx | 19 + docs/models/errors/badgateway.mdx | 53 + docs/models/errors/conflict.mdx | 53 + ...eendpointvalidationfailedresponseerror.mdx | 18 + docs/models/errors/internalservererror.mdx | 53 + docs/models/errors/notfound.mdx | 53 + docs/models/errors/unprocessableentity.mdx | 53 + docs/models/listprivateendpointsresponse.mdx | 19 + docs/models/managedprivateendpoint.mdx | 35 + .../models/managedprivateendpointresponse.mdx | 29 + .../activateprivateendpointglobals.mdx | 19 + .../activateprivateendpointrequest.mdx | 22 + .../createprivateendpointglobals.mdx | 19 + .../createprivateendpointrequest.mdx | 27 + .../deleteprivateendpointglobals.mdx | 19 + .../deleteprivateendpointrequest.mdx | 23 + .../disableprivateendpointglobals.mdx | 19 + .../disableprivateendpointrequest.mdx | 22 + docs/models/operations/draftonly.mdx | 21 + .../enableprivateendpointglobals.mdx | 19 + .../enableprivateendpointrequest.mdx | 22 + .../operations/getprivateendpointglobals.mdx | 19 + .../operations/getprivateendpointrequest.mdx | 22 + .../listprivateendpointsglobals.mdx | 19 + .../listprivateendpointsrequest.mdx | 19 + .../updateprivateendpointglobals.mdx | 19 + .../updateprivateendpointpricingglobals.mdx | 19 + .../updateprivateendpointpricingrequest.mdx | 29 + .../updateprivateendpointrequest.mdx | 26 + .../validateprivateendpointglobals.mdx | 19 + .../validateprivateendpointrequest.mdx | 26 + docs/models/privateendpoint.mdx | 44 + docs/models/privateendpointactivation.mdx | 21 + docs/models/privateendpointcheck.mdx | 25 + docs/models/privateendpointcheckreason.mdx | 21 + docs/models/privateendpointdeclaredregion.mdx | 21 + docs/models/privateendpointpricing.mdx | 23 + docs/models/privateendpointresponse.mdx | 35 + docs/models/privateendpointstatus.mdx | 21 + docs/models/privateendpointsummary.mdx | 31 + docs/models/privateendpointvalidation.mdx | 26 + .../privateendpointvalidationnullable.mdx | 26 + .../privateendpointvalidationresponse.mdx | 27 + .../updateprivateendpointpricingrequest.mdx | 22 + docs/models/updateprivateendpointrequest.mdx | 22 + ...teprivateendpointrequestdeclaredregion.mdx | 21 + .../models/validateprivateendpointrequest.mdx | 19 + docs/sdks/privateendpoints/README.mdx | 915 ++++++++++ jsr.json | 2 +- package.json | 10 +- src/funcs/privateEndpointsActivate.ts | 236 +++ src/funcs/privateEndpointsCreate.ts | 238 +++ src/funcs/privateEndpointsDelete.ts | 241 +++ src/funcs/privateEndpointsDisable.ts | 236 +++ src/funcs/privateEndpointsEnable.ts | 236 +++ src/funcs/privateEndpointsGet.ts | 219 +++ src/funcs/privateEndpointsList.ts | 212 +++ src/funcs/privateEndpointsUpdate.ts | 239 +++ src/funcs/privateEndpointsUpdatePricing.ts | 241 +++ src/funcs/privateEndpointsValidate.ts | 239 +++ src/lib/config.ts | 4 +- src/models/createprivateendpointrequest.ts | 125 ++ ...teendpointvalidationfailedresponseerror.ts | 75 + src/models/deleteprivateendpointresponse.ts | 56 + src/models/errors/createprivateendpoint.ts | 156 ++ ...teendpointvalidationfailedresponseerror.ts | 59 + src/models/errors/index.ts | 2 + src/models/index.ts | 21 + src/models/listprivateendpointsresponse.ts | 35 + src/models/managedprivateendpoint.ts | 93 + src/models/managedprivateendpointresponse.ts | 35 + .../operations/activateprivateendpoint.ts | 88 + .../operations/createprivateendpoint.ts | 95 + .../operations/deleteprivateendpoint.ts | 113 ++ .../operations/disableprivateendpoint.ts | 88 + .../operations/enableprivateendpoint.ts | 88 + src/models/operations/getprivateendpoint.ts | 86 + src/models/operations/index.ts | 10 + src/models/operations/listprivateendpoints.ts | 82 + .../operations/updateprivateendpoint.ts | 94 + .../updateprivateendpointpricing.ts | 96 + .../operations/validateprivateendpoint.ts | 95 + src/models/privateendpoint.ts | 114 ++ src/models/privateendpointactivation.ts | 42 + src/models/privateendpointcheck.ts | 67 + src/models/privateendpointcheckreason.ts | 42 + src/models/privateendpointdeclaredregion.ts | 29 + src/models/privateendpointpricing.ts | 63 + src/models/privateendpointresponse.ts | 35 + src/models/privateendpointstatus.ts | 27 + src/models/privateendpointsummary.ts | 77 + src/models/privateendpointvalidation.ts | 40 + .../privateendpointvalidationnullable.ts | 40 + .../privateendpointvalidationresponse.ts | 35 + .../updateprivateendpointpricingrequest.ts | 41 + src/models/updateprivateendpointrequest.ts | 89 + src/models/validateprivateendpointrequest.ts | 41 + src/sdk/privateendpoints.ts | 191 ++ src/sdk/sdk.ts | 6 + 109 files changed, 9431 insertions(+), 37 deletions(-) create mode 100644 docs/models/createprivateendpointrequest.mdx create mode 100644 docs/models/createprivateendpointrequestdeclaredregion.mdx create mode 100644 docs/models/createprivateendpointvalidationfailedresponsedata.mdx create mode 100644 docs/models/createprivateendpointvalidationfailedresponseerror.mdx create mode 100644 docs/models/deleteprivateendpointresponse.mdx create mode 100644 docs/models/deleteprivateendpointresponsedata.mdx create mode 100644 docs/models/errors/badgateway.mdx create mode 100644 docs/models/errors/conflict.mdx create mode 100644 docs/models/errors/createprivateendpointvalidationfailedresponseerror.mdx create mode 100644 docs/models/errors/internalservererror.mdx create mode 100644 docs/models/errors/notfound.mdx create mode 100644 docs/models/errors/unprocessableentity.mdx create mode 100644 docs/models/listprivateendpointsresponse.mdx create mode 100644 docs/models/managedprivateendpoint.mdx create mode 100644 docs/models/managedprivateendpointresponse.mdx create mode 100644 docs/models/operations/activateprivateendpointglobals.mdx create mode 100644 docs/models/operations/activateprivateendpointrequest.mdx create mode 100644 docs/models/operations/createprivateendpointglobals.mdx create mode 100644 docs/models/operations/createprivateendpointrequest.mdx create mode 100644 docs/models/operations/deleteprivateendpointglobals.mdx create mode 100644 docs/models/operations/deleteprivateendpointrequest.mdx create mode 100644 docs/models/operations/disableprivateendpointglobals.mdx create mode 100644 docs/models/operations/disableprivateendpointrequest.mdx create mode 100644 docs/models/operations/draftonly.mdx create mode 100644 docs/models/operations/enableprivateendpointglobals.mdx create mode 100644 docs/models/operations/enableprivateendpointrequest.mdx create mode 100644 docs/models/operations/getprivateendpointglobals.mdx create mode 100644 docs/models/operations/getprivateendpointrequest.mdx create mode 100644 docs/models/operations/listprivateendpointsglobals.mdx create mode 100644 docs/models/operations/listprivateendpointsrequest.mdx create mode 100644 docs/models/operations/updateprivateendpointglobals.mdx create mode 100644 docs/models/operations/updateprivateendpointpricingglobals.mdx create mode 100644 docs/models/operations/updateprivateendpointpricingrequest.mdx create mode 100644 docs/models/operations/updateprivateendpointrequest.mdx create mode 100644 docs/models/operations/validateprivateendpointglobals.mdx create mode 100644 docs/models/operations/validateprivateendpointrequest.mdx create mode 100644 docs/models/privateendpoint.mdx create mode 100644 docs/models/privateendpointactivation.mdx create mode 100644 docs/models/privateendpointcheck.mdx create mode 100644 docs/models/privateendpointcheckreason.mdx create mode 100644 docs/models/privateendpointdeclaredregion.mdx create mode 100644 docs/models/privateendpointpricing.mdx create mode 100644 docs/models/privateendpointresponse.mdx create mode 100644 docs/models/privateendpointstatus.mdx create mode 100644 docs/models/privateendpointsummary.mdx create mode 100644 docs/models/privateendpointvalidation.mdx create mode 100644 docs/models/privateendpointvalidationnullable.mdx create mode 100644 docs/models/privateendpointvalidationresponse.mdx create mode 100644 docs/models/updateprivateendpointpricingrequest.mdx create mode 100644 docs/models/updateprivateendpointrequest.mdx create mode 100644 docs/models/updateprivateendpointrequestdeclaredregion.mdx create mode 100644 docs/models/validateprivateendpointrequest.mdx create mode 100644 docs/sdks/privateendpoints/README.mdx create mode 100644 src/funcs/privateEndpointsActivate.ts create mode 100644 src/funcs/privateEndpointsCreate.ts create mode 100644 src/funcs/privateEndpointsDelete.ts create mode 100644 src/funcs/privateEndpointsDisable.ts create mode 100644 src/funcs/privateEndpointsEnable.ts create mode 100644 src/funcs/privateEndpointsGet.ts create mode 100644 src/funcs/privateEndpointsList.ts create mode 100644 src/funcs/privateEndpointsUpdate.ts create mode 100644 src/funcs/privateEndpointsUpdatePricing.ts create mode 100644 src/funcs/privateEndpointsValidate.ts create mode 100644 src/models/createprivateendpointrequest.ts create mode 100644 src/models/createprivateendpointvalidationfailedresponseerror.ts create mode 100644 src/models/deleteprivateendpointresponse.ts create mode 100644 src/models/errors/createprivateendpoint.ts create mode 100644 src/models/errors/createprivateendpointvalidationfailedresponseerror.ts create mode 100644 src/models/listprivateendpointsresponse.ts create mode 100644 src/models/managedprivateendpoint.ts create mode 100644 src/models/managedprivateendpointresponse.ts create mode 100644 src/models/operations/activateprivateendpoint.ts create mode 100644 src/models/operations/createprivateendpoint.ts create mode 100644 src/models/operations/deleteprivateendpoint.ts create mode 100644 src/models/operations/disableprivateendpoint.ts create mode 100644 src/models/operations/enableprivateendpoint.ts create mode 100644 src/models/operations/getprivateendpoint.ts create mode 100644 src/models/operations/listprivateendpoints.ts create mode 100644 src/models/operations/updateprivateendpoint.ts create mode 100644 src/models/operations/updateprivateendpointpricing.ts create mode 100644 src/models/operations/validateprivateendpoint.ts create mode 100644 src/models/privateendpoint.ts create mode 100644 src/models/privateendpointactivation.ts create mode 100644 src/models/privateendpointcheck.ts create mode 100644 src/models/privateendpointcheckreason.ts create mode 100644 src/models/privateendpointdeclaredregion.ts create mode 100644 src/models/privateendpointpricing.ts create mode 100644 src/models/privateendpointresponse.ts create mode 100644 src/models/privateendpointstatus.ts create mode 100644 src/models/privateendpointsummary.ts create mode 100644 src/models/privateendpointvalidation.ts create mode 100644 src/models/privateendpointvalidationnullable.ts create mode 100644 src/models/privateendpointvalidationresponse.ts create mode 100644 src/models/updateprivateendpointpricingrequest.ts create mode 100644 src/models/updateprivateendpointrequest.ts create mode 100644 src/models/validateprivateendpointrequest.ts create mode 100644 src/sdk/privateendpoints.ts diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index f0aa95831..a87f338f4 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: "" id: "" management: - docChecksum: 62138fc980ba80b989932511d322e32e + docChecksum: 77a5b0dd8ab45001d15e1b5a27808278 docVersion: 1.0.0 speakeasyVersion: 1.787.0 generationVersion: 2.914.0 - releaseVersion: 1.3.36 - configChecksum: fd57e13284e9b46ecea1b2322de17d3c + releaseVersion: 1.4.0 + configChecksum: c6f97602909da6a554bd1756310947c6 repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git installationURL: https://github.com/OpenRouterTeam/typescript-sdk published: true persistentEdits: - generation_id: f2053693-304e-4023-a8f3-312b884be805 - pristine_commit_hash: c883f285d0db9ddcb3a4bb882245b0a809df2873 - pristine_tree_hash: 5b5ab0dced4be27e5280d83f50535b00d7040471 + generation_id: 71da85c9-72b8-47cb-9523-9051538ff5df + pristine_commit_hash: 36a234faeeb6cc824bcf043f2df18aef1069300f + pristine_tree_hash: d90da52046add890cce0571519434c361f61e719 features: typescript: acceptHeaders: 2.81.2 @@ -28,6 +28,7 @@ features: downloadStreams: 0.1.1 enumUnions: 0.1.0 envVarSecurityUsage: 0.1.2 + errorUnions: 0.1.1 globalSecurity: 2.82.16 globalSecurityCallbacks: 0.1.0 globalSecurityFlattening: 0.1.1 @@ -3835,6 +3836,22 @@ trackedFiles: id: b01c4567352d last_write_checksum: sha1:e034a7fe57d74ec8b062b3c88ff3c55d26131b3c pristine_git_object: 5d5ab8aae8325edf75c452ec6c5016e200873ae5 + docs/models/createprivateendpointrequest.mdx: + id: faedff659c73 + last_write_checksum: sha1:25285c18401fa9e175203fc575fd8bcb51b429ac + pristine_git_object: 18c19034dfe491352c1487fc465df94953e2437a + docs/models/createprivateendpointrequestdeclaredregion.mdx: + id: 39d200d93a78 + last_write_checksum: sha1:3ffb0e7b17d45cb95a223dfb87f315a683580100 + pristine_git_object: daaa7a2b1d4bb8e7458b98e7325f9d780a2d9cc8 + docs/models/createprivateendpointvalidationfailedresponsedata.mdx: + id: d98b08383d3a + last_write_checksum: sha1:d4f143fc0454eebe0c8e1fe19bb70a2ba4795e3c + pristine_git_object: 15fb6a0fb24c2c80425e72a56bf5415341ee7854 + docs/models/createprivateendpointvalidationfailedresponseerror.mdx: + id: 753618bb720a + last_write_checksum: sha1:5d34faeff363c5250555288346166990c8d6fe4a + pristine_git_object: 0e81205ba05e7ce5bdbc38a9e1cdadc37f6dff1e docs/models/createscimgroupmappingrequest.mdx: id: 4c4b31da6b91 last_write_checksum: sha1:25cd70f09c9b9aa484058de4c2e38553da738bf6 @@ -4172,6 +4189,14 @@ trackedFiles: id: 891768bbd4b4 last_write_checksum: sha1:8e6b8e817d83d7c7fc3b2cc2615a37d4bb51b27a pristine_git_object: 788f496e113fb4ddf285b6ff0adefcd077ab3db3 + docs/models/deleteprivateendpointresponse.mdx: + id: 611ede73dc04 + last_write_checksum: sha1:7bf6e844bfbbe49897bd3c15a3c39df80b8e9197 + pristine_git_object: fe84465d374969475f2428cd88d574a51f6c7333 + docs/models/deleteprivateendpointresponsedata.mdx: + id: c423384851c8 + last_write_checksum: sha1:f1762633f563355cd441db4bef23c118cf7ab5b6 + pristine_git_object: 31d2be37bab8ba03d57ff8d5a3d02c39335f7343 docs/models/deletescimgroupmappingresponse.mdx: id: 1c9494165922 last_write_checksum: sha1:512df025934ca9641fbd1ba9c8523f291a89b660 @@ -4444,6 +4469,10 @@ trackedFiles: id: c98b3d6c8ac3 last_write_checksum: sha1:38d401b5fb5104354b6bb2de2c96404b8447f72a pristine_git_object: 9f2858756fc1c4528f59cb29de24a1278d5eed8d + docs/models/errors/badgateway.mdx: + id: 59671cbdc562 + last_write_checksum: sha1:44c79f955fd443562262d403b87a7522bc41e8a0 + pristine_git_object: a19062dbba1053ac790afe544035b4944ea81a33 docs/models/errors/badgatewayresponseerror.mdx: id: 164bc61d645d last_write_checksum: sha1:9a4e7fee2b34fbf8c0cb6693178594d82ea9f3eb @@ -4460,6 +4489,10 @@ trackedFiles: id: 6bbc01c5cb1e last_write_checksum: sha1:2d2370224d361d5cbdd42a45a52982d874f6453b pristine_git_object: 6b20230a44b12fcd8a543b01fc4dc77ca3e92c66 + docs/models/errors/conflict.mdx: + id: 66edc75fdb63 + last_write_checksum: sha1:6f7029e4531dcc88ed1aaf8ac8fcc58c5d691717 + pristine_git_object: e461ec84294525cca8e3ce49ac35f11b09fbfbe4 docs/models/errors/conflictresponseerror.md: id: dfa7a1e4c341 last_write_checksum: sha1:d53f5f938627d044a770dae613abd3d59c834484 @@ -4469,6 +4502,10 @@ trackedFiles: id: 52642332cd5b last_write_checksum: sha1:c14e4bda793c247c4cb9d38154dcb63aad9e67c7 pristine_git_object: 7bbe2652479607037a6cb5ffdc8b285dc2e34bd3 + docs/models/errors/createprivateendpointvalidationfailedresponseerror.mdx: + id: 9ed5e5f1264c + last_write_checksum: sha1:be76326882bd011b89550f48a4d19cb01aaf566f + pristine_git_object: 501547393742eed4117dd5a99b35630059d1cfc3 docs/models/errors/edgenetworktimeoutresponseerror.mdx: id: 9dfa2f911aba last_write_checksum: sha1:2c22f4809926b9713880a5c1344f2d984b064d28 @@ -4485,6 +4522,10 @@ trackedFiles: id: 6dc8f021a44f last_write_checksum: sha1:7292b5bccc779b8c780303faa912c8741b8b9d4a pristine_git_object: 9623e61e79b71106afe731243c03c45c25b49a6d + docs/models/errors/internalservererror.mdx: + id: 996ee5bf4fe9 + last_write_checksum: sha1:b51b5d104e8f4bddbe02fa3f7e2b6fa479655aaf + pristine_git_object: 43e749b20a334b038b616bcdb4841a2c64b1a428 docs/models/errors/internalserverresponseerror.mdx: id: eae368e33b97 last_write_checksum: sha1:0c675a81267cd7f2db79e800ccb72e40ec9c5053 @@ -4497,6 +4538,10 @@ trackedFiles: id: "187091522104" last_write_checksum: sha1:73dedffc08184418b70832c52e9d1e4ab6c7d9eb pristine_git_object: 2c8afff638629aa5c9bc51c195b2541c09a2679c + docs/models/errors/notfound.mdx: + id: cd0b9b2a5f76 + last_write_checksum: sha1:3952f473e51cd08584eebb7e2140c9cd02d90ff8 + pristine_git_object: f994baa230e28f30de98888b13567ced5b7769f5 docs/models/errors/notfoundresponseerror.mdx: id: 207b2340162c last_write_checksum: sha1:73089aefceb28d5be92d1cef6a9e0a1f3a226db0 @@ -4533,6 +4578,10 @@ trackedFiles: id: 452fbc680c35 last_write_checksum: sha1:b752ea565c80fe4a3f2ff7e60d6f319a422fcb98 pristine_git_object: 6d4c4de606598079861ae08c5bf47caff17c7a22 + docs/models/errors/unprocessableentity.mdx: + id: 1d6b919e5404 + last_write_checksum: sha1:d22c31a076a0403d9221e44042c386e35ca5cd75 + pristine_git_object: c1f81d5e04031a0e1440dabf7ad294b20ba34972 docs/models/errors/unprocessableentityresponseerror.mdx: id: 50b6ce923b0c last_write_checksum: sha1:da3ac2823db229d3f7162032e4bbfe4d419ec15f @@ -6446,6 +6495,10 @@ trackedFiles: id: a2564e571fb7 last_write_checksum: sha1:b24dafe18d1417cb22f772c16f171603f4f976ee pristine_git_object: 5efa47c6a621f9525bdd337c552172856adb0180 + docs/models/listprivateendpointsresponse.mdx: + id: 63c7373ad709 + last_write_checksum: sha1:5aba1241eefb561ce648e393fb1ddcb86e1799df + pristine_git_object: 107f75d6d499789844e6d43de291a2baf0f4dbcd docs/models/listscimgroupmappingsresponse.mdx: id: 3941744ebf1d last_write_checksum: sha1:67580beb356734614cf456e824d733e9d24b6fed @@ -6543,6 +6596,14 @@ trackedFiles: id: 10d27dd0dc00 last_write_checksum: sha1:e4a0aacbe52bb2182af73bc458ddd7ea452877b1 pristine_git_object: 0173d0ed6d6bef6a31de2a261fb2eb811dce0ba5 + docs/models/managedprivateendpoint.mdx: + id: fdba71af7e3e + last_write_checksum: sha1:54d9200c8fe5d9106ad11c52f99711864d10f810 + pristine_git_object: ab79730a4c2a0a7bf27448457f412ef773a10a2c + docs/models/managedprivateendpointresponse.mdx: + id: f859daf863bc + last_write_checksum: sha1:46d5ef0222d28d7c17745d1418330cbb3b3bd485 + pristine_git_object: f6db869a3b55495e7116eea625a81678a20cf232 docs/models/maxprice.md: id: 7c7c9e7845a0 last_write_checksum: sha1:41f27034d453b56df8d89e75f43e0585320f7aa7 @@ -7981,6 +8042,14 @@ trackedFiles: last_write_checksum: sha1:6a2f794e1a18827f61da7321f8c59f4275da2b28 pristine_git_object: cded56c5bb4d071a79a9f0dad927e48e02debb65 deleted: true + docs/models/operations/activateprivateendpointglobals.mdx: + id: 0d173453de38 + last_write_checksum: sha1:bbafeceb566490ab660ce4557610c7749cddd4c5 + pristine_git_object: 327237c10c3ea40681d8960cb8270d0e932fcdf9 + docs/models/operations/activateprivateendpointrequest.mdx: + id: 5be961b57d8b + last_write_checksum: sha1:7516ba7ecd49f89a037eae8ae3f2a5c15f4b46c8 + pristine_git_object: e96edc41b2d716e7c9f3c41d62cb9843b60d2f52 docs/models/operations/alloweddataregion.mdx: id: 149c27f32b70 last_write_checksum: sha1:5ab3c86184bf28586906db9ea1e5b4c8d4c3c13e @@ -8417,6 +8486,14 @@ trackedFiles: id: bcecfb6b235a last_write_checksum: sha1:e161ccd7c4bfd3bbe5f4d1009127d55b132a1811 pristine_git_object: 30f45321b4e85e4b6c389b422a236575cee289c6 + docs/models/operations/createprivateendpointglobals.mdx: + id: afbc06e01bc1 + last_write_checksum: sha1:e2d2f5fd8b02f2e8d309082ff731c71dbc276944 + pristine_git_object: 3a032d87a9da5ad87a79800d67724087e2a08ff9 + docs/models/operations/createprivateendpointrequest.mdx: + id: 875d7a8b2217 + last_write_checksum: sha1:f58bfa247fbdccb478dc1acefa2a7e7a9e26938e + pristine_git_object: d2e556237f02f5ca9ae01e5a8c830f89775894c4 docs/models/operations/creatererankglobals.md: id: a69e0c2ebb3a last_write_checksum: sha1:81de6495768fe15d967381108daa6e453e868ea8 @@ -8669,6 +8746,14 @@ trackedFiles: id: dc9c62d598fd last_write_checksum: sha1:0a31703d26914486ab8c68c912c4df2b70edd434 pristine_git_object: 9dc8670434b0877e87cb674b206b48977cdb7376 + docs/models/operations/deleteprivateendpointglobals.mdx: + id: c677fe9cb871 + last_write_checksum: sha1:fd065130e1a88ff09623e07ba27e0047d5fc4b01 + pristine_git_object: d098bee935892a60b5e6eff0bea55e6e42d2b21e + docs/models/operations/deleteprivateendpointrequest.mdx: + id: d1f9f1ec5c66 + last_write_checksum: sha1:46d76c5a46104da2d077804a8060d8f8fffd5d3a + pristine_git_object: 984b8f16e0463ab9c87e5612a6890b06be574e07 docs/models/operations/deletescimgroupmappingglobals.mdx: id: 82cbe41fa51c last_write_checksum: sha1:127a2cbf344df7bc8aaf2588d37033d152e06241 @@ -8739,6 +8824,14 @@ trackedFiles: id: 20ac8101a29f last_write_checksum: sha1:51cdedce0feaf2dd11b185dd4a41122383cd0bea pristine_git_object: 63acaa947c889ccbcb6e989f5b7efa7ca1740fff + docs/models/operations/disableprivateendpointglobals.mdx: + id: 928972aab354 + last_write_checksum: sha1:cfa032c549e438948e7cf1126280abed1bc0b45e + pristine_git_object: bf2a851a084a8d1ca7210afdfcc8672424dd15d6 + docs/models/operations/disableprivateendpointrequest.mdx: + id: 3d7dd3c3ec7f + last_write_checksum: sha1:cb2f1d88f1d8f7a209dea9d110a54698e6991609 + pristine_git_object: 5dedf94b47115517c4c3859f191c5ac245df1ea9 docs/models/operations/displayformat.md: id: 93647ce5b476 last_write_checksum: sha1:d9883114bf785daf66bf3c4d96263439e4fa407c @@ -8810,10 +8903,22 @@ trackedFiles: id: 417167d13cb0 last_write_checksum: sha1:bd6bdcf0ec9b83e60457ec49cf4cd7afe0686beb pristine_git_object: 2d1ff0a875d39f68c771f26e6b11c7c52fa16267 + docs/models/operations/draftonly.mdx: + id: cd9f681ab493 + last_write_checksum: sha1:20d36f92a4a06d3b52ee5e95866b8cc2c21e43ab + pristine_git_object: 4c67694493bd4968db6457cd16d177c222901c1c docs/models/operations/embedding.mdx: id: 530657f66b4b last_write_checksum: sha1:7a3872a55e7a3c78bdf1bc824d03e739c687de14 pristine_git_object: f3567b6f337e6834fcc83efa8a60a5a420eca882 + docs/models/operations/enableprivateendpointglobals.mdx: + id: a305650a9496 + last_write_checksum: sha1:634ba3e652682e68bc87a58a52ca523f9bf4c769 + pristine_git_object: 5109c77b0aa514b7380c59c3b3dc47a2a2c39329 + docs/models/operations/enableprivateendpointrequest.mdx: + id: a2ee64b5e8b5 + last_write_checksum: sha1:c963f42b24a672e1743e04c3d3d3a31cfda7a939 + pristine_git_object: 18e8678409ea2740c79b9002155d3e93e79d4c39 docs/models/operations/encodingformat.mdx: id: fa97dd9130c6 last_write_checksum: sha1:d07ba3329367d35dba200bc5624affb4178d7699 @@ -9217,6 +9322,14 @@ trackedFiles: id: 41262a2f0b75 last_write_checksum: sha1:e9fb19ccdd6d045e10b52a461043d11cdc11ee72 pristine_git_object: 4b0ffbd7bc7bfcc06a75cf0611b9e62245e1123c + docs/models/operations/getprivateendpointglobals.mdx: + id: 3ab891cd22be + last_write_checksum: sha1:3885b7b61338067cf585e8080424649d3ef4f496 + pristine_git_object: 9aff82686d2485f12f64c6bfd9611963ab2c9933 + docs/models/operations/getprivateendpointrequest.mdx: + id: 95a3dcd75cbe + last_write_checksum: sha1:dd39a17720f6765be4403a79255d55421f697342 + pristine_git_object: 4a9fee9c70749324e637b0778bfe8e76c09f79df docs/models/operations/getrankingsdailycategory.mdx: id: 9307256562a8 last_write_checksum: sha1:b3c8e6bde94778a0a92f60587c369a476fa21feb @@ -9810,6 +9923,14 @@ trackedFiles: id: 699d3b1de7a7 last_write_checksum: sha1:f834c026d7e877a30296d9f58d1c066400b19942 pristine_git_object: 6eba043057ace9a849c9653fe24d2b1a7d6cabbd + docs/models/operations/listprivateendpointsglobals.mdx: + id: 8cfb58294fdf + last_write_checksum: sha1:ded2329ea41a1d7cb2963aed10bdf39a4c6c55b4 + pristine_git_object: c38091d4729b7c11a03535aab0c00b44dfd4fa31 + docs/models/operations/listprivateendpointsrequest.mdx: + id: d852e4a5454e + last_write_checksum: sha1:470c06abcc9efbd8e6310509c3c1c9c4f4b4d553 + pristine_git_object: f6386ba862293f2216d9c4498243b6e9bd55945a docs/models/operations/listprovidersdata.mdx: id: 119e591a8eaa last_write_checksum: sha1:b684e1f7fbe99b69d5cb8d1399e906de3ced69f3 @@ -10334,6 +10455,22 @@ trackedFiles: id: 33e401a234d7 last_write_checksum: sha1:35934e25f5a6b927654c2b85617532a429a7fac6 pristine_git_object: 72e84345c57f502d0b3833aa8978343f7a26720c + docs/models/operations/updateprivateendpointglobals.mdx: + id: 9ce285727649 + last_write_checksum: sha1:c34cf69a82fc68255964c916ffb59386e3b5aa5e + pristine_git_object: 94830e0d818ce1dea41e36c185c9a2533f4944b8 + docs/models/operations/updateprivateendpointpricingglobals.mdx: + id: e343848bf2b2 + last_write_checksum: sha1:c7e21aa2a8a2d7e4e33dc56a861829ea8df47e9f + pristine_git_object: acdb1211bf4b1e184480a5e89224c9f3a056e6df + docs/models/operations/updateprivateendpointpricingrequest.mdx: + id: 7f47bc0b082e + last_write_checksum: sha1:46a4c1d9938bbb42308a670cfb3de7dfaacf5b1e + pristine_git_object: c478f857490597f976acdcf6c7c476716388ddea + docs/models/operations/updateprivateendpointrequest.mdx: + id: 0b559c40a967 + last_write_checksum: sha1:a88626684bcd578c449729afc3ff95d570a6e4b8 + pristine_git_object: bfaf53ce6e4ad8d52eee93191d2b268fc32793e4 docs/models/operations/updatescimgroupmappingglobals.mdx: id: 402cc107fd5a last_write_checksum: sha1:ae4251ebbb9eb03ecfbe853871a7bec2e387e4c6 @@ -10413,6 +10550,14 @@ trackedFiles: id: 7d0714760ba1 last_write_checksum: sha1:072670dedd8fe297aa32abe64c1ecab91e72edeb pristine_git_object: 319d7d43f0103693383b06e106f545fcefaa9b5f + docs/models/operations/validateprivateendpointglobals.mdx: + id: c61db68f6b38 + last_write_checksum: sha1:a02d27365f3ea1a23f696972e0947158b49d6e58 + pristine_git_object: 0c0a95fd784d536d915768e32ebafd69a2cd6e74 + docs/models/operations/validateprivateendpointrequest.mdx: + id: 71261e59f683 + last_write_checksum: sha1:fe2ab428a114c7c75d47a13b6404d2f257d3f94a + pristine_git_object: eed9e1298c2affb758ab82aebb83566a0b094928 docs/models/operations/value1.md: id: 523d8c155e57 last_write_checksum: sha1:98df0eba6dcf58b45422c81fd5bba8eb0bee94fa @@ -11732,6 +11877,54 @@ trackedFiles: id: 7c4a8c10dda7 last_write_checksum: sha1:b9ddcac03d5e24fe60a281b91820791c6bc9c88b pristine_git_object: a16979519e2cb8f7542be8885266eacfb4aa17e2 + docs/models/privateendpoint.mdx: + id: d14587778779 + last_write_checksum: sha1:e16fb57791b9321d0c6bb61839ffc10d4933beff + pristine_git_object: 8c4bebf675c75d2fd49c8663afca63879503e579 + docs/models/privateendpointactivation.mdx: + id: 2ba1d446dd2a + last_write_checksum: sha1:32fb12301262a29ad1f9f9a15d86a5983e7e65f9 + pristine_git_object: 825fd3da210fd01e6ecdcc2376a908baf3f4ffd2 + docs/models/privateendpointcheck.mdx: + id: c199bff4f246 + last_write_checksum: sha1:eb415af22f0a8a7fcea092083272e9d3bf3775ea + pristine_git_object: c30272a741c205da0cbb6a0ebbab40a00bb51e6f + docs/models/privateendpointcheckreason.mdx: + id: efb417c042b5 + last_write_checksum: sha1:8dcdb63f8ec9ff45e9317139a765faad2864f76c + pristine_git_object: a358e2ec078afa8a4366d37a1bdee2e6366caf83 + docs/models/privateendpointdeclaredregion.mdx: + id: f0bd5726115e + last_write_checksum: sha1:91ea39293d33d68034afef546ba990b12714feae + pristine_git_object: 454128f02c166d034d115ffd2ad0c1c60b83d6a1 + docs/models/privateendpointpricing.mdx: + id: 064406fd1903 + last_write_checksum: sha1:922ae4ea4ea99c7051021ed81e344705d92ecc41 + pristine_git_object: bda4aab1b24a7d322f8a1bc4aa134ca91e1e77a5 + docs/models/privateendpointresponse.mdx: + id: 860e4fb87f5b + last_write_checksum: sha1:f6ac418b19cc84add6183d421d649d1db1a954be + pristine_git_object: 5dfda23d994900297c509ca6324ba39404299666 + docs/models/privateendpointstatus.mdx: + id: f193a97a0b0e + last_write_checksum: sha1:6172fb914807fbd7de9f70c23f1126263a5de9fa + pristine_git_object: c3d5a0f7160efd8c8453e2adf07b3fe9257e481e + docs/models/privateendpointsummary.mdx: + id: 8a7acf83baf7 + last_write_checksum: sha1:7d89d21100d98cb571e6d4a30e9cfea1b9c28277 + pristine_git_object: 4159642b9eb58b22fd949f81f4ee7fd2af0b23ca + docs/models/privateendpointvalidation.mdx: + id: b9f64d74b3fa + last_write_checksum: sha1:dc372b9b0f97ff0cb7c22839ff29c2dc2ea24f4f + pristine_git_object: 3b9511b0b9bf342ba341c7aedfc825d8e71fb201 + docs/models/privateendpointvalidationnullable.mdx: + id: b6c1f7af4aad + last_write_checksum: sha1:0cbfbc07bc0f5f5b49ef9c78c63d6640affa6375 + pristine_git_object: adeea7abc97437097c48809058f2d4294da24839 + docs/models/privateendpointvalidationresponse.mdx: + id: a225cbca85ce + last_write_checksum: sha1:854f06de6b1d321c7889f6f6b2ed2efe0ea62a9b + pristine_git_object: 6ade23890a276ec70e6097f13581df532f09c7e3 docs/models/progress.mdx: id: e3a7647bc262 last_write_checksum: sha1:d14c7c4028882b1fd58c615b10fe2fce334bb8bb @@ -13881,6 +14074,18 @@ trackedFiles: id: 2fdc00eca436 last_write_checksum: sha1:e8ce72b1c8b9e4328e1e97feeb6b0511132409b0 pristine_git_object: 6cde229bbac84c2f411652e9e9226d95c2cf70eb + docs/models/updateprivateendpointpricingrequest.mdx: + id: c6aa3a0ee6af + last_write_checksum: sha1:cd60a6fc2c519eeb464730c608c62a8a36a900ee + pristine_git_object: e69b0630523e803dcdffb33de2b2476affe33b39 + docs/models/updateprivateendpointrequest.mdx: + id: d298e4499123 + last_write_checksum: sha1:f9428c4c4e621075e2780560f0b32344df36fe14 + pristine_git_object: 81d0896f7062af32c09e821cc3406048b92c9193 + docs/models/updateprivateendpointrequestdeclaredregion.mdx: + id: 6b0ff8868102 + last_write_checksum: sha1:747fcad75cd5d2ea5d0d5a1da76054f876f10a40 + pristine_git_object: 93dbd8ff4ceabe63b840201a0acef2de5aed9138 docs/models/updatescimgroupmappingrequest.mdx: id: 59fbe6749cef last_write_checksum: sha1:f0762a8b028d45a26bc98968ee25f5ab371066ec @@ -13980,6 +14185,10 @@ trackedFiles: id: 17a15cad5966 last_write_checksum: sha1:0ed000d7795399164149c948c57a020215801f73 pristine_git_object: b5155a2172cd6fd3f0d92b7b313f19f7ade095a9 + docs/models/validateprivateendpointrequest.mdx: + id: 3f02e8eb0760 + last_write_checksum: sha1:3a1ab2dd38fa430a77675ba0eb0cb7500f88637e + pristine_git_object: a452a13a35e3b2801a3109239ddf579ed0973240 docs/models/value1.md: id: 5d6c54c6615a last_write_checksum: sha1:8f0d1850d9d5b27f3717389e66940ea8b79522bc @@ -14567,6 +14776,10 @@ trackedFiles: id: eeb505928d52 last_write_checksum: sha1:519878d0e916e65f3763aabf472d51355ce2ec1d pristine_git_object: ca3de1fb0bbfddf610d0d5bc508568732beefc46 + docs/sdks/privateendpoints/README.mdx: + id: 54dee70b8cc7 + last_write_checksum: sha1:f60da0d90708317741d620affae798077dedfb5c + pristine_git_object: 5c99c685a530d2e52f14968dfc85162f09453882 docs/sdks/providers/README.mdx: id: 5ea9af111324 last_write_checksum: sha1:f554b81f0ae123acda48aef70af0a9bebc5c07e3 @@ -14658,12 +14871,12 @@ trackedFiles: pristine_git_object: 410efafd6a7f50d91ccb87131fedbe0c3d47e15a jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:2b52326f3fe42b5cc4c596215063e5aa8a479d3a - pristine_git_object: d05cd6897f96ea77b297b67377b7b0d6dc5e0be4 + last_write_checksum: sha1:539d1627d0e4c38387c6f62ae3a4abc5826d1b51 + pristine_git_object: 76f67d38de69f459a000d8878d10d12b57d1b47b package.json: id: 7030d0b2f71b - last_write_checksum: sha1:94967db824de0b443e7c8d67306705a724738917 - pristine_git_object: 95d48827349b1f5f07218693f098d2870122651a + last_write_checksum: sha1:e45707a9c63986788ff1265b227dbcedbf26e67f + pristine_git_object: 8841b3ac795df26b937e875feae1848830dbfc65 src/core.ts: id: f431fdbcd144 last_write_checksum: sha1:5aa66b0b6a5964f3eea7f3098c2eb3c0ee9c0131 @@ -15028,6 +15241,46 @@ trackedFiles: id: 326969b5ca64 last_write_checksum: sha1:3c34af3d8d46f04f205601fae71f4215b824ae42 pristine_git_object: 579b0e57da48c4f06f7304d26cd6d82408e168be + src/funcs/privateEndpointsActivate.ts: + id: fb4e7d40387c + last_write_checksum: sha1:72af23faed27ab7436d385e7e60deb8f9d9f8406 + pristine_git_object: 31a3eb044b6be171fca841e322d74e96847139d8 + src/funcs/privateEndpointsCreate.ts: + id: 59e376dd1895 + last_write_checksum: sha1:f801dcf7d89f7711e1c7b051f996da7adf1c8a7d + pristine_git_object: 7b0f24722b82779dde74d736de91a42e185610cd + src/funcs/privateEndpointsDelete.ts: + id: 475f87370ef8 + last_write_checksum: sha1:64b634cd1aa44ebe485aa251468d2e90641184fe + pristine_git_object: 799a8dde7af9f81cf712166ee1255c44718fad50 + src/funcs/privateEndpointsDisable.ts: + id: c89fcb6fd3d0 + last_write_checksum: sha1:0141c7cd689f8fef09be280efca0102fadd89c99 + pristine_git_object: ca6eca68e421f4e3f78a7cca6c750daffb6355ff + src/funcs/privateEndpointsEnable.ts: + id: 3ccc0615e23f + last_write_checksum: sha1:b72117fd5059dfcda9c9d8bda08d907e68383135 + pristine_git_object: 76b435c664665a46dac79bce8170a8d4ed7a65a6 + src/funcs/privateEndpointsGet.ts: + id: 2b89eb5a92da + last_write_checksum: sha1:fe5fce5846ca98615af0e35fcd805c2d4f8ac8d2 + pristine_git_object: 2e28f5e1a890c02424d92aa3058930be79a18311 + src/funcs/privateEndpointsList.ts: + id: f8b91cc1013a + last_write_checksum: sha1:f90934e0150fe7a3586f2dd01bfd923131eb7955 + pristine_git_object: 61c7fc448f2bd33033ef33f7f47ef97413ffd563 + src/funcs/privateEndpointsUpdate.ts: + id: a2d429fd280a + last_write_checksum: sha1:8fa90f11080bb4164f1f1314161c767dbc30a777 + pristine_git_object: 47d10883d630763c8f55c9ff8f2b2f1ed193f45b + src/funcs/privateEndpointsUpdatePricing.ts: + id: 5824e06c594a + last_write_checksum: sha1:c2f3929a2ce763d1df7a1f8e37b0305da27100b7 + pristine_git_object: 41ed6bb2e5cdf96eae6b97c7d69a2fd77d99a74b + src/funcs/privateEndpointsValidate.ts: + id: 4337dd4863e1 + last_write_checksum: sha1:98efd9c508dc51a0d5c0a6998c316961f86d33b2 + pristine_git_object: a6f14a037b54381ec92c496fb29099b8279261be src/funcs/providersList.ts: id: 8ad87e7210ae last_write_checksum: sha1:12f45009411e6e4d0697aadc19030125a316052a @@ -15202,8 +15455,8 @@ trackedFiles: pristine_git_object: a187e58707bdb726ca2aff74941efe7493422d4e src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:92d6cbb7ecabfdb930faf65f54cf79a592be45b6 - pristine_git_object: 7f7bdb2d25519ff273609e30cb54afcd4685eff6 + last_write_checksum: sha1:52873324419700d41a96e7876fe1267297381f3a + pristine_git_object: 807876cf7be2cab1595c72e416b11010db710106 src/lib/dlv.ts: id: b1988214835a last_write_checksum: sha1:eaac763b22717206a6199104e0403ed17a4e2711 @@ -16286,6 +16539,14 @@ trackedFiles: id: dc6bff35f5a1 last_write_checksum: sha1:9df16036cebe587e20d7b9078e85a51b008f1ed4 pristine_git_object: 1bd2a805f55379a24b45aa945dd7ca50a88796b1 + src/models/createprivateendpointrequest.ts: + id: 466afc9b7d23 + last_write_checksum: sha1:cbcc72b93a8485fdc6c144ba92a3701cdb962571 + pristine_git_object: 0c397ca5d153898daf375f36c276b59d2ea1ec0a + src/models/createprivateendpointvalidationfailedresponseerror.ts: + id: 4e00bbe15ec8 + last_write_checksum: sha1:1a72c5005700e70699edcefcdbfff0ef659a6b8c + pristine_git_object: f88b32f6cb02dc247b90ac81a62adf3d4d623769 src/models/createscimgroupmappingrequest.ts: id: b5fef01e7c38 last_write_checksum: sha1:d2c75aaf339c26de3b954af571f390b567cf8848 @@ -16398,6 +16659,10 @@ trackedFiles: id: 86995b7dad27 last_write_checksum: sha1:48f68140327741024cf0185005993a461d0412a9 pristine_git_object: 5a9d9e01bb3bb945d68148ba59d07650d3a5c8b3 + src/models/deleteprivateendpointresponse.ts: + id: f98c78f263f4 + last_write_checksum: sha1:dcce79c461a7141fcd25305953cdc5d34e691436 + pristine_git_object: 68fc9e7c8ac736606d1190110786f1f5f96e13c9 src/models/deletescimgroupmappingresponse.ts: id: 6773f6e7c59d last_write_checksum: sha1:bdfe5036cfdf3657c6d73275c9f9a320172438fe @@ -16458,6 +16723,14 @@ trackedFiles: id: 3d49b17cca5f last_write_checksum: sha1:6a00de58c6ba80ea6bc64b708bd482a827e60562 pristine_git_object: f0879cc7f2d069e4da547347831f630e574fdfa1 + src/models/errors/createprivateendpoint.ts: + id: 677d100a981d + last_write_checksum: sha1:a154517e4454c0799a186b4b04d2f08203532f71 + pristine_git_object: 3a31214d6bf11d9c945f992135361183af704243 + src/models/errors/createprivateendpointvalidationfailedresponseerror.ts: + id: 81ce190d6cf1 + last_write_checksum: sha1:5313a030247b54132c626ebde6a32c8e479ad5cc + pristine_git_object: 75e7abc9c9ccd74e94129dd80c9b44424617af9f src/models/errors/edgenetworktimeoutresponseerror.ts: id: da53f308c771 last_write_checksum: sha1:52b7c94145c8375bd64be7a8ae5a7904e20ea7bc @@ -16480,8 +16753,8 @@ trackedFiles: pristine_git_object: 53bb3cfae157b89fda8e4a5b0f1dd709da82c1c9 src/models/errors/index.ts: id: c4e22507cb83 - last_write_checksum: sha1:ee23779618533a7bbf0836c59b26da331ef623ba - pristine_git_object: 3afbbe438cbceb71b2352aefc6e1c56107856761 + last_write_checksum: sha1:c2326c700e4457fd0c5ba40ae8c775d25766bbcd + pristine_git_object: 31a9d14cbe211da68f8e692fd021296385786d1f src/models/errors/internalserverresponseerror.ts: id: 02b76cec85f0 last_write_checksum: sha1:18ef8306c531d997e7f560018498aeccddd0bbee @@ -16888,8 +17161,8 @@ trackedFiles: pristine_git_object: 7abdfe096d3adff317db6837dc689c69db92e127 src/models/index.ts: id: f93644b0f37e - last_write_checksum: sha1:676099c62a7ed941a213d56d36f66f86c30a0ea6 - pristine_git_object: a9452658a5d1829db89e3b8e4918851dd3bc6fda + last_write_checksum: sha1:c629a47b67329439856b5e22c4191d7e320e617f + pristine_git_object: a0d021c48903b01a2fbcf1ff8e2db8f10cf3613e src/models/inputaudio.ts: id: 9bdc14c7565f last_write_checksum: sha1:2f8dc4c1d6a9c2927d9eb186e0ecedf7b81838e6 @@ -17106,6 +17379,10 @@ trackedFiles: id: 071060ed138f last_write_checksum: sha1:548646b202bf9f3661023b53bd5028ad505f8e58 pristine_git_object: d026810ad0f86584200274e319f7c883b4200906 + src/models/listprivateendpointsresponse.ts: + id: 0f316944ddb9 + last_write_checksum: sha1:7dcb2e0b2438a66ba8432ee13d49a695b5b518fb + pristine_git_object: 7dee96a0b44597598370df2cae1de743b1ec870e src/models/listscimgroupmappingsresponse.ts: id: c04288fe6dbf last_write_checksum: sha1:259fdc2b380f62cd3708dbc7c9803ceed7ad477e @@ -17134,6 +17411,14 @@ trackedFiles: id: 07d6199bf63f last_write_checksum: sha1:45c918e1ee16841f146774cc8ed13ede218b4a6b pristine_git_object: 6a847d2e295237f3f3f7448d65f44105863421bf + src/models/managedprivateendpoint.ts: + id: aa79ac02afd9 + last_write_checksum: sha1:c36709febff88e015ad426566ac1fa1c5ab028a4 + pristine_git_object: fa5c1e732723468dc2e0dee95041652ba31650ba + src/models/managedprivateendpointresponse.ts: + id: 24ff2f9760bd + last_write_checksum: sha1:81ae5630f0bf617c10d5e341dd76d39ebcd2546f + pristine_git_object: 7b1681e8d0dbc614e31138137e22149fb5ace200 src/models/mcpapprovalrequestitem.ts: id: 03d997756e6c last_write_checksum: sha1:8004c461c49bc4edb1a8c25d6b89a11d8a50decc @@ -17462,6 +17747,10 @@ trackedFiles: id: 4d50f36832ad last_write_checksum: sha1:ed710b20f8c4200dddf713871475c22590faa63a pristine_git_object: 8be325a42cbadbf7b6180d5fe24d0e047ec11b23 + src/models/operations/activateprivateendpoint.ts: + id: 67a95de4b97f + last_write_checksum: sha1:221db5c1a5234c0a3521e422e6c4a809b5658002 + pristine_git_object: 80a5856be3920ee678330f72482b013ef18aa151 src/models/operations/bulkaddworkspacemembers.ts: id: 5868f2fbd4d9 last_write_checksum: sha1:914bda7c34b93868f67bfe2771f4248a17b68ddd @@ -17562,6 +17851,10 @@ trackedFiles: id: c0a2f8b46a1c last_write_checksum: sha1:089374c1a950fbf6bc0adcb6a66f7c2c2e13c9fb pristine_git_object: f9b360bb3d14c0200ed02833f77c61ef5f525690 + src/models/operations/createprivateendpoint.ts: + id: 469b6f483a53 + last_write_checksum: sha1:fc6f9dceaf0c144addcc405fc7733c6015099e1f + pristine_git_object: c263f7e660954f6c8da7f8f780ab074ceb5b02d2 src/models/operations/creatererank.ts: id: e1de55b94363 last_write_checksum: sha1:eb3f551d0b5421fcff5fb638ecb08054cf84f977 @@ -17622,6 +17915,10 @@ trackedFiles: id: a6ab575f608d last_write_checksum: sha1:0fedf5958fb382251ff4cf7bcdedac6f8b71ab9b pristine_git_object: 5cebb7f937c9cfb20b0d63b9f9422578dc272f02 + src/models/operations/deleteprivateendpoint.ts: + id: a0caf4badde5 + last_write_checksum: sha1:417ff199d2de486574f7a574aa50385d4d99c9b4 + pristine_git_object: 095db735135aba43e90271679640838fd4f7694c src/models/operations/deletescimgroupmapping.ts: id: 28528c6c5f62 last_write_checksum: sha1:ef705be3b0ace6ee33d2f9e48295c59c170212ee @@ -17638,6 +17935,10 @@ trackedFiles: id: f9fd25ea4948 last_write_checksum: sha1:d3cd764352b11bada75aacd818cfb9f10a1da416 pristine_git_object: 2d4d8addac13b7140a917a0d1bb7c3ca1469a101 + src/models/operations/disableprivateendpoint.ts: + id: 3a08f5ad738c + last_write_checksum: sha1:71da424f3ec4a3741e69a31bf6a05058ae2d576c + pristine_git_object: b2cc74b9dae3feac5d558850bdc8d054c0cb00f3 src/models/operations/downloadcontainerfilecontent.ts: id: 0bc1bd778769 last_write_checksum: sha1:e11d009e8b7c1022d1e5727b283dfdbe0e1778d5 @@ -17646,6 +17947,10 @@ trackedFiles: id: 1c7f08d2fedf last_write_checksum: sha1:dadd6bb96a3937e36a02d2890fcd00e8491da320 pristine_git_object: 8dcf75e09db8dee253500c4351cbb5e769e78f19 + src/models/operations/enableprivateendpoint.ts: + id: e1500a47cc96 + last_write_checksum: sha1:34c952fcfa2a63ee5ef82b8bb72b54dabf091366 + pristine_git_object: ca6303454492cbe3b5a27dd9cda42c4c2e656088 src/models/operations/exchangeauthcodeforapikey.ts: id: 440595fac2ad last_write_checksum: sha1:7ebe26079a39df4ed8b3b8357d1b44b91bdc1454 @@ -17730,6 +18035,10 @@ trackedFiles: id: e1b248af1f73 last_write_checksum: sha1:fe86238b200935c2f0bcd39afe0f84cb0fc79e66 pristine_git_object: 6720ddf5594b84e705b19f0d494809a9ed17c537 + src/models/operations/getprivateendpoint.ts: + id: d2a00e755d45 + last_write_checksum: sha1:00d28090e82f995eee51a341883a0b5479ec3b7f + pristine_git_object: ad17c1289840f878e0c4acce6a1ed926f6d4b2ff src/models/operations/getrankingsdaily.ts: id: b165b39aba3b last_write_checksum: sha1:32bf3b847bf3c69eda9be0575af092236369d58f @@ -17768,8 +18077,8 @@ trackedFiles: pristine_git_object: a052ed42bd123e79be1f05dc823c808f8c32b383 src/models/operations/index.ts: id: 0d9ffaf774d2 - last_write_checksum: sha1:2d641f5b28cdd363365c30b1a47067494a14e3a4 - pristine_git_object: 0c0dc1d66d760ab4956262245db7c7256c2a1731 + last_write_checksum: sha1:7084571e42a12b1c2fb564bb91c346f068b1653c + pristine_git_object: 700a9ee1da516f6586693b0238382e6d6721ca60 src/models/operations/invokeintern.ts: id: f2b19fbd8a96 last_write_checksum: sha1:55f0d7c3a2020919fbf3e92c2c7524a75a412504 @@ -17874,6 +18183,10 @@ trackedFiles: id: 7971ca6e4018 last_write_checksum: sha1:3eec59b3a02eec059acd341778d8b1d6fe58e92f pristine_git_object: 40e57aeff4fcc5a61f86f65c11af0c6f2b3f050d + src/models/operations/listprivateendpoints.ts: + id: 21c6af9f454c + last_write_checksum: sha1:ad7bdc80157b7a11fdcd215b3a3c9aefa5143202 + pristine_git_object: adbf585fb905aada980b318eaf0d07922126d5ff src/models/operations/listproviders.ts: id: 76a35169de06 last_write_checksum: sha1:503279e69e79eb16b187320616c248aa9973567e @@ -17962,6 +18275,14 @@ trackedFiles: id: efb1e13263f5 last_write_checksum: sha1:f45abdbd2aaa233c10479dd83468fd91c9614665 pristine_git_object: 5ca7155df4018f85796f4fddf486f6f1784f6897 + src/models/operations/updateprivateendpoint.ts: + id: 05253f9e2009 + last_write_checksum: sha1:37f9ad769e6e5e8eb280d747ecf5919aa50e9701 + pristine_git_object: b97e901df4551b27a6cabb864f6b7857fdac971e + src/models/operations/updateprivateendpointpricing.ts: + id: 412bca3c778f + last_write_checksum: sha1:1b900196c41dd361ba6118bbc2d6c757e8101eab + pristine_git_object: 61681e8c2a3571e54a09ec91c940f0af970df708 src/models/operations/updatescimgroupmapping.ts: id: 6b5a9008ec50 last_write_checksum: sha1:d79c7f61099e5c7eb8106abb5ab24b0e1f9a7c75 @@ -17978,6 +18299,10 @@ trackedFiles: id: f2bb866e828c last_write_checksum: sha1:9bc85cc6e33775e22b52af52fbfb14f2dda816ed pristine_git_object: e03c5c2da7ba12d97a414a9af7347e3d3c1a4c83 + src/models/operations/validateprivateendpoint.ts: + id: 7b1a6ff8bf8d + last_write_checksum: sha1:47a54115bcb5376948bf5d3ec1e03b8a48f390a3 + pristine_git_object: 70c510f4f371e9ff40affc2d90689ad709a4b46f src/models/oranthropicbashtoolresult.ts: id: 13070e32efe3 last_write_checksum: sha1:097525bdec2eb64b1eca30509a31f9c7127c6537 @@ -18242,6 +18567,54 @@ trackedFiles: id: b1116f9327ef last_write_checksum: sha1:eca00827da27079b7974395d253ed63f8779c226 pristine_git_object: cb35565ab92c961fdea95cadc07a5135203f4ea7 + src/models/privateendpoint.ts: + id: facf19d1d363 + last_write_checksum: sha1:a225f97905763c265660af26f73874d9841c7540 + pristine_git_object: 436826c72671f846730565eb2f099d376d9db6d8 + src/models/privateendpointactivation.ts: + id: 1cd601dfa05c + last_write_checksum: sha1:40032e5c5e4b2f96403f1837a3ed1dc99b3824ee + pristine_git_object: d65964fe90f74d8f8565a450db351843961e2116 + src/models/privateendpointcheck.ts: + id: 680e5562177c + last_write_checksum: sha1:4ca9d3fb72facad7e0cc4a57bdb950075f053bca + pristine_git_object: a6d8a2ce0ce4ef38ff6dda07d7aa06cc975c8ff2 + src/models/privateendpointcheckreason.ts: + id: 5d4379eaa453 + last_write_checksum: sha1:c1a01c95a323c7cd390982439ab823ac37f61917 + pristine_git_object: b01a8ad4ffc46fb69e9c4bdd8888e1618ace4575 + src/models/privateendpointdeclaredregion.ts: + id: e91a7cba073a + last_write_checksum: sha1:f06e4d0bd39d1e44067a56c776efd0838372f0cb + pristine_git_object: 19644f7c06bbf8a6920dc5206312fb4be5878ede + src/models/privateendpointpricing.ts: + id: c780fa3f1dc9 + last_write_checksum: sha1:0515be40d82bed85725d65bd67f4075ff6dd2a0a + pristine_git_object: d02dc47471bb0abb7c7e8d17361116aaf5166e7b + src/models/privateendpointresponse.ts: + id: 852b6135ff3d + last_write_checksum: sha1:01b7ba92eabd9e66eb54dc8151f3707a8fba0bf8 + pristine_git_object: d8bf6c3a7035d09c1b155b0a1eaea8066870dc6a + src/models/privateendpointstatus.ts: + id: d539deb2b851 + last_write_checksum: sha1:2decef82b2f5345b7d450cd28b6089874265e14f + pristine_git_object: e1907c3a2c1db0a6491b6bff8ae88282124a1e2e + src/models/privateendpointsummary.ts: + id: 8f13349c68fa + last_write_checksum: sha1:eda6a7fa042ef3b1b4246cf7722b3293ad6c022f + pristine_git_object: 5bc7b9dcbe19ddf7d2d9bd4983a590e1d0ab490d + src/models/privateendpointvalidation.ts: + id: c29e1f33143e + last_write_checksum: sha1:594da53aee22f941e46ffc2b3c42cb37c6593643 + pristine_git_object: 23d5992f571419c0fc63796d803e7adf30850d53 + src/models/privateendpointvalidationnullable.ts: + id: cf4aae30836f + last_write_checksum: sha1:1a3d1cfcd456ac798c2b4eff2dc34d09b93dbd2b + pristine_git_object: 2ea8fa8b15edd5e718306ab63f15308322a03be8 + src/models/privateendpointvalidationresponse.ts: + id: a3a95aa177a5 + last_write_checksum: sha1:471d50712b382a2c76f46bd6bcd0885cb8c90eaf + pristine_git_object: 31d1f4b970eda9dc80df965ec6b443af4eafa4ac src/models/promptcachebreakpoint.ts: id: f8222f76987b last_write_checksum: sha1:dde10f33a8e7f5001fd1af2ba6a875c7a717440c @@ -18814,6 +19187,14 @@ trackedFiles: id: 784690ec7bf0 last_write_checksum: sha1:9804041cdeea6f0f667d799a4903848bfd0abb1b pristine_git_object: 14c95b9e7b432df315e2c95891e83d10399b408d + src/models/updateprivateendpointpricingrequest.ts: + id: af98cc8bf348 + last_write_checksum: sha1:c237baf2102cf9fd6afaa2c7a02de97fb8b865f4 + pristine_git_object: f80838e498a97b6a70732bfcbd3228fff6f4bc0a + src/models/updateprivateendpointrequest.ts: + id: 998472d2d99c + last_write_checksum: sha1:8534cd67baf624e9116f4d0433b5625676ecaaa3 + pristine_git_object: e4dc175c26e8af2de635cca849439d9aae2ba02a src/models/updatescimgroupmappingrequest.ts: id: ae49c0bf110c last_write_checksum: sha1:4fb857d9e295a637c25a169c46018989f1696036 @@ -18842,6 +19223,10 @@ trackedFiles: id: ccd6ecd62c64 last_write_checksum: sha1:00a88d8fc47fc4af818951f18b97437de5c7a979 pristine_git_object: 43658c2bafcbeba1e20a00c131167f8bef08d03c + src/models/validateprivateendpointrequest.ts: + id: f7909806f4e1 + last_write_checksum: sha1:fbdbc3aa6a79633c1d12c1f4eb28f820964804f7 + pristine_git_object: ebf610c9efacd08a3d9c5960465e9708564f7458 src/models/vaultsecret.ts: id: daa0ae6ffc96 last_write_checksum: sha1:2ef7624a977d16ce5546dba23aed15dbba49eb1c @@ -19094,6 +19479,10 @@ trackedFiles: id: c13a03e2e16b last_write_checksum: sha1:f37254ae887dbd98bd62ab2d9b3e4ba6048995ab pristine_git_object: 954592d2ab2afdd31bf5f55458672a787a1a767b + src/sdk/privateendpoints.ts: + id: ed31ec182fa7 + last_write_checksum: sha1:959ae4473738d2df307135b55cb9a00f5f1ddcb0 + pristine_git_object: 2a55996be9255841a54c12c5ec5819964d97042c src/sdk/providers.ts: id: fb8faa7013d0 last_write_checksum: sha1:80c337cdcdfb182fcaa124dd2e1c62947faf74cf @@ -19112,8 +19501,8 @@ trackedFiles: pristine_git_object: 8e9b4047e476a17451b5feb7e9d4a32eec7f61f8 src/sdk/sdk.ts: id: 784571af2f69 - last_write_checksum: sha1:cd9b0964c8fc1dd4700d9330b5de6c74f21f4a91 - pristine_git_object: b83fbcaad80bee4591d0227fd390c3ef4bf9d295 + last_write_checksum: sha1:272af33238eb84f5f569800cbfb76018253dc261 + pristine_git_object: d5726986f92f5958854fe3804915fed0cdb9eee5 src/sdk/stt.ts: id: fd9e88c22d1f last_write_checksum: sha1:baa74a0310eb8b465dea302495e744e3f3ea1ca5 @@ -22557,8 +22946,260 @@ examples: application/json: {"error": {"code": 404, "message": "Intern not found"}} "500": application/json: {"error": {"code": 404, "message": "Intern not found"}} + listPrivateEndpoints: + speakeasy-default-list-private-endpoints: + responses: + "200": + application/json: {"data": [{"created_at": "2026-09-24T10:30:00Z", "id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", "model_name": "OpenAI: GPT-4o", "model_permaslug": "openai/gpt-4o-2024-08-06", "model_slug": "openai/gpt-4o", "provider_name": "Azure", "status": "active"}]} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "408": + application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + createPrivateEndpoint: + speakeasy-default-create-private-endpoint: + requestBody: + application/json: {"model_permaslug": "openai/gpt-4o-2024-08-06", "provider_slug": "azure", "upstream_model_id": "gpt-4o-prod"} + responses: + "201": + application/json: {"data": {"created_at": "2026-09-24T10:30:00Z", "id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", "model_name": "OpenAI: GPT-4o", "model_permaslug": "openai/gpt-4o-2024-08-06", "model_slug": "openai/gpt-4o", "provider_name": "Azure", "status": "active", "declared_region": "us", "declared_zdr": true}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "408": + application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}} + "409": + application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}} + "422": + application/json: {"error": {"code": 422, "message": "Invalid argument"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "502": + application/json: {"error": {"code": 502, "message": "Provider returned error"}} + deletePrivateEndpoint: + speakeasy-default-delete-private-endpoint: + parameters: + path: + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11" + responses: + "200": + application/json: {"data": {"id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11"}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "408": + application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}} + "409": + application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}} + "422": + application/json: {"error": {"code": 422, "message": "Invalid argument"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "502": + application/json: {"error": {"code": 502, "message": "Provider returned error"}} + getPrivateEndpoint: + speakeasy-default-get-private-endpoint: + parameters: + path: + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11" + responses: + "200": + application/json: {"data": {"base_url": "https://contoso.openai.azure.com", "declared_region": "us", "declared_zdr": true, "id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", "model_name": "OpenAI: GPT-4o", "model_permaslug": "openai/gpt-4o-2024-08-06", "model_slug": "openai/gpt-4o", "pricing": {"completion": "0.00001", "prompt": "0.0000025"}, "provider_name": "Azure", "provider_slug": "azure", "status": "active", "upstream_model_id": "gpt-4o-prod"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "408": + application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + updatePrivateEndpoint: + speakeasy-default-update-private-endpoint: + parameters: + path: + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11" + requestBody: + application/json: {"upstream_model_id": "gpt-4o-prod"} + responses: + "200": + application/json: {"data": {"base_url": "https://contoso.openai.azure.com", "declared_region": "us", "declared_zdr": true, "id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", "model_name": "OpenAI: GPT-4o", "model_permaslug": "openai/gpt-4o-2024-08-06", "model_slug": "openai/gpt-4o", "pricing": {"completion": "0.00001", "prompt": "0.0000025"}, "provider_name": "Azure", "provider_slug": "azure", "status": "active", "upstream_model_id": "gpt-4o-prod"}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "408": + application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}} + "409": + application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}} + "422": + application/json: {"error": {"code": 422, "message": "Invalid argument"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "502": + application/json: {"error": {"code": 502, "message": "Provider returned error"}} + activatePrivateEndpoint: + speakeasy-default-activate-private-endpoint: + parameters: + path: + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11" + responses: + "200": + application/json: {"data": {"created_at": "2026-09-24T10:30:00Z", "id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", "model_name": "OpenAI: GPT-4o", "model_permaslug": "openai/gpt-4o-2024-08-06", "model_slug": "openai/gpt-4o", "provider_name": "Azure", "status": "active", "declared_region": "us", "declared_zdr": true}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "408": + application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}} + "409": + application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}} + "422": + application/json: {"error": {"code": 422, "message": "Invalid argument"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "502": + application/json: {"error": {"code": 502, "message": "Provider returned error"}} + disablePrivateEndpoint: + speakeasy-default-disable-private-endpoint: + parameters: + path: + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11" + responses: + "200": + application/json: {"data": {"created_at": "2026-09-24T10:30:00Z", "id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", "model_name": "OpenAI: GPT-4o", "model_permaslug": "openai/gpt-4o-2024-08-06", "model_slug": "openai/gpt-4o", "provider_name": "Azure", "status": "active", "declared_region": "us", "declared_zdr": true}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "408": + application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}} + "409": + application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}} + "422": + application/json: {"error": {"code": 422, "message": "Invalid argument"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "502": + application/json: {"error": {"code": 502, "message": "Provider returned error"}} + enablePrivateEndpoint: + speakeasy-default-enable-private-endpoint: + parameters: + path: + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11" + responses: + "200": + application/json: {"data": {"created_at": "2026-09-24T10:30:00Z", "id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", "model_name": "OpenAI: GPT-4o", "model_permaslug": "openai/gpt-4o-2024-08-06", "model_slug": "openai/gpt-4o", "provider_name": "Azure", "status": "active", "declared_region": "us", "declared_zdr": true}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "408": + application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}} + "409": + application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}} + "422": + application/json: {"error": {"code": 422, "message": "Invalid argument"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "502": + application/json: {"error": {"code": 502, "message": "Provider returned error"}} + updatePrivateEndpointPricing: + speakeasy-default-update-private-endpoint-pricing: + parameters: + path: + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11" + requestBody: + application/json: {"pricing": {"completion": "0.00001", "prompt": "0.0000025"}} + responses: + "200": + application/json: {"data": {"base_url": "https://contoso.openai.azure.com", "declared_region": "us", "declared_zdr": true, "id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", "model_name": "OpenAI: GPT-4o", "model_permaslug": "openai/gpt-4o-2024-08-06", "model_slug": "openai/gpt-4o", "pricing": {"completion": "0.00001", "prompt": "0.0000025"}, "provider_name": "Azure", "provider_slug": "azure", "status": "active", "upstream_model_id": "gpt-4o-prod"}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "408": + application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}} + "409": + application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}} + "422": + application/json: {"error": {"code": 422, "message": "Invalid argument"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "502": + application/json: {"error": {"code": 502, "message": "Provider returned error"}} + validatePrivateEndpoint: + speakeasy-default-validate-private-endpoint: + parameters: + path: + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11" + requestBody: + application/json: {"workspace_id": "550e8400-e29b-41d4-a716-446655440000"} + responses: + "200": + application/json: {"data": {"checks": [{"name": "auth_ok", "passed": true}], "passed": true}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header"}} + "403": + application/json: {"error": {"code": 403, "message": "Only management keys can perform this operation"}} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found"}} + "408": + application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later."}} + "409": + application/json: {"error": {"code": 409, "message": "Resource conflict. Please try again later."}} + "422": + application/json: {"error": {"code": 422, "message": "Invalid argument"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} + "502": + application/json: {"error": {"code": 502, "message": "Provider returned error"}} examplesVersion: 1.0.2 releaseNotes: | ## Typescript SDK Changes: - * `openrouter.batch.createBatches()`: `response.results[].response.body.union(class (2)).content[].union(web_fetch_tool_result).content.union(web_fetch_tool_result_error).errorCode.enum(contentTooLarge)` **Added** - * `openrouter.batch.getBatches()`: `response.results[].response.body.union(class (2)).content[].union(web_fetch_tool_result).content.union(web_fetch_tool_result_error).errorCode.enum(contentTooLarge)` **Added** + * `openrouter.privateEndpoints.list()`: **Added** + * `openrouter.privateEndpoints.create()`: **Added** + * `openrouter.privateEndpoints.delete()`: **Added** + * `openrouter.privateEndpoints.get()`: **Added** + * `openrouter.privateEndpoints.update()`: **Added** + * `openrouter.privateEndpoints.activate()`: **Added** + * `openrouter.privateEndpoints.disable()`: **Added** + * `openrouter.privateEndpoints.enable()`: **Added** + * `openrouter.privateEndpoints.updatePricing()`: **Added** + * `openrouter.privateEndpoints.validate()`: **Added** diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index a1590b0eb..c98ed14e1 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -37,7 +37,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true typescript: - version: 1.3.36 + version: 1.4.0 acceptHeaderEnum: false additionalDependencies: dependencies: diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index abe1cf97a..5fc93b523 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -9485,6 +9485,80 @@ components: required: - 'data' type: 'object' + CreatePrivateEndpointRequest: + properties: + activate: + $ref: '#/components/schemas/PrivateEndpointActivation' + base_url: + description: 'HTTPS base URL of your deployment. Required unless the provider derives its URL from the BYOK credential (Azure, Amazon Bedrock, Google Vertex).' + example: 'https://contoso.openai.azure.com' + minLength: 1 + type: 'string' + declared_region: + description: 'Attest where this deployment processes data.' + enum: + - 'global' + - 'europe' + - 'us' + - null + example: 'us' + type: + - 'string' + - 'null' + x-speakeasy-unknown-values: allow + declared_zdr: + description: 'Attest that this deployment retains no prompt or completion data.' + type: + - 'boolean' + - 'null' + model_permaslug: + description: 'Permanent slug of the model this endpoint serves.' + example: 'openai/gpt-4o-2024-08-06' + minLength: 1 + type: 'string' + pricing: + $ref: '#/components/schemas/PrivateEndpointPricing' + provider_slug: + description: 'Slug of the upstream provider.' + example: 'azure' + minLength: 1 + type: 'string' + upstream_model_id: + description: 'Model or deployment identifier sent to the upstream provider.' + example: 'gpt-4o-prod' + minLength: 1 + type: 'string' + required: + - 'model_permaslug' + - 'provider_slug' + - 'upstream_model_id' + type: 'object' + CreatePrivateEndpointValidationFailedResponse: + properties: + data: + properties: + endpoint: + $ref: '#/components/schemas/ManagedPrivateEndpoint' + validation: + $ref: '#/components/schemas/PrivateEndpointValidationNullable' + required: + - 'endpoint' + - 'validation' + type: 'object' + error: + properties: + code: + type: 'integer' + message: + type: 'string' + required: + - 'code' + - 'message' + type: 'object' + required: + - 'error' + - 'data' + type: 'object' CreateScimGroupMappingRequest: properties: role: @@ -10255,6 +10329,21 @@ components: required: - 'deleted' type: 'object' + DeletePrivateEndpointResponse: + properties: + data: + properties: + id: + description: 'Stable identifier of the private endpoint.' + example: '5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11' + format: 'uuid' + type: 'string' + required: + - 'id' + type: 'object' + required: + - 'data' + type: 'object' DeleteScimGroupMappingResponse: properties: deleted: @@ -15354,6 +15443,15 @@ components: - 'data' - 'total_count' type: 'object' + ListPrivateEndpointsResponse: + properties: + data: + items: + $ref: '#/components/schemas/PrivateEndpointSummary' + type: 'array' + required: + - 'data' + type: 'object' ListScimGroupMappingsResponse: properties: data: @@ -15549,6 +15647,29 @@ components: - 'id' - 'output' type: 'object' + ManagedPrivateEndpoint: + allOf: + - $ref: '#/components/schemas/PrivateEndpointSummary' + - properties: + declared_region: + $ref: '#/components/schemas/PrivateEndpointDeclaredRegion' + declared_zdr: + description: 'Whether you attest this deployment retains no prompt or completion data. `null` means undeclared.' + example: true + type: + - 'boolean' + - 'null' + required: + - 'declared_zdr' + - 'declared_region' + type: 'object' + ManagedPrivateEndpointResponse: + properties: + data: + $ref: '#/components/schemas/ManagedPrivateEndpoint' + required: + - 'data' + type: 'object' McpApprovalRequestItem: description: 'Request for approval to execute an MCP tool' example: @@ -24459,6 +24580,284 @@ components: format: 'double' type: 'number' type: 'object' + PrivateEndpoint: + example: + base_url: 'https://contoso.openai.azure.com' + declared_region: 'us' + declared_zdr: true + id: '5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11' + model_name: 'OpenAI: GPT-4o' + model_permaslug: 'openai/gpt-4o-2024-08-06' + model_slug: 'openai/gpt-4o' + pricing: + completion: '0.00001' + prompt: '0.0000025' + provider_name: 'Azure' + provider_slug: 'azure' + status: 'active' + upstream_model_id: 'gpt-4o-prod' + properties: + base_url: + description: 'HTTPS base URL of your deployment, or `null` for providers whose URL is derived from the BYOK credential (Azure, Amazon Bedrock, Google Vertex).' + example: 'https://contoso.openai.azure.com' + type: + - 'string' + - 'null' + declared_region: + $ref: '#/components/schemas/PrivateEndpointDeclaredRegion' + declared_zdr: + description: 'Whether you attest this deployment retains no prompt or completion data. `null` means undeclared.' + example: true + type: + - 'boolean' + - 'null' + id: + description: 'Stable identifier of the private endpoint.' + example: '5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11' + format: 'uuid' + type: 'string' + model_name: + description: 'Display name of the model, or `null` when the model is no longer listed.' + example: 'OpenAI: GPT-4o' + type: + - 'string' + - 'null' + model_permaslug: + description: 'Permanent slug of the model this endpoint serves.' + example: 'openai/gpt-4o-2024-08-06' + type: 'string' + model_slug: + description: 'Public model slug, or `null` when the model is no longer listed.' + example: 'openai/gpt-4o' + type: + - 'string' + - 'null' + pricing: + $ref: '#/components/schemas/PrivateEndpointPricing' + provider_name: + description: 'Display name of the upstream provider.' + example: 'Azure' + type: 'string' + provider_slug: + description: 'Slug of the upstream provider, or `null` when the provider is no longer listed.' + example: 'azure' + type: + - 'string' + - 'null' + status: + $ref: '#/components/schemas/PrivateEndpointStatus' + upstream_model_id: + description: 'Model or deployment identifier sent to the upstream provider.' + example: 'gpt-4o-prod' + type: 'string' + required: + - 'id' + - 'status' + - 'model_permaslug' + - 'model_slug' + - 'model_name' + - 'provider_name' + - 'provider_slug' + - 'base_url' + - 'upstream_model_id' + - 'declared_zdr' + - 'declared_region' + - 'pricing' + type: 'object' + PrivateEndpointActivation: + description: 'Validate and activate in the same call. On a failed validation the draft is kept and returned with a 422, so fix it and call `/validate` and `/activate` instead of creating it again.' + example: + workspace_id: '550e8400-e29b-41d4-a716-446655440000' + properties: + workspace_id: + description: 'Workspace whose BYOK credential is used for the live validation call. The workspace must belong to your account.' + example: '550e8400-e29b-41d4-a716-446655440000' + format: 'uuid' + type: 'string' + required: + - 'workspace_id' + type: 'object' + PrivateEndpointCheck: + example: + name: 'auth_ok' + passed: true + properties: + actual_model: + description: 'Model the upstream reported serving, when it differs from the request.' + type: + - 'string' + - 'null' + name: + description: 'Check name.' + example: 'auth_ok' + type: 'string' + passed: + type: 'boolean' + reason: + $ref: '#/components/schemas/PrivateEndpointCheckReason' + upstream_message: + description: 'Error message returned by your deployment when the call failed.' + type: + - 'string' + - 'null' + upstream_status: + description: 'HTTP status returned by your deployment when the call failed.' + maximum: 599 + minimum: 400 + type: 'integer' + required: + - 'name' + - 'passed' + type: 'object' + PrivateEndpointCheckReason: + description: 'Why the check failed.' + enum: + - 'database_error' + - 'endpoint_limit_reached' + - 'invalid_base_url' + - 'model_not_found' + - 'provider_not_found' + - 'endpoint_not_found' + - 'workspace_not_found' + - 'no_byok_key' + - 'key_decryption_failed' + - 'upstream_error' + - 'invalid_response' + - 'invalid_stream' + - 'missing_usage' + - 'model_mismatch' + - 'not_validated' + - 'validation_stale' + example: 'no_byok_key' + type: 'string' + x-speakeasy-unknown-values: allow + PrivateEndpointDeclaredRegion: + description: 'Where you attest this deployment processes data. `global` means not regional; `null` means undeclared.' + enum: + - 'global' + - 'europe' + - 'us' + - null + example: 'us' + type: + - 'string' + - 'null' + x-speakeasy-unknown-values: allow + PrivateEndpointPricing: + description: 'Negotiated per-token rates reported for requests routed to this endpoint.' + example: + completion: '0.00001' + prompt: '0.0000025' + properties: + completion: + description: 'USD per completion token, as a decimal string.' + example: '0.00001' + pattern: '^\d+(\.\d+)?$' + type: 'string' + prompt: + description: 'USD per prompt token, as a decimal string.' + example: '0.0000025' + pattern: '^\d+(\.\d+)?$' + type: 'string' + required: + - 'prompt' + - 'completion' + type: 'object' + PrivateEndpointResponse: + properties: + data: + $ref: '#/components/schemas/PrivateEndpoint' + required: + - 'data' + type: 'object' + PrivateEndpointStatus: + description: 'Lifecycle state. `draft` endpoints are not routable until validated and activated; `disabled` endpoints are activated but temporarily not routable.' + enum: + - 'draft' + - 'active' + - 'disabled' + example: 'active' + type: 'string' + x-speakeasy-unknown-values: allow + PrivateEndpointSummary: + properties: + created_at: + description: 'ISO timestamp of when the endpoint was created.' + example: '2026-09-24T10:30:00Z' + type: 'string' + id: + description: 'Stable identifier of the private endpoint.' + example: '5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11' + format: 'uuid' + type: 'string' + model_name: + description: 'Display name of the model, or `null` when the model is no longer listed.' + example: 'OpenAI: GPT-4o' + type: + - 'string' + - 'null' + model_permaslug: + description: 'Permanent slug of the model this endpoint serves.' + example: 'openai/gpt-4o-2024-08-06' + type: 'string' + model_slug: + description: 'Public model slug, or `null` when the model is no longer listed.' + example: 'openai/gpt-4o' + type: + - 'string' + - 'null' + provider_name: + description: 'Display name of the upstream provider.' + example: 'Azure' + type: 'string' + status: + $ref: '#/components/schemas/PrivateEndpointStatus' + required: + - 'id' + - 'status' + - 'model_permaslug' + - 'model_slug' + - 'model_name' + - 'provider_name' + - 'created_at' + type: 'object' + PrivateEndpointValidation: + properties: + checks: + items: + $ref: '#/components/schemas/PrivateEndpointCheck' + type: 'array' + passed: + description: 'Whether every check passed.' + example: true + type: 'boolean' + required: + - 'passed' + - 'checks' + type: 'object' + PrivateEndpointValidationNullable: + properties: + checks: + items: + $ref: '#/components/schemas/PrivateEndpointCheck' + type: 'array' + passed: + description: 'Whether every check passed.' + example: true + type: 'boolean' + required: + - 'passed' + - 'checks' + type: + - 'object' + - 'null' + PrivateEndpointValidationResponse: + properties: + data: + $ref: '#/components/schemas/PrivateEndpointValidation' + required: + - 'data' + type: 'object' PromptCacheBreakpoint: description: 'Marks an explicit prompt-cache boundary on this content block (OpenAI-style). Everything through the block carrying this marker is part of the candidate cached prefix. Supported natively by OpenAI GPT-5.6 and newer; on providers that use Anthropic-style `cache_control`, OpenRouter converts the marker to that format automatically.' example: @@ -30062,6 +30461,45 @@ components: required: - 'data' type: 'object' + UpdatePrivateEndpointPricingRequest: + properties: + pricing: + $ref: '#/components/schemas/PrivateEndpointPricing' + required: + - 'pricing' + type: 'object' + UpdatePrivateEndpointRequest: + properties: + base_url: + description: 'HTTPS base URL of your deployment. Required unless the provider derives its URL from the BYOK credential (Azure, Amazon Bedrock, Google Vertex).' + example: 'https://contoso.openai.azure.com' + minLength: 1 + type: 'string' + declared_region: + description: 'Attest where this deployment processes data.' + enum: + - 'global' + - 'europe' + - 'us' + - null + example: 'us' + type: + - 'string' + - 'null' + x-speakeasy-unknown-values: allow + declared_zdr: + description: 'Attest that this deployment retains no prompt or completion data.' + type: + - 'boolean' + - 'null' + upstream_model_id: + description: 'Model or deployment identifier sent to the upstream provider.' + example: 'gpt-4o-prod' + minLength: 1 + type: 'string' + required: + - 'upstream_model_id' + type: 'object' UpdateScimGroupMappingRequest: properties: role: @@ -30326,6 +30764,16 @@ components: output_tokens_details: reasoning_tokens: 0 total_tokens: 35 + ValidatePrivateEndpointRequest: + properties: + workspace_id: + description: 'Workspace whose BYOK credential is used for the live validation call. The workspace must belong to your account.' + example: '550e8400-e29b-41d4-a716-446655440000' + format: 'uuid' + type: 'string' + required: + - 'workspace_id' + type: 'object' VaultSecret: additionalProperties: false description: 'Metadata for one stored secret. The secret value is never returned. `fingerprint` is an HMAC-SHA-256 of the value keyed with that vault''s own data key, so it is comparable only within one vault: equal fingerprints in one vault mean equal values, and rewriting the same value keeps its fingerprint. The same value stored in two vaults (for example a workspace secret and its intern copy) carries different fingerprints, so comparing fingerprints across vaults cannot show that a copy matches or that a rotation propagated. `hosts` and `fingerprint` are `null` only for legacy rows written before host binding was required; storing the secret again assigns hosts.' @@ -44796,6 +45244,1107 @@ paths: - $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppCategories" + /private-endpoints: + get: + description: 'List the organization''s private endpoints, including drafts. Requires the private endpoints entitlement. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + operationId: 'listPrivateEndpoints' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListPrivateEndpointsResponse' + description: 'Private endpoints for the organization' + '401': + content: + application/json: + example: + error: + code: 401 + message: 'Missing Authentication header' + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' + '408': + content: + application/json: + example: + error: + code: 408 + message: 'Operation timed out. Please try again later.' + schema: + $ref: '#/components/schemas/RequestTimeoutResponse' + description: 'Request Timeout - Operation exceeded time limit' + '500': + content: + application/json: + example: + error: + code: 500 + message: 'Internal Server Error' + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: 'Internal Server Error - Unexpected server error' + summary: 'List private endpoints' + tags: + - 'Private Endpoints' + x-speakeasy-name-override: 'list' + post: + description: 'Create a private endpoint as a draft. Drafts are not routable: validate one with `POST /private-endpoints/{id}/validate`, then activate it with `POST /private-endpoints/{id}/activate`. Pass `activate` to do all three in one call; if validation fails the draft is kept and returned with the failed checks. Send an `Idempotency-Key` header to make retries safe: a repeated key with the same request returns the endpoint the first request created; reusing it with different fields returns 422 `idempotency_key_reused`. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + operationId: 'createPrivateEndpoint' + parameters: + - description: 'Retry-safe create: a repeated create with the same key from the same organization returns the endpoint the first request created instead of creating another. The endpoint is returned as it is now. Reusing a key with a different request body (model, provider, base URL, upstream model ID, declared ZDR or region, or pricing) is rejected with 422 `idempotency_key_reused`. `activate` is not compared, and later edits to the endpoint do not affect the comparison.' + in: 'header' + name: 'idempotency-key' + required: false + schema: + description: 'Retry-safe create: a repeated create with the same key from the same organization returns the endpoint the first request created instead of creating another. The endpoint is returned as it is now. Reusing a key with a different request body (model, provider, base URL, upstream model ID, declared ZDR or region, or pricing) is rejected with 422 `idempotency_key_reused`. `activate` is not compared, and later edits to the endpoint do not affect the comparison.' + example: 'wayfair-gpt-4o-eastus-2026-09' + maxLength: 255 + minLength: 1 + type: 'string' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreatePrivateEndpointRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ManagedPrivateEndpointResponse' + description: 'The created endpoint: a draft, or active when `activate` was passed' + '400': + content: + application/json: + example: + error: + code: 400 + message: 'Invalid request parameters' + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: 'Bad Request - Invalid request parameters or malformed input' + '401': + content: + application/json: + example: + error: + code: 401 + message: 'Missing Authentication header' + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' + '404': + content: + application/json: + schema: + anyOf: + - $ref: '#/components/schemas/CreatePrivateEndpointValidationFailedResponse' + - $ref: '#/components/schemas/NotFoundResponse' + description: 'The model, provider, or validation workspace was not found. When `activate` was passed and the draft was created, `data` carries it and any validation checks.' + '408': + content: + application/json: + example: + error: + code: 408 + message: 'Operation timed out. Please try again later.' + schema: + $ref: '#/components/schemas/RequestTimeoutResponse' + description: 'Request Timeout - Operation exceeded time limit' + '409': + content: + application/json: + schema: + anyOf: + - $ref: '#/components/schemas/CreatePrivateEndpointValidationFailedResponse' + - $ref: '#/components/schemas/ConflictResponse' + description: 'The request conflicts with the endpoint state, such as a stale validation. When `activate` was passed and the draft was created, `data` carries it and any validation checks.' + '422': + content: + application/json: + schema: + anyOf: + - $ref: '#/components/schemas/CreatePrivateEndpointValidationFailedResponse' + - $ref: '#/components/schemas/UnprocessableEntityResponse' + description: 'The request was invalid, or validation failed. When `activate` was passed and the draft was created, `data` carries it and any validation checks.' + '500': + content: + application/json: + schema: + anyOf: + - $ref: '#/components/schemas/CreatePrivateEndpointValidationFailedResponse' + - $ref: '#/components/schemas/InternalServerResponse' + description: 'Internal server error. When `activate` was passed and the draft was created, `data` carries it and any validation checks.' + '502': + content: + application/json: + schema: + anyOf: + - $ref: '#/components/schemas/CreatePrivateEndpointValidationFailedResponse' + - $ref: '#/components/schemas/BadGatewayResponse' + description: 'An upstream dependency failed. When `activate` was passed and the draft was created, `data` carries it and any validation checks.' + summary: 'Create a private endpoint' + tags: + - 'Private Endpoints' + x-speakeasy-name-override: 'create' + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /private-endpoints/{id}: + delete: + description: 'Delete a private endpoint and stop routing to it. Pass `draft_only=true` to refuse (409) when the endpoint has been activated. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + operationId: 'deletePrivateEndpoint' + parameters: + - description: 'Stable identifier of the private endpoint.' + in: 'path' + name: 'id' + required: true + schema: + description: 'Stable identifier of the private endpoint.' + example: '5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11' + format: 'uuid' + type: 'string' + - description: 'When `true`, only delete the endpoint if it is still a draft (409 otherwise).' + in: 'query' + name: 'draft_only' + required: false + schema: + description: 'When `true`, only delete the endpoint if it is still a draft (409 otherwise).' + enum: + - 'true' + - 'false' + type: 'string' + x-speakeasy-unknown-values: allow + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeletePrivateEndpointResponse' + description: 'The endpoint was deleted' + '400': + content: + application/json: + example: + error: + code: 400 + message: 'Invalid request parameters' + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: 'Bad Request - Invalid request parameters or malformed input' + '401': + content: + application/json: + example: + error: + code: 401 + message: 'Missing Authentication header' + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' + '404': + content: + application/json: + example: + error: + code: 404 + message: 'Resource not found' + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: 'Not Found - Resource does not exist' + '408': + content: + application/json: + example: + error: + code: 408 + message: 'Operation timed out. Please try again later.' + schema: + $ref: '#/components/schemas/RequestTimeoutResponse' + description: 'Request Timeout - Operation exceeded time limit' + '409': + content: + application/json: + example: + error: + code: 409 + message: 'Resource conflict. Please try again later.' + schema: + $ref: '#/components/schemas/ConflictResponse' + description: 'Conflict - Resource conflict or concurrent modification' + '422': + content: + application/json: + example: + error: + code: 422 + message: 'Invalid argument' + schema: + $ref: '#/components/schemas/UnprocessableEntityResponse' + description: 'Unprocessable Entity - Semantic validation failure' + '500': + content: + application/json: + example: + error: + code: 500 + message: 'Internal Server Error' + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: 'Internal Server Error - Unexpected server error' + '502': + content: + application/json: + example: + error: + code: 502 + message: 'Provider returned error' + schema: + $ref: '#/components/schemas/BadGatewayResponse' + description: 'Bad Gateway - Provider/upstream API failure' + summary: 'Delete a private endpoint' + tags: + - 'Private Endpoints' + x-speakeasy-name-override: 'delete' + get: + description: 'Get one private endpoint with its upstream configuration and current pricing. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + operationId: 'getPrivateEndpoint' + parameters: + - description: 'Stable identifier of the private endpoint.' + in: 'path' + name: 'id' + required: true + schema: + description: 'Stable identifier of the private endpoint.' + example: '5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11' + format: 'uuid' + type: 'string' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PrivateEndpointResponse' + description: 'The private endpoint' + '401': + content: + application/json: + example: + error: + code: 401 + message: 'Missing Authentication header' + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' + '404': + content: + application/json: + example: + error: + code: 404 + message: 'Resource not found' + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: 'Not Found - Resource does not exist' + '408': + content: + application/json: + example: + error: + code: 408 + message: 'Operation timed out. Please try again later.' + schema: + $ref: '#/components/schemas/RequestTimeoutResponse' + description: 'Request Timeout - Operation exceeded time limit' + '500': + content: + application/json: + example: + error: + code: 500 + message: 'Internal Server Error' + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: 'Internal Server Error - Unexpected server error' + summary: 'Get a private endpoint' + tags: + - 'Private Endpoints' + x-speakeasy-name-override: 'get' + patch: + description: 'Replace a draft endpoint''s upstream configuration: send `upstream_model_id`, and `base_url` to change it (an omitted `base_url` keeps the stored one). Omitted data-policy declarations are kept while the upstream is unchanged and cleared when it changes. Any change clears earlier validation. Active endpoints return 409; delete and re-create them instead. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + operationId: 'updatePrivateEndpoint' + parameters: + - description: 'Stable identifier of the private endpoint.' + in: 'path' + name: 'id' + required: true + schema: + description: 'Stable identifier of the private endpoint.' + example: '5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11' + format: 'uuid' + type: 'string' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdatePrivateEndpointRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PrivateEndpointResponse' + description: 'The updated endpoint' + '400': + content: + application/json: + example: + error: + code: 400 + message: 'Invalid request parameters' + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: 'Bad Request - Invalid request parameters or malformed input' + '401': + content: + application/json: + example: + error: + code: 401 + message: 'Missing Authentication header' + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' + '404': + content: + application/json: + example: + error: + code: 404 + message: 'Resource not found' + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: 'Not Found - Resource does not exist' + '408': + content: + application/json: + example: + error: + code: 408 + message: 'Operation timed out. Please try again later.' + schema: + $ref: '#/components/schemas/RequestTimeoutResponse' + description: 'Request Timeout - Operation exceeded time limit' + '409': + content: + application/json: + example: + error: + code: 409 + message: 'Resource conflict. Please try again later.' + schema: + $ref: '#/components/schemas/ConflictResponse' + description: 'Conflict - Resource conflict or concurrent modification' + '422': + content: + application/json: + example: + error: + code: 422 + message: 'Invalid argument' + schema: + $ref: '#/components/schemas/UnprocessableEntityResponse' + description: 'Unprocessable Entity - Semantic validation failure' + '500': + content: + application/json: + example: + error: + code: 500 + message: 'Internal Server Error' + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: 'Internal Server Error - Unexpected server error' + '502': + content: + application/json: + example: + error: + code: 502 + message: 'Provider returned error' + schema: + $ref: '#/components/schemas/BadGatewayResponse' + description: 'Bad Gateway - Provider/upstream API failure' + summary: 'Update a draft private endpoint' + tags: + - 'Private Endpoints' + x-speakeasy-name-override: 'update' + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /private-endpoints/{id}/activate: + post: + description: 'Make a validated draft routable. Returns 409 when the endpoint was never validated, the validation is stale, or it is already active. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + operationId: 'activatePrivateEndpoint' + parameters: + - description: 'Stable identifier of the private endpoint.' + in: 'path' + name: 'id' + required: true + schema: + description: 'Stable identifier of the private endpoint.' + example: '5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11' + format: 'uuid' + type: 'string' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ManagedPrivateEndpointResponse' + description: 'The endpoint after the change' + '400': + content: + application/json: + example: + error: + code: 400 + message: 'Invalid request parameters' + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: 'Bad Request - Invalid request parameters or malformed input' + '401': + content: + application/json: + example: + error: + code: 401 + message: 'Missing Authentication header' + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' + '404': + content: + application/json: + example: + error: + code: 404 + message: 'Resource not found' + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: 'Not Found - Resource does not exist' + '408': + content: + application/json: + example: + error: + code: 408 + message: 'Operation timed out. Please try again later.' + schema: + $ref: '#/components/schemas/RequestTimeoutResponse' + description: 'Request Timeout - Operation exceeded time limit' + '409': + content: + application/json: + example: + error: + code: 409 + message: 'Resource conflict. Please try again later.' + schema: + $ref: '#/components/schemas/ConflictResponse' + description: 'Conflict - Resource conflict or concurrent modification' + '422': + content: + application/json: + example: + error: + code: 422 + message: 'Invalid argument' + schema: + $ref: '#/components/schemas/UnprocessableEntityResponse' + description: 'Unprocessable Entity - Semantic validation failure' + '500': + content: + application/json: + example: + error: + code: 500 + message: 'Internal Server Error' + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: 'Internal Server Error - Unexpected server error' + '502': + content: + application/json: + example: + error: + code: 502 + message: 'Provider returned error' + schema: + $ref: '#/components/schemas/BadGatewayResponse' + description: 'Bad Gateway - Provider/upstream API failure' + summary: 'Activate a validated private endpoint' + tags: + - 'Private Endpoints' + x-speakeasy-name-override: 'activate' + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /private-endpoints/{id}/disable: + post: + description: 'Stop routing to an active endpoint without deleting it. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + operationId: 'disablePrivateEndpoint' + parameters: + - description: 'Stable identifier of the private endpoint.' + in: 'path' + name: 'id' + required: true + schema: + description: 'Stable identifier of the private endpoint.' + example: '5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11' + format: 'uuid' + type: 'string' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ManagedPrivateEndpointResponse' + description: 'The endpoint after the change' + '400': + content: + application/json: + example: + error: + code: 400 + message: 'Invalid request parameters' + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: 'Bad Request - Invalid request parameters or malformed input' + '401': + content: + application/json: + example: + error: + code: 401 + message: 'Missing Authentication header' + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' + '404': + content: + application/json: + example: + error: + code: 404 + message: 'Resource not found' + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: 'Not Found - Resource does not exist' + '408': + content: + application/json: + example: + error: + code: 408 + message: 'Operation timed out. Please try again later.' + schema: + $ref: '#/components/schemas/RequestTimeoutResponse' + description: 'Request Timeout - Operation exceeded time limit' + '409': + content: + application/json: + example: + error: + code: 409 + message: 'Resource conflict. Please try again later.' + schema: + $ref: '#/components/schemas/ConflictResponse' + description: 'Conflict - Resource conflict or concurrent modification' + '422': + content: + application/json: + example: + error: + code: 422 + message: 'Invalid argument' + schema: + $ref: '#/components/schemas/UnprocessableEntityResponse' + description: 'Unprocessable Entity - Semantic validation failure' + '500': + content: + application/json: + example: + error: + code: 500 + message: 'Internal Server Error' + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: 'Internal Server Error - Unexpected server error' + '502': + content: + application/json: + example: + error: + code: 502 + message: 'Provider returned error' + schema: + $ref: '#/components/schemas/BadGatewayResponse' + description: 'Bad Gateway - Provider/upstream API failure' + summary: 'Disable a private endpoint' + tags: + - 'Private Endpoints' + x-speakeasy-name-override: 'disable' + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /private-endpoints/{id}/enable: + post: + description: 'Resume routing to a disabled endpoint. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + operationId: 'enablePrivateEndpoint' + parameters: + - description: 'Stable identifier of the private endpoint.' + in: 'path' + name: 'id' + required: true + schema: + description: 'Stable identifier of the private endpoint.' + example: '5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11' + format: 'uuid' + type: 'string' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ManagedPrivateEndpointResponse' + description: 'The endpoint after the change' + '400': + content: + application/json: + example: + error: + code: 400 + message: 'Invalid request parameters' + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: 'Bad Request - Invalid request parameters or malformed input' + '401': + content: + application/json: + example: + error: + code: 401 + message: 'Missing Authentication header' + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' + '404': + content: + application/json: + example: + error: + code: 404 + message: 'Resource not found' + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: 'Not Found - Resource does not exist' + '408': + content: + application/json: + example: + error: + code: 408 + message: 'Operation timed out. Please try again later.' + schema: + $ref: '#/components/schemas/RequestTimeoutResponse' + description: 'Request Timeout - Operation exceeded time limit' + '409': + content: + application/json: + example: + error: + code: 409 + message: 'Resource conflict. Please try again later.' + schema: + $ref: '#/components/schemas/ConflictResponse' + description: 'Conflict - Resource conflict or concurrent modification' + '422': + content: + application/json: + example: + error: + code: 422 + message: 'Invalid argument' + schema: + $ref: '#/components/schemas/UnprocessableEntityResponse' + description: 'Unprocessable Entity - Semantic validation failure' + '500': + content: + application/json: + example: + error: + code: 500 + message: 'Internal Server Error' + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: 'Internal Server Error - Unexpected server error' + '502': + content: + application/json: + example: + error: + code: 502 + message: 'Provider returned error' + schema: + $ref: '#/components/schemas/BadGatewayResponse' + description: 'Bad Gateway - Provider/upstream API failure' + summary: 'Enable a private endpoint' + tags: + - 'Private Endpoints' + x-speakeasy-name-override: 'enable' + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /private-endpoints/{id}/pricing: + put: + description: 'Set the negotiated per-token rates reported for requests routed to this endpoint. Applies to drafts and active endpoints; new rates take effect for subsequent requests. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + operationId: 'updatePrivateEndpointPricing' + parameters: + - description: 'Stable identifier of the private endpoint.' + in: 'path' + name: 'id' + required: true + schema: + description: 'Stable identifier of the private endpoint.' + example: '5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11' + format: 'uuid' + type: 'string' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdatePrivateEndpointPricingRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PrivateEndpointResponse' + description: 'The endpoint with its new pricing' + '400': + content: + application/json: + example: + error: + code: 400 + message: 'Invalid request parameters' + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: 'Bad Request - Invalid request parameters or malformed input' + '401': + content: + application/json: + example: + error: + code: 401 + message: 'Missing Authentication header' + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' + '404': + content: + application/json: + example: + error: + code: 404 + message: 'Resource not found' + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: 'Not Found - Resource does not exist' + '408': + content: + application/json: + example: + error: + code: 408 + message: 'Operation timed out. Please try again later.' + schema: + $ref: '#/components/schemas/RequestTimeoutResponse' + description: 'Request Timeout - Operation exceeded time limit' + '409': + content: + application/json: + example: + error: + code: 409 + message: 'Resource conflict. Please try again later.' + schema: + $ref: '#/components/schemas/ConflictResponse' + description: 'Conflict - Resource conflict or concurrent modification' + '422': + content: + application/json: + example: + error: + code: 422 + message: 'Invalid argument' + schema: + $ref: '#/components/schemas/UnprocessableEntityResponse' + description: 'Unprocessable Entity - Semantic validation failure' + '500': + content: + application/json: + example: + error: + code: 500 + message: 'Internal Server Error' + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: 'Internal Server Error - Unexpected server error' + '502': + content: + application/json: + example: + error: + code: 502 + message: 'Provider returned error' + schema: + $ref: '#/components/schemas/BadGatewayResponse' + description: 'Bad Gateway - Provider/upstream API failure' + summary: 'Set private endpoint pricing' + tags: + - 'Private Endpoints' + x-speakeasy-name-override: 'updatePricing' + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" + /private-endpoints/{id}/validate: + post: + description: 'Send a live test request to the draft endpoint using the given workspace''s BYOK credential for its provider. A passing validation is required before activation. Failed checks return 200 with `passed: false`. [Management key](/docs/guides/overview/auth/management-api-keys) required.' + operationId: 'validatePrivateEndpoint' + parameters: + - description: 'Stable identifier of the private endpoint.' + in: 'path' + name: 'id' + required: true + schema: + description: 'Stable identifier of the private endpoint.' + example: '5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11' + format: 'uuid' + type: 'string' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ValidatePrivateEndpointRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PrivateEndpointValidationResponse' + description: 'Validation checks' + '400': + content: + application/json: + example: + error: + code: 400 + message: 'Invalid request parameters' + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: 'Bad Request - Invalid request parameters or malformed input' + '401': + content: + application/json: + example: + error: + code: 401 + message: 'Missing Authentication header' + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' + '404': + content: + application/json: + example: + error: + code: 404 + message: 'Resource not found' + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: 'Not Found - Resource does not exist' + '408': + content: + application/json: + example: + error: + code: 408 + message: 'Operation timed out. Please try again later.' + schema: + $ref: '#/components/schemas/RequestTimeoutResponse' + description: 'Request Timeout - Operation exceeded time limit' + '409': + content: + application/json: + example: + error: + code: 409 + message: 'Resource conflict. Please try again later.' + schema: + $ref: '#/components/schemas/ConflictResponse' + description: 'Conflict - Resource conflict or concurrent modification' + '422': + content: + application/json: + example: + error: + code: 422 + message: 'Invalid argument' + schema: + $ref: '#/components/schemas/UnprocessableEntityResponse' + description: 'Unprocessable Entity - Semantic validation failure' + '500': + content: + application/json: + example: + error: + code: 500 + message: 'Internal Server Error' + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: 'Internal Server Error - Unexpected server error' + '502': + content: + application/json: + example: + error: + code: 502 + message: 'Provider returned error' + schema: + $ref: '#/components/schemas/BadGatewayResponse' + description: 'Bad Gateway - Provider/upstream API failure' + summary: 'Validate a draft private endpoint' + tags: + - 'Private Endpoints' + x-speakeasy-name-override: 'validate' + parameters: + - $ref: "#/components/parameters/AppIdentifier" + - $ref: "#/components/parameters/AppDisplayName" + - $ref: "#/components/parameters/AppCategories" /providers: get: operationId: 'listProviders' @@ -49712,6 +51261,8 @@ tags: name: 'Organization' - description: 'Presets endpoints' name: 'Presets' + - description: 'Private Endpoints endpoints' + name: 'Private Endpoints' - description: 'Provider information endpoints' name: 'Providers' - description: 'Rerank endpoints' diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index cd42e3b74..7460953de 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.787.0 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:7c2b10cbc0fabe8df85df8e7cddccdf8a1d6f06685b2fcc891eaaec3754ef8e2 - sourceBlobDigest: sha256:94b94d028a7889c97bfe291e3879dc532f010b4e3469f17997909ced56c79461 + sourceRevisionDigest: sha256:a529cc2d3941bec2ea744863bc08f7a239d30b7e72033a2cccaf01e94b9d4bb3 + sourceBlobDigest: sha256:fb9ecf2cce9df3d4e0c78943515eacfb28c95f13a12306535e7cf632290d61ff tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:7c2b10cbc0fabe8df85df8e7cddccdf8a1d6f06685b2fcc891eaaec3754ef8e2 - sourceBlobDigest: sha256:94b94d028a7889c97bfe291e3879dc532f010b4e3469f17997909ced56c79461 + sourceRevisionDigest: sha256:a529cc2d3941bec2ea744863bc08f7a239d30b7e72033a2cccaf01e94b9d4bb3 + sourceBlobDigest: sha256:fb9ecf2cce9df3d4e0c78943515eacfb28c95f13a12306535e7cf632290d61ff codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:2b480be64f7034cd403979b575f19364c55a8299306a33ba2b2d7589e76851a3 + codeSamplesRevisionDigest: sha256:c5ec6edd5c4e93efdfc4143f121237e51f7b340f48434bfdcaa2107672446867 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.787.0 diff --git a/RELEASES.md b/RELEASES.md index ed4544f28..6579961be 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -4146,4 +4146,14 @@ Based on: ### Generated - [typescript v1.3.36] . ### Releases -- [NPM v1.3.36] https://www.npmjs.com/package/@openrouter/sdk/v/1.3.36 - . \ No newline at end of file +- [NPM v1.3.36] https://www.npmjs.com/package/@openrouter/sdk/v/1.3.36 - . + +## 2026-09-28 22:11:22 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v1.4.0] . +### Releases +- [NPM v1.4.0] https://www.npmjs.com/package/@openrouter/sdk/v/1.4.0 - . \ No newline at end of file diff --git a/docs/models/createprivateendpointrequest.mdx b/docs/models/createprivateendpointrequest.mdx new file mode 100644 index 000000000..18c19034d --- /dev/null +++ b/docs/models/createprivateendpointrequest.mdx @@ -0,0 +1,28 @@ +--- +title: "CreatePrivateEndpointRequest" +--- + +## Example Usage + +```typescript +import { CreatePrivateEndpointRequest } from "@openrouter/sdk/models"; + +let value: CreatePrivateEndpointRequest = { + modelPermaslug: "openai/gpt-4o-2024-08-06", + providerSlug: "azure", + upstreamModelId: "gpt-4o-prod", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `activate` | [models.PrivateEndpointActivation](../models/privateendpointactivation.mdx) | :heavy_minus_sign: | Validate and activate in the same call. On a failed validation the draft is kept and returned with a 422, so fix it and call `/validate` and `/activate` instead of creating it again. | \{
"workspace_id": "550e8400-e29b-41d4-a716-446655440000"
} | +| `baseUrl` | *string* | :heavy_minus_sign: | HTTPS base URL of your deployment. Required unless the provider derives its URL from the BYOK credential (Azure, Amazon Bedrock, Google Vertex). | https://contoso.openai.azure.com | +| `declaredRegion` | [models.CreatePrivateEndpointRequestDeclaredRegion](../models/createprivateendpointrequestdeclaredregion.mdx) | :heavy_minus_sign: | Attest where this deployment processes data. | us | +| `declaredZdr` | *boolean* | :heavy_minus_sign: | Attest that this deployment retains no prompt or completion data. | | +| `modelPermaslug` | *string* | :heavy_check_mark: | Permanent slug of the model this endpoint serves. | openai/gpt-4o-2024-08-06 | +| `pricing` | [models.PrivateEndpointPricing](../models/privateendpointpricing.mdx) | :heavy_minus_sign: | Negotiated per-token rates reported for requests routed to this endpoint. | \{
"completion": "0.00001",
"prompt": "0.0000025"
} | +| `providerSlug` | *string* | :heavy_check_mark: | Slug of the upstream provider. | azure | +| `upstreamModelId` | *string* | :heavy_check_mark: | Model or deployment identifier sent to the upstream provider. | gpt-4o-prod | \ No newline at end of file diff --git a/docs/models/createprivateendpointrequestdeclaredregion.mdx b/docs/models/createprivateendpointrequestdeclaredregion.mdx new file mode 100644 index 000000000..daaa7a2b1 --- /dev/null +++ b/docs/models/createprivateendpointrequestdeclaredregion.mdx @@ -0,0 +1,21 @@ +--- +title: "CreatePrivateEndpointRequestDeclaredRegion" +--- + +Attest where this deployment processes data. + +## Example Usage + +```typescript +import { CreatePrivateEndpointRequestDeclaredRegion } from "@openrouter/sdk/models"; + +let value: CreatePrivateEndpointRequestDeclaredRegion = "us"; + +// Open enum: unrecognized values are captured as Unrecognized +``` + +## Values + +```typescript +"global" | "europe" | "us" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/createprivateendpointvalidationfailedresponsedata.mdx b/docs/models/createprivateendpointvalidationfailedresponsedata.mdx new file mode 100644 index 000000000..15fb6a0fb --- /dev/null +++ b/docs/models/createprivateendpointvalidationfailedresponsedata.mdx @@ -0,0 +1,39 @@ +--- +title: "CreatePrivateEndpointValidationFailedResponseData" +--- + +## Example Usage + +```typescript +import { CreatePrivateEndpointValidationFailedResponseData } from "@openrouter/sdk/models"; + +let value: CreatePrivateEndpointValidationFailedResponseData = { + endpoint: { + createdAt: "2026-09-24T10:30:00Z", + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + modelName: "OpenAI: GPT-4o", + modelPermaslug: "openai/gpt-4o-2024-08-06", + modelSlug: "openai/gpt-4o", + providerName: "Azure", + status: "active", + declaredRegion: "us", + declaredZdr: true, + }, + validation: { + checks: [ + { + name: "auth_ok", + passed: true, + }, + ], + passed: true, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `endpoint` | [models.ManagedPrivateEndpoint](../models/managedprivateendpoint.mdx) | :heavy_check_mark: | N/A | +| `validation` | [models.PrivateEndpointValidationNullable](../models/privateendpointvalidationnullable.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/createprivateendpointvalidationfailedresponseerror.mdx b/docs/models/createprivateendpointvalidationfailedresponseerror.mdx new file mode 100644 index 000000000..0e81205ba --- /dev/null +++ b/docs/models/createprivateendpointvalidationfailedresponseerror.mdx @@ -0,0 +1,21 @@ +--- +title: "CreatePrivateEndpointValidationFailedResponseError" +--- + +## Example Usage + +```typescript +import { CreatePrivateEndpointValidationFailedResponseError } from "@openrouter/sdk/models"; + +let value: CreatePrivateEndpointValidationFailedResponseError = { + code: 16903, + message: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `code` | *number* | :heavy_check_mark: | N/A | +| `message` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/deleteprivateendpointresponse.mdx b/docs/models/deleteprivateendpointresponse.mdx new file mode 100644 index 000000000..fe84465d3 --- /dev/null +++ b/docs/models/deleteprivateendpointresponse.mdx @@ -0,0 +1,21 @@ +--- +title: "DeletePrivateEndpointResponse" +--- + +## Example Usage + +```typescript +import { DeletePrivateEndpointResponse } from "@openrouter/sdk/models"; + +let value: DeletePrivateEndpointResponse = { + data: { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [models.DeletePrivateEndpointResponseData](../models/deleteprivateendpointresponsedata.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/deleteprivateendpointresponsedata.mdx b/docs/models/deleteprivateendpointresponsedata.mdx new file mode 100644 index 000000000..31d2be37b --- /dev/null +++ b/docs/models/deleteprivateendpointresponsedata.mdx @@ -0,0 +1,19 @@ +--- +title: "DeletePrivateEndpointResponseData" +--- + +## Example Usage + +```typescript +import { DeletePrivateEndpointResponseData } from "@openrouter/sdk/models"; + +let value: DeletePrivateEndpointResponseData = { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | Stable identifier of the private endpoint. | 5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11 | \ No newline at end of file diff --git a/docs/models/errors/badgateway.mdx b/docs/models/errors/badgateway.mdx new file mode 100644 index 000000000..a19062dbb --- /dev/null +++ b/docs/models/errors/badgateway.mdx @@ -0,0 +1,53 @@ +--- +title: "BadGateway" +--- + +An upstream dependency failed. When `activate` was passed and the draft was created, `data` carries it and any validation checks. + + +## Supported Types + +### `errors.CreatePrivateEndpointValidationFailedResponseError` + +```typescript +const value: errors.CreatePrivateEndpointValidationFailedResponseError = { + data: { + endpoint: { + createdAt: "2026-09-24T10:30:00Z", + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + modelName: "OpenAI: GPT-4o", + modelPermaslug: "openai/gpt-4o-2024-08-06", + modelSlug: "openai/gpt-4o", + providerName: "Azure", + status: "active", + declaredRegion: "us", + declaredZdr: true, + }, + validation: { + checks: [ + { + name: "auth_ok", + passed: true, + }, + ], + passed: true, + }, + }, + error: { + code: 734895, + message: "", + }, +}; +``` + +### `errors.BadGatewayResponseError` + +```typescript +const value: errors.BadGatewayResponseError = { + error: { + code: 502, + message: "Provider returned error", + }, +}; +``` + diff --git a/docs/models/errors/conflict.mdx b/docs/models/errors/conflict.mdx new file mode 100644 index 000000000..e461ec842 --- /dev/null +++ b/docs/models/errors/conflict.mdx @@ -0,0 +1,53 @@ +--- +title: "Conflict" +--- + +The request conflicts with the endpoint state, such as a stale validation. When `activate` was passed and the draft was created, `data` carries it and any validation checks. + + +## Supported Types + +### `errors.CreatePrivateEndpointValidationFailedResponseError` + +```typescript +const value: errors.CreatePrivateEndpointValidationFailedResponseError = { + data: { + endpoint: { + createdAt: "2026-09-24T10:30:00Z", + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + modelName: "OpenAI: GPT-4o", + modelPermaslug: "openai/gpt-4o-2024-08-06", + modelSlug: "openai/gpt-4o", + providerName: "Azure", + status: "active", + declaredRegion: "us", + declaredZdr: true, + }, + validation: { + checks: [ + { + name: "auth_ok", + passed: true, + }, + ], + passed: true, + }, + }, + error: { + code: 734895, + message: "", + }, +}; +``` + +### `errors.ConflictResponseError` + +```typescript +const value: errors.ConflictResponseError = { + error: { + code: 409, + message: "Resource conflict. Please try again later.", + }, +}; +``` + diff --git a/docs/models/errors/createprivateendpointvalidationfailedresponseerror.mdx b/docs/models/errors/createprivateendpointvalidationfailedresponseerror.mdx new file mode 100644 index 000000000..501547393 --- /dev/null +++ b/docs/models/errors/createprivateendpointvalidationfailedresponseerror.mdx @@ -0,0 +1,18 @@ +--- +title: "CreatePrivateEndpointValidationFailedResponseError" +--- + +## Example Usage + +```typescript +import { CreatePrivateEndpointValidationFailedResponseError } from "@openrouter/sdk/models/errors"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [models.CreatePrivateEndpointValidationFailedResponseData](../../models/createprivateendpointvalidationfailedresponsedata.mdx) | :heavy_check_mark: | N/A | +| `error` | [models.CreatePrivateEndpointValidationFailedResponseError](../../models/createprivateendpointvalidationfailedresponseerror.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/internalservererror.mdx b/docs/models/errors/internalservererror.mdx new file mode 100644 index 000000000..43e749b20 --- /dev/null +++ b/docs/models/errors/internalservererror.mdx @@ -0,0 +1,53 @@ +--- +title: "InternalServerError" +--- + +Internal server error. When `activate` was passed and the draft was created, `data` carries it and any validation checks. + + +## Supported Types + +### `errors.CreatePrivateEndpointValidationFailedResponseError` + +```typescript +const value: errors.CreatePrivateEndpointValidationFailedResponseError = { + data: { + endpoint: { + createdAt: "2026-09-24T10:30:00Z", + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + modelName: "OpenAI: GPT-4o", + modelPermaslug: "openai/gpt-4o-2024-08-06", + modelSlug: "openai/gpt-4o", + providerName: "Azure", + status: "active", + declaredRegion: "us", + declaredZdr: true, + }, + validation: { + checks: [ + { + name: "auth_ok", + passed: true, + }, + ], + passed: true, + }, + }, + error: { + code: 734895, + message: "", + }, +}; +``` + +### `errors.InternalServerResponseError` + +```typescript +const value: errors.InternalServerResponseError = { + error: { + code: 500, + message: "Internal Server Error", + }, +}; +``` + diff --git a/docs/models/errors/notfound.mdx b/docs/models/errors/notfound.mdx new file mode 100644 index 000000000..f994baa23 --- /dev/null +++ b/docs/models/errors/notfound.mdx @@ -0,0 +1,53 @@ +--- +title: "NotFound" +--- + +The model, provider, or validation workspace was not found. When `activate` was passed and the draft was created, `data` carries it and any validation checks. + + +## Supported Types + +### `errors.CreatePrivateEndpointValidationFailedResponseError` + +```typescript +const value: errors.CreatePrivateEndpointValidationFailedResponseError = { + data: { + endpoint: { + createdAt: "2026-09-24T10:30:00Z", + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + modelName: "OpenAI: GPT-4o", + modelPermaslug: "openai/gpt-4o-2024-08-06", + modelSlug: "openai/gpt-4o", + providerName: "Azure", + status: "active", + declaredRegion: "us", + declaredZdr: true, + }, + validation: { + checks: [ + { + name: "auth_ok", + passed: true, + }, + ], + passed: true, + }, + }, + error: { + code: 734895, + message: "", + }, +}; +``` + +### `errors.NotFoundResponseError` + +```typescript +const value: errors.NotFoundResponseError = { + error: { + code: 404, + message: "Resource not found", + }, +}; +``` + diff --git a/docs/models/errors/unprocessableentity.mdx b/docs/models/errors/unprocessableentity.mdx new file mode 100644 index 000000000..c1f81d5e0 --- /dev/null +++ b/docs/models/errors/unprocessableentity.mdx @@ -0,0 +1,53 @@ +--- +title: "UnprocessableEntity" +--- + +The request was invalid, or validation failed. When `activate` was passed and the draft was created, `data` carries it and any validation checks. + + +## Supported Types + +### `errors.CreatePrivateEndpointValidationFailedResponseError` + +```typescript +const value: errors.CreatePrivateEndpointValidationFailedResponseError = { + data: { + endpoint: { + createdAt: "2026-09-24T10:30:00Z", + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + modelName: "OpenAI: GPT-4o", + modelPermaslug: "openai/gpt-4o-2024-08-06", + modelSlug: "openai/gpt-4o", + providerName: "Azure", + status: "active", + declaredRegion: "us", + declaredZdr: true, + }, + validation: { + checks: [ + { + name: "auth_ok", + passed: true, + }, + ], + passed: true, + }, + }, + error: { + code: 734895, + message: "", + }, +}; +``` + +### `errors.UnprocessableEntityResponseError` + +```typescript +const value: errors.UnprocessableEntityResponseError = { + error: { + code: 422, + message: "Invalid argument", + }, +}; +``` + diff --git a/docs/models/listprivateendpointsresponse.mdx b/docs/models/listprivateendpointsresponse.mdx new file mode 100644 index 000000000..107f75d6d --- /dev/null +++ b/docs/models/listprivateendpointsresponse.mdx @@ -0,0 +1,19 @@ +--- +title: "ListPrivateEndpointsResponse" +--- + +## Example Usage + +```typescript +import { ListPrivateEndpointsResponse } from "@openrouter/sdk/models"; + +let value: ListPrivateEndpointsResponse = { + data: [], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `data` | [models.PrivateEndpointSummary](../models/privateendpointsummary.mdx)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/managedprivateendpoint.mdx b/docs/models/managedprivateendpoint.mdx new file mode 100644 index 000000000..ab79730a4 --- /dev/null +++ b/docs/models/managedprivateendpoint.mdx @@ -0,0 +1,35 @@ +--- +title: "ManagedPrivateEndpoint" +--- + +## Example Usage + +```typescript +import { ManagedPrivateEndpoint } from "@openrouter/sdk/models"; + +let value: ManagedPrivateEndpoint = { + createdAt: "2026-09-24T10:30:00Z", + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + modelName: "OpenAI: GPT-4o", + modelPermaslug: "openai/gpt-4o-2024-08-06", + modelSlug: "openai/gpt-4o", + providerName: "Azure", + status: "active", + declaredRegion: "us", + declaredZdr: true, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| `createdAt` | *string* | :heavy_check_mark: | ISO timestamp of when the endpoint was created. | 2026-09-24T10:30:00Z | +| `id` | *string* | :heavy_check_mark: | Stable identifier of the private endpoint. | 5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11 | +| `modelName` | *string* | :heavy_check_mark: | Display name of the model, or `null` when the model is no longer listed. | OpenAI: GPT-4o | +| `modelPermaslug` | *string* | :heavy_check_mark: | Permanent slug of the model this endpoint serves. | openai/gpt-4o-2024-08-06 | +| `modelSlug` | *string* | :heavy_check_mark: | Public model slug, or `null` when the model is no longer listed. | openai/gpt-4o | +| `providerName` | *string* | :heavy_check_mark: | Display name of the upstream provider. | Azure | +| `status` | [models.PrivateEndpointStatus](../models/privateendpointstatus.mdx) | :heavy_check_mark: | Lifecycle state. `draft` endpoints are not routable until validated and activated; `disabled` endpoints are activated but temporarily not routable. | active | +| `declaredRegion` | [models.PrivateEndpointDeclaredRegion](../models/privateendpointdeclaredregion.mdx) | :heavy_check_mark: | Where you attest this deployment processes data. `global` means not regional; `null` means undeclared. | us | +| `declaredZdr` | *boolean* | :heavy_check_mark: | Whether you attest this deployment retains no prompt or completion data. `null` means undeclared. | true | \ No newline at end of file diff --git a/docs/models/managedprivateendpointresponse.mdx b/docs/models/managedprivateendpointresponse.mdx new file mode 100644 index 000000000..f6db869a3 --- /dev/null +++ b/docs/models/managedprivateendpointresponse.mdx @@ -0,0 +1,29 @@ +--- +title: "ManagedPrivateEndpointResponse" +--- + +## Example Usage + +```typescript +import { ManagedPrivateEndpointResponse } from "@openrouter/sdk/models"; + +let value: ManagedPrivateEndpointResponse = { + data: { + createdAt: "2026-09-24T10:30:00Z", + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + modelName: "OpenAI: GPT-4o", + modelPermaslug: "openai/gpt-4o-2024-08-06", + modelSlug: "openai/gpt-4o", + providerName: "Azure", + status: "active", + declaredRegion: "us", + declaredZdr: true, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `data` | [models.ManagedPrivateEndpoint](../models/managedprivateendpoint.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/activateprivateendpointglobals.mdx b/docs/models/operations/activateprivateendpointglobals.mdx new file mode 100644 index 000000000..327237c10 --- /dev/null +++ b/docs/models/operations/activateprivateendpointglobals.mdx @@ -0,0 +1,19 @@ +--- +title: "ActivatePrivateEndpointGlobals" +--- + +## Example Usage + +```typescript +import { ActivatePrivateEndpointGlobals } from "@openrouter/sdk/models/operations"; + +let value: ActivatePrivateEndpointGlobals = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/activateprivateendpointrequest.mdx b/docs/models/operations/activateprivateendpointrequest.mdx new file mode 100644 index 000000000..e96edc41b --- /dev/null +++ b/docs/models/operations/activateprivateendpointrequest.mdx @@ -0,0 +1,22 @@ +--- +title: "ActivatePrivateEndpointRequest" +--- + +## Example Usage + +```typescript +import { ActivatePrivateEndpointRequest } from "@openrouter/sdk/models/operations"; + +let value: ActivatePrivateEndpointRequest = { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `id` | *string* | :heavy_check_mark: | Stable identifier of the private endpoint. | 5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11 | \ No newline at end of file diff --git a/docs/models/operations/createprivateendpointglobals.mdx b/docs/models/operations/createprivateendpointglobals.mdx new file mode 100644 index 000000000..3a032d87a --- /dev/null +++ b/docs/models/operations/createprivateendpointglobals.mdx @@ -0,0 +1,19 @@ +--- +title: "CreatePrivateEndpointGlobals" +--- + +## Example Usage + +```typescript +import { CreatePrivateEndpointGlobals } from "@openrouter/sdk/models/operations"; + +let value: CreatePrivateEndpointGlobals = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/createprivateendpointrequest.mdx b/docs/models/operations/createprivateendpointrequest.mdx new file mode 100644 index 000000000..d2e556237 --- /dev/null +++ b/docs/models/operations/createprivateendpointrequest.mdx @@ -0,0 +1,27 @@ +--- +title: "CreatePrivateEndpointRequest" +--- + +## Example Usage + +```typescript +import { CreatePrivateEndpointRequest } from "@openrouter/sdk/models/operations"; + +let value: CreatePrivateEndpointRequest = { + createPrivateEndpointRequest: { + modelPermaslug: "openai/gpt-4o-2024-08-06", + providerSlug: "azure", + upstreamModelId: "gpt-4o-prod", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `idempotencyKey` | *string* | :heavy_minus_sign: | Retry-safe create: a repeated create with the same key from the same organization returns the endpoint the first request created instead of creating another. The endpoint is returned as it is now. Reusing a key with a different request body (model, provider, base URL, upstream model ID, declared ZDR or region, or pricing) is rejected with 422 `idempotency_key_reused`. `activate` is not compared, and later edits to the endpoint do not affect the comparison. | wayfair-gpt-4o-eastus-2026-09 | +| `createPrivateEndpointRequest` | [models.CreatePrivateEndpointRequest](../../models/createprivateendpointrequest.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/deleteprivateendpointglobals.mdx b/docs/models/operations/deleteprivateendpointglobals.mdx new file mode 100644 index 000000000..d098bee93 --- /dev/null +++ b/docs/models/operations/deleteprivateendpointglobals.mdx @@ -0,0 +1,19 @@ +--- +title: "DeletePrivateEndpointGlobals" +--- + +## Example Usage + +```typescript +import { DeletePrivateEndpointGlobals } from "@openrouter/sdk/models/operations"; + +let value: DeletePrivateEndpointGlobals = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/deleteprivateendpointrequest.mdx b/docs/models/operations/deleteprivateendpointrequest.mdx new file mode 100644 index 000000000..984b8f16e --- /dev/null +++ b/docs/models/operations/deleteprivateendpointrequest.mdx @@ -0,0 +1,23 @@ +--- +title: "DeletePrivateEndpointRequest" +--- + +## Example Usage + +```typescript +import { DeletePrivateEndpointRequest } from "@openrouter/sdk/models/operations"; + +let value: DeletePrivateEndpointRequest = { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `id` | *string* | :heavy_check_mark: | Stable identifier of the private endpoint. | 5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11 | +| `draftOnly` | [operations.DraftOnly](../../models/operations/draftonly.mdx) | :heavy_minus_sign: | When `true`, only delete the endpoint if it is still a draft (409 otherwise). | | \ No newline at end of file diff --git a/docs/models/operations/disableprivateendpointglobals.mdx b/docs/models/operations/disableprivateendpointglobals.mdx new file mode 100644 index 000000000..bf2a851a0 --- /dev/null +++ b/docs/models/operations/disableprivateendpointglobals.mdx @@ -0,0 +1,19 @@ +--- +title: "DisablePrivateEndpointGlobals" +--- + +## Example Usage + +```typescript +import { DisablePrivateEndpointGlobals } from "@openrouter/sdk/models/operations"; + +let value: DisablePrivateEndpointGlobals = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/disableprivateendpointrequest.mdx b/docs/models/operations/disableprivateendpointrequest.mdx new file mode 100644 index 000000000..5dedf94b4 --- /dev/null +++ b/docs/models/operations/disableprivateendpointrequest.mdx @@ -0,0 +1,22 @@ +--- +title: "DisablePrivateEndpointRequest" +--- + +## Example Usage + +```typescript +import { DisablePrivateEndpointRequest } from "@openrouter/sdk/models/operations"; + +let value: DisablePrivateEndpointRequest = { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `id` | *string* | :heavy_check_mark: | Stable identifier of the private endpoint. | 5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11 | \ No newline at end of file diff --git a/docs/models/operations/draftonly.mdx b/docs/models/operations/draftonly.mdx new file mode 100644 index 000000000..4c6769449 --- /dev/null +++ b/docs/models/operations/draftonly.mdx @@ -0,0 +1,21 @@ +--- +title: "DraftOnly" +--- + +When `true`, only delete the endpoint if it is still a draft (409 otherwise). + +## Example Usage + +```typescript +import { DraftOnly } from "@openrouter/sdk/models/operations"; + +let value: DraftOnly = "true"; + +// Open enum: unrecognized values are captured as Unrecognized +``` + +## Values + +```typescript +"true" | "false" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/operations/enableprivateendpointglobals.mdx b/docs/models/operations/enableprivateendpointglobals.mdx new file mode 100644 index 000000000..5109c77b0 --- /dev/null +++ b/docs/models/operations/enableprivateendpointglobals.mdx @@ -0,0 +1,19 @@ +--- +title: "EnablePrivateEndpointGlobals" +--- + +## Example Usage + +```typescript +import { EnablePrivateEndpointGlobals } from "@openrouter/sdk/models/operations"; + +let value: EnablePrivateEndpointGlobals = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/enableprivateendpointrequest.mdx b/docs/models/operations/enableprivateendpointrequest.mdx new file mode 100644 index 000000000..18e867840 --- /dev/null +++ b/docs/models/operations/enableprivateendpointrequest.mdx @@ -0,0 +1,22 @@ +--- +title: "EnablePrivateEndpointRequest" +--- + +## Example Usage + +```typescript +import { EnablePrivateEndpointRequest } from "@openrouter/sdk/models/operations"; + +let value: EnablePrivateEndpointRequest = { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `id` | *string* | :heavy_check_mark: | Stable identifier of the private endpoint. | 5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11 | \ No newline at end of file diff --git a/docs/models/operations/getprivateendpointglobals.mdx b/docs/models/operations/getprivateendpointglobals.mdx new file mode 100644 index 000000000..9aff82686 --- /dev/null +++ b/docs/models/operations/getprivateendpointglobals.mdx @@ -0,0 +1,19 @@ +--- +title: "GetPrivateEndpointGlobals" +--- + +## Example Usage + +```typescript +import { GetPrivateEndpointGlobals } from "@openrouter/sdk/models/operations"; + +let value: GetPrivateEndpointGlobals = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/getprivateendpointrequest.mdx b/docs/models/operations/getprivateendpointrequest.mdx new file mode 100644 index 000000000..4a9fee9c7 --- /dev/null +++ b/docs/models/operations/getprivateendpointrequest.mdx @@ -0,0 +1,22 @@ +--- +title: "GetPrivateEndpointRequest" +--- + +## Example Usage + +```typescript +import { GetPrivateEndpointRequest } from "@openrouter/sdk/models/operations"; + +let value: GetPrivateEndpointRequest = { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `id` | *string* | :heavy_check_mark: | Stable identifier of the private endpoint. | 5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11 | \ No newline at end of file diff --git a/docs/models/operations/listprivateendpointsglobals.mdx b/docs/models/operations/listprivateendpointsglobals.mdx new file mode 100644 index 000000000..c38091d47 --- /dev/null +++ b/docs/models/operations/listprivateendpointsglobals.mdx @@ -0,0 +1,19 @@ +--- +title: "ListPrivateEndpointsGlobals" +--- + +## Example Usage + +```typescript +import { ListPrivateEndpointsGlobals } from "@openrouter/sdk/models/operations"; + +let value: ListPrivateEndpointsGlobals = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/listprivateendpointsrequest.mdx b/docs/models/operations/listprivateendpointsrequest.mdx new file mode 100644 index 000000000..f6386ba86 --- /dev/null +++ b/docs/models/operations/listprivateendpointsrequest.mdx @@ -0,0 +1,19 @@ +--- +title: "ListPrivateEndpointsRequest" +--- + +## Example Usage + +```typescript +import { ListPrivateEndpointsRequest } from "@openrouter/sdk/models/operations"; + +let value: ListPrivateEndpointsRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/updateprivateendpointglobals.mdx b/docs/models/operations/updateprivateendpointglobals.mdx new file mode 100644 index 000000000..94830e0d8 --- /dev/null +++ b/docs/models/operations/updateprivateendpointglobals.mdx @@ -0,0 +1,19 @@ +--- +title: "UpdatePrivateEndpointGlobals" +--- + +## Example Usage + +```typescript +import { UpdatePrivateEndpointGlobals } from "@openrouter/sdk/models/operations"; + +let value: UpdatePrivateEndpointGlobals = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/updateprivateendpointpricingglobals.mdx b/docs/models/operations/updateprivateendpointpricingglobals.mdx new file mode 100644 index 000000000..acdb1211b --- /dev/null +++ b/docs/models/operations/updateprivateendpointpricingglobals.mdx @@ -0,0 +1,19 @@ +--- +title: "UpdatePrivateEndpointPricingGlobals" +--- + +## Example Usage + +```typescript +import { UpdatePrivateEndpointPricingGlobals } from "@openrouter/sdk/models/operations"; + +let value: UpdatePrivateEndpointPricingGlobals = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/updateprivateendpointpricingrequest.mdx b/docs/models/operations/updateprivateendpointpricingrequest.mdx new file mode 100644 index 000000000..c478f8574 --- /dev/null +++ b/docs/models/operations/updateprivateendpointpricingrequest.mdx @@ -0,0 +1,29 @@ +--- +title: "UpdatePrivateEndpointPricingRequest" +--- + +## Example Usage + +```typescript +import { UpdatePrivateEndpointPricingRequest } from "@openrouter/sdk/models/operations"; + +let value: UpdatePrivateEndpointPricingRequest = { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + updatePrivateEndpointPricingRequest: { + pricing: { + completion: "0.00001", + prompt: "0.0000025", + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `id` | *string* | :heavy_check_mark: | Stable identifier of the private endpoint. | 5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11 | +| `updatePrivateEndpointPricingRequest` | [models.UpdatePrivateEndpointPricingRequest](../../models/updateprivateendpointpricingrequest.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/updateprivateendpointrequest.mdx b/docs/models/operations/updateprivateendpointrequest.mdx new file mode 100644 index 000000000..bfaf53ce6 --- /dev/null +++ b/docs/models/operations/updateprivateendpointrequest.mdx @@ -0,0 +1,26 @@ +--- +title: "UpdatePrivateEndpointRequest" +--- + +## Example Usage + +```typescript +import { UpdatePrivateEndpointRequest } from "@openrouter/sdk/models/operations"; + +let value: UpdatePrivateEndpointRequest = { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + updatePrivateEndpointRequest: { + upstreamModelId: "gpt-4o-prod", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `id` | *string* | :heavy_check_mark: | Stable identifier of the private endpoint. | 5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11 | +| `updatePrivateEndpointRequest` | [models.UpdatePrivateEndpointRequest](../../models/updateprivateendpointrequest.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/validateprivateendpointglobals.mdx b/docs/models/operations/validateprivateendpointglobals.mdx new file mode 100644 index 000000000..0c0a95fd7 --- /dev/null +++ b/docs/models/operations/validateprivateendpointglobals.mdx @@ -0,0 +1,19 @@ +--- +title: "ValidatePrivateEndpointGlobals" +--- + +## Example Usage + +```typescript +import { ValidatePrivateEndpointGlobals } from "@openrouter/sdk/models/operations"; + +let value: ValidatePrivateEndpointGlobals = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| \ No newline at end of file diff --git a/docs/models/operations/validateprivateendpointrequest.mdx b/docs/models/operations/validateprivateendpointrequest.mdx new file mode 100644 index 000000000..eed9e1298 --- /dev/null +++ b/docs/models/operations/validateprivateendpointrequest.mdx @@ -0,0 +1,26 @@ +--- +title: "ValidatePrivateEndpointRequest" +--- + +## Example Usage + +```typescript +import { ValidatePrivateEndpointRequest } from "@openrouter/sdk/models/operations"; + +let value: ValidatePrivateEndpointRequest = { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + validatePrivateEndpointRequest: { + workspaceId: "550e8400-e29b-41d4-a716-446655440000", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `httpReferer` | *string* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.
This is used to track API usage per application.
| | +| `appTitle` | *string* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.
| | +| `appCategories` | *string* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
| | +| `id` | *string* | :heavy_check_mark: | Stable identifier of the private endpoint. | 5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11 | +| `validatePrivateEndpointRequest` | [models.ValidatePrivateEndpointRequest](../../models/validateprivateendpointrequest.mdx) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/privateendpoint.mdx b/docs/models/privateendpoint.mdx new file mode 100644 index 000000000..8c4bebf67 --- /dev/null +++ b/docs/models/privateendpoint.mdx @@ -0,0 +1,44 @@ +--- +title: "PrivateEndpoint" +--- + +## Example Usage + +```typescript +import { PrivateEndpoint } from "@openrouter/sdk/models"; + +let value: PrivateEndpoint = { + baseUrl: "https://contoso.openai.azure.com", + declaredRegion: "us", + declaredZdr: true, + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + modelName: "OpenAI: GPT-4o", + modelPermaslug: "openai/gpt-4o-2024-08-06", + modelSlug: "openai/gpt-4o", + pricing: { + completion: "0.00001", + prompt: "0.0000025", + }, + providerName: "Azure", + providerSlug: "azure", + status: "active", + upstreamModelId: "gpt-4o-prod", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| `baseUrl` | *string* | :heavy_check_mark: | HTTPS base URL of your deployment, or `null` for providers whose URL is derived from the BYOK credential (Azure, Amazon Bedrock, Google Vertex). | https://contoso.openai.azure.com | +| `declaredRegion` | [models.PrivateEndpointDeclaredRegion](../models/privateendpointdeclaredregion.mdx) | :heavy_check_mark: | Where you attest this deployment processes data. `global` means not regional; `null` means undeclared. | us | +| `declaredZdr` | *boolean* | :heavy_check_mark: | Whether you attest this deployment retains no prompt or completion data. `null` means undeclared. | true | +| `id` | *string* | :heavy_check_mark: | Stable identifier of the private endpoint. | 5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11 | +| `modelName` | *string* | :heavy_check_mark: | Display name of the model, or `null` when the model is no longer listed. | OpenAI: GPT-4o | +| `modelPermaslug` | *string* | :heavy_check_mark: | Permanent slug of the model this endpoint serves. | openai/gpt-4o-2024-08-06 | +| `modelSlug` | *string* | :heavy_check_mark: | Public model slug, or `null` when the model is no longer listed. | openai/gpt-4o | +| `pricing` | [models.PrivateEndpointPricing](../models/privateendpointpricing.mdx) | :heavy_check_mark: | Negotiated per-token rates reported for requests routed to this endpoint. | \{
"completion": "0.00001",
"prompt": "0.0000025"
} | +| `providerName` | *string* | :heavy_check_mark: | Display name of the upstream provider. | Azure | +| `providerSlug` | *string* | :heavy_check_mark: | Slug of the upstream provider, or `null` when the provider is no longer listed. | azure | +| `status` | [models.PrivateEndpointStatus](../models/privateendpointstatus.mdx) | :heavy_check_mark: | Lifecycle state. `draft` endpoints are not routable until validated and activated; `disabled` endpoints are activated but temporarily not routable. | active | +| `upstreamModelId` | *string* | :heavy_check_mark: | Model or deployment identifier sent to the upstream provider. | gpt-4o-prod | \ No newline at end of file diff --git a/docs/models/privateendpointactivation.mdx b/docs/models/privateendpointactivation.mdx new file mode 100644 index 000000000..825fd3da2 --- /dev/null +++ b/docs/models/privateendpointactivation.mdx @@ -0,0 +1,21 @@ +--- +title: "PrivateEndpointActivation" +--- + +Validate and activate in the same call. On a failed validation the draft is kept and returned with a 422, so fix it and call `/validate` and `/activate` instead of creating it again. + +## Example Usage + +```typescript +import { PrivateEndpointActivation } from "@openrouter/sdk/models"; + +let value: PrivateEndpointActivation = { + workspaceId: "550e8400-e29b-41d4-a716-446655440000", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `workspaceId` | *string* | :heavy_check_mark: | Workspace whose BYOK credential is used for the live validation call. The workspace must belong to your account. | 550e8400-e29b-41d4-a716-446655440000 | \ No newline at end of file diff --git a/docs/models/privateendpointcheck.mdx b/docs/models/privateendpointcheck.mdx new file mode 100644 index 000000000..c30272a74 --- /dev/null +++ b/docs/models/privateendpointcheck.mdx @@ -0,0 +1,25 @@ +--- +title: "PrivateEndpointCheck" +--- + +## Example Usage + +```typescript +import { PrivateEndpointCheck } from "@openrouter/sdk/models"; + +let value: PrivateEndpointCheck = { + name: "auth_ok", + passed: true, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `actualModel` | *string* | :heavy_minus_sign: | Model the upstream reported serving, when it differs from the request. | | +| `name` | *string* | :heavy_check_mark: | Check name. | auth_ok | +| `passed` | *boolean* | :heavy_check_mark: | N/A | | +| `reason` | [models.PrivateEndpointCheckReason](../models/privateendpointcheckreason.mdx) | :heavy_minus_sign: | Why the check failed. | no_byok_key | +| `upstreamMessage` | *string* | :heavy_minus_sign: | Error message returned by your deployment when the call failed. | | +| `upstreamStatus` | *number* | :heavy_minus_sign: | HTTP status returned by your deployment when the call failed. | | \ No newline at end of file diff --git a/docs/models/privateendpointcheckreason.mdx b/docs/models/privateendpointcheckreason.mdx new file mode 100644 index 000000000..a358e2ec0 --- /dev/null +++ b/docs/models/privateendpointcheckreason.mdx @@ -0,0 +1,21 @@ +--- +title: "PrivateEndpointCheckReason" +--- + +Why the check failed. + +## Example Usage + +```typescript +import { PrivateEndpointCheckReason } from "@openrouter/sdk/models"; + +let value: PrivateEndpointCheckReason = "no_byok_key"; + +// Open enum: unrecognized values are captured as Unrecognized +``` + +## Values + +```typescript +"database_error" | "endpoint_limit_reached" | "invalid_base_url" | "model_not_found" | "provider_not_found" | "endpoint_not_found" | "workspace_not_found" | "no_byok_key" | "key_decryption_failed" | "upstream_error" | "invalid_response" | "invalid_stream" | "missing_usage" | "model_mismatch" | "not_validated" | "validation_stale" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/privateendpointdeclaredregion.mdx b/docs/models/privateendpointdeclaredregion.mdx new file mode 100644 index 000000000..454128f02 --- /dev/null +++ b/docs/models/privateendpointdeclaredregion.mdx @@ -0,0 +1,21 @@ +--- +title: "PrivateEndpointDeclaredRegion" +--- + +Where you attest this deployment processes data. `global` means not regional; `null` means undeclared. + +## Example Usage + +```typescript +import { PrivateEndpointDeclaredRegion } from "@openrouter/sdk/models"; + +let value: PrivateEndpointDeclaredRegion = "us"; + +// Open enum: unrecognized values are captured as Unrecognized +``` + +## Values + +```typescript +"global" | "europe" | "us" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/privateendpointpricing.mdx b/docs/models/privateendpointpricing.mdx new file mode 100644 index 000000000..bda4aab1b --- /dev/null +++ b/docs/models/privateendpointpricing.mdx @@ -0,0 +1,23 @@ +--- +title: "PrivateEndpointPricing" +--- + +Negotiated per-token rates reported for requests routed to this endpoint. + +## Example Usage + +```typescript +import { PrivateEndpointPricing } from "@openrouter/sdk/models"; + +let value: PrivateEndpointPricing = { + completion: "0.00001", + prompt: "0.0000025", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `completion` | *string* | :heavy_check_mark: | USD per completion token, as a decimal string. | 0.00001 | +| `prompt` | *string* | :heavy_check_mark: | USD per prompt token, as a decimal string. | 0.0000025 | \ No newline at end of file diff --git a/docs/models/privateendpointresponse.mdx b/docs/models/privateendpointresponse.mdx new file mode 100644 index 000000000..5dfda23d9 --- /dev/null +++ b/docs/models/privateendpointresponse.mdx @@ -0,0 +1,35 @@ +--- +title: "PrivateEndpointResponse" +--- + +## Example Usage + +```typescript +import { PrivateEndpointResponse } from "@openrouter/sdk/models"; + +let value: PrivateEndpointResponse = { + data: { + baseUrl: "https://contoso.openai.azure.com", + declaredRegion: "us", + declaredZdr: true, + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + modelName: "OpenAI: GPT-4o", + modelPermaslug: "openai/gpt-4o-2024-08-06", + modelSlug: "openai/gpt-4o", + pricing: { + completion: "0.00001", + prompt: "0.0000025", + }, + providerName: "Azure", + providerSlug: "azure", + status: "active", + upstreamModelId: "gpt-4o-prod", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [models.PrivateEndpoint](../models/privateendpoint.mdx) | :heavy_check_mark: | N/A | \{
"base_url": "https://contoso.openai.azure.com",
"declared_region": "us",
"declared_zdr": true,
"id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11",
"model_name": "OpenAI: GPT-4o",
"model_permaslug": "openai/gpt-4o-2024-08-06",
"model_slug": "openai/gpt-4o",
"pricing": \{
"completion": "0.00001",
"prompt": "0.0000025"
},
"provider_name": "Azure",
"provider_slug": "azure",
"status": "active",
"upstream_model_id": "gpt-4o-prod"
} | \ No newline at end of file diff --git a/docs/models/privateendpointstatus.mdx b/docs/models/privateendpointstatus.mdx new file mode 100644 index 000000000..c3d5a0f71 --- /dev/null +++ b/docs/models/privateendpointstatus.mdx @@ -0,0 +1,21 @@ +--- +title: "PrivateEndpointStatus" +--- + +Lifecycle state. `draft` endpoints are not routable until validated and activated; `disabled` endpoints are activated but temporarily not routable. + +## Example Usage + +```typescript +import { PrivateEndpointStatus } from "@openrouter/sdk/models"; + +let value: PrivateEndpointStatus = "active"; + +// Open enum: unrecognized values are captured as Unrecognized +``` + +## Values + +```typescript +"draft" | "active" | "disabled" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/privateendpointsummary.mdx b/docs/models/privateendpointsummary.mdx new file mode 100644 index 000000000..4159642b9 --- /dev/null +++ b/docs/models/privateendpointsummary.mdx @@ -0,0 +1,31 @@ +--- +title: "PrivateEndpointSummary" +--- + +## Example Usage + +```typescript +import { PrivateEndpointSummary } from "@openrouter/sdk/models"; + +let value: PrivateEndpointSummary = { + createdAt: "2026-09-24T10:30:00Z", + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + modelName: "OpenAI: GPT-4o", + modelPermaslug: "openai/gpt-4o-2024-08-06", + modelSlug: "openai/gpt-4o", + providerName: "Azure", + status: "active", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| `createdAt` | *string* | :heavy_check_mark: | ISO timestamp of when the endpoint was created. | 2026-09-24T10:30:00Z | +| `id` | *string* | :heavy_check_mark: | Stable identifier of the private endpoint. | 5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11 | +| `modelName` | *string* | :heavy_check_mark: | Display name of the model, or `null` when the model is no longer listed. | OpenAI: GPT-4o | +| `modelPermaslug` | *string* | :heavy_check_mark: | Permanent slug of the model this endpoint serves. | openai/gpt-4o-2024-08-06 | +| `modelSlug` | *string* | :heavy_check_mark: | Public model slug, or `null` when the model is no longer listed. | openai/gpt-4o | +| `providerName` | *string* | :heavy_check_mark: | Display name of the upstream provider. | Azure | +| `status` | [models.PrivateEndpointStatus](../models/privateendpointstatus.mdx) | :heavy_check_mark: | Lifecycle state. `draft` endpoints are not routable until validated and activated; `disabled` endpoints are activated but temporarily not routable. | active | \ No newline at end of file diff --git a/docs/models/privateendpointvalidation.mdx b/docs/models/privateendpointvalidation.mdx new file mode 100644 index 000000000..3b9511b0b --- /dev/null +++ b/docs/models/privateendpointvalidation.mdx @@ -0,0 +1,26 @@ +--- +title: "PrivateEndpointValidation" +--- + +## Example Usage + +```typescript +import { PrivateEndpointValidation } from "@openrouter/sdk/models"; + +let value: PrivateEndpointValidation = { + checks: [ + { + name: "auth_ok", + passed: true, + }, + ], + passed: true, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `checks` | [models.PrivateEndpointCheck](../models/privateendpointcheck.mdx)[] | :heavy_check_mark: | N/A | | +| `passed` | *boolean* | :heavy_check_mark: | Whether every check passed. | true | \ No newline at end of file diff --git a/docs/models/privateendpointvalidationnullable.mdx b/docs/models/privateendpointvalidationnullable.mdx new file mode 100644 index 000000000..adeea7abc --- /dev/null +++ b/docs/models/privateendpointvalidationnullable.mdx @@ -0,0 +1,26 @@ +--- +title: "PrivateEndpointValidationNullable" +--- + +## Example Usage + +```typescript +import { PrivateEndpointValidationNullable } from "@openrouter/sdk/models"; + +let value: PrivateEndpointValidationNullable = { + checks: [ + { + name: "auth_ok", + passed: true, + }, + ], + passed: true, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `checks` | [models.PrivateEndpointCheck](../models/privateendpointcheck.mdx)[] | :heavy_check_mark: | N/A | | +| `passed` | *boolean* | :heavy_check_mark: | Whether every check passed. | true | \ No newline at end of file diff --git a/docs/models/privateendpointvalidationresponse.mdx b/docs/models/privateendpointvalidationresponse.mdx new file mode 100644 index 000000000..6ade23890 --- /dev/null +++ b/docs/models/privateendpointvalidationresponse.mdx @@ -0,0 +1,27 @@ +--- +title: "PrivateEndpointValidationResponse" +--- + +## Example Usage + +```typescript +import { PrivateEndpointValidationResponse } from "@openrouter/sdk/models"; + +let value: PrivateEndpointValidationResponse = { + data: { + checks: [ + { + name: "auth_ok", + passed: true, + }, + ], + passed: true, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `data` | [models.PrivateEndpointValidation](../models/privateendpointvalidation.mdx) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updateprivateendpointpricingrequest.mdx b/docs/models/updateprivateendpointpricingrequest.mdx new file mode 100644 index 000000000..e69b06305 --- /dev/null +++ b/docs/models/updateprivateendpointpricingrequest.mdx @@ -0,0 +1,22 @@ +--- +title: "UpdatePrivateEndpointPricingRequest" +--- + +## Example Usage + +```typescript +import { UpdatePrivateEndpointPricingRequest } from "@openrouter/sdk/models"; + +let value: UpdatePrivateEndpointPricingRequest = { + pricing: { + completion: "0.00001", + prompt: "0.0000025", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `pricing` | [models.PrivateEndpointPricing](../models/privateendpointpricing.mdx) | :heavy_check_mark: | Negotiated per-token rates reported for requests routed to this endpoint. | \{
"completion": "0.00001",
"prompt": "0.0000025"
} | \ No newline at end of file diff --git a/docs/models/updateprivateendpointrequest.mdx b/docs/models/updateprivateendpointrequest.mdx new file mode 100644 index 000000000..81d0896f7 --- /dev/null +++ b/docs/models/updateprivateendpointrequest.mdx @@ -0,0 +1,22 @@ +--- +title: "UpdatePrivateEndpointRequest" +--- + +## Example Usage + +```typescript +import { UpdatePrivateEndpointRequest } from "@openrouter/sdk/models"; + +let value: UpdatePrivateEndpointRequest = { + upstreamModelId: "gpt-4o-prod", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `baseUrl` | *string* | :heavy_minus_sign: | HTTPS base URL of your deployment. Required unless the provider derives its URL from the BYOK credential (Azure, Amazon Bedrock, Google Vertex). | https://contoso.openai.azure.com | +| `declaredRegion` | [models.UpdatePrivateEndpointRequestDeclaredRegion](../models/updateprivateendpointrequestdeclaredregion.mdx) | :heavy_minus_sign: | Attest where this deployment processes data. | us | +| `declaredZdr` | *boolean* | :heavy_minus_sign: | Attest that this deployment retains no prompt or completion data. | | +| `upstreamModelId` | *string* | :heavy_check_mark: | Model or deployment identifier sent to the upstream provider. | gpt-4o-prod | \ No newline at end of file diff --git a/docs/models/updateprivateendpointrequestdeclaredregion.mdx b/docs/models/updateprivateendpointrequestdeclaredregion.mdx new file mode 100644 index 000000000..93dbd8ff4 --- /dev/null +++ b/docs/models/updateprivateendpointrequestdeclaredregion.mdx @@ -0,0 +1,21 @@ +--- +title: "UpdatePrivateEndpointRequestDeclaredRegion" +--- + +Attest where this deployment processes data. + +## Example Usage + +```typescript +import { UpdatePrivateEndpointRequestDeclaredRegion } from "@openrouter/sdk/models"; + +let value: UpdatePrivateEndpointRequestDeclaredRegion = "us"; + +// Open enum: unrecognized values are captured as Unrecognized +``` + +## Values + +```typescript +"global" | "europe" | "us" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/validateprivateendpointrequest.mdx b/docs/models/validateprivateendpointrequest.mdx new file mode 100644 index 000000000..a452a13a3 --- /dev/null +++ b/docs/models/validateprivateendpointrequest.mdx @@ -0,0 +1,19 @@ +--- +title: "ValidatePrivateEndpointRequest" +--- + +## Example Usage + +```typescript +import { ValidatePrivateEndpointRequest } from "@openrouter/sdk/models"; + +let value: ValidatePrivateEndpointRequest = { + workspaceId: "550e8400-e29b-41d4-a716-446655440000", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `workspaceId` | *string* | :heavy_check_mark: | Workspace whose BYOK credential is used for the live validation call. The workspace must belong to your account. | 550e8400-e29b-41d4-a716-446655440000 | \ No newline at end of file diff --git a/docs/sdks/privateendpoints/README.mdx b/docs/sdks/privateendpoints/README.mdx new file mode 100644 index 000000000..5c99c685a --- /dev/null +++ b/docs/sdks/privateendpoints/README.mdx @@ -0,0 +1,915 @@ +--- +title: "PrivateEndpoints" +description: "Private Endpoints endpoints" +--- + +## Overview + +Private Endpoints endpoints + +### Available Operations + +* [list](#list) - List private endpoints +* [create](#create) - Create a private endpoint +* [delete](#delete) - Delete a private endpoint +* [get](#get) - Get a private endpoint +* [update](#update) - Update a draft private endpoint +* [activate](#activate) - Activate a validated private endpoint +* [disable](#disable) - Disable a private endpoint +* [enable](#enable) - Enable a private endpoint +* [updatePricing](#updatepricing) - Set private endpoint pricing +* [validate](#validate) - Validate a draft private endpoint + +## list + +List the organization's private endpoints, including drafts. Requires the private endpoints entitlement. [Management key](/docs/guides/overview/auth/management-api-keys) required. + +### Example Usage + +```typescript +import { OpenRouter } from "@openrouter/sdk"; + +const openRouter = new OpenRouter({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const result = await openRouter.privateEndpoints.list(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpenRouterCore } from "@openrouter/sdk/core.js"; +import { privateEndpointsList } from "@openrouter/sdk/funcs/privateEndpointsList.js"; + +// Use `OpenRouterCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const openRouter = new OpenRouterCore({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const res = await privateEndpointsList(openRouter); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("privateEndpointsList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListPrivateEndpointsRequest](../../models/operations/listprivateendpointsrequest.mdx) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.mdx) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ListPrivateEndpointsResponse](../../models/listprivateendpointsresponse.mdx)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | +| errors.RequestTimeoutResponseError | 408 | application/json | +| errors.InternalServerResponseError | 500 | application/json | +| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | + +## create + +Create a private endpoint as a draft. Drafts are not routable: validate one with `POST /private-endpoints/{id}/validate`, then activate it with `POST /private-endpoints/{id}/activate`. Pass `activate` to do all three in one call; if validation fails the draft is kept and returned with the failed checks. Send an `Idempotency-Key` header to make retries safe: a repeated key with the same request returns the endpoint the first request created; reusing it with different fields returns 422 `idempotency_key_reused`. [Management key](/docs/guides/overview/auth/management-api-keys) required. + +### Example Usage + +```typescript +import { OpenRouter } from "@openrouter/sdk"; + +const openRouter = new OpenRouter({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const result = await openRouter.privateEndpoints.create({ + createPrivateEndpointRequest: { + modelPermaslug: "openai/gpt-4o-2024-08-06", + providerSlug: "azure", + upstreamModelId: "gpt-4o-prod", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpenRouterCore } from "@openrouter/sdk/core.js"; +import { privateEndpointsCreate } from "@openrouter/sdk/funcs/privateEndpointsCreate.js"; + +// Use `OpenRouterCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const openRouter = new OpenRouterCore({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const res = await privateEndpointsCreate(openRouter, { + createPrivateEndpointRequest: { + modelPermaslug: "openai/gpt-4o-2024-08-06", + providerSlug: "azure", + upstreamModelId: "gpt-4o-prod", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("privateEndpointsCreate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreatePrivateEndpointRequest](../../models/operations/createprivateendpointrequest.mdx) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.mdx) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ManagedPrivateEndpointResponse](../../models/managedprivateendpointresponse.mdx)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| errors.BadRequestResponseError | 400 | application/json | +| errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | +| errors.CreatePrivateEndpointValidationFailedResponseError | 404 | application/json | +| errors.NotFoundResponseError | 404 | application/json | +| errors.RequestTimeoutResponseError | 408 | application/json | +| errors.CreatePrivateEndpointValidationFailedResponseError | 409 | application/json | +| errors.ConflictResponseError | 409 | application/json | +| errors.CreatePrivateEndpointValidationFailedResponseError | 422 | application/json | +| errors.UnprocessableEntityResponseError | 422 | application/json | +| errors.CreatePrivateEndpointValidationFailedResponseError | 500 | application/json | +| errors.InternalServerResponseError | 500 | application/json | +| errors.CreatePrivateEndpointValidationFailedResponseError | 502 | application/json | +| errors.BadGatewayResponseError | 502 | application/json | +| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | + +## delete + +Delete a private endpoint and stop routing to it. Pass `draft_only=true` to refuse (409) when the endpoint has been activated. [Management key](/docs/guides/overview/auth/management-api-keys) required. + +### Example Usage + +```typescript +import { OpenRouter } from "@openrouter/sdk"; + +const openRouter = new OpenRouter({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const result = await openRouter.privateEndpoints.delete({ + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpenRouterCore } from "@openrouter/sdk/core.js"; +import { privateEndpointsDelete } from "@openrouter/sdk/funcs/privateEndpointsDelete.js"; + +// Use `OpenRouterCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const openRouter = new OpenRouterCore({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const res = await privateEndpointsDelete(openRouter, { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("privateEndpointsDelete failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeletePrivateEndpointRequest](../../models/operations/deleteprivateendpointrequest.mdx) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.mdx) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.DeletePrivateEndpointResponse](../../models/deleteprivateendpointresponse.mdx)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| errors.BadRequestResponseError | 400 | application/json | +| errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | +| errors.NotFoundResponseError | 404 | application/json | +| errors.RequestTimeoutResponseError | 408 | application/json | +| errors.ConflictResponseError | 409 | application/json | +| errors.UnprocessableEntityResponseError | 422 | application/json | +| errors.InternalServerResponseError | 500 | application/json | +| errors.BadGatewayResponseError | 502 | application/json | +| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | + +## get + +Get one private endpoint with its upstream configuration and current pricing. [Management key](/docs/guides/overview/auth/management-api-keys) required. + +### Example Usage + +```typescript +import { OpenRouter } from "@openrouter/sdk"; + +const openRouter = new OpenRouter({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const result = await openRouter.privateEndpoints.get({ + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpenRouterCore } from "@openrouter/sdk/core.js"; +import { privateEndpointsGet } from "@openrouter/sdk/funcs/privateEndpointsGet.js"; + +// Use `OpenRouterCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const openRouter = new OpenRouterCore({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const res = await privateEndpointsGet(openRouter, { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("privateEndpointsGet failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPrivateEndpointRequest](../../models/operations/getprivateendpointrequest.mdx) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.mdx) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.PrivateEndpointResponse](../../models/privateendpointresponse.mdx)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | +| errors.NotFoundResponseError | 404 | application/json | +| errors.RequestTimeoutResponseError | 408 | application/json | +| errors.InternalServerResponseError | 500 | application/json | +| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | + +## update + +Replace a draft endpoint's upstream configuration: send `upstream_model_id`, and `base_url` to change it (an omitted `base_url` keeps the stored one). Omitted data-policy declarations are kept while the upstream is unchanged and cleared when it changes. Any change clears earlier validation. Active endpoints return 409; delete and re-create them instead. [Management key](/docs/guides/overview/auth/management-api-keys) required. + +### Example Usage + +```typescript +import { OpenRouter } from "@openrouter/sdk"; + +const openRouter = new OpenRouter({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const result = await openRouter.privateEndpoints.update({ + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + updatePrivateEndpointRequest: { + upstreamModelId: "gpt-4o-prod", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpenRouterCore } from "@openrouter/sdk/core.js"; +import { privateEndpointsUpdate } from "@openrouter/sdk/funcs/privateEndpointsUpdate.js"; + +// Use `OpenRouterCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const openRouter = new OpenRouterCore({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const res = await privateEndpointsUpdate(openRouter, { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + updatePrivateEndpointRequest: { + upstreamModelId: "gpt-4o-prod", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("privateEndpointsUpdate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdatePrivateEndpointRequest](../../models/operations/updateprivateendpointrequest.mdx) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.mdx) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.PrivateEndpointResponse](../../models/privateendpointresponse.mdx)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| errors.BadRequestResponseError | 400 | application/json | +| errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | +| errors.NotFoundResponseError | 404 | application/json | +| errors.RequestTimeoutResponseError | 408 | application/json | +| errors.ConflictResponseError | 409 | application/json | +| errors.UnprocessableEntityResponseError | 422 | application/json | +| errors.InternalServerResponseError | 500 | application/json | +| errors.BadGatewayResponseError | 502 | application/json | +| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | + +## activate + +Make a validated draft routable. Returns 409 when the endpoint was never validated, the validation is stale, or it is already active. [Management key](/docs/guides/overview/auth/management-api-keys) required. + +### Example Usage + +```typescript +import { OpenRouter } from "@openrouter/sdk"; + +const openRouter = new OpenRouter({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const result = await openRouter.privateEndpoints.activate({ + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpenRouterCore } from "@openrouter/sdk/core.js"; +import { privateEndpointsActivate } from "@openrouter/sdk/funcs/privateEndpointsActivate.js"; + +// Use `OpenRouterCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const openRouter = new OpenRouterCore({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const res = await privateEndpointsActivate(openRouter, { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("privateEndpointsActivate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ActivatePrivateEndpointRequest](../../models/operations/activateprivateendpointrequest.mdx) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.mdx) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ManagedPrivateEndpointResponse](../../models/managedprivateendpointresponse.mdx)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| errors.BadRequestResponseError | 400 | application/json | +| errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | +| errors.NotFoundResponseError | 404 | application/json | +| errors.RequestTimeoutResponseError | 408 | application/json | +| errors.ConflictResponseError | 409 | application/json | +| errors.UnprocessableEntityResponseError | 422 | application/json | +| errors.InternalServerResponseError | 500 | application/json | +| errors.BadGatewayResponseError | 502 | application/json | +| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | + +## disable + +Stop routing to an active endpoint without deleting it. [Management key](/docs/guides/overview/auth/management-api-keys) required. + +### Example Usage + +```typescript +import { OpenRouter } from "@openrouter/sdk"; + +const openRouter = new OpenRouter({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const result = await openRouter.privateEndpoints.disable({ + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpenRouterCore } from "@openrouter/sdk/core.js"; +import { privateEndpointsDisable } from "@openrouter/sdk/funcs/privateEndpointsDisable.js"; + +// Use `OpenRouterCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const openRouter = new OpenRouterCore({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const res = await privateEndpointsDisable(openRouter, { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("privateEndpointsDisable failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DisablePrivateEndpointRequest](../../models/operations/disableprivateendpointrequest.mdx) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.mdx) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ManagedPrivateEndpointResponse](../../models/managedprivateendpointresponse.mdx)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| errors.BadRequestResponseError | 400 | application/json | +| errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | +| errors.NotFoundResponseError | 404 | application/json | +| errors.RequestTimeoutResponseError | 408 | application/json | +| errors.ConflictResponseError | 409 | application/json | +| errors.UnprocessableEntityResponseError | 422 | application/json | +| errors.InternalServerResponseError | 500 | application/json | +| errors.BadGatewayResponseError | 502 | application/json | +| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | + +## enable + +Resume routing to a disabled endpoint. [Management key](/docs/guides/overview/auth/management-api-keys) required. + +### Example Usage + +```typescript +import { OpenRouter } from "@openrouter/sdk"; + +const openRouter = new OpenRouter({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const result = await openRouter.privateEndpoints.enable({ + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpenRouterCore } from "@openrouter/sdk/core.js"; +import { privateEndpointsEnable } from "@openrouter/sdk/funcs/privateEndpointsEnable.js"; + +// Use `OpenRouterCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const openRouter = new OpenRouterCore({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const res = await privateEndpointsEnable(openRouter, { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("privateEndpointsEnable failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.EnablePrivateEndpointRequest](../../models/operations/enableprivateendpointrequest.mdx) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.mdx) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ManagedPrivateEndpointResponse](../../models/managedprivateendpointresponse.mdx)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| errors.BadRequestResponseError | 400 | application/json | +| errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | +| errors.NotFoundResponseError | 404 | application/json | +| errors.RequestTimeoutResponseError | 408 | application/json | +| errors.ConflictResponseError | 409 | application/json | +| errors.UnprocessableEntityResponseError | 422 | application/json | +| errors.InternalServerResponseError | 500 | application/json | +| errors.BadGatewayResponseError | 502 | application/json | +| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | + +## updatePricing + +Set the negotiated per-token rates reported for requests routed to this endpoint. Applies to drafts and active endpoints; new rates take effect for subsequent requests. [Management key](/docs/guides/overview/auth/management-api-keys) required. + +### Example Usage + +```typescript +import { OpenRouter } from "@openrouter/sdk"; + +const openRouter = new OpenRouter({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const result = await openRouter.privateEndpoints.updatePricing({ + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + updatePrivateEndpointPricingRequest: { + pricing: { + completion: "0.00001", + prompt: "0.0000025", + }, + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpenRouterCore } from "@openrouter/sdk/core.js"; +import { privateEndpointsUpdatePricing } from "@openrouter/sdk/funcs/privateEndpointsUpdatePricing.js"; + +// Use `OpenRouterCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const openRouter = new OpenRouterCore({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const res = await privateEndpointsUpdatePricing(openRouter, { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + updatePrivateEndpointPricingRequest: { + pricing: { + completion: "0.00001", + prompt: "0.0000025", + }, + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("privateEndpointsUpdatePricing failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdatePrivateEndpointPricingRequest](../../models/operations/updateprivateendpointpricingrequest.mdx) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.mdx) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.PrivateEndpointResponse](../../models/privateendpointresponse.mdx)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| errors.BadRequestResponseError | 400 | application/json | +| errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | +| errors.NotFoundResponseError | 404 | application/json | +| errors.RequestTimeoutResponseError | 408 | application/json | +| errors.ConflictResponseError | 409 | application/json | +| errors.UnprocessableEntityResponseError | 422 | application/json | +| errors.InternalServerResponseError | 500 | application/json | +| errors.BadGatewayResponseError | 502 | application/json | +| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | + +## validate + +Send a live test request to the draft endpoint using the given workspace's BYOK credential for its provider. A passing validation is required before activation. Failed checks return 200 with `passed: false`. [Management key](/docs/guides/overview/auth/management-api-keys) required. + +### Example Usage + +```typescript +import { OpenRouter } from "@openrouter/sdk"; + +const openRouter = new OpenRouter({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const result = await openRouter.privateEndpoints.validate({ + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + validatePrivateEndpointRequest: { + workspaceId: "550e8400-e29b-41d4-a716-446655440000", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpenRouterCore } from "@openrouter/sdk/core.js"; +import { privateEndpointsValidate } from "@openrouter/sdk/funcs/privateEndpointsValidate.js"; + +// Use `OpenRouterCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const openRouter = new OpenRouterCore({ + httpReferer: "", + appTitle: "", + appCategories: "", + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const res = await privateEndpointsValidate(openRouter, { + id: "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11", + validatePrivateEndpointRequest: { + workspaceId: "550e8400-e29b-41d4-a716-446655440000", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("privateEndpointsValidate failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ValidatePrivateEndpointRequest](../../models/operations/validateprivateendpointrequest.mdx) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.mdx) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.PrivateEndpointValidationResponse](../../models/privateendpointvalidationresponse.mdx)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| errors.BadRequestResponseError | 400 | application/json | +| errors.UnauthorizedResponseError | 401 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | +| errors.NotFoundResponseError | 404 | application/json | +| errors.RequestTimeoutResponseError | 408 | application/json | +| errors.ConflictResponseError | 409 | application/json | +| errors.UnprocessableEntityResponseError | 422 | application/json | +| errors.InternalServerResponseError | 500 | application/json | +| errors.BadGatewayResponseError | 502 | application/json | +| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/jsr.json b/jsr.json index d05cd6897..76f67d38d 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@openrouter/sdk", - "version": "1.3.36", + "version": "1.4.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package.json b/package.json index 95d488273..8841b3ac7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/sdk", - "version": "1.3.36", + "version": "1.4.0", "author": "OpenRouter", "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.", "keywords": [ @@ -73,15 +73,15 @@ "lint": "eslint --cache --max-warnings=0 src", "build": "tsc && node scripts/unbarrel-imports.js", "prepublishOnly": "npm run build", + "typecheck": "tsc --noEmit", + "compile": "tsc && node scripts/unbarrel-imports.js", "postinstall": "node scripts/check-types.js || true", "prepare": "npm run build", - "test:transit": "exit 0", "test:watch": "vitest --watch --project unit", + "typecheck:transit": "exit 0", "test": "vitest --run --project unit", "test:e2e": "vitest --run --project e2e", - "typecheck": "tsc --noEmit", - "typecheck:transit": "exit 0", - "compile": "tsc && node scripts/unbarrel-imports.js" + "test:transit": "exit 0" }, "peerDependencies": { diff --git a/src/funcs/privateEndpointsActivate.ts b/src/funcs/privateEndpointsActivate.ts new file mode 100644 index 000000000..31a3eb044 --- /dev/null +++ b/src/funcs/privateEndpointsActivate.ts @@ -0,0 +1,236 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: fb4e7d40387c + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +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 { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Activate a validated private endpoint + * + * @remarks + * Make a validated draft routable. Returns 409 when the endpoint was never validated, the validation is stale, or it is already active. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ +export function privateEndpointsActivate( + client: OpenRouterCore, + request: operations.ActivatePrivateEndpointRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ManagedPrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request: operations.ActivatePrivateEndpointRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ManagedPrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ActivatePrivateEndpointRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/private-endpoints/{id}/activate")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "HTTP-Referer": encodeSimple( + "HTTP-Referer", + payload["HTTP-Referer"] ?? client._options.httpReferer, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "activatePrivateEndpoint", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + models.ManagedPrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, models.ManagedPrivateEndpointResponse$inboundSchema), + M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), + M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), + M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), + M.jsonErr(408, errors.RequestTimeoutResponseError$inboundSchema), + M.jsonErr(409, errors.ConflictResponseError$inboundSchema), + M.jsonErr(422, errors.UnprocessableEntityResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/privateEndpointsCreate.ts b/src/funcs/privateEndpointsCreate.ts new file mode 100644 index 000000000..7b0f24722 --- /dev/null +++ b/src/funcs/privateEndpointsCreate.ts @@ -0,0 +1,238 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 59e376dd1895 + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +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 { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a private endpoint + * + * @remarks + * Create a private endpoint as a draft. Drafts are not routable: validate one with `POST /private-endpoints/{id}/validate`, then activate it with `POST /private-endpoints/{id}/activate`. Pass `activate` to do all three in one call; if validation fails the draft is kept and returned with the failed checks. Send an `Idempotency-Key` header to make retries safe: a repeated key with the same request returns the endpoint the first request created; reusing it with different fields returns 422 `idempotency_key_reused`. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ +export function privateEndpointsCreate( + client: OpenRouterCore, + request: operations.CreatePrivateEndpointRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ManagedPrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFound + | errors.RequestTimeoutResponseError + | errors.Conflict + | errors.UnprocessableEntity + | errors.InternalServerError + | errors.BadGateway + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request: operations.CreatePrivateEndpointRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ManagedPrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFound + | errors.RequestTimeoutResponseError + | errors.Conflict + | errors.UnprocessableEntity + | errors.InternalServerError + | errors.BadGateway + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreatePrivateEndpointRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.CreatePrivateEndpointRequest, { + explode: true, + }); + + const path = pathToFunc("/private-endpoints")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + "HTTP-Referer": encodeSimple( + "HTTP-Referer", + payload["HTTP-Referer"] ?? client._options.httpReferer, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, + { explode: false, charEncoding: "none" }, + ), + "idempotency-key": encodeSimple( + "idempotency-key", + payload["idempotency-key"], + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "createPrivateEndpoint", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + models.ManagedPrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFound + | errors.RequestTimeoutResponseError + | errors.Conflict + | errors.UnprocessableEntity + | errors.InternalServerError + | errors.BadGateway + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(201, models.ManagedPrivateEndpointResponse$inboundSchema), + M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), + M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), + M.jsonErr(404, errors.NotFound$inboundSchema), + M.jsonErr(408, errors.RequestTimeoutResponseError$inboundSchema), + M.jsonErr(409, errors.Conflict$inboundSchema), + M.jsonErr(422, errors.UnprocessableEntity$inboundSchema), + M.jsonErr(500, errors.InternalServerError$inboundSchema), + M.jsonErr(502, errors.BadGateway$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/privateEndpointsDelete.ts b/src/funcs/privateEndpointsDelete.ts new file mode 100644 index 000000000..799a8dde7 --- /dev/null +++ b/src/funcs/privateEndpointsDelete.ts @@ -0,0 +1,241 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 475f87370ef8 + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +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 { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a private endpoint + * + * @remarks + * Delete a private endpoint and stop routing to it. Pass `draft_only=true` to refuse (409) when the endpoint has been activated. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ +export function privateEndpointsDelete( + client: OpenRouterCore, + request: operations.DeletePrivateEndpointRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.DeletePrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request: operations.DeletePrivateEndpointRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.DeletePrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeletePrivateEndpointRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/private-endpoints/{id}")(pathParams); + + const query = encodeFormQuery({ + "draft_only": payload.draft_only, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "HTTP-Referer": encodeSimple( + "HTTP-Referer", + payload["HTTP-Referer"] ?? client._options.httpReferer, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deletePrivateEndpoint", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + models.DeletePrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, models.DeletePrivateEndpointResponse$inboundSchema), + M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), + M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), + M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), + M.jsonErr(408, errors.RequestTimeoutResponseError$inboundSchema), + M.jsonErr(409, errors.ConflictResponseError$inboundSchema), + M.jsonErr(422, errors.UnprocessableEntityResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/privateEndpointsDisable.ts b/src/funcs/privateEndpointsDisable.ts new file mode 100644 index 000000000..ca6eca68e --- /dev/null +++ b/src/funcs/privateEndpointsDisable.ts @@ -0,0 +1,236 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c89fcb6fd3d0 + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +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 { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Disable a private endpoint + * + * @remarks + * Stop routing to an active endpoint without deleting it. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ +export function privateEndpointsDisable( + client: OpenRouterCore, + request: operations.DisablePrivateEndpointRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ManagedPrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request: operations.DisablePrivateEndpointRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ManagedPrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DisablePrivateEndpointRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/private-endpoints/{id}/disable")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "HTTP-Referer": encodeSimple( + "HTTP-Referer", + payload["HTTP-Referer"] ?? client._options.httpReferer, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "disablePrivateEndpoint", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + models.ManagedPrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, models.ManagedPrivateEndpointResponse$inboundSchema), + M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), + M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), + M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), + M.jsonErr(408, errors.RequestTimeoutResponseError$inboundSchema), + M.jsonErr(409, errors.ConflictResponseError$inboundSchema), + M.jsonErr(422, errors.UnprocessableEntityResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/privateEndpointsEnable.ts b/src/funcs/privateEndpointsEnable.ts new file mode 100644 index 000000000..76b435c66 --- /dev/null +++ b/src/funcs/privateEndpointsEnable.ts @@ -0,0 +1,236 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3ccc0615e23f + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +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 { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Enable a private endpoint + * + * @remarks + * Resume routing to a disabled endpoint. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ +export function privateEndpointsEnable( + client: OpenRouterCore, + request: operations.EnablePrivateEndpointRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.ManagedPrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request: operations.EnablePrivateEndpointRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.ManagedPrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.EnablePrivateEndpointRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/private-endpoints/{id}/enable")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "HTTP-Referer": encodeSimple( + "HTTP-Referer", + payload["HTTP-Referer"] ?? client._options.httpReferer, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "enablePrivateEndpoint", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + models.ManagedPrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, models.ManagedPrivateEndpointResponse$inboundSchema), + M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), + M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), + M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), + M.jsonErr(408, errors.RequestTimeoutResponseError$inboundSchema), + M.jsonErr(409, errors.ConflictResponseError$inboundSchema), + M.jsonErr(422, errors.UnprocessableEntityResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/privateEndpointsGet.ts b/src/funcs/privateEndpointsGet.ts new file mode 100644 index 000000000..2e28f5e1a --- /dev/null +++ b/src/funcs/privateEndpointsGet.ts @@ -0,0 +1,219 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 2b89eb5a92da + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +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 { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a private endpoint + * + * @remarks + * Get one private endpoint with its upstream configuration and current pricing. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ +export function privateEndpointsGet( + client: OpenRouterCore, + request: operations.GetPrivateEndpointRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.PrivateEndpointResponse, + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request: operations.GetPrivateEndpointRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.PrivateEndpointResponse, + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetPrivateEndpointRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/private-endpoints/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "HTTP-Referer": encodeSimple( + "HTTP-Referer", + payload["HTTP-Referer"] ?? client._options.httpReferer, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getPrivateEndpoint", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + models.PrivateEndpointResponse, + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, models.PrivateEndpointResponse$inboundSchema), + M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), + M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), + M.jsonErr(408, errors.RequestTimeoutResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/privateEndpointsList.ts b/src/funcs/privateEndpointsList.ts new file mode 100644 index 000000000..61c7fc448 --- /dev/null +++ b/src/funcs/privateEndpointsList.ts @@ -0,0 +1,212 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f8b91cc1013a + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +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 { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List private endpoints + * + * @remarks + * List the organization's private endpoints, including drafts. Requires the private endpoints entitlement. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ +export function privateEndpointsList( + client: OpenRouterCore, + request?: operations.ListPrivateEndpointsRequest | undefined, + options?: RequestOptions, +): APIPromise< + Result< + models.ListPrivateEndpointsResponse, + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.RequestTimeoutResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request?: operations.ListPrivateEndpointsRequest | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + models.ListPrivateEndpointsResponse, + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.RequestTimeoutResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListPrivateEndpointsRequest$outboundSchema.optional().parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/private-endpoints")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + "HTTP-Referer": encodeSimple( + "HTTP-Referer", + payload?.["HTTP-Referer"] ?? client._options.httpReferer, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload?.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload?.appTitle ?? client._options.appTitle, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listPrivateEndpoints", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + models.ListPrivateEndpointsResponse, + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.RequestTimeoutResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, models.ListPrivateEndpointsResponse$inboundSchema), + M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), + M.jsonErr(408, errors.RequestTimeoutResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/privateEndpointsUpdate.ts b/src/funcs/privateEndpointsUpdate.ts new file mode 100644 index 000000000..47d10883d --- /dev/null +++ b/src/funcs/privateEndpointsUpdate.ts @@ -0,0 +1,239 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: a2d429fd280a + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +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 { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a draft private endpoint + * + * @remarks + * Replace a draft endpoint's upstream configuration: send `upstream_model_id`, and `base_url` to change it (an omitted `base_url` keeps the stored one). Omitted data-policy declarations are kept while the upstream is unchanged and cleared when it changes. Any change clears earlier validation. Active endpoints return 409; delete and re-create them instead. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ +export function privateEndpointsUpdate( + client: OpenRouterCore, + request: operations.UpdatePrivateEndpointRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.PrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request: operations.UpdatePrivateEndpointRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.PrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdatePrivateEndpointRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.UpdatePrivateEndpointRequest, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/private-endpoints/{id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + "HTTP-Referer": encodeSimple( + "HTTP-Referer", + payload["HTTP-Referer"] ?? client._options.httpReferer, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "updatePrivateEndpoint", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + models.PrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, models.PrivateEndpointResponse$inboundSchema), + M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), + M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), + M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), + M.jsonErr(408, errors.RequestTimeoutResponseError$inboundSchema), + M.jsonErr(409, errors.ConflictResponseError$inboundSchema), + M.jsonErr(422, errors.UnprocessableEntityResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/privateEndpointsUpdatePricing.ts b/src/funcs/privateEndpointsUpdatePricing.ts new file mode 100644 index 000000000..41ed6bb2e --- /dev/null +++ b/src/funcs/privateEndpointsUpdatePricing.ts @@ -0,0 +1,241 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5824e06c594a + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +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 { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Set private endpoint pricing + * + * @remarks + * Set the negotiated per-token rates reported for requests routed to this endpoint. Applies to drafts and active endpoints; new rates take effect for subsequent requests. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ +export function privateEndpointsUpdatePricing( + client: OpenRouterCore, + request: operations.UpdatePrivateEndpointPricingRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.PrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request: operations.UpdatePrivateEndpointPricingRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.PrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdatePrivateEndpointPricingRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.UpdatePrivateEndpointPricingRequest, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/private-endpoints/{id}/pricing")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + "HTTP-Referer": encodeSimple( + "HTTP-Referer", + payload["HTTP-Referer"] ?? client._options.httpReferer, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "updatePrivateEndpointPricing", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + models.PrivateEndpointResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, models.PrivateEndpointResponse$inboundSchema), + M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), + M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), + M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), + M.jsonErr(408, errors.RequestTimeoutResponseError$inboundSchema), + M.jsonErr(409, errors.ConflictResponseError$inboundSchema), + M.jsonErr(422, errors.UnprocessableEntityResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/privateEndpointsValidate.ts b/src/funcs/privateEndpointsValidate.ts new file mode 100644 index 000000000..a6f14a037 --- /dev/null +++ b/src/funcs/privateEndpointsValidate.ts @@ -0,0 +1,239 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 4337dd4863e1 + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +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 { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Validate a draft private endpoint + * + * @remarks + * Send a live test request to the draft endpoint using the given workspace's BYOK credential for its provider. A passing validation is required before activation. Failed checks return 200 with `passed: false`. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ +export function privateEndpointsValidate( + client: OpenRouterCore, + request: operations.ValidatePrivateEndpointRequest, + options?: RequestOptions, +): APIPromise< + Result< + models.PrivateEndpointValidationResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request: operations.ValidatePrivateEndpointRequest, + options?: RequestOptions, +): Promise< + [ + Result< + models.PrivateEndpointValidationResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ValidatePrivateEndpointRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.ValidatePrivateEndpointRequest, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/private-endpoints/{id}/validate")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + "HTTP-Referer": encodeSimple( + "HTTP-Referer", + payload["HTTP-Referer"] ?? client._options.httpReferer, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Categories": encodeSimple( + "X-OpenRouter-Categories", + payload.appCategories ?? client._options.appCategories, + { explode: false, charEncoding: "none" }, + ), + "X-OpenRouter-Title": encodeSimple( + "X-OpenRouter-Title", + payload.appTitle ?? client._options.appTitle, + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "validatePrivateEndpoint", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + models.PrivateEndpointValidationResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.ForbiddenResponseError + | errors.NotFoundResponseError + | errors.RequestTimeoutResponseError + | errors.ConflictResponseError + | errors.UnprocessableEntityResponseError + | errors.InternalServerResponseError + | errors.BadGatewayResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, models.PrivateEndpointValidationResponse$inboundSchema), + M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), + M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), + M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), + M.jsonErr(408, errors.RequestTimeoutResponseError$inboundSchema), + M.jsonErr(409, errors.ConflictResponseError$inboundSchema), + M.jsonErr(422, errors.UnprocessableEntityResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.jsonErr(502, errors.BadGatewayResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/lib/config.ts b/src/lib/config.ts index f04b53845..7eaf25450 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -79,7 +79,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "1.3.36", + sdkVersion: "1.4.0", genVersion: "2.914.0", - userAgent: "speakeasy-sdk/typescript 1.3.36 2.914.0 1.0.0 @openrouter/sdk", + userAgent: "speakeasy-sdk/typescript 1.4.0 2.914.0 1.0.0 @openrouter/sdk", } as const; diff --git a/src/models/createprivateendpointrequest.ts b/src/models/createprivateendpointrequest.ts new file mode 100644 index 000000000..0c397ca5d --- /dev/null +++ b/src/models/createprivateendpointrequest.ts @@ -0,0 +1,125 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 466afc9b7d23 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; +import { + PrivateEndpointActivation, + PrivateEndpointActivation$Outbound, + PrivateEndpointActivation$outboundSchema, +} from "./privateendpointactivation.js"; +import { + PrivateEndpointPricing, + PrivateEndpointPricing$Outbound, + PrivateEndpointPricing$outboundSchema, +} from "./privateendpointpricing.js"; + +/** + * Attest where this deployment processes data. + */ +export const CreatePrivateEndpointRequestDeclaredRegion = { + Global: "global", + Europe: "europe", + Us: "us", +} as const; +/** + * Attest where this deployment processes data. + */ +export type CreatePrivateEndpointRequestDeclaredRegion = OpenEnum< + typeof CreatePrivateEndpointRequestDeclaredRegion +>; + +export type CreatePrivateEndpointRequest = { + /** + * Validate and activate in the same call. On a failed validation the draft is kept and returned with a 422, so fix it and call `/validate` and `/activate` instead of creating it again. + */ + activate?: PrivateEndpointActivation | undefined; + /** + * HTTPS base URL of your deployment. Required unless the provider derives its URL from the BYOK credential (Azure, Amazon Bedrock, Google Vertex). + */ + baseUrl?: string | undefined; + /** + * Attest where this deployment processes data. + */ + declaredRegion?: + | CreatePrivateEndpointRequestDeclaredRegion + | null + | undefined; + /** + * Attest that this deployment retains no prompt or completion data. + */ + declaredZdr?: boolean | null | undefined; + /** + * Permanent slug of the model this endpoint serves. + */ + modelPermaslug: string; + /** + * Negotiated per-token rates reported for requests routed to this endpoint. + */ + pricing?: PrivateEndpointPricing | undefined; + /** + * Slug of the upstream provider. + */ + providerSlug: string; + /** + * Model or deployment identifier sent to the upstream provider. + */ + upstreamModelId: string; +}; + +/** @internal */ +export const CreatePrivateEndpointRequestDeclaredRegion$outboundSchema: + z.ZodType = openEnums + .outboundSchema(CreatePrivateEndpointRequestDeclaredRegion); + +/** @internal */ +export type CreatePrivateEndpointRequest$Outbound = { + activate?: PrivateEndpointActivation$Outbound | undefined; + base_url?: string | undefined; + declared_region?: string | null | undefined; + declared_zdr?: boolean | null | undefined; + model_permaslug: string; + pricing?: PrivateEndpointPricing$Outbound | undefined; + provider_slug: string; + upstream_model_id: string; +}; + +/** @internal */ +export const CreatePrivateEndpointRequest$outboundSchema: z.ZodType< + CreatePrivateEndpointRequest$Outbound, + CreatePrivateEndpointRequest +> = z.object({ + activate: PrivateEndpointActivation$outboundSchema.optional(), + baseUrl: z.string().optional(), + declaredRegion: z.nullable( + CreatePrivateEndpointRequestDeclaredRegion$outboundSchema, + ).optional(), + declaredZdr: z.nullable(z.boolean()).optional(), + modelPermaslug: z.string(), + pricing: PrivateEndpointPricing$outboundSchema.optional(), + providerSlug: z.string(), + upstreamModelId: z.string(), +}).transform((v) => { + return remap$(v, { + baseUrl: "base_url", + declaredRegion: "declared_region", + declaredZdr: "declared_zdr", + modelPermaslug: "model_permaslug", + providerSlug: "provider_slug", + upstreamModelId: "upstream_model_id", + }); +}); + +export function createPrivateEndpointRequestToJSON( + createPrivateEndpointRequest: CreatePrivateEndpointRequest, +): string { + return JSON.stringify( + CreatePrivateEndpointRequest$outboundSchema.parse( + createPrivateEndpointRequest, + ), + ); +} diff --git a/src/models/createprivateendpointvalidationfailedresponseerror.ts b/src/models/createprivateendpointvalidationfailedresponseerror.ts new file mode 100644 index 000000000..f88b32f6c --- /dev/null +++ b/src/models/createprivateendpointvalidationfailedresponseerror.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 4e00bbe15ec8 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ManagedPrivateEndpoint, + ManagedPrivateEndpoint$inboundSchema, +} from "./managedprivateendpoint.js"; +import { + PrivateEndpointValidationNullable, + PrivateEndpointValidationNullable$inboundSchema, +} from "./privateendpointvalidationnullable.js"; + +export type CreatePrivateEndpointValidationFailedResponseData = { + endpoint: ManagedPrivateEndpoint; + validation: PrivateEndpointValidationNullable | null; +}; + +export type CreatePrivateEndpointValidationFailedResponseError = { + code: number; + message: string; +}; + +/** @internal */ +export const CreatePrivateEndpointValidationFailedResponseData$inboundSchema: + z.ZodType = z + .object({ + endpoint: ManagedPrivateEndpoint$inboundSchema, + validation: z.nullable(PrivateEndpointValidationNullable$inboundSchema), + }); + +export function createPrivateEndpointValidationFailedResponseDataFromJSON( + jsonString: string, +): SafeParseResult< + CreatePrivateEndpointValidationFailedResponseData, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + CreatePrivateEndpointValidationFailedResponseData$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'CreatePrivateEndpointValidationFailedResponseData' from JSON`, + ); +} + +/** @internal */ +export const CreatePrivateEndpointValidationFailedResponseError$inboundSchema: + z.ZodType = z + .object({ + code: z.int(), + message: z.string(), + }); + +export function createPrivateEndpointValidationFailedResponseErrorFromJSON( + jsonString: string, +): SafeParseResult< + CreatePrivateEndpointValidationFailedResponseError, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + CreatePrivateEndpointValidationFailedResponseError$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'CreatePrivateEndpointValidationFailedResponseError' from JSON`, + ); +} diff --git a/src/models/deleteprivateendpointresponse.ts b/src/models/deleteprivateendpointresponse.ts new file mode 100644 index 000000000..68fc9e7c8 --- /dev/null +++ b/src/models/deleteprivateendpointresponse.ts @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f98c78f263f4 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type DeletePrivateEndpointResponseData = { + /** + * Stable identifier of the private endpoint. + */ + id: string; +}; + +export type DeletePrivateEndpointResponse = { + data: DeletePrivateEndpointResponseData; +}; + +/** @internal */ +export const DeletePrivateEndpointResponseData$inboundSchema: z.ZodType< + DeletePrivateEndpointResponseData, + unknown +> = z.object({ + id: z.string(), +}); + +export function deletePrivateEndpointResponseDataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeletePrivateEndpointResponseData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeletePrivateEndpointResponseData' from JSON`, + ); +} + +/** @internal */ +export const DeletePrivateEndpointResponse$inboundSchema: z.ZodType< + DeletePrivateEndpointResponse, + unknown +> = z.object({ + data: z.lazy(() => DeletePrivateEndpointResponseData$inboundSchema), +}); + +export function deletePrivateEndpointResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeletePrivateEndpointResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeletePrivateEndpointResponse' from JSON`, + ); +} diff --git a/src/models/errors/createprivateendpoint.ts b/src/models/errors/createprivateendpoint.ts new file mode 100644 index 000000000..3a31214d6 --- /dev/null +++ b/src/models/errors/createprivateendpoint.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 677d100a981d + */ + +import * as z from "zod/v4"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { + BadGatewayResponseError, + BadGatewayResponseError$inboundSchema, +} from "./badgatewayresponseerror.js"; +import { + ConflictResponseError, + ConflictResponseError$inboundSchema, +} from "./conflictresponseerror.js"; +import { + CreatePrivateEndpointValidationFailedResponseError, + CreatePrivateEndpointValidationFailedResponseError$inboundSchema, +} from "./createprivateendpointvalidationfailedresponseerror.js"; +import { + InternalServerResponseError, + InternalServerResponseError$inboundSchema, +} from "./internalserverresponseerror.js"; +import { + NotFoundResponseError, + NotFoundResponseError$inboundSchema, +} from "./notfoundresponseerror.js"; +import { SDKValidationError } from "./sdkvalidationerror.js"; +import { + UnprocessableEntityResponseError, + UnprocessableEntityResponseError$inboundSchema, +} from "./unprocessableentityresponseerror.js"; + +/** + * An upstream dependency failed. When `activate` was passed and the draft was created, `data` carries it and any validation checks. + */ +export type BadGateway = + | CreatePrivateEndpointValidationFailedResponseError + | BadGatewayResponseError; + +/** + * Internal server error. When `activate` was passed and the draft was created, `data` carries it and any validation checks. + */ +export type InternalServerError = + | CreatePrivateEndpointValidationFailedResponseError + | InternalServerResponseError; + +/** + * The request was invalid, or validation failed. When `activate` was passed and the draft was created, `data` carries it and any validation checks. + */ +export type UnprocessableEntity = + | CreatePrivateEndpointValidationFailedResponseError + | UnprocessableEntityResponseError; + +/** + * The request conflicts with the endpoint state, such as a stale validation. When `activate` was passed and the draft was created, `data` carries it and any validation checks. + */ +export type Conflict = + | CreatePrivateEndpointValidationFailedResponseError + | ConflictResponseError; + +/** + * The model, provider, or validation workspace was not found. When `activate` was passed and the draft was created, `data` carries it and any validation checks. + */ +export type NotFound = + | CreatePrivateEndpointValidationFailedResponseError + | NotFoundResponseError; + +/** @internal */ +export const BadGateway$inboundSchema: z.ZodType = z.union( + [ + CreatePrivateEndpointValidationFailedResponseError$inboundSchema, + BadGatewayResponseError$inboundSchema, + ], +); + +export function badGatewayFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BadGateway$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BadGateway' from JSON`, + ); +} + +/** @internal */ +export const InternalServerError$inboundSchema: z.ZodType< + InternalServerError, + unknown +> = z.union([ + CreatePrivateEndpointValidationFailedResponseError$inboundSchema, + InternalServerResponseError$inboundSchema, +]); + +export function internalServerErrorFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => InternalServerError$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'InternalServerError' from JSON`, + ); +} + +/** @internal */ +export const UnprocessableEntity$inboundSchema: z.ZodType< + UnprocessableEntity, + unknown +> = z.union([ + CreatePrivateEndpointValidationFailedResponseError$inboundSchema, + UnprocessableEntityResponseError$inboundSchema, +]); + +export function unprocessableEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UnprocessableEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UnprocessableEntity' from JSON`, + ); +} + +/** @internal */ +export const Conflict$inboundSchema: z.ZodType = z.union([ + CreatePrivateEndpointValidationFailedResponseError$inboundSchema, + ConflictResponseError$inboundSchema, +]); + +export function conflictFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Conflict$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Conflict' from JSON`, + ); +} + +/** @internal */ +export const NotFound$inboundSchema: z.ZodType = z.union([ + CreatePrivateEndpointValidationFailedResponseError$inboundSchema, + NotFoundResponseError$inboundSchema, +]); + +export function notFoundFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NotFound$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NotFound' from JSON`, + ); +} diff --git a/src/models/errors/createprivateendpointvalidationfailedresponseerror.ts b/src/models/errors/createprivateendpointvalidationfailedresponseerror.ts new file mode 100644 index 000000000..75e7abc9c --- /dev/null +++ b/src/models/errors/createprivateendpointvalidationfailedresponseerror.ts @@ -0,0 +1,59 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 81ce190d6cf1 + */ + +import * as z from "zod/v4"; +import * as models from "../index.js"; +import { OpenRouterError } from "./openroutererror.js"; + +export type CreatePrivateEndpointValidationFailedResponseErrorData = { + data: models.CreatePrivateEndpointValidationFailedResponseData; + error: models.CreatePrivateEndpointValidationFailedResponseError; +}; + +export class CreatePrivateEndpointValidationFailedResponseError + extends OpenRouterError +{ + data: models.CreatePrivateEndpointValidationFailedResponseData; + error: models.CreatePrivateEndpointValidationFailedResponseError; + + /** The original data that was passed to this error instance. */ + data$: CreatePrivateEndpointValidationFailedResponseErrorData; + + constructor( + err: CreatePrivateEndpointValidationFailedResponseErrorData, + httpMeta: { response: Response; request: Request; body: string }, + ) { + const message = err.error?.message + || `API error occurred: ${JSON.stringify(err)}`; + super(message, httpMeta); + this.data$ = err; + this.data = err.data; + this.error = err.error; + + this.name = "CreatePrivateEndpointValidationFailedResponseError"; + } +} + +/** @internal */ +export const CreatePrivateEndpointValidationFailedResponseError$inboundSchema: + z.ZodType = z + .object({ + data: z.lazy(() => + models.CreatePrivateEndpointValidationFailedResponseData$inboundSchema + ), + error: z.lazy(() => + models.CreatePrivateEndpointValidationFailedResponseError$inboundSchema + ), + request$: z.custom(x => x instanceof Request), + response$: z.custom(x => x instanceof Response), + body$: z.string(), + }) + .transform((v) => { + return new CreatePrivateEndpointValidationFailedResponseError(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); + }); diff --git a/src/models/errors/index.ts b/src/models/errors/index.ts index 3afbbe438..31a9d14cb 100644 --- a/src/models/errors/index.ts +++ b/src/models/errors/index.ts @@ -8,6 +8,8 @@ export * from "./badrequestresponseerror.js"; export * from "./batcherrorresponse.js"; export * from "./batchpaymentrequiredresponseerror.js"; export * from "./conflictresponseerror.js"; +export * from "./createprivateendpoint.js"; +export * from "./createprivateendpointvalidationfailedresponseerror.js"; export * from "./edgenetworktimeoutresponseerror.js"; export * from "./forbiddenresponseerror.js"; export * from "./gatewaytimeoutresponseerror.js"; diff --git a/src/models/index.ts b/src/models/index.ts index a9452658a..a0d021c48 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -258,6 +258,8 @@ export * from "./createinternrequest.js"; export * from "./createobservabilitydestinationrequest.js"; export * from "./createobservabilitydestinationresponse.js"; export * from "./createpresetfrominferenceresponse.js"; +export * from "./createprivateendpointrequest.js"; +export * from "./createprivateendpointvalidationfailedresponseerror.js"; export * from "./createscimgroupmappingrequest.js"; export * from "./createscimgroupmappingresponse.js"; export * from "./createscimsyncjobresponse.js"; @@ -286,6 +288,7 @@ export * from "./deleteguardrailresponse.js"; export * from "./deleteinternrequest.js"; export * from "./deleteinternresponse.js"; export * from "./deleteobservabilitydestinationresponse.js"; +export * from "./deleteprivateendpointresponse.js"; export * from "./deletescimgroupmappingresponse.js"; export * from "./deleteworkspacebudgetresponse.js"; export * from "./deleteworkspaceresponse.js"; @@ -434,6 +437,7 @@ export * from "./listmemberassignmentsresponse.js"; export * from "./listobservabilitydestinationsresponse.js"; export * from "./listpresetsresponse.js"; export * from "./listpresetversionsresponse.js"; +export * from "./listprivateendpointsresponse.js"; export * from "./listscimgroupmappingsresponse.js"; export * from "./listscimgroupsresponse.js"; export * from "./listworkspacebudgetsresponse.js"; @@ -441,6 +445,8 @@ export * from "./listworkspacemembersresponse.js"; export * from "./listworkspacesresponse.js"; export * from "./localshellcallitem.js"; export * from "./localshellcalloutputitem.js"; +export * from "./managedprivateendpoint.js"; +export * from "./managedprivateendpointresponse.js"; export * from "./mcpapprovalrequestitem.js"; export * from "./mcpapprovalresponseitem.js"; export * from "./mcpcallitem.js"; @@ -589,6 +595,18 @@ export * from "./preview20250311websearchservertool.js"; export * from "./previewwebsearchservertool.js"; export * from "./previewwebsearchuserlocation.js"; export * from "./pricingoverride.js"; +export * from "./privateendpoint.js"; +export * from "./privateendpointactivation.js"; +export * from "./privateendpointcheck.js"; +export * from "./privateendpointcheckreason.js"; +export * from "./privateendpointdeclaredregion.js"; +export * from "./privateendpointpricing.js"; +export * from "./privateendpointresponse.js"; +export * from "./privateendpointstatus.js"; +export * from "./privateendpointsummary.js"; +export * from "./privateendpointvalidation.js"; +export * from "./privateendpointvalidationnullable.js"; +export * from "./privateendpointvalidationresponse.js"; export * from "./promptcachebreakpoint.js"; export * from "./promptcacheoptions.js"; export * from "./promptinjectionscanscope.js"; @@ -732,6 +750,8 @@ export * from "./updateguardrailresponse.js"; export * from "./updateinternrequest.js"; export * from "./updateobservabilitydestinationrequest.js"; export * from "./updateobservabilitydestinationresponse.js"; +export * from "./updateprivateendpointpricingrequest.js"; +export * from "./updateprivateendpointrequest.js"; export * from "./updatescimgroupmappingrequest.js"; export * from "./updatescimgroupmappingresponse.js"; export * from "./updateworkspacerequest.js"; @@ -739,6 +759,7 @@ export * from "./updateworkspaceresponse.js"; export * from "./upsertworkspacebudgetrequest.js"; export * from "./upsertworkspacebudgetresponse.js"; export * from "./urlcitation.js"; +export * from "./validateprivateendpointrequest.js"; export * from "./vaultsecret.js"; export * from "./vaultsecretcopyrequest.js"; export * from "./vaultsecretcopyresponse.js"; diff --git a/src/models/listprivateendpointsresponse.ts b/src/models/listprivateendpointsresponse.ts new file mode 100644 index 000000000..7dee96a0b --- /dev/null +++ b/src/models/listprivateendpointsresponse.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 0f316944ddb9 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + PrivateEndpointSummary, + PrivateEndpointSummary$inboundSchema, +} from "./privateendpointsummary.js"; + +export type ListPrivateEndpointsResponse = { + data: Array; +}; + +/** @internal */ +export const ListPrivateEndpointsResponse$inboundSchema: z.ZodType< + ListPrivateEndpointsResponse, + unknown +> = z.object({ + data: z.array(PrivateEndpointSummary$inboundSchema), +}); + +export function listPrivateEndpointsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListPrivateEndpointsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListPrivateEndpointsResponse' from JSON`, + ); +} diff --git a/src/models/managedprivateendpoint.ts b/src/models/managedprivateendpoint.ts new file mode 100644 index 000000000..fa5c1e732 --- /dev/null +++ b/src/models/managedprivateendpoint.ts @@ -0,0 +1,93 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: aa79ac02afd9 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + PrivateEndpointDeclaredRegion, + PrivateEndpointDeclaredRegion$inboundSchema, +} from "./privateendpointdeclaredregion.js"; +import { + PrivateEndpointStatus, + PrivateEndpointStatus$inboundSchema, +} from "./privateendpointstatus.js"; + +export type ManagedPrivateEndpoint = { + /** + * ISO timestamp of when the endpoint was created. + */ + createdAt: string; + /** + * Stable identifier of the private endpoint. + */ + id: string; + /** + * Display name of the model, or `null` when the model is no longer listed. + */ + modelName: string | null; + /** + * Permanent slug of the model this endpoint serves. + */ + modelPermaslug: string; + /** + * Public model slug, or `null` when the model is no longer listed. + */ + modelSlug: string | null; + /** + * Display name of the upstream provider. + */ + providerName: string; + /** + * Lifecycle state. `draft` endpoints are not routable until validated and activated; `disabled` endpoints are activated but temporarily not routable. + */ + status: PrivateEndpointStatus; + /** + * Where you attest this deployment processes data. `global` means not regional; `null` means undeclared. + */ + declaredRegion: PrivateEndpointDeclaredRegion | null; + /** + * Whether you attest this deployment retains no prompt or completion data. `null` means undeclared. + */ + declaredZdr: boolean | null; +}; + +/** @internal */ +export const ManagedPrivateEndpoint$inboundSchema: z.ZodType< + ManagedPrivateEndpoint, + unknown +> = z.object({ + created_at: z.string(), + id: z.string(), + model_name: z.nullable(z.string()), + model_permaslug: z.string(), + model_slug: z.nullable(z.string()), + provider_name: z.string(), + status: PrivateEndpointStatus$inboundSchema, + declared_region: z.nullable(PrivateEndpointDeclaredRegion$inboundSchema), + declared_zdr: z.nullable(z.boolean()), +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "model_name": "modelName", + "model_permaslug": "modelPermaslug", + "model_slug": "modelSlug", + "provider_name": "providerName", + "declared_region": "declaredRegion", + "declared_zdr": "declaredZdr", + }); +}); + +export function managedPrivateEndpointFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ManagedPrivateEndpoint$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ManagedPrivateEndpoint' from JSON`, + ); +} diff --git a/src/models/managedprivateendpointresponse.ts b/src/models/managedprivateendpointresponse.ts new file mode 100644 index 000000000..7b1681e8d --- /dev/null +++ b/src/models/managedprivateendpointresponse.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 24ff2f9760bd + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + ManagedPrivateEndpoint, + ManagedPrivateEndpoint$inboundSchema, +} from "./managedprivateendpoint.js"; + +export type ManagedPrivateEndpointResponse = { + data: ManagedPrivateEndpoint; +}; + +/** @internal */ +export const ManagedPrivateEndpointResponse$inboundSchema: z.ZodType< + ManagedPrivateEndpointResponse, + unknown +> = z.object({ + data: ManagedPrivateEndpoint$inboundSchema, +}); + +export function managedPrivateEndpointResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ManagedPrivateEndpointResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ManagedPrivateEndpointResponse' from JSON`, + ); +} diff --git a/src/models/operations/activateprivateendpoint.ts b/src/models/operations/activateprivateendpoint.ts new file mode 100644 index 000000000..80a5856be --- /dev/null +++ b/src/models/operations/activateprivateendpoint.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 67a95de4b97f + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; + +export type ActivatePrivateEndpointGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +export type ActivatePrivateEndpointRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; + /** + * Stable identifier of the private endpoint. + */ + id: string; +}; + +/** @internal */ +export type ActivatePrivateEndpointRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + id: string; +}; + +/** @internal */ +export const ActivatePrivateEndpointRequest$outboundSchema: z.ZodType< + ActivatePrivateEndpointRequest$Outbound, + ActivatePrivateEndpointRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + }); +}); + +export function activatePrivateEndpointRequestToJSON( + activatePrivateEndpointRequest: ActivatePrivateEndpointRequest, +): string { + return JSON.stringify( + ActivatePrivateEndpointRequest$outboundSchema.parse( + activatePrivateEndpointRequest, + ), + ); +} diff --git a/src/models/operations/createprivateendpoint.ts b/src/models/operations/createprivateendpoint.ts new file mode 100644 index 000000000..c263f7e66 --- /dev/null +++ b/src/models/operations/createprivateendpoint.ts @@ -0,0 +1,95 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 469b6f483a53 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; +import * as models from "../index.js"; + +export type CreatePrivateEndpointGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +export type CreatePrivateEndpointRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; + /** + * Retry-safe create: a repeated create with the same key from the same organization returns the endpoint the first request created instead of creating another. The endpoint is returned as it is now. Reusing a key with a different request body (model, provider, base URL, upstream model ID, declared ZDR or region, or pricing) is rejected with 422 `idempotency_key_reused`. `activate` is not compared, and later edits to the endpoint do not affect the comparison. + */ + idempotencyKey?: string | undefined; + createPrivateEndpointRequest: models.CreatePrivateEndpointRequest; +}; + +/** @internal */ +export type CreatePrivateEndpointRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + "idempotency-key"?: string | undefined; + CreatePrivateEndpointRequest: models.CreatePrivateEndpointRequest$Outbound; +}; + +/** @internal */ +export const CreatePrivateEndpointRequest$outboundSchema: z.ZodType< + CreatePrivateEndpointRequest$Outbound, + CreatePrivateEndpointRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + idempotencyKey: z.string().optional(), + createPrivateEndpointRequest: + models.CreatePrivateEndpointRequest$outboundSchema, +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + idempotencyKey: "idempotency-key", + createPrivateEndpointRequest: "CreatePrivateEndpointRequest", + }); +}); + +export function createPrivateEndpointRequestToJSON( + createPrivateEndpointRequest: CreatePrivateEndpointRequest, +): string { + return JSON.stringify( + CreatePrivateEndpointRequest$outboundSchema.parse( + createPrivateEndpointRequest, + ), + ); +} diff --git a/src/models/operations/deleteprivateendpoint.ts b/src/models/operations/deleteprivateendpoint.ts new file mode 100644 index 000000000..095db7351 --- /dev/null +++ b/src/models/operations/deleteprivateendpoint.ts @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: a0caf4badde5 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; +import * as openEnums from "../../types/enums.js"; +import { OpenEnum } from "../../types/enums.js"; + +export type DeletePrivateEndpointGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +/** + * When `true`, only delete the endpoint if it is still a draft (409 otherwise). + */ +export const DraftOnly = { + True: "true", + False: "false", +} as const; +/** + * When `true`, only delete the endpoint if it is still a draft (409 otherwise). + */ +export type DraftOnly = OpenEnum; + +export type DeletePrivateEndpointRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; + /** + * Stable identifier of the private endpoint. + */ + id: string; + /** + * When `true`, only delete the endpoint if it is still a draft (409 otherwise). + */ + draftOnly?: DraftOnly | undefined; +}; + +/** @internal */ +export const DraftOnly$outboundSchema: z.ZodType = openEnums + .outboundSchema(DraftOnly); + +/** @internal */ +export type DeletePrivateEndpointRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + id: string; + draft_only?: string | undefined; +}; + +/** @internal */ +export const DeletePrivateEndpointRequest$outboundSchema: z.ZodType< + DeletePrivateEndpointRequest$Outbound, + DeletePrivateEndpointRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + id: z.string(), + draftOnly: DraftOnly$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + draftOnly: "draft_only", + }); +}); + +export function deletePrivateEndpointRequestToJSON( + deletePrivateEndpointRequest: DeletePrivateEndpointRequest, +): string { + return JSON.stringify( + DeletePrivateEndpointRequest$outboundSchema.parse( + deletePrivateEndpointRequest, + ), + ); +} diff --git a/src/models/operations/disableprivateendpoint.ts b/src/models/operations/disableprivateendpoint.ts new file mode 100644 index 000000000..b2cc74b9d --- /dev/null +++ b/src/models/operations/disableprivateendpoint.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 3a08f5ad738c + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; + +export type DisablePrivateEndpointGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +export type DisablePrivateEndpointRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; + /** + * Stable identifier of the private endpoint. + */ + id: string; +}; + +/** @internal */ +export type DisablePrivateEndpointRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + id: string; +}; + +/** @internal */ +export const DisablePrivateEndpointRequest$outboundSchema: z.ZodType< + DisablePrivateEndpointRequest$Outbound, + DisablePrivateEndpointRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + }); +}); + +export function disablePrivateEndpointRequestToJSON( + disablePrivateEndpointRequest: DisablePrivateEndpointRequest, +): string { + return JSON.stringify( + DisablePrivateEndpointRequest$outboundSchema.parse( + disablePrivateEndpointRequest, + ), + ); +} diff --git a/src/models/operations/enableprivateendpoint.ts b/src/models/operations/enableprivateendpoint.ts new file mode 100644 index 000000000..ca6303454 --- /dev/null +++ b/src/models/operations/enableprivateendpoint.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e1500a47cc96 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; + +export type EnablePrivateEndpointGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +export type EnablePrivateEndpointRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; + /** + * Stable identifier of the private endpoint. + */ + id: string; +}; + +/** @internal */ +export type EnablePrivateEndpointRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + id: string; +}; + +/** @internal */ +export const EnablePrivateEndpointRequest$outboundSchema: z.ZodType< + EnablePrivateEndpointRequest$Outbound, + EnablePrivateEndpointRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + }); +}); + +export function enablePrivateEndpointRequestToJSON( + enablePrivateEndpointRequest: EnablePrivateEndpointRequest, +): string { + return JSON.stringify( + EnablePrivateEndpointRequest$outboundSchema.parse( + enablePrivateEndpointRequest, + ), + ); +} diff --git a/src/models/operations/getprivateendpoint.ts b/src/models/operations/getprivateendpoint.ts new file mode 100644 index 000000000..ad17c1289 --- /dev/null +++ b/src/models/operations/getprivateendpoint.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d2a00e755d45 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; + +export type GetPrivateEndpointGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +export type GetPrivateEndpointRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; + /** + * Stable identifier of the private endpoint. + */ + id: string; +}; + +/** @internal */ +export type GetPrivateEndpointRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + id: string; +}; + +/** @internal */ +export const GetPrivateEndpointRequest$outboundSchema: z.ZodType< + GetPrivateEndpointRequest$Outbound, + GetPrivateEndpointRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + id: z.string(), +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + }); +}); + +export function getPrivateEndpointRequestToJSON( + getPrivateEndpointRequest: GetPrivateEndpointRequest, +): string { + return JSON.stringify( + GetPrivateEndpointRequest$outboundSchema.parse(getPrivateEndpointRequest), + ); +} diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index 0c0dc1d66..700a9ee1d 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -3,6 +3,7 @@ * @generated-id: 0d9ffaf774d2 */ +export * from "./activateprivateendpoint.js"; export * from "./bulkaddworkspacemembers.js"; export * from "./bulkassignkeystoguardrail.js"; export * from "./bulkassignmemberstoguardrail.js"; @@ -28,6 +29,7 @@ export * from "./createobservabilitydestination.js"; export * from "./createpresetschatcompletions.js"; export * from "./createpresetsmessages.js"; export * from "./createpresetsresponses.js"; +export * from "./createprivateendpoint.js"; export * from "./creatererank.js"; export * from "./createresponses.js"; export * from "./createscimgroupmapping.js"; @@ -43,12 +45,15 @@ export * from "./deleteintern.js"; export * from "./deleteinternvaultsecret.js"; export * from "./deletekeys.js"; export * from "./deleteobservabilitydestination.js"; +export * from "./deleteprivateendpoint.js"; export * from "./deletescimgroupmapping.js"; export * from "./deletevaultsecret.js"; export * from "./deleteworkspace.js"; export * from "./deleteworkspacebudget.js"; +export * from "./disableprivateendpoint.js"; export * from "./downloadcontainerfilecontent.js"; export * from "./downloadfilecontent.js"; +export * from "./enableprivateendpoint.js"; export * from "./exchangeauthcodeforapikey.js"; export * from "./getanalyticsmeta.js"; export * from "./getapprankings.js"; @@ -70,6 +75,7 @@ export * from "./getmodels.js"; export * from "./getobservabilitydestination.js"; export * from "./getpreset.js"; export * from "./getpresetversion.js"; +export * from "./getprivateendpoint.js"; export * from "./getrankingsdaily.js"; export * from "./getscimgroupmapping.js"; export * from "./getscimsyncjob.js"; @@ -105,6 +111,7 @@ export * from "./listobservabilitydestinations.js"; export * from "./listorganizationmembers.js"; export * from "./listpresets.js"; export * from "./listpresetversions.js"; +export * from "./listprivateendpoints.js"; export * from "./listproviders.js"; export * from "./listscimgroupmappings.js"; export * from "./listscimgroups.js"; @@ -127,7 +134,10 @@ export * from "./updateguardrail.js"; export * from "./updateintern.js"; export * from "./updatekeys.js"; export * from "./updateobservabilitydestination.js"; +export * from "./updateprivateendpoint.js"; +export * from "./updateprivateendpointpricing.js"; export * from "./updatescimgroupmapping.js"; export * from "./updateworkspace.js"; export * from "./uploadfile.js"; export * from "./upsertworkspacebudget.js"; +export * from "./validateprivateendpoint.js"; diff --git a/src/models/operations/listprivateendpoints.ts b/src/models/operations/listprivateendpoints.ts new file mode 100644 index 000000000..adbf585fb --- /dev/null +++ b/src/models/operations/listprivateendpoints.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 21c6af9f454c + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; + +export type ListPrivateEndpointsGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +export type ListPrivateEndpointsRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +/** @internal */ +export type ListPrivateEndpointsRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; +}; + +/** @internal */ +export const ListPrivateEndpointsRequest$outboundSchema: z.ZodType< + ListPrivateEndpointsRequest$Outbound, + ListPrivateEndpointsRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + }); +}); + +export function listPrivateEndpointsRequestToJSON( + listPrivateEndpointsRequest: ListPrivateEndpointsRequest, +): string { + return JSON.stringify( + ListPrivateEndpointsRequest$outboundSchema.parse( + listPrivateEndpointsRequest, + ), + ); +} diff --git a/src/models/operations/updateprivateendpoint.ts b/src/models/operations/updateprivateendpoint.ts new file mode 100644 index 000000000..b97e901df --- /dev/null +++ b/src/models/operations/updateprivateendpoint.ts @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 05253f9e2009 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; +import * as models from "../index.js"; + +export type UpdatePrivateEndpointGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +export type UpdatePrivateEndpointRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; + /** + * Stable identifier of the private endpoint. + */ + id: string; + updatePrivateEndpointRequest: models.UpdatePrivateEndpointRequest; +}; + +/** @internal */ +export type UpdatePrivateEndpointRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + id: string; + UpdatePrivateEndpointRequest: models.UpdatePrivateEndpointRequest$Outbound; +}; + +/** @internal */ +export const UpdatePrivateEndpointRequest$outboundSchema: z.ZodType< + UpdatePrivateEndpointRequest$Outbound, + UpdatePrivateEndpointRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + id: z.string(), + updatePrivateEndpointRequest: + models.UpdatePrivateEndpointRequest$outboundSchema, +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + updatePrivateEndpointRequest: "UpdatePrivateEndpointRequest", + }); +}); + +export function updatePrivateEndpointRequestToJSON( + updatePrivateEndpointRequest: UpdatePrivateEndpointRequest, +): string { + return JSON.stringify( + UpdatePrivateEndpointRequest$outboundSchema.parse( + updatePrivateEndpointRequest, + ), + ); +} diff --git a/src/models/operations/updateprivateendpointpricing.ts b/src/models/operations/updateprivateendpointpricing.ts new file mode 100644 index 000000000..61681e8c2 --- /dev/null +++ b/src/models/operations/updateprivateendpointpricing.ts @@ -0,0 +1,96 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 412bca3c778f + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; +import * as models from "../index.js"; + +export type UpdatePrivateEndpointPricingGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +export type UpdatePrivateEndpointPricingRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; + /** + * Stable identifier of the private endpoint. + */ + id: string; + updatePrivateEndpointPricingRequest: + models.UpdatePrivateEndpointPricingRequest; +}; + +/** @internal */ +export type UpdatePrivateEndpointPricingRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + id: string; + UpdatePrivateEndpointPricingRequest: + models.UpdatePrivateEndpointPricingRequest$Outbound; +}; + +/** @internal */ +export const UpdatePrivateEndpointPricingRequest$outboundSchema: z.ZodType< + UpdatePrivateEndpointPricingRequest$Outbound, + UpdatePrivateEndpointPricingRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + id: z.string(), + updatePrivateEndpointPricingRequest: + models.UpdatePrivateEndpointPricingRequest$outboundSchema, +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + updatePrivateEndpointPricingRequest: "UpdatePrivateEndpointPricingRequest", + }); +}); + +export function updatePrivateEndpointPricingRequestToJSON( + updatePrivateEndpointPricingRequest: UpdatePrivateEndpointPricingRequest, +): string { + return JSON.stringify( + UpdatePrivateEndpointPricingRequest$outboundSchema.parse( + updatePrivateEndpointPricingRequest, + ), + ); +} diff --git a/src/models/operations/validateprivateendpoint.ts b/src/models/operations/validateprivateendpoint.ts new file mode 100644 index 000000000..70c510f4f --- /dev/null +++ b/src/models/operations/validateprivateendpoint.ts @@ -0,0 +1,95 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 7b1a6ff8bf8d + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; +import * as models from "../index.js"; + +export type ValidatePrivateEndpointGlobals = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; +}; + +export type ValidatePrivateEndpointRequest = { + /** + * The app identifier should be your app's URL and is used as the primary identifier for rankings. + * + * @remarks + * This is used to track API usage per application. + */ + httpReferer?: string | undefined; + /** + * The app display name allows you to customize how your app appears in OpenRouter's dashboard. + * + * @remarks + */ + appTitle?: string | undefined; + /** + * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. + * + * @remarks + */ + appCategories?: string | undefined; + /** + * Stable identifier of the private endpoint. + */ + id: string; + validatePrivateEndpointRequest: models.ValidatePrivateEndpointRequest; +}; + +/** @internal */ +export type ValidatePrivateEndpointRequest$Outbound = { + "HTTP-Referer"?: string | undefined; + appTitle?: string | undefined; + appCategories?: string | undefined; + id: string; + ValidatePrivateEndpointRequest: + models.ValidatePrivateEndpointRequest$Outbound; +}; + +/** @internal */ +export const ValidatePrivateEndpointRequest$outboundSchema: z.ZodType< + ValidatePrivateEndpointRequest$Outbound, + ValidatePrivateEndpointRequest +> = z.object({ + httpReferer: z.string().optional(), + appTitle: z.string().optional(), + appCategories: z.string().optional(), + id: z.string(), + validatePrivateEndpointRequest: + models.ValidatePrivateEndpointRequest$outboundSchema, +}).transform((v) => { + return remap$(v, { + httpReferer: "HTTP-Referer", + validatePrivateEndpointRequest: "ValidatePrivateEndpointRequest", + }); +}); + +export function validatePrivateEndpointRequestToJSON( + validatePrivateEndpointRequest: ValidatePrivateEndpointRequest, +): string { + return JSON.stringify( + ValidatePrivateEndpointRequest$outboundSchema.parse( + validatePrivateEndpointRequest, + ), + ); +} diff --git a/src/models/privateendpoint.ts b/src/models/privateendpoint.ts new file mode 100644 index 000000000..436826c72 --- /dev/null +++ b/src/models/privateendpoint.ts @@ -0,0 +1,114 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: facf19d1d363 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + PrivateEndpointDeclaredRegion, + PrivateEndpointDeclaredRegion$inboundSchema, +} from "./privateendpointdeclaredregion.js"; +import { + PrivateEndpointPricing, + PrivateEndpointPricing$inboundSchema, +} from "./privateendpointpricing.js"; +import { + PrivateEndpointStatus, + PrivateEndpointStatus$inboundSchema, +} from "./privateendpointstatus.js"; + +export type PrivateEndpoint = { + /** + * HTTPS base URL of your deployment, or `null` for providers whose URL is derived from the BYOK credential (Azure, Amazon Bedrock, Google Vertex). + */ + baseUrl: string | null; + /** + * Where you attest this deployment processes data. `global` means not regional; `null` means undeclared. + */ + declaredRegion: PrivateEndpointDeclaredRegion | null; + /** + * Whether you attest this deployment retains no prompt or completion data. `null` means undeclared. + */ + declaredZdr: boolean | null; + /** + * Stable identifier of the private endpoint. + */ + id: string; + /** + * Display name of the model, or `null` when the model is no longer listed. + */ + modelName: string | null; + /** + * Permanent slug of the model this endpoint serves. + */ + modelPermaslug: string; + /** + * Public model slug, or `null` when the model is no longer listed. + */ + modelSlug: string | null; + /** + * Negotiated per-token rates reported for requests routed to this endpoint. + */ + pricing: PrivateEndpointPricing; + /** + * Display name of the upstream provider. + */ + providerName: string; + /** + * Slug of the upstream provider, or `null` when the provider is no longer listed. + */ + providerSlug: string | null; + /** + * Lifecycle state. `draft` endpoints are not routable until validated and activated; `disabled` endpoints are activated but temporarily not routable. + */ + status: PrivateEndpointStatus; + /** + * Model or deployment identifier sent to the upstream provider. + */ + upstreamModelId: string; +}; + +/** @internal */ +export const PrivateEndpoint$inboundSchema: z.ZodType< + PrivateEndpoint, + unknown +> = z.object({ + base_url: z.nullable(z.string()), + declared_region: z.nullable(PrivateEndpointDeclaredRegion$inboundSchema), + declared_zdr: z.nullable(z.boolean()), + id: z.string(), + model_name: z.nullable(z.string()), + model_permaslug: z.string(), + model_slug: z.nullable(z.string()), + pricing: PrivateEndpointPricing$inboundSchema, + provider_name: z.string(), + provider_slug: z.nullable(z.string()), + status: PrivateEndpointStatus$inboundSchema, + upstream_model_id: z.string(), +}).transform((v) => { + return remap$(v, { + "base_url": "baseUrl", + "declared_region": "declaredRegion", + "declared_zdr": "declaredZdr", + "model_name": "modelName", + "model_permaslug": "modelPermaslug", + "model_slug": "modelSlug", + "provider_name": "providerName", + "provider_slug": "providerSlug", + "upstream_model_id": "upstreamModelId", + }); +}); + +export function privateEndpointFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PrivateEndpoint$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PrivateEndpoint' from JSON`, + ); +} diff --git a/src/models/privateendpointactivation.ts b/src/models/privateendpointactivation.ts new file mode 100644 index 000000000..d65964fe9 --- /dev/null +++ b/src/models/privateendpointactivation.ts @@ -0,0 +1,42 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 1cd601dfa05c + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; + +/** + * Validate and activate in the same call. On a failed validation the draft is kept and returned with a 422, so fix it and call `/validate` and `/activate` instead of creating it again. + */ +export type PrivateEndpointActivation = { + /** + * Workspace whose BYOK credential is used for the live validation call. The workspace must belong to your account. + */ + workspaceId: string; +}; + +/** @internal */ +export type PrivateEndpointActivation$Outbound = { + workspace_id: string; +}; + +/** @internal */ +export const PrivateEndpointActivation$outboundSchema: z.ZodType< + PrivateEndpointActivation$Outbound, + PrivateEndpointActivation +> = z.object({ + workspaceId: z.string(), +}).transform((v) => { + return remap$(v, { + workspaceId: "workspace_id", + }); +}); + +export function privateEndpointActivationToJSON( + privateEndpointActivation: PrivateEndpointActivation, +): string { + return JSON.stringify( + PrivateEndpointActivation$outboundSchema.parse(privateEndpointActivation), + ); +} diff --git a/src/models/privateendpointcheck.ts b/src/models/privateendpointcheck.ts new file mode 100644 index 000000000..a6d8a2ce0 --- /dev/null +++ b/src/models/privateendpointcheck.ts @@ -0,0 +1,67 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 680e5562177c + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + PrivateEndpointCheckReason, + PrivateEndpointCheckReason$inboundSchema, +} from "./privateendpointcheckreason.js"; + +export type PrivateEndpointCheck = { + /** + * Model the upstream reported serving, when it differs from the request. + */ + actualModel?: string | null | undefined; + /** + * Check name. + */ + name: string; + passed: boolean; + /** + * Why the check failed. + */ + reason?: PrivateEndpointCheckReason | undefined; + /** + * Error message returned by your deployment when the call failed. + */ + upstreamMessage?: string | null | undefined; + /** + * HTTP status returned by your deployment when the call failed. + */ + upstreamStatus?: number | undefined; +}; + +/** @internal */ +export const PrivateEndpointCheck$inboundSchema: z.ZodType< + PrivateEndpointCheck, + unknown +> = z.object({ + actual_model: z.nullable(z.string()).optional(), + name: z.string(), + passed: z.boolean(), + reason: PrivateEndpointCheckReason$inboundSchema.optional(), + upstream_message: z.nullable(z.string()).optional(), + upstream_status: z.int().optional(), +}).transform((v) => { + return remap$(v, { + "actual_model": "actualModel", + "upstream_message": "upstreamMessage", + "upstream_status": "upstreamStatus", + }); +}); + +export function privateEndpointCheckFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PrivateEndpointCheck$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PrivateEndpointCheck' from JSON`, + ); +} diff --git a/src/models/privateendpointcheckreason.ts b/src/models/privateendpointcheckreason.ts new file mode 100644 index 000000000..b01a8ad4f --- /dev/null +++ b/src/models/privateendpointcheckreason.ts @@ -0,0 +1,42 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 5d4379eaa453 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +/** + * Why the check failed. + */ +export const PrivateEndpointCheckReason = { + DatabaseError: "database_error", + EndpointLimitReached: "endpoint_limit_reached", + InvalidBaseUrl: "invalid_base_url", + ModelNotFound: "model_not_found", + ProviderNotFound: "provider_not_found", + EndpointNotFound: "endpoint_not_found", + WorkspaceNotFound: "workspace_not_found", + NoBYOKKey: "no_byok_key", + KeyDecryptionFailed: "key_decryption_failed", + UpstreamError: "upstream_error", + InvalidResponse: "invalid_response", + InvalidStream: "invalid_stream", + MissingUsage: "missing_usage", + ModelMismatch: "model_mismatch", + NotValidated: "not_validated", + ValidationStale: "validation_stale", +} as const; +/** + * Why the check failed. + */ +export type PrivateEndpointCheckReason = OpenEnum< + typeof PrivateEndpointCheckReason +>; + +/** @internal */ +export const PrivateEndpointCheckReason$inboundSchema: z.ZodType< + PrivateEndpointCheckReason, + unknown +> = openEnums.inboundSchema(PrivateEndpointCheckReason); diff --git a/src/models/privateendpointdeclaredregion.ts b/src/models/privateendpointdeclaredregion.ts new file mode 100644 index 000000000..19644f7c0 --- /dev/null +++ b/src/models/privateendpointdeclaredregion.ts @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e91a7cba073a + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +/** + * Where you attest this deployment processes data. `global` means not regional; `null` means undeclared. + */ +export const PrivateEndpointDeclaredRegion = { + Global: "global", + Europe: "europe", + Us: "us", +} as const; +/** + * Where you attest this deployment processes data. `global` means not regional; `null` means undeclared. + */ +export type PrivateEndpointDeclaredRegion = OpenEnum< + typeof PrivateEndpointDeclaredRegion +>; + +/** @internal */ +export const PrivateEndpointDeclaredRegion$inboundSchema: z.ZodType< + PrivateEndpointDeclaredRegion, + unknown +> = openEnums.inboundSchema(PrivateEndpointDeclaredRegion); diff --git a/src/models/privateendpointpricing.ts b/src/models/privateendpointpricing.ts new file mode 100644 index 000000000..d02dc4747 --- /dev/null +++ b/src/models/privateendpointpricing.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c780fa3f1dc9 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +/** + * Negotiated per-token rates reported for requests routed to this endpoint. + */ +export type PrivateEndpointPricing = { + /** + * USD per completion token, as a decimal string. + */ + completion: string; + /** + * USD per prompt token, as a decimal string. + */ + prompt: string; +}; + +/** @internal */ +export const PrivateEndpointPricing$inboundSchema: z.ZodType< + PrivateEndpointPricing, + unknown +> = z.object({ + completion: z.string(), + prompt: z.string(), +}); +/** @internal */ +export type PrivateEndpointPricing$Outbound = { + completion: string; + prompt: string; +}; + +/** @internal */ +export const PrivateEndpointPricing$outboundSchema: z.ZodType< + PrivateEndpointPricing$Outbound, + PrivateEndpointPricing +> = z.object({ + completion: z.string(), + prompt: z.string(), +}); + +export function privateEndpointPricingToJSON( + privateEndpointPricing: PrivateEndpointPricing, +): string { + return JSON.stringify( + PrivateEndpointPricing$outboundSchema.parse(privateEndpointPricing), + ); +} +export function privateEndpointPricingFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PrivateEndpointPricing$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PrivateEndpointPricing' from JSON`, + ); +} diff --git a/src/models/privateendpointresponse.ts b/src/models/privateendpointresponse.ts new file mode 100644 index 000000000..d8bf6c3a7 --- /dev/null +++ b/src/models/privateendpointresponse.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 852b6135ff3d + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + PrivateEndpoint, + PrivateEndpoint$inboundSchema, +} from "./privateendpoint.js"; + +export type PrivateEndpointResponse = { + data: PrivateEndpoint; +}; + +/** @internal */ +export const PrivateEndpointResponse$inboundSchema: z.ZodType< + PrivateEndpointResponse, + unknown +> = z.object({ + data: PrivateEndpoint$inboundSchema, +}); + +export function privateEndpointResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PrivateEndpointResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PrivateEndpointResponse' from JSON`, + ); +} diff --git a/src/models/privateendpointstatus.ts b/src/models/privateendpointstatus.ts new file mode 100644 index 000000000..e1907c3a2 --- /dev/null +++ b/src/models/privateendpointstatus.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d539deb2b851 + */ + +import * as z from "zod/v4"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +/** + * Lifecycle state. `draft` endpoints are not routable until validated and activated; `disabled` endpoints are activated but temporarily not routable. + */ +export const PrivateEndpointStatus = { + Draft: "draft", + Active: "active", + Disabled: "disabled", +} as const; +/** + * Lifecycle state. `draft` endpoints are not routable until validated and activated; `disabled` endpoints are activated but temporarily not routable. + */ +export type PrivateEndpointStatus = OpenEnum; + +/** @internal */ +export const PrivateEndpointStatus$inboundSchema: z.ZodType< + PrivateEndpointStatus, + unknown +> = openEnums.inboundSchema(PrivateEndpointStatus); diff --git a/src/models/privateendpointsummary.ts b/src/models/privateendpointsummary.ts new file mode 100644 index 000000000..5bc7b9dcb --- /dev/null +++ b/src/models/privateendpointsummary.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8f13349c68fa + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + PrivateEndpointStatus, + PrivateEndpointStatus$inboundSchema, +} from "./privateendpointstatus.js"; + +export type PrivateEndpointSummary = { + /** + * ISO timestamp of when the endpoint was created. + */ + createdAt: string; + /** + * Stable identifier of the private endpoint. + */ + id: string; + /** + * Display name of the model, or `null` when the model is no longer listed. + */ + modelName: string | null; + /** + * Permanent slug of the model this endpoint serves. + */ + modelPermaslug: string; + /** + * Public model slug, or `null` when the model is no longer listed. + */ + modelSlug: string | null; + /** + * Display name of the upstream provider. + */ + providerName: string; + /** + * Lifecycle state. `draft` endpoints are not routable until validated and activated; `disabled` endpoints are activated but temporarily not routable. + */ + status: PrivateEndpointStatus; +}; + +/** @internal */ +export const PrivateEndpointSummary$inboundSchema: z.ZodType< + PrivateEndpointSummary, + unknown +> = z.object({ + created_at: z.string(), + id: z.string(), + model_name: z.nullable(z.string()), + model_permaslug: z.string(), + model_slug: z.nullable(z.string()), + provider_name: z.string(), + status: PrivateEndpointStatus$inboundSchema, +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "model_name": "modelName", + "model_permaslug": "modelPermaslug", + "model_slug": "modelSlug", + "provider_name": "providerName", + }); +}); + +export function privateEndpointSummaryFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PrivateEndpointSummary$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PrivateEndpointSummary' from JSON`, + ); +} diff --git a/src/models/privateendpointvalidation.ts b/src/models/privateendpointvalidation.ts new file mode 100644 index 000000000..23d5992f5 --- /dev/null +++ b/src/models/privateendpointvalidation.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c29e1f33143e + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + PrivateEndpointCheck, + PrivateEndpointCheck$inboundSchema, +} from "./privateendpointcheck.js"; + +export type PrivateEndpointValidation = { + checks: Array; + /** + * Whether every check passed. + */ + passed: boolean; +}; + +/** @internal */ +export const PrivateEndpointValidation$inboundSchema: z.ZodType< + PrivateEndpointValidation, + unknown +> = z.object({ + checks: z.array(PrivateEndpointCheck$inboundSchema), + passed: z.boolean(), +}); + +export function privateEndpointValidationFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PrivateEndpointValidation$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PrivateEndpointValidation' from JSON`, + ); +} diff --git a/src/models/privateendpointvalidationnullable.ts b/src/models/privateendpointvalidationnullable.ts new file mode 100644 index 000000000..2ea8fa8b1 --- /dev/null +++ b/src/models/privateendpointvalidationnullable.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: cf4aae30836f + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + PrivateEndpointCheck, + PrivateEndpointCheck$inboundSchema, +} from "./privateendpointcheck.js"; + +export type PrivateEndpointValidationNullable = { + checks: Array; + /** + * Whether every check passed. + */ + passed: boolean; +}; + +/** @internal */ +export const PrivateEndpointValidationNullable$inboundSchema: z.ZodType< + PrivateEndpointValidationNullable, + unknown +> = z.object({ + checks: z.array(PrivateEndpointCheck$inboundSchema), + passed: z.boolean(), +}); + +export function privateEndpointValidationNullableFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PrivateEndpointValidationNullable$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PrivateEndpointValidationNullable' from JSON`, + ); +} diff --git a/src/models/privateendpointvalidationresponse.ts b/src/models/privateendpointvalidationresponse.ts new file mode 100644 index 000000000..31d1f4b97 --- /dev/null +++ b/src/models/privateendpointvalidationresponse.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: a3a95aa177a5 + */ + +import * as z from "zod/v4"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { + PrivateEndpointValidation, + PrivateEndpointValidation$inboundSchema, +} from "./privateendpointvalidation.js"; + +export type PrivateEndpointValidationResponse = { + data: PrivateEndpointValidation; +}; + +/** @internal */ +export const PrivateEndpointValidationResponse$inboundSchema: z.ZodType< + PrivateEndpointValidationResponse, + unknown +> = z.object({ + data: PrivateEndpointValidation$inboundSchema, +}); + +export function privateEndpointValidationResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PrivateEndpointValidationResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PrivateEndpointValidationResponse' from JSON`, + ); +} diff --git a/src/models/updateprivateendpointpricingrequest.ts b/src/models/updateprivateendpointpricingrequest.ts new file mode 100644 index 000000000..f80838e49 --- /dev/null +++ b/src/models/updateprivateendpointpricingrequest.ts @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: af98cc8bf348 + */ + +import * as z from "zod/v4"; +import { + PrivateEndpointPricing, + PrivateEndpointPricing$Outbound, + PrivateEndpointPricing$outboundSchema, +} from "./privateendpointpricing.js"; + +export type UpdatePrivateEndpointPricingRequest = { + /** + * Negotiated per-token rates reported for requests routed to this endpoint. + */ + pricing: PrivateEndpointPricing; +}; + +/** @internal */ +export type UpdatePrivateEndpointPricingRequest$Outbound = { + pricing: PrivateEndpointPricing$Outbound; +}; + +/** @internal */ +export const UpdatePrivateEndpointPricingRequest$outboundSchema: z.ZodType< + UpdatePrivateEndpointPricingRequest$Outbound, + UpdatePrivateEndpointPricingRequest +> = z.object({ + pricing: PrivateEndpointPricing$outboundSchema, +}); + +export function updatePrivateEndpointPricingRequestToJSON( + updatePrivateEndpointPricingRequest: UpdatePrivateEndpointPricingRequest, +): string { + return JSON.stringify( + UpdatePrivateEndpointPricingRequest$outboundSchema.parse( + updatePrivateEndpointPricingRequest, + ), + ); +} diff --git a/src/models/updateprivateendpointrequest.ts b/src/models/updateprivateendpointrequest.ts new file mode 100644 index 000000000..e4dc175c2 --- /dev/null +++ b/src/models/updateprivateendpointrequest.ts @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 998472d2d99c + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import * as openEnums from "../types/enums.js"; +import { OpenEnum } from "../types/enums.js"; + +/** + * Attest where this deployment processes data. + */ +export const UpdatePrivateEndpointRequestDeclaredRegion = { + Global: "global", + Europe: "europe", + Us: "us", +} as const; +/** + * Attest where this deployment processes data. + */ +export type UpdatePrivateEndpointRequestDeclaredRegion = OpenEnum< + typeof UpdatePrivateEndpointRequestDeclaredRegion +>; + +export type UpdatePrivateEndpointRequest = { + /** + * HTTPS base URL of your deployment. Required unless the provider derives its URL from the BYOK credential (Azure, Amazon Bedrock, Google Vertex). + */ + baseUrl?: string | undefined; + /** + * Attest where this deployment processes data. + */ + declaredRegion?: + | UpdatePrivateEndpointRequestDeclaredRegion + | null + | undefined; + /** + * Attest that this deployment retains no prompt or completion data. + */ + declaredZdr?: boolean | null | undefined; + /** + * Model or deployment identifier sent to the upstream provider. + */ + upstreamModelId: string; +}; + +/** @internal */ +export const UpdatePrivateEndpointRequestDeclaredRegion$outboundSchema: + z.ZodType = openEnums + .outboundSchema(UpdatePrivateEndpointRequestDeclaredRegion); + +/** @internal */ +export type UpdatePrivateEndpointRequest$Outbound = { + base_url?: string | undefined; + declared_region?: string | null | undefined; + declared_zdr?: boolean | null | undefined; + upstream_model_id: string; +}; + +/** @internal */ +export const UpdatePrivateEndpointRequest$outboundSchema: z.ZodType< + UpdatePrivateEndpointRequest$Outbound, + UpdatePrivateEndpointRequest +> = z.object({ + baseUrl: z.string().optional(), + declaredRegion: z.nullable( + UpdatePrivateEndpointRequestDeclaredRegion$outboundSchema, + ).optional(), + declaredZdr: z.nullable(z.boolean()).optional(), + upstreamModelId: z.string(), +}).transform((v) => { + return remap$(v, { + baseUrl: "base_url", + declaredRegion: "declared_region", + declaredZdr: "declared_zdr", + upstreamModelId: "upstream_model_id", + }); +}); + +export function updatePrivateEndpointRequestToJSON( + updatePrivateEndpointRequest: UpdatePrivateEndpointRequest, +): string { + return JSON.stringify( + UpdatePrivateEndpointRequest$outboundSchema.parse( + updatePrivateEndpointRequest, + ), + ); +} diff --git a/src/models/validateprivateendpointrequest.ts b/src/models/validateprivateendpointrequest.ts new file mode 100644 index 000000000..ebf610c9e --- /dev/null +++ b/src/models/validateprivateendpointrequest.ts @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f7909806f4e1 + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; + +export type ValidatePrivateEndpointRequest = { + /** + * Workspace whose BYOK credential is used for the live validation call. The workspace must belong to your account. + */ + workspaceId: string; +}; + +/** @internal */ +export type ValidatePrivateEndpointRequest$Outbound = { + workspace_id: string; +}; + +/** @internal */ +export const ValidatePrivateEndpointRequest$outboundSchema: z.ZodType< + ValidatePrivateEndpointRequest$Outbound, + ValidatePrivateEndpointRequest +> = z.object({ + workspaceId: z.string(), +}).transform((v) => { + return remap$(v, { + workspaceId: "workspace_id", + }); +}); + +export function validatePrivateEndpointRequestToJSON( + validatePrivateEndpointRequest: ValidatePrivateEndpointRequest, +): string { + return JSON.stringify( + ValidatePrivateEndpointRequest$outboundSchema.parse( + validatePrivateEndpointRequest, + ), + ); +} diff --git a/src/sdk/privateendpoints.ts b/src/sdk/privateendpoints.ts new file mode 100644 index 000000000..2a55996be --- /dev/null +++ b/src/sdk/privateendpoints.ts @@ -0,0 +1,191 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: ed31ec182fa7 + */ + +import { privateEndpointsActivate } from "../funcs/privateEndpointsActivate.js"; +import { privateEndpointsCreate } from "../funcs/privateEndpointsCreate.js"; +import { privateEndpointsDelete } from "../funcs/privateEndpointsDelete.js"; +import { privateEndpointsDisable } from "../funcs/privateEndpointsDisable.js"; +import { privateEndpointsEnable } from "../funcs/privateEndpointsEnable.js"; +import { privateEndpointsGet } from "../funcs/privateEndpointsGet.js"; +import { privateEndpointsList } from "../funcs/privateEndpointsList.js"; +import { privateEndpointsUpdate } from "../funcs/privateEndpointsUpdate.js"; +import { privateEndpointsUpdatePricing } from "../funcs/privateEndpointsUpdatePricing.js"; +import { privateEndpointsValidate } from "../funcs/privateEndpointsValidate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class PrivateEndpoints extends ClientSDK { + /** + * List private endpoints + * + * @remarks + * List the organization's private endpoints, including drafts. Requires the private endpoints entitlement. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ + async list( + request?: operations.ListPrivateEndpointsRequest | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(privateEndpointsList( + this, + request, + options, + )); + } + + /** + * Create a private endpoint + * + * @remarks + * Create a private endpoint as a draft. Drafts are not routable: validate one with `POST /private-endpoints/{id}/validate`, then activate it with `POST /private-endpoints/{id}/activate`. Pass `activate` to do all three in one call; if validation fails the draft is kept and returned with the failed checks. Send an `Idempotency-Key` header to make retries safe: a repeated key with the same request returns the endpoint the first request created; reusing it with different fields returns 422 `idempotency_key_reused`. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ + async create( + request: operations.CreatePrivateEndpointRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(privateEndpointsCreate( + this, + request, + options, + )); + } + + /** + * Delete a private endpoint + * + * @remarks + * Delete a private endpoint and stop routing to it. Pass `draft_only=true` to refuse (409) when the endpoint has been activated. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ + async delete( + request: operations.DeletePrivateEndpointRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(privateEndpointsDelete( + this, + request, + options, + )); + } + + /** + * Get a private endpoint + * + * @remarks + * Get one private endpoint with its upstream configuration and current pricing. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ + async get( + request: operations.GetPrivateEndpointRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(privateEndpointsGet( + this, + request, + options, + )); + } + + /** + * Update a draft private endpoint + * + * @remarks + * Replace a draft endpoint's upstream configuration: send `upstream_model_id`, and `base_url` to change it (an omitted `base_url` keeps the stored one). Omitted data-policy declarations are kept while the upstream is unchanged and cleared when it changes. Any change clears earlier validation. Active endpoints return 409; delete and re-create them instead. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ + async update( + request: operations.UpdatePrivateEndpointRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(privateEndpointsUpdate( + this, + request, + options, + )); + } + + /** + * Activate a validated private endpoint + * + * @remarks + * Make a validated draft routable. Returns 409 when the endpoint was never validated, the validation is stale, or it is already active. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ + async activate( + request: operations.ActivatePrivateEndpointRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(privateEndpointsActivate( + this, + request, + options, + )); + } + + /** + * Disable a private endpoint + * + * @remarks + * Stop routing to an active endpoint without deleting it. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ + async disable( + request: operations.DisablePrivateEndpointRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(privateEndpointsDisable( + this, + request, + options, + )); + } + + /** + * Enable a private endpoint + * + * @remarks + * Resume routing to a disabled endpoint. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ + async enable( + request: operations.EnablePrivateEndpointRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(privateEndpointsEnable( + this, + request, + options, + )); + } + + /** + * Set private endpoint pricing + * + * @remarks + * Set the negotiated per-token rates reported for requests routed to this endpoint. Applies to drafts and active endpoints; new rates take effect for subsequent requests. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ + async updatePricing( + request: operations.UpdatePrivateEndpointPricingRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(privateEndpointsUpdatePricing( + this, + request, + options, + )); + } + + /** + * Validate a draft private endpoint + * + * @remarks + * Send a live test request to the draft endpoint using the given workspace's BYOK credential for its provider. A passing validation is required before activation. Failed checks return 200 with `passed: false`. [Management key](/docs/guides/overview/auth/management-api-keys) required. + */ + async validate( + request: operations.ValidatePrivateEndpointRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(privateEndpointsValidate( + this, + request, + options, + )); + } +} diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index b83fbcaad..d5726986f 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -28,6 +28,7 @@ import { OAuth } from "./oauth.js"; import { Observability } from "./observability.js"; import { Organization } from "./organization.js"; import { Presets } from "./presets.js"; +import { PrivateEndpoints } from "./privateendpoints.js"; import { Providers } from "./providers.js"; import { Rerank } from "./rerank.js"; import { Responses } from "./responses.js"; @@ -177,6 +178,11 @@ export class OpenRouter extends ClientSDK { return (this._presets ??= new Presets(this._options)); } + private _privateEndpoints?: PrivateEndpoints; + get privateEndpoints(): PrivateEndpoints { + return (this._privateEndpoints ??= new PrivateEndpoints(this._options)); + } + private _providers?: Providers; get providers(): Providers { return (this._providers ??= new Providers(this._options)); From ec3b481cab688dadddf5e0c707c18b8c8eb93515 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Mon, 28 Sep 2026 22:14:26 +0000 Subject: [PATCH 2/3] empty commit to trigger [run-tests] workflow From 824801e19f7b73fb9cf603382f2bc6a827555b35 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 28 Sep 2026 22:14:43 +0000 Subject: [PATCH 3/3] Chore: regenerate docs navigation Auto-generated-by: update-generated-files-action; https://github.com/OpenRouterTeam/typescript-sdk/actions/runs/36491194860 --- docs/docs.json | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docs.json b/docs/docs.json index 50902456e..c118c6487 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -34,6 +34,7 @@ "sdks/observability/README", "sdks/organization/README", "sdks/presets/README", + "sdks/privateendpoints/README", "sdks/providers/README", "sdks/rerank/README", "sdks/responses/README",