@openrouter/sdk 1.4.25 → 1.5.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 (367) hide show
  1. package/esm/funcs/apiKeysList.d.ts +1 -1
  2. package/esm/funcs/apiKeysList.js +3 -2
  3. package/esm/funcs/apiKeysUpdate.d.ts +4 -2
  4. package/esm/funcs/apiKeysUpdate.js +5 -3
  5. package/esm/funcs/chatSend.d.ts +4 -2
  6. package/esm/funcs/containersPromoteContainerFile.d.ts +1 -1
  7. package/esm/funcs/containersPromoteContainerFile.js +2 -2
  8. package/esm/funcs/embeddingsGenerate.d.ts +1 -1
  9. package/esm/funcs/embeddingsGenerate.js +2 -2
  10. package/esm/funcs/{endUsersCreate.d.ts → externalUsersCreate.d.ts} +3 -3
  11. package/esm/funcs/{endUsersCreate.js → externalUsersCreate.js} +11 -11
  12. package/esm/funcs/{endUsersDelete.d.ts → externalUsersDelete.d.ts} +3 -3
  13. package/esm/funcs/{endUsersDelete.js → externalUsersDelete.js} +8 -8
  14. package/esm/funcs/{endUsersGet.d.ts → externalUsersGet.d.ts} +3 -3
  15. package/esm/funcs/{endUsersGet.js → externalUsersGet.js} +10 -10
  16. package/esm/funcs/{endUsersList.d.ts → externalUsersList.d.ts} +3 -3
  17. package/esm/funcs/{endUsersList.js → externalUsersList.js} +10 -10
  18. package/esm/funcs/{endUsersUpdate.d.ts → externalUsersUpdate.d.ts} +3 -3
  19. package/esm/funcs/{endUsersUpdate.js → externalUsersUpdate.js} +11 -11
  20. package/esm/funcs/filesUpload.d.ts +1 -1
  21. package/esm/funcs/filesUpload.js +2 -2
  22. package/esm/funcs/guardrailsListKeyAssignments.d.ts +1 -1
  23. package/esm/funcs/guardrailsListKeyAssignments.js +2 -2
  24. package/esm/funcs/guardrailsListMemberAssignments.d.ts +1 -1
  25. package/esm/funcs/guardrailsListMemberAssignments.js +2 -2
  26. package/esm/funcs/imagesGenerate.d.ts +4 -2
  27. package/esm/funcs/internsGetInternConnections.d.ts +21 -0
  28. package/esm/funcs/internsGetInternConnections.js +105 -0
  29. package/esm/funcs/internsGetInternDaemon.d.ts +1 -1
  30. package/esm/funcs/internsGetInternDaemon.js +1 -1
  31. package/esm/funcs/internsGetInternIcon.d.ts +20 -0
  32. package/esm/funcs/internsGetInternIcon.js +109 -0
  33. package/esm/funcs/internsSignInternDaemonAccessRequest.d.ts +22 -0
  34. package/esm/funcs/internsSignInternDaemonAccessRequest.js +109 -0
  35. package/esm/funcs/internsSignInternDaemonRequest.d.ts +20 -0
  36. package/esm/funcs/internsSignInternDaemonRequest.js +109 -0
  37. package/esm/funcs/modelsListForUser.js +1 -0
  38. package/esm/funcs/organizationGetSettings.d.ts +1 -1
  39. package/esm/funcs/organizationGetSettings.js +2 -2
  40. package/esm/funcs/organizationListMembers.d.ts +1 -1
  41. package/esm/funcs/organizationListMembers.js +2 -2
  42. package/esm/funcs/organizationUpdateSettings.d.ts +1 -1
  43. package/esm/funcs/organizationUpdateSettings.js +2 -2
  44. package/esm/funcs/privateEndpointsUpdatePricing.d.ts +1 -1
  45. package/esm/funcs/privateEndpointsUpdatePricing.js +1 -1
  46. package/esm/funcs/responsesSend.d.ts +4 -2
  47. package/esm/funcs/vaultDeleteInternVaultSecret.d.ts +1 -1
  48. package/esm/funcs/vaultDeleteInternVaultSecret.js +2 -2
  49. package/esm/funcs/vaultDeleteVaultSecret.d.ts +1 -1
  50. package/esm/funcs/vaultDeleteVaultSecret.js +2 -2
  51. package/esm/funcs/vaultListInternConnections.d.ts +20 -0
  52. package/esm/funcs/vaultListInternConnections.js +104 -0
  53. package/esm/funcs/vaultStoreVaultSecret.d.ts +1 -1
  54. package/esm/funcs/vaultStoreVaultSecret.js +2 -2
  55. package/esm/funcs/videoGenerationGenerate.d.ts +1 -1
  56. package/esm/funcs/videoGenerationGenerate.js +2 -2
  57. package/esm/lib/config.d.ts +3 -3
  58. package/esm/lib/config.js +3 -3
  59. package/esm/lib/encodings.d.ts +10 -9
  60. package/esm/lib/encodings.js +29 -13
  61. package/esm/lib/http.d.ts +1 -1
  62. package/esm/lib/http.js +1 -1
  63. package/esm/lib/security.d.ts +5 -4
  64. package/esm/lib/security.js +4 -5
  65. package/esm/models/additionaltoolsitem.d.ts +16 -1
  66. package/esm/models/additionaltoolsitem.js +10 -0
  67. package/esm/models/alignment.d.ts +1 -1
  68. package/esm/models/alignmentplugin.d.ts +9 -8
  69. package/esm/models/alignmentplugin.js +3 -2
  70. package/esm/models/alignmentrule.d.ts +31 -0
  71. package/esm/models/alignmentrule.js +25 -0
  72. package/esm/models/alignmentrulerecord.d.ts +7 -3
  73. package/esm/models/alignmentrulerecord.js +2 -1
  74. package/esm/models/armorautomode.d.ts +44 -0
  75. package/esm/models/armorautomode.js +49 -0
  76. package/esm/models/armorcontext.d.ts +22 -0
  77. package/esm/models/armorcontext.js +25 -0
  78. package/esm/models/armorenvironmententry.d.ts +14 -0
  79. package/esm/models/armorenvironmententry.js +14 -0
  80. package/esm/models/armorplugin.d.ts +92 -0
  81. package/esm/models/armorplugin.js +60 -0
  82. package/esm/models/armorrule.d.ts +30 -0
  83. package/esm/models/armorrule.js +16 -0
  84. package/esm/models/armorsafeguardresult.d.ts +69 -0
  85. package/esm/models/armorsafeguardresult.js +83 -0
  86. package/esm/models/batchlistitem.d.ts +8 -0
  87. package/esm/models/batchlistitem.js +3 -0
  88. package/esm/models/batchobject.d.ts +13 -0
  89. package/esm/models/batchobject.js +6 -0
  90. package/esm/models/batchsubmitbody.d.ts +5 -0
  91. package/esm/models/batchsubmitbody.js +2 -0
  92. package/esm/models/byokkey.d.ts +3 -3
  93. package/esm/models/byokkey.js +1 -1
  94. package/esm/models/byokproviderslug.d.ts +2 -0
  95. package/esm/models/byokproviderslug.js +2 -0
  96. package/esm/models/chatcontenttext.d.ts +1 -1
  97. package/esm/models/chatfunctiontool.d.ts +4 -0
  98. package/esm/models/chatfunctiontool.js +7 -0
  99. package/esm/models/chatrequest.d.ts +16 -9
  100. package/esm/models/chatrequest.js +9 -6
  101. package/esm/models/chatresult.d.ts +10 -0
  102. package/esm/models/chatresult.js +5 -0
  103. package/esm/models/chatstreamchunk.d.ts +7 -0
  104. package/esm/models/chatstreamchunk.js +5 -0
  105. package/esm/models/chatwebsearchshorthand.d.ts +1 -1
  106. package/esm/models/clientclosedrequestresponseerrordata.d.ts +17 -0
  107. package/esm/models/clientclosedrequestresponseerrordata.js +16 -0
  108. package/esm/models/computeruseservertool.d.ts +5 -5
  109. package/esm/models/computeruseservertool.js +5 -5
  110. package/esm/models/createbyokkeyrequest.d.ts +3 -3
  111. package/esm/models/createbyokkeyrequest.js +1 -1
  112. package/esm/models/createexternaluserrequest.d.ts +15 -0
  113. package/esm/models/createexternaluserrequest.js +13 -0
  114. package/esm/models/createguardrailrequest.d.ts +10 -0
  115. package/esm/models/createguardrailrequest.js +4 -0
  116. package/esm/models/createobservabilitydestinationrequest.d.ts +5 -0
  117. package/esm/models/createobservabilitydestinationrequest.js +2 -0
  118. package/esm/models/customtool.d.ts +2 -0
  119. package/esm/models/customtool.js +11 -0
  120. package/esm/models/decisionsboxanswer.d.ts +21 -0
  121. package/esm/models/decisionsboxanswer.js +26 -0
  122. package/esm/models/decisionsboxquestion.d.ts +34 -0
  123. package/esm/models/decisionsboxquestion.js +23 -0
  124. package/esm/models/decisionsrequest.d.ts +6 -5
  125. package/esm/models/decisionsrequest.js +3 -0
  126. package/esm/models/decisionsresponse.d.ts +4 -3
  127. package/esm/models/decisionsresponse.js +3 -0
  128. package/esm/models/deferredbm25search.d.ts +17 -0
  129. package/esm/models/deferredbm25search.js +19 -0
  130. package/esm/models/deferredcustomsearch.d.ts +21 -0
  131. package/esm/models/deferredcustomsearch.js +23 -0
  132. package/esm/models/deferredregexsearch.d.ts +17 -0
  133. package/esm/models/deferredregexsearch.js +19 -0
  134. package/esm/models/deferredtoolscontrol.d.ts +62 -0
  135. package/esm/models/deferredtoolscontrol.js +38 -0
  136. package/esm/models/deferredtoolssearchstrategy.d.ts +14 -0
  137. package/esm/models/deferredtoolssearchstrategy.js +18 -0
  138. package/esm/models/errors/batchpaymentrequiredresponseerror.d.ts +16 -0
  139. package/esm/models/errors/batchpaymentrequiredresponseerror.js +5 -0
  140. package/esm/models/errors/clientclosedrequestresponseerror.d.ts +39 -0
  141. package/esm/models/errors/clientclosedrequestresponseerror.js +47 -0
  142. package/esm/models/errors/index.d.ts +1 -0
  143. package/esm/models/errors/index.js +1 -0
  144. package/esm/models/{enduser.d.ts → externaluser.d.ts} +5 -5
  145. package/esm/models/{enduser.js → externaluser.js} +6 -5
  146. package/esm/models/externaluserresponse.d.ts +11 -0
  147. package/esm/models/externaluserresponse.js +15 -0
  148. package/esm/models/guardrail.d.ts +8 -0
  149. package/esm/models/guardrail.js +4 -0
  150. package/esm/models/imagegenerationproviderpreferences.d.ts +12 -0
  151. package/esm/models/imagegenerationproviderpreferences.js +3 -0
  152. package/esm/models/index.d.ts +34 -6
  153. package/esm/models/index.js +34 -6
  154. package/esm/models/inputsunion.d.ts +7 -4
  155. package/esm/models/inputsunion.js +9 -0
  156. package/esm/models/inputtext.d.ts +1 -1
  157. package/esm/models/intern.d.ts +12 -0
  158. package/esm/models/intern.js +6 -0
  159. package/esm/models/internconnection.d.ts +118 -0
  160. package/esm/models/internconnection.js +105 -0
  161. package/esm/models/internconnectionlist.d.ts +11 -0
  162. package/esm/models/internconnectionlist.js +15 -0
  163. package/esm/models/interndaemonaccess.d.ts +11 -1
  164. package/esm/models/interndaemonaccess.js +8 -0
  165. package/esm/models/jevrouterplugin.d.ts +5 -0
  166. package/esm/models/jevrouterplugin.js +2 -0
  167. package/esm/models/keybudget.d.ts +80 -0
  168. package/esm/models/keybudget.js +58 -0
  169. package/esm/models/legacywebsearchservertool.d.ts +1 -1
  170. package/esm/models/listexternalusersresponse.d.ts +15 -0
  171. package/esm/models/listexternalusersresponse.js +21 -0
  172. package/esm/models/messagesmessageparam.d.ts +7 -6
  173. package/esm/models/messagesmessageparam.js +4 -0
  174. package/esm/models/messagesrequest.d.ts +11 -4
  175. package/esm/models/messagesrequest.js +6 -0
  176. package/esm/models/namespacefunctiontool.d.ts +5 -5
  177. package/esm/models/namespacefunctiontool.js +5 -5
  178. package/esm/models/observabilityarizedestination.d.ts +4 -0
  179. package/esm/models/observabilityarizedestination.js +2 -0
  180. package/esm/models/observabilitybraintrustdestination.d.ts +4 -0
  181. package/esm/models/observabilitybraintrustdestination.js +2 -0
  182. package/esm/models/observabilityclickhousedestination.d.ts +4 -0
  183. package/esm/models/observabilityclickhousedestination.js +2 -0
  184. package/esm/models/observabilitydatadogdestination.d.ts +4 -0
  185. package/esm/models/observabilitydatadogdestination.js +2 -0
  186. package/esm/models/observabilitygrafanadestination.d.ts +4 -0
  187. package/esm/models/observabilitygrafanadestination.js +2 -0
  188. package/esm/models/observabilitylangfusedestination.d.ts +4 -0
  189. package/esm/models/observabilitylangfusedestination.js +2 -0
  190. package/esm/models/observabilitylangsmithdestination.d.ts +4 -0
  191. package/esm/models/observabilitylangsmithdestination.js +2 -0
  192. package/esm/models/observabilitynewrelicdestination.d.ts +4 -0
  193. package/esm/models/observabilitynewrelicdestination.js +2 -0
  194. package/esm/models/observabilityopikdestination.d.ts +4 -0
  195. package/esm/models/observabilityopikdestination.js +2 -0
  196. package/esm/models/observabilityotelcollectordestination.d.ts +4 -0
  197. package/esm/models/observabilityotelcollectordestination.js +2 -0
  198. package/esm/models/observabilityposthogdestination.d.ts +4 -0
  199. package/esm/models/observabilityposthogdestination.js +2 -0
  200. package/esm/models/observabilityrampdestination.d.ts +4 -0
  201. package/esm/models/observabilityrampdestination.js +2 -0
  202. package/esm/models/observabilitys3destination.d.ts +4 -0
  203. package/esm/models/observabilitys3destination.js +2 -0
  204. package/esm/models/observabilitysentrydestination.d.ts +4 -0
  205. package/esm/models/observabilitysentrydestination.js +2 -0
  206. package/esm/models/observabilitysnowflakedestination.d.ts +4 -0
  207. package/esm/models/observabilitysnowflakedestination.js +2 -0
  208. package/esm/models/observabilityweavedestination.d.ts +4 -0
  209. package/esm/models/observabilityweavedestination.js +2 -0
  210. package/esm/models/observabilitywebhookdestination.d.ts +8 -4
  211. package/esm/models/observabilitywebhookdestination.js +5 -4
  212. package/esm/models/openresponseserrorfield.d.ts +1 -0
  213. package/esm/models/openresponseserrorfield.js +1 -0
  214. package/esm/models/openresponseserrormetadata.d.ts +1 -1
  215. package/esm/models/openresponsesresult.d.ts +19 -3
  216. package/esm/models/openresponsesresult.js +14 -0
  217. package/esm/models/operations/{createenduser.d.ts → createexternaluser.d.ts} +8 -8
  218. package/esm/models/operations/createexternaluser.js +23 -0
  219. package/esm/models/operations/deleteexternaluser.d.ts +58 -0
  220. package/esm/models/operations/{deleteenduser.js → deleteexternaluser.js} +5 -5
  221. package/esm/models/operations/getcurrentkey.d.ts +5 -0
  222. package/esm/models/operations/getcurrentkey.js +4 -1
  223. package/esm/models/operations/{updateenduser.d.ts → getexternaluser.d.ts} +7 -10
  224. package/esm/models/operations/{getenduser.js → getexternaluser.js} +5 -5
  225. package/esm/models/operations/{deleteenduser.d.ts → getinternconnections.d.ts} +9 -9
  226. package/esm/models/operations/getinternconnections.js +21 -0
  227. package/esm/models/operations/{getenduser.d.ts → getinternicon.d.ts} +14 -9
  228. package/esm/models/operations/getinternicon.js +22 -0
  229. package/esm/models/operations/index.d.ts +10 -5
  230. package/esm/models/operations/index.js +10 -5
  231. package/esm/models/operations/list.d.ts +5 -0
  232. package/esm/models/operations/list.js +2 -0
  233. package/esm/models/operations/listbatches.d.ts +4 -4
  234. package/esm/models/operations/listbatches.js +3 -3
  235. package/esm/models/operations/listbyokkeys.d.ts +2 -0
  236. package/esm/models/operations/listbyokkeys.js +2 -0
  237. package/esm/models/operations/{listendusers.d.ts → listexternalusers.d.ts} +11 -11
  238. package/esm/models/operations/listexternalusers.js +38 -0
  239. package/esm/models/operations/listinternconnections.d.ts +75 -0
  240. package/esm/models/operations/listinternconnections.js +36 -0
  241. package/esm/models/operations/listmodelsuser.d.ts +29 -0
  242. package/esm/models/operations/listmodelsuser.js +21 -0
  243. package/esm/models/operations/signinterndaemonaccessrequest.d.ts +72 -0
  244. package/esm/models/operations/signinterndaemonaccessrequest.js +38 -0
  245. package/esm/models/operations/signinterndaemonrequest.d.ts +72 -0
  246. package/esm/models/operations/signinterndaemonrequest.js +38 -0
  247. package/esm/models/operations/updateexternaluser.d.ts +61 -0
  248. package/esm/models/operations/updateexternaluser.js +24 -0
  249. package/esm/models/operations/updatekeys.d.ts +5 -0
  250. package/esm/models/operations/updatekeys.js +2 -0
  251. package/esm/models/oranthropiccontentblock.d.ts +2 -1
  252. package/esm/models/oranthropiccontentblock.js +2 -0
  253. package/esm/models/oranthropictoolsearchresult.d.ts +17 -0
  254. package/esm/models/oranthropictoolsearchresult.js +21 -0
  255. package/esm/models/oranthropictoolsearchresultparam.d.ts +23 -0
  256. package/esm/models/oranthropictoolsearchresultparam.js +20 -0
  257. package/esm/models/outputapplypatchservertoolitem.d.ts +7 -2
  258. package/esm/models/outputapplypatchservertoolitem.js +5 -3
  259. package/esm/models/outputarmorblockeditem.d.ts +71 -0
  260. package/esm/models/outputarmorblockeditem.js +60 -0
  261. package/esm/models/outputdatetimeitem.d.ts +7 -2
  262. package/esm/models/outputdatetimeitem.js +5 -3
  263. package/esm/models/outputimagegenerationservertoolitem.d.ts +7 -2
  264. package/esm/models/outputimagegenerationservertoolitem.js +5 -3
  265. package/esm/models/outputitems.d.ts +5 -1
  266. package/esm/models/outputitems.js +4 -0
  267. package/esm/models/outputsearchmodelsservertoolitem.d.ts +7 -2
  268. package/esm/models/outputsearchmodelsservertoolitem.js +5 -3
  269. package/esm/models/outputtoolsearchcallitem.d.ts +26 -0
  270. package/esm/models/outputtoolsearchcallitem.js +30 -0
  271. package/esm/models/outputtoolsearchservertoolitem.d.ts +30 -2
  272. package/esm/models/outputtoolsearchservertoolitem.js +36 -3
  273. package/esm/models/outputwebsearchservertoolitem.d.ts +7 -2
  274. package/esm/models/outputwebsearchservertoolitem.js +5 -3
  275. package/esm/models/preview20250311websearchservertool.d.ts +1 -1
  276. package/esm/models/previewwebsearchservertool.d.ts +1 -1
  277. package/esm/models/privateendpointpricing.d.ts +10 -0
  278. package/esm/models/privateendpointpricing.js +15 -0
  279. package/esm/models/promptcachebreakpoint.d.ts +3 -1
  280. package/esm/models/promptcachebreakpoint.js +2 -0
  281. package/esm/models/promptcacheoptions.d.ts +1 -1
  282. package/esm/models/providername.d.ts +2 -0
  283. package/esm/models/providername.js +2 -0
  284. package/esm/models/provideroptions.d.ts +12 -0
  285. package/esm/models/provideroptions.js +3 -0
  286. package/esm/models/providerresponse.d.ts +2 -0
  287. package/esm/models/providerresponse.js +2 -0
  288. package/esm/models/publicendpoint.d.ts +11 -2
  289. package/esm/models/publicendpoint.js +5 -0
  290. package/esm/models/publicservicetier.d.ts +17 -0
  291. package/esm/models/publicservicetier.js +16 -0
  292. package/esm/models/responsesrequest.d.ts +42 -6
  293. package/esm/models/responsesrequest.js +22 -0
  294. package/esm/models/signinterndaemonrequest.d.ts +54 -0
  295. package/esm/models/signinterndaemonrequest.js +30 -0
  296. package/esm/models/signinterndaemonresponse.d.ts +32 -0
  297. package/esm/models/signinterndaemonresponse.js +27 -0
  298. package/esm/models/speechinput.d.ts +12 -0
  299. package/esm/models/speechinput.js +12 -0
  300. package/esm/models/speechinputreferenceimage.d.ts +1 -1
  301. package/esm/models/speechrequest.d.ts +10 -4
  302. package/esm/models/speechrequest.js +3 -1
  303. package/esm/models/speechturn.d.ts +25 -0
  304. package/esm/models/speechturn.js +15 -0
  305. package/esm/models/switchyardrouterplugin.d.ts +1 -1
  306. package/esm/models/tokenexchangerequest.d.ts +7 -6
  307. package/esm/models/tokenexchangerequest.js +4 -2
  308. package/esm/models/tokenexchangeresponse.d.ts +3 -0
  309. package/esm/models/toolsearchcallitem.d.ts +47 -0
  310. package/esm/models/toolsearchcallitem.js +42 -0
  311. package/esm/models/toolsearchoutputitem.d.ts +150 -0
  312. package/esm/models/toolsearchoutputitem.js +181 -0
  313. package/esm/models/updatebyokkeyrequest.d.ts +3 -3
  314. package/esm/models/updatebyokkeyrequest.js +1 -1
  315. package/esm/models/updateexternaluserrequest.d.ts +15 -0
  316. package/esm/models/updateexternaluserrequest.js +18 -0
  317. package/esm/models/updateguardrailrequest.d.ts +10 -0
  318. package/esm/models/updateguardrailrequest.js +4 -0
  319. package/esm/models/updateobservabilitydestinationrequest.d.ts +5 -0
  320. package/esm/models/updateobservabilitydestinationrequest.js +2 -0
  321. package/esm/models/videogenerationrequest.d.ts +12 -0
  322. package/esm/models/videogenerationrequest.js +3 -0
  323. package/esm/models/videogenerationresponse.d.ts +11 -0
  324. package/esm/models/videogenerationresponse.js +3 -0
  325. package/esm/models/webfetchengineenum.d.ts +2 -2
  326. package/esm/models/webfetchengineenum.js +1 -1
  327. package/esm/models/webfetchservertoolconfig.d.ts +1 -1
  328. package/esm/models/websearchconfig.d.ts +1 -1
  329. package/esm/models/websearchengineenum.d.ts +2 -2
  330. package/esm/models/websearchengineenum.js +1 -1
  331. package/esm/models/websearchservertool.d.ts +1 -1
  332. package/esm/models/websearchservertoolconfig.d.ts +1 -1
  333. package/esm/models/workspacebudget.d.ts +4 -4
  334. package/esm/models/workspacebudget.js +3 -3
  335. package/esm/sdk/apikeys.d.ts +3 -1
  336. package/esm/sdk/apikeys.js +3 -1
  337. package/esm/sdk/betaresponses.d.ts +4 -2
  338. package/esm/sdk/chat.d.ts +4 -2
  339. package/esm/sdk/endusers.d.ts +10 -10
  340. package/esm/sdk/endusers.js +15 -15
  341. package/esm/sdk/externalusers.d.ts +44 -0
  342. package/esm/sdk/externalusers.js +60 -0
  343. package/esm/sdk/images.d.ts +3 -2
  344. package/esm/sdk/interns.d.ts +31 -1
  345. package/esm/sdk/interns.js +43 -1
  346. package/esm/sdk/privateendpoints.d.ts +1 -1
  347. package/esm/sdk/privateendpoints.js +1 -1
  348. package/esm/sdk/responses.d.ts +4 -2
  349. package/esm/sdk/sdk.d.ts +5 -2
  350. package/esm/sdk/sdk.js +7 -3
  351. package/esm/sdk/vault.d.ts +7 -0
  352. package/esm/sdk/vault.js +10 -0
  353. package/jsr.json +1 -1
  354. package/package.json +8 -8
  355. package/esm/models/batchlisttimestamp.d.ts +0 -12
  356. package/esm/models/batchlisttimestamp.js +0 -15
  357. package/esm/models/createenduserrequest.d.ts +0 -15
  358. package/esm/models/createenduserrequest.js +0 -13
  359. package/esm/models/enduserresponse.d.ts +0 -11
  360. package/esm/models/enduserresponse.js +0 -15
  361. package/esm/models/listendusersresponse.d.ts +0 -15
  362. package/esm/models/listendusersresponse.js +0 -21
  363. package/esm/models/operations/createenduser.js +0 -23
  364. package/esm/models/operations/listendusers.js +0 -38
  365. package/esm/models/operations/updateenduser.js +0 -24
  366. package/esm/models/updateenduserrequest.d.ts +0 -15
  367. package/esm/models/updateenduserrequest.js +0 -18
