@orq-ai/node 4.15.0-rc.21 → 4.15.0-rc.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -28
- package/funcs/hubGet.d.ts +18 -0
- package/funcs/hubGet.d.ts.map +1 -0
- package/funcs/hubGet.js +121 -0
- package/funcs/hubGet.js.map +1 -0
- package/funcs/hubSearch.d.ts +18 -0
- package/funcs/hubSearch.d.ts.map +1 -0
- package/funcs/hubSearch.js +120 -0
- package/funcs/hubSearch.js.map +1 -0
- package/funcs/piiCapabilities.d.ts +17 -0
- package/funcs/piiCapabilities.d.ts.map +1 -0
- package/funcs/piiCapabilities.js +105 -0
- package/funcs/piiCapabilities.js.map +1 -0
- package/funcs/sessionsCreate.d.ts +17 -0
- package/funcs/sessionsCreate.d.ts.map +1 -0
- package/funcs/sessionsCreate.js +115 -0
- package/funcs/sessionsCreate.js.map +1 -0
- package/funcs/sessionsDelete.d.ts +17 -0
- package/funcs/sessionsDelete.d.ts.map +1 -0
- package/funcs/sessionsDelete.js +121 -0
- package/funcs/sessionsDelete.js.map +1 -0
- package/funcs/sessionsGet.d.ts +18 -0
- package/funcs/sessionsGet.d.ts.map +1 -0
- package/funcs/sessionsGet.js +121 -0
- package/funcs/sessionsGet.js.map +1 -0
- package/funcs/sessionsGetCount.d.ts +17 -0
- package/funcs/sessionsGetCount.d.ts.map +1 -0
- package/funcs/sessionsGetCount.js +115 -0
- package/funcs/sessionsGetCount.js.map +1 -0
- package/funcs/sessionsList.d.ts +17 -0
- package/funcs/sessionsList.d.ts.map +1 -0
- package/funcs/sessionsList.js +115 -0
- package/funcs/sessionsList.js.map +1 -0
- package/funcs/sessionsListTags.d.ts +16 -0
- package/funcs/sessionsListTags.d.ts.map +1 -0
- package/funcs/sessionsListTags.js +105 -0
- package/funcs/sessionsListTags.js.map +1 -0
- package/funcs/sessionsUpdate.d.ts +18 -0
- package/funcs/sessionsUpdate.d.ts.map +1 -0
- package/funcs/sessionsUpdate.js +124 -0
- package/funcs/sessionsUpdate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/agentresponserequest.d.ts +6 -6
- package/models/components/agentresponserequest.d.ts.map +1 -1
- package/models/components/agentresponserequest.js +6 -6
- package/models/components/agentresponserequest.js.map +1 -1
- package/models/components/agentstartedstreamingevent.d.ts +13 -1
- package/models/components/agentstartedstreamingevent.d.ts.map +1 -1
- package/models/components/agentstartedstreamingevent.js +2 -0
- package/models/components/agentstartedstreamingevent.js.map +1 -1
- package/models/components/capabilitiesresponse.d.ts +62 -0
- package/models/components/capabilitiesresponse.d.ts.map +1 -0
- package/models/components/capabilitiesresponse.js +68 -0
- package/models/components/capabilitiesresponse.js.map +1 -0
- package/models/components/createthreadrequest.d.ts +41 -0
- package/models/components/createthreadrequest.d.ts.map +1 -0
- package/models/components/createthreadrequest.js +75 -0
- package/models/components/createthreadrequest.js.map +1 -0
- package/models/components/detectrequest.d.ts +48 -0
- package/models/components/detectrequest.d.ts.map +1 -1
- package/models/components/detectrequest.js +4 -0
- package/models/components/detectrequest.js.map +1 -1
- package/models/components/entitylist.d.ts +16 -0
- package/models/components/entitylist.d.ts.map +1 -0
- package/models/components/entitylist.js +50 -0
- package/models/components/entitylist.js.map +1 -0
- package/models/components/gethubitemresponse.d.ts +11 -0
- package/models/components/gethubitemresponse.d.ts.map +1 -0
- package/models/components/gethubitemresponse.js +56 -0
- package/models/components/gethubitemresponse.js.map +1 -0
- package/models/components/getthreadcountrequest.d.ts +17 -0
- package/models/components/getthreadcountrequest.d.ts.map +1 -0
- package/models/components/getthreadcountrequest.js +52 -0
- package/models/components/getthreadcountrequest.js.map +1 -0
- package/models/components/getthreadcountresponse.d.ts +10 -0
- package/models/components/getthreadcountresponse.d.ts.map +1 -0
- package/models/components/getthreadcountresponse.js +50 -0
- package/models/components/getthreadcountresponse.js.map +1 -0
- package/models/components/guardrailruleplugin.d.ts +25 -0
- package/models/components/guardrailruleplugin.d.ts.map +1 -1
- package/models/components/guardrailruleplugin.js +6 -0
- package/models/components/guardrailruleplugin.js.map +1 -1
- package/models/components/hubitem.d.ts +71 -0
- package/models/components/hubitem.d.ts.map +1 -0
- package/models/components/hubitem.js +83 -0
- package/models/components/hubitem.js.map +1 -0
- package/models/components/hubitemsummary.d.ts +29 -0
- package/models/components/hubitemsummary.d.ts.map +1 -0
- package/models/components/hubitemsummary.js +60 -0
- package/models/components/hubitemsummary.js.map +1 -0
- package/models/components/hubsearchhit.d.ts +11 -0
- package/models/components/hubsearchhit.d.ts.map +1 -0
- package/models/components/hubsearchhit.js +51 -0
- package/models/components/hubsearchhit.js.map +1 -0
- package/models/components/index.d.ts +21 -3
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +21 -3
- package/models/components/index.js.map +1 -1
- package/models/components/listthreadsrequest.d.ts +17 -0
- package/models/components/listthreadsrequest.d.ts.map +1 -0
- package/models/components/listthreadsrequest.js +52 -0
- package/models/components/listthreadsrequest.js.map +1 -0
- package/models/components/listthreadsresponse.d.ts +13 -0
- package/models/components/listthreadsresponse.d.ts.map +1 -0
- package/models/components/listthreadsresponse.js +58 -0
- package/models/components/listthreadsresponse.js.map +1 -0
- package/models/components/openaipromptcacheoptions.d.ts +37 -0
- package/models/components/openaipromptcacheoptions.d.ts.map +1 -0
- package/models/components/openaipromptcacheoptions.js +75 -0
- package/models/components/openaipromptcacheoptions.js.map +1 -0
- package/models/components/piiredactionplugin.d.ts +84 -0
- package/models/components/piiredactionplugin.d.ts.map +1 -0
- package/models/components/piiredactionplugin.js +103 -0
- package/models/components/piiredactionplugin.js.map +1 -0
- package/models/components/publicplugin.d.ts +17 -16
- package/models/components/publicplugin.d.ts.map +1 -1
- package/models/components/publicplugin.js +5 -11
- package/models/components/publicplugin.js.map +1 -1
- package/models/components/publicresponseresource.d.ts +2 -0
- package/models/components/publicresponseresource.d.ts.map +1 -1
- package/models/components/publicresponseresource.js +3 -0
- package/models/components/publicresponseresource.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/components/redactrequest.d.ts +48 -0
- package/models/components/redactrequest.d.ts.map +1 -1
- package/models/components/redactrequest.js +8 -0
- package/models/components/redactrequest.js.map +1 -1
- package/models/components/responsehealingplugin.d.ts +2 -17
- package/models/components/responsehealingplugin.d.ts.map +1 -1
- package/models/components/responsehealingplugin.js +3 -13
- package/models/components/responsehealingplugin.js.map +1 -1
- package/models/components/routingruleplugin.d.ts +25 -0
- package/models/components/routingruleplugin.d.ts.map +1 -1
- package/models/components/routingruleplugin.js +6 -0
- package/models/components/routingruleplugin.js.map +1 -1
- package/models/components/searchhubitemsresponse.d.ts +11 -0
- package/models/components/searchhubitemsresponse.d.ts.map +1 -0
- package/models/components/searchhubitemsresponse.js +51 -0
- package/models/components/searchhubitemsresponse.js.map +1 -0
- package/models/components/sessioninterval.d.ts +19 -0
- package/models/components/sessioninterval.d.ts.map +1 -0
- package/models/components/sessioninterval.js +56 -0
- package/models/components/sessioninterval.js.map +1 -0
- package/models/components/textcontentpartschema.d.ts +5 -5
- package/models/components/textcontentpartschema.d.ts.map +1 -1
- package/models/components/textcontentpartschema.js +6 -6
- package/models/components/textcontentpartschema.js.map +1 -1
- package/models/components/thread.d.ts +54 -0
- package/models/components/thread.d.ts.map +1 -0
- package/models/components/thread.js +79 -0
- package/models/components/thread.js.map +1 -0
- package/models/components/threadbilling.d.ts +21 -0
- package/models/components/threadbilling.d.ts.map +1 -0
- package/models/components/threadbilling.js +75 -0
- package/models/components/threadbilling.js.map +1 -0
- package/models/components/threadfilters.d.ts +34 -0
- package/models/components/threadfilters.d.ts.map +1 -0
- package/models/components/threadfilters.js +65 -0
- package/models/components/threadfilters.js.map +1 -0
- package/models/components/threadkind.d.ts +13 -0
- package/models/components/threadkind.d.ts.map +1 -0
- package/models/components/threadkind.js +51 -0
- package/models/components/threadkind.js.map +1 -0
- package/models/components/threadusage.d.ts +21 -0
- package/models/components/threadusage.d.ts.map +1 -0
- package/models/components/threadusage.js +75 -0
- package/models/components/threadusage.js.map +1 -0
- package/models/components/tracescrubbingplugin.d.ts +2 -16
- package/models/components/tracescrubbingplugin.d.ts.map +1 -1
- package/models/components/tracescrubbingplugin.js +3 -13
- package/models/components/tracescrubbingplugin.js.map +1 -1
- package/models/components/updatethreadrequest.d.ts +51 -0
- package/models/components/updatethreadrequest.d.ts.map +1 -0
- package/models/components/updatethreadrequest.js +79 -0
- package/models/components/updatethreadrequest.js.map +1 -0
- package/models/operations/createagentrequest.d.ts +67 -13
- package/models/operations/createagentrequest.d.ts.map +1 -1
- package/models/operations/createagentrequest.js +20 -32
- package/models/operations/createagentrequest.js.map +1 -1
- package/models/operations/createchatcompletion.d.ts +12 -4
- package/models/operations/createchatcompletion.d.ts.map +1 -1
- package/models/operations/createchatcompletion.js +4 -8
- package/models/operations/createchatcompletion.js.map +1 -1
- package/models/operations/createcompletion.d.ts +2 -8
- package/models/operations/createcompletion.d.ts.map +1 -1
- package/models/operations/createcompletion.js +3 -17
- package/models/operations/createcompletion.js.map +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +5 -5
- package/models/operations/createimage.d.ts +2 -8
- package/models/operations/createimage.d.ts.map +1 -1
- package/models/operations/createimage.js +2 -16
- package/models/operations/createimage.js.map +1 -1
- package/models/operations/createprompt.d.ts +18 -6
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +8 -16
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/creatererank.d.ts +2 -8
- package/models/operations/creatererank.d.ts.map +1 -1
- package/models/operations/creatererank.js +2 -16
- package/models/operations/creatererank.js.map +1 -1
- package/models/operations/createrouterresponse.d.ts +80 -8
- package/models/operations/createrouterresponse.d.ts.map +1 -1
- package/models/operations/createrouterresponse.js +48 -5
- package/models/operations/createrouterresponse.js.map +1 -1
- package/models/operations/createtool.js +4 -4
- package/models/operations/deletesession.d.ts +12 -0
- package/models/operations/deletesession.d.ts.map +1 -0
- package/models/operations/deletesession.js +54 -0
- package/models/operations/deletesession.js.map +1 -0
- package/models/operations/getallprompts.d.ts +6 -2
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +4 -8
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.js +4 -4
- package/models/operations/getoneprompt.d.ts +6 -2
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +4 -8
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +6 -2
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +4 -8
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/getsession.d.ts +12 -0
- package/models/operations/getsession.d.ts.map +1 -0
- package/models/operations/getsession.js +54 -0
- package/models/operations/getsession.js.map +1 -0
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/hubget.d.ts +12 -0
- package/models/operations/hubget.d.ts.map +1 -0
- package/models/operations/hubget.js +49 -0
- package/models/operations/hubget.js.map +1 -0
- package/models/operations/hubsearch.d.ts +14 -0
- package/models/operations/hubsearch.d.ts.map +1 -0
- package/models/operations/hubsearch.js +50 -0
- package/models/operations/hubsearch.js.map +1 -0
- package/models/operations/index.d.ts +5 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +5 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listagents.d.ts +25 -5
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +10 -16
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +5 -5
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listpromptversions.d.ts +6 -2
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +4 -8
- package/models/operations/listpromptversions.js.map +1 -1
- package/models/operations/modelcreateopenailike.d.ts +4 -0
- package/models/operations/modelcreateopenailike.d.ts.map +1 -1
- package/models/operations/modelcreateopenailike.js +4 -0
- package/models/operations/modelcreateopenailike.js.map +1 -1
- package/models/operations/modelupdateopenailike.d.ts +4 -0
- package/models/operations/modelupdateopenailike.d.ts.map +1 -1
- package/models/operations/modelupdateopenailike.js +4 -0
- package/models/operations/modelupdateopenailike.js.map +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +4 -4
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/postv2routerocr.d.ts +24 -0
- package/models/operations/postv2routerocr.d.ts.map +1 -1
- package/models/operations/postv2routerocr.js +12 -0
- package/models/operations/postv2routerocr.js.map +1 -1
- package/models/operations/retrieveagentrequest.d.ts +25 -5
- package/models/operations/retrieveagentrequest.d.ts.map +1 -1
- package/models/operations/retrieveagentrequest.js +10 -16
- package/models/operations/retrieveagentrequest.js.map +1 -1
- package/models/operations/retrievedatapoint.js +5 -5
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrieveresponse.d.ts +1 -0
- package/models/operations/retrieveresponse.d.ts.map +1 -1
- package/models/operations/retrieveresponse.js +2 -0
- package/models/operations/retrieveresponse.js.map +1 -1
- package/models/operations/retrievetool.js +4 -4
- package/models/operations/runagent.d.ts +42 -8
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +11 -17
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +42 -8
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +11 -17
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updateagent.d.ts +67 -13
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +20 -32
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updatedatapoint.js +5 -5
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updateprompt.d.ts +18 -6
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +8 -16
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatesession.d.ts +15 -0
- package/models/operations/updatesession.d.ts.map +1 -0
- package/models/operations/updatesession.js +57 -0
- package/models/operations/updatesession.js.map +1 -0
- package/models/operations/updatetool.js +4 -4
- package/package.json +1 -1
- package/sdk/hub.d.ts +20 -0
- package/sdk/hub.d.ts.map +1 -0
- package/sdk/hub.js +32 -0
- package/sdk/hub.js.map +1 -0
- package/sdk/pii.d.ts +7 -0
- package/sdk/pii.d.ts.map +1 -1
- package/sdk/pii.js +10 -0
- package/sdk/pii.js.map +1 -1
- package/sdk/sdk.d.ts +6 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +8 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/sessions.d.ts +55 -0
- package/sdk/sessions.d.ts.map +1 -0
- package/sdk/sessions.js +82 -0
- package/sdk/sessions.js.map +1 -0
- package/src/funcs/hubGet.ts +168 -0
- package/src/funcs/hubSearch.ts +169 -0
- package/src/funcs/piiCapabilities.ts +144 -0
- package/src/funcs/sessionsCreate.ts +162 -0
- package/src/funcs/sessionsDelete.ts +168 -0
- package/src/funcs/sessionsGet.ts +168 -0
- package/src/funcs/sessionsGetCount.ts +162 -0
- package/src/funcs/sessionsList.ts +162 -0
- package/src/funcs/sessionsListTags.ts +144 -0
- package/src/funcs/sessionsUpdate.ts +171 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/agentresponserequest.ts +14 -10
- package/src/models/components/agentstartedstreamingevent.ts +11 -1
- package/src/models/components/capabilitiesresponse.ts +96 -0
- package/src/models/components/createthreadrequest.ts +91 -0
- package/src/models/components/detectrequest.ts +48 -0
- package/src/models/components/entitylist.ts +37 -0
- package/src/models/components/gethubitemresponse.ts +37 -0
- package/src/models/components/getthreadcountrequest.ts +42 -0
- package/src/models/components/getthreadcountresponse.ts +31 -0
- package/src/models/components/guardrailruleplugin.ts +27 -0
- package/src/models/components/hubitem.ts +136 -0
- package/src/models/components/hubitemsummary.ts +60 -0
- package/src/models/components/hubsearchhit.ts +35 -0
- package/src/models/components/index.ts +21 -3
- package/src/models/components/listthreadsrequest.ts +42 -0
- package/src/models/components/listthreadsresponse.ts +41 -0
- package/src/models/components/openaipromptcacheoptions.ts +84 -0
- package/src/models/components/piiredactionplugin.ts +143 -0
- package/src/models/components/publicplugin.ts +17 -21
- package/src/models/components/publicresponseresource.ts +7 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/redactrequest.ts +52 -0
- package/src/models/components/responsehealingplugin.ts +4 -27
- package/src/models/components/routingruleplugin.ts +27 -0
- package/src/models/components/searchhubitemsresponse.ts +32 -0
- package/src/models/components/sessioninterval.ts +26 -0
- package/src/models/components/textcontentpartschema.ts +13 -8
- package/src/models/components/thread.ts +101 -0
- package/src/models/components/threadbilling.ts +68 -0
- package/src/models/components/threadfilters.ts +66 -0
- package/src/models/components/threadkind.ts +20 -0
- package/src/models/components/threadusage.ts +68 -0
- package/src/models/components/tracescrubbingplugin.ts +4 -24
- package/src/models/components/updatethreadrequest.ts +105 -0
- package/src/models/operations/createagentrequest.ts +85 -87
- package/src/models/operations/createchatcompletion.ts +18 -26
- package/src/models/operations/createcompletion.ts +3 -51
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +5 -5
- package/src/models/operations/createimage.ts +3 -51
- package/src/models/operations/createprompt.ts +31 -43
- package/src/models/operations/creatererank.ts +3 -51
- package/src/models/operations/createrouterresponse.ts +128 -9
- package/src/models/operations/createtool.ts +4 -4
- package/src/models/operations/deletesession.ts +36 -0
- package/src/models/operations/getallprompts.ts +13 -17
- package/src/models/operations/getalltools.ts +4 -4
- package/src/models/operations/getoneprompt.ts +13 -17
- package/src/models/operations/getpromptversion.ts +13 -17
- package/src/models/operations/getsession.ts +36 -0
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/hubget.ts +27 -0
- package/src/models/operations/hubsearch.ts +34 -0
- package/src/models/operations/index.ts +5 -0
- package/src/models/operations/listagents.ts +37 -35
- package/src/models/operations/listdatasetdatapoints.ts +5 -5
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listpromptversions.ts +13 -17
- package/src/models/operations/modelcreateopenailike.ts +8 -0
- package/src/models/operations/modelupdateopenailike.ts +8 -0
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +4 -4
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/postv2routerocr.ts +36 -0
- package/src/models/operations/retrieveagentrequest.ts +37 -35
- package/src/models/operations/retrievedatapoint.ts +5 -5
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrieveresponse.ts +5 -0
- package/src/models/operations/retrievetool.ts +4 -4
- package/src/models/operations/runagent.ts +49 -53
- package/src/models/operations/streamrunagent.ts +49 -53
- package/src/models/operations/updateagent.ts +85 -87
- package/src/models/operations/updatedatapoint.ts +5 -5
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updateprompt.ts +31 -43
- package/src/models/operations/updatesession.ts +41 -0
- package/src/models/operations/updatetool.ts +4 -4
- package/src/sdk/hub.ts +46 -0
- package/src/sdk/pii.ts +16 -0
- package/src/sdk/sdk.ts +12 -0
- package/src/sdk/sessions.ts +134 -0
- package/models/components/piiredactionpluginauto.d.ts +0 -126
- package/models/components/piiredactionpluginauto.d.ts.map +0 -1
- package/models/components/piiredactionpluginauto.js +0 -156
- package/models/components/piiredactionpluginauto.js.map +0 -1
- package/models/components/piiredactionpluginen.d.ts +0 -145
- package/models/components/piiredactionpluginen.d.ts.map +0 -1
- package/models/components/piiredactionpluginen.js +0 -167
- package/models/components/piiredactionpluginen.js.map +0 -1
- package/models/components/piiredactionpluginnl.d.ts +0 -137
- package/models/components/piiredactionpluginnl.d.ts.map +0 -1
- package/models/components/piiredactionpluginnl.js +0 -158
- package/models/components/piiredactionpluginnl.js.map +0 -1
- package/src/models/components/piiredactionpluginauto.ts +0 -185
- package/src/models/components/piiredactionpluginen.ts +0 -222
- package/src/models/components/piiredactionpluginnl.ts +0 -218
|
@@ -19,18 +19,6 @@ export const PublicPluginId = {
|
|
|
19
19
|
*/
|
|
20
20
|
export type PublicPluginId = ClosedEnum<typeof PublicPluginId>;
|
|
21
21
|
|
|
22
|
-
/**
|
|
23
|
-
* pii_redaction only. Detector language. Defaults to en.
|
|
24
|
-
*/
|
|
25
|
-
export const PublicPluginLanguage = {
|
|
26
|
-
En: "en",
|
|
27
|
-
Nl: "nl",
|
|
28
|
-
} as const;
|
|
29
|
-
/**
|
|
30
|
-
* pii_redaction only. Detector language. Defaults to en.
|
|
31
|
-
*/
|
|
32
|
-
export type PublicPluginLanguage = ClosedEnum<typeof PublicPluginLanguage>;
|
|
33
|
-
|
|
34
22
|
export const PublicPluginMask = {
|
|
35
23
|
All: "all",
|
|
36
24
|
System: "system",
|
|
@@ -55,17 +43,21 @@ export type PublicPluginOnFailure = ClosedEnum<typeof PublicPluginOnFailure>;
|
|
|
55
43
|
|
|
56
44
|
export type PublicPlugin = {
|
|
57
45
|
/**
|
|
58
|
-
* pii_redaction only. Entity types to redact (e.g. EMAIL_ADDRESS, BSN). Omit to redact every type detected for the language.
|
|
46
|
+
* pii_redaction only. Entity types to redact (e.g. EMAIL_ADDRESS, BSN). Omit to redact every type detected for the language and regions. Cannot be combined with regions.
|
|
59
47
|
*/
|
|
60
48
|
entities?: Array<string> | null | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* pii_redaction only. Per-entity confidence cutoff overrides in [0,1], keyed by entity type. An override replaces threshold for that type and may sit above or below it. Every key must also appear in entities.
|
|
51
|
+
*/
|
|
52
|
+
entityThresholds?: { [k: string]: number } | undefined;
|
|
61
53
|
/**
|
|
62
54
|
* Plugin discriminator. pii_redaction redacts PII, response_healing repairs malformed JSON, and trace_scrubbing removes selected sensitive fields from exported traces.
|
|
63
55
|
*/
|
|
64
56
|
id: PublicPluginId;
|
|
65
57
|
/**
|
|
66
|
-
* pii_redaction only. Detector language. Defaults to en.
|
|
58
|
+
* pii_redaction only. Detector language, or "auto" to detect it per request. Defaults to en. The accepted values are whatever GET /v2/pii/capabilities lists, so they are not enumerated here: a fixed enum would reject a language the detector has since added.
|
|
67
59
|
*/
|
|
68
|
-
language?:
|
|
60
|
+
language?: string | undefined;
|
|
69
61
|
/**
|
|
70
62
|
* trace_scrubbing only. Trace surfaces to scrub. At least one value required.
|
|
71
63
|
*/
|
|
@@ -74,6 +66,10 @@ export type PublicPlugin = {
|
|
|
74
66
|
* pii_redaction only. Behavior when redaction is unavailable. block (default) fails the request; passthrough sends the original text.
|
|
75
67
|
*/
|
|
76
68
|
onFailure?: PublicPluginOnFailure | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* pii_redaction only. Region codes gating regional recognizers (e.g. nl, gb). ["all"] is exclusive. Omit for base entities only. Cannot be combined with entities.
|
|
71
|
+
*/
|
|
72
|
+
regions?: Array<string> | null | undefined;
|
|
77
73
|
/**
|
|
78
74
|
* pii_redaction only. Detector confidence cutoff in [0,1].
|
|
79
75
|
*/
|
|
@@ -85,11 +81,6 @@ export const PublicPluginId$outboundSchema: z.ZodNativeEnum<
|
|
|
85
81
|
typeof PublicPluginId
|
|
86
82
|
> = z.nativeEnum(PublicPluginId);
|
|
87
83
|
|
|
88
|
-
/** @internal */
|
|
89
|
-
export const PublicPluginLanguage$outboundSchema: z.ZodNativeEnum<
|
|
90
|
-
typeof PublicPluginLanguage
|
|
91
|
-
> = z.nativeEnum(PublicPluginLanguage);
|
|
92
|
-
|
|
93
84
|
/** @internal */
|
|
94
85
|
export const PublicPluginMask$outboundSchema: z.ZodNativeEnum<
|
|
95
86
|
typeof PublicPluginMask
|
|
@@ -103,10 +94,12 @@ export const PublicPluginOnFailure$outboundSchema: z.ZodNativeEnum<
|
|
|
103
94
|
/** @internal */
|
|
104
95
|
export type PublicPlugin$Outbound = {
|
|
105
96
|
entities?: Array<string> | null | undefined;
|
|
97
|
+
entity_thresholds?: { [k: string]: number } | undefined;
|
|
106
98
|
id: string;
|
|
107
99
|
language?: string | undefined;
|
|
108
100
|
mask?: Array<string> | null | undefined;
|
|
109
101
|
on_failure?: string | undefined;
|
|
102
|
+
regions?: Array<string> | null | undefined;
|
|
110
103
|
threshold?: number | undefined;
|
|
111
104
|
};
|
|
112
105
|
|
|
@@ -117,13 +110,16 @@ export const PublicPlugin$outboundSchema: z.ZodType<
|
|
|
117
110
|
PublicPlugin
|
|
118
111
|
> = z.object({
|
|
119
112
|
entities: z.nullable(z.array(z.string())).optional(),
|
|
113
|
+
entityThresholds: z.record(z.number()).optional(),
|
|
120
114
|
id: PublicPluginId$outboundSchema,
|
|
121
|
-
language:
|
|
115
|
+
language: z.string().optional(),
|
|
122
116
|
mask: z.nullable(z.array(PublicPluginMask$outboundSchema)).optional(),
|
|
123
117
|
onFailure: PublicPluginOnFailure$outboundSchema.optional(),
|
|
118
|
+
regions: z.nullable(z.array(z.string())).optional(),
|
|
124
119
|
threshold: z.number().optional(),
|
|
125
120
|
}).transform((v) => {
|
|
126
121
|
return remap$(v, {
|
|
122
|
+
entityThresholds: "entity_thresholds",
|
|
127
123
|
onFailure: "on_failure",
|
|
128
124
|
});
|
|
129
125
|
});
|
|
@@ -17,6 +17,10 @@ import {
|
|
|
17
17
|
IncompleteDetails$inboundSchema,
|
|
18
18
|
} from "./incompletedetails.js";
|
|
19
19
|
import { MemoryParam, MemoryParam$inboundSchema } from "./memoryparam.js";
|
|
20
|
+
import {
|
|
21
|
+
OpenAIPromptCacheOptions,
|
|
22
|
+
OpenAIPromptCacheOptions$inboundSchema,
|
|
23
|
+
} from "./openaipromptcacheoptions.js";
|
|
20
24
|
import { PublicUsage, PublicUsage$inboundSchema } from "./publicusage.js";
|
|
21
25
|
import { Reasoning, Reasoning$inboundSchema } from "./reasoning.js";
|
|
22
26
|
import { ResponseError, ResponseError$inboundSchema } from "./responseerror.js";
|
|
@@ -86,6 +90,7 @@ export type PublicResponseResource = {
|
|
|
86
90
|
presencePenalty: number;
|
|
87
91
|
previousResponseId: string | null;
|
|
88
92
|
promptCacheKey: string | null;
|
|
93
|
+
promptCacheOptions: OpenAIPromptCacheOptions | null;
|
|
89
94
|
promptCacheRetention: string | null;
|
|
90
95
|
reasoning: Reasoning | null;
|
|
91
96
|
safetyIdentifier: string | null;
|
|
@@ -158,6 +163,7 @@ export const PublicResponseResource$inboundSchema: z.ZodType<
|
|
|
158
163
|
presence_penalty: z.number(),
|
|
159
164
|
previous_response_id: z.nullable(z.string()),
|
|
160
165
|
prompt_cache_key: z.nullable(z.string()),
|
|
166
|
+
prompt_cache_options: z.nullable(OpenAIPromptCacheOptions$inboundSchema),
|
|
161
167
|
prompt_cache_retention: z.nullable(z.string()),
|
|
162
168
|
reasoning: z.nullable(Reasoning$inboundSchema),
|
|
163
169
|
safety_identifier: z.nullable(z.string()),
|
|
@@ -188,6 +194,7 @@ export const PublicResponseResource$inboundSchema: z.ZodType<
|
|
|
188
194
|
"presence_penalty": "presencePenalty",
|
|
189
195
|
"previous_response_id": "previousResponseId",
|
|
190
196
|
"prompt_cache_key": "promptCacheKey",
|
|
197
|
+
"prompt_cache_options": "promptCacheOptions",
|
|
191
198
|
"prompt_cache_retention": "promptCacheRetention",
|
|
192
199
|
"safety_identifier": "safetyIdentifier",
|
|
193
200
|
"service_tier": "serviceTier",
|
|
@@ -40,7 +40,7 @@ export const ReasoningPart$inboundSchema: z.ZodType<
|
|
|
40
40
|
z.ZodTypeDef,
|
|
41
41
|
unknown
|
|
42
42
|
> = z.object({
|
|
43
|
-
_id: z.string().default("
|
|
43
|
+
_id: z.string().default("reasoning_01m1wjdnxt6cmpgxnfnvwyabjg"),
|
|
44
44
|
metadata: z.record(z.any()).optional(),
|
|
45
45
|
kind: z.literal("reasoning"),
|
|
46
46
|
reasoning: z.string(),
|
|
@@ -3,11 +3,53 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
|
|
7
8
|
export type RedactRequest = {
|
|
8
9
|
text?: string | undefined;
|
|
9
10
|
language?: string | undefined;
|
|
10
11
|
threshold?: number | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Region codes selecting whole regions of coverage, e.g. "nl", "gb". Every
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* entity type those regions cover is included, alongside the base catalog.
|
|
17
|
+
* ["all"] is exclusive. Leaving this and `entities` both empty also runs every
|
|
18
|
+
* region, so selecting nothing is the widest request rather than the narrowest.
|
|
19
|
+
* Empty alongside a non-empty `entities` stays strict. See the capabilities
|
|
20
|
+
* endpoint for the region list.
|
|
21
|
+
*
|
|
22
|
+
* Combines with `entities`: the detector unions the two selections, so a
|
|
23
|
+
* request carrying both covers the regions plus the named types. Note that
|
|
24
|
+
* `entities` only narrows coverage when it travels alone.
|
|
25
|
+
*/
|
|
26
|
+
regions?: Array<string> | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* The entity types to cover. A named type fires even when it belongs to a
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* region, so a region's types can be selected individually without naming
|
|
32
|
+
* the region. Alone this is a strict allowlist; alongside `regions` it adds
|
|
33
|
+
* to the region coverage instead of narrowing it.
|
|
34
|
+
*/
|
|
35
|
+
entities?: Array<string> | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Per-entity confidence cutoff overrides. An override REPLACES the global
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* `threshold` for that type and may sit above or below it: the gateway
|
|
41
|
+
* lowers the first-pass floor it sends the detector to the smallest value
|
|
42
|
+
* in the map, and every selected type carries its own cutoff, so a
|
|
43
|
+
* sub-global override detects MORE of that type without widening the rest.
|
|
44
|
+
*
|
|
45
|
+
* This only tunes confidence; it never changes which types are covered.
|
|
46
|
+
* Coverage is decided by `entities` alone, so every key here must also
|
|
47
|
+
* appear in `entities` — a key that does not is rejected, as is any key at
|
|
48
|
+
* all when `entities` is empty.
|
|
49
|
+
*
|
|
50
|
+
* Declarative [0,1] bound mirrors existing constraint on `threshold`.
|
|
51
|
+
*/
|
|
52
|
+
entityThresholds?: { [k: string]: number } | undefined;
|
|
11
53
|
};
|
|
12
54
|
|
|
13
55
|
/** @internal */
|
|
@@ -15,6 +57,9 @@ export type RedactRequest$Outbound = {
|
|
|
15
57
|
text?: string | undefined;
|
|
16
58
|
language?: string | undefined;
|
|
17
59
|
threshold?: number | undefined;
|
|
60
|
+
regions?: Array<string> | undefined;
|
|
61
|
+
entities?: Array<string> | undefined;
|
|
62
|
+
entity_thresholds?: { [k: string]: number } | undefined;
|
|
18
63
|
};
|
|
19
64
|
|
|
20
65
|
/** @internal */
|
|
@@ -26,6 +71,13 @@ export const RedactRequest$outboundSchema: z.ZodType<
|
|
|
26
71
|
text: z.string().optional(),
|
|
27
72
|
language: z.string().optional(),
|
|
28
73
|
threshold: z.number().optional(),
|
|
74
|
+
regions: z.array(z.string()).optional(),
|
|
75
|
+
entities: z.array(z.string()).optional(),
|
|
76
|
+
entityThresholds: z.record(z.number()).optional(),
|
|
77
|
+
}).transform((v) => {
|
|
78
|
+
return remap$(v, {
|
|
79
|
+
entityThresholds: "entity_thresholds",
|
|
80
|
+
});
|
|
29
81
|
});
|
|
30
82
|
|
|
31
83
|
export function redactRequestToJSON(redactRequest: RedactRequest): string {
|
|
@@ -4,50 +4,27 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
8
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
9
|
|
|
11
|
-
/**
|
|
12
|
-
* Plugin discriminator. Must be `response_healing`.
|
|
13
|
-
*/
|
|
14
|
-
export const ResponseHealingPluginId = {
|
|
15
|
-
ResponseHealing: "response_healing",
|
|
16
|
-
} as const;
|
|
17
|
-
/**
|
|
18
|
-
* Plugin discriminator. Must be `response_healing`.
|
|
19
|
-
*/
|
|
20
|
-
export type ResponseHealingPluginId = ClosedEnum<
|
|
21
|
-
typeof ResponseHealingPluginId
|
|
22
|
-
>;
|
|
23
|
-
|
|
24
10
|
export type ResponseHealingPlugin = {
|
|
25
11
|
/**
|
|
26
12
|
* Plugin discriminator. Must be `response_healing`.
|
|
27
13
|
*/
|
|
28
|
-
id:
|
|
14
|
+
id: "response_healing";
|
|
29
15
|
};
|
|
30
16
|
|
|
31
|
-
/** @internal */
|
|
32
|
-
export const ResponseHealingPluginId$inboundSchema: z.ZodNativeEnum<
|
|
33
|
-
typeof ResponseHealingPluginId
|
|
34
|
-
> = z.nativeEnum(ResponseHealingPluginId);
|
|
35
|
-
/** @internal */
|
|
36
|
-
export const ResponseHealingPluginId$outboundSchema: z.ZodNativeEnum<
|
|
37
|
-
typeof ResponseHealingPluginId
|
|
38
|
-
> = ResponseHealingPluginId$inboundSchema;
|
|
39
|
-
|
|
40
17
|
/** @internal */
|
|
41
18
|
export const ResponseHealingPlugin$inboundSchema: z.ZodType<
|
|
42
19
|
ResponseHealingPlugin,
|
|
43
20
|
z.ZodTypeDef,
|
|
44
21
|
unknown
|
|
45
22
|
> = z.object({
|
|
46
|
-
id:
|
|
23
|
+
id: z.literal("response_healing"),
|
|
47
24
|
});
|
|
48
25
|
/** @internal */
|
|
49
26
|
export type ResponseHealingPlugin$Outbound = {
|
|
50
|
-
id:
|
|
27
|
+
id: "response_healing";
|
|
51
28
|
};
|
|
52
29
|
|
|
53
30
|
/** @internal */
|
|
@@ -56,7 +33,7 @@ export const ResponseHealingPlugin$outboundSchema: z.ZodType<
|
|
|
56
33
|
z.ZodTypeDef,
|
|
57
34
|
ResponseHealingPlugin
|
|
58
35
|
> = z.object({
|
|
59
|
-
id:
|
|
36
|
+
id: z.literal("response_healing"),
|
|
60
37
|
});
|
|
61
38
|
|
|
62
39
|
export function responseHealingPluginToJSON(
|
|
@@ -13,11 +13,30 @@ export type RoutingRulePlugin = {
|
|
|
13
13
|
* Plugin discriminator.
|
|
14
14
|
*/
|
|
15
15
|
id?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Languages, regions and entity types are checked against the live
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* pii-detection capabilities catalog when the rule is saved, not pinned
|
|
21
|
+
* here, so a language or region the detector gains becomes writable without
|
|
22
|
+
* a proto change.
|
|
23
|
+
*/
|
|
16
24
|
language?: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Entity types to redact. Mutually exclusive with regions.
|
|
27
|
+
*/
|
|
17
28
|
entities?: Array<string> | undefined;
|
|
18
29
|
onFailure?: string | undefined;
|
|
19
30
|
threshold?: number | undefined;
|
|
20
31
|
mask?: Array<string> | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Regions of coverage by ISO 3166-1 alpha-2 code, or ["all"]. Mutually exclusive with entities.
|
|
34
|
+
*/
|
|
35
|
+
regions?: Array<string> | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Per-entity-type confidence cutoff. Every key must also appear in entities.
|
|
38
|
+
*/
|
|
39
|
+
entityThresholds?: { [k: string]: number } | undefined;
|
|
21
40
|
};
|
|
22
41
|
|
|
23
42
|
/** @internal */
|
|
@@ -32,9 +51,12 @@ export const RoutingRulePlugin$inboundSchema: z.ZodType<
|
|
|
32
51
|
on_failure: z.string().optional(),
|
|
33
52
|
threshold: z.number().optional(),
|
|
34
53
|
mask: z.array(z.string()).optional(),
|
|
54
|
+
regions: z.array(z.string()).optional(),
|
|
55
|
+
entity_thresholds: z.record(z.number()).optional(),
|
|
35
56
|
}).transform((v) => {
|
|
36
57
|
return remap$(v, {
|
|
37
58
|
"on_failure": "onFailure",
|
|
59
|
+
"entity_thresholds": "entityThresholds",
|
|
38
60
|
});
|
|
39
61
|
});
|
|
40
62
|
/** @internal */
|
|
@@ -45,6 +67,8 @@ export type RoutingRulePlugin$Outbound = {
|
|
|
45
67
|
on_failure?: string | undefined;
|
|
46
68
|
threshold?: number | undefined;
|
|
47
69
|
mask?: Array<string> | undefined;
|
|
70
|
+
regions?: Array<string> | undefined;
|
|
71
|
+
entity_thresholds?: { [k: string]: number } | undefined;
|
|
48
72
|
};
|
|
49
73
|
|
|
50
74
|
/** @internal */
|
|
@@ -59,9 +83,12 @@ export const RoutingRulePlugin$outboundSchema: z.ZodType<
|
|
|
59
83
|
onFailure: z.string().optional(),
|
|
60
84
|
threshold: z.number().optional(),
|
|
61
85
|
mask: z.array(z.string()).optional(),
|
|
86
|
+
regions: z.array(z.string()).optional(),
|
|
87
|
+
entityThresholds: z.record(z.number()).optional(),
|
|
62
88
|
}).transform((v) => {
|
|
63
89
|
return remap$(v, {
|
|
64
90
|
onFailure: "on_failure",
|
|
91
|
+
entityThresholds: "entity_thresholds",
|
|
65
92
|
});
|
|
66
93
|
});
|
|
67
94
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import { HubSearchHit, HubSearchHit$inboundSchema } from "./hubsearchhit.js";
|
|
10
|
+
|
|
11
|
+
export type SearchHubItemsResponse = {
|
|
12
|
+
hits: Array<HubSearchHit>;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const SearchHubItemsResponse$inboundSchema: z.ZodType<
|
|
17
|
+
SearchHubItemsResponse,
|
|
18
|
+
z.ZodTypeDef,
|
|
19
|
+
unknown
|
|
20
|
+
> = z.object({
|
|
21
|
+
hits: z.array(HubSearchHit$inboundSchema),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export function searchHubItemsResponseFromJSON(
|
|
25
|
+
jsonString: string,
|
|
26
|
+
): SafeParseResult<SearchHubItemsResponse, SDKValidationError> {
|
|
27
|
+
return safeParse(
|
|
28
|
+
jsonString,
|
|
29
|
+
(x) => SearchHubItemsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
30
|
+
`Failed to parse 'SearchHubItemsResponse' from JSON`,
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const SessionInterval = {
|
|
9
|
+
SessionIntervalUnspecified: "SESSION_INTERVAL_UNSPECIFIED",
|
|
10
|
+
SessionIntervalAllTime: "SESSION_INTERVAL_ALL_TIME",
|
|
11
|
+
SessionIntervalLast30Minutes: "SESSION_INTERVAL_LAST_30_MINUTES",
|
|
12
|
+
SessionIntervalLast1Hour: "SESSION_INTERVAL_LAST_1_HOUR",
|
|
13
|
+
SessionIntervalLast6Hours: "SESSION_INTERVAL_LAST_6_HOURS",
|
|
14
|
+
SessionIntervalLast24Hours: "SESSION_INTERVAL_LAST_24_HOURS",
|
|
15
|
+
SessionIntervalLast3Days: "SESSION_INTERVAL_LAST_3_DAYS",
|
|
16
|
+
SessionIntervalLast7Days: "SESSION_INTERVAL_LAST_7_DAYS",
|
|
17
|
+
SessionIntervalLast14Days: "SESSION_INTERVAL_LAST_14_DAYS",
|
|
18
|
+
SessionIntervalLast1Month: "SESSION_INTERVAL_LAST_1_MONTH",
|
|
19
|
+
SessionIntervalLast3Months: "SESSION_INTERVAL_LAST_3_MONTHS",
|
|
20
|
+
} as const;
|
|
21
|
+
export type SessionInterval = ClosedEnum<typeof SessionInterval>;
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const SessionInterval$outboundSchema: z.ZodNativeEnum<
|
|
25
|
+
typeof SessionInterval
|
|
26
|
+
> = z.nativeEnum(SessionInterval);
|
|
@@ -43,7 +43,7 @@ export type TextContentPartSchemaType = ClosedEnum<
|
|
|
43
43
|
*
|
|
44
44
|
* Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
45
45
|
*/
|
|
46
|
-
export const
|
|
46
|
+
export const TextContentPartSchemaTtl = {
|
|
47
47
|
Fivem: "5m",
|
|
48
48
|
Oneh: "1h",
|
|
49
49
|
} as const;
|
|
@@ -57,7 +57,9 @@ export const Ttl = {
|
|
|
57
57
|
*
|
|
58
58
|
* Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
59
59
|
*/
|
|
60
|
-
export type
|
|
60
|
+
export type TextContentPartSchemaTtl = ClosedEnum<
|
|
61
|
+
typeof TextContentPartSchemaTtl
|
|
62
|
+
>;
|
|
61
63
|
|
|
62
64
|
export type CacheControl = {
|
|
63
65
|
/**
|
|
@@ -74,7 +76,7 @@ export type CacheControl = {
|
|
|
74
76
|
*
|
|
75
77
|
* Defaults to `5m`. Only supported by `Anthropic` Claude models.
|
|
76
78
|
*/
|
|
77
|
-
ttl?:
|
|
79
|
+
ttl?: TextContentPartSchemaTtl | undefined;
|
|
78
80
|
};
|
|
79
81
|
|
|
80
82
|
/**
|
|
@@ -110,10 +112,13 @@ export const TextContentPartSchemaType$outboundSchema: z.ZodNativeEnum<
|
|
|
110
112
|
> = TextContentPartSchemaType$inboundSchema;
|
|
111
113
|
|
|
112
114
|
/** @internal */
|
|
113
|
-
export const
|
|
115
|
+
export const TextContentPartSchemaTtl$inboundSchema: z.ZodNativeEnum<
|
|
116
|
+
typeof TextContentPartSchemaTtl
|
|
117
|
+
> = z.nativeEnum(TextContentPartSchemaTtl);
|
|
114
118
|
/** @internal */
|
|
115
|
-
export const
|
|
116
|
-
|
|
119
|
+
export const TextContentPartSchemaTtl$outboundSchema: z.ZodNativeEnum<
|
|
120
|
+
typeof TextContentPartSchemaTtl
|
|
121
|
+
> = TextContentPartSchemaTtl$inboundSchema;
|
|
117
122
|
|
|
118
123
|
/** @internal */
|
|
119
124
|
export const CacheControl$inboundSchema: z.ZodType<
|
|
@@ -122,7 +127,7 @@ export const CacheControl$inboundSchema: z.ZodType<
|
|
|
122
127
|
unknown
|
|
123
128
|
> = z.object({
|
|
124
129
|
type: TextContentPartSchemaType$inboundSchema,
|
|
125
|
-
ttl:
|
|
130
|
+
ttl: TextContentPartSchemaTtl$inboundSchema.default("5m"),
|
|
126
131
|
});
|
|
127
132
|
/** @internal */
|
|
128
133
|
export type CacheControl$Outbound = {
|
|
@@ -137,7 +142,7 @@ export const CacheControl$outboundSchema: z.ZodType<
|
|
|
137
142
|
CacheControl
|
|
138
143
|
> = z.object({
|
|
139
144
|
type: TextContentPartSchemaType$outboundSchema,
|
|
140
|
-
ttl:
|
|
145
|
+
ttl: TextContentPartSchemaTtl$outboundSchema.default("5m"),
|
|
141
146
|
});
|
|
142
147
|
|
|
143
148
|
export function cacheControlToJSON(cacheControl: CacheControl): string {
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import { ThreadBilling, ThreadBilling$inboundSchema } from "./threadbilling.js";
|
|
11
|
+
import { ThreadKind, ThreadKind$inboundSchema } from "./threadkind.js";
|
|
12
|
+
import { ThreadUsage, ThreadUsage$inboundSchema } from "./threadusage.js";
|
|
13
|
+
|
|
14
|
+
export type Thread = {
|
|
15
|
+
/**
|
|
16
|
+
* Internal thread record ID.
|
|
17
|
+
*/
|
|
18
|
+
id: string;
|
|
19
|
+
/**
|
|
20
|
+
* Client-provided thread identifier used to group related traces.
|
|
21
|
+
*/
|
|
22
|
+
externalId: string;
|
|
23
|
+
/**
|
|
24
|
+
* Total thread duration in milliseconds.
|
|
25
|
+
*/
|
|
26
|
+
duration: number;
|
|
27
|
+
/**
|
|
28
|
+
* Contact IDs associated with the thread.
|
|
29
|
+
*/
|
|
30
|
+
contactIds: Array<string>;
|
|
31
|
+
billing: ThreadBilling;
|
|
32
|
+
usage: ThreadUsage;
|
|
33
|
+
/**
|
|
34
|
+
* Number of traces associated with the thread.
|
|
35
|
+
*/
|
|
36
|
+
tracesCount: number;
|
|
37
|
+
/**
|
|
38
|
+
* Tags used to categorize the thread.
|
|
39
|
+
*/
|
|
40
|
+
tags: Array<string>;
|
|
41
|
+
projectId?: string | undefined;
|
|
42
|
+
startedAt?: Date | undefined;
|
|
43
|
+
updatedAt?: Date | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Display title. Does not replace external_id and is not used to group traces.
|
|
46
|
+
*/
|
|
47
|
+
title?: string | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Originating coding assistant or client, such as claude-code, cursor, or codex.
|
|
50
|
+
*/
|
|
51
|
+
client?: string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Canonical git repository for a coding-agent thread, such as github.com/org/repo.
|
|
54
|
+
*/
|
|
55
|
+
repo?: string | undefined;
|
|
56
|
+
kind?: ThreadKind | undefined;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const Thread$inboundSchema: z.ZodType<Thread, z.ZodTypeDef, unknown> = z
|
|
61
|
+
.object({
|
|
62
|
+
_id: z.string(),
|
|
63
|
+
external_id: z.string(),
|
|
64
|
+
duration: z.number(),
|
|
65
|
+
contact_ids: z.array(z.string()),
|
|
66
|
+
billing: ThreadBilling$inboundSchema,
|
|
67
|
+
usage: ThreadUsage$inboundSchema,
|
|
68
|
+
traces_count: z.number().int(),
|
|
69
|
+
tags: z.array(z.string()),
|
|
70
|
+
project_id: z.string().optional(),
|
|
71
|
+
started_at: z.string().datetime({ offset: true }).transform(v =>
|
|
72
|
+
new Date(v)
|
|
73
|
+
).optional(),
|
|
74
|
+
updated_at: z.string().datetime({ offset: true }).transform(v =>
|
|
75
|
+
new Date(v)
|
|
76
|
+
).optional(),
|
|
77
|
+
title: z.string().optional(),
|
|
78
|
+
client: z.string().optional(),
|
|
79
|
+
repo: z.string().optional(),
|
|
80
|
+
kind: ThreadKind$inboundSchema.optional(),
|
|
81
|
+
}).transform((v) => {
|
|
82
|
+
return remap$(v, {
|
|
83
|
+
"_id": "id",
|
|
84
|
+
"external_id": "externalId",
|
|
85
|
+
"contact_ids": "contactIds",
|
|
86
|
+
"traces_count": "tracesCount",
|
|
87
|
+
"project_id": "projectId",
|
|
88
|
+
"started_at": "startedAt",
|
|
89
|
+
"updated_at": "updatedAt",
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
export function threadFromJSON(
|
|
94
|
+
jsonString: string,
|
|
95
|
+
): SafeParseResult<Thread, SDKValidationError> {
|
|
96
|
+
return safeParse(
|
|
97
|
+
jsonString,
|
|
98
|
+
(x) => Thread$inboundSchema.parse(JSON.parse(x)),
|
|
99
|
+
`Failed to parse 'Thread' from JSON`,
|
|
100
|
+
);
|
|
101
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type ThreadBilling = {
|
|
12
|
+
inputCost: number;
|
|
13
|
+
outputCost: number;
|
|
14
|
+
totalCost: number;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const ThreadBilling$inboundSchema: z.ZodType<
|
|
19
|
+
ThreadBilling,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
input_cost: z.number(),
|
|
24
|
+
output_cost: z.number(),
|
|
25
|
+
total_cost: z.number(),
|
|
26
|
+
}).transform((v) => {
|
|
27
|
+
return remap$(v, {
|
|
28
|
+
"input_cost": "inputCost",
|
|
29
|
+
"output_cost": "outputCost",
|
|
30
|
+
"total_cost": "totalCost",
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type ThreadBilling$Outbound = {
|
|
35
|
+
input_cost: number;
|
|
36
|
+
output_cost: number;
|
|
37
|
+
total_cost: number;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const ThreadBilling$outboundSchema: z.ZodType<
|
|
42
|
+
ThreadBilling$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
ThreadBilling
|
|
45
|
+
> = z.object({
|
|
46
|
+
inputCost: z.number(),
|
|
47
|
+
outputCost: z.number(),
|
|
48
|
+
totalCost: z.number(),
|
|
49
|
+
}).transform((v) => {
|
|
50
|
+
return remap$(v, {
|
|
51
|
+
inputCost: "input_cost",
|
|
52
|
+
outputCost: "output_cost",
|
|
53
|
+
totalCost: "total_cost",
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export function threadBillingToJSON(threadBilling: ThreadBilling): string {
|
|
58
|
+
return JSON.stringify(ThreadBilling$outboundSchema.parse(threadBilling));
|
|
59
|
+
}
|
|
60
|
+
export function threadBillingFromJSON(
|
|
61
|
+
jsonString: string,
|
|
62
|
+
): SafeParseResult<ThreadBilling, SDKValidationError> {
|
|
63
|
+
return safeParse(
|
|
64
|
+
jsonString,
|
|
65
|
+
(x) => ThreadBilling$inboundSchema.parse(JSON.parse(x)),
|
|
66
|
+
`Failed to parse 'ThreadBilling' from JSON`,
|
|
67
|
+
);
|
|
68
|
+
}
|