diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 7fbfbb5e..1e9ab5cf 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: f83d894c-c934-499f-8a8d-e128395ae8ff management: - docChecksum: 7cd170d226a8ceeb4132c419b5e34dd0 + docChecksum: 6fddf6c4c72ab3bd17fe137a5739b3b8 docVersion: 3.15.0 - speakeasyVersion: 1.761.3 - generationVersion: 2.879.11 - releaseVersion: 3.15.0 - configChecksum: 42234a3b956a474b3f6f7dca5f50b646 + speakeasyVersion: 1.762.0 + generationVersion: 2.882.0 + releaseVersion: 3.15.1 + configChecksum: 0e98a23995872f1faa35624149249792 repoURL: https://github.com/novuhq/novu-py.git installationURL: https://github.com/novuhq/novu-py.git published: true persistentEdits: - generation_id: ff0f3de0-9990-498e-a0fd-a4b5e9c2adc6 - pristine_commit_hash: fc045595ed192bbb489172f0f1bbcbac1768adf3 - pristine_tree_hash: a9775684e36e3ddbfd5d01aa4eb283f5ca32c60d + generation_id: bd00feec-21c8-496b-a193-71aa98d34c53 + pristine_commit_hash: a1b024aa1c94ea1278a4d4340413668c18420b31 + pristine_tree_hash: bce1e082052a44067ad9cd7bc90fee416598e553 features: python: additionalDependencies: 1.0.0 @@ -38,9 +38,9 @@ features: nullables: 1.0.2 openEnums: 1.0.4 responseFormat: 1.1.0 - retries: 3.0.4 + retries: 3.0.5 sdkHooks: 1.2.1 - unions: 3.1.4 + unions: 3.1.5 uploadStreams: 1.0.0 trackedFiles: .devcontainer/README.md: @@ -131,6 +131,10 @@ trackedFiles: id: 5c07e8432fb2 last_write_checksum: sha1:47ad68e1a440a0e6554637b570bba3af3906d280 pristine_git_object: 74f7fb414cb3ec5bb017b2f3f04622181919533f + docs/models/agentreply.md: + id: fcf9844b7afd + last_write_checksum: sha1:117ba7f10d78404349891d3bbe21dba82ba17884 + pristine_git_object: 1baf90d6fabb6b88a8c52a23f1e6017585860358 docs/models/all.md: id: 3a3b4bc942ad last_write_checksum: sha1:44abe5406ca92296f0373d8673e230399412e4aa @@ -151,6 +155,10 @@ trackedFiles: id: ec5f2fa7e68a last_write_checksum: sha1:4ffd299df746e99275066eafcd7d54e9466f0a1f pristine_git_object: 29f31f21801ba92b7a9fa2a5bfce9319f053eb83 + docs/models/body.md: + id: 3612a7201bb5 + last_write_checksum: sha1:161fa289f847427aa144f57f35a6cfe556f1c022 + pristine_git_object: d971437ebf1dedca4db66a8203fe53b1b0af091f docs/models/bridgeconfigurationdto.md: id: 0fce89c8a3c0 last_write_checksum: sha1:20d4d3a44f679e8581aa50d56af62c576b51bb3b @@ -347,6 +355,10 @@ trackedFiles: id: e4b6a1260cd5 last_write_checksum: sha1:541354c8ff00733125bfc6054f37aa5af92e1a6d pristine_git_object: 4f7e0b44ae231e39a09ddde6740662f4a9c725ff + docs/models/code.md: + id: 2fcb3964c9c0 + last_write_checksum: sha1:f14fe382e9c687077e352ef482401e32561b09f8 + pristine_git_object: 48b9732c6aba9fccdf208dc04334bc1f506387fa docs/models/condition.md: id: b8def926cb9f last_write_checksum: sha1:2726e0b8018d7d30eaf53b37cc44d32b998bc3ec @@ -359,6 +371,10 @@ trackedFiles: id: 6975c316772b last_write_checksum: sha1:30e507f72844c970524b4f45c9dd3f3c50bb3fe7 pristine_git_object: ecbdce97e4932d9c545fbd2ff2c0503abe2044e7 + docs/models/connectionmode.md: + id: d4845cb1ab92 + last_write_checksum: sha1:e4ecea3c4571d4b8c82bf4b3fb0238ec9839f0bd + pristine_git_object: 15c3b2b6aa3d34928e2eee6229f4582f2ecb0f40 docs/models/constraintvalidation.md: id: e96a2d97b946 last_write_checksum: sha1:904fe0b575b3670c3cc076147e97a54aea5c1993 @@ -433,8 +449,8 @@ trackedFiles: pristine_git_object: 7d2c614661ade33dfa67338eba5c3b89771ea876 docs/models/createchannelconnectionrequestdto.md: id: a1aa43b9d37e - last_write_checksum: sha1:edb9bdd49c1a9212c92b1ab9ccac2f1f58b775ba - pristine_git_object: ab504f0ff6aa57c9a1c4d9a86d3528a45ab7fac6 + last_write_checksum: sha1:a89058c2e78c377b9d2a955fc02bc93fbc2a7440 + pristine_git_object: d0fa3ee7e2330ee824a3374ed6c083db25ad0f73 docs/models/createchannelconnectionrequestdtocontext.md: id: 40e067065a82 last_write_checksum: sha1:b25f518969a71fcc55b937e29a8c00351a437670 @@ -447,6 +463,14 @@ trackedFiles: id: f4eacc5234f9 last_write_checksum: sha1:7ccf9360412a86fa7215ad97954070866f68f9c9 pristine_git_object: 803bede0d19211206be9e9a6531d135aad34c5bf + docs/models/createdomainconnectapplyurldto.md: + id: a0bd8644cba8 + last_write_checksum: sha1:bd0042e9a394f2919500de733bc353661e1551b3 + pristine_git_object: 41eb911d8afb3ba6ec0f8fbd0563131a3c2a988a + docs/models/createdomaindto.md: + id: e17e67c86f15 + last_write_checksum: sha1:a2cbd3ed789fb506b9bf788a308034eb27ef753c + pristine_git_object: 899df8668141959bbc158058a025888d876bd8fc docs/models/createdsubscriberdto.md: id: 44a7e51ce715 last_write_checksum: sha1:b7f79acbcd4b5987c96a7ab17098f64820f18479 @@ -605,8 +629,8 @@ trackedFiles: pristine_git_object: cd3f8f8acab21bbcc5d6ac2a3374dd551c9295cc docs/models/credentialsdto.md: id: 19f358ae6c7e - last_write_checksum: sha1:7f7fa893a5f415adc459e529af529e55529f27de - pristine_git_object: bc123b687330c7009be8536a10a8ca76e121794c + last_write_checksum: sha1:a96d753e31563a66e79ad6f6457825cbb9640027 + pristine_git_object: 5a06def7d55726c6a38e494f7a262bdb4e7945c9 docs/models/criticality.md: id: d2650f6cbd02 last_write_checksum: sha1:7f9978498aa0a42eb83c085ac8c35e2cb80194b2 @@ -723,6 +747,10 @@ trackedFiles: id: 7d52d40c5656 last_write_checksum: sha1:593103ae1488cb6739c7fb018b9707e6a42e3588 pristine_git_object: 721c1887ddd7a916ac58d06c568a598e46f91d7a + docs/models/diagnosedomainresponsedto.md: + id: 0ec58346c946 + last_write_checksum: sha1:2762b488080ccd66db5e56f0ba4aceeb94845eb5 + pristine_git_object: 9083a343f97317df263f2a884a871ed21545f5e9 docs/models/diffactionenum.md: id: 96abe3fe272a last_write_checksum: sha1:b2f8d98e0b82c192bac6e4d14e27935591bc410f @@ -839,10 +867,190 @@ trackedFiles: id: da7f88ee565e last_write_checksum: sha1:cbc2797035bce53512f6cad13d44a02e08e76111 pristine_git_object: 0bcc96ac6e524f69c9305bbbabf8d5dca993ce7e + docs/models/domainconnectapplyurlresponsedto.md: + id: a9959f238aae + last_write_checksum: sha1:164a4b07dfef734228b0c410c79e910e8b1ffcd7 + pristine_git_object: f821ab2a44394e9b17fe3937e444d69b5a88ac9a + docs/models/domainconnectstatusresponsedto.md: + id: b8dba15dd21c + last_write_checksum: sha1:f32c5d4f4a1790cb18502a2c662a8b87622bd4d6 + pristine_git_object: e23e641fc082624e099e6f0ed0af162f2d74723d + docs/models/domaindiagnosticcheckdto.md: + id: 95405100f8c8 + last_write_checksum: sha1:65c6e89a902a83385fc7490e58d223a2a170bf1c + pristine_git_object: f3c03f440b55498c03b24743fe0daa00ad695ce1 + docs/models/domaindiagnosticcheckdtostatus.md: + id: 2d73b416c01a + last_write_checksum: sha1:908700be08c9b82e64b92b5e31a6d606e0ab3419 + pristine_git_object: 7372f493a6863dbe189e1255d510e271bd39a2c2 + docs/models/domaindiagnosticissuedto.md: + id: b030be44426f + last_write_checksum: sha1:9a4e89c54f595148549fba576cc99a1aaa8e83cc + pristine_git_object: 4dc6d9cba18f9f39d34d28bfd2fb9096e03e553c + docs/models/domaindiagnosticissuedtocode.md: + id: e4f86cc1bd8e + last_write_checksum: sha1:e0aa266c6207694c527aa40158fb3963d4d31b85 + pristine_git_object: d9a57ab6b4745b133303934efb0f5c4613b356f0 + docs/models/domainresponsedto.md: + id: f8824a5a39af + last_write_checksum: sha1:c717bf983a63516238f955711cfa4445eef786b6 + pristine_git_object: a06ee3f84ca6dac5a6883519c26989ecb99d999a + docs/models/domainresponsedtostatus.md: + id: 1f21f644e050 + last_write_checksum: sha1:de9f71dfd5d42d4f238a652b4ab02829be581668 + pristine_git_object: 52c999ac1028205d2374e3d5baaef2d3d9b4dd66 + docs/models/domainroutedto.md: + id: 5f955860e6f7 + last_write_checksum: sha1:d87a9e7f8bb308ddc639416d1c40003d09eb010b + pristine_git_object: 5b18dfccca6dd7de66caede156ffaa06429bcf6a + docs/models/domainroutedtotype.md: + id: 2ba41e67d5b7 + last_write_checksum: sha1:8825927777ac30c235e1b7481ab6c63a3878b68c + pristine_git_object: e183b49c2971f46e0368ecee5a8cf04f561d904d + docs/models/domainrouteresponsedto.md: + id: 572db073c19e + last_write_checksum: sha1:d19e77828f6a720c91f9e48a877592ab774a7c0a + pristine_git_object: 6b4fcaf91aaf6f3d6e9458f37becfcb5b68a9a0c + docs/models/domainrouteresponsedtotype.md: + id: 4b5e03426f8b + last_write_checksum: sha1:9dc99fb75a19e9930c010467eda3ad0dae413fff + pristine_git_object: a087d7ccb8cb824e8b8df92b98df9b1ecd7f911e + docs/models/domainscontrollercreatedomainrequest.md: + id: 236c1c14a75d + last_write_checksum: sha1:bf746890928bbf662f539bd75609534e927d50cc + pristine_git_object: 535c2de45bffdd69b98eb369594d6caff0ae2e01 + docs/models/domainscontrollercreatedomainresponse.md: + id: 3d53d3997337 + last_write_checksum: sha1:4e81c49d71f252a792c0bc06ef1cad4a29d83239 + pristine_git_object: acec20e9dc910da2c4217a276919222c5b6c37cd + docs/models/domainscontrollercreatedomainrouterequest.md: + id: 2f4f15ccf33c + last_write_checksum: sha1:dcabd93151028de3f5bc936c7f713c30a346b3e6 + pristine_git_object: f5c3ba8862a74dc535505297d530f0bc4d97118a + docs/models/domainscontrollercreatedomainrouteresponse.md: + id: 823413bd4f09 + last_write_checksum: sha1:3e481538a86f10f2a16d790cd0d89690db676bfa + pristine_git_object: d803eb26f52ebba30dfab5d168260dad1be81777 + docs/models/domainscontrollerdeletedomainrequest.md: + id: c2c58524f372 + last_write_checksum: sha1:4d6418df63e680befa004976e27a100deecff74a + pristine_git_object: 230d1ab26a4f9150672fc3ec6de1c9bf18f6b974 + docs/models/domainscontrollerdeletedomainresponse.md: + id: aa6fa8b6dce5 + last_write_checksum: sha1:39e9f1be015a4cfe644fca186b3d0700b3594a47 + pristine_git_object: 13f7c051a09e2d50795504ec9f785eebefc933b4 + docs/models/domainscontrollerdeletedomainrouterequest.md: + id: 7e281e23de3b + last_write_checksum: sha1:5ddb4b1437435f3c09bfb1401520ab5ebd77c4ea + pristine_git_object: 41827cdd44e752ab28ce3e2725e3edfef2ab12dd + docs/models/domainscontrollerdeletedomainrouteresponse.md: + id: 05746963ac1b + last_write_checksum: sha1:d6c3afa4549886c9641f840f3ed42cb14c42cfb0 + pristine_git_object: 0a7beff607e8ac13e650cf58ec9d2298f49bee4b + docs/models/domainscontrollerdiagnosedomainrequest.md: + id: a4f832975b18 + last_write_checksum: sha1:b6833cbe68edf2c485fc801f1437af8f11f291f6 + pristine_git_object: d7c632057af3f082c203f99f11dcfb20a755c68f + docs/models/domainscontrollerdiagnosedomainresponse.md: + id: fbc9e45d1d73 + last_write_checksum: sha1:401cec73665c14f0d939f3319b5bd4949123cb10 + pristine_git_object: f6c70ac75e417ae3b29aaf087347e1044f16c5f3 + docs/models/domainscontrollergetdomainautoconfigurerequest.md: + id: d86770aed825 + last_write_checksum: sha1:e8c2e89663d7fb3012c0220319920e6ab79ff304 + pristine_git_object: bb18dc6b95f3953b85670fde8b80b90e0f5463ca + docs/models/domainscontrollergetdomainautoconfigureresponse.md: + id: 1d1ba634bf75 + last_write_checksum: sha1:9ca62d1d5b17bae32411a895a37e19ae06c481c3 + pristine_git_object: 88f80935da5b08af11e09f1d4046f795075f0f40 + docs/models/domainscontrollergetdomainrequest.md: + id: 8108fcb0e26b + last_write_checksum: sha1:f7ec18bb27d6c6e8d1301e4be45387718463d36d + pristine_git_object: 28532ac99c938c84396e6475bc8b597dc74def95 + docs/models/domainscontrollergetdomainresponse.md: + id: 730c6e866f56 + last_write_checksum: sha1:34f8af0b6ecd8ed699da3bb7ac413b0cebd1553b + pristine_git_object: b537e55c4808fab8ec47927467b514a74b980bac + docs/models/domainscontrollergetdomainrouterequest.md: + id: 4351746bec3a + last_write_checksum: sha1:7310486ccc760e108bbfe8c1a1e1cfedd0d8b61b + pristine_git_object: c70f3dafcbabad36519c623f3ba12df5e45195a7 + docs/models/domainscontrollergetdomainrouteresponse.md: + id: 3e3a717b2577 + last_write_checksum: sha1:4333cef009ff8da5cf7e28443c9a31b09810afa3 + pristine_git_object: fccc276242dc435db16d0e579611ca9b555fa6e4 + docs/models/domainscontrollerlistdomainroutesqueryparamorderdirection.md: + id: 000de9c7e9ee + last_write_checksum: sha1:0427e66932ce3a0f635119f0cdcb74731d276120 + pristine_git_object: ff52c1010d59250cf652246d6d7de72ac2480b42 + docs/models/domainscontrollerlistdomainroutesrequest.md: + id: f31ab147136c + last_write_checksum: sha1:db26c8801d68f571e857c352701b8c708138396e + pristine_git_object: 0a7285a1f61a5b2c997c254d07c9089e4f08cd5f + docs/models/domainscontrollerlistdomainroutesresponse.md: + id: 23a7d8b9eaeb + last_write_checksum: sha1:a096a21cc80dbdfd56b4184bb069a58072bc6316 + pristine_git_object: 5e25683f6a044c37ea2fcb8b5a1e153e8a0da97c + docs/models/domainscontrollerlistdomainsqueryparamorderdirection.md: + id: ecabce3dcc7d + last_write_checksum: sha1:c6d39d56e1642d67837aea4e57afa8d3eb631926 + pristine_git_object: ce4f62d69fc154007d5b4b8cca9a222a9f859f4f + docs/models/domainscontrollerlistdomainsrequest.md: + id: f61f735d4fae + last_write_checksum: sha1:475cade7edf0aef54f5ca5ae82e137152c4e93a4 + pristine_git_object: 6b6e60f773966f67310879617dd9601fccba0df2 + docs/models/domainscontrollerlistdomainsresponse.md: + id: 0b29b3a12ada + last_write_checksum: sha1:5131f78b7ca68f8b9cdf13ee882e9f46ee147dfa + pristine_git_object: 6bb5398632eaeef30161fd6941fa8d6650c988f5 + docs/models/domainscontrollerstartdomainautoconfigurerequest.md: + id: c987ecd539d8 + last_write_checksum: sha1:2c87e1184ed47680d12c1932dc9176ac633f5c76 + pristine_git_object: 9c2579eeb8ff6b87448686bdd533d1cac5d92cff + docs/models/domainscontrollerstartdomainautoconfigureresponse.md: + id: 8037be6e79ab + last_write_checksum: sha1:b82cafc188fcde7774640c49d0b5f636331af054 + pristine_git_object: a35d53777c8a52dd34adb2355f206a142dafca4b + docs/models/domainscontrollertestdomainrouterequest.md: + id: 4c4efb0d4480 + last_write_checksum: sha1:24655a2a1c96c00cc7929ba8f16344b5e355a6fa + pristine_git_object: fc234d2860f002b2d6ede857b8b937d3089b4103 + docs/models/domainscontrollertestdomainrouteresponse.md: + id: 9a16e93a37a3 + last_write_checksum: sha1:1aef3be60c6701cc9091b8ec537d4fdfc4c2cb7b + pristine_git_object: 41c2cfcb61c7216a4cbc275069df9dc3e3e5ca80 + docs/models/domainscontrollerupdatedomainrequest.md: + id: e1f509b6c165 + last_write_checksum: sha1:4dc8bbb31cefadd5dd17cb670e11321b1a973805 + pristine_git_object: 0f8fdac344cf281c22d976eda69eecb40355a2e4 + docs/models/domainscontrollerupdatedomainresponse.md: + id: 89f572ee4c2d + last_write_checksum: sha1:cf87444824e0e3a7f0b0d06e038cfec3d6d5bcef + pristine_git_object: 471e869c9c64d435e9d8233e50621fab2a89f435 + docs/models/domainscontrollerupdatedomainrouterequest.md: + id: 887ddb769d5b + last_write_checksum: sha1:743a0322c44d4c2b05bc5a800e4676f786c4ff37 + pristine_git_object: b43c5486c73bc0a1bef7f1bed4de53c65ebb183c + docs/models/domainscontrollerupdatedomainrouteresponse.md: + id: d216c0fada30 + last_write_checksum: sha1:668ce94cfcf7774682fccfc765b82db7158c347c + pristine_git_object: 8099ffd69cb0ec78ea85eaff0af10ad237cc5317 + docs/models/domainscontrollerverifydomainrequest.md: + id: 4dab351dfb2c + last_write_checksum: sha1:cf5626b5e23f208f20bd906cbdaf62b7410bc650 + pristine_git_object: 722af8156bf7281317ed2a8ceefe38abe2680925 + docs/models/domainscontrollerverifydomainresponse.md: + id: 7a2cce8f4f20 + last_write_checksum: sha1:5894cc5c1aaeab72b4a67b75d7757f98000a6186 + pristine_git_object: 28e6fac7a199287eaf373d02fb95f0a1e58c71de + docs/models/domainstatus.md: + id: 93866d25cdf9 + last_write_checksum: sha1:846543f56123991428844c15e5b709400715823e + pristine_git_object: c445451784b87b677f908d823f06a368bab99061 docs/models/duplicatelayoutdto.md: id: faa8f45eb4fb - last_write_checksum: sha1:953ae802805d14393be0fac0abf99c78158044ea - pristine_git_object: 17adeec85b34d0d2aefa40c374a530619a5e7a07 + last_write_checksum: sha1:c13f37b895e3d84a3837f6d54dae13b07ab71c11 + pristine_git_object: 1ed7599734d8e881b479ca70a0a9a690be672bff docs/models/editortype.md: id: 0fb9a0b59255 last_write_checksum: sha1:2bc30059305fd2c6d5ba0fb42a9710c7fc34d1b5 @@ -1099,6 +1307,10 @@ trackedFiles: id: c4449c431ca8 last_write_checksum: sha1:798cd31f65569a867d31f233ca3f90b6c1d52a31 pristine_git_object: f75194b0f84ece726dc5b2406cef121588d88989 + docs/models/expecteddnsrecorddto.md: + id: 24cf62d4b39a + last_write_checksum: sha1:3395ba234987992c9ead03dd1fef0dee24484569 + pristine_git_object: ae27579bcf1f447cd275c1068d4922e3991fe478 docs/models/failedoperationdto.md: id: a0f20173f6aa last_write_checksum: sha1:fefa375d83baa4c2413c0821291311d05ff1b998 @@ -1145,8 +1357,12 @@ trackedFiles: pristine_git_object: 0b53266cc2436f41e746ef223b01cd9ba8a56986 docs/models/generatechatoauthurlrequestdto.md: id: daae57305b25 - last_write_checksum: sha1:2d27c6f04d93137bd699e3a684456f36ba499ded - pristine_git_object: faea1efaed813d093e8c6920b1510fb4783d1207 + last_write_checksum: sha1:30bc349b96f0cb9f50c65f8d0fdb135f89bf3a38 + pristine_git_object: 530990d2b3b4ee1da39d3ac7610f0b1405309305 + docs/models/generatechatoauthurlrequestdtoconnectionmode.md: + id: b1ddcc512acb + last_write_checksum: sha1:ebfa316ca231b24f7fa6638fc5e62b1d0a3b7808 + pristine_git_object: e170539b0618bdb125fcfb827f851ac2ae36095f docs/models/generatechatoauthurlrequestdtocontext.md: id: 4da35434c500 last_write_checksum: sha1:898867b1b54f34feb3cd84df6951a88a2bfc69c8 @@ -1159,10 +1375,38 @@ trackedFiles: id: 4da9977c7b73 last_write_checksum: sha1:ab5b1812f51838b8d8e7a6002acc3a9a9b934c29 pristine_git_object: 0bb797789848223d0f49f5fe1c22bae6235b30a5 + docs/models/generateconnectoauthurlrequestdto.md: + id: 35aad94100b4 + last_write_checksum: sha1:c4cae998ec7cc3d955ab5334574a592f3c64e823 + pristine_git_object: 661f9f3f20147e0953102111bee39791ca1f4e97 + docs/models/generateconnectoauthurlrequestdtoconnectionmode.md: + id: 09d7613089d2 + last_write_checksum: sha1:30b8e462d4738cc32c1b68143c79b947639e7e2f + pristine_git_object: c6bb223f23532687757c2b6d6af2c51565270f15 + docs/models/generateconnectoauthurlrequestdtocontext.md: + id: 22e75b9ade94 + last_write_checksum: sha1:ecea949531d22435dd57f10ac424ca446db4b8fb + pristine_git_object: 493099963f3da29a74c5858abeee7598a4e703da + docs/models/generateconnectoauthurlrequestdtocontext2.md: + id: fe5e166412bf + last_write_checksum: sha1:2153eebd0fa9f8e3ab65a049d390d6e7419a7f52 + pristine_git_object: 2c8bd3698bfff176831724a9670cce8137501177 docs/models/generatelayoutpreviewresponsedto.md: id: 3730e19a7fe6 last_write_checksum: sha1:d7f5c1b036ab0c3aa4836df6739eef846109f0ec pristine_git_object: 28ecf966deae619191964dd8d97d8030318a0083 + docs/models/generatelinkuseroauthurlrequestdto.md: + id: 91e7c70344cb + last_write_checksum: sha1:0c80647f40d87e5194fed9b59f54ec6086e5a168 + pristine_git_object: aed006f04161f18b4b16b31adbf95a31302f3ee7 + docs/models/generatelinkuseroauthurlrequestdtocontext.md: + id: 41f2ed072d4d + last_write_checksum: sha1:79c2bf2de71dd50688b746df1d9fb017373a7e81 + pristine_git_object: d3a3b6b518c2bfb4e11e8b9c494a0f0ef0b8fb37 + docs/models/generatelinkuseroauthurlrequestdtocontext2.md: + id: 1ca88278cb2c + last_write_checksum: sha1:907f9c219ccff21d958242193b2332ff8abf5987 + pristine_git_object: 8ffbae785f9518d63fc2835f60405a8ee2273df1 docs/models/generatepreviewrequestdto.md: id: 16f6c4e4d20b last_write_checksum: sha1:eb002a7d78b41964725267f24e8dcf71ba72ca14 @@ -1221,8 +1465,8 @@ trackedFiles: pristine_git_object: 970c0a3440097dc5c73ff8b9124b203b0833d431 docs/models/getchannelendpointresponsedtoproviderid.md: id: f52cc4d686fb - last_write_checksum: sha1:6b34061c0a80b3a7e3b8963752fa0d8f7b5d7f4f - pristine_git_object: 5cab150dcc3fdc8e1097c628abdfe431ddcf7c95 + last_write_checksum: sha1:2bda5cec501d57f61110a0f576635f08d445a0dd + pristine_git_object: 9e5c224a2546f4f9969155fffec83d0f9eefa023 docs/models/getchannelendpointresponsedtotype.md: id: 476d50607b13 last_write_checksum: sha1:51d2ada195b151f189a4296556f9a49073db78f8 @@ -1281,8 +1525,8 @@ trackedFiles: pristine_git_object: 6f3c68d706cc663b2955166deab4a9992989802a docs/models/httprequestcontroldto.md: id: 4eb43cbdb4c8 - last_write_checksum: sha1:bbccf937e6133021bff0b0dd41d889858e740e49 - pristine_git_object: 69812e73a590bdb73729c0540b2d463126849bbf + last_write_checksum: sha1:f06b9dd708ffa881727bbe7483ee0a5925ddd696 + pristine_git_object: 534faf652f17acba54f12fbb853715d2242e0d30 docs/models/httprequestcontrolsmetadataresponsedto.md: id: 77d99f70023c last_write_checksum: sha1:f731e013796e07bb428bfee9a06ebe8c487e4be2 @@ -1295,10 +1539,14 @@ trackedFiles: id: cc7553fdb5fa last_write_checksum: sha1:708b69238c8c3202049f1c3a78d6be7320c5017a pristine_git_object: a2dce77650c6a8da347ee4b0b052e35c315b35ec + docs/models/httprequeststepresponsedtobody.md: + id: 58342904b4bf + last_write_checksum: sha1:e22ec82fd747d0e65909a5e9c28b1996578f202e + pristine_git_object: 2d37a3c8d49cd9f994ab7895aa9963ee4878920a docs/models/httprequeststepresponsedtocontrolvalues.md: id: 7cb8f8f71966 - last_write_checksum: sha1:56f379984dbe1d9361cfd3676962ad36dfa89557 - pristine_git_object: 93a6a29b803bb441e4be08c56f09ecac9d0e421d + last_write_checksum: sha1:33538c7280d8975fa64c8f6ef1b4397d52d52dcf + pristine_git_object: 60141c1d81df8cfe4a1d217fd9ccd786b78725e8 docs/models/httprequeststepupsertdto.md: id: 5e6e0f2816df last_write_checksum: sha1:8fa7233d1cced8e26525011acdf338027b2e9e6f @@ -1395,6 +1643,22 @@ trackedFiles: id: a8b7b8045c52 last_write_checksum: sha1:efc7aa6d3322dda9af56332a96116138bc4dbae7 pristine_git_object: 99cc502eb7162e6d81c5c986b0499429d531f8cd + docs/models/integrationscontrollergenerateconnectoauthurlrequest.md: + id: dc2e26033bbe + last_write_checksum: sha1:3587c9c7b22ef733f0734bdc752c7301a772b09f + pristine_git_object: 67b322d7f2e388d8a84cf802cc9aafcee5e60e1e + docs/models/integrationscontrollergenerateconnectoauthurlresponse.md: + id: fb2beef6641a + last_write_checksum: sha1:e36603302c088bd6a5551a11ca6dfc08fd7ac96f + pristine_git_object: 07c761525fd93910f961be013d040940de3745da + docs/models/integrationscontrollergeneratelinkuseroauthurlrequest.md: + id: b4be68b9ab57 + last_write_checksum: sha1:202aa5d651bd2dcc239762d7638f58d03e871a48 + pristine_git_object: d353d0a0d008d84013d1a0cdc61fe6c5bf639871 + docs/models/integrationscontrollergeneratelinkuseroauthurlresponse.md: + id: a459f3022b71 + last_write_checksum: sha1:769517db449bbbb2bfc38e1df75315a82defa60b + pristine_git_object: 09cbdc83b1ec9876d9b103cea9ba61c56fd0648b docs/models/integrationscontrollergetactiveintegrationsrequest.md: id: 21294a01ecf0 last_write_checksum: sha1:9a0dfef7d67f4738ab9e37f71354f288db195243 @@ -1559,6 +1823,14 @@ trackedFiles: id: 771679da35c8 last_write_checksum: sha1:d973436ef515b54cf2251d35aeec54b39accc0ec pristine_git_object: 38a6e803c97a988d2773008ebc47f2cfce00eb31 + docs/models/listdomainroutesresponsedto.md: + id: eb634caceddc + last_write_checksum: sha1:82ca0163c9456d8d7c792ad470681443a745340a + pristine_git_object: 238e225d838c7988d655c80968f123b9c9c2a7f0 + docs/models/listdomainsresponsedto.md: + id: 2c548363eac3 + last_write_checksum: sha1:6079dc7ba4aa2254c15d761d773353aa740b0b33 + pristine_git_object: 55f7586224b749201eeebba54673b15802dcb6cd docs/models/listlayoutresponsedto.md: id: 406e73f5c0fe last_write_checksum: sha1:fb0e03c04f0071b30ad6c39b291ca04556620b62 @@ -1739,6 +2011,10 @@ trackedFiles: id: c37a65b7b0cf last_write_checksum: sha1:9117d3a04a5061129b5b94325de871d83d3232cf pristine_git_object: cf6acbad1483d9cfa10c49b11976382f8d27a49a + docs/models/mode.md: + id: 568581cb28bc + last_write_checksum: sha1:fbc373230222ae71b9c3f18d49331453bd3c51cc + pristine_git_object: 3b2fe5c9a5ebf81a3623484c8cf8ca6454704850 docs/models/monday.md: id: 6c67e32f5d5e last_write_checksum: sha1:319a86c7d2e9290be744fbba0d81e76323f1f156 @@ -1961,12 +2237,12 @@ trackedFiles: pristine_git_object: b99bc09cb2b6e9fc4509c1ecdc6e0e55361837bd docs/models/providerid.md: id: 00e92c4b11c9 - last_write_checksum: sha1:1015857c314c3d8eb780033118e5d3650a0e0945 - pristine_git_object: bd12e39e2d93be7b27fb34bec747b86c7c58f858 + last_write_checksum: sha1:b293d06b15adaf36d1179d56f92225eb2b0cf544 + pristine_git_object: 3ed0171657337f450428c65443b63f0519974a93 docs/models/providersidenum.md: id: a8365bac8637 - last_write_checksum: sha1:d7c04553c21cade46c3f746fd6c0acba471661f7 - pristine_git_object: 9b4f56ed516c20e6ba5eadc699e5ae3a81fd6e2b + last_write_checksum: sha1:a8d052dfe277bce66aa46e02c0d568a033e7af5f + pristine_git_object: 4b37f933d269333b446b040bcd9e618d0a4d0c9d docs/models/publishenvironmentrequestdto.md: id: "061170546620" last_write_checksum: sha1:7a3f47e14595c11ca22b70bc70a5f71e091c9cb5 @@ -2015,6 +2291,14 @@ trackedFiles: id: 2e2e0707b03c last_write_checksum: sha1:8b06f0afbfb85b6b70816a922c740a29cba13f99 pristine_git_object: 54da540b1da789307411c7f1ef3a47696f374d8e + docs/models/queryparamseverity.md: + id: df3a8384aca0 + last_write_checksum: sha1:ccbb80b401a6a03f78d153aa20724befc2a34bf4 + pristine_git_object: f32ffd22060a9756ec880326ea67533068497340 + docs/models/reasoncode.md: + id: 3d41bce7a6bf + last_write_checksum: sha1:f4dc776f694ee8b3fcaca176fefb99abd0ff1b60 + pristine_git_object: a1693a620e3a2f1751ff8bb7a407ec636ecd3376 docs/models/redirectdto.md: id: fa819ed89d4f last_write_checksum: sha1:2a1bf674f5597113bec482c9e1ae33019643dcc9 @@ -2125,8 +2409,8 @@ trackedFiles: pristine_git_object: c993472b3d154e79bc5e8ebf49fded72df0cc23e docs/models/severity.md: id: 5195c9cf0054 - last_write_checksum: sha1:621a914639364a1558f60d5bff548c02b0c1d8a2 - pristine_git_object: da7b7371ff0875911f8e0cdcc94b00637c71b927 + last_write_checksum: sha1:3fde100594f7276ec22f2f81350a456bdebfcca9 + pristine_git_object: 8b2bef9da25a3fec6661b73a3a33ffa50c87d499 docs/models/severitylevelenum.md: id: 8a0084d6c4a7 last_write_checksum: sha1:fb6d1e949a12666c5a3f6b5f64a794f1eff342db @@ -2353,8 +2637,8 @@ trackedFiles: pristine_git_object: 6e5f2f0aee115b73f479c5e5bcd53583bd763d07 docs/models/subscriberscontrollergetsubscribernotificationsrequest.md: id: 78b87d23ef9e - last_write_checksum: sha1:85b48b0ca566cc0ecbb74fa518d24a029fb19342 - pristine_git_object: 5cc0d40d5c42f8bd51afec02d765f50fa4d225ef + last_write_checksum: sha1:39fd6e3ab817cd3a707954bce279aa87c2319741 + pristine_git_object: fb4d3c6a1df7cc0cd8c90407047c1b3664be538a docs/models/subscriberscontrollergetsubscribernotificationsresponse.md: id: 4933b0cd9bc6 last_write_checksum: sha1:1e3c69aa2f60df08533a68cbef4b7b24c23293a4 @@ -2647,6 +2931,30 @@ trackedFiles: id: b4345c125f21 last_write_checksum: sha1:1140fe47094854532bb7997aec1ca5e10c89c954 pristine_git_object: d6caa7a98f3066770f1e7975aea184b86b9a3f7e + docs/models/testdomainrouteagentresultdto.md: + id: dbc906aac4dc + last_write_checksum: sha1:f73ab8ddab9f42a3441b077db9bf4a1167335fd5 + pristine_git_object: 7d44ab746096a913af6cc6010445cc08d5e4e547 + docs/models/testdomainroutedto.md: + id: 61facc793eb2 + last_write_checksum: sha1:95c9be22122daffd2297e2724240fe0bf46447ac + pristine_git_object: ba9cfdad89ee64ba9374a1c155fac4ae018a9e92 + docs/models/testdomainroutefromdto.md: + id: 82dac891d79d + last_write_checksum: sha1:428d195e56624e0a383a6004820a8ae2aabbe2f0 + pristine_git_object: ae8fed2ba041a1b33f0614c4562d00d777db7804 + docs/models/testdomainrouteresponsedto.md: + id: ae43acd0a6c1 + last_write_checksum: sha1:9cc17b86404fa227524f2a677081761e7811233a + pristine_git_object: ffa05bddf28a59276ee6bfcf86d3ac72e8c477d3 + docs/models/testdomainrouteresponsedtotype.md: + id: d3d1622b3b53 + last_write_checksum: sha1:196b7ae8f0ae73178ea8f64ce18cdc99129872c5 + pristine_git_object: 86436972d8fc4c83b3c169d58b6e258d4c4d2966 + docs/models/testdomainroutewebhookresultdto.md: + id: 68b99ccb0219 + last_write_checksum: sha1:5cdbe383e455e854708ebbdba78c4d4ff1b7fbf6 + pristine_git_object: 1ee5cf19dfbc97dfaaa1b92715d37abf3dd7ed97 docs/models/textalignenum.md: id: eb1e89da228a last_write_checksum: sha1:66254ab6896b7da73b6f307a6c7c96ecafff4841 @@ -3035,6 +3343,18 @@ trackedFiles: id: f760cf10d6bc last_write_checksum: sha1:7ab6d64b063db4c898a9387dfa1201c3b8384743 pristine_git_object: 6041de70501c7b391ab7e0420c21599a26a84adb + docs/models/updatedomaindto.md: + id: 4d3f18a02ecf + last_write_checksum: sha1:cf2b82cea9ac4306353e1079361050b28f7fd77e + pristine_git_object: 4a64c133e7195bb3bd808e27dab48a31438681cd + docs/models/updatedomainroutedto.md: + id: 8c8769dfc5f5 + last_write_checksum: sha1:51451313b94334a382df927fcbc5710bed516a4d + pristine_git_object: f037cd7047fbc8bc769ad72b5477278deb464786 + docs/models/updatedomainroutedtotype.md: + id: 1156d4557cff + last_write_checksum: sha1:a7103605ae4d628621b0258d3fd983488756bfb9 + pristine_git_object: 662e486d1b6418804fd3844b627d7e4de06e2b92 docs/models/updatedsubscriberdto.md: id: a2d9fa1c875b last_write_checksum: sha1:4a412fe22dfdedafad274e584fb9238c56146a2a @@ -3311,10 +3631,14 @@ trackedFiles: id: f6e8241fca80 last_write_checksum: sha1:2f3c398bdc14927343a5cc532f5e1f1e836072b8 pristine_git_object: 7b32c2da30df6133f2de22263b65def1530ce3f0 + docs/sdks/autoconfigure/README.md: + id: 83a76b13f0e3 + last_write_checksum: sha1:46818dd95de1bb4d445e79be62779785104faba8 + pristine_git_object: 8209062402abd89ab02ad0b2e7ad95daf5f51df4 docs/sdks/channelconnections/README.md: id: b38f46c2a1f7 - last_write_checksum: sha1:ddc298a781c66a40520314ddae514e9e091fbe09 - pristine_git_object: c55fd719fd37f1c3609cd3139057ead020f5a9c1 + last_write_checksum: sha1:4c8d1f4a5957375ae0765833af6cfd11a647de72 + pristine_git_object: 485bd5494f533aa648dca74743d62d9db6e762d9 docs/sdks/channelendpoints/README.md: id: 597f23f5fd73 last_write_checksum: sha1:a6dbee9388249df03f6660621e22797dbe2c4021 @@ -3327,6 +3651,10 @@ trackedFiles: id: fb7e49751327 last_write_checksum: sha1:bcad2b7eefbb522e31b3f7a5882bf142a4145921 pristine_git_object: fea49f8cc137a6ef94b5bbd4363078d23169f1f0 + docs/sdks/domains/README.md: + id: 06e9beb4063b + last_write_checksum: sha1:5e2a5715a803c54410c977870912977b20c827fb + pristine_git_object: ae36ae4354cbfc7be545edebab85c9781746779a docs/sdks/environments/README.md: id: d15fc95481b6 last_write_checksum: sha1:7413c01522a2e904732b038cf2a739a7c45bb163 @@ -3341,8 +3669,8 @@ trackedFiles: pristine_git_object: 9d1bc76592970d559468647824b687bc670eae14 docs/sdks/integrations/README.md: id: 7b29664808c0 - last_write_checksum: sha1:8a24b31228df8cd700ae4d1fd4e5387659d65e67 - pristine_git_object: 96194559d89a2831ac8f31f767c4603949c2ec64 + last_write_checksum: sha1:06b4fd0c32aebf6aa6e221647fc7738ad65ea810 + pristine_git_object: 14c030d5bf41b6c6a8dbd3d67158d0511e527ed3 docs/sdks/layouts/README.md: id: 9cae4f89dc39 last_write_checksum: sha1:590da6af759d60fd2f53e1262bdd38f2d34bcaa0 @@ -3387,6 +3715,10 @@ trackedFiles: id: ebc164e85af3 last_write_checksum: sha1:4ee7f5bc123382adb85847e4888ba90ebff0b064 pristine_git_object: 7453ac728f8e49579f09efe2a419429e50325809 + docs/sdks/routes/README.md: + id: 8eceb878c9af + last_write_checksum: sha1:6f93cfb1ba593016457d356c739d697ae87f77c7 + pristine_git_object: 46c03990352135f6f46289b778fa40842d63d5ce docs/sdks/steps/README.md: id: 39cb94746ff0 last_write_checksum: sha1:477988bc8ea610c0de99107939ff76780562c0ab @@ -3421,12 +3753,12 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pylintrc: id: 7ce8b9f946e6 - last_write_checksum: sha1:a8632f238bae7688e0d2be1b01830019c76f2072 - pristine_git_object: 908af8edc87d966acce46d4cbd2b7f925cfc64e3 + last_write_checksum: sha1:0d2e4d5f1abdb3479cc8b6c2e69ea130e32ea604 + pristine_git_object: 28264e779f844f941839b08281af711b98f4c946 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:2eaf2fd8241ca9d4f6293ba5e7b2ea1715d05365 - pristine_git_object: 32f0e5a47e3dfdb543bc4ff4e089ff962838348a + last_write_checksum: sha1:72120a1d6e0744fcd0ed2cdd820b74176ef07bce + pristine_git_object: 2b01f7452c7b8aa8a3946f15c723f7ecd2ad22eb scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:77610d735cce1bc0f71f13a746bf06e463e2ce47 @@ -3453,68 +3785,76 @@ trackedFiles: pristine_git_object: 955703fa58801c45f9cc8e62f4dfef8228cbf625 src/novu_py/_version.py: id: 8e69485642eb - last_write_checksum: sha1:8121103aeae8e54186a847c110df2a7282042cf4 - pristine_git_object: e229523953703d9bf310385cb94f3ec80713d870 + last_write_checksum: sha1:c27cfe9466674af8fa2dfca4dccbb1c1ab689890 + pristine_git_object: 69a880567d1caf0e7d82ade82d55e1ff0d0dba3f src/novu_py/activity.py: id: 7d001a1721a3 - last_write_checksum: sha1:0de7405389598695515d4ca508f51a279a2484c4 - pristine_git_object: e8249094c09ea3cf0d663731b75adf84adf630e8 + last_write_checksum: sha1:f5e4cdae6b9313974e81819a0310996d64e5e476 + pristine_git_object: 6c04c05882cebaa205023446902bb00201117b14 + src/novu_py/autoconfigure.py: + id: 5a84be066edb + last_write_checksum: sha1:69128862d5c270ee3c4e12aa1693f284dfaa2424 + pristine_git_object: 9247e5ff3a54b111bab2301e8e2af6df212344b9 src/novu_py/basesdk.py: id: 925d0f811020 - last_write_checksum: sha1:cc1db3068365f8befb5487517f39b1bc1d0983de - pristine_git_object: a060de5698a7a817b34e1e23bf4fe99bc612e70f + last_write_checksum: sha1:caa6c6a2a720b68648850b7ad8a1d98f28160441 + pristine_git_object: eccc574e8e6b64b89574f4f9fef3318c220cebd1 src/novu_py/channel_connections.py: id: 17496a1f913d - last_write_checksum: sha1:038bca101ddd30e2e87402445f9b575c6c424ca1 - pristine_git_object: 76d6d45f452effb7b8d2054ca5b8b5e44716e2da + last_write_checksum: sha1:0a239d438e95459daa3fb586a50d6757fb28bb4f + pristine_git_object: b9f188508020171f45d31e40c73fdafbcd0881e0 src/novu_py/channel_endpoints.py: id: 479d85924da4 - last_write_checksum: sha1:87913ad87410f0e2ce168e246054ab4b5ae8be72 - pristine_git_object: 15d92c5f10496050d19fd93c1875e6fa5f3ec9c9 + last_write_checksum: sha1:05a870edb85e948f170905881f3a26e8b4234806 + pristine_git_object: 33b7a0a5b1b4bfd6afb576c74d37a2e4f3d1f25e src/novu_py/contexts.py: id: 51cbb9c2444c - last_write_checksum: sha1:6fe4dbaac4898636e61a19df3463af66d35ec91d - pristine_git_object: b196595c1f7d8f075b12060bf410d14b2322d223 + last_write_checksum: sha1:5f0fa2eac17c9d6b8e234200335d59d4cabf3bd5 + pristine_git_object: 24b4b7dd4ac86dcc2ce69a4037ae2e7a33a4d88f src/novu_py/credentials.py: id: f236f65b3baa - last_write_checksum: sha1:cbf893d0778b9dc6a612b3d225f696415974b569 - pristine_git_object: 8ffb5e7521d69673d666cf48eb34b0c0bc09e3dd + last_write_checksum: sha1:af4687c331c12391137a3f6926627b130ce1099d + pristine_git_object: 2c45550b6483c897ba1fc8c6bd1cd7109ede305b + src/novu_py/domains.py: + id: 44f0356e3f15 + last_write_checksum: sha1:07186f7de869880ce1b63f215bda11aba5267f05 + pristine_git_object: 1ef50efd34f57f52934afb12d52ae6eab51b96e1 src/novu_py/environment_variables.py: id: 3602c024a145 - last_write_checksum: sha1:4ac2338b5d8ee6f9520154470ca89facaa3716fb - pristine_git_object: f020c96560883bb7d9d0b691e8f9dab710d3c2be + last_write_checksum: sha1:693a2b2d537b740041b12a2c43ad06298cf761cc + pristine_git_object: 0c1c9aaa5126c4a68228e400f6a94ffb68c89e3a src/novu_py/environments.py: id: fb9123e0ce99 - last_write_checksum: sha1:91c2ec7f3fc9734d30d8575b5457df2b6af14bb8 - pristine_git_object: 592daaca01f85c2edca72cb327e0fc61afacc45c + last_write_checksum: sha1:c9446f272b88ab119ef4d1729dacd3212542f21a + pristine_git_object: 221e4c77a53f2eac5f06212ba47e63435785e746 src/novu_py/groups.py: id: dcae2dc602bc - last_write_checksum: sha1:9f5e5426c0bb648a8f7067ca0090f58f4980bc00 - pristine_git_object: 452ab76f6a64d0f04d178dfb5a607f6138cdae8e + last_write_checksum: sha1:731e4537b0d315b96d5708400da527308a4cd96e + pristine_git_object: 60df5234cdc35c386dc379830d79c0a903777589 src/novu_py/httpclient.py: id: 4b6df62ea001 last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7 pristine_git_object: 89560b566073785535643e694c112bedbd3db13d src/novu_py/integrations.py: id: 3b7e944c96ee - last_write_checksum: sha1:c3c332bcb7937ec013142145ed187708a41d8211 - pristine_git_object: 295701d957bcb3bcebb77d29f2c8fbfe5ad369a1 + last_write_checksum: sha1:e1a76a58cef0dcf5a4bb601273dd949568c335d7 + pristine_git_object: 3ab47def4e92741c2b08c5312be9f4557be92832 src/novu_py/layouts.py: id: 660047f09c6c - last_write_checksum: sha1:26760bb5baa52e21a318372fd9842d09fb1eeff1 - pristine_git_object: b594a75b3a327a04ed7e278f775d5687818df65f + last_write_checksum: sha1:9a1d543d17c0715a4049bf1b7b20a44844806554 + pristine_git_object: a9db0f17d59f2ec14f8063f8c1087a486b176191 src/novu_py/master.py: id: 08300bde8ccf - last_write_checksum: sha1:784766a10314205ac13bdd422a5316d9e65dd363 - pristine_git_object: e665b24211d2ca8428924b47dc1031bf79f78fe6 + last_write_checksum: sha1:fba643779c2875a69020a55df93f4593f2b11357 + pristine_git_object: 59a22c83c2c24cedaa8e0d9ed604d9c72fecf08f src/novu_py/messages.py: id: 3b9c17ccd524 - last_write_checksum: sha1:04cbff340f8b41a9ee90b7e91c4e3661c05d46f5 - pristine_git_object: 7014e97444814f43aa3c59b9731c88bfaf511df6 + last_write_checksum: sha1:576a44845a0f5424a60290101e190bf9306d5a9a + pristine_git_object: 5aad07ebd2a8a0b8c78dc9f2804289978a012337 src/novu_py/models/__init__.py: id: 08e336e51536 - last_write_checksum: sha1:9c95bc5a44fb0a4173c3c3ad50e87222b80bcccd - pristine_git_object: bab662deafbcb2001f64493c9ac3d75b2bd3b83f + last_write_checksum: sha1:a4acabf84b32729409eb9f896408505ed9f5fb2d + pristine_git_object: 31929fe2c8d51cfb4febad3ac2307f287ec6a537 src/novu_py/models/actiondto.py: id: 1d3499193d8c last_write_checksum: sha1:787de11e6a1d379959aa69b9d1c5994837de3c50 @@ -3733,12 +4073,20 @@ trackedFiles: pristine_git_object: 3e5b6f0784e25d6e8ebca76262f3f40c7ac5c864 src/novu_py/models/createchannelconnectionrequestdto.py: id: 4531ad9be024 - last_write_checksum: sha1:78ca65679a3232e8d2f2c93f8d0653563c9c4285 - pristine_git_object: 5a78c066a1158dc1f8fde3af3ad2afbac7ea5ea8 + last_write_checksum: sha1:9bbb8bb0a8180b9c7dee783079411ef843a73e03 + pristine_git_object: cebf8b4f6417a79aba86e73456294af93fea72f3 src/novu_py/models/createcontextrequestdto.py: id: ecf87aa4945d last_write_checksum: sha1:0130c7d5e24b6d053952fcb7bb86fab1647bf8e8 pristine_git_object: 1b7fbfcc71e9684f6f9edf2308f9f77ba65dab70 + src/novu_py/models/createdomainconnectapplyurldto.py: + id: 1993d0b4ced5 + last_write_checksum: sha1:600c3a02bfc3f5a7fe69e6178733e2f0f261f7be + pristine_git_object: 163658cf73d5e12c28620b3b3138a1a3466cbb51 + src/novu_py/models/createdomaindto.py: + id: dd4fa8df31fe + last_write_checksum: sha1:1094d9258ade3d0af3b1effc4f75e2877e546463 + pristine_git_object: 9eefdb87aefd6afd50432f9e315be238016bbbfd src/novu_py/models/createdsubscriberdto.py: id: 3c71ad81338f last_write_checksum: sha1:0c1fdcd09f6c8fde03f84c9dfe0fbc65d2e665cd @@ -3809,8 +4157,8 @@ trackedFiles: pristine_git_object: bec058459407265b60291e2204aeaf6d3f609441 src/novu_py/models/credentialsdto.py: id: c3c08bd9afea - last_write_checksum: sha1:ca5b55d7263b3556bd689286cc0d840d00fdc186 - pristine_git_object: a812b0718332cf0194d9d143f44b3baf89154013 + last_write_checksum: sha1:50ce263220d0fd7a47c553e4f91b9296067941c7 + pristine_git_object: dd97f95519b5e3d3d19ce95f0c20dbb8f9b74b8e src/novu_py/models/customcontroldto.py: id: ef9e44bf6c23 last_write_checksum: sha1:060dc484198ddfa08bc32c9e79f8ef438be71dae @@ -3875,6 +4223,10 @@ trackedFiles: id: 9e7e3877f749 last_write_checksum: sha1:dfeb25eb14bcbaf0b864f800cd965c8d43c9f80b pristine_git_object: e3c3ef7600046fa0fa7959de65acccfc1f18e9bb + src/novu_py/models/diagnosedomainresponsedto.py: + id: 18c7889b4a00 + last_write_checksum: sha1:6f5e29f5b9efe991fd0e48600d28a2d06d3a77bb + pristine_git_object: 6e261a262810b43aaaa9e1d8cba3549a52b130f7 src/novu_py/models/diffactionenum.py: id: f417d716980c last_write_checksum: sha1:3b0b948ecdfa2297c78b7a27680ea1b3d23cd5a2 @@ -3939,10 +4291,98 @@ trackedFiles: id: efc9271e1005 last_write_checksum: sha1:f9c277ff82e6ca585cfa210948da2bd0dda92598 pristine_git_object: f14f30aafc8d672fb6df2c651367d9358fb66094 + src/novu_py/models/domainconnectapplyurlresponsedto.py: + id: e818aba6786e + last_write_checksum: sha1:c0f6f17727089209ee9b55991a2a0a38224fb978 + pristine_git_object: 8806f2e8714c499512f53958c82cd748323abec9 + src/novu_py/models/domainconnectstatusresponsedto.py: + id: 6d29ed60c04d + last_write_checksum: sha1:49f6c323a06ad3796a85eb2fba416fb5d8111f01 + pristine_git_object: 283e99fa7b8f3fa4ecabd9ca4b7d571a9ff755d7 + src/novu_py/models/domaindiagnosticcheckdto.py: + id: c25a9638ba2e + last_write_checksum: sha1:1ed8ac792894d23ca6ce61b90fb7560e3fa043b7 + pristine_git_object: 6ebb1d04ea1ec2ab59bc82077ab1a25f64dbbabc + src/novu_py/models/domaindiagnosticissuedto.py: + id: 16a44129ab24 + last_write_checksum: sha1:ad6b043855880f2100143b7e0da71c8559c4cb5c + pristine_git_object: 1251eb538ca67b1387f221df7885fbfac75c113a + src/novu_py/models/domainresponsedto.py: + id: 9ba3d98e1d3e + last_write_checksum: sha1:75222fe13426978aa30cbce96204032b7889b113 + pristine_git_object: a04483a9f6fe27921c15541b18347192b639525e + src/novu_py/models/domainroutedto.py: + id: 7370cb2bdc82 + last_write_checksum: sha1:0dab4376399b2d6b96aced126743a814c2f1b19f + pristine_git_object: c54dbd0ef5da779a21519da897d091552bbe5c26 + src/novu_py/models/domainrouteresponsedto.py: + id: 7759b6b49514 + last_write_checksum: sha1:c14dbe9ee15e73ceece319d312d3123d72d0a3ad + pristine_git_object: 00fa0bed2807ba46c9caee0abaad9651612bc448 + src/novu_py/models/domainscontroller_createdomainop.py: + id: ace48f8ce277 + last_write_checksum: sha1:7e48b6755a07cf2aee260ef0ff645287fbec7cde + pristine_git_object: b7720c77cc9cde9f20f4c3855fec15e6cbb0feea + src/novu_py/models/domainscontroller_createdomainrouteop.py: + id: 6c60a7063b42 + last_write_checksum: sha1:524b0cc32cbf20bc75973d6cbe41399c93df5a42 + pristine_git_object: 6129ff5dfc8525743023064ca4e254b0f0e55668 + src/novu_py/models/domainscontroller_deletedomainop.py: + id: eb3b56915526 + last_write_checksum: sha1:a5e8813555076fd67df25526b1f82bacab2a190f + pristine_git_object: 5b7a85204380cde14fafca021f15fb7bbbd021ed + src/novu_py/models/domainscontroller_deletedomainrouteop.py: + id: 32874f524fa4 + last_write_checksum: sha1:87068f179d785e9225ab5ebd1423f3990a5bd173 + pristine_git_object: 0821402d2d82b93800176da4642fd51d12eb3eb3 + src/novu_py/models/domainscontroller_diagnosedomainop.py: + id: 8e84f51bb135 + last_write_checksum: sha1:4effc1b6f787d9ba442d59fc4d19a50ab64c35bc + pristine_git_object: 9b46e4d86aa760154415d75fd8bd2c16d1d17812 + src/novu_py/models/domainscontroller_getdomainautoconfigureop.py: + id: 52bdcd4a2073 + last_write_checksum: sha1:3dfc8ac30c1711770e55cf2937ec58258bcbfa66 + pristine_git_object: 62cbc5872e3420f491f8a990ac40b13c020a8154 + src/novu_py/models/domainscontroller_getdomainop.py: + id: 4976b8cd97de + last_write_checksum: sha1:6c9c62e783da432cfbce28a3c7552d2c70e24f07 + pristine_git_object: 54357522619b1eea6dfbe8693e75fcb1d9b7aea8 + src/novu_py/models/domainscontroller_getdomainrouteop.py: + id: 1170f24ddb49 + last_write_checksum: sha1:2db5f7a7aed8010e029f17556d8646e380b08335 + pristine_git_object: fb210bfeb4ca70ad6dce05135b0304fdfc3e8c87 + src/novu_py/models/domainscontroller_listdomainroutesop.py: + id: b9add7c6e7ca + last_write_checksum: sha1:2f6f2bd649ec7023e17f9a3aa4e0819134f1d923 + pristine_git_object: 50b590bf66025f9695075aa76721d3ecee660327 + src/novu_py/models/domainscontroller_listdomainsop.py: + id: 3ae00bf71920 + last_write_checksum: sha1:5c1d727d5fde9647b4b071b0deeb9bc3abf8f4d0 + pristine_git_object: ebd97a1082e3d162a53242ff39627296f7639d3e + src/novu_py/models/domainscontroller_startdomainautoconfigureop.py: + id: e2797cc5b87a + last_write_checksum: sha1:d2a9d7c558dba7376dd299605a7f8fc060fe7d09 + pristine_git_object: cd4696ff410f04ac177cc69fabb71e3476b122b5 + src/novu_py/models/domainscontroller_testdomainrouteop.py: + id: b5976dbabbe1 + last_write_checksum: sha1:356b035db0f92c26d5d6a5621bf08cf7730d1bcf + pristine_git_object: bee6a2347a7a85a3ecca2e80a2584ed51c5ad984 + src/novu_py/models/domainscontroller_updatedomainop.py: + id: b9d0996d48be + last_write_checksum: sha1:8e2b0a19348448b96211ad4abea98650eddef65e + pristine_git_object: 4297be83ec522ce16c0c6cf3f373967a7fa7806b + src/novu_py/models/domainscontroller_updatedomainrouteop.py: + id: 61aebdc8c841 + last_write_checksum: sha1:70ab3c30e6e9670d012a80d4177abcfcad90d011 + pristine_git_object: 9dd4447eaed1be5ba5c8003b4806bf79f3009a4e + src/novu_py/models/domainscontroller_verifydomainop.py: + id: 4bc44d71186a + last_write_checksum: sha1:77fc9a845314e9fc24b92b3246967bb8040bf569 + pristine_git_object: 779b0ef19c09a608245cd3c9d412ed277035155a src/novu_py/models/duplicatelayoutdto.py: id: 9ec2da2dd76a - last_write_checksum: sha1:d14c82dab3fd4481b01ca16ad0ac80711cc7a9a3 - pristine_git_object: 5648f587b9de796fcf6a4864936791580dde48c4 + last_write_checksum: sha1:c69d4acddba42b687c9ce03d4e96982776eb3a7c + pristine_git_object: 690a69631c5256cdbd0d3259ac96f2118a62de5c src/novu_py/models/emailblock.py: id: 26325bfe4081 last_write_checksum: sha1:b14d03ab8133d4d0508fea0e086f1360af9c6e61 @@ -4095,6 +4535,10 @@ trackedFiles: id: f5e172ee1939 last_write_checksum: sha1:002f391d2cbd9f7a84f4e4ac898af8435bac5822 pristine_git_object: cd0d9918546eac94137dd0486b7817f15f67dbaa + src/novu_py/models/expecteddnsrecorddto.py: + id: 461a74774dcf + last_write_checksum: sha1:dbe68c505abe7ba16f684637da348cb3e1dd63de + pristine_git_object: 59cdff32e60c9f393815e8dcbfe0f6b270c34cb6 src/novu_py/models/failedoperationdto.py: id: b0f4d7f0d626 last_write_checksum: sha1:f5e39eebb461c9eb32dc6bf016a36f356efc24ce @@ -4113,16 +4557,24 @@ trackedFiles: pristine_git_object: 163619c4151a3b8e17166d9d1ed558fbbdc2126e src/novu_py/models/generatechatoauthurlrequestdto.py: id: ebcdb0a8b971 - last_write_checksum: sha1:eb17adb8ce9e302e3344bbc8f843ece0477bcbb7 - pristine_git_object: d8c4c0ff672f683aab28b8f1f9b96c9824e926aa + last_write_checksum: sha1:d7143f81669da70137dd73701eb1262d21760ace + pristine_git_object: e81c8af7e458f930fc2f65fac38fa863d9dcb9c9 src/novu_py/models/generatechatoauthurlresponsedto.py: id: 91967b3550d9 last_write_checksum: sha1:8bc2416b0c51cb5c843a464ebabdb57938dcc2d1 pristine_git_object: ded69cc0d141479d3d5998b2a4999e7248e8cd45 + src/novu_py/models/generateconnectoauthurlrequestdto.py: + id: a3c01620e100 + last_write_checksum: sha1:14fa838aae00182d84b9676218ab9811e5ac50ec + pristine_git_object: 3feb758a5e8e1cc7e02dae6357b320d8068aea49 src/novu_py/models/generatelayoutpreviewresponsedto.py: id: fb1d1cd95090 last_write_checksum: sha1:cf4433b0a47ad5405ac232afe54fd8e0224e4bd4 pristine_git_object: ac4bba127f0fff511c9e8e0dc382e0c81cbd3c28 + src/novu_py/models/generatelinkuseroauthurlrequestdto.py: + id: 83cc18760c27 + last_write_checksum: sha1:85d091b6f9a3728e8db7a9cab1aa9176b44ae09a + pristine_git_object: 587778e30f1a227781800ceee2d3c142154b87dd src/novu_py/models/generatepreviewrequestdto.py: id: 9ca026ee18de last_write_checksum: sha1:28de46dd1ee63f2ac9c1dca88564fd2d0be680b6 @@ -4133,12 +4585,12 @@ trackedFiles: pristine_git_object: 935e6ffb93fbe876043ba6a2d2a1c585bfec5901 src/novu_py/models/getchannelconnectionresponsedto.py: id: 8fbf7ffa93f5 - last_write_checksum: sha1:3dea48a77d833e75ac6be17836089311f422cf7f - pristine_git_object: 4c3759849c245239739bdfe9dc2b62dbcffed777 + last_write_checksum: sha1:77cb1cd48860f18d53f0c3f90c178924712847e1 + pristine_git_object: e7721980172da59d87ffe19cfb2431ab46f21959 src/novu_py/models/getchannelendpointresponsedto.py: id: 7ecd48cbc543 - last_write_checksum: sha1:0d3e38053ee56d6bbd4b0768af54981e396e84d0 - pristine_git_object: af217d6e9376451f51fe6bfefa339c2086868687 + last_write_checksum: sha1:6b3da0c922bc64a7c39394159cfc163c957052c2 + pristine_git_object: 2a81217e5fc3a225d5275628e4a99606e539f313 src/novu_py/models/getcontextresponsedto.py: id: 14a214a6e106 last_write_checksum: sha1:f793e38d07a343c7915a9218c0cf974b8e2c87e4 @@ -4189,8 +4641,8 @@ trackedFiles: pristine_git_object: 5e918e9f13c854bc231f4f51c58b91e94f3d1f56 src/novu_py/models/httprequestcontroldto.py: id: f011fb2c8731 - last_write_checksum: sha1:9b70296adbc48649026ffd333bbd76ec15c935da - pristine_git_object: c8adc67b201f8a7122064b301dcb72b32e7d67dd + last_write_checksum: sha1:9539035f9ff7b288013b95673f95c81fed1b6520 + pristine_git_object: 9ae11e3e5d10ce15648cebb0d70434d5ccdaab83 src/novu_py/models/httprequestcontrolsmetadataresponsedto.py: id: ee3d74ddd9d2 last_write_checksum: sha1:26d1f9714f12cee325df6b548e7dacaf7a78590c @@ -4201,8 +4653,8 @@ trackedFiles: pristine_git_object: 6fd854f6df9d1a0772635890c813bdd0dcf4e432 src/novu_py/models/httprequeststepresponsedto.py: id: d2640922a44a - last_write_checksum: sha1:55ea11b5eae30abd97aa12e27bbeaf724aeaa706 - pristine_git_object: 78b85b12bf5adde40838ad7dd5d278c8ec91d2cf + last_write_checksum: sha1:1510bad72344215379315400329ae5887b914965 + pristine_git_object: 26d2716b68a308ba3c15cf9a887db854c241ecb4 src/novu_py/models/httprequeststepupsertdto.py: id: dcec7ae58958 last_write_checksum: sha1:3afa9713fb5effff429972d5d9b32c44cb50380a @@ -4271,6 +4723,14 @@ trackedFiles: id: 56c92ee9d143 last_write_checksum: sha1:462c47ad16cf91081cc70f7f98d4f8f87038091d pristine_git_object: 4da70d38226e464eb5de205ae24e1c7e1d2ec151 + src/novu_py/models/integrationscontroller_generateconnectoauthurlop.py: + id: 265848cb6640 + last_write_checksum: sha1:aacc0eff76d2500a1feadd03231ae67648afb1ab + pristine_git_object: 9a61a3e83dced6c21a5140502031706c69927abc + src/novu_py/models/integrationscontroller_generatelinkuseroauthurlop.py: + id: acc9eb92b1ab + last_write_checksum: sha1:9d353e06a2abe0bbbb0c7057a96edc228050201f + pristine_git_object: 96e91555acaf91d7fc83e5ae849622aef3a4ca42 src/novu_py/models/integrationscontroller_getactiveintegrationsop.py: id: bd51ab2ef213 last_write_checksum: sha1:3a56aa6bfa4f733bbec608bb99040083f5ac18f2 @@ -4367,6 +4827,14 @@ trackedFiles: id: d736e5de99f1 last_write_checksum: sha1:1506b7056810320f18891294d6e058d2675e70e5 pristine_git_object: 32d5ada55a242bab5ca4eefb698b17b401c01897 + src/novu_py/models/listdomainroutesresponsedto.py: + id: 433c5b4d4610 + last_write_checksum: sha1:82466a92a78bec2f3baa838e93c47ec22331ee93 + pristine_git_object: f8693f42c1c2bb50cd20c5a0787ea306f04a0603 + src/novu_py/models/listdomainsresponsedto.py: + id: 56cf7763b8e8 + last_write_checksum: sha1:0290638862aca53a1147544e8c526eaaf79588d3 + pristine_git_object: ced04dd185b5bb48ec383992fed79d4bc3b1805f src/novu_py/models/listlayoutresponsedto.py: id: 7c96845facd5 last_write_checksum: sha1:9327076f1883872c0cda3cae3400a3c0cc2a6cec @@ -4585,8 +5053,8 @@ trackedFiles: pristine_git_object: 5a9cccbfee95b08b9890abaccbb29d4d5862623e src/novu_py/models/providersidenum.py: id: 7415ccdf52b5 - last_write_checksum: sha1:79b53dedd18f1b906129e6ab5698bdb34dd4d9d5 - pristine_git_object: 0296645a7ee92bfc847a8f258e210049641e9435 + last_write_checksum: sha1:2495f1b155bda53fc368cd0a06a25fed1374d168 + pristine_git_object: 94dbf33a6d6e5235442c8930f439ab3a671e1d7b src/novu_py/models/publishenvironmentrequestdto.py: id: d502aeeae822 last_write_checksum: sha1:b10d11b264f21a5c576ec27562a5d6631e9ae671 @@ -4825,8 +5293,8 @@ trackedFiles: pristine_git_object: d1666cf4dad50abc8282780224a674082274a853 src/novu_py/models/subscriberscontroller_getsubscribernotificationsop.py: id: 2512d21d935a - last_write_checksum: sha1:1d5d3efe25b97da190ef99912626e6b6e173bbc1 - pristine_git_object: 21b27be3cfc1642c8b0a362f582807888bde29cd + last_write_checksum: sha1:6f936d4dc41e09e2af8d810712928947c15398b0 + pristine_git_object: c07248253bc9bc495503187fb8a76827f23198be src/novu_py/models/subscriberscontroller_getsubscriberop.py: id: 331ae1500444 last_write_checksum: sha1:709fd9e45b73b6e491c58d98aaf1f981f26f52e0 @@ -4975,6 +5443,26 @@ trackedFiles: id: e5454382ee7e last_write_checksum: sha1:bbab819298ffefb144abfc931fbb8c14b3ed9adf pristine_git_object: 512598ec4504568347cd6edac145b84503301770 + src/novu_py/models/testdomainrouteagentresultdto.py: + id: "459334077362" + last_write_checksum: sha1:028edf35c515bc2dcad10b91b18a114a6da58cc7 + pristine_git_object: 06b6c1e318c913bdb2eaf0f281cabe4789521531 + src/novu_py/models/testdomainroutedto.py: + id: ad5f313c0ad1 + last_write_checksum: sha1:e177b9207b8627cbfd1b1917d77201a791e3c279 + pristine_git_object: 8a068c0092c910440dd26ba3583ce1530fc31bf3 + src/novu_py/models/testdomainroutefromdto.py: + id: 710e3d85cec5 + last_write_checksum: sha1:05123408b57e50bd7f35af36032c8475814e5f8a + pristine_git_object: 9fac7190b743018e227aedc88f0caa9fa299bc9e + src/novu_py/models/testdomainrouteresponsedto.py: + id: 6c54be61b744 + last_write_checksum: sha1:2cdfea6ee9b66b9d8f24cc8d94b0211c5969447f + pristine_git_object: f669ba6246a3e5291c3ba87f01a503599dcc96c7 + src/novu_py/models/testdomainroutewebhookresultdto.py: + id: d7b5d239e521 + last_write_checksum: sha1:3269030e281a1a157adb16aec5b5e00e843b0459 + pristine_git_object: 9527dc654724b2c7dd00d5aa87f6fff11c49169c src/novu_py/models/textalignenum.py: id: 0ef8586aaadf last_write_checksum: sha1:62445cc7e0bf26bbaaf337634d5df71f9e39e240 @@ -5175,6 +5663,14 @@ trackedFiles: id: af7fcd08cd86 last_write_checksum: sha1:9a5e553e6ae698e20a7dd5739f4f3050adf7170a pristine_git_object: 7c4de530dd014a6bbf92c50a9cf5503782267005 + src/novu_py/models/updatedomaindto.py: + id: 4bd4b429d8b4 + last_write_checksum: sha1:55cc1ab288993677189c1290791fd736e54abbdb + pristine_git_object: ebc86375c50d8476f112bbaad2520508b0fe1bc4 + src/novu_py/models/updatedomainroutedto.py: + id: cadb0b6a847f + last_write_checksum: sha1:91fe583cea5fa536f8a05c5dc9dfee75ade96c22 + pristine_git_object: 6277b1f507fbef60c39dfbd7c52f48416909c773 src/novu_py/models/updatedsubscriberdto.py: id: 28748fad6c1d last_write_checksum: sha1:f7c4ad1c772a39acc7d2aa9378340262e3d1bb47 @@ -5317,64 +5813,68 @@ trackedFiles: pristine_git_object: 8b8a4ae8eea1c7a906cc1f6719377fe98f4f310c src/novu_py/notifications.py: id: 07b8b9872108 - last_write_checksum: sha1:5e3123c69b5197473095edd49983538bc3257830 - pristine_git_object: 1af0ce8b0811129e8aaab1d49a1a8ac7c571ab59 + last_write_checksum: sha1:179b397dfdfd79f34c6fe1ebcbd5e757a5f7ca7a + pristine_git_object: 2c105bd5a453c26f673a072190e0250d97b44ec4 src/novu_py/novu_messages.py: id: 40b7c7fe6a50 - last_write_checksum: sha1:e077f246358985801d89e84825bb08de07b9b68f - pristine_git_object: 966acdf057d75110995ded39699bd8f20a9afa66 + last_write_checksum: sha1:990992553b4c0cb1413e6d2731b6192495cbc808 + pristine_git_object: 95f6024cac7624acb4cff092e480056a1a516e98 src/novu_py/novu_notifications.py: id: 625e06af47d0 - last_write_checksum: sha1:2a6261efe6b51e448ca8d45aac44c24216293215 - pristine_git_object: c09e9dc0167a8ea16066d1b6d17e53efa7e221dc + last_write_checksum: sha1:2080772121d93c9926479ea3b8af2c040ca3ab88 + pristine_git_object: 8492934c7d94273243b9021cf6b0369c5729d324 src/novu_py/novu_subscribers.py: id: 779029b19f30 - last_write_checksum: sha1:434524128a314b90af0f4dd1d5e3374a3e6dcaf6 - pristine_git_object: ad89f2ae5c489a319972d8944ef4e5278499bc14 + last_write_checksum: sha1:e1ba0d59be5505d0ae319e29ed4a4273509e95fe + pristine_git_object: ba41afc9468f2926cad0bcf4ec88b8a7bcc7f5dc src/novu_py/novu_topics.py: id: 4b57996ac144 - last_write_checksum: sha1:272cf6c1e3fd4535f2d85ca3c23546ee5121ca9d - pristine_git_object: 13e9554cbb834a4c5701b5ca085341689127a0d8 + last_write_checksum: sha1:0a86e14fdfc6460461ed043e06047c2c22ed93e7 + pristine_git_object: cdfb24fd82958d2545f8f019cf3489a0fb4f6216 src/novu_py/preferences.py: id: ade969c13809 - last_write_checksum: sha1:a97a36558ad1ae1feb5e439234df5b0b7e4db29c - pristine_git_object: 5067a9b2f2d6b9b4b36c88f368cdac652c5bd525 + last_write_checksum: sha1:bf15dbc52d5cd1d0b90c2ce124526f74db907f15 + pristine_git_object: fc6fcf37c7485ab615e06ac071860ae154ee3345 src/novu_py/properties.py: id: 7f7dab82ac00 - last_write_checksum: sha1:a129844caa1c3aa5217e71c7971953edb552cf20 - pristine_git_object: 4cb34e933c5d1b0941c8af1b483a4149f925a0c6 + last_write_checksum: sha1:05266fff3d4d44c0ab5c30dfcdf5f49929bce352 + pristine_git_object: 0392a35c56dd5de0b734b516b231235b4586f2d0 src/novu_py/py.typed: id: a5813560b70c last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 + src/novu_py/routes.py: + id: b1e4e8c73a0f + last_write_checksum: sha1:8557d09961864f38ba41a497f65981c796149faa + pristine_git_object: 06d73aa7885e7b9e5fce693a61f2e7311727bb8e src/novu_py/sdk.py: id: 295c6e2a7b17 - last_write_checksum: sha1:03847b741662716028943ba9549d364a05a73d69 - pristine_git_object: cf19418dc666addbdb9619cb943418272baa37ad + last_write_checksum: sha1:5719baf28b85dc6c18bb40ded32d5f225da02c42 + pristine_git_object: dad5b45ba3e23c72295597a24d0737fa85664af1 src/novu_py/sdkconfiguration.py: id: 10dc4ec23819 last_write_checksum: sha1:7fbaa91126f9d2c9c73239b97d9cd115973cf49d pristine_git_object: 9a6bce8a6670bbc8cb5a097f542cadd88a1673eb src/novu_py/steps.py: id: 643fdcfc303e - last_write_checksum: sha1:0799d553073c0baf7b2b67ad8d54ceae3fab953a - pristine_git_object: 4cf2ff58b0c120edb158ba0d3c02b71013343e3d + last_write_checksum: sha1:08c4f8d1d5c89fedbea16aff2e289a5512c756aa + pristine_git_object: da5531ed4877d8890bf4c553890a32702a248a2e src/novu_py/subscribers.py: id: 0fea353bdbd0 - last_write_checksum: sha1:01583340d7524d1a7a04d0e78d45414afbada322 - pristine_git_object: 65ba848dff028de74f4a3322da5682aa68a1ceab + last_write_checksum: sha1:f2413ab9e94385095e2acbdf6e59584a923a1bad + pristine_git_object: 4d4a942b10f7349f77eef39b23686c459bbe993b src/novu_py/subscriptions.py: id: 582a93baffa3 - last_write_checksum: sha1:66bc0ad5fb6302f2cdd3409eb41b3a90a277e666 - pristine_git_object: 105f795e4e7db6776738475dccdc97d52859d3e9 + last_write_checksum: sha1:30caa28d4dd5f30a652a8f723c72b6aab5e301a3 + pristine_git_object: 95fcdc031bcbae547a988ef8cf3ebade83b310b5 src/novu_py/topics.py: id: 21805ff80609 - last_write_checksum: sha1:09958fa87f4862f0cc4a4d5b17637a7ab20025e4 - pristine_git_object: 794393cd7b37fccb89976c28b956d547db442928 + last_write_checksum: sha1:6c64554615e82ae19e3b2b12f92ed682723d361b + pristine_git_object: bacabc64e3d3abbd260278ed90f193da43a89644 src/novu_py/translations.py: id: 256781ff57a4 - last_write_checksum: sha1:a6506f17244e6f8cbc6110275030ef0fda25af6b - pristine_git_object: 4af6fa4e861e6d2a208abbf947ae4aa5df39217f + last_write_checksum: sha1:951932d6e524381278a97cd2912301d0ec4b6182 + pristine_git_object: bd1698bbeb72ef02af19b11f97f1a7f97f94cbcc src/novu_py/types/__init__.py: id: cf952daa42b9 last_write_checksum: sha1:140ebdd01a46f92ffc710c52c958c4eba3cf68ed @@ -5457,8 +5957,8 @@ trackedFiles: pristine_git_object: dae01a44384ac3bc13ae07453a053bf6c898ebe3 src/novu_py/workflows.py: id: 7cabc83c4dc8 - last_write_checksum: sha1:d2ecfbd31d0b3647b5a396e9c323ab3d799609b5 - pristine_git_object: aa2295b361376537802e4d8d0d2a13d339daaebf + last_write_checksum: sha1:edf91d395958ad22bb762d8e53a4aaf798f2b9da + pristine_git_object: 628e732b4ce24de38cdeb340767abd0b8c71f0ad examples: EventsController_trigger: speakeasy-default-events-controller-trigger: @@ -6816,7 +7316,7 @@ examples: ChannelConnectionsController_createChannelConnection: speakeasy-default-channel-connections-controller-create-channel-connection: requestBody: - application/json: {"identifier": "slack-prod-user123-abc4", "subscriberId": "subscriber-123", "context": {"key": "org-acme"}, "integrationIdentifier": "slack-prod", "workspace": {"id": "T123456", "name": "Acme HQ"}, "auth": {"accessToken": "Workspace access token"}} + application/json: {"identifier": "slack-prod-user123-abc4", "subscriberId": "subscriber-123", "context": {"key": "org-acme"}, "connectionMode": "shared", "integrationIdentifier": "slack-prod", "workspace": {"id": "T123456", "name": "Acme HQ"}, "auth": {"accessToken": "Workspace access token"}} responses: "201": application/json: {"identifier": "", "channel": "sms", "providerId": "slack", "integrationIdentifier": "slack-prod", "subscriberId": "subscriber-123", "contextKeys": ["tenant:org-123", "region:us-east-1"], "workspace": {"id": "T123456", "name": "Acme HQ"}, "auth": {"accessToken": "Workspace access token"}, "createdAt": "1719812430207", "updatedAt": "1735628544115"} @@ -6963,7 +7463,7 @@ examples: IntegrationsController_getChatOAuthUrl: speakeasy-default-integrations-controller-get-chat-O-auth-url: requestBody: - application/json: {"subscriberId": "subscriber-123", "integrationIdentifier": "", "connectionIdentifier": "slack-connection-abc123", "context": {"key": "org-acme"}, "scope": ["chat:write", "chat:write.public", "channels:read", "groups:read", "users:read", "users:read.email", "incoming-webhook"]} + application/json: {"subscriberId": "subscriber-123", "integrationIdentifier": "", "connectionIdentifier": "slack-connection-abc123", "context": {"key": "org-acme"}, "scope": ["chat:write", "chat:write.public", "channels:read", "groups:read", "users:read", "users:read.email", "incoming-webhook"], "userScope": ["identity.basic"], "mode": "link_user", "connectionMode": "shared", "autoLinkUser": true} responses: "201": application/json: {"url": "https://slack.com/oauth/v2/authorize?state=..."} @@ -7200,7 +7700,7 @@ examples: "400": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": []}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": {}}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} SubscribersController_getSubscriberNotificationsCount: @@ -7218,7 +7718,7 @@ examples: "400": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": []}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": {}}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} SubscribersController_deleteAllNotifications: @@ -7329,7 +7829,7 @@ examples: "400": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": []}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": {}}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} EnvironmentVariablesController_getEnvironmentVariable: @@ -7396,9 +7896,290 @@ examples: application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": {}}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + DomainsController_listDomains: + speakeasy-default-domains-controller-list-domains: + parameters: + query: + limit: 10 + responses: + "200": + application/json: {"data": [{"_id": "", "name": "", "status": "verified", "mxRecordConfigured": true, "_environmentId": "", "_organizationId": "", "createdAt": "1709983742886", "updatedAt": "1735606707171", "expectedDnsRecords": [{"type": "MX", "name": "inbound", "content": "inbound-smtp.us-east-1.amazonaws.com", "ttl": "Auto", "priority": 10}]}], "next": "", "previous": "", "totalCount": 3816.97, "totalCountCapped": false} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": {}}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + DomainsController_createDomain: + speakeasy-default-domains-controller-create-domain: + requestBody: + application/json: {"name": ""} + responses: + "201": + application/json: {"_id": "", "name": "", "status": "verified", "mxRecordConfigured": false, "_environmentId": "", "_organizationId": "", "createdAt": "1716949744625", "updatedAt": "1735624573515", "expectedDnsRecords": [{"type": "MX", "name": "inbound", "content": "inbound-smtp.us-east-1.amazonaws.com", "ttl": "Auto", "priority": 10}]} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": false}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + DomainsController_getDomain: + speakeasy-default-domains-controller-get-domain: + parameters: + path: + domain: "foolish-requirement.org" + responses: + "200": + application/json: {"_id": "", "name": "", "status": "pending", "mxRecordConfigured": true, "_environmentId": "", "_organizationId": "", "createdAt": "1712440954138", "updatedAt": "1735628784965", "expectedDnsRecords": [{"type": "MX", "name": "inbound", "content": "inbound-smtp.us-east-1.amazonaws.com", "ttl": "Auto", "priority": 10}]} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": {}}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + DomainsController_updateDomain: + speakeasy-default-domains-controller-update-domain: + parameters: + path: + domain: "ordinary-eternity.org" + requestBody: + application/json: {} + responses: + "200": + application/json: {"_id": "", "name": "", "status": "verified", "mxRecordConfigured": false, "_environmentId": "", "_organizationId": "", "createdAt": "1711208292067", "updatedAt": "1735669961330", "expectedDnsRecords": [{"type": "MX", "name": "inbound", "content": "inbound-smtp.us-east-1.amazonaws.com", "ttl": "Auto", "priority": 10}]} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": 9284.53}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + DomainsController_deleteDomain: + speakeasy-default-domains-controller-delete-domain: + parameters: + path: + domain: "complicated-finer.org" + responses: + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": []}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + DomainsController_diagnoseDomain: + speakeasy-default-domains-controller-diagnose-domain: + parameters: + path: + domain: "alive-publication.biz" + responses: + "200": + application/json: {"ok": true, "runAt": "", "checks": [{"code": "apex_cname_collision", "status": "skipped", "latencyMs": 2745.11}], "issues": []} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": [4727.34]}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + DomainsController_verifyDomain: + speakeasy-default-domains-controller-verify-domain: + parameters: + path: + domain: "formal-fork.com" + responses: + "200": + application/json: {"_id": "", "name": "", "status": "verified", "mxRecordConfigured": true, "_environmentId": "", "_organizationId": "", "createdAt": "1709440889064", "updatedAt": "1735651545144", "expectedDnsRecords": [{"type": "MX", "name": "inbound", "content": "inbound-smtp.us-east-1.amazonaws.com", "ttl": "Auto", "priority": 10}]} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": "xx xx xx "}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + DomainsController_getDomainAutoConfigure: + speakeasy-default-domains-controller-get-domain-auto-configure: + parameters: + path: + domain: "hidden-subsidy.info" + responses: + "200": + application/json: {"available": false, "manualRecords": [{"type": "MX", "name": "inbound", "content": "inbound-smtp.us-east-1.amazonaws.com", "ttl": "Auto", "priority": 10}]} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": 7883.94}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + DomainsController_startDomainAutoConfigure: + speakeasy-default-domains-controller-start-domain-auto-configure: + parameters: + path: + domain: "criminal-other.name" + requestBody: + application/json: {} + responses: + "201": + application/json: {"applyUrl": "https://reckless-antelope.biz", "providerName": "", "redirectUri": "https://shameless-roadway.info"} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": {}}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + DomainsController_listDomainRoutes: + speakeasy-default-domains-controller-list-domain-routes: + parameters: + path: + domain: "fearless-fishery.com" + query: + limit: 10 + responses: + "200": + application/json: {"data": [{"_id": "", "_domainId": "", "address": "1647 N 8th Street", "type": "webhook", "_environmentId": "", "_organizationId": "", "createdAt": "1720291119048", "updatedAt": "1735661570949"}], "next": "", "previous": "", "totalCount": 3751.99, "totalCountCapped": false} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": {}}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + DomainsController_createDomainRoute: + speakeasy-default-domains-controller-create-domain-route: + parameters: + path: + domain: "radiant-solvency.net" + requestBody: + application/json: {"address": "6581 Birch Road", "type": "webhook"} + responses: + "201": + application/json: {"_id": "", "_domainId": "", "address": "9570 Ferry Parks", "type": "agent", "_environmentId": "", "_organizationId": "", "createdAt": "1725211289760", "updatedAt": "1735636554635"} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": {}}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + DomainsController_getDomainRoute: + speakeasy-default-domains-controller-get-domain-route: + parameters: + path: + domain: "adolescent-petal.net" + address: "42531 Green Lane" + responses: + "200": + application/json: {"_id": "", "_domainId": "", "address": "90726 E 10th Street", "type": "agent", "_environmentId": "", "_organizationId": "", "createdAt": "1708129772047", "updatedAt": "1735652473494"} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": 9757.52}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + DomainsController_updateDomainRoute: + speakeasy-default-domains-controller-update-domain-route: + parameters: + path: + domain: "cavernous-cycle.com" + address: "70213 Gerlach Rue" + requestBody: + application/json: {} + responses: + "200": + application/json: {"_id": "", "_domainId": "", "address": "274 Kutch Fords", "type": "agent", "_environmentId": "", "_organizationId": "", "createdAt": "1720122687512", "updatedAt": "1735647797594"} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": "xx xx xx "}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + DomainsController_deleteDomainRoute: + speakeasy-default-domains-controller-delete-domain-route: + parameters: + path: + domain: "corrupt-avalanche.biz" + address: "753 W 4th Avenue" + responses: + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": 3301.74}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + DomainsController_testDomainRoute: + speakeasy-default-domains-controller-test-domain-route: + parameters: + path: + domain: "exalted-bonfire.com" + address: "90499 Rowan Close" + requestBody: + application/json: {"from": {"address": "58851 Konopelski Overpass"}, "subject": ""} + responses: + "200": + application/json: {"matched": true, "dryRun": true} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": true}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + IntegrationsController_generateConnectOAuthUrl: + speakeasy-default-integrations-controller-generate-connect-O-auth-url: + requestBody: + application/json: {"subscriberId": "subscriber-123", "integrationIdentifier": "", "connectionIdentifier": "slack-connection-abc123", "context": {"key": "org-acme"}, "scope": ["chat:write", "chat:write.public", "channels:read"], "connectionMode": "shared", "autoLinkUser": true} + responses: + "201": + application/json: {"url": "https://slack.com/oauth/v2/authorize?state=..."} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": "xx xx xx "}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + IntegrationsController_generateLinkUserOAuthUrl: + speakeasy-default-integrations-controller-generate-link-user-O-auth-url: + requestBody: + application/json: {"subscriberId": "subscriber-123", "integrationIdentifier": "", "connectionIdentifier": "slack-connection-abc123", "context": {"key": "org-acme"}, "userScope": ["identity.basic"]} + responses: + "201": + application/json: {"url": "https://slack.com/oauth/v2/authorize?state=..."} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": false}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `novu.layouts.create()`: `response.controls.ui_schema` **Changed** (Breaking ⚠️)\n* `novu.notifications.retrieve()`: `response` **Changed** (Breaking ⚠️)\n* `novu.notifications.list()`: `response.data[]` **Changed** (Breaking ⚠️)\n* `novu.channel_endpoints.update()`: `response.provider_id.enum(cm_telecom)` **Added** (Breaking ⚠️)\n* `novu.channel_endpoints.retrieve()`: `response.provider_id.enum(cm_telecom)` **Added** (Breaking ⚠️)\n* `novu.channel_endpoints.create()`: `response.provider_id.enum(cm_telecom)` **Added** (Breaking ⚠️)\n* `novu.channel_endpoints.list()`: \n * `request.provider_id` **Changed**\n * `response.data[].provider_id.enum(cm_telecom)` **Added** (Breaking ⚠️)\n* `novu.channel_connections.update()`: `response.provider_id.enum(cm_telecom)` **Added** (Breaking ⚠️)\n* `novu.channel_connections.retrieve()`: `response.provider_id.enum(cm_telecom)` **Added** (Breaking ⚠️)\n* `novu.channel_connections.create()`: `response.provider_id.enum(cm_telecom)` **Added** (Breaking ⚠️)\n* `novu.channel_connections.list()`: \n * `request.provider_id` **Changed**\n * `response.data[].provider_id.enum(cm_telecom)` **Added** (Breaking ⚠️)\n* `novu.workflows.steps.retrieve()`: `response` **Changed** (Breaking ⚠️)\n* `novu.workflows.sync()`: `response` **Changed** (Breaking ⚠️)\n* `novu.workflows.patch()`: `response` **Changed** (Breaking ⚠️)\n* `novu.workflows.get()`: `response` **Changed** (Breaking ⚠️)\n* `novu.workflows.update()`: \n * `request.update_workflow_dto.steps[]` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `novu.workflows.list()`: `response.workflows[]` **Changed** (Breaking ⚠️)\n* `novu.workflows.create()`: \n * `request.create_workflow_dto.steps[]` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `novu.layouts.duplicate()`: `response.controls.ui_schema` **Changed** (Breaking ⚠️)\n* `novu.layouts.retrieve()`: `response.controls.ui_schema` **Changed** (Breaking ⚠️)\n* `novu.layouts.update()`: `response.controls.ui_schema` **Changed** (Breaking ⚠️)\n* `novu.layouts.list()`: `response.layouts[].controls.ui_schema` **Changed** (Breaking ⚠️)\n* `novu.subscribers.notifications.delete_all()`: **Added**\n* `novu.subscribers.notifications.mark_all_as_read()`: **Added**\n* `novu.trigger_broadcast()`: `response.activity_feed_link` **Added**\n* `novu.trigger_bulk()`: `response.[].activity_feed_link` **Added**\n* `novu.environment_variables.usage()`: **Added**\n* `novu.environment_variables.delete()`: **Added**\n* `novu.environment_variables.update()`: **Added**\n* `novu.environment_variables.retrieve()`: **Added**\n* `novu.environment_variables.create()`: **Added**\n* `novu.environment_variables.list()`: **Added**\n* `novu.workflows.steps.generate_preview()`: **Added**\n* `novu.subscribers.notifications.mark_as_seen()`: **Added**\n* `novu.subscribers.notifications.archive_all_read()`: **Added**\n* `novu.trigger()`: `response.activity_feed_link` **Added**\n* `novu.subscribers.notifications.list()`: **Added**\n* `novu.subscribers.notifications.count()`: **Added**\n* `novu.subscribers.notifications.archive_all()`: **Added**\n* `novu.subscribers.notifications.unsnooze()`: **Added**\n* `novu.subscribers.notifications.mark_as_unread()`: **Added**\n* `novu.subscribers.notifications.unarchive()`: **Added**\n* `novu.subscribers.notifications.snooze()`: **Added**\n* `novu.subscribers.notifications.mark_as_read()`: **Added**\n* `novu.subscribers.notifications.archive()`: **Added**\n* `novu.subscribers.notifications.revert_action()`: **Added**\n* `novu.subscribers.notifications.complete_action()`: **Added**\n* `novu.subscribers.notifications.delete()`: **Added**\n" +releaseNotes: "## Python SDK Changes:\n* `novu.channel_endpoints.update()`: `response.provider_id.enum(novu_email_agent)` **Added** (Breaking ⚠️)\n* `novu.workflows.create()`: \n * `request.create_workflow_dto.steps[].union(http_request).control_values.union(HttpRequestControlDto).body` **Changed** (Breaking ⚠️)\n * `response.steps[].union(http_request)` **Changed** (Breaking ⚠️)\n* `novu.notifications.retrieve()`: `response.jobs[].execution_details[].provider_id.enum(novu_email_agent)` **Added** (Breaking ⚠️)\n* `novu.notifications.list()`: `response.data[].jobs[].execution_details[].provider_id.enum(novu_email_agent)` **Added** (Breaking ⚠️)\n* `novu.channel_endpoints.retrieve()`: `response.provider_id.enum(novu_email_agent)` **Added** (Breaking ⚠️)\n* `novu.channel_endpoints.create()`: `response.provider_id.enum(novu_email_agent)` **Added** (Breaking ⚠️)\n* `novu.channel_endpoints.list()`: \n * `request.provider_id` **Changed**\n * `response.data[].provider_id.enum(novu_email_agent)` **Added** (Breaking ⚠️)\n* `novu.channel_connections.update()`: `response.provider_id.enum(novu_email_agent)` **Added** (Breaking ⚠️)\n* `novu.channel_connections.retrieve()`: `response.provider_id.enum(novu_email_agent)` **Added** (Breaking ⚠️)\n* `novu.channel_connections.create()`: \n * `request.create_channel_connection_request_dto.connection_mode` **Added**\n * `response.provider_id.enum(novu_email_agent)` **Added** (Breaking ⚠️)\n* `novu.channel_connections.list()`: \n * `request.provider_id` **Changed**\n * `response.data[].provider_id.enum(novu_email_agent)` **Added** (Breaking ⚠️)\n* `novu.workflows.sync()`: `response.steps[].union(http_request)` **Changed** (Breaking ⚠️)\n* `novu.workflows.get()`: `response.steps[].union(http_request)` **Changed** (Breaking ⚠️)\n* `novu.workflows.patch()`: `response.steps[].union(http_request)` **Changed** (Breaking ⚠️)\n* `novu.workflows.update()`: \n * `request.update_workflow_dto.steps[].union(http_request).control_values.union(HttpRequestControlDto).body` **Changed** (Breaking ⚠️)\n * `response.steps[].union(http_request)` **Changed** (Breaking ⚠️)\n* `novu.domains.routes.retrieve()`: **Added**\n* `novu.domains.diagnose()`: **Added**\n* `novu.layouts.duplicate()`: \n * `request.duplicate_layout_dto.layout_id` **Added**\n* `novu.integrations.generate_connect_o_auth_url()`: **Added**\n* `novu.domains.routes.test()`: **Added**\n* `novu.domains.create()`: **Added**\n* `novu.domains.routes.delete()`: **Added**\n* `novu.domains.routes.update()`: **Added**\n* `novu.domains.routes.create()`: **Added**\n* `novu.domains.routes.list()`: **Added**\n* `novu.domains.auto_configure.start()`: **Added**\n* `novu.domains.auto_configure.retrieve()`: **Added**\n* `novu.domains.verify()`: **Added**\n* `novu.integrations.generate_link_user_o_auth_url()`: **Added**\n* `novu.domains.delete()`: **Added**\n* `novu.domains.list()`: **Added**\n* `novu.integrations.list()`: `response.[].credentials` **Changed**\n* `novu.integrations.create()`: \n * `request.create_integration_request_dto.credentials` **Changed**\n * `response.credentials` **Changed**\n* `novu.integrations.update()`: \n * `request.update_integration_request_dto.credentials` **Changed**\n * `response.credentials` **Changed**\n* `novu.integrations.delete()`: `response.[].credentials` **Changed**\n* `novu.integrations.set_as_primary()`: `response.credentials` **Changed**\n* `novu.integrations.list_active()`: `response.[].credentials` **Changed**\n* `novu.integrations.generate_chat_o_auth_url()`: **Deprecated**\n* `novu.integrations.generate_chat_o_auth_url()`: `request.generate_chat_oauth_url_request_dto` **Changed**\n* `novu.domains.update()`: **Added**\n* `novu.domains.retrieve()`: **Added**\n" generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index c21ff3b7..8eda9e4a 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 3.15.0 + version: 3.15.1 additionalDependencies: dev: - pytest>=6.0.0 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index c715ad8d..6ee7d6b2 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.761.3 +speakeasyVersion: 1.762.0 sources: novu-OAS: sourceNamespace: novu-oas - sourceRevisionDigest: sha256:3835e0232354a602fd463ee6eb3bd0d2fce36ec127cda08a8a5be3462e7065d0 - sourceBlobDigest: sha256:15332def38087755c1898908c350ee25bb9b136aed63e3cc27a69668fe84b293 + sourceRevisionDigest: sha256:51da1f1261ebf7d52e07a485f74ab29bac781b9b0e7e809fb026ead5f31f5a4b + sourceBlobDigest: sha256:0136e1fe369f1e3ec49fd3063dddfae5368fa254a4d24c54bd3ab6ad48664290 tags: - latest - 3.15.0 @@ -11,10 +11,10 @@ targets: novu: source: novu-OAS sourceNamespace: novu-oas - sourceRevisionDigest: sha256:3835e0232354a602fd463ee6eb3bd0d2fce36ec127cda08a8a5be3462e7065d0 - sourceBlobDigest: sha256:15332def38087755c1898908c350ee25bb9b136aed63e3cc27a69668fe84b293 + sourceRevisionDigest: sha256:51da1f1261ebf7d52e07a485f74ab29bac781b9b0e7e809fb026ead5f31f5a4b + sourceBlobDigest: sha256:0136e1fe369f1e3ec49fd3063dddfae5368fa254a4d24c54bd3ab6ad48664290 codeSamplesNamespace: novu-oas-python-code-samples - codeSamplesRevisionDigest: sha256:c0d6933e6bb0370a7ab5077738361dfef43acb7b8bfcae331bd8f30f4459d01f + codeSamplesRevisionDigest: sha256:e75ed2ad22d037f0f8fbbe8d96bf8a7848fc86cab87cece0824aed1365c39c2b workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 5e32ce45..591c5f6d 100644 --- a/README.md +++ b/README.md @@ -524,6 +524,30 @@ asyncio.run(main()) * [retrieve](docs/sdks/contexts/README.md#retrieve) - Retrieve a context * [delete](docs/sdks/contexts/README.md#delete) - Delete a context +### [Domains](docs/sdks/domains/README.md) + +* [list](docs/sdks/domains/README.md#list) - List domains for an environment +* [create](docs/sdks/domains/README.md#create) - Create a domain +* [retrieve](docs/sdks/domains/README.md#retrieve) - Retrieve a domain by name +* [update](docs/sdks/domains/README.md#update) - Update a domain +* [delete](docs/sdks/domains/README.md#delete) - Delete a domain +* [diagnose](docs/sdks/domains/README.md#diagnose) - Diagnose inbound DNS for a domain +* [verify](docs/sdks/domains/README.md#verify) - Verify a domain + +#### [Domains.AutoConfigure](docs/sdks/autoconfigure/README.md) + +* [retrieve](docs/sdks/autoconfigure/README.md#retrieve) - Retrieve auto-configuration availability +* [start](docs/sdks/autoconfigure/README.md#start) - Start DNS auto-configuration + +#### [Domains.Routes](docs/sdks/routes/README.md) + +* [list](docs/sdks/routes/README.md#list) - List routes for a domain +* [create](docs/sdks/routes/README.md#create) - Create a route +* [retrieve](docs/sdks/routes/README.md#retrieve) - Retrieve a route by address +* [update](docs/sdks/routes/README.md#update) - Update a route +* [delete](docs/sdks/routes/README.md#delete) - Delete a route +* [test](docs/sdks/routes/README.md#test) - Test an inbound route + ### [EnvironmentVariables](docs/sdks/environmentvariables/README.md) * [list](docs/sdks/environmentvariables/README.md#list) - List all variables @@ -552,7 +576,9 @@ asyncio.run(main()) * [integrations_controller_auto_configure_integration](docs/sdks/integrations/README.md#integrations_controller_auto_configure_integration) - Auto-configure an integration for inbound webhooks * [set_as_primary](docs/sdks/integrations/README.md#set_as_primary) - Update integration as primary * [list_active](docs/sdks/integrations/README.md#list_active) - List active integrations -* [generate_chat_o_auth_url](docs/sdks/integrations/README.md#generate_chat_o_auth_url) - Generate chat OAuth URL +* [generate_connect_o_auth_url](docs/sdks/integrations/README.md#generate_connect_o_auth_url) - Generate OAuth URL for a workspace/tenant connection +* [generate_link_user_o_auth_url](docs/sdks/integrations/README.md#generate_link_user_o_auth_url) - Generate OAuth URL to link a subscriber user identity +* [~~generate_chat_o_auth_url~~](docs/sdks/integrations/README.md#generate_chat_o_auth_url) - Generate chat OAuth URL :warning: **Deprecated** ### [Layouts](docs/sdks/layouts/README.md) @@ -871,9 +897,9 @@ with Novu( **Inherit from [`NovuError`](./src/novu_py/models/novuerror.py)**: -* [`PayloadValidationExceptionDto`](./src/novu_py/models/payloadvalidationexceptiondto.py): Status code `400`. Applicable to 3 of 118 methods.* -* [`SubscriberResponseDtoError`](./src/novu_py/models/subscriberresponsedtoerror.py): Created. Status code `409`. Applicable to 1 of 118 methods.* -* [`TopicResponseDtoError`](./src/novu_py/models/topicresponsedtoerror.py): OK. Status code `409`. Applicable to 1 of 118 methods.* +* [`PayloadValidationExceptionDto`](./src/novu_py/models/payloadvalidationexceptiondto.py): Status code `400`. Applicable to 3 of 135 methods.* +* [`SubscriberResponseDtoError`](./src/novu_py/models/subscriberresponsedtoerror.py): Created. Status code `409`. Applicable to 1 of 135 methods.* +* [`TopicResponseDtoError`](./src/novu_py/models/topicresponsedtoerror.py): OK. Status code `409`. Applicable to 1 of 135 methods.* * [`ResponseValidationError`](./src/novu_py/models/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute. diff --git a/RELEASES.md b/RELEASES.md index a0b705ac..8a676a80 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -188,4 +188,14 @@ Based on: ### Generated - [python v3.15.0] . ### Releases -- [PyPI v3.15.0] https://pypi.org/project/novu-py/3.15.0 - . \ No newline at end of file +- [PyPI v3.15.0] https://pypi.org/project/novu-py/3.15.0 - . + +## 2026-05-07 00:45:38 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.762.0 (2.882.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v3.15.1] . +### Releases +- [PyPI v3.15.1] https://pypi.org/project/novu-py/3.15.1 - . \ No newline at end of file diff --git a/docs/models/agentreply.md b/docs/models/agentreply.md new file mode 100644 index 00000000..1baf90d6 --- /dev/null +++ b/docs/models/agentreply.md @@ -0,0 +1,9 @@ +# AgentReply + +Parsed JSON body from the agent webhook response when JSON. + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/body.md b/docs/models/body.md new file mode 100644 index 00000000..d971437e --- /dev/null +++ b/docs/models/body.md @@ -0,0 +1,19 @@ +# Body + +Request body as a raw JSON string. Key-value arrays are supported for legacy workflows. + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `List[models.HTTPRequestKeyValuePairDto]` + +```python +value: List[models.HTTPRequestKeyValuePairDto] = /* values here */ +``` + diff --git a/docs/models/code.md b/docs/models/code.md new file mode 100644 index 00000000..48b9732c --- /dev/null +++ b/docs/models/code.md @@ -0,0 +1,20 @@ +# Code + +## Example Usage + +```python +from novu_py.models import Code + +value = Code.MX_MISSING +``` + + +## Values + +| Name | Value | +| ---------------------- | ---------------------- | +| `MX_MISSING` | mx_missing | +| `MX_WRONG_TARGET` | mx_wrong_target | +| `MX_LOW_PRIORITY` | mx_low_priority | +| `APEX_CNAME_COLLISION` | apex_cname_collision | +| `DNSBL_LISTED` | dnsbl_listed | \ No newline at end of file diff --git a/docs/models/connectionmode.md b/docs/models/connectionmode.md new file mode 100644 index 00000000..15c3b2b6 --- /dev/null +++ b/docs/models/connectionmode.md @@ -0,0 +1,19 @@ +# ConnectionMode + +Connection mode that determines how the channel connection is scoped. Use "subscriber" (default) to associate the connection with a specific subscriber. Use "shared" to associate the connection with a context instead of a subscriber — subscriberId will not be stored on the connection. + +## Example Usage + +```python +from novu_py.models import ConnectionMode + +value = ConnectionMode.SUBSCRIBER +``` + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `SUBSCRIBER` | subscriber | +| `SHARED` | shared | \ No newline at end of file diff --git a/docs/models/createchannelconnectionrequestdto.md b/docs/models/createchannelconnectionrequestdto.md index ab504f0f..d0fa3ee7 100644 --- a/docs/models/createchannelconnectionrequestdto.md +++ b/docs/models/createchannelconnectionrequestdto.md @@ -3,11 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `identifier` | *Optional[str]* | :heavy_minus_sign: | The unique identifier for the channel connection. If not provided, one will be generated automatically. | slack-prod-user123-abc4 | -| `subscriber_id` | *Optional[str]* | :heavy_minus_sign: | The subscriber ID to link the channel connection to | subscriber-123 | -| `context` | Dict[str, [models.CreateChannelConnectionRequestDtoContext](../models/createchannelconnectionrequestdtocontext.md)] | :heavy_minus_sign: | N/A | | -| `integration_identifier` | *str* | :heavy_check_mark: | The identifier of the integration to use for this channel connection. | slack-prod | -| `workspace` | [models.WorkspaceDto](../models/workspacedto.md) | :heavy_check_mark: | N/A | | -| `auth` | [models.AuthDto](../models/authdto.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `identifier` | *Optional[str]* | :heavy_minus_sign: | The unique identifier for the channel connection. If not provided, one will be generated automatically. | slack-prod-user123-abc4 | +| `subscriber_id` | *Optional[str]* | :heavy_minus_sign: | The subscriber ID to link the channel connection to | subscriber-123 | +| `context` | Dict[str, [models.CreateChannelConnectionRequestDtoContext](../models/createchannelconnectionrequestdtocontext.md)] | :heavy_minus_sign: | N/A | | +| `connection_mode` | [Optional[models.ConnectionMode]](../models/connectionmode.md) | :heavy_minus_sign: | Connection mode that determines how the channel connection is scoped. Use "subscriber" (default) to associate the connection with a specific subscriber. Use "shared" to associate the connection with a context instead of a subscriber — subscriberId will not be stored on the connection. | shared | +| `integration_identifier` | *str* | :heavy_check_mark: | The identifier of the integration to use for this channel connection. | slack-prod | +| `workspace` | [models.WorkspaceDto](../models/workspacedto.md) | :heavy_check_mark: | N/A | | +| `auth` | [models.AuthDto](../models/authdto.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/createdomainconnectapplyurldto.md b/docs/models/createdomainconnectapplyurldto.md new file mode 100644 index 00000000..41eb911d --- /dev/null +++ b/docs/models/createdomainconnectapplyurldto.md @@ -0,0 +1,8 @@ +# CreateDomainConnectApplyURLDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `redirect_uri` | *Optional[str]* | :heavy_minus_sign: | Dashboard URL to return to after the DNS provider consent flow completes. | \ No newline at end of file diff --git a/docs/models/createdomaindto.md b/docs/models/createdomaindto.md new file mode 100644 index 00000000..899df866 --- /dev/null +++ b/docs/models/createdomaindto.md @@ -0,0 +1,9 @@ +# CreateDomainDto + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | The domain name (e.g. "recent.dev") | +| `data` | Dict[str, *str*] | :heavy_minus_sign: | Optional string key-value metadata (max 10 keys, 500 characters total for keys+values). | \ No newline at end of file diff --git a/docs/models/credentialsdto.md b/docs/models/credentialsdto.md index bc123b68..5a06def7 100644 --- a/docs/models/credentialsdto.md +++ b/docs/models/credentialsdto.md @@ -50,4 +50,8 @@ | `app_sid` | *Optional[str]* | :heavy_minus_sign: | N/A | | `sender_id` | *Optional[str]* | :heavy_minus_sign: | N/A | | `tenant_id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `app_io_base_url` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `app_io_base_url` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `signing_secret` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `outbound_integration_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `use_from_address_override` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `from_address_override` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/diagnosedomainresponsedto.md b/docs/models/diagnosedomainresponsedto.md new file mode 100644 index 00000000..9083a343 --- /dev/null +++ b/docs/models/diagnosedomainresponsedto.md @@ -0,0 +1,11 @@ +# DiagnoseDomainResponseDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `ok` | *bool* | :heavy_check_mark: | True when there are no error-severity issues | +| `run_at` | *str* | :heavy_check_mark: | ISO timestamp when the diagnostic run finished | +| `checks` | List[[models.DomainDiagnosticCheckDto](../models/domaindiagnosticcheckdto.md)] | :heavy_check_mark: | N/A | +| `issues` | List[[models.DomainDiagnosticIssueDto](../models/domaindiagnosticissuedto.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainconnectapplyurlresponsedto.md b/docs/models/domainconnectapplyurlresponsedto.md new file mode 100644 index 00000000..f821ab2a --- /dev/null +++ b/docs/models/domainconnectapplyurlresponsedto.md @@ -0,0 +1,10 @@ +# DomainConnectApplyURLResponseDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `apply_url` | *str* | :heavy_check_mark: | N/A | +| `provider_name` | *str* | :heavy_check_mark: | N/A | +| `redirect_uri` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainconnectstatusresponsedto.md b/docs/models/domainconnectstatusresponsedto.md new file mode 100644 index 00000000..e23e641f --- /dev/null +++ b/docs/models/domainconnectstatusresponsedto.md @@ -0,0 +1,13 @@ +# DomainConnectStatusResponseDto + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `available` | *bool* | :heavy_check_mark: | N/A | +| `provider_name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `provider_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `reason` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `reason_code` | [Optional[models.ReasonCode]](../models/reasoncode.md) | :heavy_minus_sign: | N/A | +| `manual_records` | List[[models.ExpectedDNSRecordDto](../models/expecteddnsrecorddto.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domaindiagnosticcheckdto.md b/docs/models/domaindiagnosticcheckdto.md new file mode 100644 index 00000000..f3c03f44 --- /dev/null +++ b/docs/models/domaindiagnosticcheckdto.md @@ -0,0 +1,10 @@ +# DomainDiagnosticCheckDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `code` | [models.Code](../models/code.md) | :heavy_check_mark: | N/A | +| `status` | [models.DomainDiagnosticCheckDtoStatus](../models/domaindiagnosticcheckdtostatus.md) | :heavy_check_mark: | N/A | +| `latency_ms` | *float* | :heavy_check_mark: | Round-trip time for this check in milliseconds | \ No newline at end of file diff --git a/docs/models/domaindiagnosticcheckdtostatus.md b/docs/models/domaindiagnosticcheckdtostatus.md new file mode 100644 index 00000000..7372f493 --- /dev/null +++ b/docs/models/domaindiagnosticcheckdtostatus.md @@ -0,0 +1,18 @@ +# DomainDiagnosticCheckDtoStatus + +## Example Usage + +```python +from novu_py.models import DomainDiagnosticCheckDtoStatus + +value = DomainDiagnosticCheckDtoStatus.PASS +``` + + +## Values + +| Name | Value | +| --------- | --------- | +| `PASS` | pass | +| `FAIL` | fail | +| `SKIPPED` | skipped | \ No newline at end of file diff --git a/docs/models/domaindiagnosticissuedto.md b/docs/models/domaindiagnosticissuedto.md new file mode 100644 index 00000000..4dc6d9cb --- /dev/null +++ b/docs/models/domaindiagnosticissuedto.md @@ -0,0 +1,11 @@ +# DomainDiagnosticIssueDto + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `code` | [models.DomainDiagnosticIssueDtoCode](../models/domaindiagnosticissuedtocode.md) | :heavy_check_mark: | N/A | +| `severity` | [models.Severity](../models/severity.md) | :heavy_check_mark: | N/A | +| `message` | *str* | :heavy_check_mark: | N/A | +| `fix` | *str* | :heavy_check_mark: | Plain-language remediation guidance | \ No newline at end of file diff --git a/docs/models/domaindiagnosticissuedtocode.md b/docs/models/domaindiagnosticissuedtocode.md new file mode 100644 index 00000000..d9a57ab6 --- /dev/null +++ b/docs/models/domaindiagnosticissuedtocode.md @@ -0,0 +1,20 @@ +# DomainDiagnosticIssueDtoCode + +## Example Usage + +```python +from novu_py.models import DomainDiagnosticIssueDtoCode + +value = DomainDiagnosticIssueDtoCode.MX_MISSING +``` + + +## Values + +| Name | Value | +| ---------------------- | ---------------------- | +| `MX_MISSING` | mx_missing | +| `MX_WRONG_TARGET` | mx_wrong_target | +| `MX_LOW_PRIORITY` | mx_low_priority | +| `APEX_CNAME_COLLISION` | apex_cname_collision | +| `DNSBL_LISTED` | dnsbl_listed | \ No newline at end of file diff --git a/docs/models/domainresponsedto.md b/docs/models/domainresponsedto.md new file mode 100644 index 00000000..a06ee3f8 --- /dev/null +++ b/docs/models/domainresponsedto.md @@ -0,0 +1,18 @@ +# DomainResponseDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `status` | [models.DomainResponseDtoStatus](../models/domainresponsedtostatus.md) | :heavy_check_mark: | N/A | +| `mx_record_configured` | *bool* | :heavy_check_mark: | N/A | +| `dns_provider` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `environment_id` | *str* | :heavy_check_mark: | N/A | +| `organization_id` | *str* | :heavy_check_mark: | N/A | +| `created_at` | *str* | :heavy_check_mark: | N/A | +| `updated_at` | *str* | :heavy_check_mark: | N/A | +| `expected_dns_records` | List[[models.ExpectedDNSRecordDto](../models/expecteddnsrecorddto.md)] | :heavy_minus_sign: | N/A | +| `data` | Dict[str, *str*] | :heavy_minus_sign: | String key-value metadata (max 10 keys, 500 characters total when set via API). | \ No newline at end of file diff --git a/docs/models/domainresponsedtostatus.md b/docs/models/domainresponsedtostatus.md new file mode 100644 index 00000000..52c999ac --- /dev/null +++ b/docs/models/domainresponsedtostatus.md @@ -0,0 +1,17 @@ +# DomainResponseDtoStatus + +## Example Usage + +```python +from novu_py.models import DomainResponseDtoStatus + +value = DomainResponseDtoStatus.PENDING +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `PENDING` | pending | +| `VERIFIED` | verified | \ No newline at end of file diff --git a/docs/models/domainroutedto.md b/docs/models/domainroutedto.md new file mode 100644 index 00000000..5b18dfcc --- /dev/null +++ b/docs/models/domainroutedto.md @@ -0,0 +1,11 @@ +# DomainRouteDto + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `address` | *str* | :heavy_check_mark: | Inbox address local part (e.g. "support", "*") | +| `agent_id` | *Optional[str]* | :heavy_minus_sign: | Agent identifier; required when type is agent, unused for webhook | +| `type` | [models.DomainRouteDtoType](../models/domainroutedtotype.md) | :heavy_check_mark: | N/A | +| `data` | Dict[str, *str*] | :heavy_minus_sign: | Optional string key-value metadata (max 10 keys, 500 characters total for keys+values). | \ No newline at end of file diff --git a/docs/models/domainroutedtotype.md b/docs/models/domainroutedtotype.md new file mode 100644 index 00000000..e183b49c --- /dev/null +++ b/docs/models/domainroutedtotype.md @@ -0,0 +1,17 @@ +# DomainRouteDtoType + +## Example Usage + +```python +from novu_py.models import DomainRouteDtoType + +value = DomainRouteDtoType.AGENT +``` + + +## Values + +| Name | Value | +| --------- | --------- | +| `AGENT` | agent | +| `WEBHOOK` | webhook | \ No newline at end of file diff --git a/docs/models/domainrouteresponsedto.md b/docs/models/domainrouteresponsedto.md new file mode 100644 index 00000000..6b4fcaf9 --- /dev/null +++ b/docs/models/domainrouteresponsedto.md @@ -0,0 +1,17 @@ +# DomainRouteResponseDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `domain_id` | *str* | :heavy_check_mark: | N/A | +| `address` | *str* | :heavy_check_mark: | N/A | +| `agent_id` | *Optional[str]* | :heavy_minus_sign: | Internal id of the destination agent. Only present for agent routes. | +| `type` | [models.DomainRouteResponseDtoType](../models/domainrouteresponsedtotype.md) | :heavy_check_mark: | N/A | +| `environment_id` | *str* | :heavy_check_mark: | N/A | +| `organization_id` | *str* | :heavy_check_mark: | N/A | +| `created_at` | *str* | :heavy_check_mark: | N/A | +| `updated_at` | *str* | :heavy_check_mark: | N/A | +| `data` | Dict[str, *str*] | :heavy_minus_sign: | String key-value metadata (max 10 keys, 500 characters total when set via API). | \ No newline at end of file diff --git a/docs/models/domainrouteresponsedtotype.md b/docs/models/domainrouteresponsedtotype.md new file mode 100644 index 00000000..a087d7cc --- /dev/null +++ b/docs/models/domainrouteresponsedtotype.md @@ -0,0 +1,17 @@ +# DomainRouteResponseDtoType + +## Example Usage + +```python +from novu_py.models import DomainRouteResponseDtoType + +value = DomainRouteResponseDtoType.AGENT +``` + + +## Values + +| Name | Value | +| --------- | --------- | +| `AGENT` | agent | +| `WEBHOOK` | webhook | \ No newline at end of file diff --git a/docs/models/domainscontrollercreatedomainrequest.md b/docs/models/domainscontrollercreatedomainrequest.md new file mode 100644 index 00000000..535c2de4 --- /dev/null +++ b/docs/models/domainscontrollercreatedomainrequest.md @@ -0,0 +1,9 @@ +# DomainsControllerCreateDomainRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `create_domain_dto` | [models.CreateDomainDto](../models/createdomaindto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollercreatedomainresponse.md b/docs/models/domainscontrollercreatedomainresponse.md new file mode 100644 index 00000000..acec20e9 --- /dev/null +++ b/docs/models/domainscontrollercreatedomainresponse.md @@ -0,0 +1,9 @@ +# DomainsControllerCreateDomainResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.DomainResponseDto](../models/domainresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollercreatedomainrouterequest.md b/docs/models/domainscontrollercreatedomainrouterequest.md new file mode 100644 index 00000000..f5c3ba88 --- /dev/null +++ b/docs/models/domainscontrollercreatedomainrouterequest.md @@ -0,0 +1,10 @@ +# DomainsControllerCreateDomainRouteRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `domain_route_dto` | [models.DomainRouteDto](../models/domainroutedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollercreatedomainrouteresponse.md b/docs/models/domainscontrollercreatedomainrouteresponse.md new file mode 100644 index 00000000..d803eb26 --- /dev/null +++ b/docs/models/domainscontrollercreatedomainrouteresponse.md @@ -0,0 +1,9 @@ +# DomainsControllerCreateDomainRouteResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.DomainRouteResponseDto](../models/domainrouteresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollerdeletedomainrequest.md b/docs/models/domainscontrollerdeletedomainrequest.md new file mode 100644 index 00000000..230d1ab2 --- /dev/null +++ b/docs/models/domainscontrollerdeletedomainrequest.md @@ -0,0 +1,9 @@ +# DomainsControllerDeleteDomainRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/domainscontrollerdeletedomainresponse.md b/docs/models/domainscontrollerdeletedomainresponse.md new file mode 100644 index 00000000..13f7c051 --- /dev/null +++ b/docs/models/domainscontrollerdeletedomainresponse.md @@ -0,0 +1,8 @@ +# DomainsControllerDeleteDomainResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollerdeletedomainrouterequest.md b/docs/models/domainscontrollerdeletedomainrouterequest.md new file mode 100644 index 00000000..41827cdd --- /dev/null +++ b/docs/models/domainscontrollerdeletedomainrouterequest.md @@ -0,0 +1,10 @@ +# DomainsControllerDeleteDomainRouteRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `address` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/domainscontrollerdeletedomainrouteresponse.md b/docs/models/domainscontrollerdeletedomainrouteresponse.md new file mode 100644 index 00000000..0a7beff6 --- /dev/null +++ b/docs/models/domainscontrollerdeletedomainrouteresponse.md @@ -0,0 +1,8 @@ +# DomainsControllerDeleteDomainRouteResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollerdiagnosedomainrequest.md b/docs/models/domainscontrollerdiagnosedomainrequest.md new file mode 100644 index 00000000..d7c63205 --- /dev/null +++ b/docs/models/domainscontrollerdiagnosedomainrequest.md @@ -0,0 +1,9 @@ +# DomainsControllerDiagnoseDomainRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/domainscontrollerdiagnosedomainresponse.md b/docs/models/domainscontrollerdiagnosedomainresponse.md new file mode 100644 index 00000000..f6c70ac7 --- /dev/null +++ b/docs/models/domainscontrollerdiagnosedomainresponse.md @@ -0,0 +1,9 @@ +# DomainsControllerDiagnoseDomainResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.DiagnoseDomainResponseDto](../models/diagnosedomainresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollergetdomainautoconfigurerequest.md b/docs/models/domainscontrollergetdomainautoconfigurerequest.md new file mode 100644 index 00000000..bb18dc6b --- /dev/null +++ b/docs/models/domainscontrollergetdomainautoconfigurerequest.md @@ -0,0 +1,9 @@ +# DomainsControllerGetDomainAutoConfigureRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/domainscontrollergetdomainautoconfigureresponse.md b/docs/models/domainscontrollergetdomainautoconfigureresponse.md new file mode 100644 index 00000000..88f80935 --- /dev/null +++ b/docs/models/domainscontrollergetdomainautoconfigureresponse.md @@ -0,0 +1,9 @@ +# DomainsControllerGetDomainAutoConfigureResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.DomainConnectStatusResponseDto](../models/domainconnectstatusresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollergetdomainrequest.md b/docs/models/domainscontrollergetdomainrequest.md new file mode 100644 index 00000000..28532ac9 --- /dev/null +++ b/docs/models/domainscontrollergetdomainrequest.md @@ -0,0 +1,9 @@ +# DomainsControllerGetDomainRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/domainscontrollergetdomainresponse.md b/docs/models/domainscontrollergetdomainresponse.md new file mode 100644 index 00000000..b537e55c --- /dev/null +++ b/docs/models/domainscontrollergetdomainresponse.md @@ -0,0 +1,9 @@ +# DomainsControllerGetDomainResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.DomainResponseDto](../models/domainresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollergetdomainrouterequest.md b/docs/models/domainscontrollergetdomainrouterequest.md new file mode 100644 index 00000000..c70f3daf --- /dev/null +++ b/docs/models/domainscontrollergetdomainrouterequest.md @@ -0,0 +1,10 @@ +# DomainsControllerGetDomainRouteRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `address` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/domainscontrollergetdomainrouteresponse.md b/docs/models/domainscontrollergetdomainrouteresponse.md new file mode 100644 index 00000000..fccc2762 --- /dev/null +++ b/docs/models/domainscontrollergetdomainrouteresponse.md @@ -0,0 +1,9 @@ +# DomainsControllerGetDomainRouteResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.DomainRouteResponseDto](../models/domainrouteresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollerlistdomainroutesqueryparamorderdirection.md b/docs/models/domainscontrollerlistdomainroutesqueryparamorderdirection.md new file mode 100644 index 00000000..ff52c101 --- /dev/null +++ b/docs/models/domainscontrollerlistdomainroutesqueryparamorderdirection.md @@ -0,0 +1,19 @@ +# DomainsControllerListDomainRoutesQueryParamOrderDirection + +Direction of sorting + +## Example Usage + +```python +from novu_py.models import DomainsControllerListDomainRoutesQueryParamOrderDirection + +value = DomainsControllerListDomainRoutesQueryParamOrderDirection.ASC +``` + + +## Values + +| Name | Value | +| ------ | ------ | +| `ASC` | ASC | +| `DESC` | DESC | \ No newline at end of file diff --git a/docs/models/domainscontrollerlistdomainroutesrequest.md b/docs/models/domainscontrollerlistdomainroutesrequest.md new file mode 100644 index 00000000..0a7285a1 --- /dev/null +++ b/docs/models/domainscontrollerlistdomainroutesrequest.md @@ -0,0 +1,16 @@ +# DomainsControllerListDomainRoutesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | | +| `after` | *Optional[str]* | :heavy_minus_sign: | Cursor for pagination indicating the starting point after which to fetch results. | | +| `before` | *Optional[str]* | :heavy_minus_sign: | Cursor for pagination indicating the ending point before which to fetch results. | | +| `limit` | *Optional[float]* | :heavy_minus_sign: | Limit the number of items to return | 10 | +| `order_direction` | [Optional[models.DomainsControllerListDomainRoutesQueryParamOrderDirection]](../models/domainscontrollerlistdomainroutesqueryparamorderdirection.md) | :heavy_minus_sign: | Direction of sorting | | +| `order_by` | *Optional[str]* | :heavy_minus_sign: | Field to order by | | +| `include_cursor` | *Optional[bool]* | :heavy_minus_sign: | Include cursor item in response | | +| `agent_id` | *Optional[str]* | :heavy_minus_sign: | Agent identifier to filter routes by. | | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | | \ No newline at end of file diff --git a/docs/models/domainscontrollerlistdomainroutesresponse.md b/docs/models/domainscontrollerlistdomainroutesresponse.md new file mode 100644 index 00000000..5e25683f --- /dev/null +++ b/docs/models/domainscontrollerlistdomainroutesresponse.md @@ -0,0 +1,9 @@ +# DomainsControllerListDomainRoutesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.ListDomainRoutesResponseDto](../models/listdomainroutesresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollerlistdomainsqueryparamorderdirection.md b/docs/models/domainscontrollerlistdomainsqueryparamorderdirection.md new file mode 100644 index 00000000..ce4f62d6 --- /dev/null +++ b/docs/models/domainscontrollerlistdomainsqueryparamorderdirection.md @@ -0,0 +1,19 @@ +# DomainsControllerListDomainsQueryParamOrderDirection + +Direction of sorting + +## Example Usage + +```python +from novu_py.models import DomainsControllerListDomainsQueryParamOrderDirection + +value = DomainsControllerListDomainsQueryParamOrderDirection.ASC +``` + + +## Values + +| Name | Value | +| ------ | ------ | +| `ASC` | ASC | +| `DESC` | DESC | \ No newline at end of file diff --git a/docs/models/domainscontrollerlistdomainsrequest.md b/docs/models/domainscontrollerlistdomainsrequest.md new file mode 100644 index 00000000..6b6e60f7 --- /dev/null +++ b/docs/models/domainscontrollerlistdomainsrequest.md @@ -0,0 +1,15 @@ +# DomainsControllerListDomainsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `after` | *Optional[str]* | :heavy_minus_sign: | Cursor for pagination indicating the starting point after which to fetch results. | | +| `before` | *Optional[str]* | :heavy_minus_sign: | Cursor for pagination indicating the ending point before which to fetch results. | | +| `limit` | *Optional[float]* | :heavy_minus_sign: | Limit the number of items to return | 10 | +| `order_direction` | [Optional[models.DomainsControllerListDomainsQueryParamOrderDirection]](../models/domainscontrollerlistdomainsqueryparamorderdirection.md) | :heavy_minus_sign: | Direction of sorting | | +| `order_by` | *Optional[str]* | :heavy_minus_sign: | Field to order by | | +| `include_cursor` | *Optional[bool]* | :heavy_minus_sign: | Include cursor item in response | | +| `name` | *Optional[str]* | :heavy_minus_sign: | Domain name to filter results by. | | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | | \ No newline at end of file diff --git a/docs/models/domainscontrollerlistdomainsresponse.md b/docs/models/domainscontrollerlistdomainsresponse.md new file mode 100644 index 00000000..6bb53986 --- /dev/null +++ b/docs/models/domainscontrollerlistdomainsresponse.md @@ -0,0 +1,9 @@ +# DomainsControllerListDomainsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.ListDomainsResponseDto](../models/listdomainsresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollerstartdomainautoconfigurerequest.md b/docs/models/domainscontrollerstartdomainautoconfigurerequest.md new file mode 100644 index 00000000..9c2579ee --- /dev/null +++ b/docs/models/domainscontrollerstartdomainautoconfigurerequest.md @@ -0,0 +1,10 @@ +# DomainsControllerStartDomainAutoConfigureRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `create_domain_connect_apply_url_dto` | [models.CreateDomainConnectApplyURLDto](../models/createdomainconnectapplyurldto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollerstartdomainautoconfigureresponse.md b/docs/models/domainscontrollerstartdomainautoconfigureresponse.md new file mode 100644 index 00000000..a35d5377 --- /dev/null +++ b/docs/models/domainscontrollerstartdomainautoconfigureresponse.md @@ -0,0 +1,9 @@ +# DomainsControllerStartDomainAutoConfigureResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.DomainConnectApplyURLResponseDto](../models/domainconnectapplyurlresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollertestdomainrouterequest.md b/docs/models/domainscontrollertestdomainrouterequest.md new file mode 100644 index 00000000..fc234d28 --- /dev/null +++ b/docs/models/domainscontrollertestdomainrouterequest.md @@ -0,0 +1,11 @@ +# DomainsControllerTestDomainRouteRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `address` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `test_domain_route_dto` | [models.TestDomainRouteDto](../models/testdomainroutedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollertestdomainrouteresponse.md b/docs/models/domainscontrollertestdomainrouteresponse.md new file mode 100644 index 00000000..41c2cfcb --- /dev/null +++ b/docs/models/domainscontrollertestdomainrouteresponse.md @@ -0,0 +1,9 @@ +# DomainsControllerTestDomainRouteResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.TestDomainRouteResponseDto](../models/testdomainrouteresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollerupdatedomainrequest.md b/docs/models/domainscontrollerupdatedomainrequest.md new file mode 100644 index 00000000..0f8fdac3 --- /dev/null +++ b/docs/models/domainscontrollerupdatedomainrequest.md @@ -0,0 +1,10 @@ +# DomainsControllerUpdateDomainRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `update_domain_dto` | [models.UpdateDomainDto](../models/updatedomaindto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollerupdatedomainresponse.md b/docs/models/domainscontrollerupdatedomainresponse.md new file mode 100644 index 00000000..471e869c --- /dev/null +++ b/docs/models/domainscontrollerupdatedomainresponse.md @@ -0,0 +1,9 @@ +# DomainsControllerUpdateDomainResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.DomainResponseDto](../models/domainresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollerupdatedomainrouterequest.md b/docs/models/domainscontrollerupdatedomainrouterequest.md new file mode 100644 index 00000000..b43c5486 --- /dev/null +++ b/docs/models/domainscontrollerupdatedomainrouterequest.md @@ -0,0 +1,11 @@ +# DomainsControllerUpdateDomainRouteRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `address` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `update_domain_route_dto` | [models.UpdateDomainRouteDto](../models/updatedomainroutedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollerupdatedomainrouteresponse.md b/docs/models/domainscontrollerupdatedomainrouteresponse.md new file mode 100644 index 00000000..8099ffd6 --- /dev/null +++ b/docs/models/domainscontrollerupdatedomainrouteresponse.md @@ -0,0 +1,9 @@ +# DomainsControllerUpdateDomainRouteResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.DomainRouteResponseDto](../models/domainrouteresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainscontrollerverifydomainrequest.md b/docs/models/domainscontrollerverifydomainrequest.md new file mode 100644 index 00000000..722af815 --- /dev/null +++ b/docs/models/domainscontrollerverifydomainrequest.md @@ -0,0 +1,9 @@ +# DomainsControllerVerifyDomainRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/domainscontrollerverifydomainresponse.md b/docs/models/domainscontrollerverifydomainresponse.md new file mode 100644 index 00000000..28e6fac7 --- /dev/null +++ b/docs/models/domainscontrollerverifydomainresponse.md @@ -0,0 +1,9 @@ +# DomainsControllerVerifyDomainResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.DomainResponseDto](../models/domainresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/domainstatus.md b/docs/models/domainstatus.md new file mode 100644 index 00000000..c4454517 --- /dev/null +++ b/docs/models/domainstatus.md @@ -0,0 +1,17 @@ +# DomainStatus + +## Example Usage + +```python +from novu_py.models import DomainStatus + +value = DomainStatus.PENDING +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `PENDING` | pending | +| `VERIFIED` | verified | \ No newline at end of file diff --git a/docs/models/duplicatelayoutdto.md b/docs/models/duplicatelayoutdto.md index 17adeec8..1ed75997 100644 --- a/docs/models/duplicatelayoutdto.md +++ b/docs/models/duplicatelayoutdto.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | Name of the layout | -| `is_translation_enabled` | *Optional[bool]* | :heavy_minus_sign: | Enable or disable translations for this layout | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | Name of the layout | +| `layout_id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the duplicated layout. When omitted, it is derived from the name. | +| `is_translation_enabled` | *Optional[bool]* | :heavy_minus_sign: | Enable or disable translations for this layout | \ No newline at end of file diff --git a/docs/models/expecteddnsrecorddto.md b/docs/models/expecteddnsrecorddto.md new file mode 100644 index 00000000..ae27579b --- /dev/null +++ b/docs/models/expecteddnsrecorddto.md @@ -0,0 +1,12 @@ +# ExpectedDNSRecordDto + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `type` | *str* | :heavy_check_mark: | N/A | MX | +| `name` | *str* | :heavy_check_mark: | N/A | inbound | +| `content` | *str* | :heavy_check_mark: | N/A | inbound-smtp.us-east-1.amazonaws.com | +| `ttl` | *str* | :heavy_check_mark: | N/A | Auto | +| `priority` | *Optional[float]* | :heavy_minus_sign: | N/A | 10 | \ No newline at end of file diff --git a/docs/models/generatechatoauthurlrequestdto.md b/docs/models/generatechatoauthurlrequestdto.md index faea1efa..530990d2 100644 --- a/docs/models/generatechatoauthurlrequestdto.md +++ b/docs/models/generatechatoauthurlrequestdto.md @@ -3,10 +3,14 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `subscriber_id` | *Optional[str]* | :heavy_minus_sign: | The subscriber ID to link the channel connection to. For Slack: Required for incoming webhook endpoints, optional for workspace connections. For MS Teams: Optional. Admin consent is tenant-wide and can be associated with a subscriber for organizational purposes. | subscriber-123 | -| `integration_identifier` | *str* | :heavy_check_mark: | Integration identifier | | -| `connection_identifier` | *Optional[str]* | :heavy_minus_sign: | Identifier of the channel connection that will be created. It is generated automatically if not provided. | slack-connection-abc123 | -| `context` | Dict[str, [models.GenerateChatOauthURLRequestDtoContext](../models/generatechatoauthurlrequestdtocontext.md)] | :heavy_minus_sign: | N/A | | -| `scope` | List[*str*] | :heavy_minus_sign: | **Slack only**: OAuth scopes to request during authorization. These define the permissions your Slack integration will have. If not specified, default scopes will be used: chat:write, chat:write.public, channels:read, groups:read, users:read, users:read.email. **MS Teams**: This parameter is ignored. MS Teams uses admin consent with pre-configured permissions in Azure AD. Note: The generated OAuth URL expires after 5 minutes. | [
"chat:write",
"chat:write.public",
"channels:read",
"groups:read",
"users:read",
"users:read.email",
"incoming-webhook"
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `subscriber_id` | *Optional[str]* | :heavy_minus_sign: | The subscriber ID to link the channel connection to. For Slack: Required for incoming webhook endpoints, optional for workspace connections. For MS Teams: Optional. Admin consent is tenant-wide and can be associated with a subscriber for organizational purposes. | subscriber-123 | +| `integration_identifier` | *str* | :heavy_check_mark: | Integration identifier | | +| `connection_identifier` | *Optional[str]* | :heavy_minus_sign: | Identifier of the channel connection that will be created. It is generated automatically if not provided. | slack-connection-abc123 | +| `context` | Dict[str, [models.GenerateChatOauthURLRequestDtoContext](../models/generatechatoauthurlrequestdtocontext.md)] | :heavy_minus_sign: | N/A | | +| `scope` | List[*str*] | :heavy_minus_sign: | **Slack only**: OAuth scopes to request during authorization. These define the permissions your Slack integration will have. If not specified, default scopes will be used: chat:write, chat:write.public, channels:read, groups:read, users:read, users:read.email. **MS Teams**: This parameter is ignored. MS Teams uses admin consent with pre-configured permissions in Azure AD. Note: The generated OAuth URL expires after 5 minutes. | [
"chat:write",
"chat:write.public",
"channels:read",
"groups:read",
"users:read",
"users:read.email",
"incoming-webhook"
] | +| `user_scope` | List[*str*] | :heavy_minus_sign: | **Slack only, link_user mode**: User-level OAuth scopes to request during authorization. Used when mode is "link_user" to identify the Slack user via "Sign in with Slack". If not specified, defaults to: identity.basic. | [
"identity.basic"
] | +| `mode` | [Optional[models.Mode]](../models/mode.md) | :heavy_minus_sign: | OAuth flow mode. Use "connect" (default) to create a workspace channel connection, or "link_user" to identify the subscriber's Slack user ID without creating a connection. | link_user | +| `connection_mode` | [Optional[models.GenerateChatOauthURLRequestDtoConnectionMode]](../models/generatechatoauthurlrequestdtoconnectionmode.md) | :heavy_minus_sign: | Connection mode that determines how the channel connection is scoped. Use "subscriber" (default) to associate the connection with a specific subscriber. Use "shared" to associate the connection with a context instead of a subscriber — subscriberId will not be stored on the connection. | shared | +| `auto_link_user` | *Optional[bool]* | :heavy_minus_sign: | When true, after the workspace/tenant connection is created the OAuth flow also links the subscriber who clicked "Connect" as a personal endpoint. For Slack, this uses the authed_user.id already returned by oauth.v2.access — no extra redirect. For MS Teams, this triggers a second OAuth redirect for delegated user-identity consent. Defaults to false when omitted; the SlackConnectButton and MsTeamsConnectButton SDK components default this to true. | true | \ No newline at end of file diff --git a/docs/models/generatechatoauthurlrequestdtoconnectionmode.md b/docs/models/generatechatoauthurlrequestdtoconnectionmode.md new file mode 100644 index 00000000..e170539b --- /dev/null +++ b/docs/models/generatechatoauthurlrequestdtoconnectionmode.md @@ -0,0 +1,19 @@ +# GenerateChatOauthURLRequestDtoConnectionMode + +Connection mode that determines how the channel connection is scoped. Use "subscriber" (default) to associate the connection with a specific subscriber. Use "shared" to associate the connection with a context instead of a subscriber — subscriberId will not be stored on the connection. + +## Example Usage + +```python +from novu_py.models import GenerateChatOauthURLRequestDtoConnectionMode + +value = GenerateChatOauthURLRequestDtoConnectionMode.SUBSCRIBER +``` + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `SUBSCRIBER` | subscriber | +| `SHARED` | shared | \ No newline at end of file diff --git a/docs/models/generateconnectoauthurlrequestdto.md b/docs/models/generateconnectoauthurlrequestdto.md new file mode 100644 index 00000000..661f9f3f --- /dev/null +++ b/docs/models/generateconnectoauthurlrequestdto.md @@ -0,0 +1,14 @@ +# GenerateConnectOauthURLRequestDto + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `subscriber_id` | *Optional[str]* | :heavy_minus_sign: | The subscriber ID to associate with the channel connection. For Slack: optional for workspace connections (required only for incoming-webhook scope). For MS Teams: optional. Admin consent is tenant-wide. | subscriber-123 | +| `integration_identifier` | *str* | :heavy_check_mark: | Integration identifier | | +| `connection_identifier` | *Optional[str]* | :heavy_minus_sign: | Identifier of the channel connection that will be created. Generated automatically if not provided. | slack-connection-abc123 | +| `context` | Dict[str, [models.GenerateConnectOauthURLRequestDtoContext](../models/generateconnectoauthurlrequestdtocontext.md)] | :heavy_minus_sign: | N/A | | +| `scope` | List[*str*] | :heavy_minus_sign: | **Slack only**: OAuth scopes to request during authorization. If not specified, default scopes will be used: chat:write, chat:write.public, channels:read, groups:read, users:read, users:read.email. **MS Teams**: ignored — uses admin consent with pre-configured Azure AD permissions. | [
"chat:write",
"chat:write.public",
"channels:read"
] | +| `connection_mode` | [Optional[models.GenerateConnectOauthURLRequestDtoConnectionMode]](../models/generateconnectoauthurlrequestdtoconnectionmode.md) | :heavy_minus_sign: | Connection mode that determines how the channel connection is scoped. "subscriber" (default) associates the connection with a specific subscriber. "shared" associates the connection with a context instead of a subscriber. | shared | +| `auto_link_user` | *Optional[bool]* | :heavy_minus_sign: | When true (default when connectionMode is "subscriber"), after the workspace/tenant connection is created the OAuth flow also links the subscriber who clicked "Connect" as a personal endpoint. For Slack, uses the authed_user.id returned by oauth.v2.access — no extra redirect. For MS Teams, triggers a second OAuth redirect for delegated user-identity consent. Set to false to only create the workspace connection without linking the individual user. | true | \ No newline at end of file diff --git a/docs/models/generateconnectoauthurlrequestdtoconnectionmode.md b/docs/models/generateconnectoauthurlrequestdtoconnectionmode.md new file mode 100644 index 00000000..c6bb223f --- /dev/null +++ b/docs/models/generateconnectoauthurlrequestdtoconnectionmode.md @@ -0,0 +1,19 @@ +# GenerateConnectOauthURLRequestDtoConnectionMode + +Connection mode that determines how the channel connection is scoped. "subscriber" (default) associates the connection with a specific subscriber. "shared" associates the connection with a context instead of a subscriber. + +## Example Usage + +```python +from novu_py.models import GenerateConnectOauthURLRequestDtoConnectionMode + +value = GenerateConnectOauthURLRequestDtoConnectionMode.SUBSCRIBER +``` + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `SUBSCRIBER` | subscriber | +| `SHARED` | shared | \ No newline at end of file diff --git a/docs/models/generateconnectoauthurlrequestdtocontext.md b/docs/models/generateconnectoauthurlrequestdtocontext.md new file mode 100644 index 00000000..49309996 --- /dev/null +++ b/docs/models/generateconnectoauthurlrequestdtocontext.md @@ -0,0 +1,17 @@ +# GenerateConnectOauthURLRequestDtoContext + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `models.GenerateConnectOauthURLRequestDtoContext2` + +```python +value: models.GenerateConnectOauthURLRequestDtoContext2 = /* values here */ +``` + diff --git a/docs/models/generateconnectoauthurlrequestdtocontext2.md b/docs/models/generateconnectoauthurlrequestdtocontext2.md new file mode 100644 index 00000000..2c8bd369 --- /dev/null +++ b/docs/models/generateconnectoauthurlrequestdtocontext2.md @@ -0,0 +1,11 @@ +# GenerateConnectOauthURLRequestDtoContext2 + +Rich context object with id and optional data + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | org-acme | +| `data` | Dict[str, *Any*] | :heavy_minus_sign: | Optional additional context data | {
"name": "Acme Corp",
"region": "us-east-1"
} | \ No newline at end of file diff --git a/docs/models/generatelinkuseroauthurlrequestdto.md b/docs/models/generatelinkuseroauthurlrequestdto.md new file mode 100644 index 00000000..aed006f0 --- /dev/null +++ b/docs/models/generatelinkuseroauthurlrequestdto.md @@ -0,0 +1,12 @@ +# GenerateLinkUserOauthURLRequestDto + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `subscriber_id` | *str* | :heavy_check_mark: | The subscriber ID to link to their chat identity. Required — this operation always binds a specific subscriber to a user identity in the chat provider. | subscriber-123 | +| `integration_identifier` | *str* | :heavy_check_mark: | Integration identifier | | +| `connection_identifier` | *Optional[str]* | :heavy_minus_sign: | Identifier of the existing channel connection to associate this user endpoint with. Generated automatically if not provided. | slack-connection-abc123 | +| `context` | Dict[str, [models.GenerateLinkUserOauthURLRequestDtoContext](../models/generatelinkuseroauthurlrequestdtocontext.md)] | :heavy_minus_sign: | N/A | | +| `user_scope` | List[*str*] | :heavy_minus_sign: | **Slack only**: User-level OAuth scopes for "Sign in with Slack". Defaults to: identity.basic. **MS Teams**: ignored — uses delegated OpenID scopes (openid, profile, User.Read). | [
"identity.basic"
] | \ No newline at end of file diff --git a/docs/models/generatelinkuseroauthurlrequestdtocontext.md b/docs/models/generatelinkuseroauthurlrequestdtocontext.md new file mode 100644 index 00000000..d3a3b6b5 --- /dev/null +++ b/docs/models/generatelinkuseroauthurlrequestdtocontext.md @@ -0,0 +1,17 @@ +# GenerateLinkUserOauthURLRequestDtoContext + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `models.GenerateLinkUserOauthURLRequestDtoContext2` + +```python +value: models.GenerateLinkUserOauthURLRequestDtoContext2 = /* values here */ +``` + diff --git a/docs/models/generatelinkuseroauthurlrequestdtocontext2.md b/docs/models/generatelinkuseroauthurlrequestdtocontext2.md new file mode 100644 index 00000000..8ffbae78 --- /dev/null +++ b/docs/models/generatelinkuseroauthurlrequestdtocontext2.md @@ -0,0 +1,11 @@ +# GenerateLinkUserOauthURLRequestDtoContext2 + +Rich context object with id and optional data + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | org-acme | +| `data` | Dict[str, *Any*] | :heavy_minus_sign: | Optional additional context data | {
"name": "Acme Corp",
"region": "us-east-1"
} | \ No newline at end of file diff --git a/docs/models/getchannelendpointresponsedtoproviderid.md b/docs/models/getchannelendpointresponsedtoproviderid.md index 5cab150d..9e5c224a 100644 --- a/docs/models/getchannelendpointresponsedtoproviderid.md +++ b/docs/models/getchannelendpointresponsedtoproviderid.md @@ -36,6 +36,7 @@ value = GetChannelEndpointResponseDtoProviderID.EMAILJS | `SPARKPOST` | sparkpost | | `EMAIL_WEBHOOK` | email-webhook | | `BRAZE` | braze | +| `NOVU_EMAIL_AGENT` | novu-email-agent | | `NEXMO` | nexmo | | `PLIVO` | plivo | | `SMS77` | sms77 | diff --git a/docs/models/httprequestcontroldto.md b/docs/models/httprequestcontroldto.md index 69812e73..534faf65 100644 --- a/docs/models/httprequestcontroldto.md +++ b/docs/models/httprequestcontroldto.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `method` | [models.HTTPMethodEnum](../models/httpmethodenum.md) | :heavy_check_mark: | HTTP method | -| `url` | *str* | :heavy_check_mark: | Target URL for the HTTP request | -| `headers` | List[[models.HTTPRequestKeyValuePairDto](../models/httprequestkeyvaluepairdto.md)] | :heavy_minus_sign: | Request headers as key-value pairs | -| `body` | List[[models.HTTPRequestKeyValuePairDto](../models/httprequestkeyvaluepairdto.md)] | :heavy_minus_sign: | Request body as key-value pairs | -| `response_body_schema` | Dict[str, *Any*] | :heavy_minus_sign: | JSON schema to validate response body against | -| `enforce_schema_validation` | *Optional[bool]* | :heavy_minus_sign: | Whether to enforce response body schema validation | -| `continue_on_failure` | *Optional[bool]* | :heavy_minus_sign: | Whether to continue workflow execution on failure | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `method` | [models.HTTPMethodEnum](../models/httpmethodenum.md) | :heavy_check_mark: | HTTP method | +| `url` | *str* | :heavy_check_mark: | Target URL for the HTTP request | +| `headers` | List[[models.HTTPRequestKeyValuePairDto](../models/httprequestkeyvaluepairdto.md)] | :heavy_minus_sign: | Request headers as key-value pairs | +| `body` | [Optional[models.Body]](../models/body.md) | :heavy_minus_sign: | Request body as a raw JSON string. Key-value arrays are supported for legacy workflows. | +| `response_body_schema` | Dict[str, *Any*] | :heavy_minus_sign: | JSON schema to validate response body against | +| `enforce_schema_validation` | *Optional[bool]* | :heavy_minus_sign: | Whether to enforce response body schema validation | +| `continue_on_failure` | *Optional[bool]* | :heavy_minus_sign: | Whether to continue workflow execution on failure | \ No newline at end of file diff --git a/docs/models/httprequeststepresponsedtobody.md b/docs/models/httprequeststepresponsedtobody.md new file mode 100644 index 00000000..2d37a3c8 --- /dev/null +++ b/docs/models/httprequeststepresponsedtobody.md @@ -0,0 +1,19 @@ +# HTTPRequestStepResponseDtoBody + +Request body as a raw JSON string. Key-value arrays are supported for legacy workflows. + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `List[models.HTTPRequestKeyValuePairDto]` + +```python +value: List[models.HTTPRequestKeyValuePairDto] = /* values here */ +``` + diff --git a/docs/models/httprequeststepresponsedtocontrolvalues.md b/docs/models/httprequeststepresponsedtocontrolvalues.md index 93a6a29b..60141c1d 100644 --- a/docs/models/httprequeststepresponsedtocontrolvalues.md +++ b/docs/models/httprequeststepresponsedtocontrolvalues.md @@ -5,13 +5,13 @@ Control values for the HTTP request step ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `method` | [models.HTTPMethodEnum](../models/httpmethodenum.md) | :heavy_check_mark: | HTTP method | -| `url` | *str* | :heavy_check_mark: | Target URL for the HTTP request | -| `headers` | List[[models.HTTPRequestKeyValuePairDto](../models/httprequestkeyvaluepairdto.md)] | :heavy_minus_sign: | Request headers as key-value pairs | -| `body` | List[[models.HTTPRequestKeyValuePairDto](../models/httprequestkeyvaluepairdto.md)] | :heavy_minus_sign: | Request body as key-value pairs | -| `response_body_schema` | Dict[str, *Any*] | :heavy_minus_sign: | JSON schema to validate response body against | -| `enforce_schema_validation` | *Optional[bool]* | :heavy_minus_sign: | Whether to enforce response body schema validation | -| `continue_on_failure` | *Optional[bool]* | :heavy_minus_sign: | Whether to continue workflow execution on failure | -| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `method` | [models.HTTPMethodEnum](../models/httpmethodenum.md) | :heavy_check_mark: | HTTP method | +| `url` | *str* | :heavy_check_mark: | Target URL for the HTTP request | +| `headers` | List[[models.HTTPRequestKeyValuePairDto](../models/httprequestkeyvaluepairdto.md)] | :heavy_minus_sign: | Request headers as key-value pairs | +| `body` | [Optional[models.HTTPRequestStepResponseDtoBody]](../models/httprequeststepresponsedtobody.md) | :heavy_minus_sign: | Request body as a raw JSON string. Key-value arrays are supported for legacy workflows. | +| `response_body_schema` | Dict[str, *Any*] | :heavy_minus_sign: | JSON schema to validate response body against | +| `enforce_schema_validation` | *Optional[bool]* | :heavy_minus_sign: | Whether to enforce response body schema validation | +| `continue_on_failure` | *Optional[bool]* | :heavy_minus_sign: | Whether to continue workflow execution on failure | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/integrationscontrollergenerateconnectoauthurlrequest.md b/docs/models/integrationscontrollergenerateconnectoauthurlrequest.md new file mode 100644 index 00000000..67b322d7 --- /dev/null +++ b/docs/models/integrationscontrollergenerateconnectoauthurlrequest.md @@ -0,0 +1,9 @@ +# IntegrationsControllerGenerateConnectOAuthURLRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `generate_connect_oauth_url_request_dto` | [models.GenerateConnectOauthURLRequestDto](../models/generateconnectoauthurlrequestdto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/integrationscontrollergenerateconnectoauthurlresponse.md b/docs/models/integrationscontrollergenerateconnectoauthurlresponse.md new file mode 100644 index 00000000..07c76152 --- /dev/null +++ b/docs/models/integrationscontrollergenerateconnectoauthurlresponse.md @@ -0,0 +1,9 @@ +# IntegrationsControllerGenerateConnectOAuthURLResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.GenerateChatOAuthURLResponseDto](../models/generatechatoauthurlresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/integrationscontrollergeneratelinkuseroauthurlrequest.md b/docs/models/integrationscontrollergeneratelinkuseroauthurlrequest.md new file mode 100644 index 00000000..d353d0a0 --- /dev/null +++ b/docs/models/integrationscontrollergeneratelinkuseroauthurlrequest.md @@ -0,0 +1,9 @@ +# IntegrationsControllerGenerateLinkUserOAuthURLRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `generate_link_user_oauth_url_request_dto` | [models.GenerateLinkUserOauthURLRequestDto](../models/generatelinkuseroauthurlrequestdto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/integrationscontrollergeneratelinkuseroauthurlresponse.md b/docs/models/integrationscontrollergeneratelinkuseroauthurlresponse.md new file mode 100644 index 00000000..09cbdc83 --- /dev/null +++ b/docs/models/integrationscontrollergeneratelinkuseroauthurlresponse.md @@ -0,0 +1,9 @@ +# IntegrationsControllerGenerateLinkUserOAuthURLResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.GenerateChatOAuthURLResponseDto](../models/generatechatoauthurlresponsedto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/listdomainroutesresponsedto.md b/docs/models/listdomainroutesresponsedto.md new file mode 100644 index 00000000..238e225d --- /dev/null +++ b/docs/models/listdomainroutesresponsedto.md @@ -0,0 +1,12 @@ +# ListDomainRoutesResponseDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `data` | List[[models.DomainRouteResponseDto](../models/domainrouteresponsedto.md)] | :heavy_check_mark: | List of returned domain routes | +| `next` | *Nullable[str]* | :heavy_check_mark: | The cursor for the next page of results, or null if there are no more pages. | +| `previous` | *Nullable[str]* | :heavy_check_mark: | The cursor for the previous page of results, or null if this is the first page. | +| `total_count` | *float* | :heavy_check_mark: | The total count of items (up to 50,000) | +| `total_count_capped` | *bool* | :heavy_check_mark: | Whether there are more than 50,000 results available | \ No newline at end of file diff --git a/docs/models/listdomainsresponsedto.md b/docs/models/listdomainsresponsedto.md new file mode 100644 index 00000000..55f75862 --- /dev/null +++ b/docs/models/listdomainsresponsedto.md @@ -0,0 +1,12 @@ +# ListDomainsResponseDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `data` | List[[models.DomainResponseDto](../models/domainresponsedto.md)] | :heavy_check_mark: | List of returned domains | +| `next` | *Nullable[str]* | :heavy_check_mark: | The cursor for the next page of results, or null if there are no more pages. | +| `previous` | *Nullable[str]* | :heavy_check_mark: | The cursor for the previous page of results, or null if this is the first page. | +| `total_count` | *float* | :heavy_check_mark: | The total count of items (up to 50,000) | +| `total_count_capped` | *bool* | :heavy_check_mark: | Whether there are more than 50,000 results available | \ No newline at end of file diff --git a/docs/models/mode.md b/docs/models/mode.md new file mode 100644 index 00000000..3b2fe5c9 --- /dev/null +++ b/docs/models/mode.md @@ -0,0 +1,19 @@ +# Mode + +OAuth flow mode. Use "connect" (default) to create a workspace channel connection, or "link_user" to identify the subscriber's Slack user ID without creating a connection. + +## Example Usage + +```python +from novu_py.models import Mode + +value = Mode.CONNECT +``` + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `CONNECT` | connect | +| `LINK_USER` | link_user | \ No newline at end of file diff --git a/docs/models/providerid.md b/docs/models/providerid.md index bd12e39e..3ed01716 100644 --- a/docs/models/providerid.md +++ b/docs/models/providerid.md @@ -36,6 +36,7 @@ value = ProviderID.EMAILJS | `SPARKPOST` | sparkpost | | `EMAIL_WEBHOOK` | email-webhook | | `BRAZE` | braze | +| `NOVU_EMAIL_AGENT` | novu-email-agent | | `NEXMO` | nexmo | | `PLIVO` | plivo | | `SMS77` | sms77 | diff --git a/docs/models/providersidenum.md b/docs/models/providersidenum.md index 9b4f56ed..4b37f933 100644 --- a/docs/models/providersidenum.md +++ b/docs/models/providersidenum.md @@ -36,6 +36,7 @@ value = ProvidersIDEnum.EMAILJS | `SPARKPOST` | sparkpost | | `EMAIL_WEBHOOK` | email-webhook | | `BRAZE` | braze | +| `NOVU_EMAIL_AGENT` | novu-email-agent | | `NEXMO` | nexmo | | `PLIVO` | plivo | | `SMS77` | sms77 | diff --git a/docs/models/queryparamseverity.md b/docs/models/queryparamseverity.md new file mode 100644 index 00000000..f32ffd22 --- /dev/null +++ b/docs/models/queryparamseverity.md @@ -0,0 +1,19 @@ +# QueryParamSeverity + +## Example Usage + +```python +from novu_py.models import QueryParamSeverity + +value = QueryParamSeverity.HIGH +``` + + +## Values + +| Name | Value | +| -------- | -------- | +| `HIGH` | high | +| `MEDIUM` | medium | +| `LOW` | low | +| `NONE` | none | \ No newline at end of file diff --git a/docs/models/reasoncode.md b/docs/models/reasoncode.md new file mode 100644 index 00000000..a1693a62 --- /dev/null +++ b/docs/models/reasoncode.md @@ -0,0 +1,22 @@ +# ReasonCode + +## Example Usage + +```python +from novu_py.models import ReasonCode + +value = ReasonCode.DISABLED +``` + + +## Values + +| Name | Value | +| ------------------------------- | ------------------------------- | +| `DISABLED` | disabled | +| `DISCOVERY_NOT_CONFIGURED` | discovery_not_configured | +| `UNSUPPORTED_PROVIDER` | unsupported_provider | +| `INCOMPLETE_CONFIGURATION` | incomplete_configuration | +| `PROVIDER_SETTINGS_UNAVAILABLE` | provider_settings_unavailable | +| `UNTRUSTED_PROVIDER_FLOW` | untrusted_provider_flow | +| `TEMPLATE_NOT_ONBOARDED` | template_not_onboarded | \ No newline at end of file diff --git a/docs/models/severity.md b/docs/models/severity.md index da7b7371..8b2bef9d 100644 --- a/docs/models/severity.md +++ b/docs/models/severity.md @@ -5,15 +5,13 @@ ```python from novu_py.models import Severity -value = Severity.HIGH +value = Severity.WARN ``` ## Values -| Name | Value | -| -------- | -------- | -| `HIGH` | high | -| `MEDIUM` | medium | -| `LOW` | low | -| `NONE` | none | \ No newline at end of file +| Name | Value | +| ------- | ------- | +| `WARN` | warn | +| `ERROR` | error | \ No newline at end of file diff --git a/docs/models/subscriberscontrollergetsubscribernotificationsrequest.md b/docs/models/subscriberscontrollergetsubscribernotificationsrequest.md index 5cc0d40d..fb4d3c6a 100644 --- a/docs/models/subscriberscontrollergetsubscribernotificationsrequest.md +++ b/docs/models/subscriberscontrollergetsubscribernotificationsrequest.md @@ -14,7 +14,7 @@ | `snoozed` | *Optional[bool]* | :heavy_minus_sign: | Filter by snoozed state | | | `seen` | *Optional[bool]* | :heavy_minus_sign: | Filter by seen state | | | `data` | *Optional[str]* | :heavy_minus_sign: | Filter by data attributes (JSON string) | | -| `severity` | List[[models.Severity](../models/severity.md)] | :heavy_minus_sign: | Filter by severity levels | | +| `severity` | List[[models.QueryParamSeverity](../models/queryparamseverity.md)] | :heavy_minus_sign: | Filter by severity levels | | | `created_gte` | *Optional[float]* | :heavy_minus_sign: | Filter notifications created on or after this timestamp (Unix timestamp in milliseconds) | 1704067200000 | | `created_lte` | *Optional[float]* | :heavy_minus_sign: | Filter notifications created on or before this timestamp (Unix timestamp in milliseconds) | 1735689599999 | | `context_keys` | List[*str*] | :heavy_minus_sign: | Context keys for filtering notifications in multi-context scenarios | | diff --git a/docs/models/testdomainrouteagentresultdto.md b/docs/models/testdomainrouteagentresultdto.md new file mode 100644 index 00000000..7d44ab74 --- /dev/null +++ b/docs/models/testdomainrouteagentresultdto.md @@ -0,0 +1,11 @@ +# TestDomainRouteAgentResultDto + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `agent_id` | *str* | :heavy_check_mark: | N/A | +| `http_status` | *float* | :heavy_check_mark: | N/A | +| `agent_reply` | [Optional[models.AgentReply]](../models/agentreply.md) | :heavy_minus_sign: | Parsed JSON body from the agent webhook response when JSON. | +| `latency_ms` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/testdomainroutedto.md b/docs/models/testdomainroutedto.md new file mode 100644 index 00000000..ba9cfdad --- /dev/null +++ b/docs/models/testdomainroutedto.md @@ -0,0 +1,12 @@ +# TestDomainRouteDto + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `from_` | [models.TestDomainRouteFromDto](../models/testdomainroutefromdto.md) | :heavy_check_mark: | N/A | +| `subject` | *str* | :heavy_check_mark: | N/A | +| `text` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `html` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `dry_run` | *Optional[bool]* | :heavy_minus_sign: | When true, returns the payload that would be delivered without invoking outbound webhooks or the agent HTTP endpoint. | \ No newline at end of file diff --git a/docs/models/testdomainroutefromdto.md b/docs/models/testdomainroutefromdto.md new file mode 100644 index 00000000..ae8fed2b --- /dev/null +++ b/docs/models/testdomainroutefromdto.md @@ -0,0 +1,9 @@ +# TestDomainRouteFromDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `address` | *str* | :heavy_check_mark: | N/A | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/testdomainrouteresponsedto.md b/docs/models/testdomainrouteresponsedto.md new file mode 100644 index 00000000..ffa05bdd --- /dev/null +++ b/docs/models/testdomainrouteresponsedto.md @@ -0,0 +1,16 @@ +# TestDomainRouteResponseDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `matched` | *bool* | :heavy_check_mark: | N/A | +| `dry_run` | *bool* | :heavy_check_mark: | N/A | +| `domain_status` | [Optional[models.DomainStatus]](../models/domainstatus.md) | :heavy_minus_sign: | N/A | +| `mx_record_configured` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `type` | [Optional[models.TestDomainRouteResponseDtoType]](../models/testdomainrouteresponsedtotype.md) | :heavy_minus_sign: | N/A | +| `would_deliver_to` | *Optional[str]* | :heavy_minus_sign: | Human-readable delivery target summary in dry-run mode. | +| `payload` | Dict[str, *Any*] | :heavy_minus_sign: | The outbound payload (dry-run only). | +| `webhook` | [Optional[models.TestDomainRouteWebhookResultDto]](../models/testdomainroutewebhookresultdto.md) | :heavy_minus_sign: | N/A | +| `agent` | [Optional[models.TestDomainRouteAgentResultDto]](../models/testdomainrouteagentresultdto.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/testdomainrouteresponsedtotype.md b/docs/models/testdomainrouteresponsedtotype.md new file mode 100644 index 00000000..86436972 --- /dev/null +++ b/docs/models/testdomainrouteresponsedtotype.md @@ -0,0 +1,17 @@ +# TestDomainRouteResponseDtoType + +## Example Usage + +```python +from novu_py.models import TestDomainRouteResponseDtoType + +value = TestDomainRouteResponseDtoType.AGENT +``` + + +## Values + +| Name | Value | +| --------- | --------- | +| `AGENT` | agent | +| `WEBHOOK` | webhook | \ No newline at end of file diff --git a/docs/models/testdomainroutewebhookresultdto.md b/docs/models/testdomainroutewebhookresultdto.md new file mode 100644 index 00000000..1ee5cf19 --- /dev/null +++ b/docs/models/testdomainroutewebhookresultdto.md @@ -0,0 +1,9 @@ +# TestDomainRouteWebhookResultDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `skipped` | *Optional[bool]* | :heavy_minus_sign: | True when outbound webhooks are disabled for this environment (nothing was emitted). | +| `latency_ms` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updatedomaindto.md b/docs/models/updatedomaindto.md new file mode 100644 index 00000000..4a64c133 --- /dev/null +++ b/docs/models/updatedomaindto.md @@ -0,0 +1,8 @@ +# UpdateDomainDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `data` | Dict[str, *str*] | :heavy_minus_sign: | Replaces domain metadata when provided (max 10 keys, 500 characters total for keys+values). | \ No newline at end of file diff --git a/docs/models/updatedomainroutedto.md b/docs/models/updatedomainroutedto.md new file mode 100644 index 00000000..f037cd70 --- /dev/null +++ b/docs/models/updatedomainroutedto.md @@ -0,0 +1,10 @@ +# UpdateDomainRouteDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `agent_id` | *Optional[str]* | :heavy_minus_sign: | Agent identifier; required when type is agent, ignored when type is webhook. | +| `type` | [Optional[models.UpdateDomainRouteDtoType]](../models/updatedomainroutedtotype.md) | :heavy_minus_sign: | N/A | +| `data` | Dict[str, *str*] | :heavy_minus_sign: | Replaces route metadata when provided (max 10 keys, 500 characters total for keys+values). | \ No newline at end of file diff --git a/docs/models/updatedomainroutedtotype.md b/docs/models/updatedomainroutedtotype.md new file mode 100644 index 00000000..662e486d --- /dev/null +++ b/docs/models/updatedomainroutedtotype.md @@ -0,0 +1,17 @@ +# UpdateDomainRouteDtoType + +## Example Usage + +```python +from novu_py.models import UpdateDomainRouteDtoType + +value = UpdateDomainRouteDtoType.AGENT +``` + + +## Values + +| Name | Value | +| --------- | --------- | +| `AGENT` | agent | +| `WEBHOOK` | webhook | \ No newline at end of file diff --git a/docs/sdks/autoconfigure/README.md b/docs/sdks/autoconfigure/README.md new file mode 100644 index 00000000..82090624 --- /dev/null +++ b/docs/sdks/autoconfigure/README.md @@ -0,0 +1,97 @@ +# Domains.AutoConfigure + +## Overview + +### Available Operations + +* [retrieve](#retrieve) - Retrieve auto-configuration availability +* [start](#start) - Start DNS auto-configuration + +## retrieve + +Returns whether DNS auto-configuration (Domain Connect) is available for this domain. When `available` is `false`, `manualRecords` lists the DNS records the customer must add manually. + +### Example Usage + + +```python +from novu_py import Novu + + +with Novu( + secret_key="YOUR_SECRET_KEY_HERE", +) as novu: + + res = novu.domains.auto_configure.retrieve(domain="hidden-subsidy.info") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DomainsControllerGetDomainAutoConfigureResponse](../../models/domainscontrollergetdomainautoconfigureresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models.ErrorDto | 414 | application/json | +| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models.ValidationErrorDto | 422 | application/json | +| models.ErrorDto | 500 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## start + +Generates a signed redirect URL the customer can follow to apply Novu DNS records at their DNS provider. After the provider completes the flow, it redirects back to `redirectUri`. + +### Example Usage + + +```python +from novu_py import Novu + + +with Novu( + secret_key="YOUR_SECRET_KEY_HERE", +) as novu: + + res = novu.domains.auto_configure.start(domain="criminal-other.name", create_domain_connect_apply_url_dto={}) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `create_domain_connect_apply_url_dto` | [models.CreateDomainConnectApplyURLDto](../../models/createdomainconnectapplyurldto.md) | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DomainsControllerStartDomainAutoConfigureResponse](../../models/domainscontrollerstartdomainautoconfigureresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models.ErrorDto | 414 | application/json | +| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models.ValidationErrorDto | 422 | application/json | +| models.ErrorDto | 500 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/channelconnections/README.md b/docs/sdks/channelconnections/README.md index c55fd719..485bd549 100644 --- a/docs/sdks/channelconnections/README.md +++ b/docs/sdks/channelconnections/README.md @@ -72,6 +72,7 @@ Create a new channel connection for a resource for given integration. Only one c ```python +import novu_py from novu_py import Novu @@ -85,6 +86,7 @@ with Novu( "context": { "key": "org-acme", }, + "connection_mode": novu_py.ConnectionMode.SHARED, "integration_identifier": "slack-prod", "workspace": { "id": "T123456", diff --git a/docs/sdks/domains/README.md b/docs/sdks/domains/README.md new file mode 100644 index 00000000..ae36ae43 --- /dev/null +++ b/docs/sdks/domains/README.md @@ -0,0 +1,328 @@ +# Domains + +## Overview + +Used to manage your inbound email domains. + + +### Available Operations + +* [list](#list) - List domains for an environment +* [create](#create) - Create a domain +* [retrieve](#retrieve) - Retrieve a domain by name +* [update](#update) - Update a domain +* [delete](#delete) - Delete a domain +* [diagnose](#diagnose) - Diagnose inbound DNS for a domain +* [verify](#verify) - Verify a domain + +## list + +Returns a paginated list of inbound-email domains in the current environment. Supports cursor pagination and a name contains filter. + +### Example Usage + + +```python +from novu_py import Novu + + +with Novu( + secret_key="YOUR_SECRET_KEY_HERE", +) as novu: + + res = novu.domains.list(request={ + "limit": 10, + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `request` | [models.DomainsControllerListDomainsRequest](../../models/domainscontrollerlistdomainsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DomainsControllerListDomainsResponse](../../models/domainscontrollerlistdomainsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models.ErrorDto | 414 | application/json | +| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models.ValidationErrorDto | 422 | application/json | +| models.ErrorDto | 500 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## create + +Registers a new inbound-email domain. The response includes the DNS records customers must add at their DNS provider before the domain can receive mail. + +### Example Usage + + +```python +from novu_py import Novu + + +with Novu( + secret_key="YOUR_SECRET_KEY_HERE", +) as novu: + + res = novu.domains.create(create_domain_dto={ + "name": "", + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `create_domain_dto` | [models.CreateDomainDto](../../models/createdomaindto.md) | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DomainsControllerCreateDomainResponse](../../models/domainscontrollercreatedomainresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models.ErrorDto | 414 | application/json | +| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models.ValidationErrorDto | 422 | application/json | +| models.ErrorDto | 500 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## retrieve + +Returns the domain configuration and the DNS records that must be in place. This is a pure read; call `domains.verify` to refresh verification status from DNS. + +### Example Usage + + +```python +from novu_py import Novu + + +with Novu( + secret_key="YOUR_SECRET_KEY_HERE", +) as novu: + + res = novu.domains.retrieve(domain="foolish-requirement.org") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DomainsControllerGetDomainResponse](../../models/domainscontrollergetdomainresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models.ErrorDto | 414 | application/json | +| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models.ValidationErrorDto | 422 | application/json | +| models.ErrorDto | 500 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## update + +Updates optional domain fields. When `data` is provided, it replaces the entire metadata object; omit `data` to leave it unchanged. + +### Example Usage + + +```python +from novu_py import Novu + + +with Novu( + secret_key="YOUR_SECRET_KEY_HERE", +) as novu: + + res = novu.domains.update(domain="ordinary-eternity.org", update_domain_dto={}) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `update_domain_dto` | [models.UpdateDomainDto](../../models/updatedomaindto.md) | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DomainsControllerUpdateDomainResponse](../../models/domainscontrollerupdatedomainresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models.ErrorDto | 414 | application/json | +| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models.ValidationErrorDto | 422 | application/json | +| models.ErrorDto | 500 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## delete + +Removes the domain and cascades the deletion to all of its routes. Inbound mail for that domain stops being processed immediately. + +### Example Usage + + +```python +from novu_py import Novu + + +with Novu( + secret_key="YOUR_SECRET_KEY_HERE", +) as novu: + + res = novu.domains.delete(domain="complicated-finer.org") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DomainsControllerDeleteDomainResponse](../../models/domainscontrollerdeletedomainresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models.ErrorDto | 414 | application/json | +| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models.ValidationErrorDto | 422 | application/json | +| models.ErrorDto | 500 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## diagnose + +Runs live DNS checks for inbound email readiness (MX correctness, apex CNAME collision, and common DNS blocklists for the Novu mail host). Returns structured issues with plain-language fixes. + +### Example Usage + + +```python +from novu_py import Novu + + +with Novu( + secret_key="YOUR_SECRET_KEY_HERE", +) as novu: + + res = novu.domains.diagnose(domain="alive-publication.biz") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DomainsControllerDiagnoseDomainResponse](../../models/domainscontrollerdiagnosedomainresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models.ErrorDto | 414 | application/json | +| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models.ValidationErrorDto | 422 | application/json | +| models.ErrorDto | 500 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## verify + +Performs a live DNS lookup to refresh the MX record status of the domain and updates the verification status accordingly. Returns the latest domain configuration. + +### Example Usage + + +```python +from novu_py import Novu + + +with Novu( + secret_key="YOUR_SECRET_KEY_HERE", +) as novu: + + res = novu.domains.verify(domain="formal-fork.com") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DomainsControllerVerifyDomainResponse](../../models/domainscontrollerverifydomainresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models.ErrorDto | 414 | application/json | +| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models.ValidationErrorDto | 422 | application/json | +| models.ErrorDto | 500 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/integrations/README.md b/docs/sdks/integrations/README.md index 96194559..14c030d5 100644 --- a/docs/sdks/integrations/README.md +++ b/docs/sdks/integrations/README.md @@ -14,7 +14,9 @@ With the help of the Integration Store, you can easily integrate your favorite d * [integrations_controller_auto_configure_integration](#integrations_controller_auto_configure_integration) - Auto-configure an integration for inbound webhooks * [set_as_primary](#set_as_primary) - Update integration as primary * [list_active](#list_active) - List active integrations -* [generate_chat_o_auth_url](#generate_chat_o_auth_url) - Generate chat OAuth URL +* [generate_connect_o_auth_url](#generate_connect_o_auth_url) - Generate OAuth URL for a workspace/tenant connection +* [generate_link_user_o_auth_url](#generate_link_user_o_auth_url) - Generate OAuth URL to link a subscriber user identity +* [~~generate_chat_o_auth_url~~](#generate_chat_o_auth_url) - Generate chat OAuth URL :warning: **Deprecated** ## list @@ -333,16 +335,135 @@ with Novu( | models.ErrorDto | 500 | application/json | | models.APIError | 4XX, 5XX | \*/\* | -## generate_chat_o_auth_url +## generate_connect_o_auth_url -Generate an OAuth URL for chat integrations like Slack and MS Teams. +Generate an OAuth URL that creates a workspace or tenant-level channel connection (Slack workspace install or MS Teams admin consent). + The generated URL expires after 5 minutes. + +### Example Usage + + +```python +import novu_py +from novu_py import Novu + + +with Novu( + secret_key="YOUR_SECRET_KEY_HERE", +) as novu: + + res = novu.integrations.generate_connect_o_auth_url(generate_connect_oauth_url_request_dto={ + "subscriber_id": "subscriber-123", + "integration_identifier": "", + "connection_identifier": "slack-connection-abc123", + "context": { + "key": "org-acme", + }, + "scope": [ + "chat:write", + "chat:write.public", + "channels:read", + ], + "connection_mode": novu_py.GenerateConnectOauthURLRequestDtoConnectionMode.SHARED, + "auto_link_user": True, + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `generate_connect_oauth_url_request_dto` | [models.GenerateConnectOauthURLRequestDto](../../models/generateconnectoauthurlrequestdto.md) | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.IntegrationsControllerGenerateConnectOAuthURLResponse](../../models/integrationscontrollergenerateconnectoauthurlresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models.ErrorDto | 414 | application/json | +| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models.ValidationErrorDto | 422 | application/json | +| models.ErrorDto | 500 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## generate_link_user_o_auth_url + +Generate an OAuth URL that links a specific subscriber to their chat identity (Slack user ID or MS Teams user OID). + The generated URL expires after 5 minutes. + +### Example Usage + + +```python +from novu_py import Novu + + +with Novu( + secret_key="YOUR_SECRET_KEY_HERE", +) as novu: + + res = novu.integrations.generate_link_user_o_auth_url(generate_link_user_oauth_url_request_dto={ + "subscriber_id": "subscriber-123", + "integration_identifier": "", + "connection_identifier": "slack-connection-abc123", + "context": { + "key": "org-acme", + }, + "user_scope": [ + "identity.basic", + ], + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `generate_link_user_oauth_url_request_dto` | [models.GenerateLinkUserOauthURLRequestDto](../../models/generatelinkuseroauthurlrequestdto.md) | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.IntegrationsControllerGenerateLinkUserOAuthURLResponse](../../models/integrationscontrollergeneratelinkuseroauthurlresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models.ErrorDto | 414 | application/json | +| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models.ValidationErrorDto | 422 | application/json | +| models.ErrorDto | 500 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## ~~generate_chat_o_auth_url~~ + +**Deprecated** — use `POST /integrations/channel-connections/oauth` (connect) or `POST /integrations/channel-endpoints/oauth` (link_user) instead. + Generate an OAuth URL for chat integrations like Slack and MS Teams. This URL allows subscribers to authorize the integration, enabling the system to send messages through their chat workspace. The generated URL expires after 5 minutes. +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + ### Example Usage ```python +import novu_py from novu_py import Novu @@ -366,6 +487,12 @@ with Novu( "users:read.email", "incoming-webhook", ], + "user_scope": [ + "identity.basic", + ], + "mode": novu_py.Mode.LINK_USER, + "connection_mode": novu_py.GenerateChatOauthURLRequestDtoConnectionMode.SHARED, + "auto_link_user": True, }) # Handle response diff --git a/docs/sdks/routes/README.md b/docs/sdks/routes/README.md new file mode 100644 index 00000000..46c03990 --- /dev/null +++ b/docs/sdks/routes/README.md @@ -0,0 +1,294 @@ +# Domains.Routes + +## Overview + +### Available Operations + +* [list](#list) - List routes for a domain +* [create](#create) - Create a route +* [retrieve](#retrieve) - Retrieve a route by address +* [update](#update) - Update a route +* [delete](#delete) - Delete a route +* [test](#test) - Test an inbound route + +## list + +Returns a paginated list of routes attached to the domain. Optionally filter by an agent identifier to find routes pointing to a specific agent. + +### Example Usage + + +```python +from novu_py import Novu + + +with Novu( + secret_key="YOUR_SECRET_KEY_HERE", +) as novu: + + res = novu.domains.routes.list(request={ + "domain": "fearless-fishery.com", + "limit": 10, + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `request` | [models.DomainsControllerListDomainRoutesRequest](../../models/domainscontrollerlistdomainroutesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DomainsControllerListDomainRoutesResponse](../../models/domainscontrollerlistdomainroutesresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models.ErrorDto | 414 | application/json | +| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models.ValidationErrorDto | 422 | application/json | +| models.ErrorDto | 500 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## create + +Creates a route on the domain that forwards inbound mail addressed to `
@` to either a webhook or an agent. Each address on a domain may only have a single route. + +### Example Usage + + +```python +import novu_py +from novu_py import Novu + + +with Novu( + secret_key="YOUR_SECRET_KEY_HERE", +) as novu: + + res = novu.domains.routes.create(domain="radiant-solvency.net", domain_route_dto={ + "address": "6581 Birch Road", + "type": novu_py.DomainRouteDtoType.WEBHOOK, + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `domain_route_dto` | [models.DomainRouteDto](../../models/domainroutedto.md) | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DomainsControllerCreateDomainRouteResponse](../../models/domainscontrollercreatedomainrouteresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models.ErrorDto | 414 | application/json | +| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models.ValidationErrorDto | 422 | application/json | +| models.ErrorDto | 500 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## retrieve + +Returns the route bound to `
@`. Use `*` as the address to retrieve the wildcard route for the domain. + +### Example Usage + + +```python +from novu_py import Novu + + +with Novu( + secret_key="YOUR_SECRET_KEY_HERE", +) as novu: + + res = novu.domains.routes.retrieve(domain="adolescent-petal.net", address="42531 Green Lane") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `address` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DomainsControllerGetDomainRouteResponse](../../models/domainscontrollergetdomainrouteresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models.ErrorDto | 414 | application/json | +| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models.ValidationErrorDto | 422 | application/json | +| models.ErrorDto | 500 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## update + +Updates the destination of the route bound to `
@`. The address itself is the resource identity and cannot be changed; delete and recreate the route to rename it. + +### Example Usage + + +```python +from novu_py import Novu + + +with Novu( + secret_key="YOUR_SECRET_KEY_HERE", +) as novu: + + res = novu.domains.routes.update(domain="cavernous-cycle.com", address="70213 Gerlach Rue", update_domain_route_dto={}) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `address` | *str* | :heavy_check_mark: | N/A | +| `update_domain_route_dto` | [models.UpdateDomainRouteDto](../../models/updatedomainroutedto.md) | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DomainsControllerUpdateDomainRouteResponse](../../models/domainscontrollerupdatedomainrouteresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models.ErrorDto | 414 | application/json | +| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models.ValidationErrorDto | 422 | application/json | +| models.ErrorDto | 500 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## delete + +Removes the route bound to `
@`. Inbound mail for that address will no longer be processed. + +### Example Usage + + +```python +from novu_py import Novu + + +with Novu( + secret_key="YOUR_SECRET_KEY_HERE", +) as novu: + + res = novu.domains.routes.delete(domain="corrupt-avalanche.biz", address="753 W 4th Avenue") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `address` | *str* | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DomainsControllerDeleteDomainRouteResponse](../../models/domainscontrollerdeletedomainrouteresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models.ErrorDto | 414 | application/json | +| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models.ValidationErrorDto | 422 | application/json | +| models.ErrorDto | 500 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## test + +Sends a synthetic inbound email through the same delivery path as production (outbound webhooks for webhook routes, signed HTTP to the agent for agent routes). Use `dryRun: true` to preview the payload without delivering. + +### Example Usage + + +```python +from novu_py import Novu + + +with Novu( + secret_key="YOUR_SECRET_KEY_HERE", +) as novu: + + res = novu.domains.routes.test(domain="exalted-bonfire.com", address="90499 Rowan Close", test_domain_route_dto={ + "from_": { + "address": "58851 Konopelski Overpass", + }, + "subject": "", + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `domain` | *str* | :heavy_check_mark: | N/A | +| `address` | *str* | :heavy_check_mark: | N/A | +| `test_domain_route_dto` | [models.TestDomainRouteDto](../../models/testdomainroutedto.md) | :heavy_check_mark: | N/A | +| `idempotency_key` | *Optional[str]* | :heavy_minus_sign: | A header for idempotency purposes | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DomainsControllerTestDomainRouteResponse](../../models/domainscontrollertestdomainrouteresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models.ErrorDto | 414 | application/json | +| models.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models.ValidationErrorDto | 422 | application/json | +| models.ErrorDto | 500 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/pylintrc b/pylintrc index 908af8ed..28264e77 100644 --- a/pylintrc +++ b/pylintrc @@ -189,6 +189,7 @@ good-names=i, _, e, id, + ok, on, to, v diff --git a/pyproject.toml b/pyproject.toml index 32f0e5a4..2b01f745 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "novu-py" -version = "3.15.0" +version = "3.15.1" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Speakeasy" },] readme = "README-PYPI.md" diff --git a/src/novu_py/_version.py b/src/novu_py/_version.py index e2295239..69a88056 100644 --- a/src/novu_py/_version.py +++ b/src/novu_py/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "novu-py" -__version__: str = "3.15.0" +__version__: str = "3.15.1" __openapi_doc_version__: str = "3.15.0" -__gen_version__: str = "2.879.11" -__user_agent__: str = "speakeasy-sdk/python 3.15.0 2.879.11 3.15.0 novu-py" +__gen_version__: str = "2.882.0" +__user_agent__: str = "speakeasy-sdk/python 3.15.1 2.882.0 3.15.0 novu-py" try: if __package__ is not None: diff --git a/src/novu_py/activity.py b/src/novu_py/activity.py index e8249094..6c04c058 100644 --- a/src/novu_py/activity.py +++ b/src/novu_py/activity.py @@ -95,7 +95,7 @@ def track( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -195,7 +195,7 @@ async def track_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/autoconfigure.py b/src/novu_py/autoconfigure.py new file mode 100644 index 00000000..9247e5ff --- /dev/null +++ b/src/novu_py/autoconfigure.py @@ -0,0 +1,527 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from novu_py import models, utils +from novu_py._hooks import HookContext +from novu_py.types import OptionalNullable, UNSET +from novu_py.utils import get_security_from_env +from novu_py.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Mapping, Optional, Union + + +class AutoConfigure(BaseSDK): + def retrieve( + self, + *, + domain: str, + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerGetDomainAutoConfigureResponse: + r"""Retrieve auto-configuration availability + + Returns whether DNS auto-configuration (Domain Connect) is available for this domain. When `available` is `false`, `manualRecords` lists the DNS records the customer must add manually. + + :param domain: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerGetDomainAutoConfigureRequest( + domain=domain, + idempotency_key=idempotency_key, + ) + + req = self._build_request( + method="GET", + path="/v1/domains/{domain}/auto-configure", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_getDomainAutoConfigure", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerGetDomainAutoConfigureResponse( + result=unmarshal_json_response( + models.DomainConnectStatusResponseDto, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def retrieve_async( + self, + *, + domain: str, + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerGetDomainAutoConfigureResponse: + r"""Retrieve auto-configuration availability + + Returns whether DNS auto-configuration (Domain Connect) is available for this domain. When `available` is `false`, `manualRecords` lists the DNS records the customer must add manually. + + :param domain: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerGetDomainAutoConfigureRequest( + domain=domain, + idempotency_key=idempotency_key, + ) + + req = self._build_request_async( + method="GET", + path="/v1/domains/{domain}/auto-configure", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_getDomainAutoConfigure", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerGetDomainAutoConfigureResponse( + result=unmarshal_json_response( + models.DomainConnectStatusResponseDto, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def start( + self, + *, + domain: str, + create_domain_connect_apply_url_dto: Union[ + models.CreateDomainConnectApplyURLDto, + models.CreateDomainConnectApplyURLDtoTypedDict, + ], + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerStartDomainAutoConfigureResponse: + r"""Start DNS auto-configuration + + Generates a signed redirect URL the customer can follow to apply Novu DNS records at their DNS provider. After the provider completes the flow, it redirects back to `redirectUri`. + + :param domain: + :param create_domain_connect_apply_url_dto: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerStartDomainAutoConfigureRequest( + domain=domain, + idempotency_key=idempotency_key, + create_domain_connect_apply_url_dto=utils.get_pydantic_model( + create_domain_connect_apply_url_dto, + models.CreateDomainConnectApplyURLDto, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/domains/{domain}/auto-configure/start", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.create_domain_connect_apply_url_dto, + False, + False, + "json", + models.CreateDomainConnectApplyURLDto, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_startDomainAutoConfigure", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.DomainsControllerStartDomainAutoConfigureResponse( + result=unmarshal_json_response( + models.DomainConnectApplyURLResponseDto, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def start_async( + self, + *, + domain: str, + create_domain_connect_apply_url_dto: Union[ + models.CreateDomainConnectApplyURLDto, + models.CreateDomainConnectApplyURLDtoTypedDict, + ], + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerStartDomainAutoConfigureResponse: + r"""Start DNS auto-configuration + + Generates a signed redirect URL the customer can follow to apply Novu DNS records at their DNS provider. After the provider completes the flow, it redirects back to `redirectUri`. + + :param domain: + :param create_domain_connect_apply_url_dto: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerStartDomainAutoConfigureRequest( + domain=domain, + idempotency_key=idempotency_key, + create_domain_connect_apply_url_dto=utils.get_pydantic_model( + create_domain_connect_apply_url_dto, + models.CreateDomainConnectApplyURLDto, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/domains/{domain}/auto-configure/start", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.create_domain_connect_apply_url_dto, + False, + False, + "json", + models.CreateDomainConnectApplyURLDto, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_startDomainAutoConfigure", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.DomainsControllerStartDomainAutoConfigureResponse( + result=unmarshal_json_response( + models.DomainConnectApplyURLResponseDto, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/src/novu_py/basesdk.py b/src/novu_py/basesdk.py index a060de56..eccc574e 100644 --- a/src/novu_py/basesdk.py +++ b/src/novu_py/basesdk.py @@ -3,7 +3,12 @@ from .sdkconfiguration import SDKConfiguration import httpx from novu_py import models, utils -from novu_py._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext +from novu_py._hooks import ( + AfterErrorContext, + AfterSuccessContext, + BeforeRequestContext, + HookContext, +) from novu_py.utils import ( RetryConfig, SerializedRequestBody, @@ -233,10 +238,10 @@ def _build_request_with_client( def do_request( self, - hook_ctx, - request, - error_status_codes, - stream=False, + hook_ctx: HookContext, + request: httpx.Request, + is_error_status_code: Callable[[int], bool], + stream: bool = False, retry_config: Optional[Tuple[RetryConfig, List[str]]] = None, ) -> httpx.Response: client = self.sdk_configuration.client @@ -280,19 +285,6 @@ def do(): "" if stream else http_res.text, ) - if utils.match_status_codes(error_status_codes, http_res.status_code): - result, err = hooks.after_error( - AfterErrorContext(hook_ctx), http_res, None - ) - if err is not None: - logger.debug("Request Exception", exc_info=True) - raise err - if result is not None: - http_res = result - else: - logger.debug("Raising unexpected SDK error") - raise models.APIError("Unexpected error occurred", http_res) - return http_res if retry_config is not None: @@ -300,17 +292,27 @@ def do(): else: http_res = do() - if not utils.match_status_codes(error_status_codes, http_res.status_code): + if is_error_status_code(http_res.status_code): + result, err = hooks.after_error(AfterErrorContext(hook_ctx), http_res, None) + if err is not None: + logger.debug("Request Exception", exc_info=True) + raise err + if result is not None: + http_res = result + else: + logger.debug("Raising unexpected SDK error") + raise models.APIError("Unexpected error occurred", http_res) + else: http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res) return http_res async def do_request_async( self, - hook_ctx, - request, - error_status_codes, - stream=False, + hook_ctx: HookContext, + request: httpx.Request, + is_error_status_code: Callable[[int], bool], + stream: bool = False, retry_config: Optional[Tuple[RetryConfig, List[str]]] = None, ) -> httpx.Response: client = self.sdk_configuration.async_client @@ -360,20 +362,6 @@ async def do(): "" if stream else http_res.text, ) - if utils.match_status_codes(error_status_codes, http_res.status_code): - result, err = await run_sync_in_thread( - hooks.after_error, AfterErrorContext(hook_ctx), http_res, None - ) - - if err is not None: - logger.debug("Request Exception", exc_info=True) - raise err - if result is not None: - http_res = result - else: - logger.debug("Raising unexpected SDK error") - raise models.APIError("Unexpected error occurred", http_res) - return http_res if retry_config is not None: @@ -383,7 +371,20 @@ async def do(): else: http_res = await do() - if not utils.match_status_codes(error_status_codes, http_res.status_code): + if is_error_status_code(http_res.status_code): + result, err = await run_sync_in_thread( + hooks.after_error, AfterErrorContext(hook_ctx), http_res, None + ) + + if err is not None: + logger.debug("Request Exception", exc_info=True) + raise err + if result is not None: + http_res = result + else: + logger.debug("Raising unexpected SDK error") + raise models.APIError("Unexpected error occurred", http_res) + else: http_res = await run_sync_in_thread( hooks.after_success, AfterSuccessContext(hook_ctx), http_res ) diff --git a/src/novu_py/channel_connections.py b/src/novu_py/channel_connections.py index 76d6d45f..b9f18850 100644 --- a/src/novu_py/channel_connections.py +++ b/src/novu_py/channel_connections.py @@ -91,23 +91,7 @@ def list( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -233,23 +217,7 @@ async def list_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -383,23 +351,7 @@ def create( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -533,23 +485,7 @@ async def create_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -672,23 +608,7 @@ def retrieve( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -811,23 +731,7 @@ async def retrieve_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -964,23 +868,7 @@ def update( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1117,23 +1005,7 @@ async def update_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1254,23 +1126,7 @@ def delete( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1388,23 +1244,7 @@ async def delete_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/channel_endpoints.py b/src/novu_py/channel_endpoints.py index 15d92c5f..33b7a0a5 100644 --- a/src/novu_py/channel_endpoints.py +++ b/src/novu_py/channel_endpoints.py @@ -93,23 +93,7 @@ def list( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -237,23 +221,7 @@ async def list_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -390,23 +358,7 @@ def create( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -543,23 +495,7 @@ async def create_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -683,23 +619,7 @@ def retrieve( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -823,23 +743,7 @@ async def retrieve_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -979,23 +883,7 @@ def update( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1135,23 +1023,7 @@ async def update_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1275,23 +1147,7 @@ def delete( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1412,23 +1268,7 @@ async def delete_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/contexts.py b/src/novu_py/contexts.py index b196595c..24b4b7dd 100644 --- a/src/novu_py/contexts.py +++ b/src/novu_py/contexts.py @@ -99,23 +99,7 @@ def create( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -247,23 +231,7 @@ async def create_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -388,23 +356,7 @@ def list( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -531,23 +483,7 @@ async def list_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -687,23 +623,7 @@ def update( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -841,23 +761,7 @@ async def update_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -980,23 +884,7 @@ def retrieve( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1119,23 +1007,7 @@ async def retrieve_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1258,23 +1130,7 @@ def delete( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1394,23 +1250,7 @@ async def delete_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/credentials.py b/src/novu_py/credentials.py index 8ffb5e75..2c45550b 100644 --- a/src/novu_py/credentials.py +++ b/src/novu_py/credentials.py @@ -103,23 +103,7 @@ def update( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -255,23 +239,7 @@ async def update_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -407,23 +375,7 @@ def append( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -559,23 +511,7 @@ async def append_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -698,23 +634,7 @@ def delete( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -836,23 +756,7 @@ async def delete_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/domains.py b/src/novu_py/domains.py new file mode 100644 index 00000000..1ef50efd --- /dev/null +++ b/src/novu_py/domains.py @@ -0,0 +1,1740 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from .sdkconfiguration import SDKConfiguration +from novu_py import models, utils +from novu_py._hooks import HookContext +from novu_py.autoconfigure import AutoConfigure +from novu_py.routes import Routes +from novu_py.types import BaseModel, OptionalNullable, UNSET +from novu_py.utils import get_security_from_env +from novu_py.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Mapping, Optional, Union, cast + + +class Domains(BaseSDK): + r"""Used to manage your inbound email domains. + https://docs.novu.co/platform/domains + """ + + auto_configure: AutoConfigure + routes: Routes + + def __init__( + self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None + ) -> None: + BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref) + self.sdk_configuration = sdk_config + self._init_sdks() + + def _init_sdks(self): + self.auto_configure = AutoConfigure( + self.sdk_configuration, parent_ref=self.parent_ref + ) + self.routes = Routes(self.sdk_configuration, parent_ref=self.parent_ref) + + def list( + self, + *, + request: Union[ + models.DomainsControllerListDomainsRequest, + models.DomainsControllerListDomainsRequestTypedDict, + ] = models.DomainsControllerListDomainsRequest(), + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerListDomainsResponse: + r"""List domains for an environment + + Returns a paginated list of inbound-email domains in the current environment. Supports cursor pagination and a name contains filter. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, models.DomainsControllerListDomainsRequest + ) + request = cast(models.DomainsControllerListDomainsRequest, request) + + req = self._build_request( + method="GET", + path="/v1/domains", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_listDomains", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerListDomainsResponse( + result=unmarshal_json_response(models.ListDomainsResponseDto, http_res), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def list_async( + self, + *, + request: Union[ + models.DomainsControllerListDomainsRequest, + models.DomainsControllerListDomainsRequestTypedDict, + ] = models.DomainsControllerListDomainsRequest(), + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerListDomainsResponse: + r"""List domains for an environment + + Returns a paginated list of inbound-email domains in the current environment. Supports cursor pagination and a name contains filter. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, models.DomainsControllerListDomainsRequest + ) + request = cast(models.DomainsControllerListDomainsRequest, request) + + req = self._build_request_async( + method="GET", + path="/v1/domains", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_listDomains", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerListDomainsResponse( + result=unmarshal_json_response(models.ListDomainsResponseDto, http_res), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def create( + self, + *, + create_domain_dto: Union[ + models.CreateDomainDto, models.CreateDomainDtoTypedDict + ], + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerCreateDomainResponse: + r"""Create a domain + + Registers a new inbound-email domain. The response includes the DNS records customers must add at their DNS provider before the domain can receive mail. + + :param create_domain_dto: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerCreateDomainRequest( + idempotency_key=idempotency_key, + create_domain_dto=utils.get_pydantic_model( + create_domain_dto, models.CreateDomainDto + ), + ) + + req = self._build_request( + method="POST", + path="/v1/domains", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.create_domain_dto, False, False, "json", models.CreateDomainDto + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_createDomain", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.DomainsControllerCreateDomainResponse( + result=unmarshal_json_response(models.DomainResponseDto, http_res), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def create_async( + self, + *, + create_domain_dto: Union[ + models.CreateDomainDto, models.CreateDomainDtoTypedDict + ], + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerCreateDomainResponse: + r"""Create a domain + + Registers a new inbound-email domain. The response includes the DNS records customers must add at their DNS provider before the domain can receive mail. + + :param create_domain_dto: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerCreateDomainRequest( + idempotency_key=idempotency_key, + create_domain_dto=utils.get_pydantic_model( + create_domain_dto, models.CreateDomainDto + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/domains", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.create_domain_dto, False, False, "json", models.CreateDomainDto + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_createDomain", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.DomainsControllerCreateDomainResponse( + result=unmarshal_json_response(models.DomainResponseDto, http_res), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def retrieve( + self, + *, + domain: str, + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerGetDomainResponse: + r"""Retrieve a domain by name + + Returns the domain configuration and the DNS records that must be in place. This is a pure read; call `domains.verify` to refresh verification status from DNS. + + :param domain: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerGetDomainRequest( + domain=domain, + idempotency_key=idempotency_key, + ) + + req = self._build_request( + method="GET", + path="/v1/domains/{domain}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_getDomain", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerGetDomainResponse( + result=unmarshal_json_response(models.DomainResponseDto, http_res), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def retrieve_async( + self, + *, + domain: str, + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerGetDomainResponse: + r"""Retrieve a domain by name + + Returns the domain configuration and the DNS records that must be in place. This is a pure read; call `domains.verify` to refresh verification status from DNS. + + :param domain: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerGetDomainRequest( + domain=domain, + idempotency_key=idempotency_key, + ) + + req = self._build_request_async( + method="GET", + path="/v1/domains/{domain}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_getDomain", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerGetDomainResponse( + result=unmarshal_json_response(models.DomainResponseDto, http_res), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def update( + self, + *, + domain: str, + update_domain_dto: Union[ + models.UpdateDomainDto, models.UpdateDomainDtoTypedDict + ], + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerUpdateDomainResponse: + r"""Update a domain + + Updates optional domain fields. When `data` is provided, it replaces the entire metadata object; omit `data` to leave it unchanged. + + :param domain: + :param update_domain_dto: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerUpdateDomainRequest( + domain=domain, + idempotency_key=idempotency_key, + update_domain_dto=utils.get_pydantic_model( + update_domain_dto, models.UpdateDomainDto + ), + ) + + req = self._build_request( + method="PATCH", + path="/v1/domains/{domain}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_domain_dto, False, False, "json", models.UpdateDomainDto + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_updateDomain", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerUpdateDomainResponse( + result=unmarshal_json_response(models.DomainResponseDto, http_res), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def update_async( + self, + *, + domain: str, + update_domain_dto: Union[ + models.UpdateDomainDto, models.UpdateDomainDtoTypedDict + ], + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerUpdateDomainResponse: + r"""Update a domain + + Updates optional domain fields. When `data` is provided, it replaces the entire metadata object; omit `data` to leave it unchanged. + + :param domain: + :param update_domain_dto: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerUpdateDomainRequest( + domain=domain, + idempotency_key=idempotency_key, + update_domain_dto=utils.get_pydantic_model( + update_domain_dto, models.UpdateDomainDto + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/v1/domains/{domain}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_domain_dto, False, False, "json", models.UpdateDomainDto + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_updateDomain", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerUpdateDomainResponse( + result=unmarshal_json_response(models.DomainResponseDto, http_res), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def delete( + self, + *, + domain: str, + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerDeleteDomainResponse: + r"""Delete a domain + + Removes the domain and cascades the deletion to all of its routes. Inbound mail for that domain stops being processed immediately. + + :param domain: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerDeleteDomainRequest( + domain=domain, + idempotency_key=idempotency_key, + ) + + req = self._build_request( + method="DELETE", + path="/v1/domains/{domain}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_deleteDomain", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return models.DomainsControllerDeleteDomainResponse( + headers=utils.get_response_headers(http_res.headers) + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def delete_async( + self, + *, + domain: str, + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerDeleteDomainResponse: + r"""Delete a domain + + Removes the domain and cascades the deletion to all of its routes. Inbound mail for that domain stops being processed immediately. + + :param domain: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerDeleteDomainRequest( + domain=domain, + idempotency_key=idempotency_key, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/domains/{domain}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_deleteDomain", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return models.DomainsControllerDeleteDomainResponse( + headers=utils.get_response_headers(http_res.headers) + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def diagnose( + self, + *, + domain: str, + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerDiagnoseDomainResponse: + r"""Diagnose inbound DNS for a domain + + Runs live DNS checks for inbound email readiness (MX correctness, apex CNAME collision, and common DNS blocklists for the Novu mail host). Returns structured issues with plain-language fixes. + + :param domain: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerDiagnoseDomainRequest( + domain=domain, + idempotency_key=idempotency_key, + ) + + req = self._build_request( + method="POST", + path="/v1/domains/{domain}/diagnose", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_diagnoseDomain", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerDiagnoseDomainResponse( + result=unmarshal_json_response( + models.DiagnoseDomainResponseDto, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def diagnose_async( + self, + *, + domain: str, + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerDiagnoseDomainResponse: + r"""Diagnose inbound DNS for a domain + + Runs live DNS checks for inbound email readiness (MX correctness, apex CNAME collision, and common DNS blocklists for the Novu mail host). Returns structured issues with plain-language fixes. + + :param domain: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerDiagnoseDomainRequest( + domain=domain, + idempotency_key=idempotency_key, + ) + + req = self._build_request_async( + method="POST", + path="/v1/domains/{domain}/diagnose", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_diagnoseDomain", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerDiagnoseDomainResponse( + result=unmarshal_json_response( + models.DiagnoseDomainResponseDto, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def verify( + self, + *, + domain: str, + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerVerifyDomainResponse: + r"""Verify a domain + + Performs a live DNS lookup to refresh the MX record status of the domain and updates the verification status accordingly. Returns the latest domain configuration. + + :param domain: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerVerifyDomainRequest( + domain=domain, + idempotency_key=idempotency_key, + ) + + req = self._build_request( + method="POST", + path="/v1/domains/{domain}/verify", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_verifyDomain", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerVerifyDomainResponse( + result=unmarshal_json_response(models.DomainResponseDto, http_res), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def verify_async( + self, + *, + domain: str, + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerVerifyDomainResponse: + r"""Verify a domain + + Performs a live DNS lookup to refresh the MX record status of the domain and updates the verification status accordingly. Returns the latest domain configuration. + + :param domain: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerVerifyDomainRequest( + domain=domain, + idempotency_key=idempotency_key, + ) + + req = self._build_request_async( + method="POST", + path="/v1/domains/{domain}/verify", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_verifyDomain", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerVerifyDomainResponse( + result=unmarshal_json_response(models.DomainResponseDto, http_res), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/src/novu_py/environment_variables.py b/src/novu_py/environment_variables.py index f020c965..0c1c9aaa 100644 --- a/src/novu_py/environment_variables.py +++ b/src/novu_py/environment_variables.py @@ -86,23 +86,7 @@ def list( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -225,23 +209,7 @@ async def list_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -377,23 +345,7 @@ def create( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -529,23 +481,7 @@ async def create_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -668,23 +604,7 @@ def retrieve( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -805,23 +725,7 @@ async def retrieve_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -958,23 +862,7 @@ def update( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1113,23 +1001,7 @@ async def update_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1252,23 +1124,7 @@ def delete( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1388,23 +1244,7 @@ async def delete_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1526,23 +1366,7 @@ def usage( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1665,23 +1489,7 @@ async def usage_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/environments.py b/src/novu_py/environments.py index 592daaca..221e4c77 100644 --- a/src/novu_py/environments.py +++ b/src/novu_py/environments.py @@ -90,23 +90,7 @@ def get_tags( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -227,23 +211,7 @@ async def get_tags_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -378,23 +346,7 @@ def diff( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -529,23 +481,7 @@ async def diff_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -681,23 +617,7 @@ def publish( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -833,23 +753,7 @@ async def publish_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -984,24 +888,7 @@ def create( ), ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1134,24 +1021,7 @@ async def create_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "402", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1268,23 +1138,7 @@ def list( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1403,23 +1257,7 @@ async def list_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1556,23 +1394,7 @@ def update( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1707,23 +1529,7 @@ async def update_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1843,23 +1649,7 @@ def delete( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1976,23 +1766,7 @@ async def delete_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/groups.py b/src/novu_py/groups.py index 452ab76f..60df5234 100644 --- a/src/novu_py/groups.py +++ b/src/novu_py/groups.py @@ -92,7 +92,7 @@ def delete( ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -189,7 +189,7 @@ async def delete_async( ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -286,7 +286,7 @@ def retrieve( ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -383,7 +383,7 @@ async def retrieve_async( ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/integrations.py b/src/novu_py/integrations.py index 295701d9..3ab47def 100644 --- a/src/novu_py/integrations.py +++ b/src/novu_py/integrations.py @@ -7,6 +7,7 @@ from novu_py.utils import get_security_from_env from novu_py.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, List, Mapping, Optional, Union +from typing_extensions import deprecated class Integrations(BaseSDK): @@ -87,23 +88,7 @@ def list( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -221,23 +206,7 @@ async def list_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -371,23 +340,7 @@ def create( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -519,23 +472,7 @@ async def create_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -670,23 +607,7 @@ def update( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -821,23 +742,7 @@ async def update_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -957,23 +862,7 @@ def delete( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1095,23 +984,7 @@ async def delete_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1233,23 +1106,7 @@ def integrations_controller_auto_configure_integration( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1371,23 +1228,7 @@ async def integrations_controller_auto_configure_integration_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1510,23 +1351,7 @@ def set_as_primary( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1647,23 +1472,7 @@ async def set_as_primary_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1779,23 +1588,7 @@ def list_active( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1913,23 +1706,7 @@ async def list_active_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1974,6 +1751,549 @@ async def list_active_async( raise models.APIError("Unexpected response received", http_res) + def generate_connect_o_auth_url( + self, + *, + generate_connect_oauth_url_request_dto: Union[ + models.GenerateConnectOauthURLRequestDto, + models.GenerateConnectOauthURLRequestDtoTypedDict, + ], + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.IntegrationsControllerGenerateConnectOAuthURLResponse: + r"""Generate OAuth URL for a workspace/tenant connection + + Generate an OAuth URL that creates a workspace or tenant-level channel connection (Slack workspace install or MS Teams admin consent). + The generated URL expires after 5 minutes. + + :param generate_connect_oauth_url_request_dto: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.IntegrationsControllerGenerateConnectOAuthURLRequest( + idempotency_key=idempotency_key, + generate_connect_oauth_url_request_dto=utils.get_pydantic_model( + generate_connect_oauth_url_request_dto, + models.GenerateConnectOauthURLRequestDto, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/integrations/channel-connections/oauth", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.generate_connect_oauth_url_request_dto, + False, + False, + "json", + models.GenerateConnectOauthURLRequestDto, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="IntegrationsController_generateConnectOAuthUrl", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.IntegrationsControllerGenerateConnectOAuthURLResponse( + result=unmarshal_json_response( + models.GenerateChatOAuthURLResponseDto, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def generate_connect_o_auth_url_async( + self, + *, + generate_connect_oauth_url_request_dto: Union[ + models.GenerateConnectOauthURLRequestDto, + models.GenerateConnectOauthURLRequestDtoTypedDict, + ], + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.IntegrationsControllerGenerateConnectOAuthURLResponse: + r"""Generate OAuth URL for a workspace/tenant connection + + Generate an OAuth URL that creates a workspace or tenant-level channel connection (Slack workspace install or MS Teams admin consent). + The generated URL expires after 5 minutes. + + :param generate_connect_oauth_url_request_dto: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.IntegrationsControllerGenerateConnectOAuthURLRequest( + idempotency_key=idempotency_key, + generate_connect_oauth_url_request_dto=utils.get_pydantic_model( + generate_connect_oauth_url_request_dto, + models.GenerateConnectOauthURLRequestDto, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/integrations/channel-connections/oauth", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.generate_connect_oauth_url_request_dto, + False, + False, + "json", + models.GenerateConnectOauthURLRequestDto, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="IntegrationsController_generateConnectOAuthUrl", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.IntegrationsControllerGenerateConnectOAuthURLResponse( + result=unmarshal_json_response( + models.GenerateChatOAuthURLResponseDto, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def generate_link_user_o_auth_url( + self, + *, + generate_link_user_oauth_url_request_dto: Union[ + models.GenerateLinkUserOauthURLRequestDto, + models.GenerateLinkUserOauthURLRequestDtoTypedDict, + ], + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.IntegrationsControllerGenerateLinkUserOAuthURLResponse: + r"""Generate OAuth URL to link a subscriber user identity + + Generate an OAuth URL that links a specific subscriber to their chat identity (Slack user ID or MS Teams user OID). + The generated URL expires after 5 minutes. + + :param generate_link_user_oauth_url_request_dto: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.IntegrationsControllerGenerateLinkUserOAuthURLRequest( + idempotency_key=idempotency_key, + generate_link_user_oauth_url_request_dto=utils.get_pydantic_model( + generate_link_user_oauth_url_request_dto, + models.GenerateLinkUserOauthURLRequestDto, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/integrations/channel-endpoints/oauth", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.generate_link_user_oauth_url_request_dto, + False, + False, + "json", + models.GenerateLinkUserOauthURLRequestDto, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="IntegrationsController_generateLinkUserOAuthUrl", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.IntegrationsControllerGenerateLinkUserOAuthURLResponse( + result=unmarshal_json_response( + models.GenerateChatOAuthURLResponseDto, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def generate_link_user_o_auth_url_async( + self, + *, + generate_link_user_oauth_url_request_dto: Union[ + models.GenerateLinkUserOauthURLRequestDto, + models.GenerateLinkUserOauthURLRequestDtoTypedDict, + ], + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.IntegrationsControllerGenerateLinkUserOAuthURLResponse: + r"""Generate OAuth URL to link a subscriber user identity + + Generate an OAuth URL that links a specific subscriber to their chat identity (Slack user ID or MS Teams user OID). + The generated URL expires after 5 minutes. + + :param generate_link_user_oauth_url_request_dto: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.IntegrationsControllerGenerateLinkUserOAuthURLRequest( + idempotency_key=idempotency_key, + generate_link_user_oauth_url_request_dto=utils.get_pydantic_model( + generate_link_user_oauth_url_request_dto, + models.GenerateLinkUserOauthURLRequestDto, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/integrations/channel-endpoints/oauth", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.generate_link_user_oauth_url_request_dto, + False, + False, + "json", + models.GenerateLinkUserOauthURLRequestDto, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="IntegrationsController_generateLinkUserOAuthUrl", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.IntegrationsControllerGenerateLinkUserOAuthURLResponse( + result=unmarshal_json_response( + models.GenerateChatOAuthURLResponseDto, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + @deprecated( + "warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ) def generate_chat_o_auth_url( self, *, @@ -1989,6 +2309,7 @@ def generate_chat_o_auth_url( ) -> models.IntegrationsControllerGetChatOAuthURLResponse: r"""Generate chat OAuth URL + **Deprecated** — use `POST /integrations/channel-connections/oauth` (connect) or `POST /integrations/channel-endpoints/oauth` (link_user) instead. Generate an OAuth URL for chat integrations like Slack and MS Teams. This URL allows subscribers to authorize the integration, enabling the system to send messages through their chat workspace. The generated URL expires after 5 minutes. @@ -2065,23 +2386,7 @@ def generate_chat_o_auth_url( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2126,6 +2431,9 @@ def generate_chat_o_auth_url( raise models.APIError("Unexpected response received", http_res) + @deprecated( + "warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ) async def generate_chat_o_auth_url_async( self, *, @@ -2141,6 +2449,7 @@ async def generate_chat_o_auth_url_async( ) -> models.IntegrationsControllerGetChatOAuthURLResponse: r"""Generate chat OAuth URL + **Deprecated** — use `POST /integrations/channel-connections/oauth` (connect) or `POST /integrations/channel-endpoints/oauth` (link_user) instead. Generate an OAuth URL for chat integrations like Slack and MS Teams. This URL allows subscribers to authorize the integration, enabling the system to send messages through their chat workspace. The generated URL expires after 5 minutes. @@ -2217,23 +2526,7 @@ async def generate_chat_o_auth_url_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/layouts.py b/src/novu_py/layouts.py index b594a75b..a9db0f17 100644 --- a/src/novu_py/layouts.py +++ b/src/novu_py/layouts.py @@ -97,23 +97,7 @@ def create( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -239,23 +223,7 @@ async def create_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -374,23 +342,7 @@ def list( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -509,23 +461,7 @@ async def list_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -654,23 +590,7 @@ def update( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -799,23 +719,7 @@ async def update_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -934,23 +838,7 @@ def retrieve( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1069,23 +957,7 @@ async def retrieve_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1204,23 +1076,7 @@ def delete( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1336,23 +1192,7 @@ async def delete_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1482,23 +1322,7 @@ def duplicate( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1631,23 +1455,7 @@ async def duplicate_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1780,23 +1588,7 @@ def generate_preview( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1931,23 +1723,7 @@ async def generate_preview_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2068,23 +1844,7 @@ def usage( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2205,23 +1965,7 @@ async def usage_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/master.py b/src/novu_py/master.py index e665b242..59a22c83 100644 --- a/src/novu_py/master.py +++ b/src/novu_py/master.py @@ -89,7 +89,7 @@ def retrieve( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -183,7 +183,7 @@ async def retrieve_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -289,7 +289,7 @@ def import_master_json( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -395,7 +395,7 @@ async def import_master_json_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -502,7 +502,7 @@ def upload( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -609,7 +609,7 @@ async def upload_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/messages.py b/src/novu_py/messages.py index 7014e974..5aad07eb 100644 --- a/src/novu_py/messages.py +++ b/src/novu_py/messages.py @@ -94,23 +94,7 @@ def retrieve( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -233,23 +217,7 @@ async def retrieve_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -369,23 +337,7 @@ def delete( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -507,23 +459,7 @@ async def delete_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -650,23 +586,7 @@ def delete_by_transaction_id( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -790,23 +710,7 @@ async def delete_by_transaction_id_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/models/__init__.py b/src/novu_py/models/__init__.py index bab662de..31929fe2 100644 --- a/src/novu_py/models/__init__.py +++ b/src/novu_py/models/__init__.py @@ -227,6 +227,7 @@ ) from .controlsmetadatadto import ControlsMetadataDto, ControlsMetadataDtoTypedDict from .createchannelconnectionrequestdto import ( + ConnectionMode, CreateChannelConnectionRequestDto, CreateChannelConnectionRequestDtoContext, CreateChannelConnectionRequestDtoContext2, @@ -238,6 +239,11 @@ CreateContextRequestDto, CreateContextRequestDtoTypedDict, ) + from .createdomainconnectapplyurldto import ( + CreateDomainConnectApplyURLDto, + CreateDomainConnectApplyURLDtoTypedDict, + ) + from .createdomaindto import CreateDomainDto, CreateDomainDtoTypedDict from .createdsubscriberdto import ( CreatedSubscriberDto, CreatedSubscriberDtoTypedDict, @@ -425,6 +431,10 @@ DeleteTopicSubscriptionsResponseDtoTypedDict, ) from .dependencyreasonenum import DependencyReasonEnum + from .diagnosedomainresponsedto import ( + DiagnoseDomainResponseDto, + DiagnoseDomainResponseDtoTypedDict, + ) from .diffactionenum import DiffActionEnum from .diffenvironmentrequestdto import ( DiffEnvironmentRequestDto, @@ -491,6 +501,134 @@ from .digesttypeenum import DigestTypeEnum from .digestunitenum import DigestUnitEnum from .directionenum import DirectionEnum + from .domainconnectapplyurlresponsedto import ( + DomainConnectApplyURLResponseDto, + DomainConnectApplyURLResponseDtoTypedDict, + ) + from .domainconnectstatusresponsedto import ( + DomainConnectStatusResponseDto, + DomainConnectStatusResponseDtoTypedDict, + ReasonCode, + ) + from .domaindiagnosticcheckdto import ( + Code, + DomainDiagnosticCheckDto, + DomainDiagnosticCheckDtoStatus, + DomainDiagnosticCheckDtoTypedDict, + ) + from .domaindiagnosticissuedto import ( + DomainDiagnosticIssueDto, + DomainDiagnosticIssueDtoCode, + DomainDiagnosticIssueDtoTypedDict, + Severity, + ) + from .domainresponsedto import ( + DomainResponseDto, + DomainResponseDtoStatus, + DomainResponseDtoTypedDict, + ) + from .domainroutedto import ( + DomainRouteDto, + DomainRouteDtoType, + DomainRouteDtoTypedDict, + ) + from .domainrouteresponsedto import ( + DomainRouteResponseDto, + DomainRouteResponseDtoType, + DomainRouteResponseDtoTypedDict, + ) + from .domainscontroller_createdomainop import ( + DomainsControllerCreateDomainRequest, + DomainsControllerCreateDomainRequestTypedDict, + DomainsControllerCreateDomainResponse, + DomainsControllerCreateDomainResponseTypedDict, + ) + from .domainscontroller_createdomainrouteop import ( + DomainsControllerCreateDomainRouteRequest, + DomainsControllerCreateDomainRouteRequestTypedDict, + DomainsControllerCreateDomainRouteResponse, + DomainsControllerCreateDomainRouteResponseTypedDict, + ) + from .domainscontroller_deletedomainop import ( + DomainsControllerDeleteDomainRequest, + DomainsControllerDeleteDomainRequestTypedDict, + DomainsControllerDeleteDomainResponse, + DomainsControllerDeleteDomainResponseTypedDict, + ) + from .domainscontroller_deletedomainrouteop import ( + DomainsControllerDeleteDomainRouteRequest, + DomainsControllerDeleteDomainRouteRequestTypedDict, + DomainsControllerDeleteDomainRouteResponse, + DomainsControllerDeleteDomainRouteResponseTypedDict, + ) + from .domainscontroller_diagnosedomainop import ( + DomainsControllerDiagnoseDomainRequest, + DomainsControllerDiagnoseDomainRequestTypedDict, + DomainsControllerDiagnoseDomainResponse, + DomainsControllerDiagnoseDomainResponseTypedDict, + ) + from .domainscontroller_getdomainautoconfigureop import ( + DomainsControllerGetDomainAutoConfigureRequest, + DomainsControllerGetDomainAutoConfigureRequestTypedDict, + DomainsControllerGetDomainAutoConfigureResponse, + DomainsControllerGetDomainAutoConfigureResponseTypedDict, + ) + from .domainscontroller_getdomainop import ( + DomainsControllerGetDomainRequest, + DomainsControllerGetDomainRequestTypedDict, + DomainsControllerGetDomainResponse, + DomainsControllerGetDomainResponseTypedDict, + ) + from .domainscontroller_getdomainrouteop import ( + DomainsControllerGetDomainRouteRequest, + DomainsControllerGetDomainRouteRequestTypedDict, + DomainsControllerGetDomainRouteResponse, + DomainsControllerGetDomainRouteResponseTypedDict, + ) + from .domainscontroller_listdomainroutesop import ( + DomainsControllerListDomainRoutesQueryParamOrderDirection, + DomainsControllerListDomainRoutesRequest, + DomainsControllerListDomainRoutesRequestTypedDict, + DomainsControllerListDomainRoutesResponse, + DomainsControllerListDomainRoutesResponseTypedDict, + ) + from .domainscontroller_listdomainsop import ( + DomainsControllerListDomainsQueryParamOrderDirection, + DomainsControllerListDomainsRequest, + DomainsControllerListDomainsRequestTypedDict, + DomainsControllerListDomainsResponse, + DomainsControllerListDomainsResponseTypedDict, + ) + from .domainscontroller_startdomainautoconfigureop import ( + DomainsControllerStartDomainAutoConfigureRequest, + DomainsControllerStartDomainAutoConfigureRequestTypedDict, + DomainsControllerStartDomainAutoConfigureResponse, + DomainsControllerStartDomainAutoConfigureResponseTypedDict, + ) + from .domainscontroller_testdomainrouteop import ( + DomainsControllerTestDomainRouteRequest, + DomainsControllerTestDomainRouteRequestTypedDict, + DomainsControllerTestDomainRouteResponse, + DomainsControllerTestDomainRouteResponseTypedDict, + ) + from .domainscontroller_updatedomainop import ( + DomainsControllerUpdateDomainRequest, + DomainsControllerUpdateDomainRequestTypedDict, + DomainsControllerUpdateDomainResponse, + DomainsControllerUpdateDomainResponseTypedDict, + ) + from .domainscontroller_updatedomainrouteop import ( + DomainsControllerUpdateDomainRouteRequest, + DomainsControllerUpdateDomainRouteRequestTypedDict, + DomainsControllerUpdateDomainRouteResponse, + DomainsControllerUpdateDomainRouteResponseTypedDict, + ) + from .domainscontroller_verifydomainop import ( + DomainsControllerVerifyDomainRequest, + DomainsControllerVerifyDomainRequestTypedDict, + DomainsControllerVerifyDomainResponse, + DomainsControllerVerifyDomainResponseTypedDict, + ) from .duplicatelayoutdto import DuplicateLayoutDto, DuplicateLayoutDtoTypedDict from .emailblock import EmailBlock, EmailBlockTypedDict from .emailblockstyles import EmailBlockStyles, EmailBlockStylesTypedDict @@ -670,6 +808,10 @@ ) from .executiondetailssourceenum import ExecutionDetailsSourceEnum from .executiondetailsstatusenum import ExecutionDetailsStatusEnum + from .expecteddnsrecorddto import ( + ExpectedDNSRecordDto, + ExpectedDNSRecordDtoTypedDict, + ) from .failedoperationdto import FailedOperationDto, FailedOperationDtoTypedDict from .failedworkflowdto import FailedWorkflowDto, FailedWorkflowDtoTypedDict from .feedresponsedto import FeedResponseDto, FeedResponseDtoTypedDict @@ -681,16 +823,27 @@ ) from .generatechatoauthurlrequestdto import ( GenerateChatOauthURLRequestDto, + GenerateChatOauthURLRequestDtoConnectionMode, GenerateChatOauthURLRequestDtoContext, GenerateChatOauthURLRequestDtoContext2, GenerateChatOauthURLRequestDtoContext2TypedDict, GenerateChatOauthURLRequestDtoContextTypedDict, GenerateChatOauthURLRequestDtoTypedDict, + Mode, ) from .generatechatoauthurlresponsedto import ( GenerateChatOAuthURLResponseDto, GenerateChatOAuthURLResponseDtoTypedDict, ) + from .generateconnectoauthurlrequestdto import ( + GenerateConnectOauthURLRequestDto, + GenerateConnectOauthURLRequestDtoConnectionMode, + GenerateConnectOauthURLRequestDtoContext, + GenerateConnectOauthURLRequestDtoContext2, + GenerateConnectOauthURLRequestDtoContext2TypedDict, + GenerateConnectOauthURLRequestDtoContextTypedDict, + GenerateConnectOauthURLRequestDtoTypedDict, + ) from .generatelayoutpreviewresponsedto import ( GenerateLayoutPreviewResponseDto, GenerateLayoutPreviewResponseDtoTypedDict, @@ -700,6 +853,14 @@ ResultType, ResultTypedDict, ) + from .generatelinkuseroauthurlrequestdto import ( + GenerateLinkUserOauthURLRequestDto, + GenerateLinkUserOauthURLRequestDtoContext, + GenerateLinkUserOauthURLRequestDtoContext2, + GenerateLinkUserOauthURLRequestDtoContext2TypedDict, + GenerateLinkUserOauthURLRequestDtoContextTypedDict, + GenerateLinkUserOauthURLRequestDtoTypedDict, + ) from .generatepreviewrequestdto import ( GeneratePreviewRequestDto, GeneratePreviewRequestDtoTypedDict, @@ -803,6 +964,8 @@ ) from .httpmethodenum import HTTPMethodEnum from .httprequestcontroldto import ( + Body, + BodyTypedDict, HTTPRequestControlDto, HTTPRequestControlDtoTypedDict, ) @@ -816,6 +979,8 @@ ) from .httprequeststepresponsedto import ( HTTPRequestStepResponseDto, + HTTPRequestStepResponseDtoBody, + HTTPRequestStepResponseDtoBodyTypedDict, HTTPRequestStepResponseDtoControlValues, HTTPRequestStepResponseDtoControlValuesTypedDict, HTTPRequestStepResponseDtoTypedDict, @@ -887,6 +1052,18 @@ IntegrationsControllerCreateIntegrationResponse, IntegrationsControllerCreateIntegrationResponseTypedDict, ) + from .integrationscontroller_generateconnectoauthurlop import ( + IntegrationsControllerGenerateConnectOAuthURLRequest, + IntegrationsControllerGenerateConnectOAuthURLRequestTypedDict, + IntegrationsControllerGenerateConnectOAuthURLResponse, + IntegrationsControllerGenerateConnectOAuthURLResponseTypedDict, + ) + from .integrationscontroller_generatelinkuseroauthurlop import ( + IntegrationsControllerGenerateLinkUserOAuthURLRequest, + IntegrationsControllerGenerateLinkUserOAuthURLRequestTypedDict, + IntegrationsControllerGenerateLinkUserOAuthURLResponse, + IntegrationsControllerGenerateLinkUserOAuthURLResponseTypedDict, + ) from .integrationscontroller_getactiveintegrationsop import ( IntegrationsControllerGetActiveIntegrationsRequest, IntegrationsControllerGetActiveIntegrationsRequestTypedDict, @@ -1004,6 +1181,14 @@ ListContextsResponseDto, ListContextsResponseDtoTypedDict, ) + from .listdomainroutesresponsedto import ( + ListDomainRoutesResponseDto, + ListDomainRoutesResponseDtoTypedDict, + ) + from .listdomainsresponsedto import ( + ListDomainsResponseDto, + ListDomainsResponseDtoTypedDict, + ) from .listlayoutresponsedto import ( ListLayoutResponseDto, ListLayoutResponseDtoTypedDict, @@ -1449,7 +1634,7 @@ SubscribersControllerGetSubscriberNotificationsCountResponseTypedDict, ) from .subscriberscontroller_getsubscribernotificationsop import ( - Severity, + QueryParamSeverity, SubscribersControllerGetSubscriberNotificationsRequest, SubscribersControllerGetSubscriberNotificationsRequestTypedDict, SubscribersControllerGetSubscriberNotificationsResponse, @@ -1655,6 +1840,27 @@ TenantPayloadDto, TenantPayloadDtoTypedDict, ) + from .testdomainrouteagentresultdto import ( + AgentReply, + AgentReplyTypedDict, + TestDomainRouteAgentResultDto, + TestDomainRouteAgentResultDtoTypedDict, + ) + from .testdomainroutedto import TestDomainRouteDto, TestDomainRouteDtoTypedDict + from .testdomainroutefromdto import ( + TestDomainRouteFromDto, + TestDomainRouteFromDtoTypedDict, + ) + from .testdomainrouteresponsedto import ( + DomainStatus, + TestDomainRouteResponseDto, + TestDomainRouteResponseDtoType, + TestDomainRouteResponseDtoTypedDict, + ) + from .testdomainroutewebhookresultdto import ( + TestDomainRouteWebhookResultDto, + TestDomainRouteWebhookResultDtoTypedDict, + ) from .textalignenum import TextAlignEnum from .throttlecontroldto import ( ThrottleControlDto, @@ -1906,6 +2112,12 @@ UpdateContextRequestDto, UpdateContextRequestDtoTypedDict, ) + from .updatedomaindto import UpdateDomainDto, UpdateDomainDtoTypedDict + from .updatedomainroutedto import ( + UpdateDomainRouteDto, + UpdateDomainRouteDtoType, + UpdateDomainRouteDtoTypedDict, + ) from .updatedsubscriberdto import ( UpdatedSubscriberDto, UpdatedSubscriberDtoTypedDict, @@ -2110,6 +2322,8 @@ "ActorFeedItemDtoTypedDict", "ActorTypeEnum", "ActorTypedDict", + "AgentReply", + "AgentReplyTypedDict", "All", "AllTypedDict", "AuthDto", @@ -2117,6 +2331,8 @@ "AutoConfigureIntegrationResponseDto", "AutoConfigureIntegrationResponseDtoTypedDict", "BackoffUnit", + "Body", + "BodyTypedDict", "BridgeConfigurationDto", "BridgeConfigurationDtoTypedDict", "BuilderFieldTypeEnum", @@ -2206,12 +2422,14 @@ "ChatStepUpsertDtoControlValues", "ChatStepUpsertDtoControlValuesTypedDict", "ChatStepUpsertDtoTypedDict", + "Code", "Condition", "ConditionTypedDict", "Configurations", "ConfigurationsDto", "ConfigurationsDtoTypedDict", "ConfigurationsTypedDict", + "ConnectionMode", "ConstraintValidation", "ConstraintValidationTypedDict", "Content", @@ -2255,6 +2473,10 @@ "CreateChannelConnectionRequestDtoTypedDict", "CreateContextRequestDto", "CreateContextRequestDtoTypedDict", + "CreateDomainConnectApplyURLDto", + "CreateDomainConnectApplyURLDtoTypedDict", + "CreateDomainDto", + "CreateDomainDtoTypedDict", "CreateEnvironmentRequestDto", "CreateEnvironmentRequestDtoTypedDict", "CreateEnvironmentVariableRequestDto", @@ -2377,6 +2599,8 @@ "DeleteTopicSubscriptionsResponseDto", "DeleteTopicSubscriptionsResponseDtoTypedDict", "DependencyReasonEnum", + "DiagnoseDomainResponseDto", + "DiagnoseDomainResponseDtoTypedDict", "DiffActionEnum", "DiffEnvironmentRequestDto", "DiffEnvironmentRequestDtoTypedDict", @@ -2421,6 +2645,88 @@ "DigestTypeEnum", "DigestUnitEnum", "DirectionEnum", + "DomainConnectApplyURLResponseDto", + "DomainConnectApplyURLResponseDtoTypedDict", + "DomainConnectStatusResponseDto", + "DomainConnectStatusResponseDtoTypedDict", + "DomainDiagnosticCheckDto", + "DomainDiagnosticCheckDtoStatus", + "DomainDiagnosticCheckDtoTypedDict", + "DomainDiagnosticIssueDto", + "DomainDiagnosticIssueDtoCode", + "DomainDiagnosticIssueDtoTypedDict", + "DomainResponseDto", + "DomainResponseDtoStatus", + "DomainResponseDtoTypedDict", + "DomainRouteDto", + "DomainRouteDtoType", + "DomainRouteDtoTypedDict", + "DomainRouteResponseDto", + "DomainRouteResponseDtoType", + "DomainRouteResponseDtoTypedDict", + "DomainStatus", + "DomainsControllerCreateDomainRequest", + "DomainsControllerCreateDomainRequestTypedDict", + "DomainsControllerCreateDomainResponse", + "DomainsControllerCreateDomainResponseTypedDict", + "DomainsControllerCreateDomainRouteRequest", + "DomainsControllerCreateDomainRouteRequestTypedDict", + "DomainsControllerCreateDomainRouteResponse", + "DomainsControllerCreateDomainRouteResponseTypedDict", + "DomainsControllerDeleteDomainRequest", + "DomainsControllerDeleteDomainRequestTypedDict", + "DomainsControllerDeleteDomainResponse", + "DomainsControllerDeleteDomainResponseTypedDict", + "DomainsControllerDeleteDomainRouteRequest", + "DomainsControllerDeleteDomainRouteRequestTypedDict", + "DomainsControllerDeleteDomainRouteResponse", + "DomainsControllerDeleteDomainRouteResponseTypedDict", + "DomainsControllerDiagnoseDomainRequest", + "DomainsControllerDiagnoseDomainRequestTypedDict", + "DomainsControllerDiagnoseDomainResponse", + "DomainsControllerDiagnoseDomainResponseTypedDict", + "DomainsControllerGetDomainAutoConfigureRequest", + "DomainsControllerGetDomainAutoConfigureRequestTypedDict", + "DomainsControllerGetDomainAutoConfigureResponse", + "DomainsControllerGetDomainAutoConfigureResponseTypedDict", + "DomainsControllerGetDomainRequest", + "DomainsControllerGetDomainRequestTypedDict", + "DomainsControllerGetDomainResponse", + "DomainsControllerGetDomainResponseTypedDict", + "DomainsControllerGetDomainRouteRequest", + "DomainsControllerGetDomainRouteRequestTypedDict", + "DomainsControllerGetDomainRouteResponse", + "DomainsControllerGetDomainRouteResponseTypedDict", + "DomainsControllerListDomainRoutesQueryParamOrderDirection", + "DomainsControllerListDomainRoutesRequest", + "DomainsControllerListDomainRoutesRequestTypedDict", + "DomainsControllerListDomainRoutesResponse", + "DomainsControllerListDomainRoutesResponseTypedDict", + "DomainsControllerListDomainsQueryParamOrderDirection", + "DomainsControllerListDomainsRequest", + "DomainsControllerListDomainsRequestTypedDict", + "DomainsControllerListDomainsResponse", + "DomainsControllerListDomainsResponseTypedDict", + "DomainsControllerStartDomainAutoConfigureRequest", + "DomainsControllerStartDomainAutoConfigureRequestTypedDict", + "DomainsControllerStartDomainAutoConfigureResponse", + "DomainsControllerStartDomainAutoConfigureResponseTypedDict", + "DomainsControllerTestDomainRouteRequest", + "DomainsControllerTestDomainRouteRequestTypedDict", + "DomainsControllerTestDomainRouteResponse", + "DomainsControllerTestDomainRouteResponseTypedDict", + "DomainsControllerUpdateDomainRequest", + "DomainsControllerUpdateDomainRequestTypedDict", + "DomainsControllerUpdateDomainResponse", + "DomainsControllerUpdateDomainResponseTypedDict", + "DomainsControllerUpdateDomainRouteRequest", + "DomainsControllerUpdateDomainRouteRequestTypedDict", + "DomainsControllerUpdateDomainRouteResponse", + "DomainsControllerUpdateDomainRouteResponseTypedDict", + "DomainsControllerVerifyDomainRequest", + "DomainsControllerVerifyDomainRequestTypedDict", + "DomainsControllerVerifyDomainResponse", + "DomainsControllerVerifyDomainResponseTypedDict", "DuplicateLayoutDto", "DuplicateLayoutDtoTypedDict", "EditorType", @@ -2543,6 +2849,8 @@ "EventsControllerTriggerResponseTypedDict", "ExecutionDetailsSourceEnum", "ExecutionDetailsStatusEnum", + "ExpectedDNSRecordDto", + "ExpectedDNSRecordDtoTypedDict", "FailedOperationDto", "FailedOperationDtoTypedDict", "FailedWorkflowDto", @@ -2568,13 +2876,27 @@ "GenerateChatOAuthURLResponseDto", "GenerateChatOAuthURLResponseDtoTypedDict", "GenerateChatOauthURLRequestDto", + "GenerateChatOauthURLRequestDtoConnectionMode", "GenerateChatOauthURLRequestDtoContext", "GenerateChatOauthURLRequestDtoContext2", "GenerateChatOauthURLRequestDtoContext2TypedDict", "GenerateChatOauthURLRequestDtoContextTypedDict", "GenerateChatOauthURLRequestDtoTypedDict", + "GenerateConnectOauthURLRequestDto", + "GenerateConnectOauthURLRequestDtoConnectionMode", + "GenerateConnectOauthURLRequestDtoContext", + "GenerateConnectOauthURLRequestDtoContext2", + "GenerateConnectOauthURLRequestDtoContext2TypedDict", + "GenerateConnectOauthURLRequestDtoContextTypedDict", + "GenerateConnectOauthURLRequestDtoTypedDict", "GenerateLayoutPreviewResponseDto", "GenerateLayoutPreviewResponseDtoTypedDict", + "GenerateLinkUserOauthURLRequestDto", + "GenerateLinkUserOauthURLRequestDtoContext", + "GenerateLinkUserOauthURLRequestDtoContext2", + "GenerateLinkUserOauthURLRequestDtoContext2TypedDict", + "GenerateLinkUserOauthURLRequestDtoContextTypedDict", + "GenerateLinkUserOauthURLRequestDtoTypedDict", "GeneratePreviewRequestDto", "GeneratePreviewRequestDtoTypedDict", "GeneratePreviewResponseDto", @@ -2628,6 +2950,8 @@ "HTTPRequestKeyValuePairDto", "HTTPRequestKeyValuePairDtoTypedDict", "HTTPRequestStepResponseDto", + "HTTPRequestStepResponseDtoBody", + "HTTPRequestStepResponseDtoBodyTypedDict", "HTTPRequestStepResponseDtoControlValues", "HTTPRequestStepResponseDtoControlValuesTypedDict", "HTTPRequestStepResponseDtoTypedDict", @@ -2677,6 +3001,14 @@ "IntegrationsControllerCreateIntegrationRequestTypedDict", "IntegrationsControllerCreateIntegrationResponse", "IntegrationsControllerCreateIntegrationResponseTypedDict", + "IntegrationsControllerGenerateConnectOAuthURLRequest", + "IntegrationsControllerGenerateConnectOAuthURLRequestTypedDict", + "IntegrationsControllerGenerateConnectOAuthURLResponse", + "IntegrationsControllerGenerateConnectOAuthURLResponseTypedDict", + "IntegrationsControllerGenerateLinkUserOAuthURLRequest", + "IntegrationsControllerGenerateLinkUserOAuthURLRequestTypedDict", + "IntegrationsControllerGenerateLinkUserOAuthURLResponse", + "IntegrationsControllerGenerateLinkUserOAuthURLResponseTypedDict", "IntegrationsControllerGetActiveIntegrationsRequest", "IntegrationsControllerGetActiveIntegrationsRequestTypedDict", "IntegrationsControllerGetActiveIntegrationsResponse", @@ -2757,6 +3089,10 @@ "ListChannelEndpointsResponseDtoTypedDict", "ListContextsResponseDto", "ListContextsResponseDtoTypedDict", + "ListDomainRoutesResponseDto", + "ListDomainRoutesResponseDtoTypedDict", + "ListDomainsResponseDto", + "ListDomainsResponseDtoTypedDict", "ListLayoutResponseDto", "ListLayoutResponseDtoTypedDict", "ListSubscribersResponseDto", @@ -2836,6 +3172,7 @@ "MetaDtoTypedDict", "Metadata", "MetadataTypedDict", + "Mode", "Monday", "MondayTypedDict", "MonthlyType", @@ -2955,6 +3292,8 @@ "PushStepUpsertDtoTypedDict", "QueryParamChannel", "QueryParamOrderDirection", + "QueryParamSeverity", + "ReasonCode", "RedirectDto", "RedirectDtoTypedDict", "RemoveSubscriberResponseDto", @@ -3261,6 +3600,17 @@ "TenantPayloadDto", "TenantPayloadDtoTypedDict", "TenantTypedDict", + "TestDomainRouteAgentResultDto", + "TestDomainRouteAgentResultDtoTypedDict", + "TestDomainRouteDto", + "TestDomainRouteDtoTypedDict", + "TestDomainRouteFromDto", + "TestDomainRouteFromDtoTypedDict", + "TestDomainRouteResponseDto", + "TestDomainRouteResponseDtoType", + "TestDomainRouteResponseDtoTypedDict", + "TestDomainRouteWebhookResultDto", + "TestDomainRouteWebhookResultDtoTypedDict", "TextAlignEnum", "Three", "ThreeTypedDict", @@ -3431,6 +3781,11 @@ "UpdateChannelEndpointRequestDtoTypedDict", "UpdateContextRequestDto", "UpdateContextRequestDtoTypedDict", + "UpdateDomainDto", + "UpdateDomainDtoTypedDict", + "UpdateDomainRouteDto", + "UpdateDomainRouteDtoType", + "UpdateDomainRouteDtoTypedDict", "UpdateEnvironmentRequestDto", "UpdateEnvironmentRequestDtoTypedDict", "UpdateEnvironmentVariableRequestDto", @@ -3728,6 +4083,7 @@ "ContextsControllerUpdateContextResponseTypedDict": ".contextscontroller_updatecontextop", "ControlsMetadataDto": ".controlsmetadatadto", "ControlsMetadataDtoTypedDict": ".controlsmetadatadto", + "ConnectionMode": ".createchannelconnectionrequestdto", "CreateChannelConnectionRequestDto": ".createchannelconnectionrequestdto", "CreateChannelConnectionRequestDtoContext": ".createchannelconnectionrequestdto", "CreateChannelConnectionRequestDtoContext2": ".createchannelconnectionrequestdto", @@ -3736,6 +4092,10 @@ "CreateChannelConnectionRequestDtoTypedDict": ".createchannelconnectionrequestdto", "CreateContextRequestDto": ".createcontextrequestdto", "CreateContextRequestDtoTypedDict": ".createcontextrequestdto", + "CreateDomainConnectApplyURLDto": ".createdomainconnectapplyurldto", + "CreateDomainConnectApplyURLDtoTypedDict": ".createdomainconnectapplyurldto", + "CreateDomainDto": ".createdomaindto", + "CreateDomainDtoTypedDict": ".createdomaindto", "CreatedSubscriberDto": ".createdsubscriberdto", "CreatedSubscriberDtoTypedDict": ".createdsubscriberdto", "CreateEnvironmentRequestDto": ".createenvironmentrequestdto", @@ -3868,6 +4228,8 @@ "DeleteTopicSubscriptionsResponseDto": ".deletetopicsubscriptionsresponsedto", "DeleteTopicSubscriptionsResponseDtoTypedDict": ".deletetopicsubscriptionsresponsedto", "DependencyReasonEnum": ".dependencyreasonenum", + "DiagnoseDomainResponseDto": ".diagnosedomainresponsedto", + "DiagnoseDomainResponseDtoTypedDict": ".diagnosedomainresponsedto", "DiffActionEnum": ".diffactionenum", "DiffEnvironmentRequestDto": ".diffenvironmentrequestdto", "DiffEnvironmentRequestDtoTypedDict": ".diffenvironmentrequestdto", @@ -3913,6 +4275,90 @@ "DigestTypeEnum": ".digesttypeenum", "DigestUnitEnum": ".digestunitenum", "DirectionEnum": ".directionenum", + "DomainConnectApplyURLResponseDto": ".domainconnectapplyurlresponsedto", + "DomainConnectApplyURLResponseDtoTypedDict": ".domainconnectapplyurlresponsedto", + "DomainConnectStatusResponseDto": ".domainconnectstatusresponsedto", + "DomainConnectStatusResponseDtoTypedDict": ".domainconnectstatusresponsedto", + "ReasonCode": ".domainconnectstatusresponsedto", + "Code": ".domaindiagnosticcheckdto", + "DomainDiagnosticCheckDto": ".domaindiagnosticcheckdto", + "DomainDiagnosticCheckDtoStatus": ".domaindiagnosticcheckdto", + "DomainDiagnosticCheckDtoTypedDict": ".domaindiagnosticcheckdto", + "DomainDiagnosticIssueDto": ".domaindiagnosticissuedto", + "DomainDiagnosticIssueDtoCode": ".domaindiagnosticissuedto", + "DomainDiagnosticIssueDtoTypedDict": ".domaindiagnosticissuedto", + "Severity": ".domaindiagnosticissuedto", + "DomainResponseDto": ".domainresponsedto", + "DomainResponseDtoStatus": ".domainresponsedto", + "DomainResponseDtoTypedDict": ".domainresponsedto", + "DomainRouteDto": ".domainroutedto", + "DomainRouteDtoType": ".domainroutedto", + "DomainRouteDtoTypedDict": ".domainroutedto", + "DomainRouteResponseDto": ".domainrouteresponsedto", + "DomainRouteResponseDtoType": ".domainrouteresponsedto", + "DomainRouteResponseDtoTypedDict": ".domainrouteresponsedto", + "DomainsControllerCreateDomainRequest": ".domainscontroller_createdomainop", + "DomainsControllerCreateDomainRequestTypedDict": ".domainscontroller_createdomainop", + "DomainsControllerCreateDomainResponse": ".domainscontroller_createdomainop", + "DomainsControllerCreateDomainResponseTypedDict": ".domainscontroller_createdomainop", + "DomainsControllerCreateDomainRouteRequest": ".domainscontroller_createdomainrouteop", + "DomainsControllerCreateDomainRouteRequestTypedDict": ".domainscontroller_createdomainrouteop", + "DomainsControllerCreateDomainRouteResponse": ".domainscontroller_createdomainrouteop", + "DomainsControllerCreateDomainRouteResponseTypedDict": ".domainscontroller_createdomainrouteop", + "DomainsControllerDeleteDomainRequest": ".domainscontroller_deletedomainop", + "DomainsControllerDeleteDomainRequestTypedDict": ".domainscontroller_deletedomainop", + "DomainsControllerDeleteDomainResponse": ".domainscontroller_deletedomainop", + "DomainsControllerDeleteDomainResponseTypedDict": ".domainscontroller_deletedomainop", + "DomainsControllerDeleteDomainRouteRequest": ".domainscontroller_deletedomainrouteop", + "DomainsControllerDeleteDomainRouteRequestTypedDict": ".domainscontroller_deletedomainrouteop", + "DomainsControllerDeleteDomainRouteResponse": ".domainscontroller_deletedomainrouteop", + "DomainsControllerDeleteDomainRouteResponseTypedDict": ".domainscontroller_deletedomainrouteop", + "DomainsControllerDiagnoseDomainRequest": ".domainscontroller_diagnosedomainop", + "DomainsControllerDiagnoseDomainRequestTypedDict": ".domainscontroller_diagnosedomainop", + "DomainsControllerDiagnoseDomainResponse": ".domainscontroller_diagnosedomainop", + "DomainsControllerDiagnoseDomainResponseTypedDict": ".domainscontroller_diagnosedomainop", + "DomainsControllerGetDomainAutoConfigureRequest": ".domainscontroller_getdomainautoconfigureop", + "DomainsControllerGetDomainAutoConfigureRequestTypedDict": ".domainscontroller_getdomainautoconfigureop", + "DomainsControllerGetDomainAutoConfigureResponse": ".domainscontroller_getdomainautoconfigureop", + "DomainsControllerGetDomainAutoConfigureResponseTypedDict": ".domainscontroller_getdomainautoconfigureop", + "DomainsControllerGetDomainRequest": ".domainscontroller_getdomainop", + "DomainsControllerGetDomainRequestTypedDict": ".domainscontroller_getdomainop", + "DomainsControllerGetDomainResponse": ".domainscontroller_getdomainop", + "DomainsControllerGetDomainResponseTypedDict": ".domainscontroller_getdomainop", + "DomainsControllerGetDomainRouteRequest": ".domainscontroller_getdomainrouteop", + "DomainsControllerGetDomainRouteRequestTypedDict": ".domainscontroller_getdomainrouteop", + "DomainsControllerGetDomainRouteResponse": ".domainscontroller_getdomainrouteop", + "DomainsControllerGetDomainRouteResponseTypedDict": ".domainscontroller_getdomainrouteop", + "DomainsControllerListDomainRoutesQueryParamOrderDirection": ".domainscontroller_listdomainroutesop", + "DomainsControllerListDomainRoutesRequest": ".domainscontroller_listdomainroutesop", + "DomainsControllerListDomainRoutesRequestTypedDict": ".domainscontroller_listdomainroutesop", + "DomainsControllerListDomainRoutesResponse": ".domainscontroller_listdomainroutesop", + "DomainsControllerListDomainRoutesResponseTypedDict": ".domainscontroller_listdomainroutesop", + "DomainsControllerListDomainsQueryParamOrderDirection": ".domainscontroller_listdomainsop", + "DomainsControllerListDomainsRequest": ".domainscontroller_listdomainsop", + "DomainsControllerListDomainsRequestTypedDict": ".domainscontroller_listdomainsop", + "DomainsControllerListDomainsResponse": ".domainscontroller_listdomainsop", + "DomainsControllerListDomainsResponseTypedDict": ".domainscontroller_listdomainsop", + "DomainsControllerStartDomainAutoConfigureRequest": ".domainscontroller_startdomainautoconfigureop", + "DomainsControllerStartDomainAutoConfigureRequestTypedDict": ".domainscontroller_startdomainautoconfigureop", + "DomainsControllerStartDomainAutoConfigureResponse": ".domainscontroller_startdomainautoconfigureop", + "DomainsControllerStartDomainAutoConfigureResponseTypedDict": ".domainscontroller_startdomainautoconfigureop", + "DomainsControllerTestDomainRouteRequest": ".domainscontroller_testdomainrouteop", + "DomainsControllerTestDomainRouteRequestTypedDict": ".domainscontroller_testdomainrouteop", + "DomainsControllerTestDomainRouteResponse": ".domainscontroller_testdomainrouteop", + "DomainsControllerTestDomainRouteResponseTypedDict": ".domainscontroller_testdomainrouteop", + "DomainsControllerUpdateDomainRequest": ".domainscontroller_updatedomainop", + "DomainsControllerUpdateDomainRequestTypedDict": ".domainscontroller_updatedomainop", + "DomainsControllerUpdateDomainResponse": ".domainscontroller_updatedomainop", + "DomainsControllerUpdateDomainResponseTypedDict": ".domainscontroller_updatedomainop", + "DomainsControllerUpdateDomainRouteRequest": ".domainscontroller_updatedomainrouteop", + "DomainsControllerUpdateDomainRouteRequestTypedDict": ".domainscontroller_updatedomainrouteop", + "DomainsControllerUpdateDomainRouteResponse": ".domainscontroller_updatedomainrouteop", + "DomainsControllerUpdateDomainRouteResponseTypedDict": ".domainscontroller_updatedomainrouteop", + "DomainsControllerVerifyDomainRequest": ".domainscontroller_verifydomainop", + "DomainsControllerVerifyDomainRequestTypedDict": ".domainscontroller_verifydomainop", + "DomainsControllerVerifyDomainResponse": ".domainscontroller_verifydomainop", + "DomainsControllerVerifyDomainResponseTypedDict": ".domainscontroller_verifydomainop", "DuplicateLayoutDto": ".duplicatelayoutdto", "DuplicateLayoutDtoTypedDict": ".duplicatelayoutdto", "EmailBlock": ".emailblock", @@ -4036,6 +4482,8 @@ "EventsControllerTriggerResponseTypedDict": ".eventscontroller_triggerop", "ExecutionDetailsSourceEnum": ".executiondetailssourceenum", "ExecutionDetailsStatusEnum": ".executiondetailsstatusenum", + "ExpectedDNSRecordDto": ".expecteddnsrecorddto", + "ExpectedDNSRecordDtoTypedDict": ".expecteddnsrecorddto", "FailedOperationDto": ".failedoperationdto", "FailedOperationDtoTypedDict": ".failedoperationdto", "FailedWorkflowDto": ".failedworkflowdto", @@ -4047,13 +4495,22 @@ "On": ".fieldfilterpartdto", "Operator": ".fieldfilterpartdto", "GenerateChatOauthURLRequestDto": ".generatechatoauthurlrequestdto", + "GenerateChatOauthURLRequestDtoConnectionMode": ".generatechatoauthurlrequestdto", "GenerateChatOauthURLRequestDtoContext": ".generatechatoauthurlrequestdto", "GenerateChatOauthURLRequestDtoContext2": ".generatechatoauthurlrequestdto", "GenerateChatOauthURLRequestDtoContext2TypedDict": ".generatechatoauthurlrequestdto", "GenerateChatOauthURLRequestDtoContextTypedDict": ".generatechatoauthurlrequestdto", "GenerateChatOauthURLRequestDtoTypedDict": ".generatechatoauthurlrequestdto", + "Mode": ".generatechatoauthurlrequestdto", "GenerateChatOAuthURLResponseDto": ".generatechatoauthurlresponsedto", "GenerateChatOAuthURLResponseDtoTypedDict": ".generatechatoauthurlresponsedto", + "GenerateConnectOauthURLRequestDto": ".generateconnectoauthurlrequestdto", + "GenerateConnectOauthURLRequestDtoConnectionMode": ".generateconnectoauthurlrequestdto", + "GenerateConnectOauthURLRequestDtoContext": ".generateconnectoauthurlrequestdto", + "GenerateConnectOauthURLRequestDtoContext2": ".generateconnectoauthurlrequestdto", + "GenerateConnectOauthURLRequestDtoContext2TypedDict": ".generateconnectoauthurlrequestdto", + "GenerateConnectOauthURLRequestDtoContextTypedDict": ".generateconnectoauthurlrequestdto", + "GenerateConnectOauthURLRequestDtoTypedDict": ".generateconnectoauthurlrequestdto", "GenerateLayoutPreviewResponseDto": ".generatelayoutpreviewresponsedto", "GenerateLayoutPreviewResponseDtoTypedDict": ".generatelayoutpreviewresponsedto", "One": ".generatelayoutpreviewresponsedto", @@ -4061,6 +4518,12 @@ "Result": ".generatelayoutpreviewresponsedto", "ResultType": ".generatelayoutpreviewresponsedto", "ResultTypedDict": ".generatelayoutpreviewresponsedto", + "GenerateLinkUserOauthURLRequestDto": ".generatelinkuseroauthurlrequestdto", + "GenerateLinkUserOauthURLRequestDtoContext": ".generatelinkuseroauthurlrequestdto", + "GenerateLinkUserOauthURLRequestDtoContext2": ".generatelinkuseroauthurlrequestdto", + "GenerateLinkUserOauthURLRequestDtoContext2TypedDict": ".generatelinkuseroauthurlrequestdto", + "GenerateLinkUserOauthURLRequestDtoContextTypedDict": ".generatelinkuseroauthurlrequestdto", + "GenerateLinkUserOauthURLRequestDtoTypedDict": ".generatelinkuseroauthurlrequestdto", "GeneratePreviewRequestDto": ".generatepreviewrequestdto", "GeneratePreviewRequestDtoTypedDict": ".generatepreviewrequestdto", "Eight": ".generatepreviewresponsedto", @@ -4133,6 +4596,8 @@ "GroupPreferenceFilterDto": ".grouppreferencefilterdto", "GroupPreferenceFilterDtoTypedDict": ".grouppreferencefilterdto", "HTTPMethodEnum": ".httpmethodenum", + "Body": ".httprequestcontroldto", + "BodyTypedDict": ".httprequestcontroldto", "HTTPRequestControlDto": ".httprequestcontroldto", "HTTPRequestControlDtoTypedDict": ".httprequestcontroldto", "HTTPRequestControlsMetadataResponseDto": ".httprequestcontrolsmetadataresponsedto", @@ -4140,6 +4605,8 @@ "HTTPRequestKeyValuePairDto": ".httprequestkeyvaluepairdto", "HTTPRequestKeyValuePairDtoTypedDict": ".httprequestkeyvaluepairdto", "HTTPRequestStepResponseDto": ".httprequeststepresponsedto", + "HTTPRequestStepResponseDtoBody": ".httprequeststepresponsedto", + "HTTPRequestStepResponseDtoBodyTypedDict": ".httprequeststepresponsedto", "HTTPRequestStepResponseDtoControlValues": ".httprequeststepresponsedto", "HTTPRequestStepResponseDtoControlValuesTypedDict": ".httprequeststepresponsedto", "HTTPRequestStepResponseDtoTypedDict": ".httprequeststepresponsedto", @@ -4187,6 +4654,14 @@ "IntegrationsControllerCreateIntegrationRequestTypedDict": ".integrationscontroller_createintegrationop", "IntegrationsControllerCreateIntegrationResponse": ".integrationscontroller_createintegrationop", "IntegrationsControllerCreateIntegrationResponseTypedDict": ".integrationscontroller_createintegrationop", + "IntegrationsControllerGenerateConnectOAuthURLRequest": ".integrationscontroller_generateconnectoauthurlop", + "IntegrationsControllerGenerateConnectOAuthURLRequestTypedDict": ".integrationscontroller_generateconnectoauthurlop", + "IntegrationsControllerGenerateConnectOAuthURLResponse": ".integrationscontroller_generateconnectoauthurlop", + "IntegrationsControllerGenerateConnectOAuthURLResponseTypedDict": ".integrationscontroller_generateconnectoauthurlop", + "IntegrationsControllerGenerateLinkUserOAuthURLRequest": ".integrationscontroller_generatelinkuseroauthurlop", + "IntegrationsControllerGenerateLinkUserOAuthURLRequestTypedDict": ".integrationscontroller_generatelinkuseroauthurlop", + "IntegrationsControllerGenerateLinkUserOAuthURLResponse": ".integrationscontroller_generatelinkuseroauthurlop", + "IntegrationsControllerGenerateLinkUserOAuthURLResponseTypedDict": ".integrationscontroller_generatelinkuseroauthurlop", "IntegrationsControllerGetActiveIntegrationsRequest": ".integrationscontroller_getactiveintegrationsop", "IntegrationsControllerGetActiveIntegrationsRequestTypedDict": ".integrationscontroller_getactiveintegrationsop", "IntegrationsControllerGetActiveIntegrationsResponse": ".integrationscontroller_getactiveintegrationsop", @@ -4263,6 +4738,10 @@ "ListChannelEndpointsResponseDtoTypedDict": ".listchannelendpointsresponsedto", "ListContextsResponseDto": ".listcontextsresponsedto", "ListContextsResponseDtoTypedDict": ".listcontextsresponsedto", + "ListDomainRoutesResponseDto": ".listdomainroutesresponsedto", + "ListDomainRoutesResponseDtoTypedDict": ".listdomainroutesresponsedto", + "ListDomainsResponseDto": ".listdomainsresponsedto", + "ListDomainsResponseDtoTypedDict": ".listdomainsresponsedto", "ListLayoutResponseDto": ".listlayoutresponsedto", "ListLayoutResponseDtoTypedDict": ".listlayoutresponsedto", "ListSubscribersResponseDto": ".listsubscribersresponsedto", @@ -4601,7 +5080,7 @@ "SubscribersControllerGetSubscriberNotificationsCountRequestTypedDict": ".subscriberscontroller_getsubscribernotificationscountop", "SubscribersControllerGetSubscriberNotificationsCountResponse": ".subscriberscontroller_getsubscribernotificationscountop", "SubscribersControllerGetSubscriberNotificationsCountResponseTypedDict": ".subscriberscontroller_getsubscribernotificationscountop", - "Severity": ".subscriberscontroller_getsubscribernotificationsop", + "QueryParamSeverity": ".subscriberscontroller_getsubscribernotificationsop", "SubscribersControllerGetSubscriberNotificationsRequest": ".subscriberscontroller_getsubscribernotificationsop", "SubscribersControllerGetSubscriberNotificationsRequestTypedDict": ".subscriberscontroller_getsubscribernotificationsop", "SubscribersControllerGetSubscriberNotificationsResponse": ".subscriberscontroller_getsubscribernotificationsop", @@ -4743,6 +5222,20 @@ "DataTypedDict": ".tenantpayloaddto", "TenantPayloadDto": ".tenantpayloaddto", "TenantPayloadDtoTypedDict": ".tenantpayloaddto", + "AgentReply": ".testdomainrouteagentresultdto", + "AgentReplyTypedDict": ".testdomainrouteagentresultdto", + "TestDomainRouteAgentResultDto": ".testdomainrouteagentresultdto", + "TestDomainRouteAgentResultDtoTypedDict": ".testdomainrouteagentresultdto", + "TestDomainRouteDto": ".testdomainroutedto", + "TestDomainRouteDtoTypedDict": ".testdomainroutedto", + "TestDomainRouteFromDto": ".testdomainroutefromdto", + "TestDomainRouteFromDtoTypedDict": ".testdomainroutefromdto", + "DomainStatus": ".testdomainrouteresponsedto", + "TestDomainRouteResponseDto": ".testdomainrouteresponsedto", + "TestDomainRouteResponseDtoType": ".testdomainrouteresponsedto", + "TestDomainRouteResponseDtoTypedDict": ".testdomainrouteresponsedto", + "TestDomainRouteWebhookResultDto": ".testdomainroutewebhookresultdto", + "TestDomainRouteWebhookResultDtoTypedDict": ".testdomainroutewebhookresultdto", "TextAlignEnum": ".textalignenum", "ThrottleControlDto": ".throttlecontroldto", "ThrottleControlDtoType": ".throttlecontroldto", @@ -4928,6 +5421,11 @@ "UpdateChannelEndpointRequestDtoTypedDict": ".updatechannelendpointrequestdto", "UpdateContextRequestDto": ".updatecontextrequestdto", "UpdateContextRequestDtoTypedDict": ".updatecontextrequestdto", + "UpdateDomainDto": ".updatedomaindto", + "UpdateDomainDtoTypedDict": ".updatedomaindto", + "UpdateDomainRouteDto": ".updatedomainroutedto", + "UpdateDomainRouteDtoType": ".updatedomainroutedto", + "UpdateDomainRouteDtoTypedDict": ".updatedomainroutedto", "UpdatedSubscriberDto": ".updatedsubscriberdto", "UpdatedSubscriberDtoTypedDict": ".updatedsubscriberdto", "UpdateEnvironmentRequestDto": ".updateenvironmentrequestdto", diff --git a/src/novu_py/models/createchannelconnectionrequestdto.py b/src/novu_py/models/createchannelconnectionrequestdto.py index 5a78c066..cebf8b4f 100644 --- a/src/novu_py/models/createchannelconnectionrequestdto.py +++ b/src/novu_py/models/createchannelconnectionrequestdto.py @@ -3,6 +3,7 @@ from __future__ import annotations from .authdto import AuthDto, AuthDtoTypedDict from .workspacedto import WorkspaceDto, WorkspaceDtoTypedDict +from enum import Enum from novu_py.types import BaseModel, UNSET_SENTINEL import pydantic from pydantic import model_serializer @@ -55,6 +56,13 @@ def serialize_model(self, handler): ) +class ConnectionMode(str, Enum): + r"""Connection mode that determines how the channel connection is scoped. Use \"subscriber\" (default) to associate the connection with a specific subscriber. Use \"shared\" to associate the connection with a context instead of a subscriber — subscriberId will not be stored on the connection.""" + + SUBSCRIBER = "subscriber" + SHARED = "shared" + + class CreateChannelConnectionRequestDtoTypedDict(TypedDict): integration_identifier: str r"""The identifier of the integration to use for this channel connection.""" @@ -65,6 +73,8 @@ class CreateChannelConnectionRequestDtoTypedDict(TypedDict): subscriber_id: NotRequired[str] r"""The subscriber ID to link the channel connection to""" context: NotRequired[Dict[str, CreateChannelConnectionRequestDtoContextTypedDict]] + connection_mode: NotRequired[ConnectionMode] + r"""Connection mode that determines how the channel connection is scoped. Use \"subscriber\" (default) to associate the connection with a specific subscriber. Use \"shared\" to associate the connection with a context instead of a subscriber — subscriberId will not be stored on the connection.""" class CreateChannelConnectionRequestDto(BaseModel): @@ -85,9 +95,16 @@ class CreateChannelConnectionRequestDto(BaseModel): context: Optional[Dict[str, CreateChannelConnectionRequestDtoContext]] = None + connection_mode: Annotated[ + Optional[ConnectionMode], pydantic.Field(alias="connectionMode") + ] = None + r"""Connection mode that determines how the channel connection is scoped. Use \"subscriber\" (default) to associate the connection with a specific subscriber. Use \"shared\" to associate the connection with a context instead of a subscriber — subscriberId will not be stored on the connection.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["identifier", "subscriberId", "context"]) + optional_fields = set( + ["identifier", "subscriberId", "context", "connectionMode"] + ) serialized = handler(self) m = {} diff --git a/src/novu_py/models/createdomainconnectapplyurldto.py b/src/novu_py/models/createdomainconnectapplyurldto.py new file mode 100644 index 00000000..163658cf --- /dev/null +++ b/src/novu_py/models/createdomainconnectapplyurldto.py @@ -0,0 +1,40 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from novu_py.types import BaseModel, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CreateDomainConnectApplyURLDtoTypedDict(TypedDict): + redirect_uri: NotRequired[str] + r"""Dashboard URL to return to after the DNS provider consent flow completes.""" + + +class CreateDomainConnectApplyURLDto(BaseModel): + redirect_uri: Annotated[Optional[str], pydantic.Field(alias="redirectUri")] = None + r"""Dashboard URL to return to after the DNS provider consent flow completes.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["redirectUri"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + CreateDomainConnectApplyURLDto.model_rebuild() +except NameError: + pass diff --git a/src/novu_py/models/createdomaindto.py b/src/novu_py/models/createdomaindto.py new file mode 100644 index 00000000..9eefdb87 --- /dev/null +++ b/src/novu_py/models/createdomaindto.py @@ -0,0 +1,38 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from novu_py.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class CreateDomainDtoTypedDict(TypedDict): + name: str + r"""The domain name (e.g. \"recent.dev\")""" + data: NotRequired[Dict[str, str]] + r"""Optional string key-value metadata (max 10 keys, 500 characters total for keys+values).""" + + +class CreateDomainDto(BaseModel): + name: str + r"""The domain name (e.g. \"recent.dev\")""" + + data: Optional[Dict[str, str]] = None + r"""Optional string key-value metadata (max 10 keys, 500 characters total for keys+values).""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/novu_py/models/credentialsdto.py b/src/novu_py/models/credentialsdto.py index a812b071..dd97f955 100644 --- a/src/novu_py/models/credentialsdto.py +++ b/src/novu_py/models/credentialsdto.py @@ -63,6 +63,10 @@ class CredentialsDtoTypedDict(TypedDict): sender_id: NotRequired[str] tenant_id: NotRequired[str] app_io_base_url: NotRequired[str] + signing_secret: NotRequired[str] + outbound_integration_id: NotRequired[str] + use_from_address_override: NotRequired[bool] + from_address_override: NotRequired[str] class CredentialsDto(BaseModel): @@ -178,6 +182,22 @@ class CredentialsDto(BaseModel): None ) + signing_secret: Annotated[Optional[str], pydantic.Field(alias="signingSecret")] = ( + None + ) + + outbound_integration_id: Annotated[ + Optional[str], pydantic.Field(alias="outboundIntegrationId") + ] = None + + use_from_address_override: Annotated[ + Optional[bool], pydantic.Field(alias="useFromAddressOverride") + ] = None + + from_address_override: Annotated[ + Optional[str], pydantic.Field(alias="fromAddressOverride") + ] = None + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -228,6 +248,10 @@ def serialize_model(self, handler): "senderId", "tenantId", "AppIOBaseUrl", + "signingSecret", + "outboundIntegrationId", + "useFromAddressOverride", + "fromAddressOverride", ] ) serialized = handler(self) diff --git a/src/novu_py/models/diagnosedomainresponsedto.py b/src/novu_py/models/diagnosedomainresponsedto.py new file mode 100644 index 00000000..6e261a26 --- /dev/null +++ b/src/novu_py/models/diagnosedomainresponsedto.py @@ -0,0 +1,42 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .domaindiagnosticcheckdto import ( + DomainDiagnosticCheckDto, + DomainDiagnosticCheckDtoTypedDict, +) +from .domaindiagnosticissuedto import ( + DomainDiagnosticIssueDto, + DomainDiagnosticIssueDtoTypedDict, +) +from novu_py.types import BaseModel +import pydantic +from typing import List +from typing_extensions import Annotated, TypedDict + + +class DiagnoseDomainResponseDtoTypedDict(TypedDict): + ok: bool + r"""True when there are no error-severity issues""" + run_at: str + r"""ISO timestamp when the diagnostic run finished""" + checks: List[DomainDiagnosticCheckDtoTypedDict] + issues: List[DomainDiagnosticIssueDtoTypedDict] + + +class DiagnoseDomainResponseDto(BaseModel): + ok: bool + r"""True when there are no error-severity issues""" + + run_at: Annotated[str, pydantic.Field(alias="runAt")] + r"""ISO timestamp when the diagnostic run finished""" + + checks: List[DomainDiagnosticCheckDto] + + issues: List[DomainDiagnosticIssueDto] + + +try: + DiagnoseDomainResponseDto.model_rebuild() +except NameError: + pass diff --git a/src/novu_py/models/domainconnectapplyurlresponsedto.py b/src/novu_py/models/domainconnectapplyurlresponsedto.py new file mode 100644 index 00000000..8806f2e8 --- /dev/null +++ b/src/novu_py/models/domainconnectapplyurlresponsedto.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from novu_py.types import BaseModel +import pydantic +from typing_extensions import Annotated, TypedDict + + +class DomainConnectApplyURLResponseDtoTypedDict(TypedDict): + apply_url: str + provider_name: str + redirect_uri: str + + +class DomainConnectApplyURLResponseDto(BaseModel): + apply_url: Annotated[str, pydantic.Field(alias="applyUrl")] + + provider_name: Annotated[str, pydantic.Field(alias="providerName")] + + redirect_uri: Annotated[str, pydantic.Field(alias="redirectUri")] + + +try: + DomainConnectApplyURLResponseDto.model_rebuild() +except NameError: + pass diff --git a/src/novu_py/models/domainconnectstatusresponsedto.py b/src/novu_py/models/domainconnectstatusresponsedto.py new file mode 100644 index 00000000..283e99fa --- /dev/null +++ b/src/novu_py/models/domainconnectstatusresponsedto.py @@ -0,0 +1,69 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .expecteddnsrecorddto import ExpectedDNSRecordDto, ExpectedDNSRecordDtoTypedDict +from enum import Enum +from novu_py.types import BaseModel, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ReasonCode(str, Enum): + DISABLED = "disabled" + DISCOVERY_NOT_CONFIGURED = "discovery_not_configured" + UNSUPPORTED_PROVIDER = "unsupported_provider" + INCOMPLETE_CONFIGURATION = "incomplete_configuration" + PROVIDER_SETTINGS_UNAVAILABLE = "provider_settings_unavailable" + UNTRUSTED_PROVIDER_FLOW = "untrusted_provider_flow" + TEMPLATE_NOT_ONBOARDED = "template_not_onboarded" + + +class DomainConnectStatusResponseDtoTypedDict(TypedDict): + available: bool + manual_records: List[ExpectedDNSRecordDtoTypedDict] + provider_name: NotRequired[str] + provider_id: NotRequired[str] + reason: NotRequired[str] + reason_code: NotRequired[ReasonCode] + + +class DomainConnectStatusResponseDto(BaseModel): + available: bool + + manual_records: Annotated[ + List[ExpectedDNSRecordDto], pydantic.Field(alias="manualRecords") + ] + + provider_name: Annotated[Optional[str], pydantic.Field(alias="providerName")] = None + + provider_id: Annotated[Optional[str], pydantic.Field(alias="providerId")] = None + + reason: Optional[str] = None + + reason_code: Annotated[Optional[ReasonCode], pydantic.Field(alias="reasonCode")] = ( + None + ) + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["providerName", "providerId", "reason", "reasonCode"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + DomainConnectStatusResponseDto.model_rebuild() +except NameError: + pass diff --git a/src/novu_py/models/domaindiagnosticcheckdto.py b/src/novu_py/models/domaindiagnosticcheckdto.py new file mode 100644 index 00000000..6ebb1d04 --- /dev/null +++ b/src/novu_py/models/domaindiagnosticcheckdto.py @@ -0,0 +1,43 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from novu_py.types import BaseModel +import pydantic +from typing_extensions import Annotated, TypedDict + + +class Code(str, Enum): + MX_MISSING = "mx_missing" + MX_WRONG_TARGET = "mx_wrong_target" + MX_LOW_PRIORITY = "mx_low_priority" + APEX_CNAME_COLLISION = "apex_cname_collision" + DNSBL_LISTED = "dnsbl_listed" + + +class DomainDiagnosticCheckDtoStatus(str, Enum): + PASS = "pass" + FAIL = "fail" + SKIPPED = "skipped" + + +class DomainDiagnosticCheckDtoTypedDict(TypedDict): + code: Code + status: DomainDiagnosticCheckDtoStatus + latency_ms: float + r"""Round-trip time for this check in milliseconds""" + + +class DomainDiagnosticCheckDto(BaseModel): + code: Code + + status: DomainDiagnosticCheckDtoStatus + + latency_ms: Annotated[float, pydantic.Field(alias="latencyMs")] + r"""Round-trip time for this check in milliseconds""" + + +try: + DomainDiagnosticCheckDto.model_rebuild() +except NameError: + pass diff --git a/src/novu_py/models/domaindiagnosticissuedto.py b/src/novu_py/models/domaindiagnosticissuedto.py new file mode 100644 index 00000000..1251eb53 --- /dev/null +++ b/src/novu_py/models/domaindiagnosticissuedto.py @@ -0,0 +1,38 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from novu_py.types import BaseModel +from typing_extensions import TypedDict + + +class DomainDiagnosticIssueDtoCode(str, Enum): + MX_MISSING = "mx_missing" + MX_WRONG_TARGET = "mx_wrong_target" + MX_LOW_PRIORITY = "mx_low_priority" + APEX_CNAME_COLLISION = "apex_cname_collision" + DNSBL_LISTED = "dnsbl_listed" + + +class Severity(str, Enum): + WARN = "warn" + ERROR = "error" + + +class DomainDiagnosticIssueDtoTypedDict(TypedDict): + code: DomainDiagnosticIssueDtoCode + severity: Severity + message: str + fix: str + r"""Plain-language remediation guidance""" + + +class DomainDiagnosticIssueDto(BaseModel): + code: DomainDiagnosticIssueDtoCode + + severity: Severity + + message: str + + fix: str + r"""Plain-language remediation guidance""" diff --git a/src/novu_py/models/domainresponsedto.py b/src/novu_py/models/domainresponsedto.py new file mode 100644 index 00000000..a04483a9 --- /dev/null +++ b/src/novu_py/models/domainresponsedto.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .expecteddnsrecorddto import ExpectedDNSRecordDto, ExpectedDNSRecordDtoTypedDict +from enum import Enum +from novu_py.types import BaseModel, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainResponseDtoStatus(str, Enum): + PENDING = "pending" + VERIFIED = "verified" + + +class DomainResponseDtoTypedDict(TypedDict): + id: str + name: str + status: DomainResponseDtoStatus + mx_record_configured: bool + environment_id: str + organization_id: str + created_at: str + updated_at: str + dns_provider: NotRequired[str] + expected_dns_records: NotRequired[List[ExpectedDNSRecordDtoTypedDict]] + data: NotRequired[Dict[str, str]] + r"""String key-value metadata (max 10 keys, 500 characters total when set via API).""" + + +class DomainResponseDto(BaseModel): + id: Annotated[str, pydantic.Field(alias="_id")] + + name: str + + status: DomainResponseDtoStatus + + mx_record_configured: Annotated[bool, pydantic.Field(alias="mxRecordConfigured")] + + environment_id: Annotated[str, pydantic.Field(alias="_environmentId")] + + organization_id: Annotated[str, pydantic.Field(alias="_organizationId")] + + created_at: Annotated[str, pydantic.Field(alias="createdAt")] + + updated_at: Annotated[str, pydantic.Field(alias="updatedAt")] + + dns_provider: Annotated[Optional[str], pydantic.Field(alias="dnsProvider")] = None + + expected_dns_records: Annotated[ + Optional[List[ExpectedDNSRecordDto]], pydantic.Field(alias="expectedDnsRecords") + ] = None + + data: Optional[Dict[str, str]] = None + r"""String key-value metadata (max 10 keys, 500 characters total when set via API).""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["dnsProvider", "expectedDnsRecords", "data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + DomainResponseDto.model_rebuild() +except NameError: + pass diff --git a/src/novu_py/models/domainroutedto.py b/src/novu_py/models/domainroutedto.py new file mode 100644 index 00000000..c54dbd0e --- /dev/null +++ b/src/novu_py/models/domainroutedto.py @@ -0,0 +1,59 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from novu_py.types import BaseModel, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainRouteDtoType(str, Enum): + AGENT = "agent" + WEBHOOK = "webhook" + + +class DomainRouteDtoTypedDict(TypedDict): + address: str + r"""Inbox address local part (e.g. \"support\", \"*\")""" + type: DomainRouteDtoType + agent_id: NotRequired[str] + r"""Agent identifier; required when type is agent, unused for webhook""" + data: NotRequired[Dict[str, str]] + r"""Optional string key-value metadata (max 10 keys, 500 characters total for keys+values).""" + + +class DomainRouteDto(BaseModel): + address: str + r"""Inbox address local part (e.g. \"support\", \"*\")""" + + type: DomainRouteDtoType + + agent_id: Annotated[Optional[str], pydantic.Field(alias="agentId")] = None + r"""Agent identifier; required when type is agent, unused for webhook""" + + data: Optional[Dict[str, str]] = None + r"""Optional string key-value metadata (max 10 keys, 500 characters total for keys+values).""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["agentId", "data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + DomainRouteDto.model_rebuild() +except NameError: + pass diff --git a/src/novu_py/models/domainrouteresponsedto.py b/src/novu_py/models/domainrouteresponsedto.py new file mode 100644 index 00000000..00fa0bed --- /dev/null +++ b/src/novu_py/models/domainrouteresponsedto.py @@ -0,0 +1,75 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from novu_py.types import BaseModel, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainRouteResponseDtoType(str, Enum): + AGENT = "agent" + WEBHOOK = "webhook" + + +class DomainRouteResponseDtoTypedDict(TypedDict): + id: str + domain_id: str + address: str + type: DomainRouteResponseDtoType + environment_id: str + organization_id: str + created_at: str + updated_at: str + agent_id: NotRequired[str] + r"""Internal id of the destination agent. Only present for agent routes.""" + data: NotRequired[Dict[str, str]] + r"""String key-value metadata (max 10 keys, 500 characters total when set via API).""" + + +class DomainRouteResponseDto(BaseModel): + id: Annotated[str, pydantic.Field(alias="_id")] + + domain_id: Annotated[str, pydantic.Field(alias="_domainId")] + + address: str + + type: DomainRouteResponseDtoType + + environment_id: Annotated[str, pydantic.Field(alias="_environmentId")] + + organization_id: Annotated[str, pydantic.Field(alias="_organizationId")] + + created_at: Annotated[str, pydantic.Field(alias="createdAt")] + + updated_at: Annotated[str, pydantic.Field(alias="updatedAt")] + + agent_id: Annotated[Optional[str], pydantic.Field(alias="agentId")] = None + r"""Internal id of the destination agent. Only present for agent routes.""" + + data: Optional[Dict[str, str]] = None + r"""String key-value metadata (max 10 keys, 500 characters total when set via API).""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["agentId", "data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + DomainRouteResponseDto.model_rebuild() +except NameError: + pass diff --git a/src/novu_py/models/domainscontroller_createdomainop.py b/src/novu_py/models/domainscontroller_createdomainop.py new file mode 100644 index 00000000..b7720c77 --- /dev/null +++ b/src/novu_py/models/domainscontroller_createdomainop.py @@ -0,0 +1,58 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .createdomaindto import CreateDomainDto, CreateDomainDtoTypedDict +from .domainresponsedto import DomainResponseDto, DomainResponseDtoTypedDict +from novu_py.types import BaseModel, UNSET_SENTINEL +from novu_py.utils import FieldMetadata, HeaderMetadata, RequestMetadata +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainsControllerCreateDomainRequestTypedDict(TypedDict): + create_domain_dto: CreateDomainDtoTypedDict + idempotency_key: NotRequired[str] + r"""A header for idempotency purposes""" + + +class DomainsControllerCreateDomainRequest(BaseModel): + create_domain_dto: Annotated[ + CreateDomainDto, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + idempotency_key: Annotated[ + Optional[str], + pydantic.Field(alias="idempotency-key"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""A header for idempotency purposes""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["idempotency-key"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class DomainsControllerCreateDomainResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: DomainResponseDtoTypedDict + + +class DomainsControllerCreateDomainResponse(BaseModel): + headers: Dict[str, List[str]] + + result: DomainResponseDto diff --git a/src/novu_py/models/domainscontroller_createdomainrouteop.py b/src/novu_py/models/domainscontroller_createdomainrouteop.py new file mode 100644 index 00000000..6129ff5d --- /dev/null +++ b/src/novu_py/models/domainscontroller_createdomainrouteop.py @@ -0,0 +1,71 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .domainroutedto import DomainRouteDto, DomainRouteDtoTypedDict +from .domainrouteresponsedto import ( + DomainRouteResponseDto, + DomainRouteResponseDtoTypedDict, +) +from novu_py.types import BaseModel, UNSET_SENTINEL +from novu_py.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainsControllerCreateDomainRouteRequestTypedDict(TypedDict): + domain: str + domain_route_dto: DomainRouteDtoTypedDict + idempotency_key: NotRequired[str] + r"""A header for idempotency purposes""" + + +class DomainsControllerCreateDomainRouteRequest(BaseModel): + domain: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + domain_route_dto: Annotated[ + DomainRouteDto, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + idempotency_key: Annotated[ + Optional[str], + pydantic.Field(alias="idempotency-key"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""A header for idempotency purposes""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["idempotency-key"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class DomainsControllerCreateDomainRouteResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: DomainRouteResponseDtoTypedDict + + +class DomainsControllerCreateDomainRouteResponse(BaseModel): + headers: Dict[str, List[str]] + + result: DomainRouteResponseDto diff --git a/src/novu_py/models/domainscontroller_deletedomainop.py b/src/novu_py/models/domainscontroller_deletedomainop.py new file mode 100644 index 00000000..5b7a8520 --- /dev/null +++ b/src/novu_py/models/domainscontroller_deletedomainop.py @@ -0,0 +1,52 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from novu_py.types import BaseModel, UNSET_SENTINEL +from novu_py.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainsControllerDeleteDomainRequestTypedDict(TypedDict): + domain: str + idempotency_key: NotRequired[str] + r"""A header for idempotency purposes""" + + +class DomainsControllerDeleteDomainRequest(BaseModel): + domain: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + idempotency_key: Annotated[ + Optional[str], + pydantic.Field(alias="idempotency-key"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""A header for idempotency purposes""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["idempotency-key"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class DomainsControllerDeleteDomainResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + + +class DomainsControllerDeleteDomainResponse(BaseModel): + headers: Dict[str, List[str]] diff --git a/src/novu_py/models/domainscontroller_deletedomainrouteop.py b/src/novu_py/models/domainscontroller_deletedomainrouteop.py new file mode 100644 index 00000000..0821402d --- /dev/null +++ b/src/novu_py/models/domainscontroller_deletedomainrouteop.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from novu_py.types import BaseModel, UNSET_SENTINEL +from novu_py.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainsControllerDeleteDomainRouteRequestTypedDict(TypedDict): + domain: str + address: str + idempotency_key: NotRequired[str] + r"""A header for idempotency purposes""" + + +class DomainsControllerDeleteDomainRouteRequest(BaseModel): + domain: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + address: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + idempotency_key: Annotated[ + Optional[str], + pydantic.Field(alias="idempotency-key"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""A header for idempotency purposes""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["idempotency-key"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class DomainsControllerDeleteDomainRouteResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + + +class DomainsControllerDeleteDomainRouteResponse(BaseModel): + headers: Dict[str, List[str]] diff --git a/src/novu_py/models/domainscontroller_diagnosedomainop.py b/src/novu_py/models/domainscontroller_diagnosedomainop.py new file mode 100644 index 00000000..9b46e4d8 --- /dev/null +++ b/src/novu_py/models/domainscontroller_diagnosedomainop.py @@ -0,0 +1,59 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .diagnosedomainresponsedto import ( + DiagnoseDomainResponseDto, + DiagnoseDomainResponseDtoTypedDict, +) +from novu_py.types import BaseModel, UNSET_SENTINEL +from novu_py.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainsControllerDiagnoseDomainRequestTypedDict(TypedDict): + domain: str + idempotency_key: NotRequired[str] + r"""A header for idempotency purposes""" + + +class DomainsControllerDiagnoseDomainRequest(BaseModel): + domain: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + idempotency_key: Annotated[ + Optional[str], + pydantic.Field(alias="idempotency-key"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""A header for idempotency purposes""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["idempotency-key"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class DomainsControllerDiagnoseDomainResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: DiagnoseDomainResponseDtoTypedDict + + +class DomainsControllerDiagnoseDomainResponse(BaseModel): + headers: Dict[str, List[str]] + + result: DiagnoseDomainResponseDto diff --git a/src/novu_py/models/domainscontroller_getdomainautoconfigureop.py b/src/novu_py/models/domainscontroller_getdomainautoconfigureop.py new file mode 100644 index 00000000..62cbc587 --- /dev/null +++ b/src/novu_py/models/domainscontroller_getdomainautoconfigureop.py @@ -0,0 +1,59 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .domainconnectstatusresponsedto import ( + DomainConnectStatusResponseDto, + DomainConnectStatusResponseDtoTypedDict, +) +from novu_py.types import BaseModel, UNSET_SENTINEL +from novu_py.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainsControllerGetDomainAutoConfigureRequestTypedDict(TypedDict): + domain: str + idempotency_key: NotRequired[str] + r"""A header for idempotency purposes""" + + +class DomainsControllerGetDomainAutoConfigureRequest(BaseModel): + domain: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + idempotency_key: Annotated[ + Optional[str], + pydantic.Field(alias="idempotency-key"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""A header for idempotency purposes""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["idempotency-key"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class DomainsControllerGetDomainAutoConfigureResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: DomainConnectStatusResponseDtoTypedDict + + +class DomainsControllerGetDomainAutoConfigureResponse(BaseModel): + headers: Dict[str, List[str]] + + result: DomainConnectStatusResponseDto diff --git a/src/novu_py/models/domainscontroller_getdomainop.py b/src/novu_py/models/domainscontroller_getdomainop.py new file mode 100644 index 00000000..54357522 --- /dev/null +++ b/src/novu_py/models/domainscontroller_getdomainop.py @@ -0,0 +1,56 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .domainresponsedto import DomainResponseDto, DomainResponseDtoTypedDict +from novu_py.types import BaseModel, UNSET_SENTINEL +from novu_py.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainsControllerGetDomainRequestTypedDict(TypedDict): + domain: str + idempotency_key: NotRequired[str] + r"""A header for idempotency purposes""" + + +class DomainsControllerGetDomainRequest(BaseModel): + domain: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + idempotency_key: Annotated[ + Optional[str], + pydantic.Field(alias="idempotency-key"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""A header for idempotency purposes""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["idempotency-key"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class DomainsControllerGetDomainResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: DomainResponseDtoTypedDict + + +class DomainsControllerGetDomainResponse(BaseModel): + headers: Dict[str, List[str]] + + result: DomainResponseDto diff --git a/src/novu_py/models/domainscontroller_getdomainrouteop.py b/src/novu_py/models/domainscontroller_getdomainrouteop.py new file mode 100644 index 00000000..fb210bfe --- /dev/null +++ b/src/novu_py/models/domainscontroller_getdomainrouteop.py @@ -0,0 +1,64 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .domainrouteresponsedto import ( + DomainRouteResponseDto, + DomainRouteResponseDtoTypedDict, +) +from novu_py.types import BaseModel, UNSET_SENTINEL +from novu_py.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainsControllerGetDomainRouteRequestTypedDict(TypedDict): + domain: str + address: str + idempotency_key: NotRequired[str] + r"""A header for idempotency purposes""" + + +class DomainsControllerGetDomainRouteRequest(BaseModel): + domain: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + address: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + idempotency_key: Annotated[ + Optional[str], + pydantic.Field(alias="idempotency-key"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""A header for idempotency purposes""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["idempotency-key"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class DomainsControllerGetDomainRouteResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: DomainRouteResponseDtoTypedDict + + +class DomainsControllerGetDomainRouteResponse(BaseModel): + headers: Dict[str, List[str]] + + result: DomainRouteResponseDto diff --git a/src/novu_py/models/domainscontroller_listdomainroutesop.py b/src/novu_py/models/domainscontroller_listdomainroutesop.py new file mode 100644 index 00000000..50b590bf --- /dev/null +++ b/src/novu_py/models/domainscontroller_listdomainroutesop.py @@ -0,0 +1,145 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .listdomainroutesresponsedto import ( + ListDomainRoutesResponseDto, + ListDomainRoutesResponseDtoTypedDict, +) +from enum import Enum +from novu_py.types import BaseModel, UNSET_SENTINEL +from novu_py.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainsControllerListDomainRoutesQueryParamOrderDirection(str, Enum): + r"""Direction of sorting""" + + ASC = "ASC" + DESC = "DESC" + + +class DomainsControllerListDomainRoutesRequestTypedDict(TypedDict): + domain: str + after: NotRequired[str] + r"""Cursor for pagination indicating the starting point after which to fetch results.""" + before: NotRequired[str] + r"""Cursor for pagination indicating the ending point before which to fetch results.""" + limit: NotRequired[float] + r"""Limit the number of items to return""" + order_direction: NotRequired[ + DomainsControllerListDomainRoutesQueryParamOrderDirection + ] + r"""Direction of sorting""" + order_by: NotRequired[str] + r"""Field to order by""" + include_cursor: NotRequired[bool] + r"""Include cursor item in response""" + agent_id: NotRequired[str] + r"""Agent identifier to filter routes by.""" + idempotency_key: NotRequired[str] + r"""A header for idempotency purposes""" + + +class DomainsControllerListDomainRoutesRequest(BaseModel): + domain: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + after: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Cursor for pagination indicating the starting point after which to fetch results.""" + + before: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Cursor for pagination indicating the ending point before which to fetch results.""" + + limit: Annotated[ + Optional[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Limit the number of items to return""" + + order_direction: Annotated[ + Optional[DomainsControllerListDomainRoutesQueryParamOrderDirection], + pydantic.Field(alias="orderDirection"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Direction of sorting""" + + order_by: Annotated[ + Optional[str], + pydantic.Field(alias="orderBy"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Field to order by""" + + include_cursor: Annotated[ + Optional[bool], + pydantic.Field(alias="includeCursor"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Include cursor item in response""" + + agent_id: Annotated[ + Optional[str], + pydantic.Field(alias="agentId"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Agent identifier to filter routes by.""" + + idempotency_key: Annotated[ + Optional[str], + pydantic.Field(alias="idempotency-key"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""A header for idempotency purposes""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "after", + "before", + "limit", + "orderDirection", + "orderBy", + "includeCursor", + "agentId", + "idempotency-key", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class DomainsControllerListDomainRoutesResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: ListDomainRoutesResponseDtoTypedDict + + +class DomainsControllerListDomainRoutesResponse(BaseModel): + headers: Dict[str, List[str]] + + result: ListDomainRoutesResponseDto diff --git a/src/novu_py/models/domainscontroller_listdomainsop.py b/src/novu_py/models/domainscontroller_listdomainsop.py new file mode 100644 index 00000000..ebd97a10 --- /dev/null +++ b/src/novu_py/models/domainscontroller_listdomainsop.py @@ -0,0 +1,132 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .listdomainsresponsedto import ( + ListDomainsResponseDto, + ListDomainsResponseDtoTypedDict, +) +from enum import Enum +from novu_py.types import BaseModel, UNSET_SENTINEL +from novu_py.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainsControllerListDomainsQueryParamOrderDirection(str, Enum): + r"""Direction of sorting""" + + ASC = "ASC" + DESC = "DESC" + + +class DomainsControllerListDomainsRequestTypedDict(TypedDict): + after: NotRequired[str] + r"""Cursor for pagination indicating the starting point after which to fetch results.""" + before: NotRequired[str] + r"""Cursor for pagination indicating the ending point before which to fetch results.""" + limit: NotRequired[float] + r"""Limit the number of items to return""" + order_direction: NotRequired[DomainsControllerListDomainsQueryParamOrderDirection] + r"""Direction of sorting""" + order_by: NotRequired[str] + r"""Field to order by""" + include_cursor: NotRequired[bool] + r"""Include cursor item in response""" + name: NotRequired[str] + r"""Domain name to filter results by.""" + idempotency_key: NotRequired[str] + r"""A header for idempotency purposes""" + + +class DomainsControllerListDomainsRequest(BaseModel): + after: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Cursor for pagination indicating the starting point after which to fetch results.""" + + before: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Cursor for pagination indicating the ending point before which to fetch results.""" + + limit: Annotated[ + Optional[float], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Limit the number of items to return""" + + order_direction: Annotated[ + Optional[DomainsControllerListDomainsQueryParamOrderDirection], + pydantic.Field(alias="orderDirection"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Direction of sorting""" + + order_by: Annotated[ + Optional[str], + pydantic.Field(alias="orderBy"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Field to order by""" + + include_cursor: Annotated[ + Optional[bool], + pydantic.Field(alias="includeCursor"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Include cursor item in response""" + + name: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Domain name to filter results by.""" + + idempotency_key: Annotated[ + Optional[str], + pydantic.Field(alias="idempotency-key"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""A header for idempotency purposes""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "after", + "before", + "limit", + "orderDirection", + "orderBy", + "includeCursor", + "name", + "idempotency-key", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class DomainsControllerListDomainsResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: ListDomainsResponseDtoTypedDict + + +class DomainsControllerListDomainsResponse(BaseModel): + headers: Dict[str, List[str]] + + result: ListDomainsResponseDto diff --git a/src/novu_py/models/domainscontroller_startdomainautoconfigureop.py b/src/novu_py/models/domainscontroller_startdomainautoconfigureop.py new file mode 100644 index 00000000..cd4696ff --- /dev/null +++ b/src/novu_py/models/domainscontroller_startdomainautoconfigureop.py @@ -0,0 +1,74 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .createdomainconnectapplyurldto import ( + CreateDomainConnectApplyURLDto, + CreateDomainConnectApplyURLDtoTypedDict, +) +from .domainconnectapplyurlresponsedto import ( + DomainConnectApplyURLResponseDto, + DomainConnectApplyURLResponseDtoTypedDict, +) +from novu_py.types import BaseModel, UNSET_SENTINEL +from novu_py.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainsControllerStartDomainAutoConfigureRequestTypedDict(TypedDict): + domain: str + create_domain_connect_apply_url_dto: CreateDomainConnectApplyURLDtoTypedDict + idempotency_key: NotRequired[str] + r"""A header for idempotency purposes""" + + +class DomainsControllerStartDomainAutoConfigureRequest(BaseModel): + domain: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + create_domain_connect_apply_url_dto: Annotated[ + CreateDomainConnectApplyURLDto, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + idempotency_key: Annotated[ + Optional[str], + pydantic.Field(alias="idempotency-key"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""A header for idempotency purposes""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["idempotency-key"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class DomainsControllerStartDomainAutoConfigureResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: DomainConnectApplyURLResponseDtoTypedDict + + +class DomainsControllerStartDomainAutoConfigureResponse(BaseModel): + headers: Dict[str, List[str]] + + result: DomainConnectApplyURLResponseDto diff --git a/src/novu_py/models/domainscontroller_testdomainrouteop.py b/src/novu_py/models/domainscontroller_testdomainrouteop.py new file mode 100644 index 00000000..bee6a234 --- /dev/null +++ b/src/novu_py/models/domainscontroller_testdomainrouteop.py @@ -0,0 +1,76 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .testdomainroutedto import TestDomainRouteDto, TestDomainRouteDtoTypedDict +from .testdomainrouteresponsedto import ( + TestDomainRouteResponseDto, + TestDomainRouteResponseDtoTypedDict, +) +from novu_py.types import BaseModel, UNSET_SENTINEL +from novu_py.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainsControllerTestDomainRouteRequestTypedDict(TypedDict): + domain: str + address: str + test_domain_route_dto: TestDomainRouteDtoTypedDict + idempotency_key: NotRequired[str] + r"""A header for idempotency purposes""" + + +class DomainsControllerTestDomainRouteRequest(BaseModel): + domain: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + address: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + test_domain_route_dto: Annotated[ + TestDomainRouteDto, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + idempotency_key: Annotated[ + Optional[str], + pydantic.Field(alias="idempotency-key"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""A header for idempotency purposes""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["idempotency-key"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class DomainsControllerTestDomainRouteResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: TestDomainRouteResponseDtoTypedDict + + +class DomainsControllerTestDomainRouteResponse(BaseModel): + headers: Dict[str, List[str]] + + result: TestDomainRouteResponseDto diff --git a/src/novu_py/models/domainscontroller_updatedomainop.py b/src/novu_py/models/domainscontroller_updatedomainop.py new file mode 100644 index 00000000..4297be83 --- /dev/null +++ b/src/novu_py/models/domainscontroller_updatedomainop.py @@ -0,0 +1,68 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .domainresponsedto import DomainResponseDto, DomainResponseDtoTypedDict +from .updatedomaindto import UpdateDomainDto, UpdateDomainDtoTypedDict +from novu_py.types import BaseModel, UNSET_SENTINEL +from novu_py.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainsControllerUpdateDomainRequestTypedDict(TypedDict): + domain: str + update_domain_dto: UpdateDomainDtoTypedDict + idempotency_key: NotRequired[str] + r"""A header for idempotency purposes""" + + +class DomainsControllerUpdateDomainRequest(BaseModel): + domain: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + update_domain_dto: Annotated[ + UpdateDomainDto, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + idempotency_key: Annotated[ + Optional[str], + pydantic.Field(alias="idempotency-key"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""A header for idempotency purposes""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["idempotency-key"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class DomainsControllerUpdateDomainResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: DomainResponseDtoTypedDict + + +class DomainsControllerUpdateDomainResponse(BaseModel): + headers: Dict[str, List[str]] + + result: DomainResponseDto diff --git a/src/novu_py/models/domainscontroller_updatedomainrouteop.py b/src/novu_py/models/domainscontroller_updatedomainrouteop.py new file mode 100644 index 00000000..9dd4447e --- /dev/null +++ b/src/novu_py/models/domainscontroller_updatedomainrouteop.py @@ -0,0 +1,76 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .domainrouteresponsedto import ( + DomainRouteResponseDto, + DomainRouteResponseDtoTypedDict, +) +from .updatedomainroutedto import UpdateDomainRouteDto, UpdateDomainRouteDtoTypedDict +from novu_py.types import BaseModel, UNSET_SENTINEL +from novu_py.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + RequestMetadata, +) +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainsControllerUpdateDomainRouteRequestTypedDict(TypedDict): + domain: str + address: str + update_domain_route_dto: UpdateDomainRouteDtoTypedDict + idempotency_key: NotRequired[str] + r"""A header for idempotency purposes""" + + +class DomainsControllerUpdateDomainRouteRequest(BaseModel): + domain: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + address: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + update_domain_route_dto: Annotated[ + UpdateDomainRouteDto, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + idempotency_key: Annotated[ + Optional[str], + pydantic.Field(alias="idempotency-key"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""A header for idempotency purposes""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["idempotency-key"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class DomainsControllerUpdateDomainRouteResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: DomainRouteResponseDtoTypedDict + + +class DomainsControllerUpdateDomainRouteResponse(BaseModel): + headers: Dict[str, List[str]] + + result: DomainRouteResponseDto diff --git a/src/novu_py/models/domainscontroller_verifydomainop.py b/src/novu_py/models/domainscontroller_verifydomainop.py new file mode 100644 index 00000000..779b0ef1 --- /dev/null +++ b/src/novu_py/models/domainscontroller_verifydomainop.py @@ -0,0 +1,56 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .domainresponsedto import DomainResponseDto, DomainResponseDtoTypedDict +from novu_py.types import BaseModel, UNSET_SENTINEL +from novu_py.utils import FieldMetadata, HeaderMetadata, PathParamMetadata +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainsControllerVerifyDomainRequestTypedDict(TypedDict): + domain: str + idempotency_key: NotRequired[str] + r"""A header for idempotency purposes""" + + +class DomainsControllerVerifyDomainRequest(BaseModel): + domain: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + idempotency_key: Annotated[ + Optional[str], + pydantic.Field(alias="idempotency-key"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""A header for idempotency purposes""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["idempotency-key"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class DomainsControllerVerifyDomainResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: DomainResponseDtoTypedDict + + +class DomainsControllerVerifyDomainResponse(BaseModel): + headers: Dict[str, List[str]] + + result: DomainResponseDto diff --git a/src/novu_py/models/duplicatelayoutdto.py b/src/novu_py/models/duplicatelayoutdto.py index 5648f587..690a6963 100644 --- a/src/novu_py/models/duplicatelayoutdto.py +++ b/src/novu_py/models/duplicatelayoutdto.py @@ -11,6 +11,8 @@ class DuplicateLayoutDtoTypedDict(TypedDict): name: str r"""Name of the layout""" + layout_id: NotRequired[str] + r"""Identifier for the duplicated layout. When omitted, it is derived from the name.""" is_translation_enabled: NotRequired[bool] r"""Enable or disable translations for this layout""" @@ -19,6 +21,9 @@ class DuplicateLayoutDto(BaseModel): name: str r"""Name of the layout""" + layout_id: Annotated[Optional[str], pydantic.Field(alias="layoutId")] = None + r"""Identifier for the duplicated layout. When omitted, it is derived from the name.""" + is_translation_enabled: Annotated[ Optional[bool], pydantic.Field(alias="isTranslationEnabled") ] = False @@ -26,7 +31,7 @@ class DuplicateLayoutDto(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["isTranslationEnabled"]) + optional_fields = set(["layoutId", "isTranslationEnabled"]) serialized = handler(self) m = {} diff --git a/src/novu_py/models/expecteddnsrecorddto.py b/src/novu_py/models/expecteddnsrecorddto.py new file mode 100644 index 00000000..59cdff32 --- /dev/null +++ b/src/novu_py/models/expecteddnsrecorddto.py @@ -0,0 +1,43 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from novu_py.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ExpectedDNSRecordDtoTypedDict(TypedDict): + type: str + name: str + content: str + ttl: str + priority: NotRequired[float] + + +class ExpectedDNSRecordDto(BaseModel): + type: str + + name: str + + content: str + + ttl: str + + priority: Optional[float] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["priority"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/novu_py/models/generatechatoauthurlrequestdto.py b/src/novu_py/models/generatechatoauthurlrequestdto.py index d8c4c0ff..e81c8af7 100644 --- a/src/novu_py/models/generatechatoauthurlrequestdto.py +++ b/src/novu_py/models/generatechatoauthurlrequestdto.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from enum import Enum from novu_py.types import BaseModel, UNSET_SENTINEL import pydantic from pydantic import model_serializer @@ -53,6 +54,20 @@ def serialize_model(self, handler): ) +class Mode(str, Enum): + r"""OAuth flow mode. Use \"connect\" (default) to create a workspace channel connection, or \"link_user\" to identify the subscriber's Slack user ID without creating a connection.""" + + CONNECT = "connect" + LINK_USER = "link_user" + + +class GenerateChatOauthURLRequestDtoConnectionMode(str, Enum): + r"""Connection mode that determines how the channel connection is scoped. Use \"subscriber\" (default) to associate the connection with a specific subscriber. Use \"shared\" to associate the connection with a context instead of a subscriber — subscriberId will not be stored on the connection.""" + + SUBSCRIBER = "subscriber" + SHARED = "shared" + + class GenerateChatOauthURLRequestDtoTypedDict(TypedDict): integration_identifier: str r"""Integration identifier""" @@ -63,6 +78,14 @@ class GenerateChatOauthURLRequestDtoTypedDict(TypedDict): context: NotRequired[Dict[str, GenerateChatOauthURLRequestDtoContextTypedDict]] scope: NotRequired[List[str]] r"""**Slack only**: OAuth scopes to request during authorization. These define the permissions your Slack integration will have. If not specified, default scopes will be used: chat:write, chat:write.public, channels:read, groups:read, users:read, users:read.email. **MS Teams**: This parameter is ignored. MS Teams uses admin consent with pre-configured permissions in Azure AD. Note: The generated OAuth URL expires after 5 minutes.""" + user_scope: NotRequired[List[str]] + r"""**Slack only, link_user mode**: User-level OAuth scopes to request during authorization. Used when mode is \"link_user\" to identify the Slack user via \"Sign in with Slack\". If not specified, defaults to: identity.basic.""" + mode: NotRequired[Mode] + r"""OAuth flow mode. Use \"connect\" (default) to create a workspace channel connection, or \"link_user\" to identify the subscriber's Slack user ID without creating a connection.""" + connection_mode: NotRequired[GenerateChatOauthURLRequestDtoConnectionMode] + r"""Connection mode that determines how the channel connection is scoped. Use \"subscriber\" (default) to associate the connection with a specific subscriber. Use \"shared\" to associate the connection with a context instead of a subscriber — subscriberId will not be stored on the connection.""" + auto_link_user: NotRequired[bool] + r"""When true, after the workspace/tenant connection is created the OAuth flow also links the subscriber who clicked \"Connect\" as a personal endpoint. For Slack, this uses the authed_user.id already returned by oauth.v2.access — no extra redirect. For MS Teams, this triggers a second OAuth redirect for delegated user-identity consent. Defaults to false when omitted; the SlackConnectButton and MsTeamsConnectButton SDK components default this to true.""" class GenerateChatOauthURLRequestDto(BaseModel): @@ -84,10 +107,36 @@ class GenerateChatOauthURLRequestDto(BaseModel): scope: Optional[List[str]] = None r"""**Slack only**: OAuth scopes to request during authorization. These define the permissions your Slack integration will have. If not specified, default scopes will be used: chat:write, chat:write.public, channels:read, groups:read, users:read, users:read.email. **MS Teams**: This parameter is ignored. MS Teams uses admin consent with pre-configured permissions in Azure AD. Note: The generated OAuth URL expires after 5 minutes.""" + user_scope: Annotated[Optional[List[str]], pydantic.Field(alias="userScope")] = None + r"""**Slack only, link_user mode**: User-level OAuth scopes to request during authorization. Used when mode is \"link_user\" to identify the Slack user via \"Sign in with Slack\". If not specified, defaults to: identity.basic.""" + + mode: Optional[Mode] = None + r"""OAuth flow mode. Use \"connect\" (default) to create a workspace channel connection, or \"link_user\" to identify the subscriber's Slack user ID without creating a connection.""" + + connection_mode: Annotated[ + Optional[GenerateChatOauthURLRequestDtoConnectionMode], + pydantic.Field(alias="connectionMode"), + ] = None + r"""Connection mode that determines how the channel connection is scoped. Use \"subscriber\" (default) to associate the connection with a specific subscriber. Use \"shared\" to associate the connection with a context instead of a subscriber — subscriberId will not be stored on the connection.""" + + auto_link_user: Annotated[Optional[bool], pydantic.Field(alias="autoLinkUser")] = ( + None + ) + r"""When true, after the workspace/tenant connection is created the OAuth flow also links the subscriber who clicked \"Connect\" as a personal endpoint. For Slack, this uses the authed_user.id already returned by oauth.v2.access — no extra redirect. For MS Teams, this triggers a second OAuth redirect for delegated user-identity consent. Defaults to false when omitted; the SlackConnectButton and MsTeamsConnectButton SDK components default this to true.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - ["subscriberId", "connectionIdentifier", "context", "scope"] + [ + "subscriberId", + "connectionIdentifier", + "context", + "scope", + "userScope", + "mode", + "connectionMode", + "autoLinkUser", + ] ) serialized = handler(self) m = {} diff --git a/src/novu_py/models/generateconnectoauthurlrequestdto.py b/src/novu_py/models/generateconnectoauthurlrequestdto.py new file mode 100644 index 00000000..3feb758a --- /dev/null +++ b/src/novu_py/models/generateconnectoauthurlrequestdto.py @@ -0,0 +1,139 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from novu_py.types import BaseModel, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Any, Dict, List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +class GenerateConnectOauthURLRequestDtoContext2TypedDict(TypedDict): + r"""Rich context object with id and optional data""" + + id: str + data: NotRequired[Dict[str, Any]] + r"""Optional additional context data""" + + +class GenerateConnectOauthURLRequestDtoContext2(BaseModel): + r"""Rich context object with id and optional data""" + + id: str + + data: Optional[Dict[str, Any]] = None + r"""Optional additional context data""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +GenerateConnectOauthURLRequestDtoContextTypedDict = TypeAliasType( + "GenerateConnectOauthURLRequestDtoContextTypedDict", + Union[GenerateConnectOauthURLRequestDtoContext2TypedDict, str], +) + + +GenerateConnectOauthURLRequestDtoContext = TypeAliasType( + "GenerateConnectOauthURLRequestDtoContext", + Union[GenerateConnectOauthURLRequestDtoContext2, str], +) + + +class GenerateConnectOauthURLRequestDtoConnectionMode(str, Enum): + r"""Connection mode that determines how the channel connection is scoped. \"subscriber\" (default) associates the connection with a specific subscriber. \"shared\" associates the connection with a context instead of a subscriber.""" + + SUBSCRIBER = "subscriber" + SHARED = "shared" + + +class GenerateConnectOauthURLRequestDtoTypedDict(TypedDict): + integration_identifier: str + r"""Integration identifier""" + subscriber_id: NotRequired[str] + r"""The subscriber ID to associate with the channel connection. For Slack: optional for workspace connections (required only for incoming-webhook scope). For MS Teams: optional. Admin consent is tenant-wide.""" + connection_identifier: NotRequired[str] + r"""Identifier of the channel connection that will be created. Generated automatically if not provided.""" + context: NotRequired[Dict[str, GenerateConnectOauthURLRequestDtoContextTypedDict]] + scope: NotRequired[List[str]] + r"""**Slack only**: OAuth scopes to request during authorization. If not specified, default scopes will be used: chat:write, chat:write.public, channels:read, groups:read, users:read, users:read.email. **MS Teams**: ignored — uses admin consent with pre-configured Azure AD permissions.""" + connection_mode: NotRequired[GenerateConnectOauthURLRequestDtoConnectionMode] + r"""Connection mode that determines how the channel connection is scoped. \"subscriber\" (default) associates the connection with a specific subscriber. \"shared\" associates the connection with a context instead of a subscriber.""" + auto_link_user: NotRequired[bool] + r"""When true (default when connectionMode is \"subscriber\"), after the workspace/tenant connection is created the OAuth flow also links the subscriber who clicked \"Connect\" as a personal endpoint. For Slack, uses the authed_user.id returned by oauth.v2.access — no extra redirect. For MS Teams, triggers a second OAuth redirect for delegated user-identity consent. Set to false to only create the workspace connection without linking the individual user.""" + + +class GenerateConnectOauthURLRequestDto(BaseModel): + integration_identifier: Annotated[ + str, pydantic.Field(alias="integrationIdentifier") + ] + r"""Integration identifier""" + + subscriber_id: Annotated[Optional[str], pydantic.Field(alias="subscriberId")] = None + r"""The subscriber ID to associate with the channel connection. For Slack: optional for workspace connections (required only for incoming-webhook scope). For MS Teams: optional. Admin consent is tenant-wide.""" + + connection_identifier: Annotated[ + Optional[str], pydantic.Field(alias="connectionIdentifier") + ] = None + r"""Identifier of the channel connection that will be created. Generated automatically if not provided.""" + + context: Optional[Dict[str, GenerateConnectOauthURLRequestDtoContext]] = None + + scope: Optional[List[str]] = None + r"""**Slack only**: OAuth scopes to request during authorization. If not specified, default scopes will be used: chat:write, chat:write.public, channels:read, groups:read, users:read, users:read.email. **MS Teams**: ignored — uses admin consent with pre-configured Azure AD permissions.""" + + connection_mode: Annotated[ + Optional[GenerateConnectOauthURLRequestDtoConnectionMode], + pydantic.Field(alias="connectionMode"), + ] = None + r"""Connection mode that determines how the channel connection is scoped. \"subscriber\" (default) associates the connection with a specific subscriber. \"shared\" associates the connection with a context instead of a subscriber.""" + + auto_link_user: Annotated[Optional[bool], pydantic.Field(alias="autoLinkUser")] = ( + None + ) + r"""When true (default when connectionMode is \"subscriber\"), after the workspace/tenant connection is created the OAuth flow also links the subscriber who clicked \"Connect\" as a personal endpoint. For Slack, uses the authed_user.id returned by oauth.v2.access — no extra redirect. For MS Teams, triggers a second OAuth redirect for delegated user-identity consent. Set to false to only create the workspace connection without linking the individual user.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "subscriberId", + "connectionIdentifier", + "context", + "scope", + "connectionMode", + "autoLinkUser", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + GenerateConnectOauthURLRequestDto.model_rebuild() +except NameError: + pass diff --git a/src/novu_py/models/generatelinkuseroauthurlrequestdto.py b/src/novu_py/models/generatelinkuseroauthurlrequestdto.py new file mode 100644 index 00000000..587778e3 --- /dev/null +++ b/src/novu_py/models/generatelinkuseroauthurlrequestdto.py @@ -0,0 +1,107 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from novu_py.types import BaseModel, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Any, Dict, List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +class GenerateLinkUserOauthURLRequestDtoContext2TypedDict(TypedDict): + r"""Rich context object with id and optional data""" + + id: str + data: NotRequired[Dict[str, Any]] + r"""Optional additional context data""" + + +class GenerateLinkUserOauthURLRequestDtoContext2(BaseModel): + r"""Rich context object with id and optional data""" + + id: str + + data: Optional[Dict[str, Any]] = None + r"""Optional additional context data""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +GenerateLinkUserOauthURLRequestDtoContextTypedDict = TypeAliasType( + "GenerateLinkUserOauthURLRequestDtoContextTypedDict", + Union[GenerateLinkUserOauthURLRequestDtoContext2TypedDict, str], +) + + +GenerateLinkUserOauthURLRequestDtoContext = TypeAliasType( + "GenerateLinkUserOauthURLRequestDtoContext", + Union[GenerateLinkUserOauthURLRequestDtoContext2, str], +) + + +class GenerateLinkUserOauthURLRequestDtoTypedDict(TypedDict): + subscriber_id: str + r"""The subscriber ID to link to their chat identity. Required — this operation always binds a specific subscriber to a user identity in the chat provider.""" + integration_identifier: str + r"""Integration identifier""" + connection_identifier: NotRequired[str] + r"""Identifier of the existing channel connection to associate this user endpoint with. Generated automatically if not provided.""" + context: NotRequired[Dict[str, GenerateLinkUserOauthURLRequestDtoContextTypedDict]] + user_scope: NotRequired[List[str]] + r"""**Slack only**: User-level OAuth scopes for \"Sign in with Slack\". Defaults to: identity.basic. **MS Teams**: ignored — uses delegated OpenID scopes (openid, profile, User.Read).""" + + +class GenerateLinkUserOauthURLRequestDto(BaseModel): + subscriber_id: Annotated[str, pydantic.Field(alias="subscriberId")] + r"""The subscriber ID to link to their chat identity. Required — this operation always binds a specific subscriber to a user identity in the chat provider.""" + + integration_identifier: Annotated[ + str, pydantic.Field(alias="integrationIdentifier") + ] + r"""Integration identifier""" + + connection_identifier: Annotated[ + Optional[str], pydantic.Field(alias="connectionIdentifier") + ] = None + r"""Identifier of the existing channel connection to associate this user endpoint with. Generated automatically if not provided.""" + + context: Optional[Dict[str, GenerateLinkUserOauthURLRequestDtoContext]] = None + + user_scope: Annotated[Optional[List[str]], pydantic.Field(alias="userScope")] = None + r"""**Slack only**: User-level OAuth scopes for \"Sign in with Slack\". Defaults to: identity.basic. **MS Teams**: ignored — uses delegated OpenID scopes (openid, profile, User.Read).""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["connectionIdentifier", "context", "userScope"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + GenerateLinkUserOauthURLRequestDto.model_rebuild() +except NameError: + pass diff --git a/src/novu_py/models/getchannelconnectionresponsedto.py b/src/novu_py/models/getchannelconnectionresponsedto.py index 4c375984..e7721980 100644 --- a/src/novu_py/models/getchannelconnectionresponsedto.py +++ b/src/novu_py/models/getchannelconnectionresponsedto.py @@ -45,6 +45,7 @@ class ProviderID(str, Enum): SPARKPOST = "sparkpost" EMAIL_WEBHOOK = "email-webhook" BRAZE = "braze" + NOVU_EMAIL_AGENT = "novu-email-agent" NEXMO = "nexmo" PLIVO = "plivo" SMS77 = "sms77" diff --git a/src/novu_py/models/getchannelendpointresponsedto.py b/src/novu_py/models/getchannelendpointresponsedto.py index af217d6e..2a81217e 100644 --- a/src/novu_py/models/getchannelendpointresponsedto.py +++ b/src/novu_py/models/getchannelendpointresponsedto.py @@ -50,6 +50,7 @@ class GetChannelEndpointResponseDtoProviderID(str, Enum): SPARKPOST = "sparkpost" EMAIL_WEBHOOK = "email-webhook" BRAZE = "braze" + NOVU_EMAIL_AGENT = "novu-email-agent" NEXMO = "nexmo" PLIVO = "plivo" SMS77 = "sms77" diff --git a/src/novu_py/models/httprequestcontroldto.py b/src/novu_py/models/httprequestcontroldto.py index c8adc67b..9ae11e3e 100644 --- a/src/novu_py/models/httprequestcontroldto.py +++ b/src/novu_py/models/httprequestcontroldto.py @@ -9,8 +9,18 @@ from novu_py.types import BaseModel, UNSET_SENTINEL import pydantic from pydantic import model_serializer -from typing import Any, Dict, List, Optional -from typing_extensions import Annotated, NotRequired, TypedDict +from typing import Any, Dict, List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +BodyTypedDict = TypeAliasType( + "BodyTypedDict", Union[str, List[HTTPRequestKeyValuePairDtoTypedDict]] +) +r"""Request body as a raw JSON string. Key-value arrays are supported for legacy workflows.""" + + +Body = TypeAliasType("Body", Union[str, List[HTTPRequestKeyValuePairDto]]) +r"""Request body as a raw JSON string. Key-value arrays are supported for legacy workflows.""" class HTTPRequestControlDtoTypedDict(TypedDict): @@ -20,8 +30,8 @@ class HTTPRequestControlDtoTypedDict(TypedDict): r"""Target URL for the HTTP request""" headers: NotRequired[List[HTTPRequestKeyValuePairDtoTypedDict]] r"""Request headers as key-value pairs""" - body: NotRequired[List[HTTPRequestKeyValuePairDtoTypedDict]] - r"""Request body as key-value pairs""" + body: NotRequired[BodyTypedDict] + r"""Request body as a raw JSON string. Key-value arrays are supported for legacy workflows.""" response_body_schema: NotRequired[Dict[str, Any]] r"""JSON schema to validate response body against""" enforce_schema_validation: NotRequired[bool] @@ -40,8 +50,8 @@ class HTTPRequestControlDto(BaseModel): headers: Optional[List[HTTPRequestKeyValuePairDto]] = None r"""Request headers as key-value pairs""" - body: Optional[List[HTTPRequestKeyValuePairDto]] = None - r"""Request body as key-value pairs""" + body: Optional[Body] = None + r"""Request body as a raw JSON string. Key-value arrays are supported for legacy workflows.""" response_body_schema: Annotated[ Optional[Dict[str, Any]], pydantic.Field(alias="responseBodySchema") diff --git a/src/novu_py/models/httprequeststepresponsedto.py b/src/novu_py/models/httprequeststepresponsedto.py index 78b85b12..26d2716b 100644 --- a/src/novu_py/models/httprequeststepresponsedto.py +++ b/src/novu_py/models/httprequeststepresponsedto.py @@ -16,8 +16,21 @@ from novu_py.types import BaseModel, UNSET_SENTINEL import pydantic from pydantic import ConfigDict, model_serializer -from typing import Any, Dict, List, Optional -from typing_extensions import Annotated, NotRequired, TypedDict +from typing import Any, Dict, List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +HTTPRequestStepResponseDtoBodyTypedDict = TypeAliasType( + "HTTPRequestStepResponseDtoBodyTypedDict", + Union[str, List[HTTPRequestKeyValuePairDtoTypedDict]], +) +r"""Request body as a raw JSON string. Key-value arrays are supported for legacy workflows.""" + + +HTTPRequestStepResponseDtoBody = TypeAliasType( + "HTTPRequestStepResponseDtoBody", Union[str, List[HTTPRequestKeyValuePairDto]] +) +r"""Request body as a raw JSON string. Key-value arrays are supported for legacy workflows.""" class HTTPRequestStepResponseDtoControlValuesTypedDict(TypedDict): @@ -29,8 +42,8 @@ class HTTPRequestStepResponseDtoControlValuesTypedDict(TypedDict): r"""Target URL for the HTTP request""" headers: NotRequired[List[HTTPRequestKeyValuePairDtoTypedDict]] r"""Request headers as key-value pairs""" - body: NotRequired[List[HTTPRequestKeyValuePairDtoTypedDict]] - r"""Request body as key-value pairs""" + body: NotRequired[HTTPRequestStepResponseDtoBodyTypedDict] + r"""Request body as a raw JSON string. Key-value arrays are supported for legacy workflows.""" response_body_schema: NotRequired[Dict[str, Any]] r"""JSON schema to validate response body against""" enforce_schema_validation: NotRequired[bool] @@ -56,8 +69,8 @@ class HTTPRequestStepResponseDtoControlValues(BaseModel): headers: Optional[List[HTTPRequestKeyValuePairDto]] = None r"""Request headers as key-value pairs""" - body: Optional[List[HTTPRequestKeyValuePairDto]] = None - r"""Request body as key-value pairs""" + body: Optional[HTTPRequestStepResponseDtoBody] = None + r"""Request body as a raw JSON string. Key-value arrays are supported for legacy workflows.""" response_body_schema: Annotated[ Optional[Dict[str, Any]], pydantic.Field(alias="responseBodySchema") diff --git a/src/novu_py/models/integrationscontroller_generateconnectoauthurlop.py b/src/novu_py/models/integrationscontroller_generateconnectoauthurlop.py new file mode 100644 index 00000000..9a61a3e8 --- /dev/null +++ b/src/novu_py/models/integrationscontroller_generateconnectoauthurlop.py @@ -0,0 +1,64 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .generatechatoauthurlresponsedto import ( + GenerateChatOAuthURLResponseDto, + GenerateChatOAuthURLResponseDtoTypedDict, +) +from .generateconnectoauthurlrequestdto import ( + GenerateConnectOauthURLRequestDto, + GenerateConnectOauthURLRequestDtoTypedDict, +) +from novu_py.types import BaseModel, UNSET_SENTINEL +from novu_py.utils import FieldMetadata, HeaderMetadata, RequestMetadata +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class IntegrationsControllerGenerateConnectOAuthURLRequestTypedDict(TypedDict): + generate_connect_oauth_url_request_dto: GenerateConnectOauthURLRequestDtoTypedDict + idempotency_key: NotRequired[str] + r"""A header for idempotency purposes""" + + +class IntegrationsControllerGenerateConnectOAuthURLRequest(BaseModel): + generate_connect_oauth_url_request_dto: Annotated[ + GenerateConnectOauthURLRequestDto, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + idempotency_key: Annotated[ + Optional[str], + pydantic.Field(alias="idempotency-key"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""A header for idempotency purposes""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["idempotency-key"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class IntegrationsControllerGenerateConnectOAuthURLResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: GenerateChatOAuthURLResponseDtoTypedDict + + +class IntegrationsControllerGenerateConnectOAuthURLResponse(BaseModel): + headers: Dict[str, List[str]] + + result: GenerateChatOAuthURLResponseDto diff --git a/src/novu_py/models/integrationscontroller_generatelinkuseroauthurlop.py b/src/novu_py/models/integrationscontroller_generatelinkuseroauthurlop.py new file mode 100644 index 00000000..96e91555 --- /dev/null +++ b/src/novu_py/models/integrationscontroller_generatelinkuseroauthurlop.py @@ -0,0 +1,66 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .generatechatoauthurlresponsedto import ( + GenerateChatOAuthURLResponseDto, + GenerateChatOAuthURLResponseDtoTypedDict, +) +from .generatelinkuseroauthurlrequestdto import ( + GenerateLinkUserOauthURLRequestDto, + GenerateLinkUserOauthURLRequestDtoTypedDict, +) +from novu_py.types import BaseModel, UNSET_SENTINEL +from novu_py.utils import FieldMetadata, HeaderMetadata, RequestMetadata +import pydantic +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class IntegrationsControllerGenerateLinkUserOAuthURLRequestTypedDict(TypedDict): + generate_link_user_oauth_url_request_dto: ( + GenerateLinkUserOauthURLRequestDtoTypedDict + ) + idempotency_key: NotRequired[str] + r"""A header for idempotency purposes""" + + +class IntegrationsControllerGenerateLinkUserOAuthURLRequest(BaseModel): + generate_link_user_oauth_url_request_dto: Annotated[ + GenerateLinkUserOauthURLRequestDto, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + idempotency_key: Annotated[ + Optional[str], + pydantic.Field(alias="idempotency-key"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""A header for idempotency purposes""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["idempotency-key"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class IntegrationsControllerGenerateLinkUserOAuthURLResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: GenerateChatOAuthURLResponseDtoTypedDict + + +class IntegrationsControllerGenerateLinkUserOAuthURLResponse(BaseModel): + headers: Dict[str, List[str]] + + result: GenerateChatOAuthURLResponseDto diff --git a/src/novu_py/models/listdomainroutesresponsedto.py b/src/novu_py/models/listdomainroutesresponsedto.py new file mode 100644 index 00000000..f8693f42 --- /dev/null +++ b/src/novu_py/models/listdomainroutesresponsedto.py @@ -0,0 +1,62 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .domainrouteresponsedto import ( + DomainRouteResponseDto, + DomainRouteResponseDtoTypedDict, +) +from novu_py.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import List +from typing_extensions import Annotated, TypedDict + + +class ListDomainRoutesResponseDtoTypedDict(TypedDict): + data: List[DomainRouteResponseDtoTypedDict] + r"""List of returned domain routes""" + next: Nullable[str] + r"""The cursor for the next page of results, or null if there are no more pages.""" + previous: Nullable[str] + r"""The cursor for the previous page of results, or null if this is the first page.""" + total_count: float + r"""The total count of items (up to 50,000)""" + total_count_capped: bool + r"""Whether there are more than 50,000 results available""" + + +class ListDomainRoutesResponseDto(BaseModel): + data: List[DomainRouteResponseDto] + r"""List of returned domain routes""" + + next: Nullable[str] + r"""The cursor for the next page of results, or null if there are no more pages.""" + + previous: Nullable[str] + r"""The cursor for the previous page of results, or null if this is the first page.""" + + total_count: Annotated[float, pydantic.Field(alias="totalCount")] + r"""The total count of items (up to 50,000)""" + + total_count_capped: Annotated[bool, pydantic.Field(alias="totalCountCapped")] + r"""Whether there are more than 50,000 results available""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m + + +try: + ListDomainRoutesResponseDto.model_rebuild() +except NameError: + pass diff --git a/src/novu_py/models/listdomainsresponsedto.py b/src/novu_py/models/listdomainsresponsedto.py new file mode 100644 index 00000000..ced04dd1 --- /dev/null +++ b/src/novu_py/models/listdomainsresponsedto.py @@ -0,0 +1,59 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .domainresponsedto import DomainResponseDto, DomainResponseDtoTypedDict +from novu_py.types import BaseModel, Nullable, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import List +from typing_extensions import Annotated, TypedDict + + +class ListDomainsResponseDtoTypedDict(TypedDict): + data: List[DomainResponseDtoTypedDict] + r"""List of returned domains""" + next: Nullable[str] + r"""The cursor for the next page of results, or null if there are no more pages.""" + previous: Nullable[str] + r"""The cursor for the previous page of results, or null if this is the first page.""" + total_count: float + r"""The total count of items (up to 50,000)""" + total_count_capped: bool + r"""Whether there are more than 50,000 results available""" + + +class ListDomainsResponseDto(BaseModel): + data: List[DomainResponseDto] + r"""List of returned domains""" + + next: Nullable[str] + r"""The cursor for the next page of results, or null if there are no more pages.""" + + previous: Nullable[str] + r"""The cursor for the previous page of results, or null if this is the first page.""" + + total_count: Annotated[float, pydantic.Field(alias="totalCount")] + r"""The total count of items (up to 50,000)""" + + total_count_capped: Annotated[bool, pydantic.Field(alias="totalCountCapped")] + r"""Whether there are more than 50,000 results available""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m + + +try: + ListDomainsResponseDto.model_rebuild() +except NameError: + pass diff --git a/src/novu_py/models/providersidenum.py b/src/novu_py/models/providersidenum.py index 0296645a..94dbf33a 100644 --- a/src/novu_py/models/providersidenum.py +++ b/src/novu_py/models/providersidenum.py @@ -28,6 +28,7 @@ class ProvidersIDEnum(str, Enum): SPARKPOST = "sparkpost" EMAIL_WEBHOOK = "email-webhook" BRAZE = "braze" + NOVU_EMAIL_AGENT = "novu-email-agent" NEXMO = "nexmo" PLIVO = "plivo" SMS77 = "sms77" diff --git a/src/novu_py/models/subscriberscontroller_getsubscribernotificationsop.py b/src/novu_py/models/subscriberscontroller_getsubscribernotificationsop.py index 21b27be3..c0724825 100644 --- a/src/novu_py/models/subscriberscontroller_getsubscribernotificationsop.py +++ b/src/novu_py/models/subscriberscontroller_getsubscribernotificationsop.py @@ -19,7 +19,7 @@ from typing_extensions import Annotated, NotRequired, TypedDict -class Severity(str, Enum): +class QueryParamSeverity(str, Enum): HIGH = "high" MEDIUM = "medium" LOW = "low" @@ -42,7 +42,7 @@ class SubscribersControllerGetSubscriberNotificationsRequestTypedDict(TypedDict) r"""Filter by seen state""" data: NotRequired[str] r"""Filter by data attributes (JSON string)""" - severity: NotRequired[List[Severity]] + severity: NotRequired[List[QueryParamSeverity]] r"""Filter by severity levels""" created_gte: NotRequired[float] r"""Filter notifications created on or after this timestamp (Unix timestamp in milliseconds)""" @@ -108,7 +108,7 @@ class SubscribersControllerGetSubscriberNotificationsRequest(BaseModel): r"""Filter by data attributes (JSON string)""" severity: Annotated[ - Optional[List[Severity]], + Optional[List[QueryParamSeverity]], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None r"""Filter by severity levels""" diff --git a/src/novu_py/models/testdomainrouteagentresultdto.py b/src/novu_py/models/testdomainrouteagentresultdto.py new file mode 100644 index 00000000..06b6c1e3 --- /dev/null +++ b/src/novu_py/models/testdomainrouteagentresultdto.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from novu_py.types import BaseModel, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AgentReplyTypedDict(TypedDict): + r"""Parsed JSON body from the agent webhook response when JSON.""" + + +class AgentReply(BaseModel): + r"""Parsed JSON body from the agent webhook response when JSON.""" + + +class TestDomainRouteAgentResultDtoTypedDict(TypedDict): + __test__ = False # pyright: ignore[reportGeneralTypeIssues] + + agent_id: str + http_status: float + latency_ms: float + agent_reply: NotRequired[AgentReplyTypedDict] + r"""Parsed JSON body from the agent webhook response when JSON.""" + + +class TestDomainRouteAgentResultDto(BaseModel): + __test__ = False + + agent_id: Annotated[str, pydantic.Field(alias="agentId")] + + http_status: Annotated[float, pydantic.Field(alias="httpStatus")] + + latency_ms: Annotated[float, pydantic.Field(alias="latencyMs")] + + agent_reply: Annotated[Optional[AgentReply], pydantic.Field(alias="agentReply")] = ( + None + ) + r"""Parsed JSON body from the agent webhook response when JSON.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["agentReply"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + TestDomainRouteAgentResultDto.model_rebuild() +except NameError: + pass diff --git a/src/novu_py/models/testdomainroutedto.py b/src/novu_py/models/testdomainroutedto.py new file mode 100644 index 00000000..8a068c00 --- /dev/null +++ b/src/novu_py/models/testdomainroutedto.py @@ -0,0 +1,60 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .testdomainroutefromdto import ( + TestDomainRouteFromDto, + TestDomainRouteFromDtoTypedDict, +) +from novu_py.types import BaseModel, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class TestDomainRouteDtoTypedDict(TypedDict): + __test__ = False # pyright: ignore[reportGeneralTypeIssues] + + from_: TestDomainRouteFromDtoTypedDict + subject: str + text: NotRequired[str] + html: NotRequired[str] + dry_run: NotRequired[bool] + r"""When true, returns the payload that would be delivered without invoking outbound webhooks or the agent HTTP endpoint.""" + + +class TestDomainRouteDto(BaseModel): + __test__ = False + + from_: Annotated[TestDomainRouteFromDto, pydantic.Field(alias="from")] + + subject: str + + text: Optional[str] = None + + html: Optional[str] = None + + dry_run: Annotated[Optional[bool], pydantic.Field(alias="dryRun")] = None + r"""When true, returns the payload that would be delivered without invoking outbound webhooks or the agent HTTP endpoint.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["text", "html", "dryRun"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + TestDomainRouteDto.model_rebuild() +except NameError: + pass diff --git a/src/novu_py/models/testdomainroutefromdto.py b/src/novu_py/models/testdomainroutefromdto.py new file mode 100644 index 00000000..9fac7190 --- /dev/null +++ b/src/novu_py/models/testdomainroutefromdto.py @@ -0,0 +1,38 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from novu_py.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class TestDomainRouteFromDtoTypedDict(TypedDict): + __test__ = False # pyright: ignore[reportGeneralTypeIssues] + + address: str + name: NotRequired[str] + + +class TestDomainRouteFromDto(BaseModel): + __test__ = False + + address: str + + name: Optional[str] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["name"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/novu_py/models/testdomainrouteresponsedto.py b/src/novu_py/models/testdomainrouteresponsedto.py new file mode 100644 index 00000000..f669ba62 --- /dev/null +++ b/src/novu_py/models/testdomainrouteresponsedto.py @@ -0,0 +1,105 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .testdomainrouteagentresultdto import ( + TestDomainRouteAgentResultDto, + TestDomainRouteAgentResultDtoTypedDict, +) +from .testdomainroutewebhookresultdto import ( + TestDomainRouteWebhookResultDto, + TestDomainRouteWebhookResultDtoTypedDict, +) +from enum import Enum +from novu_py.types import BaseModel, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Any, Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DomainStatus(str, Enum): + PENDING = "pending" + VERIFIED = "verified" + + +class TestDomainRouteResponseDtoType(str, Enum): + AGENT = "agent" + WEBHOOK = "webhook" + + +class TestDomainRouteResponseDtoTypedDict(TypedDict): + __test__ = False # pyright: ignore[reportGeneralTypeIssues] + + matched: bool + dry_run: bool + domain_status: NotRequired[DomainStatus] + mx_record_configured: NotRequired[bool] + type: NotRequired[TestDomainRouteResponseDtoType] + would_deliver_to: NotRequired[str] + r"""Human-readable delivery target summary in dry-run mode.""" + payload: NotRequired[Dict[str, Any]] + r"""The outbound payload (dry-run only).""" + webhook: NotRequired[TestDomainRouteWebhookResultDtoTypedDict] + agent: NotRequired[TestDomainRouteAgentResultDtoTypedDict] + + +class TestDomainRouteResponseDto(BaseModel): + __test__ = False + + matched: bool + + dry_run: Annotated[bool, pydantic.Field(alias="dryRun")] + + domain_status: Annotated[ + Optional[DomainStatus], pydantic.Field(alias="domainStatus") + ] = None + + mx_record_configured: Annotated[ + Optional[bool], pydantic.Field(alias="mxRecordConfigured") + ] = None + + type: Optional[TestDomainRouteResponseDtoType] = None + + would_deliver_to: Annotated[ + Optional[str], pydantic.Field(alias="wouldDeliverTo") + ] = None + r"""Human-readable delivery target summary in dry-run mode.""" + + payload: Optional[Dict[str, Any]] = None + r"""The outbound payload (dry-run only).""" + + webhook: Optional[TestDomainRouteWebhookResultDto] = None + + agent: Optional[TestDomainRouteAgentResultDto] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "domainStatus", + "mxRecordConfigured", + "type", + "wouldDeliverTo", + "payload", + "webhook", + "agent", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + TestDomainRouteResponseDto.model_rebuild() +except NameError: + pass diff --git a/src/novu_py/models/testdomainroutewebhookresultdto.py b/src/novu_py/models/testdomainroutewebhookresultdto.py new file mode 100644 index 00000000..9527dc65 --- /dev/null +++ b/src/novu_py/models/testdomainroutewebhookresultdto.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from novu_py.types import BaseModel, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class TestDomainRouteWebhookResultDtoTypedDict(TypedDict): + __test__ = False # pyright: ignore[reportGeneralTypeIssues] + + latency_ms: float + skipped: NotRequired[bool] + r"""True when outbound webhooks are disabled for this environment (nothing was emitted).""" + + +class TestDomainRouteWebhookResultDto(BaseModel): + __test__ = False + + latency_ms: Annotated[float, pydantic.Field(alias="latencyMs")] + + skipped: Optional[bool] = None + r"""True when outbound webhooks are disabled for this environment (nothing was emitted).""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["skipped"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + TestDomainRouteWebhookResultDto.model_rebuild() +except NameError: + pass diff --git a/src/novu_py/models/updatedomaindto.py b/src/novu_py/models/updatedomaindto.py new file mode 100644 index 00000000..ebc86375 --- /dev/null +++ b/src/novu_py/models/updatedomaindto.py @@ -0,0 +1,33 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from novu_py.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class UpdateDomainDtoTypedDict(TypedDict): + data: NotRequired[Dict[str, str]] + r"""Replaces domain metadata when provided (max 10 keys, 500 characters total for keys+values).""" + + +class UpdateDomainDto(BaseModel): + data: Optional[Dict[str, str]] = None + r"""Replaces domain metadata when provided (max 10 keys, 500 characters total for keys+values).""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/novu_py/models/updatedomainroutedto.py b/src/novu_py/models/updatedomainroutedto.py new file mode 100644 index 00000000..6277b1f5 --- /dev/null +++ b/src/novu_py/models/updatedomainroutedto.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from novu_py.types import BaseModel, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class UpdateDomainRouteDtoType(str, Enum): + AGENT = "agent" + WEBHOOK = "webhook" + + +class UpdateDomainRouteDtoTypedDict(TypedDict): + agent_id: NotRequired[str] + r"""Agent identifier; required when type is agent, ignored when type is webhook.""" + type: NotRequired[UpdateDomainRouteDtoType] + data: NotRequired[Dict[str, str]] + r"""Replaces route metadata when provided (max 10 keys, 500 characters total for keys+values).""" + + +class UpdateDomainRouteDto(BaseModel): + agent_id: Annotated[Optional[str], pydantic.Field(alias="agentId")] = None + r"""Agent identifier; required when type is agent, ignored when type is webhook.""" + + type: Optional[UpdateDomainRouteDtoType] = None + + data: Optional[Dict[str, str]] = None + r"""Replaces route metadata when provided (max 10 keys, 500 characters total for keys+values).""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["agentId", "type", "data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + UpdateDomainRouteDto.model_rebuild() +except NameError: + pass diff --git a/src/novu_py/notifications.py b/src/novu_py/notifications.py index 1af0ce8b..2c105bd5 100644 --- a/src/novu_py/notifications.py +++ b/src/novu_py/notifications.py @@ -91,23 +91,7 @@ def list( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -231,23 +215,7 @@ async def list_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -368,23 +336,7 @@ def retrieve( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -507,23 +459,7 @@ async def retrieve_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/novu_messages.py b/src/novu_py/novu_messages.py index 966acdf0..95f6024c 100644 --- a/src/novu_py/novu_messages.py +++ b/src/novu_py/novu_messages.py @@ -96,23 +96,7 @@ def update_as_seen( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -241,23 +225,7 @@ async def update_as_seen_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -391,23 +359,7 @@ def mark_all( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -541,23 +493,7 @@ async def mark_all_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -691,23 +627,7 @@ def mark_all_as( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -843,23 +763,7 @@ async def mark_all_as_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/novu_notifications.py b/src/novu_py/novu_notifications.py index c09e9dc0..8492934c 100644 --- a/src/novu_py/novu_notifications.py +++ b/src/novu_py/novu_notifications.py @@ -91,23 +91,7 @@ def list( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -233,23 +217,7 @@ async def list_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -376,23 +344,7 @@ def delete( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -514,23 +466,7 @@ async def delete_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -650,23 +586,7 @@ def complete_action( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -789,23 +709,7 @@ async def complete_action_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -928,23 +832,7 @@ def revert_action( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1067,23 +955,7 @@ async def revert_action_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1208,23 +1080,7 @@ def archive( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1349,23 +1205,7 @@ async def archive_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1490,23 +1330,7 @@ def mark_as_read( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1631,23 +1455,7 @@ async def mark_as_read_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1775,23 +1583,7 @@ def snooze( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1919,23 +1711,7 @@ async def snooze_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2060,23 +1836,7 @@ def unarchive( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2201,23 +1961,7 @@ async def unarchive_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2342,23 +2086,7 @@ def mark_as_unread( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2483,23 +2211,7 @@ async def mark_as_unread_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2624,23 +2336,7 @@ def unsnooze( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2765,23 +2461,7 @@ async def unsnooze_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2916,23 +2596,7 @@ def archive_all( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -3066,23 +2730,7 @@ async def archive_all_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -3204,23 +2852,7 @@ def count( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -3345,23 +2977,7 @@ async def count_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -3498,23 +3114,7 @@ def delete_all( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -3648,23 +3248,7 @@ async def delete_all_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -3798,23 +3382,7 @@ def mark_all_as_read( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -3948,23 +3516,7 @@ async def mark_all_as_read_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -4098,23 +3650,7 @@ def archive_all_read( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -4248,23 +3784,7 @@ async def archive_all_read_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -4398,23 +3918,7 @@ def mark_as_seen( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -4548,23 +4052,7 @@ async def mark_as_seen_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -4686,23 +4174,7 @@ def feed( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -4825,23 +4297,7 @@ async def feed_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -4966,23 +4422,7 @@ def unseen_count( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -5107,23 +4547,7 @@ async def unseen_count_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/novu_subscribers.py b/src/novu_py/novu_subscribers.py index ad89f2ae..ba41afc9 100644 --- a/src/novu_py/novu_subscribers.py +++ b/src/novu_py/novu_subscribers.py @@ -89,23 +89,7 @@ def retrieve( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -227,23 +211,7 @@ async def retrieve_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/novu_topics.py b/src/novu_py/novu_topics.py index 13e9554c..cdfb24fd 100644 --- a/src/novu_py/novu_topics.py +++ b/src/novu_py/novu_topics.py @@ -89,23 +89,7 @@ def list( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -229,23 +213,7 @@ async def list_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/preferences.py b/src/novu_py/preferences.py index 5067a9b2..fc6fcf37 100644 --- a/src/novu_py/preferences.py +++ b/src/novu_py/preferences.py @@ -93,23 +93,7 @@ def list( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -237,23 +221,7 @@ async def list_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -391,23 +359,7 @@ def update( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -545,23 +497,7 @@ async def update_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -699,23 +635,7 @@ def bulk_update( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -853,23 +773,7 @@ async def bulk_update_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/properties.py b/src/novu_py/properties.py index 4cb34e93..0392a35c 100644 --- a/src/novu_py/properties.py +++ b/src/novu_py/properties.py @@ -102,23 +102,7 @@ def update_online_flag( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -253,23 +237,7 @@ async def update_online_flag_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/routes.py b/src/novu_py/routes.py new file mode 100644 index 00000000..06d73aa7 --- /dev/null +++ b/src/novu_py/routes.py @@ -0,0 +1,1545 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from novu_py import models, utils +from novu_py._hooks import HookContext +from novu_py.types import BaseModel, OptionalNullable, UNSET +from novu_py.utils import get_security_from_env +from novu_py.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Mapping, Optional, Union, cast + + +class Routes(BaseSDK): + def list( + self, + *, + request: Union[ + models.DomainsControllerListDomainRoutesRequest, + models.DomainsControllerListDomainRoutesRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerListDomainRoutesResponse: + r"""List routes for a domain + + Returns a paginated list of routes attached to the domain. Optionally filter by an agent identifier to find routes pointing to a specific agent. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, models.DomainsControllerListDomainRoutesRequest + ) + request = cast(models.DomainsControllerListDomainRoutesRequest, request) + + req = self._build_request( + method="GET", + path="/v1/domains/{domain}/routes", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_listDomainRoutes", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerListDomainRoutesResponse( + result=unmarshal_json_response( + models.ListDomainRoutesResponseDto, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def list_async( + self, + *, + request: Union[ + models.DomainsControllerListDomainRoutesRequest, + models.DomainsControllerListDomainRoutesRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerListDomainRoutesResponse: + r"""List routes for a domain + + Returns a paginated list of routes attached to the domain. Optionally filter by an agent identifier to find routes pointing to a specific agent. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, models.DomainsControllerListDomainRoutesRequest + ) + request = cast(models.DomainsControllerListDomainRoutesRequest, request) + + req = self._build_request_async( + method="GET", + path="/v1/domains/{domain}/routes", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_listDomainRoutes", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerListDomainRoutesResponse( + result=unmarshal_json_response( + models.ListDomainRoutesResponseDto, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def create( + self, + *, + domain: str, + domain_route_dto: Union[models.DomainRouteDto, models.DomainRouteDtoTypedDict], + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerCreateDomainRouteResponse: + r"""Create a route + + Creates a route on the domain that forwards inbound mail addressed to `
@` to either a webhook or an agent. Each address on a domain may only have a single route. + + :param domain: + :param domain_route_dto: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerCreateDomainRouteRequest( + domain=domain, + idempotency_key=idempotency_key, + domain_route_dto=utils.get_pydantic_model( + domain_route_dto, models.DomainRouteDto + ), + ) + + req = self._build_request( + method="POST", + path="/v1/domains/{domain}/routes", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.domain_route_dto, False, False, "json", models.DomainRouteDto + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_createDomainRoute", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.DomainsControllerCreateDomainRouteResponse( + result=unmarshal_json_response(models.DomainRouteResponseDto, http_res), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def create_async( + self, + *, + domain: str, + domain_route_dto: Union[models.DomainRouteDto, models.DomainRouteDtoTypedDict], + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerCreateDomainRouteResponse: + r"""Create a route + + Creates a route on the domain that forwards inbound mail addressed to `
@` to either a webhook or an agent. Each address on a domain may only have a single route. + + :param domain: + :param domain_route_dto: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerCreateDomainRouteRequest( + domain=domain, + idempotency_key=idempotency_key, + domain_route_dto=utils.get_pydantic_model( + domain_route_dto, models.DomainRouteDto + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/domains/{domain}/routes", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.domain_route_dto, False, False, "json", models.DomainRouteDto + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_createDomainRoute", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.DomainsControllerCreateDomainRouteResponse( + result=unmarshal_json_response(models.DomainRouteResponseDto, http_res), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def retrieve( + self, + *, + domain: str, + address: str, + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerGetDomainRouteResponse: + r"""Retrieve a route by address + + Returns the route bound to `
@`. Use `*` as the address to retrieve the wildcard route for the domain. + + :param domain: + :param address: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerGetDomainRouteRequest( + domain=domain, + address=address, + idempotency_key=idempotency_key, + ) + + req = self._build_request( + method="GET", + path="/v1/domains/{domain}/routes/{address}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_getDomainRoute", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerGetDomainRouteResponse( + result=unmarshal_json_response(models.DomainRouteResponseDto, http_res), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def retrieve_async( + self, + *, + domain: str, + address: str, + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerGetDomainRouteResponse: + r"""Retrieve a route by address + + Returns the route bound to `
@`. Use `*` as the address to retrieve the wildcard route for the domain. + + :param domain: + :param address: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerGetDomainRouteRequest( + domain=domain, + address=address, + idempotency_key=idempotency_key, + ) + + req = self._build_request_async( + method="GET", + path="/v1/domains/{domain}/routes/{address}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_getDomainRoute", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerGetDomainRouteResponse( + result=unmarshal_json_response(models.DomainRouteResponseDto, http_res), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def update( + self, + *, + domain: str, + address: str, + update_domain_route_dto: Union[ + models.UpdateDomainRouteDto, models.UpdateDomainRouteDtoTypedDict + ], + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerUpdateDomainRouteResponse: + r"""Update a route + + Updates the destination of the route bound to `
@`. The address itself is the resource identity and cannot be changed; delete and recreate the route to rename it. + + :param domain: + :param address: + :param update_domain_route_dto: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerUpdateDomainRouteRequest( + domain=domain, + address=address, + idempotency_key=idempotency_key, + update_domain_route_dto=utils.get_pydantic_model( + update_domain_route_dto, models.UpdateDomainRouteDto + ), + ) + + req = self._build_request( + method="PATCH", + path="/v1/domains/{domain}/routes/{address}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_domain_route_dto, + False, + False, + "json", + models.UpdateDomainRouteDto, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_updateDomainRoute", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerUpdateDomainRouteResponse( + result=unmarshal_json_response(models.DomainRouteResponseDto, http_res), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def update_async( + self, + *, + domain: str, + address: str, + update_domain_route_dto: Union[ + models.UpdateDomainRouteDto, models.UpdateDomainRouteDtoTypedDict + ], + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerUpdateDomainRouteResponse: + r"""Update a route + + Updates the destination of the route bound to `
@`. The address itself is the resource identity and cannot be changed; delete and recreate the route to rename it. + + :param domain: + :param address: + :param update_domain_route_dto: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerUpdateDomainRouteRequest( + domain=domain, + address=address, + idempotency_key=idempotency_key, + update_domain_route_dto=utils.get_pydantic_model( + update_domain_route_dto, models.UpdateDomainRouteDto + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/v1/domains/{domain}/routes/{address}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_domain_route_dto, + False, + False, + "json", + models.UpdateDomainRouteDto, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_updateDomainRoute", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerUpdateDomainRouteResponse( + result=unmarshal_json_response(models.DomainRouteResponseDto, http_res), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def delete( + self, + *, + domain: str, + address: str, + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerDeleteDomainRouteResponse: + r"""Delete a route + + Removes the route bound to `
@`. Inbound mail for that address will no longer be processed. + + :param domain: + :param address: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerDeleteDomainRouteRequest( + domain=domain, + address=address, + idempotency_key=idempotency_key, + ) + + req = self._build_request( + method="DELETE", + path="/v1/domains/{domain}/routes/{address}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_deleteDomainRoute", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return models.DomainsControllerDeleteDomainRouteResponse( + headers=utils.get_response_headers(http_res.headers) + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def delete_async( + self, + *, + domain: str, + address: str, + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerDeleteDomainRouteResponse: + r"""Delete a route + + Removes the route bound to `
@`. Inbound mail for that address will no longer be processed. + + :param domain: + :param address: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerDeleteDomainRouteRequest( + domain=domain, + address=address, + idempotency_key=idempotency_key, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/domains/{domain}/routes/{address}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_deleteDomainRoute", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return models.DomainsControllerDeleteDomainRouteResponse( + headers=utils.get_response_headers(http_res.headers) + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + def test( + self, + *, + domain: str, + address: str, + test_domain_route_dto: Union[ + models.TestDomainRouteDto, models.TestDomainRouteDtoTypedDict + ], + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerTestDomainRouteResponse: + r"""Test an inbound route + + Sends a synthetic inbound email through the same delivery path as production (outbound webhooks for webhook routes, signed HTTP to the agent for agent routes). Use `dryRun: true` to preview the payload without delivering. + + :param domain: + :param address: + :param test_domain_route_dto: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerTestDomainRouteRequest( + domain=domain, + address=address, + idempotency_key=idempotency_key, + test_domain_route_dto=utils.get_pydantic_model( + test_domain_route_dto, models.TestDomainRouteDto + ), + ) + + req = self._build_request( + method="POST", + path="/v1/domains/{domain}/routes/{address}/test", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.test_domain_route_dto, + False, + False, + "json", + models.TestDomainRouteDto, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_testDomainRoute", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerTestDomainRouteResponse( + result=unmarshal_json_response( + models.TestDomainRouteResponseDto, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) + + async def test_async( + self, + *, + domain: str, + address: str, + test_domain_route_dto: Union[ + models.TestDomainRouteDto, models.TestDomainRouteDtoTypedDict + ], + idempotency_key: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DomainsControllerTestDomainRouteResponse: + r"""Test an inbound route + + Sends a synthetic inbound email through the same delivery path as production (outbound webhooks for webhook routes, signed HTTP to the agent for agent routes). Use `dryRun: true` to preview the payload without delivering. + + :param domain: + :param address: + :param test_domain_route_dto: + :param idempotency_key: A header for idempotency purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DomainsControllerTestDomainRouteRequest( + domain=domain, + address=address, + idempotency_key=idempotency_key, + test_domain_route_dto=utils.get_pydantic_model( + test_domain_route_dto, models.TestDomainRouteDto + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/domains/{domain}/routes/{address}/test", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.test_domain_route_dto, + False, + False, + "json", + models.TestDomainRouteDto, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(1000, 30000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "409", "429", "5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="DomainsController_testDomainRoute", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.DomainsControllerTestDomainRouteResponse( + result=unmarshal_json_response( + models.TestDomainRouteResponseDto, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "414", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "405", "409", "413", "415"], + "application/json", + ): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.ValidationErrorDtoData, http_res + ) + raise models.ValidationErrorDto(response_data, http_res) + if utils.match_response(http_res, "429", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ErrorDtoData, http_res) + raise models.ErrorDto(response_data, http_res) + if utils.match_response(http_res, "503", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + + raise models.APIError("Unexpected response received", http_res) diff --git a/src/novu_py/sdk.py b/src/novu_py/sdk.py index cf19418d..dad5b45b 100644 --- a/src/novu_py/sdk.py +++ b/src/novu_py/sdk.py @@ -31,6 +31,7 @@ from novu_py.channel_connections import ChannelConnections from novu_py.channel_endpoints import ChannelEndpoints from novu_py.contexts import Contexts + from novu_py.domains import Domains from novu_py.environment_variables import EnvironmentVariables from novu_py.environments import Environments from novu_py.integrations import Integrations @@ -76,6 +77,10 @@ class Novu(BaseSDK): """ channel_connections: "ChannelConnections" channel_endpoints: "ChannelEndpoints" + domains: "Domains" + r"""Used to manage your inbound email domains. + https://docs.novu.co/platform/domains + """ environment_variables: "EnvironmentVariables" integrations: "Integrations" r"""With the help of the Integration Store, you can easily integrate your favorite delivery provider. During the runtime of the API, the Integrations Store is responsible for storing the configurations of all the providers. @@ -97,6 +102,7 @@ class Novu(BaseSDK): "workflows": ("novu_py.workflows", "Workflows"), "channel_connections": ("novu_py.channel_connections", "ChannelConnections"), "channel_endpoints": ("novu_py.channel_endpoints", "ChannelEndpoints"), + "domains": ("novu_py.domains", "Domains"), "environment_variables": ( "novu_py.environment_variables", "EnvironmentVariables", @@ -348,23 +354,7 @@ def trigger( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -502,23 +492,7 @@ async def trigger_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -647,23 +621,7 @@ def cancel( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -785,23 +743,7 @@ async def cancel_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -934,23 +876,7 @@ def trigger_broadcast( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1090,23 +1016,7 @@ async def trigger_broadcast_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1246,23 +1156,7 @@ def trigger_bulk( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1402,23 +1296,7 @@ async def trigger_bulk_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/steps.py b/src/novu_py/steps.py index 4cf2ff58..da5531ed 100644 --- a/src/novu_py/steps.py +++ b/src/novu_py/steps.py @@ -103,23 +103,7 @@ def generate_preview( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -257,23 +241,7 @@ async def generate_preview_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -397,23 +365,7 @@ def retrieve( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -535,23 +487,7 @@ async def retrieve_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/subscribers.py b/src/novu_py/subscribers.py index 65ba848d..4d4a942b 100644 --- a/src/novu_py/subscribers.py +++ b/src/novu_py/subscribers.py @@ -128,23 +128,7 @@ def search( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -268,23 +252,7 @@ async def search_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -421,23 +389,7 @@ def create( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -577,23 +529,7 @@ async def create_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -718,23 +654,7 @@ def retrieve( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -854,23 +774,7 @@ async def retrieve_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1004,23 +908,7 @@ def patch( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1154,23 +1042,7 @@ async def patch_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1290,23 +1162,7 @@ def delete( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1428,23 +1284,7 @@ async def delete_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1578,23 +1418,7 @@ def create_bulk( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1728,23 +1552,7 @@ async def create_bulk_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/subscriptions.py b/src/novu_py/subscriptions.py index 105f795e..95fcdc03 100644 --- a/src/novu_py/subscriptions.py +++ b/src/novu_py/subscriptions.py @@ -89,23 +89,7 @@ def list( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -229,23 +213,7 @@ async def list_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -383,23 +351,7 @@ def create( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -537,23 +489,7 @@ async def create_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -690,23 +626,7 @@ def delete( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -843,23 +763,7 @@ async def delete_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -983,23 +887,7 @@ def get_subscription( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1123,23 +1011,7 @@ async def get_subscription_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1279,23 +1151,7 @@ def update( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1435,23 +1291,7 @@ async def update_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/topics.py b/src/novu_py/topics.py index 794393cd..bacabc64 100644 --- a/src/novu_py/topics.py +++ b/src/novu_py/topics.py @@ -113,23 +113,7 @@ def list( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -250,23 +234,7 @@ async def list_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -400,23 +368,7 @@ def create( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -555,23 +507,7 @@ async def create_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -695,23 +631,7 @@ def get( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -830,23 +750,7 @@ async def get_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -979,23 +883,7 @@ def update( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1128,23 +1016,7 @@ async def update_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1264,23 +1136,7 @@ def delete( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1400,23 +1256,7 @@ async def delete_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/translations.py b/src/novu_py/translations.py index 4af6fa4e..bd1698bb 100644 --- a/src/novu_py/translations.py +++ b/src/novu_py/translations.py @@ -122,7 +122,7 @@ def create( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -228,7 +228,7 @@ async def create_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -328,7 +328,7 @@ def retrieve( ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -428,7 +428,7 @@ async def retrieve_async( ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -528,7 +528,7 @@ def delete( ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -628,7 +628,7 @@ async def delete_async( ), ), request=req, - error_status_codes=["404", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -735,7 +735,7 @@ def upload( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -844,7 +844,7 @@ async def upload_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/novu_py/workflows.py b/src/novu_py/workflows.py index aa2295b3..628e732b 100644 --- a/src/novu_py/workflows.py +++ b/src/novu_py/workflows.py @@ -115,23 +115,7 @@ def create( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -261,23 +245,7 @@ async def create_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -398,23 +366,7 @@ def list( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -535,23 +487,7 @@ async def list_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -684,23 +620,7 @@ def update( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -833,23 +753,7 @@ async def update_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -971,23 +875,7 @@ def get( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1109,23 +997,7 @@ async def get_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1244,23 +1116,7 @@ def delete( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1376,23 +1232,7 @@ async def delete_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1522,23 +1362,7 @@ def patch( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1671,23 +1495,7 @@ async def patch_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1816,23 +1624,7 @@ def sync( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1961,23 +1753,7 @@ async def sync_async( ), ), request=req, - error_status_codes=[ - "400", - "401", - "403", - "404", - "405", - "409", - "413", - "414", - "415", - "422", - "429", - "4XX", - "500", - "503", - "5XX", - ], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, )