@openrouter/sdk 1.3.36 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/esm/funcs/internsCreateIntern.d.ts +1 -1
  2. package/esm/funcs/internsCreateIntern.js +1 -1
  3. package/esm/funcs/internsDeleteIntern.d.ts +1 -1
  4. package/esm/funcs/internsDeleteIntern.js +1 -1
  5. package/esm/funcs/internsGetIntern.d.ts +1 -1
  6. package/esm/funcs/internsGetIntern.js +1 -1
  7. package/esm/funcs/internsGetInternDaemon.d.ts +1 -1
  8. package/esm/funcs/internsGetInternDaemon.js +1 -1
  9. package/esm/funcs/internsGetInternDaemonAccess.d.ts +1 -1
  10. package/esm/funcs/internsGetInternDaemonAccess.js +1 -1
  11. package/esm/funcs/internsListInterns.d.ts +1 -1
  12. package/esm/funcs/internsListInterns.js +1 -1
  13. package/esm/funcs/internsProvisionIntern.d.ts +1 -1
  14. package/esm/funcs/internsProvisionIntern.js +1 -1
  15. package/esm/funcs/internsSuspendIntern.d.ts +1 -1
  16. package/esm/funcs/internsSuspendIntern.js +1 -1
  17. package/esm/funcs/internsUpdateIntern.d.ts +1 -1
  18. package/esm/funcs/internsUpdateIntern.js +1 -1
  19. package/esm/funcs/privateEndpointsActivate.d.ts +19 -0
  20. package/esm/funcs/privateEndpointsActivate.js +103 -0
  21. package/esm/funcs/privateEndpointsCreate.d.ts +19 -0
  22. package/esm/funcs/privateEndpointsCreate.js +101 -0
  23. package/esm/funcs/privateEndpointsDelete.d.ts +19 -0
  24. package/esm/funcs/privateEndpointsDelete.js +107 -0
  25. package/esm/funcs/privateEndpointsDisable.d.ts +19 -0
  26. package/esm/funcs/privateEndpointsDisable.js +103 -0
  27. package/esm/funcs/privateEndpointsEnable.d.ts +19 -0
  28. package/esm/funcs/privateEndpointsEnable.js +103 -0
  29. package/esm/funcs/privateEndpointsGet.d.ts +19 -0
  30. package/esm/funcs/privateEndpointsGet.js +103 -0
  31. package/esm/funcs/privateEndpointsList.d.ts +19 -0
  32. package/esm/funcs/privateEndpointsList.js +97 -0
  33. package/esm/funcs/privateEndpointsUpdate.d.ts +19 -0
  34. package/esm/funcs/privateEndpointsUpdate.js +106 -0
  35. package/esm/funcs/privateEndpointsUpdatePricing.d.ts +19 -0
  36. package/esm/funcs/privateEndpointsUpdatePricing.js +106 -0
  37. package/esm/funcs/privateEndpointsValidate.d.ts +19 -0
  38. package/esm/funcs/privateEndpointsValidate.js +106 -0
  39. package/esm/funcs/vaultCopyVaultSecretsToIntern.d.ts +1 -1
  40. package/esm/funcs/vaultCopyVaultSecretsToIntern.js +1 -1
  41. package/esm/funcs/vaultDeleteInternVaultSecret.d.ts +1 -1
  42. package/esm/funcs/vaultDeleteInternVaultSecret.js +1 -1
  43. package/esm/funcs/vaultDeleteVaultSecret.d.ts +1 -1
  44. package/esm/funcs/vaultDeleteVaultSecret.js +1 -1
  45. package/esm/funcs/vaultListInternEffectiveVaultSecrets.d.ts +21 -0
  46. package/esm/funcs/vaultListInternEffectiveVaultSecrets.js +110 -0
  47. package/esm/funcs/vaultListInternVaultSecrets.d.ts +1 -1
  48. package/esm/funcs/vaultListInternVaultSecrets.js +1 -1
  49. package/esm/funcs/vaultListVaultSecrets.d.ts +1 -1
  50. package/esm/funcs/vaultListVaultSecrets.js +1 -1
  51. package/esm/funcs/vaultStoreInternVaultSecret.d.ts +1 -1
  52. package/esm/funcs/vaultStoreInternVaultSecret.js +1 -1
  53. package/esm/funcs/vaultStoreVaultSecret.d.ts +1 -1
  54. package/esm/funcs/vaultStoreVaultSecret.js +1 -1
  55. package/esm/lib/config.d.ts +2 -2
  56. package/esm/lib/config.js +2 -2
  57. package/esm/models/createprivateendpointrequest.d.ts +67 -0
  58. package/esm/models/createprivateendpointrequest.js +44 -0
  59. package/esm/models/createprivateendpointvalidationfailedresponseerror.d.ts +20 -0
  60. package/esm/models/createprivateendpointvalidationfailedresponseerror.js +27 -0
  61. package/esm/models/deleteprivateendpointresponse.d.ts +19 -0
  62. package/esm/models/deleteprivateendpointresponse.js +21 -0
  63. package/esm/models/errors/createprivateendpoint.d.ts +45 -0
  64. package/esm/models/errors/createprivateendpoint.js +53 -0
  65. package/esm/models/errors/createprivateendpointvalidationfailedresponseerror.d.ts +21 -0
  66. package/esm/models/errors/createprivateendpointvalidationfailedresponseerror.js +35 -0
  67. package/esm/models/errors/index.d.ts +2 -0
  68. package/esm/models/errors/index.js +2 -0
  69. package/esm/models/index.d.ts +23 -0
  70. package/esm/models/index.js +23 -0
  71. package/esm/models/listprivateendpointsresponse.d.ts +11 -0
  72. package/esm/models/listprivateendpointsresponse.js +15 -0
  73. package/esm/models/managedprivateendpoint.d.ts +47 -0
  74. package/esm/models/managedprivateendpoint.js +35 -0
  75. package/esm/models/managedprivateendpointresponse.d.ts +11 -0
  76. package/esm/models/managedprivateendpointresponse.js +15 -0
  77. package/esm/models/operations/activateprivateendpoint.d.ts +58 -0
  78. package/esm/models/operations/activateprivateendpoint.js +21 -0
  79. package/esm/models/operations/createprivateendpoint.d.ts +61 -0
  80. package/esm/models/operations/createprivateendpoint.js +25 -0
  81. package/esm/models/operations/deleteprivateendpoint.d.ts +77 -0
  82. package/esm/models/operations/deleteprivateendpoint.js +34 -0
  83. package/esm/models/operations/disableprivateendpoint.d.ts +58 -0
  84. package/esm/models/operations/disableprivateendpoint.js +21 -0
  85. package/esm/models/operations/enableprivateendpoint.d.ts +58 -0
  86. package/esm/models/operations/enableprivateendpoint.js +21 -0
  87. package/esm/models/operations/getprivateendpoint.d.ts +58 -0
  88. package/esm/models/operations/getprivateendpoint.js +21 -0
  89. package/esm/models/operations/index.d.ts +11 -0
  90. package/esm/models/operations/index.js +11 -0
  91. package/esm/models/operations/listinterneffectivevaultsecrets.d.ts +68 -0
  92. package/esm/models/operations/listinterneffectivevaultsecrets.js +23 -0
  93. package/esm/models/operations/listprivateendpoints.d.ts +53 -0
  94. package/esm/models/operations/listprivateendpoints.js +20 -0
  95. package/esm/models/operations/updateprivateendpoint.d.ts +61 -0
  96. package/esm/models/operations/updateprivateendpoint.js +24 -0
  97. package/esm/models/operations/updateprivateendpointpricing.d.ts +61 -0
  98. package/esm/models/operations/updateprivateendpointpricing.js +24 -0
  99. package/esm/models/operations/validateprivateendpoint.d.ts +61 -0
  100. package/esm/models/operations/validateprivateendpoint.js +24 -0
  101. package/esm/models/privateendpoint.d.ts +60 -0
  102. package/esm/models/privateendpoint.js +41 -0
  103. package/esm/models/privateendpointactivation.d.ts +18 -0
  104. package/esm/models/privateendpointactivation.js +18 -0
  105. package/esm/models/privateendpointcheck.d.ts +31 -0
  106. package/esm/models/privateendpointcheck.js +27 -0
  107. package/esm/models/privateendpointcheckreason.d.ts +30 -0
  108. package/esm/models/privateendpointcheckreason.js +29 -0
  109. package/esm/models/privateendpointdeclaredregion.d.ts +17 -0
  110. package/esm/models/privateendpointdeclaredregion.js +16 -0
  111. package/esm/models/privateendpointpricing.d.ts +28 -0
  112. package/esm/models/privateendpointpricing.js +23 -0
  113. package/esm/models/privateendpointresponse.d.ts +11 -0
  114. package/esm/models/privateendpointresponse.js +15 -0
  115. package/esm/models/privateendpointstatus.d.ts +17 -0
  116. package/esm/models/privateendpointstatus.js +16 -0
  117. package/esm/models/privateendpointsummary.d.ts +38 -0
  118. package/esm/models/privateendpointsummary.js +30 -0
  119. package/esm/models/privateendpointvalidation.d.ts +15 -0
  120. package/esm/models/privateendpointvalidation.js +16 -0
  121. package/esm/models/privateendpointvalidationnullable.d.ts +15 -0
  122. package/esm/models/privateendpointvalidationnullable.js +16 -0
  123. package/esm/models/privateendpointvalidationresponse.d.ts +11 -0
  124. package/esm/models/privateendpointvalidationresponse.js +15 -0
  125. package/esm/models/tokenexchangerequest.d.ts +4 -4
  126. package/esm/models/tokenexchangerequest.js +3 -3
  127. package/esm/models/updateprivateendpointpricingrequest.d.ts +16 -0
  128. package/esm/models/updateprivateendpointpricingrequest.js +14 -0
  129. package/esm/models/updateprivateendpointrequest.d.ts +45 -0
  130. package/esm/models/updateprivateendpointrequest.js +36 -0
  131. package/esm/models/validateprivateendpointrequest.d.ts +15 -0
  132. package/esm/models/validateprivateendpointrequest.js +18 -0
  133. package/esm/models/vaulteffectivesecret.d.ts +35 -0
  134. package/esm/models/vaulteffectivesecret.js +34 -0
  135. package/esm/models/vaulteffectivesecretlistresponse.d.ts +18 -0
  136. package/esm/models/vaulteffectivesecretlistresponse.js +21 -0
  137. package/esm/sdk/interns.d.ts +9 -9
  138. package/esm/sdk/interns.js +9 -9
  139. package/esm/sdk/privateendpoints.d.ts +76 -0
  140. package/esm/sdk/privateendpoints.js +109 -0
  141. package/esm/sdk/sdk.d.ts +3 -0
  142. package/esm/sdk/sdk.js +4 -0
  143. package/esm/sdk/vault.d.ts +14 -7
  144. package/esm/sdk/vault.js +17 -7
  145. package/jsr.json +1 -1
  146. package/package.json +8 -8
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Create an intern
14
14
  *