package/esm/lib/config.js CHANGED
@@ -29,8 +29,8 @@ export function serverURLFromOptions(options) {
29
29
  export const SDK_METADATA = {
30
30
  language: "typescript",
31
31
  openapiDocVersion: "1.0.0",
32
- sdkVersion: "1.4.25",
33
- genVersion: "2.914.0",
34
- userAgent: "speakeasy-sdk/typescript 1.4.25 2.914.0 1.0.0 @openrouter/sdk",
32
+ sdkVersion: "1.5.1",
33
+ genVersion: "2.948.4",
34
+ userAgent: "speakeasy-sdk/typescript 1.5.1 2.948.4 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -1,43 +1,44 @@
1
1
  export declare class EncodingError extends Error {
2
2
  constructor(message: string);
3
3
  }
4
+ export type CharEncoding = "percent" | "percentExceptReserved" | "none";
4
5
  export declare function encodeMatrix(key: string, value: unknown, options?: {
5
6
  explode?: boolean;
6
- charEncoding?: "percent" | "none";
7
+ charEncoding?: CharEncoding;
7
8
  }): string | undefined;
8
9
  export declare function encodeLabel(key: string, value: unknown, options?: {
9
10
  explode?: boolean;
10
- charEncoding?: "percent" | "none";
11
+ charEncoding?: CharEncoding;
11
12
  }): string | undefined;
12
13
  type FormEncoder = (key: string, value: unknown, options?: {
13
14
  explode?: boolean;
14
- charEncoding?: "percent" | "none";
15
+ charEncoding?: CharEncoding;
15
16
  }) => string | undefined;
16
17
  export declare const encodeForm: FormEncoder;
17
18
  export declare const encodeSpaceDelimited: FormEncoder;
18
19
  export declare const encodePipeDelimited: FormEncoder;
19
20
  export declare function encodeBodyForm(key: string, value: unknown, options?: {
20
21
  explode?: boolean;
21
- charEncoding?: "percent" | "none";
22
+ charEncoding?: CharEncoding;
22
23
  }): string;
23
24
  export declare function encodeDeepObject(key: string, value: unknown, options?: {
24
- charEncoding?: "percent" | "none";
25
+ charEncoding?: CharEncoding;
25
26
  }): string | undefined;
26
27
  export declare function encodeDeepObjectObject(key: string, value: unknown, options?: {
27
- charEncoding?: "percent" | "none";
28
+ charEncoding?: CharEncoding;
28
29
  }): string | undefined;
29
30
  export declare function encodeJSON(key: string, value: unknown, options?: {
30
31
  explode?: boolean;
31
- charEncoding?: "percent" | "none";
32
+ charEncoding?: CharEncoding;
32
33
  }): string | undefined;
33
34
  export declare const encodeSimple: (key: string, value: unknown, options?: {
34
35
  explode?: boolean;
35
- charEncoding?: "percent" | "none";
36
+ charEncoding?: CharEncoding;
36
37
  }) => string | undefined;
37
38
  export declare function queryJoin(...args: (string | undefined)[]): string;
38
39
  type QueryEncoderOptions = {
39
40
  explode?: boolean;
40
- charEncoding?: "percent" | "none";
41
+ charEncoding?: CharEncoding;
41
42
  allowEmptyValue?: string[];
42
43
  };
43
44
  type QueryEncoder = (key: string, value: unknown, options?: QueryEncoderOptions) => string | undefined;
@@ -10,6 +10,20 @@ export class EncodingError extends Error {
10
10
  this.name = "EncodingError";
11
11
  }
12
12
  }
13
+ const reservedEscapes = /%(2[346bcf]|3[abdf]|40|5[bd])/gi;
14
+ function encodeKeyChars(v, charEncoding) {
15
+ return encodeChars(v, charEncoding === "percentExceptReserved" ? "percent" : charEncoding);
16
+ }
17
+ function encodeChars(v, charEncoding) {
18
+ switch (charEncoding) {
19
+ case "percent":
20
+ return encodeURIComponent(v);
21
+ case "percentExceptReserved":
22
+ return encodeURIComponent(v).replace(reservedEscapes, (m) => decodeURIComponent(m));
23
+ default:
24
+ return v;
25
+ }
26
+ }
13
27
  export function encodeMatrix(key, value, options) {
14
28
  let out = "";
15
29
  const pairs = options?.explode
@@ -19,7 +33,7 @@ export function encodeMatrix(key, value, options) {
19
33
  return;
20
34
  }
21
35
  const encodeString = (v) => {
22
- return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
36
+ return encodeChars(v, options?.charEncoding);
23
37
  };
24
38
  const encodeValue = (v) => encodeString(serializeValue(v));
25
39
  pairs.forEach(([pk, pv]) => {
@@ -43,7 +57,7 @@ export function encodeMatrix(key, value, options) {
43
57
  if (encValue == null) {
44
58
  return;
45
59
  }
46
- const keyPrefix = encodeString(pk);
60
+ const keyPrefix = encodeKeyChars(pk, options?.charEncoding);
47
61
  tmp = `${keyPrefix}=${encValue}`;
48
62
  // trim trailing '=' if value was empty
49
63
  if (tmp === `${keyPrefix}=`) {
@@ -66,7 +80,7 @@ export function encodeLabel(key, value, options) {
66
80
  return;
67
81
  }
68
82
  const encodeString = (v) => {
69
- return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
83
+ return encodeChars(v, options?.charEncoding);
70
84
  };
71
85
  const encodeValue = (v) => encodeString(serializeValue(v));
72
86
  pairs.forEach(([pk, pv]) => {
@@ -85,7 +99,7 @@ export function encodeLabel(key, value, options) {
85
99
  }
86
100
  else {
87
101
  const k = options?.explode && isPlainObject(value)
88
- ? `${encodeString(pk)}=`
102
+ ? `${encodeKeyChars(pk, options?.charEncoding)}=`
89
103
  : "";
90
104
  encValue = `${k}${encodeValue(pv)}`;
91
105
  }
@@ -103,7 +117,7 @@ function formEncoder(sep) {
103
117
  return;
104
118
  }
105
119
  const encodeString = (v) => {
106
- return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
120
+ return encodeChars(v, options?.charEncoding);
107
121
  };
108
122
  const encodeValue = (v) => encodeString(serializeValue(v));
109
123
  const encodedSep = encodeString(sep);
@@ -127,7 +141,7 @@ function formEncoder(sep) {
127
141
  if (encValue == null) {
128
142
  return;
129
143
  }
130
- tmp = `${encodeString(pk)}=${encValue}`;
144
+ tmp = `${encodeKeyChars(pk, options?.charEncoding)}=${encValue}`;
131
145
  // If we end up with the nothing then skip forward
132
146
  if (!tmp || tmp === "=") {
133
147
  return;
@@ -146,7 +160,7 @@ export function encodeBodyForm(key, value, options) {
146
160
  ? explode(key, value)
147
161
  : [[key, value]];
148
162
  const encodeString = (v) => {
149
- return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
163
+ return encodeChars(v, options?.charEncoding);
150
164
  };
151
165
  const encodeValue = (v) => encodeString(serializeValue(v));
152
166
  pairs.forEach(([pk, pv]) => {
@@ -164,7 +178,7 @@ export function encodeBodyForm(key, value, options) {
164
178
  else {
165
179
  encValue = `${encodeValue(pv)}`;
166
180
  }
167
- tmp = `${encodeString(pk)}=${encValue}`;
181
+ tmp = `${encodeKeyChars(pk, options?.charEncoding)}=${encValue}`;
168
182
  // If we end up with the nothing then skip forward
169
183
  if (!tmp || tmp === "=") {
170
184
  return;
@@ -188,7 +202,7 @@ export function encodeDeepObjectObject(key, value, options) {
188
202
  }
189
203
  let out = "";
190
204
  const encodeString = (v) => {
191
- return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
205
+ return encodeChars(v, options?.charEncoding);
192
206
  };
193
207
  if (!isPlainObject(value)) {
194
208
  throw new EncodingError(`Expected parameter '${key}' to be an object.`);
@@ -205,7 +219,7 @@ export function encodeDeepObjectObject(key, value, options) {
205
219
  }
206
220
  const pairs = Array.isArray(cv) ? cv : [cv];
207
221
  const encoded = mapDefined(pairs, (v) => {
208
- return `${encodeString(pk)}=${encodeString(serializeValue(v))}`;
222
+ return `${encodeKeyChars(pk, options?.charEncoding)}=${encodeString(serializeValue(v))}`;
209
223
  })?.join("&");
210
224
  out += encoded == null ? "" : `&${encoded}`;
211
225
  });
@@ -216,10 +230,12 @@ export function encodeJSON(key, value, options) {
216
230
  return;
217
231
  }
218
232
  const encodeString = (v) => {
219
- return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
233
+ return encodeChars(v, options?.charEncoding);
220
234
  };
221
235
  const encVal = encodeString(JSON.stringify(value, jsonReplacer));
222
- return options?.explode ? encVal : `${encodeString(key)}=${encVal}`;
236
+ return options?.explode
237
+ ? encVal
238
+ : `${encodeKeyChars(key, options?.charEncoding)}=${encVal}`;
223
239
  }
224
240
  export const encodeSimple = (key, value, options) => {
225
241
  let out = "";
@@ -230,7 +246,7 @@ export const encodeSimple = (key, value, options) => {
230
246
  return;
231
247
  }
232
248
  const encodeString = (v) => {
233
- return options?.charEncoding === "percent" ? encodeURIComponent(v) : v;
249
+ return encodeChars(v, options?.charEncoding);
234
250
  };
235
251
  const encodeValue = (v) => encodeString(serializeValue(v));
236
252
  pairs.forEach(([pk, pv]) => {
package/esm/lib/http.d.ts CHANGED
@@ -17,11 +17,11 @@ export type BeforeRequestHook = (req: Request) => Awaitable<Request | void>;
17
17
  export type RequestErrorHook = (err: unknown, req: Request) => Awaitable<void>;
18
18
  export type ResponseHook = (res: Response, req: Request) => Awaitable<void>;
19
19
  export declare class HTTPClient {
20
- private options;
21
20
  private fetcher;
22
21
  private requestHooks;
23
22
  private requestErrorHooks;
24
23
  private responseHooks;
24
+ private options;
25
25
  constructor(options?: HTTPClientOptions);
26
26
  request(request: Request): Promise<Response>;
27
27
  /**
package/esm/lib/http.js CHANGED
@@ -16,10 +16,10 @@ const DEFAULT_FETCHER = (input, init) => {
16
16
  };
17
17
  export class HTTPClient {
18
18
  constructor(options = {}) {
19
- this.options = options;
20
19
  this.requestHooks = [];
21
20
  this.requestErrorHooks = [];
22
21
  this.responseHooks = [];
22
+ this.options = options;
23
23
  this.fetcher = options.fetcher || DEFAULT_FETCHER;
24
24
  }
25
25
  async request(request) {
@@ -6,10 +6,11 @@ type OAuth2PasswordFlow = {
6
6
  clientSecret?: string | undefined;
7
7
  tokenURL: string;
8
8
  };
9
- export declare enum SecurityErrorCode {
10
- Incomplete = "incomplete",
11
- UnrecognisedSecurityType = "unrecognized_security_type"
12
- }
9
+ export declare const SecurityErrorCode: {
10
+ readonly Incomplete: "incomplete";
11
+ readonly UnrecognisedSecurityType: "unrecognized_security_type";
12
+ };
13
+ export type SecurityErrorCode = (typeof SecurityErrorCode)[keyof typeof SecurityErrorCode];
13
14
  export declare class SecurityError extends Error {
14
15
  code: SecurityErrorCode;
15
16
  constructor(code: SecurityErrorCode, message: string);
@@ -3,11 +3,10 @@
3
3
  * @generated-id: 0502afa7922e
4
4
  */
5
5
  import { env } from "./env.js";
6
- export var SecurityErrorCode;
7
- (function (SecurityErrorCode) {
8
- SecurityErrorCode["Incomplete"] = "incomplete";
9
- SecurityErrorCode["UnrecognisedSecurityType"] = "unrecognized_security_type";
10
- })(SecurityErrorCode || (SecurityErrorCode = {}));
6
+ export const SecurityErrorCode = {
7
+ Incomplete: "incomplete",
8
+ UnrecognisedSecurityType: "unrecognized_security_type",
9
+ };
11
10
  export class SecurityError extends Error {
12
11
  constructor(code, message) {
13
12
  super(message);
@@ -48,6 +48,11 @@ export declare const AdditionalToolsItemTypeFunction: {
48
48
  readonly Function: "function";
49
49
  };
50
50
  export type AdditionalToolsItemTypeFunction = ClosedEnum<typeof AdditionalToolsItemTypeFunction>;
51
+ export declare const AdditionalToolsItemAllowedCaller: {
52
+ readonly Direct: "direct";
53
+ readonly Programmatic: "programmatic";
54
+ };
55
+ export type AdditionalToolsItemAllowedCaller = OpenEnum<typeof AdditionalToolsItemAllowedCaller>;
51
56
  /**
52
57
  * Function tool definition
53
58
  */
@@ -59,14 +64,18 @@ export type AdditionalToolsItemToolFunction = {
59
64
  } | null;
60
65
  strict?: boolean | null | undefined;
61
66
  type: AdditionalToolsItemTypeFunction;
67
+ allowedCallers?: Array<AdditionalToolsItemAllowedCaller> | null | undefined;
62
68
  /**
63
69
  * Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere.
64
70
  */
65
71
  async?: boolean | undefined;
66
72
  /**
67
- * Withhold this tool from the model until `openrouter:tool_search` finds it. Requires the tool search server tool; at least one tool must remain non-deferred.
73
+ * Withhold this tool from the model until `openrouter:tool_search` finds it. Where the request declares no search tool, OpenRouter may add `openrouter:tool_search` to serve the flag, and otherwise sends the tool in full. A request that declares the search tool itself must keep at least one tool non-deferred.
68
74
  */
69
75
  deferLoading?: boolean | undefined;
76
+ outputSchema?: {
77
+ [k: string]: any;
78
+ } | null | undefined;
70
79
  };
71
80
  export type AdditionalToolsItemToolUnion = ComputerUseServerTool | NamespaceTool | AdditionalToolsItemToolFunction | FileSearchServerTool | CodeInterpreterServerTool | McpServerTool | CustomTool | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | AdvisorServerToolOpenRouter | SubagentServerToolOpenRouter | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter | SearchModelsServerToolOpenRouter | WebFetchServerTool | WebSearchServerToolOpenRouter | ApplyPatchServerToolOpenRouter | BashServerTool | ShellServerToolOpenRouter | ToolSearchServerTool | AdditionalToolsItemTool;
72
81
  export declare const TypeAdditionalTools: {
@@ -95,6 +104,8 @@ export declare function additionalToolsItemToolToJSON(additionalToolsItemTool: A
95
104
  /** @internal */
96
105
  export declare const AdditionalToolsItemTypeFunction$outboundSchema: z.ZodEnum<typeof AdditionalToolsItemTypeFunction>;
97
106
  /** @internal */
107
+ export declare const AdditionalToolsItemAllowedCaller$outboundSchema: z.ZodType<string, AdditionalToolsItemAllowedCaller>;
108
+ /** @internal */
98
109
  export type AdditionalToolsItemToolFunction$Outbound = {
99
110
  description?: string | null | undefined;
100
111
  name: string;
@@ -103,8 +114,12 @@ export type AdditionalToolsItemToolFunction$Outbound = {
103
114
  } | null;
104
115
  strict?: boolean | null | undefined;
105
116
  type: string;
117
+ allowed_callers?: Array<string> | null | undefined;
106
118
  async?: boolean | undefined;
107
119
  defer_loading?: boolean | undefined;
120
+ output_schema?: {
121
+ [k: string]: any;
122
+ } | null | undefined;
108
123
  };
109
124
  /** @internal */
110
125
  export declare const AdditionalToolsItemToolFunction$outboundSchema: z.ZodType<AdditionalToolsItemToolFunction$Outbound, AdditionalToolsItemToolFunction>;
@@ -45,6 +45,10 @@ export const AdditionalToolsItemRole = {
45
45
  export const AdditionalToolsItemTypeFunction = {
46
46
  Function: "function",
47
47
  };
48
+ export const AdditionalToolsItemAllowedCaller = {
49
+ Direct: "direct",
50
+ Programmatic: "programmatic",
51
+ };
48
52
  export const TypeAdditionalTools = {
49
53
  AdditionalTools: "additional_tools",
50
54
  };
@@ -68,17 +72,23 @@ export function additionalToolsItemToolToJSON(additionalToolsItemTool) {
68
72
  /** @internal */
69
73
  export const AdditionalToolsItemTypeFunction$outboundSchema = z.enum(AdditionalToolsItemTypeFunction);
70
74
  /** @internal */
75
+ export const AdditionalToolsItemAllowedCaller$outboundSchema = openEnums.outboundSchema(AdditionalToolsItemAllowedCaller);
76
+ /** @internal */
71
77
  export const AdditionalToolsItemToolFunction$outboundSchema = z.object({
72
78
  description: z.nullable(z.string()).optional(),
73
79
  name: z.string(),
74
80
  parameters: z.nullable(z.record(z.string(), z.any())),
75
81
  strict: z.nullable(z.boolean()).optional(),
76
82
  type: AdditionalToolsItemTypeFunction$outboundSchema,
83
+ allowedCallers: z.nullable(z.array(AdditionalToolsItemAllowedCaller$outboundSchema)).optional(),
77
84
  async: z.boolean().optional(),
78
85
  deferLoading: z.boolean().optional(),
86
+ outputSchema: z.nullable(z.record(z.string(), z.any())).optional(),
79
87
  }).transform((v) => {
80
88
  return remap$(v, {
89
+ allowedCallers: "allowed_callers",
81
90
  deferLoading: "defer_loading",
91
+ outputSchema: "output_schema",
82
92
  });
83
93
  });
84
94
  export function additionalToolsItemToolFunctionToJSON(additionalToolsItemToolFunction) {
@@ -7,7 +7,7 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
7
7
  */
8
8
  export type Alignment = {
9
9
  /**
10
- * One record per evaluated assistant message of the request, in the order the messages were produced.
10
+ * One record per evaluated assistant message of the request, in the order the messages were produced. Empty when no message of the request had content to evaluate.
11
11
  */
12
12
  calls: Array<AlignmentCallRecord>;
13
13
  };
@@ -1,18 +1,19 @@
1
1
  import * as z from "zod/v4";
2
2
  import { OpenEnum } from "../types/enums.js";
3
+ import { AlignmentRule, AlignmentRule$Outbound } from "./alignmentrule.js";
3
4
  /**
4
- * `enforce`: a turn that breaks a rule is withheld, retried, and finally returned as an error. `audit`: every turn is evaluated and returned. Default `enforce`.
5
+ * `enforce`: a turn that breaks a rule is withheld, retried, and finally returned as an error. `audit`: every turn is evaluated and returned. Default `audit`.
5
6
  */
6
7
  export declare const AlignmentPluginMode: {
7
8
  readonly Enforce: "enforce";
8
9
  readonly Audit: "audit";
9
10
  };
10
11
  /**
11
- * `enforce`: a turn that breaks a rule is withheld, retried, and finally returned as an error. `audit`: every turn is evaluated and returned. Default `enforce`.
12
+ * `enforce`: a turn that breaks a rule is withheld, retried, and finally returned as an error. `audit`: every turn is evaluated and returned. Default `audit`.
12
13
  */
13
14
  export type AlignmentPluginMode = OpenEnum<typeof AlignmentPluginMode>;
14
15
  /**
15
- * Beta. States the listed rules to the model and evaluates every turn against them. Requests are evaluated only for entities admitted to the beta; the configuration, metadata, and error shapes may change.
16
+ * Beta. States the listed rules to the model and evaluates every turn against them; the configuration, metadata, and error shapes may change.
16
17
  */
17
18
  export type AlignmentPlugin = {
18
19
  id: "alignment";
@@ -25,15 +26,15 @@ export type AlignmentPlugin = {
25
26
  */
26
27
  maxRetries?: number | undefined;
27
28
  /**
28
- * `enforce`: a turn that breaks a rule is withheld, retried, and finally returned as an error. `audit`: every turn is evaluated and returned. Default `enforce`.
29
+ * `enforce`: a turn that breaks a rule is withheld, retried, and finally returned as an error. `audit`: every turn is evaluated and returned. Default `audit`.
29
30
  */
30
31
  mode?: AlignmentPluginMode | undefined;
31
32
  /**
32
- * Texts that state what the reply must do or must not do. Each rule is evaluated on its own.
33
+ * Rules the reply must follow. Each rule is evaluated on its own.
33
34
  */
34
- rules: Array<string>;
35
+ rules: Array<AlignmentRule>;
35
36
  /**
36
- * Probability at or above which a rule is broken. Default 0.7.
37
+ * Probability at or above which a rule is broken, from 0.01 to 1. Default 0.7.
37
38
  */
38
39
  threshold?: number | undefined;
39
40
  };
@@ -45,7 +46,7 @@ export type AlignmentPlugin$Outbound = {
45
46
  instruct?: boolean | undefined;
46
47
  max_retries?: number | undefined;
47
48
  mode?: string | undefined;
48
- rules: Array<string>;
49
+ rules: Array<AlignmentRule$Outbound>;
49
50
  threshold?: number | undefined;
50
51
  };
51
52
  /** @internal */
@@ -5,8 +5,9 @@
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
7
  import * as openEnums from "../types/enums.js";
8
+ import { AlignmentRule$outboundSchema, } from "./alignmentrule.js";
8
9
  /**
9
- * `enforce`: a turn that breaks a rule is withheld, retried, and finally returned as an error. `audit`: every turn is evaluated and returned. Default `enforce`.
10
+ * `enforce`: a turn that breaks a rule is withheld, retried, and finally returned as an error. `audit`: every turn is evaluated and returned. Default `audit`.
10
11
  */
11
12
  export const AlignmentPluginMode = {
12
13
  Enforce: "enforce",
@@ -20,7 +21,7 @@ export const AlignmentPlugin$outboundSchema = z.object({
20
21
  instruct: z.boolean().optional(),
21
22
  maxRetries: z.int().optional(),
22
23
  mode: AlignmentPluginMode$outboundSchema.optional(),
23
- rules: z.array(z.string()),
24
+ rules: z.array(AlignmentRule$outboundSchema),
24
25
  threshold: z.number().optional(),
25
26
  }).transform((v) => {
26
27
  return remap$(v, {
@@ -0,0 +1,31 @@
1
+ import * as z from "zod/v4";
2
+ import { OpenEnum } from "../types/enums.js";
3
+ export declare const Watch: {
4
+ readonly Content: "content";
5
+ readonly ToolCalls: "tool_calls";
6
+ readonly Refusal: "refusal";
7
+ readonly Images: "images";
8
+ readonly Audio: "audio";
9
+ };
10
+ export type Watch = OpenEnum<typeof Watch>;
11
+ export type AlignmentRule = {
12
+ /**
13
+ * Text that states what the reply must do or must not do.
14
+ */
15
+ rule: string;
16
+ /**
17
+ * Fields of the assistant message the rule applies to. The rule is evaluated on a message that has at least one of them and is not applicable to any other message.
18
+ */
19
+ watch: Array<Watch>;
20
+ };
21
+ /** @internal */
22
+ export declare const Watch$outboundSchema: z.ZodType<string, Watch>;
23
+ /** @internal */
24
+ export type AlignmentRule$Outbound = {
25
+ rule: string;
26
+ watch: Array<string>;
27
+ };
28
+ /** @internal */
29
+ export declare const AlignmentRule$outboundSchema: z.ZodType<AlignmentRule$Outbound, AlignmentRule>;
30
+ export declare function alignmentRuleToJSON(alignmentRule: AlignmentRule): string;
31
+ //# sourceMappingURL=alignmentrule.d.ts.map
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 8aa3253017e1
4
+ */
5
+ import * as z from "zod/v4";
6
+ import * as openEnums from "../types/enums.js";
7
+ export const Watch = {
8
+ Content: "content",
9
+ ToolCalls: "tool_calls",
10
+ Refusal: "refusal",
11
+ Images: "images",
12
+ Audio: "audio",
13
+ };
14
+ /** @internal */
15
+ export const Watch$outboundSchema = openEnums
16
+ .outboundSchema(Watch);
17
+ /** @internal */
18
+ export const AlignmentRule$outboundSchema = z.object({
19
+ rule: z.string(),
20
+ watch: z.array(Watch$outboundSchema),
21
+ });
22
+ export function alignmentRuleToJSON(alignmentRule) {
23
+ return JSON.stringify(AlignmentRule$outboundSchema.parse(alignmentRule));
24
+ }
25
+ //# sourceMappingURL=alignmentrule.js.map
@@ -3,13 +3,17 @@ import { Result as SafeParseResult } from "../types/fp.js";
3
3
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
4
  export type AlignmentRuleRecord = {
5
5
  /**
6
- * Whether probability is at or above the threshold.
6
+ * Whether the message has a field the rule watches. Only an applicable rule is evaluated.
7
+ */
8
+ applicable: boolean;
9
+ /**
10
+ * Whether probability is at or above the threshold. False when the rule is not applicable.
7
11
  */
8
12
  broken: boolean;
9
13
  /**
10
- * The evaluator's probability that the turn breaks the rule.
14
+ * The evaluator's probability that the turn breaks the rule; null when the rule is not applicable.
11
15
  */
12
- probability: number;
16
+ probability: number | null;
13
17
  };
14
18
  /** @internal */
15
19
  export declare const AlignmentRuleRecord$inboundSchema: z.ZodType<AlignmentRuleRecord, unknown>;
@@ -6,8 +6,9 @@ import * as z from "zod/v4";
6
6
  import { safeParse } from "../lib/schemas.js";
7
7
  /** @internal */
8
8
  export const AlignmentRuleRecord$inboundSchema = z.object({
9
+ applicable: z.boolean(),
9
10
  broken: z.boolean(),
10
- probability: z.number(),
11
+ probability: z.nullable(z.number()),
11
12
  });
12
13
  export function alignmentRuleRecordFromJSON(jsonString) {
13
14
  return safeParse(jsonString, (x) => AlignmentRuleRecord$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AlignmentRuleRecord' from JSON`);
@@ -0,0 +1,44 @@
1
+ import * as z from "zod/v4";
2
+ import { ArmorEnvironmentEntry, ArmorEnvironmentEntry$Outbound } from "./armorenvironmententry.js";
3
+ import { ArmorRule, ArmorRule$Outbound } from "./armorrule.js";
4
+ export type Allow = ArmorRule | string;
5
+ export type Environment = ArmorEnvironmentEntry | string;
6
+ export type HardDeny = ArmorRule | string;
7
+ export type SoftDeny = ArmorRule | string;
8
+ export type ArmorAutoMode = {
9
+ allow?: Array<ArmorRule | string> | undefined;
10
+ environment?: Array<ArmorEnvironmentEntry | string> | undefined;
11
+ hardDeny?: Array<ArmorRule | string> | undefined;
12
+ softDeny?: Array<ArmorRule | string> | undefined;
13
+ };
14
+ /** @internal */
15
+ export type Allow$Outbound = ArmorRule$Outbound | string;
16
+ /** @internal */
17
+ export declare const Allow$outboundSchema: z.ZodType<Allow$Outbound, Allow>;
18
+ export declare function allowToJSON(allow: Allow): string;
19
+ /** @internal */
20
+ export type Environment$Outbound = ArmorEnvironmentEntry$Outbound | string;
21
+ /** @internal */
22
+ export declare const Environment$outboundSchema: z.ZodType<Environment$Outbound, Environment>;
23
+ export declare function environmentToJSON(environment: Environment): string;
24
+ /** @internal */
25
+ export type HardDeny$Outbound = ArmorRule$Outbound | string;
26
+ /** @internal */
27
+ export declare const HardDeny$outboundSchema: z.ZodType<HardDeny$Outbound, HardDeny>;
28
+ export declare function hardDenyToJSON(hardDeny: HardDeny): string;
29
+ /** @internal */
30
+ export type SoftDeny$Outbound = ArmorRule$Outbound | string;
31
+ /** @internal */
32
+ export declare const SoftDeny$outboundSchema: z.ZodType<SoftDeny$Outbound, SoftDeny>;
33
+ export declare function softDenyToJSON(softDeny: SoftDeny): string;
34
+ /** @internal */
35
+ export type ArmorAutoMode$Outbound = {
36
+ allow?: Array<ArmorRule$Outbound | string> | undefined;
37
+ environment?: Array<ArmorEnvironmentEntry$Outbound | string> | undefined;
38
+ hard_deny?: Array<ArmorRule$Outbound | string> | undefined;
39
+ soft_deny?: Array<ArmorRule$Outbound | string> | undefined;
40
+ };
41
+ /** @internal */
42
+ export declare const ArmorAutoMode$outboundSchema: z.ZodType<ArmorAutoMode$Outbound, ArmorAutoMode>;
43
+ export declare function armorAutoModeToJSON(armorAutoMode: ArmorAutoMode): string;
44
+ //# sourceMappingURL=armorautomode.d.ts.map
@@ -0,0 +1,49 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 01d4fa4d2f15
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { ArmorEnvironmentEntry$outboundSchema, } from "./armorenvironmententry.js";
8
+ import { ArmorRule$outboundSchema, } from "./armorrule.js";
9
+ /** @internal */
10
+ export const Allow$outboundSchema = z.union([
11
+ ArmorRule$outboundSchema,
12
+ z.string(),
13
+ ]);
14
+ export function allowToJSON(allow) {
15
+ return JSON.stringify(Allow$outboundSchema.parse(allow));
16
+ }
17
+ /** @internal */
18
+ export const Environment$outboundSchema = z.union([ArmorEnvironmentEntry$outboundSchema, z.string()]);
19
+ export function environmentToJSON(environment) {
20
+ return JSON.stringify(Environment$outboundSchema.parse(environment));
21
+ }
22
+ /** @internal */
23
+ export const HardDeny$outboundSchema = z
24
+ .union([ArmorRule$outboundSchema, z.string()]);
25
+ export function hardDenyToJSON(hardDeny) {
26
+ return JSON.stringify(HardDeny$outboundSchema.parse(hardDeny));
27
+ }
28
+ /** @internal */
29
+ export const SoftDeny$outboundSchema = z
30
+ .union([ArmorRule$outboundSchema, z.string()]);
31
+ export function softDenyToJSON(softDeny) {
32
+ return JSON.stringify(SoftDeny$outboundSchema.parse(softDeny));
33
+ }
34
+ /** @internal */
35
+ export const ArmorAutoMode$outboundSchema = z.object({
36
+ allow: z.array(z.union([ArmorRule$outboundSchema, z.string()])).optional(),
37
+ environment: z.array(z.union([ArmorEnvironmentEntry$outboundSchema, z.string()])).optional(),
38
+ hardDeny: z.array(z.union([ArmorRule$outboundSchema, z.string()])).optional(),
39
+ softDeny: z.array(z.union([ArmorRule$outboundSchema, z.string()])).optional(),
40
+ }).transform((v) => {
41
+ return remap$(v, {
42
+ hardDeny: "hard_deny",
43
+ softDeny: "soft_deny",
44
+ });
45
+ });
46
+ export function armorAutoModeToJSON(armorAutoMode) {
47
+ return JSON.stringify(ArmorAutoMode$outboundSchema.parse(armorAutoMode));
48
+ }
49
+ //# sourceMappingURL=armorautomode.js.map
@@ -0,0 +1,22 @@
1
+ import * as z from "zod/v4";
2
+ import { ArmorAutoMode, ArmorAutoMode$Outbound } from "./armorautomode.js";
3
+ /**
4
+ * The Armor context: Claude Code's `classifier_context` (v1), with `auto_mode.{hard_deny,soft_deny,allow}` rules as strings or `{ id, instructions, threshold? }` objects and `auto_mode.environment` entries as `"Name: value"` strings or `{ name, value }` objects. `threshold` applies when Armor evaluates; when the provider evaluates natively (Anthropic dangerous-tool-use beta) rules are judged at the provider's own boundary.
5
+ */
6
+ export type ArmorContext = {
7
+ autoMode?: ArmorAutoMode | undefined;
8
+ v: number;
9
+ additionalProperties?: {
10
+ [k: string]: any;
11
+ } | undefined;
12
+ };
13
+ /** @internal */
14
+ export type ArmorContext$Outbound = {
15
+ auto_mode?: ArmorAutoMode$Outbound | undefined;
16
+ v: number;
17
+ [additionalProperties: string]: unknown;
18
+ };
19
+ /** @internal */
20
+ export declare const ArmorContext$outboundSchema: z.ZodType<ArmorContext$Outbound, ArmorContext>;
21
+ export declare function armorContextToJSON(armorContext: ArmorContext): string;
22
+ //# sourceMappingURL=armorcontext.d.ts.map