@novu/api 3.18.0 → 3.18.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.
- package/FUNCTIONS.md +1 -0
- package/README.md +63 -3
- package/examples/trigger.example.ts +1 -0
- package/funcs/agentsCreate.d.ts +19 -0
- package/funcs/agentsCreate.d.ts.map +1 -0
- package/funcs/agentsCreate.js +141 -0
- package/funcs/agentsCreate.js.map +1 -0
- package/funcs/agentsDelete.d.ts +18 -0
- package/funcs/agentsDelete.d.ts.map +1 -0
- package/funcs/agentsDelete.js +144 -0
- package/funcs/agentsDelete.js.map +1 -0
- package/funcs/agentsIntegrationsCreate.d.ts +19 -0
- package/funcs/agentsIntegrationsCreate.d.ts.map +1 -0
- package/funcs/agentsIntegrationsCreate.js +146 -0
- package/funcs/agentsIntegrationsCreate.js.map +1 -0
- package/funcs/agentsIntegrationsDelete.d.ts +18 -0
- package/funcs/agentsIntegrationsDelete.d.ts.map +1 -0
- package/funcs/agentsIntegrationsDelete.js +145 -0
- package/funcs/agentsIntegrationsDelete.js.map +1 -0
- package/funcs/agentsIntegrationsList.d.ts +18 -0
- package/funcs/agentsIntegrationsList.d.ts.map +1 -0
- package/funcs/agentsIntegrationsList.js +148 -0
- package/funcs/agentsIntegrationsList.js.map +1 -0
- package/funcs/agentsIntegrationsUpdate.d.ts +18 -0
- package/funcs/agentsIntegrationsUpdate.d.ts.map +1 -0
- package/funcs/agentsIntegrationsUpdate.js +142 -0
- package/funcs/agentsIntegrationsUpdate.js.map +1 -0
- package/funcs/agentsList.d.ts +18 -0
- package/funcs/agentsList.d.ts.map +1 -0
- package/funcs/agentsList.js +142 -0
- package/funcs/agentsList.js.map +1 -0
- package/funcs/agentsRetrieve.d.ts +18 -0
- package/funcs/agentsRetrieve.d.ts.map +1 -0
- package/funcs/agentsRetrieve.js +142 -0
- package/funcs/agentsRetrieve.js.map +1 -0
- package/funcs/agentsSendReply.d.ts +41 -0
- package/funcs/agentsSendReply.d.ts.map +1 -0
- package/funcs/agentsSendReply.js +168 -0
- package/funcs/agentsSendReply.js.map +1 -0
- package/funcs/agentsUpdate.d.ts +19 -0
- package/funcs/agentsUpdate.d.ts.map +1 -0
- package/funcs/agentsUpdate.js +146 -0
- package/funcs/agentsUpdate.js.map +1 -0
- package/funcs/agentsUpdateBridge.d.ts +19 -0
- package/funcs/agentsUpdateBridge.d.ts.map +1 -0
- package/funcs/agentsUpdateBridge.js +143 -0
- package/funcs/agentsUpdateBridge.js.map +1 -0
- package/funcs/integrationsGenerateChatOAuthUrl.d.ts +1 -1
- package/funcs/integrationsGenerateChatOAuthUrl.js +1 -1
- package/funcs/integrationsGenerateConnectOAuthUrl.d.ts +1 -1
- package/funcs/integrationsGenerateConnectOAuthUrl.js +1 -1
- package/funcs/integrationsGenerateLinkUserOAuthUrl.d.ts +1 -1
- package/funcs/integrationsGenerateLinkUserOAuthUrl.js +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/http.d.ts +1 -1
- package/lib/http.d.ts.map +1 -1
- package/lib/http.js +1 -1
- package/lib/http.js.map +1 -1
- package/lib/security.d.ts +5 -4
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +6 -7
- package/lib/security.js.map +1 -1
- package/models/components/addagentintegrationrequestdto.d.ts +20 -0
- package/models/components/addagentintegrationrequestdto.d.ts.map +1 -0
- package/models/components/addagentintegrationrequestdto.js +50 -0
- package/models/components/addagentintegrationrequestdto.js.map +1 -0
- package/models/components/addreactionpayloaddto.d.ts +20 -0
- package/models/components/addreactionpayloaddto.d.ts.map +1 -0
- package/models/components/addreactionpayloaddto.js +50 -0
- package/models/components/addreactionpayloaddto.js.map +1 -0
- package/models/components/agentbehaviordto.d.ts +58 -0
- package/models/components/agentbehaviordto.d.ts.map +1 -0
- package/models/components/agentbehaviordto.js +86 -0
- package/models/components/agentbehaviordto.js.map +1 -0
- package/models/components/agentintegrationresponsedto.d.ts +35 -0
- package/models/components/agentintegrationresponsedto.d.ts.map +1 -0
- package/models/components/agentintegrationresponsedto.js +73 -0
- package/models/components/agentintegrationresponsedto.js.map +1 -0
- package/models/components/agentintegrationresponseintegrationdto.d.ts +37 -0
- package/models/components/agentintegrationresponseintegrationdto.d.ts.map +1 -0
- package/models/components/agentintegrationresponseintegrationdto.js +64 -0
- package/models/components/agentintegrationresponseintegrationdto.js.map +1 -0
- package/models/components/agentintegrationsummarydto.d.ts +22 -0
- package/models/components/agentintegrationsummarydto.d.ts.map +1 -0
- package/models/components/agentintegrationsummarydto.js +56 -0
- package/models/components/agentintegrationsummarydto.js.map +1 -0
- package/models/components/agentmcpserverdto.d.ts +12 -0
- package/models/components/agentmcpserverdto.d.ts.map +1 -0
- package/models/components/agentmcpserverdto.js +52 -0
- package/models/components/agentmcpserverdto.js.map +1 -0
- package/models/components/agentplanusagedto.d.ts +43 -0
- package/models/components/agentplanusagedto.d.ts.map +1 -0
- package/models/components/agentplanusagedto.js +64 -0
- package/models/components/agentplanusagedto.js.map +1 -0
- package/models/components/agentreplypayloaddto.d.ts +121 -0
- package/models/components/agentreplypayloaddto.d.ts.map +1 -0
- package/models/components/agentreplypayloaddto.js +120 -0
- package/models/components/agentreplypayloaddto.js.map +1 -0
- package/models/components/agentresponsedto.d.ts +82 -0
- package/models/components/agentresponsedto.d.ts.map +1 -0
- package/models/components/agentresponsedto.js +97 -0
- package/models/components/agentresponsedto.js.map +1 -0
- package/models/components/agentskillinputdto.d.ts +39 -0
- package/models/components/agentskillinputdto.d.ts.map +1 -0
- package/models/components/agentskillinputdto.js +63 -0
- package/models/components/agentskillinputdto.js.map +1 -0
- package/models/components/agenttooldto.d.ts +21 -0
- package/models/components/agenttooldto.d.ts.map +1 -0
- package/models/components/agenttooldto.js +59 -0
- package/models/components/agenttooldto.js.map +1 -0
- package/models/components/authdto.d.ts +6 -0
- package/models/components/authdto.d.ts.map +1 -1
- package/models/components/authdto.js +6 -0
- package/models/components/authdto.js.map +1 -1
- package/models/components/cardreplycontentdto.d.ts +25 -0
- package/models/components/cardreplycontentdto.d.ts.map +1 -0
- package/models/components/cardreplycontentdto.js +51 -0
- package/models/components/cardreplycontentdto.js.map +1 -0
- package/models/components/chatorpushproviderenum.d.ts +3 -0
- package/models/components/chatorpushproviderenum.d.ts.map +1 -1
- package/models/components/chatorpushproviderenum.js +3 -0
- package/models/components/chatorpushproviderenum.js.map +1 -1
- package/models/components/createagentrequestdto.d.ts +37 -0
- package/models/components/createagentrequestdto.d.ts.map +1 -0
- package/models/components/createagentrequestdto.js +62 -0
- package/models/components/createagentrequestdto.js.map +1 -0
- package/models/components/createlineuserendpointdto.d.ts +75 -0
- package/models/components/createlineuserendpointdto.d.ts.map +1 -0
- package/models/components/createlineuserendpointdto.js +77 -0
- package/models/components/createlineuserendpointdto.js.map +1 -0
- package/models/components/createwebexpersonendpointdto.d.ts +75 -0
- package/models/components/createwebexpersonendpointdto.d.ts.map +1 -0
- package/models/components/createwebexpersonendpointdto.js +77 -0
- package/models/components/createwebexpersonendpointdto.js.map +1 -0
- package/models/components/createwebexroomendpointdto.d.ts +75 -0
- package/models/components/createwebexroomendpointdto.d.ts.map +1 -0
- package/models/components/createwebexroomendpointdto.js +77 -0
- package/models/components/createwebexroomendpointdto.js.map +1 -0
- package/models/components/credentialsdto.d.ts +5 -0
- package/models/components/credentialsdto.d.ts.map +1 -1
- package/models/components/credentialsdto.js +2 -0
- package/models/components/credentialsdto.js.map +1 -1
- package/models/components/deletemessagepayloaddto.d.ts +15 -0
- package/models/components/deletemessagepayloaddto.d.ts.map +1 -0
- package/models/components/deletemessagepayloaddto.js +49 -0
- package/models/components/deletemessagepayloaddto.js.map +1 -0
- package/models/components/editpayloaddto.d.ts +32 -0
- package/models/components/editpayloaddto.d.ts.map +1 -0
- package/models/components/editpayloaddto.js +67 -0
- package/models/components/editpayloaddto.js.map +1 -0
- package/models/components/filerefdto.d.ts +30 -0
- package/models/components/filerefdto.d.ts.map +1 -0
- package/models/components/filerefdto.js +52 -0
- package/models/components/filerefdto.js.map +1 -0
- package/models/components/generatechatoauthurlrequestdto.d.ts +2 -2
- package/models/components/generateconnectoauthurlrequestdto.d.ts +3 -3
- package/models/components/generatelinkuseroauthurlrequestdto.d.ts +2 -2
- package/models/components/getchannelconnectionresponsedto.d.ts +8 -4
- package/models/components/getchannelconnectionresponsedto.d.ts.map +1 -1
- package/models/components/getchannelconnectionresponsedto.js +9 -5
- package/models/components/getchannelconnectionresponsedto.js.map +1 -1
- package/models/components/getchannelendpointresponsedto.d.ts +12 -2
- package/models/components/getchannelendpointresponsedto.d.ts.map +1 -1
- package/models/components/getchannelendpointresponsedto.js +16 -0
- package/models/components/getchannelendpointresponsedto.js.map +1 -1
- package/models/components/grouppreferencefilterdto.d.ts +1 -1
- package/models/components/index.d.ts +41 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +41 -0
- package/models/components/index.js.map +1 -1
- package/models/components/lineuserendpointdto.d.ts +20 -0
- package/models/components/lineuserendpointdto.d.ts.map +1 -0
- package/models/components/lineuserendpointdto.js +58 -0
- package/models/components/lineuserendpointdto.js.map +1 -0
- package/models/components/listagentintegrationsresponsedto.d.ts +35 -0
- package/models/components/listagentintegrationsresponsedto.d.ts.map +1 -0
- package/models/components/listagentintegrationsresponsedto.js +57 -0
- package/models/components/listagentintegrationsresponsedto.js.map +1 -0
- package/models/components/listagentsresponsedto.d.ts +35 -0
- package/models/components/listagentsresponsedto.d.ts.map +1 -0
- package/models/components/listagentsresponsedto.js +57 -0
- package/models/components/listagentsresponsedto.js.map +1 -0
- package/models/components/managedruntimedto.d.ts +47 -0
- package/models/components/managedruntimedto.d.ts.map +1 -0
- package/models/components/managedruntimedto.js +66 -0
- package/models/components/managedruntimedto.js.map +1 -0
- package/models/components/managedruntimeresponsedto.d.ts +38 -0
- package/models/components/managedruntimeresponsedto.d.ts.map +1 -0
- package/models/components/managedruntimeresponsedto.js +60 -0
- package/models/components/managedruntimeresponsedto.js.map +1 -0
- package/models/components/markdownreplycontentdto.d.ts +21 -0
- package/models/components/markdownreplycontentdto.d.ts.map +1 -0
- package/models/components/markdownreplycontentdto.js +51 -0
- package/models/components/markdownreplycontentdto.js.map +1 -0
- package/models/components/messageresponsedto.d.ts +3 -3
- package/models/components/messageresponsedto.d.ts.map +1 -1
- package/models/components/messageresponsedto.js +5 -5
- package/models/components/messageresponsedto.js.map +1 -1
- package/models/components/metadataclearsignaldto.d.ts +27 -0
- package/models/components/metadataclearsignaldto.d.ts.map +1 -0
- package/models/components/metadataclearsignaldto.js +60 -0
- package/models/components/metadataclearsignaldto.js.map +1 -0
- package/models/components/metadatadeletesignaldto.d.ts +32 -0
- package/models/components/metadatadeletesignaldto.d.ts.map +1 -0
- package/models/components/metadatadeletesignaldto.js +61 -0
- package/models/components/metadatadeletesignaldto.js.map +1 -0
- package/models/components/metadatasetsignaldto.d.ts +55 -0
- package/models/components/metadatasetsignaldto.d.ts.map +1 -0
- package/models/components/metadatasetsignaldto.js +72 -0
- package/models/components/metadatasetsignaldto.js.map +1 -0
- package/models/components/planusagedto.d.ts +17 -0
- package/models/components/planusagedto.d.ts.map +1 -0
- package/models/components/planusagedto.js +51 -0
- package/models/components/planusagedto.js.map +1 -0
- package/models/components/providersidenum.d.ts +4 -0
- package/models/components/providersidenum.d.ts.map +1 -1
- package/models/components/providersidenum.js +4 -0
- package/models/components/providersidenum.js.map +1 -1
- package/models/components/resolvedto.d.ts +15 -0
- package/models/components/resolvedto.d.ts.map +1 -0
- package/models/components/resolvedto.js +49 -0
- package/models/components/resolvedto.js.map +1 -0
- package/models/components/subscriberchanneldto.d.ts +3 -0
- package/models/components/subscriberchanneldto.d.ts.map +1 -1
- package/models/components/subscriberchanneldto.js +3 -0
- package/models/components/subscriberchanneldto.js.map +1 -1
- package/models/components/subscriptionpreferencedto.d.ts +1 -1
- package/models/components/toolapprovalcardreplycontentdto.d.ts +22 -0
- package/models/components/toolapprovalcardreplycontentdto.d.ts.map +1 -0
- package/models/components/toolapprovalcardreplycontentdto.js +51 -0
- package/models/components/toolapprovalcardreplycontentdto.js.map +1 -0
- package/models/components/toolapprovalrequestpayloaddto.d.ts +34 -0
- package/models/components/toolapprovalrequestpayloaddto.d.ts.map +1 -0
- package/models/components/toolapprovalrequestpayloaddto.js +52 -0
- package/models/components/toolapprovalrequestpayloaddto.js.map +1 -0
- package/models/components/toolresultdto.d.ts +39 -0
- package/models/components/toolresultdto.d.ts.map +1 -0
- package/models/components/toolresultdto.js +58 -0
- package/models/components/toolresultdto.js.map +1 -0
- package/models/components/triggereventrequestdto.d.ts +9 -4
- package/models/components/triggereventrequestdto.d.ts.map +1 -1
- package/models/components/triggereventrequestdto.js +6 -6
- package/models/components/triggereventrequestdto.js.map +1 -1
- package/models/components/triggersignaldto.d.ts +73 -0
- package/models/components/triggersignaldto.d.ts.map +1 -0
- package/models/components/triggersignaldto.js +79 -0
- package/models/components/triggersignaldto.js.map +1 -0
- package/models/components/typingstatusdto.d.ts +15 -0
- package/models/components/typingstatusdto.d.ts.map +1 -0
- package/models/components/typingstatusdto.js +49 -0
- package/models/components/typingstatusdto.js.map +1 -0
- package/models/components/updateagentbridgerequestdto.d.ts +25 -0
- package/models/components/updateagentbridgerequestdto.d.ts.map +1 -0
- package/models/components/updateagentbridgerequestdto.js +51 -0
- package/models/components/updateagentbridgerequestdto.js.map +1 -0
- package/models/components/updateagentintegrationrequestdto.d.ts +15 -0
- package/models/components/updateagentintegrationrequestdto.d.ts.map +1 -0
- package/models/components/updateagentintegrationrequestdto.js +49 -0
- package/models/components/updateagentintegrationrequestdto.js.map +1 -0
- package/models/components/updateagentrequestdto.d.ts +34 -0
- package/models/components/updateagentrequestdto.d.ts.map +1 -0
- package/models/components/updateagentrequestdto.js +56 -0
- package/models/components/updateagentrequestdto.js.map +1 -0
- package/models/components/updatechannelendpointrequestdto.d.ts +6 -4
- package/models/components/updatechannelendpointrequestdto.d.ts.map +1 -1
- package/models/components/updatechannelendpointrequestdto.js +6 -0
- package/models/components/updatechannelendpointrequestdto.js.map +1 -1
- package/models/components/webexpersonendpointdto.d.ts +25 -0
- package/models/components/webexpersonendpointdto.d.ts.map +1 -0
- package/models/components/webexpersonendpointdto.js +60 -0
- package/models/components/webexpersonendpointdto.js.map +1 -0
- package/models/components/webexroomendpointdto.d.ts +25 -0
- package/models/components/webexroomendpointdto.d.ts.map +1 -0
- package/models/components/webexroomendpointdto.js +60 -0
- package/models/components/webexroomendpointdto.js.map +1 -0
- package/models/components/workflowpreferencerequestdto.d.ts +1 -1
- package/models/operations/agentintegrationscontrolleraddagentintegration.d.ts +31 -0
- package/models/operations/agentintegrationscontrolleraddagentintegration.d.ts.map +1 -0
- package/models/operations/agentintegrationscontrolleraddagentintegration.js +74 -0
- package/models/operations/agentintegrationscontrolleraddagentintegration.js.map +1 -0
- package/models/operations/agentintegrationscontrollerlistagentintegrations.d.ts +78 -0
- package/models/operations/agentintegrationscontrollerlistagentintegrations.d.ts.map +1 -0
- package/models/operations/agentintegrationscontrollerlistagentintegrations.js +90 -0
- package/models/operations/agentintegrationscontrollerlistagentintegrations.js.map +1 -0
- package/models/operations/agentintegrationscontrollerremoveagentintegration.d.ts +29 -0
- package/models/operations/agentintegrationscontrollerremoveagentintegration.d.ts.map +1 -0
- package/models/operations/agentintegrationscontrollerremoveagentintegration.js +71 -0
- package/models/operations/agentintegrationscontrollerremoveagentintegration.js.map +1 -0
- package/models/operations/agentintegrationscontrollerupdateagentintegration.d.ts +33 -0
- package/models/operations/agentintegrationscontrollerupdateagentintegration.d.ts.map +1 -0
- package/models/operations/agentintegrationscontrollerupdateagentintegration.js +76 -0
- package/models/operations/agentintegrationscontrollerupdateagentintegration.js.map +1 -0
- package/models/operations/agentreplycontrollerhandleagentreplyhandler.d.ts +53 -0
- package/models/operations/agentreplycontrollerhandleagentreplyhandler.d.ts.map +1 -0
- package/models/operations/agentreplycontrollerhandleagentreplyhandler.js +83 -0
- package/models/operations/agentreplycontrollerhandleagentreplyhandler.js.map +1 -0
- package/models/operations/agentscontrollercreateagent.d.ts +31 -0
- package/models/operations/agentscontrollercreateagent.d.ts.map +1 -0
- package/models/operations/agentscontrollercreateagent.js +74 -0
- package/models/operations/agentscontrollercreateagent.js.map +1 -0
- package/models/operations/agentscontrollerdeleteagent.d.ts +29 -0
- package/models/operations/agentscontrollerdeleteagent.d.ts.map +1 -0
- package/models/operations/agentscontrollerdeleteagent.js +69 -0
- package/models/operations/agentscontrollerdeleteagent.js.map +1 -0
- package/models/operations/agentscontrollergetagent.d.ts +29 -0
- package/models/operations/agentscontrollergetagent.d.ts.map +1 -0
- package/models/operations/agentscontrollergetagent.js +71 -0
- package/models/operations/agentscontrollergetagent.js.map +1 -0
- package/models/operations/agentscontrollerlistagents.d.ts +76 -0
- package/models/operations/agentscontrollerlistagents.d.ts.map +1 -0
- package/models/operations/agentscontrollerlistagents.js +88 -0
- package/models/operations/agentscontrollerlistagents.js.map +1 -0
- package/models/operations/agentscontrollerupdateagent.d.ts +31 -0
- package/models/operations/agentscontrollerupdateagent.d.ts.map +1 -0
- package/models/operations/agentscontrollerupdateagent.js +73 -0
- package/models/operations/agentscontrollerupdateagent.js.map +1 -0
- package/models/operations/agentscontrollerupdateagentbridge.d.ts +31 -0
- package/models/operations/agentscontrollerupdateagentbridge.d.ts.map +1 -0
- package/models/operations/agentscontrollerupdateagentbridge.js +73 -0
- package/models/operations/agentscontrollerupdateagentbridge.js.map +1 -0
- package/models/operations/channelendpointscontrollercreatechannelendpoint.d.ts +4 -4
- package/models/operations/channelendpointscontrollercreatechannelendpoint.d.ts.map +1 -1
- package/models/operations/channelendpointscontrollercreatechannelendpoint.js +6 -0
- package/models/operations/channelendpointscontrollercreatechannelendpoint.js.map +1 -1
- package/models/operations/index.d.ts +11 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +11 -0
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/agents.d.ts +80 -0
- package/sdk/agents.d.ts.map +1 -0
- package/sdk/agents.js +108 -0
- package/sdk/agents.js.map +1 -0
- package/sdk/integrations.d.ts +3 -3
- package/sdk/integrations.js +3 -3
- package/sdk/novuintegrations.d.ts +34 -0
- package/sdk/novuintegrations.d.ts.map +1 -0
- package/sdk/novuintegrations.js +52 -0
- package/sdk/novuintegrations.js.map +1 -0
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/agentsCreate.ts +222 -0
- package/src/funcs/agentsDelete.ts +225 -0
- package/src/funcs/agentsIntegrationsCreate.ts +228 -0
- package/src/funcs/agentsIntegrationsDelete.ts +235 -0
- package/src/funcs/agentsIntegrationsList.ts +222 -0
- package/src/funcs/agentsIntegrationsUpdate.ts +221 -0
- package/src/funcs/agentsList.ts +212 -0
- package/src/funcs/agentsRetrieve.ts +215 -0
- package/src/funcs/agentsSendReply.ts +249 -0
- package/src/funcs/agentsUpdate.ts +223 -0
- package/src/funcs/agentsUpdateBridge.ts +226 -0
- package/src/funcs/integrationsGenerateChatOAuthUrl.ts +1 -1
- package/src/funcs/integrationsGenerateConnectOAuthUrl.ts +1 -1
- package/src/funcs/integrationsGenerateLinkUserOAuthUrl.ts +1 -1
- package/src/lib/config.ts +4 -4
- package/src/lib/http.ts +3 -1
- package/src/lib/security.ts +10 -5
- package/src/models/components/addagentintegrationrequestdto.ts +42 -0
- package/src/models/components/addreactionpayloaddto.ts +40 -0
- package/src/models/components/agentbehaviordto.ts +131 -0
- package/src/models/components/agentintegrationresponsedto.ts +90 -0
- package/src/models/components/agentintegrationresponseintegrationdto.ts +75 -0
- package/src/models/components/agentintegrationsummarydto.ts +51 -0
- package/src/models/components/agentmcpserverdto.ts +35 -0
- package/src/models/components/agentplanusagedto.ts +71 -0
- package/src/models/components/agentreplypayloaddto.ts +297 -0
- package/src/models/components/agentresponsedto.ts +146 -0
- package/src/models/components/agentskillinputdto.ts +74 -0
- package/src/models/components/agenttooldto.ts +49 -0
- package/src/models/components/authdto.ts +12 -0
- package/src/models/components/cardreplycontentdto.ts +45 -0
- package/src/models/components/chatorpushproviderenum.ts +3 -0
- package/src/models/components/createagentrequestdto.ts +68 -0
- package/src/models/components/createlineuserendpointdto.ts +147 -0
- package/src/models/components/createwebexpersonendpointdto.ts +149 -0
- package/src/models/components/createwebexroomendpointdto.ts +147 -0
- package/src/models/components/credentialsdto.ts +7 -0
- package/src/models/components/deletemessagepayloaddto.ts +34 -0
- package/src/models/components/editpayloaddto.ts +90 -0
- package/src/models/components/filerefdto.ts +48 -0
- package/src/models/components/generatechatoauthurlrequestdto.ts +2 -2
- package/src/models/components/generateconnectoauthurlrequestdto.ts +3 -3
- package/src/models/components/generatelinkuseroauthurlrequestdto.ts +2 -2
- package/src/models/components/getchannelconnectionresponsedto.ts +15 -6
- package/src/models/components/getchannelendpointresponsedto.ts +33 -2
- package/src/models/components/grouppreferencefilterdto.ts +1 -1
- package/src/models/components/index.ts +41 -0
- package/src/models/components/lineuserendpointdto.ts +54 -0
- package/src/models/components/listagentintegrationsresponsedto.ts +64 -0
- package/src/models/components/listagentsresponsedto.ts +67 -0
- package/src/models/components/managedruntimedto.ts +81 -0
- package/src/models/components/managedruntimeresponsedto.ts +70 -0
- package/src/models/components/markdownreplycontentdto.ts +45 -0
- package/src/models/components/messageresponsedto.ts +10 -7
- package/src/models/components/metadataclearsignaldto.ts +59 -0
- package/src/models/components/metadatadeletesignaldto.ts +65 -0
- package/src/models/components/metadatasetsignaldto.ts +100 -0
- package/src/models/components/planusagedto.ts +39 -0
- package/src/models/components/providersidenum.ts +4 -0
- package/src/models/components/resolvedto.ts +30 -0
- package/src/models/components/subscriberchanneldto.ts +3 -0
- package/src/models/components/subscriptionpreferencedto.ts +1 -1
- package/src/models/components/toolapprovalcardreplycontentdto.ts +44 -0
- package/src/models/components/toolapprovalrequestpayloaddto.ts +54 -0
- package/src/models/components/toolresultdto.ts +67 -0
- package/src/models/components/triggereventrequestdto.ts +30 -17
- package/src/models/components/triggersignaldto.ts +111 -0
- package/src/models/components/typingstatusdto.ts +32 -0
- package/src/models/components/updateagentbridgerequestdto.ts +48 -0
- package/src/models/components/updateagentintegrationrequestdto.ts +36 -0
- package/src/models/components/updateagentrequestdto.ts +63 -0
- package/src/models/components/updatechannelendpointrequestdto.ts +26 -4
- package/src/models/components/webexpersonendpointdto.ts +61 -0
- package/src/models/components/webexroomendpointdto.ts +61 -0
- package/src/models/components/workflowpreferencerequestdto.ts +1 -1
- package/src/models/operations/agentintegrationscontrolleraddagentintegration.ts +92 -0
- package/src/models/operations/agentintegrationscontrollerlistagentintegrations.ts +156 -0
- package/src/models/operations/agentintegrationscontrollerremoveagentintegration.ts +85 -0
- package/src/models/operations/agentintegrationscontrollerupdateagentintegration.ts +95 -0
- package/src/models/operations/agentreplycontrollerhandleagentreplyhandler.ts +139 -0
- package/src/models/operations/agentscontrollercreateagent.ts +84 -0
- package/src/models/operations/agentscontrollerdeleteagent.ts +78 -0
- package/src/models/operations/agentscontrollergetagent.ts +78 -0
- package/src/models/operations/agentscontrollerlistagents.ts +142 -0
- package/src/models/operations/agentscontrollerupdateagent.ts +83 -0
- package/src/models/operations/agentscontrollerupdateagentbridge.ts +90 -0
- package/src/models/operations/channelendpointscontrollercreatechannelendpoint.ts +22 -4
- package/src/models/operations/index.ts +11 -0
- package/src/sdk/agents.ts +186 -0
- package/src/sdk/integrations.ts +3 -3
- package/src/sdk/novuintegrations.ts +100 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { NovuCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { NovuError } from "../models/errors/novuerror.js";
|
|
24
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
26
|
+
import * as operations from "../models/operations/index.js";
|
|
27
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
28
|
+
import { Result } from "../types/fp.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Send an agent reply
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Send a message or side-effect into an existing agent conversation from your backend.
|
|
35
|
+
*
|
|
36
|
+
* Use this endpoint when you are not using `@novu/framework` (for example Python, Go, PHP, .NET, or Java SDKs),
|
|
37
|
+
* or when a server process outside the bridge needs to post into a live conversation.
|
|
38
|
+
*
|
|
39
|
+
* **Message actions**
|
|
40
|
+
* - `reply` — markdown, interactive card, or tool-approval card (optional `files`)
|
|
41
|
+
* - `edit` — update a previously delivered message in place
|
|
42
|
+
* - `deleteMessages` — remove rendered platform messages (history is kept)
|
|
43
|
+
* - `addReactions` — add emoji reactions to existing messages
|
|
44
|
+
*
|
|
45
|
+
* **Turn control**
|
|
46
|
+
* - `typing` — `{ status?: string }` to set status, or `"stop"` to clear
|
|
47
|
+
* - `resolve` — mark the conversation resolved (optionally with a final reply)
|
|
48
|
+
* - `error: true` — report a customer-runtime failure (cannot combine with other actions)
|
|
49
|
+
*
|
|
50
|
+
* **Signals & tools**
|
|
51
|
+
* - `signals` — metadata set/delete/clear, or trigger a Novu workflow
|
|
52
|
+
* - `toolResults` — persist tool outputs into conversation history
|
|
53
|
+
* - `toolApprovalRequest` — ledger a gated tool call (pair with an approval card reply)
|
|
54
|
+
*
|
|
55
|
+
* Returns `{ data: { messageId, platformThreadId } }` when a reply or edit is delivered;
|
|
56
|
+
* otherwise `{ data: null }`.
|
|
57
|
+
*/
|
|
58
|
+
export function agentsSendReply(
|
|
59
|
+
client: NovuCore,
|
|
60
|
+
agentReplyPayloadDto: components.AgentReplyPayloadDto,
|
|
61
|
+
agentId: string,
|
|
62
|
+
idempotencyKey?: string | undefined,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): APIPromise<
|
|
65
|
+
Result<
|
|
66
|
+
operations.AgentReplyControllerHandleAgentReplyHandlerResponse,
|
|
67
|
+
| errors.ErrorDto
|
|
68
|
+
| errors.ValidationErrorDto
|
|
69
|
+
| NovuError
|
|
70
|
+
| ResponseValidationError
|
|
71
|
+
| ConnectionError
|
|
72
|
+
| RequestAbortedError
|
|
73
|
+
| RequestTimeoutError
|
|
74
|
+
| InvalidRequestError
|
|
75
|
+
| UnexpectedClientError
|
|
76
|
+
| SDKValidationError
|
|
77
|
+
>
|
|
78
|
+
> {
|
|
79
|
+
return new APIPromise($do(
|
|
80
|
+
client,
|
|
81
|
+
agentReplyPayloadDto,
|
|
82
|
+
agentId,
|
|
83
|
+
idempotencyKey,
|
|
84
|
+
options,
|
|
85
|
+
));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
async function $do(
|
|
89
|
+
client: NovuCore,
|
|
90
|
+
agentReplyPayloadDto: components.AgentReplyPayloadDto,
|
|
91
|
+
agentId: string,
|
|
92
|
+
idempotencyKey?: string | undefined,
|
|
93
|
+
options?: RequestOptions,
|
|
94
|
+
): Promise<
|
|
95
|
+
[
|
|
96
|
+
Result<
|
|
97
|
+
operations.AgentReplyControllerHandleAgentReplyHandlerResponse,
|
|
98
|
+
| errors.ErrorDto
|
|
99
|
+
| errors.ValidationErrorDto
|
|
100
|
+
| NovuError
|
|
101
|
+
| ResponseValidationError
|
|
102
|
+
| ConnectionError
|
|
103
|
+
| RequestAbortedError
|
|
104
|
+
| RequestTimeoutError
|
|
105
|
+
| InvalidRequestError
|
|
106
|
+
| UnexpectedClientError
|
|
107
|
+
| SDKValidationError
|
|
108
|
+
>,
|
|
109
|
+
APICall,
|
|
110
|
+
]
|
|
111
|
+
> {
|
|
112
|
+
const input: operations.AgentReplyControllerHandleAgentReplyHandlerRequest = {
|
|
113
|
+
agentReplyPayloadDto: agentReplyPayloadDto,
|
|
114
|
+
agentId: agentId,
|
|
115
|
+
idempotencyKey: idempotencyKey,
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
const parsed = safeParse(
|
|
119
|
+
input,
|
|
120
|
+
(value) =>
|
|
121
|
+
operations
|
|
122
|
+
.AgentReplyControllerHandleAgentReplyHandlerRequest$outboundSchema
|
|
123
|
+
.parse(value),
|
|
124
|
+
"Input validation failed",
|
|
125
|
+
);
|
|
126
|
+
if (!parsed.ok) {
|
|
127
|
+
return [parsed, { status: "invalid" }];
|
|
128
|
+
}
|
|
129
|
+
const payload = parsed.value;
|
|
130
|
+
const body = encodeJSON("body", payload.AgentReplyPayloadDto, {
|
|
131
|
+
explode: true,
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
const pathParams = {
|
|
135
|
+
agentId: encodeSimple("agentId", payload.agentId, {
|
|
136
|
+
explode: false,
|
|
137
|
+
charEncoding: "percent",
|
|
138
|
+
}),
|
|
139
|
+
};
|
|
140
|
+
const path = pathToFunc("/v1/agents/{agentId}/reply")(pathParams);
|
|
141
|
+
|
|
142
|
+
const headers = new Headers(compactMap({
|
|
143
|
+
"Content-Type": "application/json",
|
|
144
|
+
Accept: "application/json",
|
|
145
|
+
"idempotency-key": encodeSimple(
|
|
146
|
+
"idempotency-key",
|
|
147
|
+
payload["idempotency-key"],
|
|
148
|
+
{ explode: false, charEncoding: "none" },
|
|
149
|
+
),
|
|
150
|
+
}));
|
|
151
|
+
|
|
152
|
+
const secConfig = await extractSecurity(client._options.secretKey);
|
|
153
|
+
const securityInput = secConfig == null ? {} : { secretKey: secConfig };
|
|
154
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
155
|
+
|
|
156
|
+
const context = {
|
|
157
|
+
options: client._options,
|
|
158
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
159
|
+
operationID: "AgentReplyController_handleAgentReplyHandler",
|
|
160
|
+
oAuth2Scopes: null,
|
|
161
|
+
|
|
162
|
+
resolvedSecurity: requestSecurity,
|
|
163
|
+
|
|
164
|
+
securitySource: client._options.secretKey,
|
|
165
|
+
retryConfig: options?.retries
|
|
166
|
+
|| client._options.retryConfig
|
|
167
|
+
|| {
|
|
168
|
+
strategy: "backoff",
|
|
169
|
+
backoff: {
|
|
170
|
+
initialInterval: 1000,
|
|
171
|
+
maxInterval: 30000,
|
|
172
|
+
exponent: 1.5,
|
|
173
|
+
maxElapsedTime: 3600000,
|
|
174
|
+
},
|
|
175
|
+
retryConnectionErrors: true,
|
|
176
|
+
}
|
|
177
|
+
|| { strategy: "none" },
|
|
178
|
+
retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"],
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
const requestRes = client._createRequest(context, {
|
|
182
|
+
security: requestSecurity,
|
|
183
|
+
method: "POST",
|
|
184
|
+
baseURL: options?.serverURL,
|
|
185
|
+
path: path,
|
|
186
|
+
headers: headers,
|
|
187
|
+
body: body,
|
|
188
|
+
userAgent: client._options.userAgent,
|
|
189
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
190
|
+
}, options);
|
|
191
|
+
if (!requestRes.ok) {
|
|
192
|
+
return [requestRes, { status: "invalid" }];
|
|
193
|
+
}
|
|
194
|
+
const req = requestRes.value;
|
|
195
|
+
|
|
196
|
+
const doResult = await client._do(req, {
|
|
197
|
+
context,
|
|
198
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
199
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
200
|
+
retryConfig: context.retryConfig,
|
|
201
|
+
retryCodes: context.retryCodes,
|
|
202
|
+
});
|
|
203
|
+
if (!doResult.ok) {
|
|
204
|
+
return [doResult, { status: "request-error", request: req }];
|
|
205
|
+
}
|
|
206
|
+
const response = doResult.value;
|
|
207
|
+
|
|
208
|
+
const responseFields = {
|
|
209
|
+
HttpMeta: { Response: response, Request: req },
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
const [result] = await M.match<
|
|
213
|
+
operations.AgentReplyControllerHandleAgentReplyHandlerResponse,
|
|
214
|
+
| errors.ErrorDto
|
|
215
|
+
| errors.ValidationErrorDto
|
|
216
|
+
| NovuError
|
|
217
|
+
| ResponseValidationError
|
|
218
|
+
| ConnectionError
|
|
219
|
+
| RequestAbortedError
|
|
220
|
+
| RequestTimeoutError
|
|
221
|
+
| InvalidRequestError
|
|
222
|
+
| UnexpectedClientError
|
|
223
|
+
| SDKValidationError
|
|
224
|
+
>(
|
|
225
|
+
M.json(
|
|
226
|
+
200,
|
|
227
|
+
operations
|
|
228
|
+
.AgentReplyControllerHandleAgentReplyHandlerResponse$inboundSchema,
|
|
229
|
+
{ hdrs: true, key: "Result" },
|
|
230
|
+
),
|
|
231
|
+
M.jsonErr(414, errors.ErrorDto$inboundSchema),
|
|
232
|
+
M.jsonErr(
|
|
233
|
+
[400, 401, 403, 405, 409, 413, 415],
|
|
234
|
+
errors.ErrorDto$inboundSchema,
|
|
235
|
+
{ hdrs: true },
|
|
236
|
+
),
|
|
237
|
+
M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
|
|
238
|
+
M.fail([404, 429]),
|
|
239
|
+
M.jsonErr(500, errors.ErrorDto$inboundSchema, { hdrs: true }),
|
|
240
|
+
M.fail(503),
|
|
241
|
+
M.fail("4XX"),
|
|
242
|
+
M.fail("5XX"),
|
|
243
|
+
)(response, req, { extraFields: responseFields });
|
|
244
|
+
if (!result.ok) {
|
|
245
|
+
return [result, { status: "complete", request: req, response }];
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
return [result, { status: "complete", request: req, response }];
|
|
249
|
+
}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { NovuCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { NovuError } from "../models/errors/novuerror.js";
|
|
24
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
26
|
+
import * as operations from "../models/operations/index.js";
|
|
27
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
28
|
+
import { Result } from "../types/fp.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Update an agent
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Update an agent by its external identifier.
|
|
35
|
+
*/
|
|
36
|
+
export function agentsUpdate(
|
|
37
|
+
client: NovuCore,
|
|
38
|
+
updateAgentRequestDto: components.UpdateAgentRequestDto,
|
|
39
|
+
identifier: string,
|
|
40
|
+
idempotencyKey?: string | undefined,
|
|
41
|
+
options?: RequestOptions,
|
|
42
|
+
): APIPromise<
|
|
43
|
+
Result<
|
|
44
|
+
operations.AgentsControllerUpdateAgentResponse,
|
|
45
|
+
| errors.ErrorDto
|
|
46
|
+
| errors.ValidationErrorDto
|
|
47
|
+
| NovuError
|
|
48
|
+
| ResponseValidationError
|
|
49
|
+
| ConnectionError
|
|
50
|
+
| RequestAbortedError
|
|
51
|
+
| RequestTimeoutError
|
|
52
|
+
| InvalidRequestError
|
|
53
|
+
| UnexpectedClientError
|
|
54
|
+
| SDKValidationError
|
|
55
|
+
>
|
|
56
|
+
> {
|
|
57
|
+
return new APIPromise($do(
|
|
58
|
+
client,
|
|
59
|
+
updateAgentRequestDto,
|
|
60
|
+
identifier,
|
|
61
|
+
idempotencyKey,
|
|
62
|
+
options,
|
|
63
|
+
));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
async function $do(
|
|
67
|
+
client: NovuCore,
|
|
68
|
+
updateAgentRequestDto: components.UpdateAgentRequestDto,
|
|
69
|
+
identifier: string,
|
|
70
|
+
idempotencyKey?: string | undefined,
|
|
71
|
+
options?: RequestOptions,
|
|
72
|
+
): Promise<
|
|
73
|
+
[
|
|
74
|
+
Result<
|
|
75
|
+
operations.AgentsControllerUpdateAgentResponse,
|
|
76
|
+
| errors.ErrorDto
|
|
77
|
+
| errors.ValidationErrorDto
|
|
78
|
+
| NovuError
|
|
79
|
+
| ResponseValidationError
|
|
80
|
+
| ConnectionError
|
|
81
|
+
| RequestAbortedError
|
|
82
|
+
| RequestTimeoutError
|
|
83
|
+
| InvalidRequestError
|
|
84
|
+
| UnexpectedClientError
|
|
85
|
+
| SDKValidationError
|
|
86
|
+
>,
|
|
87
|
+
APICall,
|
|
88
|
+
]
|
|
89
|
+
> {
|
|
90
|
+
const input: operations.AgentsControllerUpdateAgentRequest = {
|
|
91
|
+
updateAgentRequestDto: updateAgentRequestDto,
|
|
92
|
+
identifier: identifier,
|
|
93
|
+
idempotencyKey: idempotencyKey,
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const parsed = safeParse(
|
|
97
|
+
input,
|
|
98
|
+
(value) =>
|
|
99
|
+
operations.AgentsControllerUpdateAgentRequest$outboundSchema.parse(value),
|
|
100
|
+
"Input validation failed",
|
|
101
|
+
);
|
|
102
|
+
if (!parsed.ok) {
|
|
103
|
+
return [parsed, { status: "invalid" }];
|
|
104
|
+
}
|
|
105
|
+
const payload = parsed.value;
|
|
106
|
+
const body = encodeJSON("body", payload.UpdateAgentRequestDto, {
|
|
107
|
+
explode: true,
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
const pathParams = {
|
|
111
|
+
identifier: encodeSimple("identifier", payload.identifier, {
|
|
112
|
+
explode: false,
|
|
113
|
+
charEncoding: "percent",
|
|
114
|
+
}),
|
|
115
|
+
};
|
|
116
|
+
const path = pathToFunc("/v1/agents/{identifier}")(pathParams);
|
|
117
|
+
|
|
118
|
+
const headers = new Headers(compactMap({
|
|
119
|
+
"Content-Type": "application/json",
|
|
120
|
+
Accept: "application/json",
|
|
121
|
+
"idempotency-key": encodeSimple(
|
|
122
|
+
"idempotency-key",
|
|
123
|
+
payload["idempotency-key"],
|
|
124
|
+
{ explode: false, charEncoding: "none" },
|
|
125
|
+
),
|
|
126
|
+
}));
|
|
127
|
+
|
|
128
|
+
const secConfig = await extractSecurity(client._options.secretKey);
|
|
129
|
+
const securityInput = secConfig == null ? {} : { secretKey: secConfig };
|
|
130
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
131
|
+
|
|
132
|
+
const context = {
|
|
133
|
+
options: client._options,
|
|
134
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
135
|
+
operationID: "AgentsController_updateAgent",
|
|
136
|
+
oAuth2Scopes: null,
|
|
137
|
+
|
|
138
|
+
resolvedSecurity: requestSecurity,
|
|
139
|
+
|
|
140
|
+
securitySource: client._options.secretKey,
|
|
141
|
+
retryConfig: options?.retries
|
|
142
|
+
|| client._options.retryConfig
|
|
143
|
+
|| {
|
|
144
|
+
strategy: "backoff",
|
|
145
|
+
backoff: {
|
|
146
|
+
initialInterval: 1000,
|
|
147
|
+
maxInterval: 30000,
|
|
148
|
+
exponent: 1.5,
|
|
149
|
+
maxElapsedTime: 3600000,
|
|
150
|
+
},
|
|
151
|
+
retryConnectionErrors: true,
|
|
152
|
+
}
|
|
153
|
+
|| { strategy: "none" },
|
|
154
|
+
retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"],
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
const requestRes = client._createRequest(context, {
|
|
158
|
+
security: requestSecurity,
|
|
159
|
+
method: "PATCH",
|
|
160
|
+
baseURL: options?.serverURL,
|
|
161
|
+
path: path,
|
|
162
|
+
headers: headers,
|
|
163
|
+
body: body,
|
|
164
|
+
userAgent: client._options.userAgent,
|
|
165
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
166
|
+
}, options);
|
|
167
|
+
if (!requestRes.ok) {
|
|
168
|
+
return [requestRes, { status: "invalid" }];
|
|
169
|
+
}
|
|
170
|
+
const req = requestRes.value;
|
|
171
|
+
|
|
172
|
+
const doResult = await client._do(req, {
|
|
173
|
+
context,
|
|
174
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
175
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
176
|
+
retryConfig: context.retryConfig,
|
|
177
|
+
retryCodes: context.retryCodes,
|
|
178
|
+
});
|
|
179
|
+
if (!doResult.ok) {
|
|
180
|
+
return [doResult, { status: "request-error", request: req }];
|
|
181
|
+
}
|
|
182
|
+
const response = doResult.value;
|
|
183
|
+
|
|
184
|
+
const responseFields = {
|
|
185
|
+
HttpMeta: { Response: response, Request: req },
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
const [result] = await M.match<
|
|
189
|
+
operations.AgentsControllerUpdateAgentResponse,
|
|
190
|
+
| errors.ErrorDto
|
|
191
|
+
| errors.ValidationErrorDto
|
|
192
|
+
| NovuError
|
|
193
|
+
| ResponseValidationError
|
|
194
|
+
| ConnectionError
|
|
195
|
+
| RequestAbortedError
|
|
196
|
+
| RequestTimeoutError
|
|
197
|
+
| InvalidRequestError
|
|
198
|
+
| UnexpectedClientError
|
|
199
|
+
| SDKValidationError
|
|
200
|
+
>(
|
|
201
|
+
M.json(200, operations.AgentsControllerUpdateAgentResponse$inboundSchema, {
|
|
202
|
+
hdrs: true,
|
|
203
|
+
key: "Result",
|
|
204
|
+
}),
|
|
205
|
+
M.jsonErr(414, errors.ErrorDto$inboundSchema),
|
|
206
|
+
M.jsonErr(
|
|
207
|
+
[400, 401, 403, 405, 409, 413, 415],
|
|
208
|
+
errors.ErrorDto$inboundSchema,
|
|
209
|
+
{ hdrs: true },
|
|
210
|
+
),
|
|
211
|
+
M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
|
|
212
|
+
M.fail([404, 429]),
|
|
213
|
+
M.jsonErr(500, errors.ErrorDto$inboundSchema, { hdrs: true }),
|
|
214
|
+
M.fail(503),
|
|
215
|
+
M.fail("4XX"),
|
|
216
|
+
M.fail("5XX"),
|
|
217
|
+
)(response, req, { extraFields: responseFields });
|
|
218
|
+
if (!result.ok) {
|
|
219
|
+
return [result, { status: "complete", request: req, response }];
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
return [result, { status: "complete", request: req, response }];
|
|
223
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { NovuCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { NovuError } from "../models/errors/novuerror.js";
|
|
24
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
26
|
+
import * as operations from "../models/operations/index.js";
|
|
27
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
28
|
+
import { Result } from "../types/fp.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Update an agent bridge
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Update the bridge URL configuration for an agent. Used by the CLI to register dev tunnel URLs. Refuses to activate dev bridges on production environments.
|
|
35
|
+
*/
|
|
36
|
+
export function agentsUpdateBridge(
|
|
37
|
+
client: NovuCore,
|
|
38
|
+
updateAgentBridgeRequestDto: components.UpdateAgentBridgeRequestDto,
|
|
39
|
+
identifier: string,
|
|
40
|
+
idempotencyKey?: string | undefined,
|
|
41
|
+
options?: RequestOptions,
|
|
42
|
+
): APIPromise<
|
|
43
|
+
Result<
|
|
44
|
+
operations.AgentsControllerUpdateAgentBridgeResponse,
|
|
45
|
+
| errors.ErrorDto
|
|
46
|
+
| errors.ValidationErrorDto
|
|
47
|
+
| NovuError
|
|
48
|
+
| ResponseValidationError
|
|
49
|
+
| ConnectionError
|
|
50
|
+
| RequestAbortedError
|
|
51
|
+
| RequestTimeoutError
|
|
52
|
+
| InvalidRequestError
|
|
53
|
+
| UnexpectedClientError
|
|
54
|
+
| SDKValidationError
|
|
55
|
+
>
|
|
56
|
+
> {
|
|
57
|
+
return new APIPromise($do(
|
|
58
|
+
client,
|
|
59
|
+
updateAgentBridgeRequestDto,
|
|
60
|
+
identifier,
|
|
61
|
+
idempotencyKey,
|
|
62
|
+
options,
|
|
63
|
+
));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
async function $do(
|
|
67
|
+
client: NovuCore,
|
|
68
|
+
updateAgentBridgeRequestDto: components.UpdateAgentBridgeRequestDto,
|
|
69
|
+
identifier: string,
|
|
70
|
+
idempotencyKey?: string | undefined,
|
|
71
|
+
options?: RequestOptions,
|
|
72
|
+
): Promise<
|
|
73
|
+
[
|
|
74
|
+
Result<
|
|
75
|
+
operations.AgentsControllerUpdateAgentBridgeResponse,
|
|
76
|
+
| errors.ErrorDto
|
|
77
|
+
| errors.ValidationErrorDto
|
|
78
|
+
| NovuError
|
|
79
|
+
| ResponseValidationError
|
|
80
|
+
| ConnectionError
|
|
81
|
+
| RequestAbortedError
|
|
82
|
+
| RequestTimeoutError
|
|
83
|
+
| InvalidRequestError
|
|
84
|
+
| UnexpectedClientError
|
|
85
|
+
| SDKValidationError
|
|
86
|
+
>,
|
|
87
|
+
APICall,
|
|
88
|
+
]
|
|
89
|
+
> {
|
|
90
|
+
const input: operations.AgentsControllerUpdateAgentBridgeRequest = {
|
|
91
|
+
updateAgentBridgeRequestDto: updateAgentBridgeRequestDto,
|
|
92
|
+
identifier: identifier,
|
|
93
|
+
idempotencyKey: idempotencyKey,
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const parsed = safeParse(
|
|
97
|
+
input,
|
|
98
|
+
(value) =>
|
|
99
|
+
operations.AgentsControllerUpdateAgentBridgeRequest$outboundSchema.parse(
|
|
100
|
+
value,
|
|
101
|
+
),
|
|
102
|
+
"Input validation failed",
|
|
103
|
+
);
|
|
104
|
+
if (!parsed.ok) {
|
|
105
|
+
return [parsed, { status: "invalid" }];
|
|
106
|
+
}
|
|
107
|
+
const payload = parsed.value;
|
|
108
|
+
const body = encodeJSON("body", payload.UpdateAgentBridgeRequestDto, {
|
|
109
|
+
explode: true,
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const pathParams = {
|
|
113
|
+
identifier: encodeSimple("identifier", payload.identifier, {
|
|
114
|
+
explode: false,
|
|
115
|
+
charEncoding: "percent",
|
|
116
|
+
}),
|
|
117
|
+
};
|
|
118
|
+
const path = pathToFunc("/v1/agents/{identifier}/bridge")(pathParams);
|
|
119
|
+
|
|
120
|
+
const headers = new Headers(compactMap({
|
|
121
|
+
"Content-Type": "application/json",
|
|
122
|
+
Accept: "application/json",
|
|
123
|
+
"idempotency-key": encodeSimple(
|
|
124
|
+
"idempotency-key",
|
|
125
|
+
payload["idempotency-key"],
|
|
126
|
+
{ explode: false, charEncoding: "none" },
|
|
127
|
+
),
|
|
128
|
+
}));
|
|
129
|
+
|
|
130
|
+
const secConfig = await extractSecurity(client._options.secretKey);
|
|
131
|
+
const securityInput = secConfig == null ? {} : { secretKey: secConfig };
|
|
132
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
133
|
+
|
|
134
|
+
const context = {
|
|
135
|
+
options: client._options,
|
|
136
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
137
|
+
operationID: "AgentsController_updateAgentBridge",
|
|
138
|
+
oAuth2Scopes: null,
|
|
139
|
+
|
|
140
|
+
resolvedSecurity: requestSecurity,
|
|
141
|
+
|
|
142
|
+
securitySource: client._options.secretKey,
|
|
143
|
+
retryConfig: options?.retries
|
|
144
|
+
|| client._options.retryConfig
|
|
145
|
+
|| {
|
|
146
|
+
strategy: "backoff",
|
|
147
|
+
backoff: {
|
|
148
|
+
initialInterval: 1000,
|
|
149
|
+
maxInterval: 30000,
|
|
150
|
+
exponent: 1.5,
|
|
151
|
+
maxElapsedTime: 3600000,
|
|
152
|
+
},
|
|
153
|
+
retryConnectionErrors: true,
|
|
154
|
+
}
|
|
155
|
+
|| { strategy: "none" },
|
|
156
|
+
retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"],
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
const requestRes = client._createRequest(context, {
|
|
160
|
+
security: requestSecurity,
|
|
161
|
+
method: "PUT",
|
|
162
|
+
baseURL: options?.serverURL,
|
|
163
|
+
path: path,
|
|
164
|
+
headers: headers,
|
|
165
|
+
body: body,
|
|
166
|
+
userAgent: client._options.userAgent,
|
|
167
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
168
|
+
}, options);
|
|
169
|
+
if (!requestRes.ok) {
|
|
170
|
+
return [requestRes, { status: "invalid" }];
|
|
171
|
+
}
|
|
172
|
+
const req = requestRes.value;
|
|
173
|
+
|
|
174
|
+
const doResult = await client._do(req, {
|
|
175
|
+
context,
|
|
176
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
177
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
178
|
+
retryConfig: context.retryConfig,
|
|
179
|
+
retryCodes: context.retryCodes,
|
|
180
|
+
});
|
|
181
|
+
if (!doResult.ok) {
|
|
182
|
+
return [doResult, { status: "request-error", request: req }];
|
|
183
|
+
}
|
|
184
|
+
const response = doResult.value;
|
|
185
|
+
|
|
186
|
+
const responseFields = {
|
|
187
|
+
HttpMeta: { Response: response, Request: req },
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
const [result] = await M.match<
|
|
191
|
+
operations.AgentsControllerUpdateAgentBridgeResponse,
|
|
192
|
+
| errors.ErrorDto
|
|
193
|
+
| errors.ValidationErrorDto
|
|
194
|
+
| NovuError
|
|
195
|
+
| ResponseValidationError
|
|
196
|
+
| ConnectionError
|
|
197
|
+
| RequestAbortedError
|
|
198
|
+
| RequestTimeoutError
|
|
199
|
+
| InvalidRequestError
|
|
200
|
+
| UnexpectedClientError
|
|
201
|
+
| SDKValidationError
|
|
202
|
+
>(
|
|
203
|
+
M.json(
|
|
204
|
+
200,
|
|
205
|
+
operations.AgentsControllerUpdateAgentBridgeResponse$inboundSchema,
|
|
206
|
+
{ hdrs: true, key: "Result" },
|
|
207
|
+
),
|
|
208
|
+
M.jsonErr(414, errors.ErrorDto$inboundSchema),
|
|
209
|
+
M.jsonErr(
|
|
210
|
+
[400, 401, 403, 405, 409, 413, 415],
|
|
211
|
+
errors.ErrorDto$inboundSchema,
|
|
212
|
+
{ hdrs: true },
|
|
213
|
+
),
|
|
214
|
+
M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
|
|
215
|
+
M.fail([404, 429]),
|
|
216
|
+
M.jsonErr(500, errors.ErrorDto$inboundSchema, { hdrs: true }),
|
|
217
|
+
M.fail(503),
|
|
218
|
+
M.fail("4XX"),
|
|
219
|
+
M.fail("5XX"),
|
|
220
|
+
)(response, req, { extraFields: responseFields });
|
|
221
|
+
if (!result.ok) {
|
|
222
|
+
return [result, { status: "complete", request: req, response }];
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
return [result, { status: "complete", request: req, response }];
|
|
226
|
+
}
|
|
@@ -32,7 +32,7 @@ import { Result } from "../types/fp.js";
|
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
34
|
* **Deprecated** — use `POST /integrations/channel-connections/oauth` (connect) or `POST /integrations/channel-endpoints/oauth` (link_user) instead.
|
|
35
|
-
* Generate an OAuth URL for chat integrations like Slack
|
|
35
|
+
* Generate an OAuth URL for chat integrations like Slack, MS Teams, and Webex.
|
|
36
36
|
* This URL allows subscribers to authorize the integration, enabling the system to send messages
|
|
37
37
|
* through their chat workspace. The generated URL expires after 5 minutes.
|
|
38
38
|
*
|