15
15
  * @remarks
16
- * Creates an intern in an explicit workspace. The operation also creates its private vault. It can start provisioning immediately or wait for a later provision call. A retry with the same idempotency key and body resumes unfinished work. The request body is capped at 1048576 bytes and a larger body is refused with 413. A non-empty body must declare `Content-Type: application/json` or it is refused with 415. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
16
+ * Creates an intern in an explicit workspace. The operation also creates its private vault. It can start provisioning immediately or wait for a later provision call. A retry with the same idempotency key and body resumes unfinished work. The request body is capped at 1048576 bytes and a larger body is refused with 413. A non-empty body must declare `Content-Type: application/json` or it is refused with 415. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
17
17
  *
18
18
  * If set, this operation will use {@link Security.apiKey} from the global security.
19
19
  */
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Create an intern
18
18
  *
19
19
  * @remarks
20
- * Creates an intern in an explicit workspace. The operation also creates its private vault. It can start provisioning immediately or wait for a later provision call. A retry with the same idempotency key and body resumes unfinished work. The request body is capped at 1048576 bytes and a larger body is refused with 413. A non-empty body must declare `Content-Type: application/json` or it is refused with 415. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
20
+ * Creates an intern in an explicit workspace. The operation also creates its private vault. It can start provisioning immediately or wait for a later provision call. A retry with the same idempotency key and body resumes unfinished work. The request body is capped at 1048576 bytes and a larger body is refused with 413. A non-empty body must declare `Content-Type: application/json` or it is refused with 415. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
21
21
  *
22
22
  * If set, this operation will use {@link Security.apiKey} from the global security.
23
23
  */
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Delete an intern
14
14
  *
15
15
  * @remarks
16
- * Starts safe teardown of the intern, its runtime and its private vault. The body is optional. Send `{"acknowledge_workspace_loss": true}` to delete a `destroy_failed` intern whose `last_failure_message` names `workspace_archive_failed`, accepting that its workspace is not backed up. The request body is capped at 1048576 bytes and a larger body is refused with 413. A non-empty body must declare `Content-Type: application/json` or it is refused with 415. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
16
+ * Starts safe teardown of the intern, its runtime and its private vault. The body is optional. Send `{"acknowledge_workspace_loss": true}` to delete a `destroy_failed` intern whose `last_failure_message` names `workspace_archive_failed`, accepting that its workspace is not backed up. The request body is capped at 1048576 bytes and a larger body is refused with 413. A non-empty body must declare `Content-Type: application/json` or it is refused with 415. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
17
17
  *
18
18
  * If set, this operation will use {@link Security.apiKey} from the global security.
19
19
  */
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Delete an intern
18
18
  *
19
19
  * @remarks
20
- * Starts safe teardown of the intern, its runtime and its private vault. The body is optional. Send `{"acknowledge_workspace_loss": true}` to delete a `destroy_failed` intern whose `last_failure_message` names `workspace_archive_failed`, accepting that its workspace is not backed up. The request body is capped at 1048576 bytes and a larger body is refused with 413. A non-empty body must declare `Content-Type: application/json` or it is refused with 415. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
20
+ * Starts safe teardown of the intern, its runtime and its private vault. The body is optional. Send `{"acknowledge_workspace_loss": true}` to delete a `destroy_failed` intern whose `last_failure_message` names `workspace_archive_failed`, accepting that its workspace is not backed up. The request body is capped at 1048576 bytes and a larger body is refused with 413. A non-empty body must declare `Content-Type: application/json` or it is refused with 415. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
21
21
  *
22
22
  * If set, this operation will use {@link Security.apiKey} from the global security.
23
23
  */
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Get an intern
14
14
  *
15
15
  * @remarks
16
- * Returns the public lifecycle state and settings for one visible intern. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
16
+ * Returns the public lifecycle state and settings for one visible intern. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
17
17
  *
18
18
  * If set, this operation will use {@link Security.apiKey} from the global security.
19
19
  */
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Get an intern
18
18
  *
19
19
  * @remarks
20
- * Returns the public lifecycle state and settings for one visible intern. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
20
+ * Returns the public lifecycle state and settings for one visible intern. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
21
21
  *
22
22
  * If set, this operation will use {@link Security.apiKey} from the global security.
23
23
  */
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Get an intern's daemon access
14
14
  *
15
15
  * @remarks
16
- * Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, and each reveal is logged by caller and intern. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
16
+ * Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, and each reveal is logged by caller and intern. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
17
17
  *
18
18
  * If set, this operation will use {@link Security.apiKey} from the global security.
19
19
  */
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Get an intern's daemon access
18
18
  *
19
19
  * @remarks
20
- * Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, and each reveal is logged by caller and intern. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
20
+ * Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, and each reveal is logged by caller and intern. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
21
21
  *
22
22
  * If set, this operation will use {@link Security.apiKey} from the global security.
23
23
  */
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Get an intern's daemon access (deprecated alias)
14
14
  *
15
15
  * @remarks
16
- * Deprecated alias of `GET /interns/{internId}/daemon` with the same request, response, and errors. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
16
+ * Deprecated alias of `GET /interns/{internId}/daemon` with the same request, response, and errors. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
17
17
  *
18
18
  * If set, this operation will use {@link Security.apiKey} from the global security.
19
19
  *
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Get an intern's daemon access (deprecated alias)
18
18
  *
19
19
  * @remarks
20
- * Deprecated alias of `GET /interns/{internId}/daemon` with the same request, response, and errors. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
20
+ * Deprecated alias of `GET /interns/{internId}/daemon` with the same request, response, and errors. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
21
21
  *
22
22
  * If set, this operation will use {@link Security.apiKey} from the global security.
23
23
  *
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * List interns
14
14
  *
15
15
  * @remarks
16
- * Lists interns visible to the authenticated key, newest first. Filter by workspace and one or more lifecycle statuses. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
16
+ * Lists interns visible to the authenticated key, newest first. Filter by workspace and one or more lifecycle statuses. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
17
17
  *
18
18
  * If set, this operation will use {@link Security.apiKey} from the global security.
19
19
  */
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * List interns
18
18
  *
19
19
  * @remarks
20
- * Lists interns visible to the authenticated key, newest first. Filter by workspace and one or more lifecycle statuses. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
20
+ * Lists interns visible to the authenticated key, newest first. Filter by workspace and one or more lifecycle statuses. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
21
21
  *
22
22
  * If set, this operation will use {@link Security.apiKey} from the global security.
23
23
  */
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Provision an intern
14
14
  *
15
15
  * @remarks
16
- * Starts the first boot, or resumes an intern after suspension. This operation takes no request body. A body carrying any field is refused with 400 rather than ignored. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
16
+ * Starts the first boot, or resumes an intern after suspension. This operation takes no request body. A body carrying any field is refused with 400 rather than ignored. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
17
17
  *
18
18
  * If set, this operation will use {@link Security.apiKey} from the global security.
19
19
  */
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Provision an intern
18
18
  *
19
19
  * @remarks
20
- * Starts the first boot, or resumes an intern after suspension. This operation takes no request body. A body carrying any field is refused with 400 rather than ignored. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
20
+ * Starts the first boot, or resumes an intern after suspension. This operation takes no request body. A body carrying any field is refused with 400 rather than ignored. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
21
21
  *
22
22
  * If set, this operation will use {@link Security.apiKey} from the global security.
23
23
  */
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Suspend an intern
14
14
  *
15
15
  * @remarks
16
- * Stops the intern runtime while keeping its disk and configuration for a later provision call. This operation takes no request body. A body carrying any field is refused with 400 rather than ignored. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
16
+ * Stops the intern runtime while keeping its disk and configuration for a later provision call. This operation takes no request body. A body carrying any field is refused with 400 rather than ignored. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
17
17
  *
18
18
  * If set, this operation will use {@link Security.apiKey} from the global security.
19
19
  */
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Suspend an intern
18
18
  *
19
19
  * @remarks
20
- * Stops the intern runtime while keeping its disk and configuration for a later provision call. This operation takes no request body. A body carrying any field is refused with 400 rather than ignored. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
20
+ * Stops the intern runtime while keeping its disk and configuration for a later provision call. This operation takes no request body. A body carrying any field is refused with 400 rather than ignored. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
21
21
  *
22
22
  * If set, this operation will use {@link Security.apiKey} from the global security.
23
23
  */
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Update an intern
14
14
  *
15
15
  * @remarks
16
- * Changes the intern name, description, instructions or model. Omitted fields stay unchanged. The request body is capped at 1048576 bytes and a larger body is refused with 413. A non-empty body must declare `Content-Type: application/json` or it is refused with 415. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
16
+ * Changes the intern name, description, instructions or model. Omitted fields stay unchanged. The request body is capped at 1048576 bytes and a larger body is refused with 413. A non-empty body must declare `Content-Type: application/json` or it is refused with 415. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
17
17
  *
18
18
  * If set, this operation will use {@link Security.apiKey} from the global security.
19
19
  */
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Update an intern
18
18
  *
19
19
  * @remarks
20
- * Changes the intern name, description, instructions or model. Omitted fields stay unchanged. The request body is capped at 1048576 bytes and a larger body is refused with 413. A non-empty body must declare `Content-Type: application/json` or it is refused with 415. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
20
+ * Changes the intern name, description, instructions or model. Omitted fields stay unchanged. The request body is capped at 1048576 bytes and a larger body is refused with 413. A non-empty body must declare `Content-Type: application/json` or it is refused with 415. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
21
21
  *
22
22
  * If set, this operation will use {@link Security.apiKey} from the global security.
23
23
  */
@@ -0,0 +1,19 @@
1
+ import { OpenRouterCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { OpenRouterError } from "../models/errors/openroutererror.js";
6
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
7
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
+ import * as models from "../models/index.js";
9
+ import * as operations from "../models/operations/index.js";
10
+ import { APIPromise } from "../types/async.js";
11
+ import { Result } from "../types/fp.js";
12
+ /**
13
+ * Activate a validated private endpoint
14
+ *
15
+ * @remarks
16
+ * 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.
17
+ */
18
+ export declare 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>>;
19
+ //# sourceMappingURL=privateEndpointsActivate.d.ts.map
@@ -0,0 +1,103 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: fb4e7d40387c
4
+ */
5
+ import { encodeSimple } from "../lib/encodings.js";
6
+ import { matchStatusCode } from "../lib/http.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ConflictResponseError$inboundSchema as errors_ConflictResponseError$inboundSchema } from "../models/errors/conflictresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js"; import { UnprocessableEntityResponseError$inboundSchema as errors_UnprocessableEntityResponseError$inboundSchema } from "../models/errors/unprocessableentityresponseerror.js";
13
+ import { ManagedPrivateEndpointResponse$inboundSchema as models_ManagedPrivateEndpointResponse$inboundSchema } from "../models/managedprivateendpointresponse.js";
14
+ import { ActivatePrivateEndpointRequest$outboundSchema as operations_ActivatePrivateEndpointRequest$outboundSchema } from "../models/operations/activateprivateendpoint.js";
15
+ import { APIPromise } from "../types/async.js";
16
+ /**
17
+ * Activate a validated private endpoint
18
+ *
19
+ * @remarks
20
+ * 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.
21
+ */
22
+ export function privateEndpointsActivate(client, request, options) {
23
+ return new APIPromise($do(client, request, options));
24
+ }
25
+ async function $do(client, request, options) {
26
+ const parsed = safeParse(request, (value) => operations_ActivatePrivateEndpointRequest$outboundSchema.parse(value), "Input validation failed");
27
+ if (!parsed.ok) {
28
+ return [parsed, { status: "invalid" }];
29
+ }
30
+ const payload = parsed.value;
31
+ const body = null;
32
+ const pathParams = {
33
+ id: encodeSimple("id", payload.id, {
34
+ explode: false,
35
+ charEncoding: "percent",
36
+ }),
37
+ };
38
+ const path = pathToFunc("/private-endpoints/{id}/activate")(pathParams);
39
+ const headers = new Headers(compactMap({
40
+ Accept: "application/json",
41
+ "HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
42
+ "X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
43
+ "X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
44
+ }));
45
+ const secConfig = await extractSecurity(client._options.apiKey);
46
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
47
+ const requestSecurity = resolveGlobalSecurity(securityInput);
48
+ const context = {
49
+ options: client._options,
50
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
51
+ operationID: "activatePrivateEndpoint",
52
+ oAuth2Scopes: null,
53
+ resolvedSecurity: requestSecurity,
54
+ securitySource: client._options.apiKey,
55
+ retryConfig: options?.retries
56
+ || client._options.retryConfig
57
+ || {
58
+ strategy: "backoff",
59
+ backoff: {
60
+ initialInterval: 500,
61
+ maxInterval: 60000,
62
+ exponent: 1.5,
63
+ maxElapsedTime: 3600000,
64
+ },
65
+ retryConnectionErrors: true,
66
+ }
67
+ || { strategy: "none" },
68
+ retryCodes: options?.retryCodes || ["5XX"],
69
+ };
70
+ const requestRes = client._createRequest(context, {
71
+ security: requestSecurity,
72
+ method: "POST",
73
+ baseURL: options?.serverURL,
74
+ path: path,
75
+ headers: headers,
76
+ body: body,
77
+ userAgent: client._options.userAgent,
78
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
79
+ }, options);
80
+ if (!requestRes.ok) {
81
+ return [requestRes, { status: "invalid" }];
82
+ }
83
+ const req = requestRes.value;
84
+ const doResult = await client._do(req, {
85
+ context,
86
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
87
+ retryConfig: context.retryConfig,
88
+ retryCodes: context.retryCodes,
89
+ });
90
+ if (!doResult.ok) {
91
+ return [doResult, { status: "request-error", request: req }];
92
+ }
93
+ const response = doResult.value;
94
+ const responseFields = {
95
+ HttpMeta: { Response: response, Request: req },
96
+ };
97
+ const [result] = await M.match(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 });
98
+ if (!result.ok) {
99
+ return [result, { status: "complete", request: req, response }];
100
+ }
101
+ return [result, { status: "complete", request: req, response }];
102
+ }
103
+ //# sourceMappingURL=privateEndpointsActivate.js.map
@@ -0,0 +1,19 @@
1
+ import { OpenRouterCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { OpenRouterError } from "../models/errors/openroutererror.js";
6
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
7
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
+ import * as models from "../models/index.js";
9
+ import * as operations from "../models/operations/index.js";
10
+ import { APIPromise } from "../types/async.js";
11
+ import { Result } from "../types/fp.js";
12
+ /**
13
+ * Create a private endpoint
14
+ *
15
+ * @remarks
16
+ * 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.
17
+ */
18
+ export declare 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>>;
19
+ //# sourceMappingURL=privateEndpointsCreate.d.ts.map
@@ -0,0 +1,101 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 59e376dd1895
4
+ */
5
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
6
+ import { matchStatusCode } from "../lib/http.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { BadGateway$inboundSchema as errors_BadGateway$inboundSchema, Conflict$inboundSchema as errors_Conflict$inboundSchema, InternalServerError$inboundSchema as errors_InternalServerError$inboundSchema, NotFound$inboundSchema as errors_NotFound$inboundSchema, UnprocessableEntity$inboundSchema as errors_UnprocessableEntity$inboundSchema } from "../models/errors/createprivateendpoint.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
13
+ import { ManagedPrivateEndpointResponse$inboundSchema as models_ManagedPrivateEndpointResponse$inboundSchema } from "../models/managedprivateendpointresponse.js";
14
+ import { CreatePrivateEndpointRequest$outboundSchema as operations_CreatePrivateEndpointRequest$outboundSchema } from "../models/operations/createprivateendpoint.js";
15
+ import { APIPromise } from "../types/async.js";
16
+ /**
17
+ * Create a private endpoint
18
+ *
19
+ * @remarks
20
+ * 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.
21
+ */
22
+ export function privateEndpointsCreate(client, request, options) {
23
+ return new APIPromise($do(client, request, options));
24
+ }
25
+ async function $do(client, request, options) {
26
+ const parsed = safeParse(request, (value) => operations_CreatePrivateEndpointRequest$outboundSchema.parse(value), "Input validation failed");
27
+ if (!parsed.ok) {
28
+ return [parsed, { status: "invalid" }];
29
+ }
30
+ const payload = parsed.value;
31
+ const body = encodeJSON("body", payload.CreatePrivateEndpointRequest, {
32
+ explode: true,
33
+ });
34
+ const path = pathToFunc("/private-endpoints")();
35
+ const headers = new Headers(compactMap({
36
+ "Content-Type": "application/json",
37
+ Accept: "application/json",
38
+ "HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
39
+ "X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
40
+ "X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
41
+ "idempotency-key": encodeSimple("idempotency-key", payload["idempotency-key"], { explode: false, charEncoding: "none" }),
42
+ }));
43
+ const secConfig = await extractSecurity(client._options.apiKey);
44
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
45
+ const requestSecurity = resolveGlobalSecurity(securityInput);
46
+ const context = {
47
+ options: client._options,
48
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
49
+ operationID: "createPrivateEndpoint",
50
+ oAuth2Scopes: null,
51
+ resolvedSecurity: requestSecurity,
52
+ securitySource: client._options.apiKey,
53
+ retryConfig: options?.retries
54
+ || client._options.retryConfig
55
+ || {
56
+ strategy: "backoff",
57
+ backoff: {
58
+ initialInterval: 500,
59
+ maxInterval: 60000,
60
+ exponent: 1.5,
61
+ maxElapsedTime: 3600000,
62
+ },
63
+ retryConnectionErrors: true,
64
+ }
65
+ || { strategy: "none" },
66
+ retryCodes: options?.retryCodes || ["5XX"],
67
+ };
68
+ const requestRes = client._createRequest(context, {
69
+ security: requestSecurity,
70
+ method: "POST",
71
+ baseURL: options?.serverURL,
72
+ path: path,
73
+ headers: headers,
74
+ body: body,
75
+ userAgent: client._options.userAgent,
76
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
77
+ }, options);
78
+ if (!requestRes.ok) {
79
+ return [requestRes, { status: "invalid" }];
80
+ }
81
+ const req = requestRes.value;
82
+ const doResult = await client._do(req, {
83
+ context,
84
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
85
+ retryConfig: context.retryConfig,
86
+ retryCodes: context.retryCodes,
87
+ });
88
+ if (!doResult.ok) {
89
+ return [doResult, { status: "request-error", request: req }];
90
+ }
91
+ const response = doResult.value;
92
+ const responseFields = {
93
+ HttpMeta: { Response: response, Request: req },
94
+ };
95
+ const [result] = await M.match(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 });
96
+ if (!result.ok) {
97
+ return [result, { status: "complete", request: req, response }];
98
+ }
99
+ return [result, { status: "complete", request: req, response }];
100
+ }
101
+ //# sourceMappingURL=privateEndpointsCreate.js.map
@@ -0,0 +1,19 @@
1
+ import { OpenRouterCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { OpenRouterError } from "../models/errors/openroutererror.js";
6
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
7
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
+ import * as models from "../models/index.js";
9
+ import * as operations from "../models/operations/index.js";
10
+ import { APIPromise } from "../types/async.js";
11
+ import { Result } from "../types/fp.js";
12
+ /**
13
+ * Delete a private endpoint
14
+ *
15
+ * @remarks
16
+ * 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.
17
+ */
18
+ export declare 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>>;
19
+ //# sourceMappingURL=privateEndpointsDelete.d.ts.map
@@ -0,0 +1,107 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 475f87370ef8
4
+ */
5
+ import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
6
+ import { matchStatusCode } from "../lib/http.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ConflictResponseError$inboundSchema as errors_ConflictResponseError$inboundSchema } from "../models/errors/conflictresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js"; import { UnprocessableEntityResponseError$inboundSchema as errors_UnprocessableEntityResponseError$inboundSchema } from "../models/errors/unprocessableentityresponseerror.js";
13
+ import { DeletePrivateEndpointResponse$inboundSchema as models_DeletePrivateEndpointResponse$inboundSchema } from "../models/deleteprivateendpointresponse.js";
14
+ import { DeletePrivateEndpointRequest$outboundSchema as operations_DeletePrivateEndpointRequest$outboundSchema } from "../models/operations/deleteprivateendpoint.js";
15
+ import { APIPromise } from "../types/async.js";
16
+ /**
17
+ * Delete a private endpoint
18
+ *
19
+ * @remarks
20
+ * 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.
21
+ */
22
+ export function privateEndpointsDelete(client, request, options) {
23
+ return new APIPromise($do(client, request, options));
24
+ }
25
+ async function $do(client, request, options) {
26
+ const parsed = safeParse(request, (value) => operations_DeletePrivateEndpointRequest$outboundSchema.parse(value), "Input validation failed");
27
+ if (!parsed.ok) {
28
+ return [parsed, { status: "invalid" }];
29
+ }
30
+ const payload = parsed.value;
31
+ const body = null;
32
+ const pathParams = {
33
+ id: encodeSimple("id", payload.id, {
34
+ explode: false,
35
+ charEncoding: "percent",
36
+ }),
37
+ };
38
+ const path = pathToFunc("/private-endpoints/{id}")(pathParams);
39
+ const query = encodeFormQuery({
40
+ "draft_only": payload.draft_only,
41
+ });
42
+ const headers = new Headers(compactMap({
43
+ Accept: "application/json",
44
+ "HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
45
+ "X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
46
+ "X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
47
+ }));
48
+ const secConfig = await extractSecurity(client._options.apiKey);
49
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
50
+ const requestSecurity = resolveGlobalSecurity(securityInput);
51
+ const context = {
52
+ options: client._options,
53
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
54
+ operationID: "deletePrivateEndpoint",
55
+ oAuth2Scopes: null,
56
+ resolvedSecurity: requestSecurity,
57
+ securitySource: client._options.apiKey,
58
+ retryConfig: options?.retries
59
+ || client._options.retryConfig
60
+ || {
61
+ strategy: "backoff",
62
+ backoff: {
63
+ initialInterval: 500,
64
+ maxInterval: 60000,
65
+ exponent: 1.5,
66
+ maxElapsedTime: 3600000,
67
+ },
68
+ retryConnectionErrors: true,
69
+ }
70
+ || { strategy: "none" },
71
+ retryCodes: options?.retryCodes || ["5XX"],
72
+ };
73
+ const requestRes = client._createRequest(context, {
74
+ security: requestSecurity,
75
+ method: "DELETE",
76
+ baseURL: options?.serverURL,
77
+ path: path,
78
+ headers: headers,
79
+ query: query,
80
+ body: body,
81
+ userAgent: client._options.userAgent,
82
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
83
+ }, options);
84
+ if (!requestRes.ok) {
85
+ return [requestRes, { status: "invalid" }];
86
+ }
87
+ const req = requestRes.value;
88
+ const doResult = await client._do(req, {
89
+ context,
90
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
91
+ retryConfig: context.retryConfig,
92
+ retryCodes: context.retryCodes,
93
+ });
94
+ if (!doResult.ok) {
95
+ return [doResult, { status: "request-error", request: req }];
96
+ }
97
+ const response = doResult.value;
98
+ const responseFields = {
99
+ HttpMeta: { Response: response, Request: req },
100
+ };
101
+ const [result] = await M.match(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 });
102
+ if (!result.ok) {
103
+ return [result, { status: "complete", request: req, response }];
104
+ }
105
+ return [result, { status: "complete", request: req, response }];
106
+ }
107
+ //# sourceMappingURL=privateEndpointsDelete.js.map
@@ -0,0 +1,19 @@
1
+ import { OpenRouterCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { OpenRouterError } from "../models/errors/openroutererror.js";
6
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
7
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
+ import * as models from "../models/index.js";
9
+ import * as operations from "../models/operations/index.js";
10
+ import { APIPromise } from "../types/async.js";
11
+ import { Result } from "../types/fp.js";
12
+ /**
13
+ * Disable a private endpoint
14
+ *
15
+ * @remarks
16
+ * Stop routing to an active endpoint without deleting it. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
+ */
18
+ export declare 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>>;
19
+ //# sourceMappingURL=privateEndpointsDisable.d.ts.map