diff --git a/Pipfile b/Pipfile index bc41fd9..9de6534 100644 --- a/Pipfile +++ b/Pipfile @@ -5,15 +5,15 @@ name = "pypi" [packages] websocket-client= "==1.9.0" -urllib3 = "==2.6.3" +urllib3 = "==2.8.0" loguru = "==0.7.3" -idna = "==3.11" -anyio = "==4.12.1" +idna = "==3.15" +anyio = "==4.14.2" certifi = "==2026.10.19" exceptiongroup = "==1.3.1" h11 = "==0.16.0" -h2 = "==4.3.0" -hpack = "==4.1.0" +h2 = "==4.4.1" +hpack = "==4.2.0" httpcore = "==1.0.9" hyperframe = "==6.1.0" sniffio = "==1.3.1" @@ -24,8 +24,10 @@ httpx = {extras = ["http2"], version = "==0.28.1"} pre-commit = "4.5.1" pylint = "4.0.4" flake8 = "7.3.0" -pytest = "7.4.4" +pytest = "9.0.3" pdoc3 = "0.11.6" +mako = "1.4.2" +virtualenv = "21.7.13" [requires] python_version = "3.13.0" diff --git a/Pipfile.lock b/Pipfile.lock index e80f5be..a17453a 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "2cc2ad9b0eb0899dc19f505635f13d50540a40ecdffda208c24fbe5461c11b4d" + "sha256": "e0dd5f40353204c4b33553b35fd936cc34b5ec4bf7e7f9140063727ef554bec4" }, "pipfile-spec": 6, "requires": { @@ -18,12 +18,12 @@ "default": { "anyio": { "hashes": [ - "sha256:41cfcc3a4c85d3f05c932da7c26d0201ac36f72abd4435ba90d0464a3ffed703", - "sha256:d405828884fc140aa80a3c667b8beed277f1dfedec42ba031bd6ac3db606ab6c" + "sha256:9f505dda5ac9f0c8309b5e8bd445a8c2bf7246f3ce950121e45ea15bc41d1494", + "sha256:cfa139f3ed1a23ee8f88a145ddb5ac7605b8bbfd8592baacd7ce3d8bb4313c7f" ], "index": "pypi", - "markers": "python_version >= '3.9'", - "version": "==4.12.1" + "markers": "python_version >= '3.10'", + "version": "==4.14.2" }, "certifi": { "hashes": [ @@ -54,21 +54,21 @@ }, "h2": { "hashes": [ - "sha256:6c59efe4323fa18b47a632221a1888bd7fde6249819beda254aeca909f221bf1", - "sha256:c438f029a25f7945c69e0ccf0fb951dc3f73a5f6412981daee861431b70e2bdd" + "sha256:0e25f1462b23c9cb82d9eb02e28bc706dac2a68cb457c6a0d74d63c8a2a5d0e6", + "sha256:4e866ffb1a869ae14dd9b5e6beb5c24a13da0495ad72b65925ded182521c1516" ], "index": "pypi", - "markers": "python_version >= '3.9'", - "version": "==4.3.0" + "markers": "python_version >= '3.10'", + "version": "==4.4.1" }, "hpack": { "hashes": [ - "sha256:157ac792668d995c657d93111f46b4535ed114f0c9c8d672271bbec7eae1b496", - "sha256:ec5eca154f7056aa06f196a557655c5b009b382873ac8d1e66e79e87535f1dca" + "sha256:0895cfa3b5531fc65fe439c05eb65144f123bf7a394fcaa56aa423548d8e45c0", + "sha256:858ac0b02280fa582b5080d68db0899c62a80375e0e5413a74970c5e518b6986" ], "index": "pypi", - "markers": "python_version >= '3.9'", - "version": "==4.1.0" + "markers": "python_version >= '3.10'", + "version": "==4.2.0" }, "httpcore": { "hashes": [ @@ -101,12 +101,12 @@ }, "idna": { "hashes": [ - "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea", - "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + "sha256:048adeaf8c2d788c40fee287673ccaa74c24ffd8dcf09ffa555a2fbb59f10ac8", + "sha256:ca962446ea538f7092a95e057da437618e886f4d349216d2b1e294abfdb65fdc" ], "index": "pypi", "markers": "python_version >= '3.8'", - "version": "==3.11" + "version": "==3.15" }, "loguru": { "hashes": [ @@ -137,12 +137,12 @@ }, "urllib3": { "hashes": [ - "sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed", - "sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4" + "sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", + "sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63" ], "index": "pypi", - "markers": "python_version >= '3.9'", - "version": "==2.6.3" + "markers": "python_version >= '3.10'", + "version": "==2.8.0" }, "websocket-client": { "hashes": [ @@ -181,18 +181,18 @@ }, "distlib": { "hashes": [ - "sha256:9659f7d87e46584a30b5780e43ac7a2143098441670ff0a49d5f9034c54a6c16", - "sha256:feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d" + "sha256:ca4175b4ac7f71223cc30ed7248c45d2b38c2439d8ee6e498ab67ed63cf3508d", + "sha256:cf09d55b1e85a89576b036aeb71550bfd68320f3f21761ca329eadadad918638" ], - "version": "==0.4.0" + "version": "==0.4.4" }, "filelock": { "hashes": [ - "sha256:18c57ee915c7ec61cff0ecf7f0f869936c7c30191bb0cf406f1341778d0834e1", - "sha256:4b0dda527ee31078689fc205ec4f1c1bf7d56cf88b6dc9426c4f230e46c2dce1" + "sha256:37b8a3d9811b0f9aef7e5ec5c71bb320de52df51e6ca9bcd6f5ad81187660da7", + "sha256:65ff0d0190ea42038b32bda4b77834fb05be2cad4c5b9b01aa4dfb3614536e52" ], "markers": "python_version >= '3.10'", - "version": "==3.20.3" + "version": "==3.32.7" }, "flake8": { "hashes": [ @@ -205,19 +205,19 @@ }, "identify": { "hashes": [ - "sha256:391ee4d77741d994189522896270b787aed8670389bfd60f326d677d64a6dfb0", - "sha256:846857203b5511bbe94d5a352a48ef2359532bc8f6727b5544077a0dcfb24980" + "sha256:6a16b69b93187244e0548cbfd25b3e4a6f9a7a2ad784625c3bec2b8d27b81aaa", + "sha256:ad729860a923858d26917c2f4fb0a1d83d27a75b1e090c06440c573f048f3285" ], "markers": "python_version >= '3.10'", - "version": "==2.6.16" + "version": "==2.6.20" }, "iniconfig": { "hashes": [ - "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", - "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12" + "sha256:67f4b9c50da0dedf52af349e7749a80a9057a5031199791b906c3bb3ae878960", + "sha256:9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7" ], "markers": "python_version >= '3.10'", - "version": "==2.3.0" + "version": "==2.3.1" }, "isort": { "hashes": [ @@ -229,11 +229,12 @@ }, "mako": { "hashes": [ - "sha256:99579a6f39583fa7e5630a28c3c1f440e4e97a414b80372649c0ce338da2ea28", - "sha256:baef24a52fc4fc514a0887ac600f9f1cff3d82c61d4d700a1fa84d597b88db59" + "sha256:7227a060ee3af55a493af61d73d6beef13044b81dba9586736c13945f09464ce", + "sha256:e70a2a4308952b33a21208bfd6725da79fae5a8c224578f8cfdeb60e5ace03df" ], - "markers": "python_version >= '3.8'", - "version": "==1.3.10" + "index": "pypi", + "markers": "python_version >= '3.10'", + "version": "==1.4.2" }, "markdown": { "hashes": [ @@ -245,98 +246,160 @@ }, "markupsafe": { "hashes": [ - "sha256:0303439a41979d9e74d18ff5e2dd8c43ed6c6001fd40e5bf2e43f7bd9bbc523f", - "sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a", - "sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf", - "sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19", - "sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf", - "sha256:0f4b68347f8c5eab4a13419215bdfd7f8c9b19f2b25520968adfad23eb0ce60c", - "sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175", - "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219", - "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb", - "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6", - "sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab", - "sha256:15d939a21d546304880945ca1ecb8a039db6b4dc49b2c5a400387cdae6a62e26", - "sha256:177b5253b2834fe3678cb4a5f0059808258584c559193998be2601324fdeafb1", - "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce", - "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218", - "sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634", - "sha256:1ba88449deb3de88bd40044603fafffb7bc2b055d626a330323a9ed736661695", - "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad", - "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73", - "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c", - "sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe", - "sha256:2a15a08b17dd94c53a1da0438822d70ebcd13f8c3a95abe3a9ef9f11a94830aa", - "sha256:2f981d352f04553a7171b8e44369f2af4055f888dfb147d55e42d29e29e74559", - "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa", - "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37", - "sha256:3537e01efc9d4dccdf77221fb1cb3b8e1a38d5428920e0657ce299b20324d758", - "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f", - "sha256:38664109c14ffc9e7437e86b4dceb442b0096dfe3541d7864d9cbe1da4cf36c8", - "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d", - "sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c", - "sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97", - "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a", - "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19", - "sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9", - "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9", - "sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc", - "sha256:591ae9f2a647529ca990bc681daebdd52c8791ff06c2bfa05b65163e28102ef2", - "sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4", - "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354", - "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50", - "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698", - "sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9", - "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b", - "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc", - "sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115", - "sha256:7c3fb7d25180895632e5d3148dbdc29ea38ccb7fd210aa27acbd1201a1902c6e", - "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485", - "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f", - "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12", - "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025", - "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009", - "sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d", - "sha256:949b8d66bc381ee8b007cd945914c721d9aba8e27f71959d750a46f7c282b20b", - "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a", - "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5", - "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f", - "sha256:a320721ab5a1aba0a233739394eb907f8c8da5c98c9181d1161e77a0c8e36f2d", - "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1", - "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287", - "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6", - "sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f", - "sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581", - "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed", - "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b", - "sha256:c0c0b3ade1c0b13b936d7970b1d37a57acde9199dc2aecc4c336773e1d86049c", - "sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026", - "sha256:c4ffb7ebf07cfe8931028e3e4c85f0357459a3f9f9490886198848f4fa002ec8", - "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676", - "sha256:d2ee202e79d8ed691ceebae8e0486bd9a2cd4794cec4824e1c99b6f5009502f6", - "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e", - "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d", - "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d", - "sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01", - "sha256:df2449253ef108a379b8b5d6b43f4b1a8e81a061d6537becd5582fba5f9196d7", - "sha256:e1c1493fb6e50ab01d20a22826e57520f1284df32f2d8601fdd90b6304601419", - "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795", - "sha256:e2103a929dfa2fcaf9bb4e7c091983a49c9ac3b19c9061b6d5427dd7d14d81a1", - "sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5", - "sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d", - "sha256:e8fc20152abba6b83724d7ff268c249fa196d8259ff481f3b1476383f8f24e42", - "sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe", - "sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda", - "sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e", - "sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737", - "sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523", - "sha256:f42d0984e947b8adf7dd6dde396e720934d12c506ce84eea8476409563607591", - "sha256:f71a396b3bf33ecaa1626c255855702aca4d3d9fea5e051b41ac59a9c1c41edc", - "sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a", - "sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50" + "sha256:007e1ffd9bf65bb6ee96df7b258fc632a4868dd5566037986c64781f35a36e98", + "sha256:02fa4acbc6a3fc5c693c34d4dd8c1130b7fe99cc915181b0ddd6f72aeb296002", + "sha256:03470d1a8268e692ecf79ecd565593e59d44219377a7ead61f1f1b94c1f7ff6b", + "sha256:04e7902ba80ee4bac1d50a549606527a1dcf0476cd81403db41099d3b60ec653", + "sha256:051417f74bcaaefa316276e0ff723f541616ca51043d070da00249d9bddd3e3c", + "sha256:05295589e619b9bed252a86b532b8e27350abc372d18ba89b59375325e91ec1e", + "sha256:06de8ef6331f6e822c28d577dc8bf43fe398800477c49498f38fc38b67ff33fc", + "sha256:0764a13d34cae40db7bbf3a09b7e9b491bf4603e20b263a7a9d6b8e324975d0a", + "sha256:077293e425f28ec737dbcad442a71752e28f8ae27cde3d68acd1fb212091cd92", + "sha256:0930db9bdc62d22944e10b066448bb65dc9abe9112880c7cab8da54db4284d5f", + "sha256:0cee7cb0f9a1b6892ea482237d9403b3d1b4603aee057d0ff01f0fac2d019a97", + "sha256:0d9c47709875fdb321452056622e930c52afbc07a7d780762fbb8b4d91ce6fa4", + "sha256:11935df9bf455ed0c04eb87bcd720f02b1fe5e02128a9430f23aed6f93336fc7", + "sha256:12a606a492de952afcb43b59a14aaaaad120e708d3663dd0fdf2d738d427a691", + "sha256:14bd2d845d62ab678eaf81da89d7b621b51756c72346745c1a594c09d49207a2", + "sha256:15ba9e28640feef770374b116a6f019c21f52404aeabe516aa7f800587b98cfc", + "sha256:18a801868a884f216e784d7d14db2a4077143ce7610440aee2ce8f734e7cfcde", + "sha256:1c0df495a977d10460a94941799c72d5b5ab03d3858d949b55b5a66c8f371c99", + "sha256:1caa2fa5a6184fb233153b35f654e6687bd555476f6170f29d8ee9be1a8b0af9", + "sha256:1e1451fab512d1bcc3dc26988ec1edb0b82c2db909132872cd9356070a6b63df", + "sha256:1f1f9477e174582b0a1b583d60b66e1f2cf5d3fe12cee985e4aedf44766600e5", + "sha256:2628d3a8cb648ecebb3c5d6b0a1052d400e4d8b7ac0fb786be8d285b50040d17", + "sha256:26e9867520db70d37f7fb421a7f0d8adb40171011fb84ce869afa1a83370dfa8", + "sha256:2a6ef68ae94aed8721934072b27a3b654ea2100b97e4ab864cf1489c90926fbc", + "sha256:2b2b1e18af909b448bb3cf9e3433366f7a8726271fc214e8b10e0f62a78c724b", + "sha256:2cb3dd71fc6be918ad4264346a8ed69485f9b7ed7bf35495d8e22807cd6b8bea", + "sha256:2d1b7d9308288661f56672b1b157d75fc536714d3638487bbea17b6318a78248", + "sha256:2dad610540cb2e6272855c178f08ae9a1c7ac258a7fb71660553a5f104b42741", + "sha256:2e5a7cd7fdd14fcb1ae5d7d8bf23d24fbd1daefd1fbca2580132e1ea75f098b5", + "sha256:2e9ad7dd851bf45fab9f75cbff4cb493fee9979e8d8c7c9c3ee119022518edd6", + "sha256:340cbb1957ba99929cbf19a75626d36ba1ae21d1730b287d1cf7f824a20c4fc7", + "sha256:34bdde374c5932765d7dc685c4a1d191a3207852d67e8e0a9eb6ea85156181f1", + "sha256:353bd63081912ab8cfa6a0c7d185934cdf8426f04c618bba6bc4b394f2069b67", + "sha256:387d8cd30e69b3f0a72877b9ae717033396404e19095b17fe89753a981fda44f", + "sha256:3882fb412298575bae3b9c46868251f15cc69307359f87bb1b382e53d6e5a2c9", + "sha256:38fc55594dab834470b6733dead2ee9e3f657fb0608c769dcafa0ba5ab52f45c", + "sha256:396ec4e65cc889f69786b3b89478b471cee5a3bcf468b9d9bb03e1a30fb291fc", + "sha256:39dbacefc411633db5b4378b066a9aca70a3d7e2922c9e578d825f844026eeba", + "sha256:3a93d9616ddecfb393727a0041a562cf0b15a244e20f2bd25efc7949be4c4f17", + "sha256:3d23795802fc8bd72534836d64489bbf0f67c088959091bdb22e10735a5107bf", + "sha256:434139499bb20b502ed3baa1f169e618f924a97e7a777fea1a49446d80106cf6", + "sha256:436e3ffc6310d3c41878c601db29098102fe5d8a467c49da4a4125254e0980f2", + "sha256:489505b03f692c3f376394e49194fa7a7f9e8558d6e293a7056a0032b0c38163", + "sha256:4a540e2d3192792fc84eced57bef37851ccb2b41f73291bb17408eea77bcd278", + "sha256:4a7cdc2a420ca01058182da4253329764d4bfa055564d1eced90e6ba1e8b1d3d", + "sha256:4bced6e2a6dba6a28f7dd3c6ce14df1b2dd495923f16ea484cad03decd463b2b", + "sha256:4cf3468d5ec187ffffcaca8e61929a37448f215dafc1386a12c750a72fe53634", + "sha256:4e2c4809c14559aa7ef426f27fb35afbb38104c349a903bf8f3600456764bb38", + "sha256:4ed644d75aa94a2baf7ec3a96eaa160ea58c742eb9d27c6506053c5c40fc84ed", + "sha256:4f6e0852a0283b1b1fd776eeb7b766a5f440b3e2bd31ab51af3b400585f3965c", + "sha256:5066b244f576f91afc8ee3ba029a89f99d39c79b1853fe9d39bea9f0afbec148", + "sha256:5086f9975abb1ab531ee6afca1761e4b59a19b446f3f6522ed776963228cfe5a", + "sha256:50b5bedc9ed8a94fc8857a42ef4f84a81ea88f8d4f05dc8705fb23ee6d8dcca7", + "sha256:52704c5d36eb6dda8866493decd61111fff86244c9b1ad225ca01b9e91e5970f", + "sha256:55ffd6ce583d97dc71dc92e930324c8c0d25aea7e3ade6ae54ef77cedb096811", + "sha256:569d65055d367e3dcdf30c3f41119467b73d9ee9faf332bdf40402644f5ac08e", + "sha256:57f9947a7e57a081c1e3e0a2dd0d2dcf290a4531450e6f611e30084c222a7295", + "sha256:5989cb26b2e1efc6a42216a9f6b5ee495ce5ace2e5b352a9af489976b32d1ee2", + "sha256:5c22873ad1f0532ba40fa1727f3c0fc1bbbaab6d373d4cbe3f0dc74b2e2521c7", + "sha256:5e8b3d0b18fd623afa12ecb2ce8d8becef69f9b5440c6330c7972200e0bb84b0", + "sha256:61631e08084be9e21a8967ec3139c7616ed7c5e9368e05c86d1b39562c8a57b6", + "sha256:64511c54db4e4987aef4c41923235927428729e8174c5dba488429be70a998ed", + "sha256:6669c1bf34080161ce49c589cc512ef24d4c704ac9d2b2d3667f519c60418378", + "sha256:672d207103e6b16ca098611b0f9efad6bc00afd47c03d6ef62186495ca677dc0", + "sha256:6768d67d1bce64270e0fdc2e69309d68b9b18ae56ddf6c711d168e9d051c2cac", + "sha256:6a45c3d514f2436064db00d7fc8778d888f0236ebfed649b53d13a59e69ad51b", + "sha256:6bd9e1788e15bfcf6a9082de42e30387e7b85d211ab21e57a939bb8cfaaf8d96", + "sha256:6d2a9efe686f9de00d0d1ea32a4a5a86d558a2277501bd78d964214eab625e59", + "sha256:6da83a088f8ef93b2d483a8232a4dbf4d69d3d8496b568a03c56becac43e1808", + "sha256:7018d4af1cd272e847aa5917983ab5e83e4f6579f9dbfecd4a79c0ca80b144c2", + "sha256:71f88e749ea29f67f21f3b36433c1dc54c7729ed2a6d9e2da2e0d9e0d7b224eb", + "sha256:737c9c3981998eba27f11786f84fddcbabc74068b72a4a1f454ea02094b57b65", + "sha256:73e77980c7207854f00fc4e71fb1626868d5740ab4012623d55c7a99ad122a72", + "sha256:799c39bdf5e2f1292fedd3009f7b3c9e760f10b2420cb9638d56920840ff6db8", + "sha256:7a83aa6e4805df46fed18e989d3d16f86ef60cb50bbc8d9ce3a6be89165fbf6e", + "sha256:7d3391b2188d18737cb2fa147028b1096236eaa7e156446c650a489fa2cadc91", + "sha256:7e1636da3d8dfc220b6dd10264db5f2b165e4888c4518594898fbe381049af8a", + "sha256:805c8b84534fa10891890f0e4be39f3a99e94615d93e8836bf9fa1fdca2feeb2", + "sha256:811d02d5122171c1941357efd8f9bf4ffe907b7f0a1a4e729a880e4be3f46e3e", + "sha256:8138eb83940ec7299024d92d4dee45f601b9e6c5ffde9d25f4e35e326203c707", + "sha256:83b3944fea42a8400edf92fd1770fb8d0d4f7de651353bd2d8525a92dba69a21", + "sha256:849dd2bb0e5e4ab2b71c7191726a4a8d5aa8a610daa584728cbee0b710ddc4ef", + "sha256:8698d70a8081ee8c090dbb394768b5789a1da8b131b5499f89d071dd3cfaf6be", + "sha256:8781a792a070cf2bd1b86d3aa943894115faaba6e88122a7bf32d62072742453", + "sha256:88d59b473bfb03259722600839af9bbd7fa13a2eb514beefeedb95997882f69a", + "sha256:8909c2f1c6dd65e054ac4b573a91c8384d1492281e55d82d159d653f7a13adf6", + "sha256:8965520ac587c94a4ac48b729be3d8b8de00af39699b17585dfb599babe77977", + "sha256:8b5d563170ff8ba3181caa967c99a3c804d1dedb702c7cb93a6a7c32247da978", + "sha256:8e124f974786f831d6043728e38296969d3579db8896fe004682f5758e613581", + "sha256:8f0fac8b13d14bb06c68195f849371924ae53dd7b1c00fed24650f704383b692", + "sha256:9240187afb63d2f9ddc3e032c670356fe941f6e20662ea168a5dc3f1f317e1b3", + "sha256:925f929d6b59a8b3f8b8c6ac363cd0af7eecc81efb3071770b3c6717c450a369", + "sha256:9348cbb300d224fe3b89793262cb093504d4ae927004468463f745188a193e4a", + "sha256:9388003072b95f2f1e3fd908604194d653ba21330d811961a78b7da1a77e9e36", + "sha256:9438a2648b2195980cb2dd8e53ed7b8df91319e2d0b70ae61a9e1d1bc8d3bec9", + "sha256:94e4c421742086aeee4c32a506eec8859d7634aad943f7e6aacf70f813478768", + "sha256:94f5407f7bc64fa6463906b896f9904beeeb7dd8dc116ee8e9056c8714ff9916", + "sha256:971a3bbb75d97ae4e2e8f7d4834236f86f85f0c85e04ab2e191db1123b04f80b", + "sha256:9e227f3dbe6bde7491cf0a9965d00b88c6b1a4a95d11480ddf88bb96d397c19f", + "sha256:9e25feb9e330b63edb0278a0acdf85e50d0cb0fbf49c3084abbe4e24ae195346", + "sha256:9f098115c247e11d138ab83a28fa0323c77015007ea2df73ba5fd714dfefd67c", + "sha256:a18f38cafc329bac5e3c2b96c765b4c96d3d103421ed22ab7988c1e3fce27464", + "sha256:a4bbd2d87dd233b9fc5812160c3d0ffbe42edc22a26ce0469f58479ede633fe9", + "sha256:a5fcffb37e602b0b3c1638a97746b9b96125caa9bcf6fa41d337a9261de231ee", + "sha256:a8e9f292fcda89b324f2f5c91d13f1424a153e40fc2756f38ee23b15835ff300", + "sha256:a9f54054101545a9a9cccefddf54316aa6e4491611fcbef9e91b3b6bebec04f6", + "sha256:aa2c838cc024642cc04c6854232f32b43e5e22833dd11119c1766c7873b8370d", + "sha256:ac0c7c9f1609b0c4c114feb1d7a3409564c7fb77e360bed9e97e5d25dfeaf868", + "sha256:add96447a86d205ab616665d53b2950ee81083757f56e6ea833c8b2917646b46", + "sha256:ae9dcb8fbe244cb82f8a6458b455b927a03685e383d9bacf1ea5ce180b96dc97", + "sha256:b4a635a0487774f841cb1fb62e907e7195cc95bc761e053184b8acc3ceb20733", + "sha256:b4d12837e0203bbace818ff4a7461afdcd78bcd782351cea148139180d7bcffe", + "sha256:b61687d0828e72bf5cda24a2690188f37170bd31c9359ac97e4e66569f120a16", + "sha256:b807e598953730f82e4eae3bd30f6a122cf6b31c398c6b504c0e04c13c170429", + "sha256:b8cd1f918b26fd7b1832ece557cc18f2d8747309ff8b3f0ef9d4250c5ad67a39", + "sha256:b91cc9d336957239ff200f30097e6fea2dc6d6fb3c81e853eaa09eac904fd894", + "sha256:bd3ce56ae2cbae3ba82b683bc425cd7e48d2ed8b10f3e818186b6f5646d9271c", + "sha256:be6cb0c799abb0e2ba3e618e6d28ddddf7e485f6c2ce938dfa237daf3905072c", + "sha256:befb4158af32106b9a93db8d6d1d1cbbd418c0d5aca0cabb7b1780abf0c89169", + "sha256:bf053da3c97a4bc5ecfbb218cdd2983febd91c617be8367d139882aa11e490aa", + "sha256:c02e8f18bdedba082cef725942ac823b9b60656db07f7e265cb31618dfd00d77", + "sha256:c1bc67752d5f21013cfe430df4062441714eab79f65a6a05e01505957e9c35fe", + "sha256:c61750fadcd119d0825bcb7d7d675dd264dcc89cc05292aab5be68ebdbb374ad", + "sha256:c90d5b3d4e944e065a301d741b3c1d784f6bd1f503aa68b4967e32b2ba313d85", + "sha256:c9a7f43c0b202b334cc9184af09bb8f21d3a209e038efaf106936fb69e6b026e", + "sha256:cb96e6e088d6cf71c1ea977510948320234824cf226e32f6f6e044f7a9c82b34", + "sha256:cf63c214fe879a65e69a386f915e36104fc84254ab141240f8854602d8e0be2a", + "sha256:d1aca03ede943eb80ab3d63bb082c84b7aab85ea83bd0fd0c200260945fb49d9", + "sha256:d2e56fd3b00222722abfb3f5f0759ddbae4b90811b5ad4343c64030ad1bde70c", + "sha256:d5f93ebbeb8032d47e349328ec8662d973d9b05a70b3c35df1f91fe419b84749", + "sha256:d882a373d8093c2941e01291b7ced96e9cbe4781da9a7751ca7e6c70385e5214", + "sha256:d920abdfa61279ba1a2ef9484aab07bf03331f8c08a10120fa332353d06e6932", + "sha256:da2af0d7aebfc2074080d72efa6ab8317c62481ef1f896f65d9999c1c01f4494", + "sha256:dd8ea6ebee7aedbf7c749fa80521d9ccf1ba473e0d1e14805caafbaad281c889", + "sha256:de8b364c423ef0a4bad9069657d617f9a5d2b2062457a89b1fa16ee199c399c1", + "sha256:df1ae86ff54725a01fa1a0510b914ca53a161b7050be74f6204e24aded5971d0", + "sha256:dff05cb7016dff1e9fd68f4122c127b65dfc59de5306cfb7ad92f956f230bee2", + "sha256:e1a622f13970d81f95d0c72f9dc090dce9085fccfa4c9f2174377ee32bd15786", + "sha256:e49fb0d1ce92cfa0cb198cc5b1b11cdf9d0638658e2a2db2687e39db7c87fc78", + "sha256:e5c802729725bd07e2bc3ab7b76dc7e0bbfc53129d8f1eb1c002c24cf774717e", + "sha256:e841068dc0be4cb6dfb5c890eb88cbdcff2f4a332393c7ec94e8e618bd32c1a8", + "sha256:e916035e3e9930cbdfdd10abf48861340221857f45509565898e012263f7b289", + "sha256:eba154571c16e032112afac0dc2dfe9e63c2ceb7aedd07bb7eecf2ce26d4dd4c", + "sha256:f03460ff076f70ab595bb45a0205ccea1971443575b6920c52e755dec2b3fbfe", + "sha256:f0ec3b750b59375eab5b0fb2b9254810c00a3375be6d789899f1055a1d556237", + "sha256:f291bcf42ae98eb5107edb162c3c998b4a89648fd8e99ed4cbd12705292788cd", + "sha256:f61efe1d2fe0de16158a5fe1d1cf3c14bdb6aecd54d8938fd26512c525c1f624", + "sha256:f68edfc67aabac33708941f26f22a7b8e9f81429bc0cf249fcf7d66b23af8d19", + "sha256:fa95848c929b6a75f6848d3c9793e59db365ee436776e57db835cdbfa79ba977", + "sha256:fd9f8797427910198f95bced71ddfed61130d7e349213bfb8466c9c99e2c46a8", + "sha256:fdb4ca07ab75ffadab4a8b135ad59cdbb3156b99310f3d565370da74a15d6bd3" ], "markers": "python_version >= '3.9'", - "version": "==3.0.3" + "version": "==3.0.4" }, "mccabe": { "hashes": [ @@ -348,19 +411,19 @@ }, "nodeenv": { "hashes": [ - "sha256:5bb13e3eed2923615535339b3c620e76779af4cb4c6a90deccc9e36b274d3827", - "sha256:996c191ad80897d076bdfba80a41994c2b47c68e224c542b48feba42ba00f8bb" + "sha256:3ce8fe5b71d16e8af7039ca65257354100bc772965d6bc549070649e53b1b146", + "sha256:edaa16e6c14d7cf395d75d4bbd5a26390f4dc06501a33b4e76282b02cc688a25" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6'", - "version": "==1.10.0" + "version": "==1.11.0" }, "packaging": { "hashes": [ - "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", - "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f" + "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79", + "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c" ], - "markers": "python_version >= '3.8'", - "version": "==25.0" + "markers": "python_version >= '3.9'", + "version": "==26.3" }, "pdoc3": { "hashes": [ @@ -373,19 +436,19 @@ }, "platformdirs": { "hashes": [ - "sha256:61d5cdcc6065745cdd94f0f878977f8de9437be93de97c1c12f853c9c0cdcbda", - "sha256:d03afa3963c806a9bed9d5125c8f4cb2fdaf74a55ab60e5d59b3fde758104d31" + "sha256:05831adf87d392760f4b5c3a0a95579ab5a10b18b9b9bd43680dcb47544788a0", + "sha256:53d3ec4280b815c1e0b02edad7f9ee8fda1ba9c0865dd9c2e6e63849ce82fc1e" ], - "markers": "python_version >= '3.10'", - "version": "==4.5.1" + "markers": "python_version >= '3.11'", + "version": "==4.13.5" }, "pluggy": { "hashes": [ - "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", - "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746" + "sha256:7dd7b0d8832ba3cb632c306926ded123429211b83641b35dc5c41ad2d34f9bec", + "sha256:d1eaa46ebb595891b860ab086b4d09c8588af65ebd4361b8e8f4bb8920b90ba8" ], - "markers": "python_version >= '3.9'", - "version": "==1.6.0" + "markers": "python_version >= '3.10'", + "version": "==1.7.0" }, "pre-commit": { "hashes": [ @@ -412,6 +475,14 @@ "markers": "python_version >= '3.9'", "version": "==3.4.0" }, + "pygments": { + "hashes": [ + "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", + "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c" + ], + "markers": "python_version >= '3.9'", + "version": "==2.21.0" + }, "pylint": { "hashes": [ "sha256:63e06a37d5922555ee2c20963eb42559918c20bd2b21244e4ef426e7c43b92e0", @@ -423,12 +494,20 @@ }, "pytest": { "hashes": [ - "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280", - "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8" + "sha256:2c5efc453d45394fdd706ade797c0a81091eccd1d6e4bccfcd476e2b8e0ab5d9", + "sha256:b86ada508af81d19edeb213c681b1d48246c1a91d304c6c81a427674c17eb91c" ], "index": "pypi", - "markers": "python_version >= '3.7'", - "version": "==7.4.4" + "markers": "python_version >= '3.10'", + "version": "==9.0.3" + }, + "python-discovery": { + "hashes": [ + "sha256:530179cc51a1816d512b15635b3dc931295ae12efb183783ad31190a5d425d2b", + "sha256:bc70d31f0ec5de11eda13d4d64c16e24b3506a65984684f2b6c98cb83b2ea9df" + ], + "markers": "python_version >= '3.9'", + "version": "==1.6.4" }, "pyyaml": { "hashes": [ @@ -519,11 +598,12 @@ }, "virtualenv": { "hashes": [ - "sha256:575a8d6b124ef88f6f51d56d656132389f961062a9177016a50e4f507bbcc19f", - "sha256:8befb5c81842c641f8ee658481e42641c68b5eab3521d8e092d18320902466ba" + "sha256:0355558b6f33619aab31347e43643b0ebc97f61ea3acf617b2b69e1f8a843d11", + "sha256:1bea5af7463f59c4719db48fe739579a2a4f569c96f26c086edda85c96da9f59" ], - "markers": "python_version >= '3.8'", - "version": "==20.36.1" + "index": "pypi", + "markers": "python_version >= '3.9'", + "version": "==21.7.13" } } } diff --git a/changelog.md b/changelog.md index c8dfb04..f2b19a3 100644 --- a/changelog.md +++ b/changelog.md @@ -1,7 +1,7 @@ # Change Log All notable changes to this project will be documented in this file. -## [0.4.2] - TBA +## [0.4.2] - 2026-10-21 ### Added - Support for new version 3.7. @@ -19,7 +19,7 @@ All notable changes to this project will be documented in this file. - New method in reports-api v3.7: report `campaigns_conversion`. ### Changed -- Udated python version from 3.8 to 3.13.0 (version 3.8 was unsupported since 2024-10-07). +- Updated python version from 3.8 to 3.13.0 (version 3.8 was unsupported since 2024-10-07). - Updated urllib3 dependency to a version which fixes a potential vulnerability. - Updated dependencies: websocket-client, certifi, exceptiongroup, h11, h2, hpack, httpcore, hyperframe. - Config now points to v3.6 as a stable and 3.7 as a dev-preview version. @@ -32,7 +32,7 @@ All notable changes to this project will be documented in this file. ### Removed - Support for versions 3.3 and 3.4. - Removed support for billing-api. -- Support `get_predicted_agent` in customer-api v3.7. +- Support for `get_predicted_agent` in customer-api v3.7. - Support for `create_customer` method removed in agent-api v3.6 and later. - Support for `incoming_customer` webhook removed in v3.6 and later. diff --git a/docs/agent/rtm/api/index.html b/docs/agent/rtm/api/index.html index dcf9e60..f43fc8a 100644 --- a/docs/agent/rtm/api/index.html +++ b/docs/agent/rtm/api/index.html @@ -26,10 +26,6 @@

Module livechat.agent.rtm.api

Sub-modules

-
livechat.agent.rtm.api.v34
-
-

Module containing Agent RTM API client implementation for v3.4.

-
livechat.agent.rtm.api.v35

Module containing Agent RTM API client implementation for v3.5.

@@ -64,7 +60,6 @@

Index

  • Sub-modules

      -
    • livechat.agent.rtm.api.v34
    • livechat.agent.rtm.api.v35
    • livechat.agent.rtm.api.v36
    • livechat.agent.rtm.api.v37
    • diff --git a/docs/agent/rtm/api/v34.html b/docs/agent/rtm/api/v34.html deleted file mode 100644 index 2f1052a..0000000 --- a/docs/agent/rtm/api/v34.html +++ /dev/null @@ -1,4234 +0,0 @@ - - - - - - -livechat.agent.rtm.api.v34 API documentation - - - - - - - - - - - -
      -
      -
      -

      Module livechat.agent.rtm.api.v34

      -
      -
      -

      Module containing Agent RTM API client implementation for v3.4.

      -
      - -Expand source code - -
      ''' Module containing Agent RTM API client implementation for v3.4. '''
      -
      -from typing import Any, Callable, Optional, Union
      -
      -from livechat.utils.helpers import prepare_payload
      -from livechat.utils.structures import AccessToken, RtmResponse
      -from livechat.utils.ws_client import WebsocketClient
      -
      -# pylint: disable=unused-argument, too-many-arguments, invalid-name, redefined-builtin
      -
      -
      -class AgentRtmV34:
      -    ''' Agent RTM API Class containing methods in version 3.4. '''
      -    def __init__(
      -        self,
      -        url: str,
      -        header: Union[list, dict, Callable, None],
      -    ):
      -        self.ws = WebsocketClient(url=f'wss://{url}/v3.4/agent/rtm/ws',
      -                                  header=header)
      -
      -    def open_connection(self,
      -                        origin: dict = None,
      -                        ping_timeout: Union[float, int] = 3,
      -                        ping_interval: Union[float, int] = 5,
      -                        ws_conn_timeout: Union[float, int] = 10,
      -                        keep_alive: bool = True,
      -                        response_timeout: Union[float, int] = 3) -> None:
      -        ''' Opens WebSocket connection.
      -
      -            Args:
      -                origin (dict): Specifies origin while creating websocket connection.
      -                ping_timeout (int or float): timeout (in seconds) if the pong message is not received,
      -                    by default sets to 3 seconds.
      -                ping_interval (int or float): automatically sends "ping" command every specified period (in seconds).
      -                    If set to 0, no ping is sent periodically, by default sets to 5 seconds.
      -                ws_conn_timeout (int or float): timeout (in seconds) to wait for WebSocket connection,
      -                    by default sets to 10 seconds.
      -                keep_alive(bool): Bool which states if connection should be kept, by default sets to `True`.
      -                response_timeout (int or float): timeout (in seconds) to wait for the response,
      -                    by default sets to 3 seconds.
      -        '''
      -        self.ws.open(origin, ping_timeout, ping_interval, ws_conn_timeout,
      -                     keep_alive, response_timeout)
      -
      -    def close_connection(self) -> None:
      -        ''' Closes WebSocket connection. '''
      -        self.ws.close()
      -
      -    # Chats
      -
      -    def list_chats(self,
      -                   filters: dict = None,
      -                   sort_order: str = None,
      -                   limit: int = None,
      -                   page_id: str = None,
      -                   payload: dict = None) -> RtmResponse:
      -        ''' Returns summaries of the chats an Agent has access to.
      -
      -            Args:
      -                filters (dict): Possible request filters. Mustn't change between requests for subsequent pages.
      -                        Otherwise, the behavior is undefined.
      -                sort_order (str): Possible values: asc, desc (default). Chat summaries are sorted by the
      -                        creation date of its last thread.
      -                limit (int): Chats limit per page. Default: 10, maximum: 100.
      -                page_id (str): Page ID.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'list_chats', 'payload': payload})
      -
      -    def list_threads(self,
      -                     chat_id: str = None,
      -                     sort_order: str = None,
      -                     limit: int = None,
      -                     page_id: str = None,
      -                     min_events_count: int = None,
      -                     filters: dict = None,
      -                     payload: dict = None) -> RtmResponse:
      -        ''' Returns threads that the current Agent has access to in a given chat.
      -
      -            Args:
      -                chat_id (str): Chat ID to get threads from.
      -                sort_order (str): Possible values: asc - oldest threads first and desc -
      -                        newest threads first (default).
      -                limit (int): Default: 3, maximum: 100.
      -                page_id (str): Page ID.
      -                min_events_count (int): Range: 1-100; Specifies the minimum number of
      -                        events to be returned in the response.
      -                filters (dict): Filters object.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'list_threads', 'payload': payload})
      -
      -    def get_chat(self,
      -                 chat_id: str = None,
      -                 thread_id: str = None,
      -                 payload: dict = None) -> RtmResponse:
      -        ''' Returns a thread that the current Agent has access to in a given chat.
      -
      -            Args:
      -                chat_id (str): ID of a chat to get.
      -                thread_id (str): Thread ID to get. Default: the latest thread (if exists).
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'get_chat', 'payload': payload})
      -
      -    def list_archives(self,
      -                      filters: dict = None,
      -                      page_id: str = None,
      -                      sort_order: str = None,
      -                      limit: int = None,
      -                      highlights: dict = None,
      -                      payload: dict = None) -> RtmResponse:
      -        ''' Returns a list of the chats an Agent has access to.
      -
      -            Args:
      -                filters (dict): Filters object.
      -                page_id (str): Page ID.
      -                sort_order (str): Possible values: asc - oldest threads first and desc -
      -                        newest threads first (default).
      -                limit (int): Default: 10, minimum: 1, maximum: 100.
      -                highlights (dict): Use it to highlight the match of filters.query.
      -                        To enable highlights with default parameters, pass an empty object.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'list_archives', 'payload': payload})
      -
      -    def start_chat(self,
      -                   chat: dict = None,
      -                   active: bool = None,
      -                   continuous: bool = None,
      -                   payload: dict = None) -> RtmResponse:
      -        ''' Starts a chat.
      -
      -            Args:
      -                chat (dict): Chat object.
      -                active (bool): When set to False, creates an inactive thread; default: True.
      -                continuous (bool): Starts chat as continuous (online group is not required); default: False.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'start_chat', 'payload': payload})
      -
      -    def resume_chat(self,
      -                    chat: dict = None,
      -                    active: bool = None,
      -                    continuous: bool = None,
      -                    payload: dict = None) -> RtmResponse:
      -        ''' Restarts an archived chat.
      -
      -            Args:
      -                chat (dict): Chat object.
      -                active (bool): When set to False, creates an inactive thread; default: True.
      -                continuous (bool): Sets a chat to the continuous mode. When unset, leaves the mode unchanged.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'resume_chat', 'payload': payload})
      -
      -    def deactivate_chat(self,
      -                        id: str = None,
      -                        ignore_requester_presence: bool = None,
      -                        payload: dict = None) -> RtmResponse:
      -        ''' Deactivates a chat by closing the currently open thread.
      -
      -            Args:
      -                id (str): Chat ID to deactivate.
      -                ignore_requester_presence (bool): If `True`, allows requester to deactivate chat
      -                                                  without being present in the chat's users list.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'deactivate_chat', 'payload': payload})
      -
      -    def follow_chat(self, id: str = None, payload: dict = None) -> RtmResponse:
      -        ''' Marks a chat as followed.
      -
      -            Args:
      -                id (str): Chat ID to follow.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'follow_chat', 'payload': payload})
      -
      -    def unfollow_chat(self,
      -                      id: str = None,
      -                      payload: dict = None) -> RtmResponse:
      -        ''' Removes the requester from the chat followers.
      -
      -            Args:
      -                id (str): Chat ID to unfollow.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'unfollow_chat', 'payload': payload})
      -
      -# Chat access
      -
      -    def transfer_chat(self,
      -                      id: str = None,
      -                      target: dict = None,
      -                      ignore_agents_availability: bool = None,
      -                      ignore_requester_presence: bool = None,
      -                      payload: dict = None) -> RtmResponse:
      -        ''' Transfers a chat to an agent or a group.
      -
      -            Args:
      -                id (str): Chat ID.
      -                target (dict): Target object. If missing, the chat will be
      -                        transferred within the current group.
      -                ignore_agents_availability (bool): If `True`, always transfers chats. Otherwise, fails
      -                              when unable to assign any agent from the requested groups.
      -                ignore_requester_presence (bool): If `True`, allows requester to transfer chat
      -                                                  without being present in the chat's users list.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'transfer_chat', 'payload': payload})
      -
      -# Chat users
      -
      -    def add_user_to_chat(self,
      -                         chat_id: str = None,
      -                         user_id: str = None,
      -                         user_type: str = None,
      -                         visibility: str = None,
      -                         ignore_requester_presence: bool = None,
      -                         payload: dict = None) -> RtmResponse:
      -        ''' Adds a user to the chat. You can't add more than
      -            one customer user type to the chat.
      -
      -            Args:
      -                chat_id (str): Chat ID.
      -                user_id (str): ID of the user that will be added to the chat.
      -                user_type (str): Possible values: agent or customer.
      -                visibility (str): Determines the visibility of events sent by
      -                                  the agent. Possible values: `all` or `agents`.
      -                ignore_requester_presence (bool): If `True`, allows requester to add user to chat
      -                                                  without being present in the chat's users list.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for
      -                                the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'add_user_to_chat', 'payload': payload})
      -
      -    def remove_user_from_chat(self,
      -                              chat_id: str = None,
      -                              user_id: str = None,
      -                              user_type: str = None,
      -                              ignore_requester_presence: bool = None,
      -                              payload: dict = None) -> RtmResponse:
      -        ''' Removes a user from chat.
      -
      -            Args:
      -                chat_id (str): Chat ID.
      -                user_id (str): ID of the user that will be added to the chat.
      -                user_type (str): Possible values: agent or customer.
      -                ignore_requester_presence (bool): If `True`, allows requester to remove user from chat
      -                                                  without being present in the chat's users list.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'remove_user_from_chat',
      -            'payload': payload
      -        })
      -
      -# Events
      -
      -    def send_event(self,
      -                   chat_id: str = None,
      -                   event: dict = None,
      -                   attach_to_last_thread: bool = None,
      -                   author_id: Optional[str] = None,
      -                   payload: dict = None) -> RtmResponse:
      -        ''' Sends an Event object.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to send the message to.
      -                event (dict): Event object.
      -                attach_to_last_thread (bool): Flag which states if event object should be added to last thread.
      -                        The flag is ignored for active chats.
      -                author_id (optional str): Provide if the event should be sent on behalf of a bot.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        opts = {}
      -        if author_id:
      -            opts['author_id'] = author_id
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'send_event',
      -            'payload': payload,
      -            **opts
      -        })
      -
      -    def send_rich_message_postback(self,
      -                                   chat_id: str = None,
      -                                   thread_id: str = None,
      -                                   event_id: str = None,
      -                                   postback: dict = None,
      -                                   payload: dict = None) -> RtmResponse:
      -        ''' Sends rich message postback.
      -
      -            Args:
      -                chat_id (str): ID of the chat to send a rich message to.
      -                thread_id (str): ID of the thread.
      -                event_id (str): ID of the event.
      -                postback (dict): Postback object.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'send_rich_message_postback',
      -            'payload': payload
      -        })
      -
      -# Properties
      -
      -    def update_chat_properties(self,
      -                               id: str = None,
      -                               properties: dict = None,
      -                               payload: dict = None) -> RtmResponse:
      -        ''' Updates chat properties.
      -
      -            Args:
      -                id (str): ID of the chat you to set a property for.
      -                properties (dict): Chat properties to set.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'update_chat_properties',
      -            'payload': payload
      -        })
      -
      -    def delete_chat_properties(self,
      -                               id: str = None,
      -                               properties: dict = None,
      -                               payload: dict = None) -> RtmResponse:
      -        ''' Deletes chat properties.
      -
      -            Args:
      -                id (str): ID of the chat you want to delete properties of.
      -                properties (dict): Chat properties to delete.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'delete_chat_properties',
      -            'payload': payload
      -        })
      -
      -    def update_thread_properties(self,
      -                                 chat_id: str = None,
      -                                 thread_id: str = None,
      -                                 properties: dict = None,
      -                                 payload: dict = None) -> RtmResponse:
      -        ''' Updates thread properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to set properties for.
      -                thread_id (str): ID of the thread you want to set properties for.
      -                properties (dict): Chat properties to set.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'update_thread_properties',
      -            'payload': payload
      -        })
      -
      -    def delete_thread_properties(self,
      -                                 chat_id: str = None,
      -                                 thread_id: str = None,
      -                                 properties: dict = None,
      -                                 payload: dict = None) -> RtmResponse:
      -        ''' Deletes thread properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to delete the properties of.
      -                thread_id (str): ID of the thread you want to delete the properties of.
      -                properties (dict): Thread properties to delete.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'delete_thread_properties',
      -            'payload': payload
      -        })
      -
      -    def update_event_properties(self,
      -                                chat_id: str = None,
      -                                thread_id: str = None,
      -                                event_id: str = None,
      -                                properties: dict = None,
      -                                payload: dict = None) -> RtmResponse:
      -        ''' Updates event properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to set properties for.
      -                thread_id (str): ID of the thread you want to set properties for.
      -                event_id (str): ID of the event you want to set properties for.
      -                properties (dict): Chat properties to set.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'update_event_properties',
      -            'payload': payload
      -        })
      -
      -    def delete_event_properties(self,
      -                                chat_id: str = None,
      -                                thread_id: str = None,
      -                                event_id: str = None,
      -                                properties: dict = None,
      -                                payload: dict = None) -> RtmResponse:
      -        ''' Deletes event properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to delete the properties of.
      -                thread_id (str): ID of the thread you want to delete the properties of.
      -                event_id (str): ID of the event you want to delete the properties of.
      -                properties (dict): Event properties to delete.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'delete_event_properties',
      -            'payload': payload
      -        })
      -
      -# Thread tags
      -
      -    def tag_thread(self,
      -                   chat_id: str = None,
      -                   thread_id: str = None,
      -                   tag: str = None,
      -                   payload: dict = None) -> RtmResponse:
      -        ''' Tags thread.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to add a tag to.
      -                thread_id (str): ID of the thread you want to add a tag to.
      -                tag (str): Tag name.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'tag_thread', 'payload': payload})
      -
      -    def untag_thread(self,
      -                     chat_id: str = None,
      -                     thread_id: str = None,
      -                     tag: str = None,
      -                     payload: dict = None) -> RtmResponse:
      -        ''' Untags thread.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to remove a tag from.
      -                thread_id (str): ID of the thread you want to remove a tag from.
      -                tag (str): Tag name.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'untag_thread', 'payload': payload})
      -
      -# Customers
      -
      -    def get_customer(self,
      -                     id: str = None,
      -                     payload: dict = None) -> RtmResponse:
      -        ''' Returns the info about the Customer with a given ID.
      -
      -            Args:
      -                id (str): ID of the Customer.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'get_customer', 'payload': payload})
      -
      -    def list_customers(self,
      -                       page_id: str = None,
      -                       limit: int = None,
      -                       sort_order: str = None,
      -                       sort_by: str = None,
      -                       filters: dict = None,
      -                       payload: dict = None) -> RtmResponse:
      -        ''' Returns the list of Customers.
      -
      -            Args:
      -                page_id (str): Page ID.
      -                limit (int): Customers limit. Default: 10, maximum: 100.
      -                sort_order (str): Possible values: asc, desc (default). Customers are sorted
      -                        by the creation date.
      -                sort_by (str): Possible values: created_at (default), threads_count, visits_count,
      -                        agent_last_event or customer_last_event.
      -                filters (dict): Filters object.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'list_customers', 'payload': payload})
      -
      -    def create_customer(self,
      -                        name: str = None,
      -                        email: str = None,
      -                        avatar: str = None,
      -                        session_fields: list = None,
      -                        payload: dict = None) -> RtmResponse:
      -        ''' Creates a new Customer user type.
      -
      -            Args:
      -                name (str): Customer's name.
      -                email (str): Customer's email.
      -                avatar (str): URL of the Customer's avatar.
      -                session_fields (list): An array of custom object-enclosed key:value pairs.
      -                        Respects the order of items.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'create_customer', 'payload': payload})
      -
      -    def update_customer(self,
      -                        id: str = None,
      -                        name: str = None,
      -                        email: str = None,
      -                        avatar: str = None,
      -                        session_fields: list = None,
      -                        payload: dict = None) -> RtmResponse:
      -        ''' Updates Customer's properties.
      -
      -            Args:
      -                id (str): ID of the Customer. UUID v4 format is required.
      -                name (str): Customer's name.
      -                email (str): Customer's email.
      -                avatar (str): URL of the Customer's avatar.
      -                session_fields (list): An array of custom object-enclosed key:value pairs.
      -                        Respects the order of items.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'update_customer', 'payload': payload})
      -
      -    def ban_customer(self,
      -                     id: str = None,
      -                     ban: dict = None,
      -                     payload: dict = None) -> RtmResponse:
      -        ''' Bans the customer for a specific period of time.
      -
      -            Args:
      -                id (str): ID of the Customer. UUID v4 format is required.
      -                ban (dict): Ban object containing the number of days that
      -                        the Customer will be banned.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'ban_customer', 'payload': payload})
      -
      -    def follow_customer(self,
      -                        id: str = None,
      -                        payload: dict = None) -> RtmResponse:
      -        ''' Marks a customer as followed.
      -
      -            Args:
      -                id (str): ID of the Customer. UUID v4 format is required.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'follow_customer', 'payload': payload})
      -
      -    def unfollow_customer(self,
      -                          id: str = None,
      -                          payload: dict = None) -> RtmResponse:
      -        ''' Removes the agent from the list of customer's followers.
      -
      -            Args:
      -                id (str): ID of the Customer. UUID v4 format is required.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'unfollow_customer',
      -            'payload': payload
      -        })
      -
      -# Status
      -
      -    def login(self,
      -              token: Union[AccessToken, str] = None,
      -              timezone: str = None,
      -              reconnect: bool = None,
      -              push_notifications: dict = None,
      -              application: dict = None,
      -              away: bool = None,
      -              customer_monitoring_level: str = None,
      -              pushes: dict = None,
      -              payload: dict = None) -> RtmResponse:
      -        ''' Logs in agent.
      -
      -            Args:
      -                token (str): OAuth token from the Agent's account.
      -                timezone (str): Agent's timezone.
      -                reconnect (bool): Reconnecting sets the status to the
      -                        last known state instead of the default one.
      -                push_notifications (dict): Push notifications for the requested token.
      -                application (dict): Object containing information related to
      -                        the application's name and version.
      -                away (bool): When True, the connection is set to the away state.
      -                        Defaults to False.
      -                customer_monitoring_level (str): Possible values are: `my`, `chatting`, `invited`, `online` and `highest_available`.
      -                        Defaults to my if login creates the first session;
      -                        otherwise it preserves the current customer_monitoring_level.
      -                pushes (dict): Use case: when you want to receive only specific pushes.
      -                By default, it's set to all for the version of your currently established RTM connection.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if token:
      -            token = str(token)
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'login', 'payload': payload})
      -
      -    def change_push_notifications(self,
      -                                  firebase_token: str = None,
      -                                  platform: str = None,
      -                                  enabled: bool = None,
      -                                  payload: dict = None) -> RtmResponse:
      -        ''' Changes the firebase push notifications properties.
      -
      -            Args:
      -                firebase_token (str): Firebase device token.
      -                platform (str): OS platform. Possible values: ios, android.
      -                enabled (bool): Enable or disable push notifications for the requested token.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'change_push_notifications',
      -            'payload': payload
      -        })
      -
      -    def set_routing_status(self,
      -                           status: str = None,
      -                           agent_id: str = None,
      -                           payload: dict = None) -> RtmResponse:
      -        ''' Changes the status of an Agent or a Bot Agent.
      -
      -            Args:
      -                status (str): For Agents: accepting_chats or not_accepting_chats.
      -                        For Bot Agents: accepting_chats, not_accepting_chats, or offline.
      -                agent_id (str): If not specified, the requester's status will be updated.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'set_routing_status',
      -            'payload': payload
      -        })
      -
      -    def set_away_status(self,
      -                        away: bool = None,
      -                        payload: dict = None) -> RtmResponse:
      -        ''' Sets an Agent's connection to the away state.
      -
      -            Args:
      -                away (bool): A flag.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'set_away_status', 'payload': payload})
      -
      -    def logout(self, payload: dict = None) -> RtmResponse:
      -        ''' Logs out agent.
      -
      -            Args:
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        return self.ws.send({
      -            'action': 'logout',
      -            'payload': {} if payload is None else payload
      -        })
      -
      -    def list_routing_statuses(self,
      -                              filters: dict = None,
      -                              payload: dict = None) -> RtmResponse:
      -        ''' Returns the current routing status of each agent selected by the provided filters.
      -
      -            Args:
      -                filters (dict): Filters object.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'list_routing_statuses',
      -            'payload': payload
      -        })
      -
      -
      -# Other
      -
      -    def mark_events_as_seen(self,
      -                            chat_id: str = None,
      -                            seen_up_to: str = None,
      -                            payload: dict = None) -> RtmResponse:
      -        ''' Marks events as seen by agent.
      -
      -            Args:
      -                chat_id (str): Chat to mark events.
      -                seen_up_to (str): Date up to which mark events - RFC 3339 date-time format.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'mark_events_as_seen',
      -            'payload': payload
      -        })
      -
      -    def send_typing_indicator(self,
      -                              chat_id: str = None,
      -                              visibility: str = None,
      -                              is_typing: bool = None,
      -                              payload: dict = None) -> RtmResponse:
      -        ''' Sends a typing indicator.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to send the typing indicator to.
      -                visibility (str): Possible values: `all`, `agents`.
      -                is_typing (bool): A flag that indicates if you are typing.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'send_typing_indicator',
      -            'payload': payload
      -        })
      -
      -    def multicast(self,
      -                  recipients: dict = None,
      -                  content: Any = None,
      -                  type: str = None,
      -                  payload: dict = None) -> RtmResponse:
      -        ''' Sends a multicast (chat-unrelated communication).
      -
      -            Args:
      -                recipients (object): Object containing filters related to multicast recipients.
      -                content (typing.Any): A JSON message to be sent.
      -                type (str): Multicast message type.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'multicast', 'payload': payload})
      -
      -    def list_agents_for_transfer(self,
      -                                 chat_id: str = None,
      -                                 payload: dict = None) -> RtmResponse:
      -        ''' Returns the list of Agents you can transfer a chat to.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to transfer.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'list_agents_for_transfer',
      -            'payload': payload
      -        })
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Classes

      -
      -
      -class AgentRtmV34 -(url: str, header: Union[list, dict, Callable, None]) -
      -
      -

      Agent RTM API Class containing methods in version 3.4.

      -
      - -Expand source code - -
      class AgentRtmV34:
      -    ''' Agent RTM API Class containing methods in version 3.4. '''
      -    def __init__(
      -        self,
      -        url: str,
      -        header: Union[list, dict, Callable, None],
      -    ):
      -        self.ws = WebsocketClient(url=f'wss://{url}/v3.4/agent/rtm/ws',
      -                                  header=header)
      -
      -    def open_connection(self,
      -                        origin: dict = None,
      -                        ping_timeout: Union[float, int] = 3,
      -                        ping_interval: Union[float, int] = 5,
      -                        ws_conn_timeout: Union[float, int] = 10,
      -                        keep_alive: bool = True,
      -                        response_timeout: Union[float, int] = 3) -> None:
      -        ''' Opens WebSocket connection.
      -
      -            Args:
      -                origin (dict): Specifies origin while creating websocket connection.
      -                ping_timeout (int or float): timeout (in seconds) if the pong message is not received,
      -                    by default sets to 3 seconds.
      -                ping_interval (int or float): automatically sends "ping" command every specified period (in seconds).
      -                    If set to 0, no ping is sent periodically, by default sets to 5 seconds.
      -                ws_conn_timeout (int or float): timeout (in seconds) to wait for WebSocket connection,
      -                    by default sets to 10 seconds.
      -                keep_alive(bool): Bool which states if connection should be kept, by default sets to `True`.
      -                response_timeout (int or float): timeout (in seconds) to wait for the response,
      -                    by default sets to 3 seconds.
      -        '''
      -        self.ws.open(origin, ping_timeout, ping_interval, ws_conn_timeout,
      -                     keep_alive, response_timeout)
      -
      -    def close_connection(self) -> None:
      -        ''' Closes WebSocket connection. '''
      -        self.ws.close()
      -
      -    # Chats
      -
      -    def list_chats(self,
      -                   filters: dict = None,
      -                   sort_order: str = None,
      -                   limit: int = None,
      -                   page_id: str = None,
      -                   payload: dict = None) -> RtmResponse:
      -        ''' Returns summaries of the chats an Agent has access to.
      -
      -            Args:
      -                filters (dict): Possible request filters. Mustn't change between requests for subsequent pages.
      -                        Otherwise, the behavior is undefined.
      -                sort_order (str): Possible values: asc, desc (default). Chat summaries are sorted by the
      -                        creation date of its last thread.
      -                limit (int): Chats limit per page. Default: 10, maximum: 100.
      -                page_id (str): Page ID.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'list_chats', 'payload': payload})
      -
      -    def list_threads(self,
      -                     chat_id: str = None,
      -                     sort_order: str = None,
      -                     limit: int = None,
      -                     page_id: str = None,
      -                     min_events_count: int = None,
      -                     filters: dict = None,
      -                     payload: dict = None) -> RtmResponse:
      -        ''' Returns threads that the current Agent has access to in a given chat.
      -
      -            Args:
      -                chat_id (str): Chat ID to get threads from.
      -                sort_order (str): Possible values: asc - oldest threads first and desc -
      -                        newest threads first (default).
      -                limit (int): Default: 3, maximum: 100.
      -                page_id (str): Page ID.
      -                min_events_count (int): Range: 1-100; Specifies the minimum number of
      -                        events to be returned in the response.
      -                filters (dict): Filters object.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'list_threads', 'payload': payload})
      -
      -    def get_chat(self,
      -                 chat_id: str = None,
      -                 thread_id: str = None,
      -                 payload: dict = None) -> RtmResponse:
      -        ''' Returns a thread that the current Agent has access to in a given chat.
      -
      -            Args:
      -                chat_id (str): ID of a chat to get.
      -                thread_id (str): Thread ID to get. Default: the latest thread (if exists).
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'get_chat', 'payload': payload})
      -
      -    def list_archives(self,
      -                      filters: dict = None,
      -                      page_id: str = None,
      -                      sort_order: str = None,
      -                      limit: int = None,
      -                      highlights: dict = None,
      -                      payload: dict = None) -> RtmResponse:
      -        ''' Returns a list of the chats an Agent has access to.
      -
      -            Args:
      -                filters (dict): Filters object.
      -                page_id (str): Page ID.
      -                sort_order (str): Possible values: asc - oldest threads first and desc -
      -                        newest threads first (default).
      -                limit (int): Default: 10, minimum: 1, maximum: 100.
      -                highlights (dict): Use it to highlight the match of filters.query.
      -                        To enable highlights with default parameters, pass an empty object.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'list_archives', 'payload': payload})
      -
      -    def start_chat(self,
      -                   chat: dict = None,
      -                   active: bool = None,
      -                   continuous: bool = None,
      -                   payload: dict = None) -> RtmResponse:
      -        ''' Starts a chat.
      -
      -            Args:
      -                chat (dict): Chat object.
      -                active (bool): When set to False, creates an inactive thread; default: True.
      -                continuous (bool): Starts chat as continuous (online group is not required); default: False.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'start_chat', 'payload': payload})
      -
      -    def resume_chat(self,
      -                    chat: dict = None,
      -                    active: bool = None,
      -                    continuous: bool = None,
      -                    payload: dict = None) -> RtmResponse:
      -        ''' Restarts an archived chat.
      -
      -            Args:
      -                chat (dict): Chat object.
      -                active (bool): When set to False, creates an inactive thread; default: True.
      -                continuous (bool): Sets a chat to the continuous mode. When unset, leaves the mode unchanged.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'resume_chat', 'payload': payload})
      -
      -    def deactivate_chat(self,
      -                        id: str = None,
      -                        ignore_requester_presence: bool = None,
      -                        payload: dict = None) -> RtmResponse:
      -        ''' Deactivates a chat by closing the currently open thread.
      -
      -            Args:
      -                id (str): Chat ID to deactivate.
      -                ignore_requester_presence (bool): If `True`, allows requester to deactivate chat
      -                                                  without being present in the chat's users list.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'deactivate_chat', 'payload': payload})
      -
      -    def follow_chat(self, id: str = None, payload: dict = None) -> RtmResponse:
      -        ''' Marks a chat as followed.
      -
      -            Args:
      -                id (str): Chat ID to follow.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'follow_chat', 'payload': payload})
      -
      -    def unfollow_chat(self,
      -                      id: str = None,
      -                      payload: dict = None) -> RtmResponse:
      -        ''' Removes the requester from the chat followers.
      -
      -            Args:
      -                id (str): Chat ID to unfollow.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'unfollow_chat', 'payload': payload})
      -
      -# Chat access
      -
      -    def transfer_chat(self,
      -                      id: str = None,
      -                      target: dict = None,
      -                      ignore_agents_availability: bool = None,
      -                      ignore_requester_presence: bool = None,
      -                      payload: dict = None) -> RtmResponse:
      -        ''' Transfers a chat to an agent or a group.
      -
      -            Args:
      -                id (str): Chat ID.
      -                target (dict): Target object. If missing, the chat will be
      -                        transferred within the current group.
      -                ignore_agents_availability (bool): If `True`, always transfers chats. Otherwise, fails
      -                              when unable to assign any agent from the requested groups.
      -                ignore_requester_presence (bool): If `True`, allows requester to transfer chat
      -                                                  without being present in the chat's users list.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'transfer_chat', 'payload': payload})
      -
      -# Chat users
      -
      -    def add_user_to_chat(self,
      -                         chat_id: str = None,
      -                         user_id: str = None,
      -                         user_type: str = None,
      -                         visibility: str = None,
      -                         ignore_requester_presence: bool = None,
      -                         payload: dict = None) -> RtmResponse:
      -        ''' Adds a user to the chat. You can't add more than
      -            one customer user type to the chat.
      -
      -            Args:
      -                chat_id (str): Chat ID.
      -                user_id (str): ID of the user that will be added to the chat.
      -                user_type (str): Possible values: agent or customer.
      -                visibility (str): Determines the visibility of events sent by
      -                                  the agent. Possible values: `all` or `agents`.
      -                ignore_requester_presence (bool): If `True`, allows requester to add user to chat
      -                                                  without being present in the chat's users list.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for
      -                                the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'add_user_to_chat', 'payload': payload})
      -
      -    def remove_user_from_chat(self,
      -                              chat_id: str = None,
      -                              user_id: str = None,
      -                              user_type: str = None,
      -                              ignore_requester_presence: bool = None,
      -                              payload: dict = None) -> RtmResponse:
      -        ''' Removes a user from chat.
      -
      -            Args:
      -                chat_id (str): Chat ID.
      -                user_id (str): ID of the user that will be added to the chat.
      -                user_type (str): Possible values: agent or customer.
      -                ignore_requester_presence (bool): If `True`, allows requester to remove user from chat
      -                                                  without being present in the chat's users list.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'remove_user_from_chat',
      -            'payload': payload
      -        })
      -
      -# Events
      -
      -    def send_event(self,
      -                   chat_id: str = None,
      -                   event: dict = None,
      -                   attach_to_last_thread: bool = None,
      -                   author_id: Optional[str] = None,
      -                   payload: dict = None) -> RtmResponse:
      -        ''' Sends an Event object.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to send the message to.
      -                event (dict): Event object.
      -                attach_to_last_thread (bool): Flag which states if event object should be added to last thread.
      -                        The flag is ignored for active chats.
      -                author_id (optional str): Provide if the event should be sent on behalf of a bot.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        opts = {}
      -        if author_id:
      -            opts['author_id'] = author_id
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'send_event',
      -            'payload': payload,
      -            **opts
      -        })
      -
      -    def send_rich_message_postback(self,
      -                                   chat_id: str = None,
      -                                   thread_id: str = None,
      -                                   event_id: str = None,
      -                                   postback: dict = None,
      -                                   payload: dict = None) -> RtmResponse:
      -        ''' Sends rich message postback.
      -
      -            Args:
      -                chat_id (str): ID of the chat to send a rich message to.
      -                thread_id (str): ID of the thread.
      -                event_id (str): ID of the event.
      -                postback (dict): Postback object.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'send_rich_message_postback',
      -            'payload': payload
      -        })
      -
      -# Properties
      -
      -    def update_chat_properties(self,
      -                               id: str = None,
      -                               properties: dict = None,
      -                               payload: dict = None) -> RtmResponse:
      -        ''' Updates chat properties.
      -
      -            Args:
      -                id (str): ID of the chat you to set a property for.
      -                properties (dict): Chat properties to set.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'update_chat_properties',
      -            'payload': payload
      -        })
      -
      -    def delete_chat_properties(self,
      -                               id: str = None,
      -                               properties: dict = None,
      -                               payload: dict = None) -> RtmResponse:
      -        ''' Deletes chat properties.
      -
      -            Args:
      -                id (str): ID of the chat you want to delete properties of.
      -                properties (dict): Chat properties to delete.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'delete_chat_properties',
      -            'payload': payload
      -        })
      -
      -    def update_thread_properties(self,
      -                                 chat_id: str = None,
      -                                 thread_id: str = None,
      -                                 properties: dict = None,
      -                                 payload: dict = None) -> RtmResponse:
      -        ''' Updates thread properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to set properties for.
      -                thread_id (str): ID of the thread you want to set properties for.
      -                properties (dict): Chat properties to set.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'update_thread_properties',
      -            'payload': payload
      -        })
      -
      -    def delete_thread_properties(self,
      -                                 chat_id: str = None,
      -                                 thread_id: str = None,
      -                                 properties: dict = None,
      -                                 payload: dict = None) -> RtmResponse:
      -        ''' Deletes thread properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to delete the properties of.
      -                thread_id (str): ID of the thread you want to delete the properties of.
      -                properties (dict): Thread properties to delete.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'delete_thread_properties',
      -            'payload': payload
      -        })
      -
      -    def update_event_properties(self,
      -                                chat_id: str = None,
      -                                thread_id: str = None,
      -                                event_id: str = None,
      -                                properties: dict = None,
      -                                payload: dict = None) -> RtmResponse:
      -        ''' Updates event properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to set properties for.
      -                thread_id (str): ID of the thread you want to set properties for.
      -                event_id (str): ID of the event you want to set properties for.
      -                properties (dict): Chat properties to set.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'update_event_properties',
      -            'payload': payload
      -        })
      -
      -    def delete_event_properties(self,
      -                                chat_id: str = None,
      -                                thread_id: str = None,
      -                                event_id: str = None,
      -                                properties: dict = None,
      -                                payload: dict = None) -> RtmResponse:
      -        ''' Deletes event properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to delete the properties of.
      -                thread_id (str): ID of the thread you want to delete the properties of.
      -                event_id (str): ID of the event you want to delete the properties of.
      -                properties (dict): Event properties to delete.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'delete_event_properties',
      -            'payload': payload
      -        })
      -
      -# Thread tags
      -
      -    def tag_thread(self,
      -                   chat_id: str = None,
      -                   thread_id: str = None,
      -                   tag: str = None,
      -                   payload: dict = None) -> RtmResponse:
      -        ''' Tags thread.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to add a tag to.
      -                thread_id (str): ID of the thread you want to add a tag to.
      -                tag (str): Tag name.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'tag_thread', 'payload': payload})
      -
      -    def untag_thread(self,
      -                     chat_id: str = None,
      -                     thread_id: str = None,
      -                     tag: str = None,
      -                     payload: dict = None) -> RtmResponse:
      -        ''' Untags thread.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to remove a tag from.
      -                thread_id (str): ID of the thread you want to remove a tag from.
      -                tag (str): Tag name.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'untag_thread', 'payload': payload})
      -
      -# Customers
      -
      -    def get_customer(self,
      -                     id: str = None,
      -                     payload: dict = None) -> RtmResponse:
      -        ''' Returns the info about the Customer with a given ID.
      -
      -            Args:
      -                id (str): ID of the Customer.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'get_customer', 'payload': payload})
      -
      -    def list_customers(self,
      -                       page_id: str = None,
      -                       limit: int = None,
      -                       sort_order: str = None,
      -                       sort_by: str = None,
      -                       filters: dict = None,
      -                       payload: dict = None) -> RtmResponse:
      -        ''' Returns the list of Customers.
      -
      -            Args:
      -                page_id (str): Page ID.
      -                limit (int): Customers limit. Default: 10, maximum: 100.
      -                sort_order (str): Possible values: asc, desc (default). Customers are sorted
      -                        by the creation date.
      -                sort_by (str): Possible values: created_at (default), threads_count, visits_count,
      -                        agent_last_event or customer_last_event.
      -                filters (dict): Filters object.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'list_customers', 'payload': payload})
      -
      -    def create_customer(self,
      -                        name: str = None,
      -                        email: str = None,
      -                        avatar: str = None,
      -                        session_fields: list = None,
      -                        payload: dict = None) -> RtmResponse:
      -        ''' Creates a new Customer user type.
      -
      -            Args:
      -                name (str): Customer's name.
      -                email (str): Customer's email.
      -                avatar (str): URL of the Customer's avatar.
      -                session_fields (list): An array of custom object-enclosed key:value pairs.
      -                        Respects the order of items.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'create_customer', 'payload': payload})
      -
      -    def update_customer(self,
      -                        id: str = None,
      -                        name: str = None,
      -                        email: str = None,
      -                        avatar: str = None,
      -                        session_fields: list = None,
      -                        payload: dict = None) -> RtmResponse:
      -        ''' Updates Customer's properties.
      -
      -            Args:
      -                id (str): ID of the Customer. UUID v4 format is required.
      -                name (str): Customer's name.
      -                email (str): Customer's email.
      -                avatar (str): URL of the Customer's avatar.
      -                session_fields (list): An array of custom object-enclosed key:value pairs.
      -                        Respects the order of items.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'update_customer', 'payload': payload})
      -
      -    def ban_customer(self,
      -                     id: str = None,
      -                     ban: dict = None,
      -                     payload: dict = None) -> RtmResponse:
      -        ''' Bans the customer for a specific period of time.
      -
      -            Args:
      -                id (str): ID of the Customer. UUID v4 format is required.
      -                ban (dict): Ban object containing the number of days that
      -                        the Customer will be banned.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'ban_customer', 'payload': payload})
      -
      -    def follow_customer(self,
      -                        id: str = None,
      -                        payload: dict = None) -> RtmResponse:
      -        ''' Marks a customer as followed.
      -
      -            Args:
      -                id (str): ID of the Customer. UUID v4 format is required.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'follow_customer', 'payload': payload})
      -
      -    def unfollow_customer(self,
      -                          id: str = None,
      -                          payload: dict = None) -> RtmResponse:
      -        ''' Removes the agent from the list of customer's followers.
      -
      -            Args:
      -                id (str): ID of the Customer. UUID v4 format is required.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'unfollow_customer',
      -            'payload': payload
      -        })
      -
      -# Status
      -
      -    def login(self,
      -              token: Union[AccessToken, str] = None,
      -              timezone: str = None,
      -              reconnect: bool = None,
      -              push_notifications: dict = None,
      -              application: dict = None,
      -              away: bool = None,
      -              customer_monitoring_level: str = None,
      -              pushes: dict = None,
      -              payload: dict = None) -> RtmResponse:
      -        ''' Logs in agent.
      -
      -            Args:
      -                token (str): OAuth token from the Agent's account.
      -                timezone (str): Agent's timezone.
      -                reconnect (bool): Reconnecting sets the status to the
      -                        last known state instead of the default one.
      -                push_notifications (dict): Push notifications for the requested token.
      -                application (dict): Object containing information related to
      -                        the application's name and version.
      -                away (bool): When True, the connection is set to the away state.
      -                        Defaults to False.
      -                customer_monitoring_level (str): Possible values are: `my`, `chatting`, `invited`, `online` and `highest_available`.
      -                        Defaults to my if login creates the first session;
      -                        otherwise it preserves the current customer_monitoring_level.
      -                pushes (dict): Use case: when you want to receive only specific pushes.
      -                By default, it's set to all for the version of your currently established RTM connection.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if token:
      -            token = str(token)
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'login', 'payload': payload})
      -
      -    def change_push_notifications(self,
      -                                  firebase_token: str = None,
      -                                  platform: str = None,
      -                                  enabled: bool = None,
      -                                  payload: dict = None) -> RtmResponse:
      -        ''' Changes the firebase push notifications properties.
      -
      -            Args:
      -                firebase_token (str): Firebase device token.
      -                platform (str): OS platform. Possible values: ios, android.
      -                enabled (bool): Enable or disable push notifications for the requested token.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'change_push_notifications',
      -            'payload': payload
      -        })
      -
      -    def set_routing_status(self,
      -                           status: str = None,
      -                           agent_id: str = None,
      -                           payload: dict = None) -> RtmResponse:
      -        ''' Changes the status of an Agent or a Bot Agent.
      -
      -            Args:
      -                status (str): For Agents: accepting_chats or not_accepting_chats.
      -                        For Bot Agents: accepting_chats, not_accepting_chats, or offline.
      -                agent_id (str): If not specified, the requester's status will be updated.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'set_routing_status',
      -            'payload': payload
      -        })
      -
      -    def set_away_status(self,
      -                        away: bool = None,
      -                        payload: dict = None) -> RtmResponse:
      -        ''' Sets an Agent's connection to the away state.
      -
      -            Args:
      -                away (bool): A flag.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'set_away_status', 'payload': payload})
      -
      -    def logout(self, payload: dict = None) -> RtmResponse:
      -        ''' Logs out agent.
      -
      -            Args:
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        return self.ws.send({
      -            'action': 'logout',
      -            'payload': {} if payload is None else payload
      -        })
      -
      -    def list_routing_statuses(self,
      -                              filters: dict = None,
      -                              payload: dict = None) -> RtmResponse:
      -        ''' Returns the current routing status of each agent selected by the provided filters.
      -
      -            Args:
      -                filters (dict): Filters object.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'list_routing_statuses',
      -            'payload': payload
      -        })
      -
      -
      -# Other
      -
      -    def mark_events_as_seen(self,
      -                            chat_id: str = None,
      -                            seen_up_to: str = None,
      -                            payload: dict = None) -> RtmResponse:
      -        ''' Marks events as seen by agent.
      -
      -            Args:
      -                chat_id (str): Chat to mark events.
      -                seen_up_to (str): Date up to which mark events - RFC 3339 date-time format.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'mark_events_as_seen',
      -            'payload': payload
      -        })
      -
      -    def send_typing_indicator(self,
      -                              chat_id: str = None,
      -                              visibility: str = None,
      -                              is_typing: bool = None,
      -                              payload: dict = None) -> RtmResponse:
      -        ''' Sends a typing indicator.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to send the typing indicator to.
      -                visibility (str): Possible values: `all`, `agents`.
      -                is_typing (bool): A flag that indicates if you are typing.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'send_typing_indicator',
      -            'payload': payload
      -        })
      -
      -    def multicast(self,
      -                  recipients: dict = None,
      -                  content: Any = None,
      -                  type: str = None,
      -                  payload: dict = None) -> RtmResponse:
      -        ''' Sends a multicast (chat-unrelated communication).
      -
      -            Args:
      -                recipients (object): Object containing filters related to multicast recipients.
      -                content (typing.Any): A JSON message to be sent.
      -                type (str): Multicast message type.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({'action': 'multicast', 'payload': payload})
      -
      -    def list_agents_for_transfer(self,
      -                                 chat_id: str = None,
      -                                 payload: dict = None) -> RtmResponse:
      -        ''' Returns the list of Agents you can transfer a chat to.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to transfer.
      -                payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -
      -            Returns:
      -                RtmResponse: RTM response structure (`request_id`, `action`,
      -                             `type`, `success` and `payload` properties)
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.ws.send({
      -            'action': 'list_agents_for_transfer',
      -            'payload': payload
      -        })
      -
      -

      Methods

      -
      -
      -def add_user_to_chat(self, chat_id: str = None, user_id: str = None, user_type: str = None, visibility: str = None, ignore_requester_presence: bool = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Adds a user to the chat. You can't add more than -one customer user type to the chat.

      -

      Args

      -
      -
      chat_id : str
      -
      Chat ID.
      -
      user_id : str
      -
      ID of the user that will be added to the chat.
      -
      user_type : str
      -
      Possible values: agent or customer.
      -
      visibility : str
      -
      Determines the visibility of events sent by -the agent. Possible values: all or agents.
      -
      ignore_requester_presence : bool
      -
      If True, allows requester to add user to chat -without being present in the chat's users list.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for -the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def add_user_to_chat(self,
      -                     chat_id: str = None,
      -                     user_id: str = None,
      -                     user_type: str = None,
      -                     visibility: str = None,
      -                     ignore_requester_presence: bool = None,
      -                     payload: dict = None) -> RtmResponse:
      -    ''' Adds a user to the chat. You can't add more than
      -        one customer user type to the chat.
      -
      -        Args:
      -            chat_id (str): Chat ID.
      -            user_id (str): ID of the user that will be added to the chat.
      -            user_type (str): Possible values: agent or customer.
      -            visibility (str): Determines the visibility of events sent by
      -                              the agent. Possible values: `all` or `agents`.
      -            ignore_requester_presence (bool): If `True`, allows requester to add user to chat
      -                                              without being present in the chat's users list.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for
      -                            the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'add_user_to_chat', 'payload': payload})
      -
      -
      -
      -def ban_customer(self, id: str = None, ban: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Bans the customer for a specific period of time.

      -

      Args

      -
      -
      id : str
      -
      ID of the Customer. UUID v4 format is required.
      -
      ban : dict
      -
      Ban object containing the number of days that -the Customer will be banned.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def ban_customer(self,
      -                 id: str = None,
      -                 ban: dict = None,
      -                 payload: dict = None) -> RtmResponse:
      -    ''' Bans the customer for a specific period of time.
      -
      -        Args:
      -            id (str): ID of the Customer. UUID v4 format is required.
      -            ban (dict): Ban object containing the number of days that
      -                    the Customer will be banned.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'ban_customer', 'payload': payload})
      -
      -
      -
      -def change_push_notifications(self, firebase_token: str = None, platform: str = None, enabled: bool = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Changes the firebase push notifications properties.

      -

      Args

      -
      -
      firebase_token : str
      -
      Firebase device token.
      -
      platform : str
      -
      OS platform. Possible values: ios, android.
      -
      enabled : bool
      -
      Enable or disable push notifications for the requested token.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def change_push_notifications(self,
      -                              firebase_token: str = None,
      -                              platform: str = None,
      -                              enabled: bool = None,
      -                              payload: dict = None) -> RtmResponse:
      -    ''' Changes the firebase push notifications properties.
      -
      -        Args:
      -            firebase_token (str): Firebase device token.
      -            platform (str): OS platform. Possible values: ios, android.
      -            enabled (bool): Enable or disable push notifications for the requested token.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({
      -        'action': 'change_push_notifications',
      -        'payload': payload
      -    })
      -
      -
      -
      -def close_connection(self) ‑> None -
      -
      -

      Closes WebSocket connection.

      -
      - -Expand source code - -
      def close_connection(self) -> None:
      -    ''' Closes WebSocket connection. '''
      -    self.ws.close()
      -
      -
      -
      -def create_customer(self, name: str = None, email: str = None, avatar: str = None, session_fields: list = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Creates a new Customer user type.

      -

      Args

      -
      -
      name : str
      -
      Customer's name.
      -
      email : str
      -
      Customer's email.
      -
      avatar : str
      -
      URL of the Customer's avatar.
      -
      session_fields : list
      -
      An array of custom object-enclosed key:value pairs. -Respects the order of items.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def create_customer(self,
      -                    name: str = None,
      -                    email: str = None,
      -                    avatar: str = None,
      -                    session_fields: list = None,
      -                    payload: dict = None) -> RtmResponse:
      -    ''' Creates a new Customer user type.
      -
      -        Args:
      -            name (str): Customer's name.
      -            email (str): Customer's email.
      -            avatar (str): URL of the Customer's avatar.
      -            session_fields (list): An array of custom object-enclosed key:value pairs.
      -                    Respects the order of items.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'create_customer', 'payload': payload})
      -
      -
      -
      -def deactivate_chat(self, id: str = None, ignore_requester_presence: bool = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Deactivates a chat by closing the currently open thread.

      -

      Args

      -
      -
      id : str
      -
      Chat ID to deactivate.
      -
      ignore_requester_presence : bool
      -
      If True, allows requester to deactivate chat -without being present in the chat's users list.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def deactivate_chat(self,
      -                    id: str = None,
      -                    ignore_requester_presence: bool = None,
      -                    payload: dict = None) -> RtmResponse:
      -    ''' Deactivates a chat by closing the currently open thread.
      -
      -        Args:
      -            id (str): Chat ID to deactivate.
      -            ignore_requester_presence (bool): If `True`, allows requester to deactivate chat
      -                                              without being present in the chat's users list.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'deactivate_chat', 'payload': payload})
      -
      -
      -
      -def delete_chat_properties(self, id: str = None, properties: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Deletes chat properties.

      -

      Args

      -
      -
      id : str
      -
      ID of the chat you want to delete properties of.
      -
      properties : dict
      -
      Chat properties to delete.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def delete_chat_properties(self,
      -                           id: str = None,
      -                           properties: dict = None,
      -                           payload: dict = None) -> RtmResponse:
      -    ''' Deletes chat properties.
      -
      -        Args:
      -            id (str): ID of the chat you want to delete properties of.
      -            properties (dict): Chat properties to delete.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({
      -        'action': 'delete_chat_properties',
      -        'payload': payload
      -    })
      -
      -
      -
      -def delete_event_properties(self, chat_id: str = None, thread_id: str = None, event_id: str = None, properties: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Deletes event properties.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you want to delete the properties of.
      -
      thread_id : str
      -
      ID of the thread you want to delete the properties of.
      -
      event_id : str
      -
      ID of the event you want to delete the properties of.
      -
      properties : dict
      -
      Event properties to delete.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def delete_event_properties(self,
      -                            chat_id: str = None,
      -                            thread_id: str = None,
      -                            event_id: str = None,
      -                            properties: dict = None,
      -                            payload: dict = None) -> RtmResponse:
      -    ''' Deletes event properties.
      -
      -        Args:
      -            chat_id (str): ID of the chat you want to delete the properties of.
      -            thread_id (str): ID of the thread you want to delete the properties of.
      -            event_id (str): ID of the event you want to delete the properties of.
      -            properties (dict): Event properties to delete.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({
      -        'action': 'delete_event_properties',
      -        'payload': payload
      -    })
      -
      -
      -
      -def delete_thread_properties(self, chat_id: str = None, thread_id: str = None, properties: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Deletes thread properties.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you want to delete the properties of.
      -
      thread_id : str
      -
      ID of the thread you want to delete the properties of.
      -
      properties : dict
      -
      Thread properties to delete.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def delete_thread_properties(self,
      -                             chat_id: str = None,
      -                             thread_id: str = None,
      -                             properties: dict = None,
      -                             payload: dict = None) -> RtmResponse:
      -    ''' Deletes thread properties.
      -
      -        Args:
      -            chat_id (str): ID of the chat you want to delete the properties of.
      -            thread_id (str): ID of the thread you want to delete the properties of.
      -            properties (dict): Thread properties to delete.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({
      -        'action': 'delete_thread_properties',
      -        'payload': payload
      -    })
      -
      -
      -
      -def follow_chat(self, id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Marks a chat as followed.

      -

      Args

      -
      -
      id : str
      -
      Chat ID to follow.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def follow_chat(self, id: str = None, payload: dict = None) -> RtmResponse:
      -    ''' Marks a chat as followed.
      -
      -        Args:
      -            id (str): Chat ID to follow.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'follow_chat', 'payload': payload})
      -
      -
      -
      -def follow_customer(self, id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Marks a customer as followed.

      -

      Args

      -
      -
      id : str
      -
      ID of the Customer. UUID v4 format is required.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def follow_customer(self,
      -                    id: str = None,
      -                    payload: dict = None) -> RtmResponse:
      -    ''' Marks a customer as followed.
      -
      -        Args:
      -            id (str): ID of the Customer. UUID v4 format is required.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'follow_customer', 'payload': payload})
      -
      -
      -
      -def get_chat(self, chat_id: str = None, thread_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Returns a thread that the current Agent has access to in a given chat.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of a chat to get.
      -
      thread_id : str
      -
      Thread ID to get. Default: the latest thread (if exists).
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def get_chat(self,
      -             chat_id: str = None,
      -             thread_id: str = None,
      -             payload: dict = None) -> RtmResponse:
      -    ''' Returns a thread that the current Agent has access to in a given chat.
      -
      -        Args:
      -            chat_id (str): ID of a chat to get.
      -            thread_id (str): Thread ID to get. Default: the latest thread (if exists).
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'get_chat', 'payload': payload})
      -
      -
      -
      -def get_customer(self, id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Returns the info about the Customer with a given ID.

      -

      Args

      -
      -
      id : str
      -
      ID of the Customer.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def get_customer(self,
      -                 id: str = None,
      -                 payload: dict = None) -> RtmResponse:
      -    ''' Returns the info about the Customer with a given ID.
      -
      -        Args:
      -            id (str): ID of the Customer.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'get_customer', 'payload': payload})
      -
      -
      -
      -def list_agents_for_transfer(self, chat_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Returns the list of Agents you can transfer a chat to.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you want to transfer.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def list_agents_for_transfer(self,
      -                             chat_id: str = None,
      -                             payload: dict = None) -> RtmResponse:
      -    ''' Returns the list of Agents you can transfer a chat to.
      -
      -        Args:
      -            chat_id (str): ID of the chat you want to transfer.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({
      -        'action': 'list_agents_for_transfer',
      -        'payload': payload
      -    })
      -
      -
      -
      -def list_archives(self, filters: dict = None, page_id: str = None, sort_order: str = None, limit: int = None, highlights: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Returns a list of the chats an Agent has access to.

      -

      Args

      -
      -
      filters : dict
      -
      Filters object.
      -
      page_id : str
      -
      Page ID.
      -
      sort_order : str
      -
      Possible values: asc - oldest threads first and desc - -newest threads first (default).
      -
      limit : int
      -
      Default: 10, minimum: 1, maximum: 100.
      -
      highlights : dict
      -
      Use it to highlight the match of filters.query. -To enable highlights with default parameters, pass an empty object.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def list_archives(self,
      -                  filters: dict = None,
      -                  page_id: str = None,
      -                  sort_order: str = None,
      -                  limit: int = None,
      -                  highlights: dict = None,
      -                  payload: dict = None) -> RtmResponse:
      -    ''' Returns a list of the chats an Agent has access to.
      -
      -        Args:
      -            filters (dict): Filters object.
      -            page_id (str): Page ID.
      -            sort_order (str): Possible values: asc - oldest threads first and desc -
      -                    newest threads first (default).
      -            limit (int): Default: 10, minimum: 1, maximum: 100.
      -            highlights (dict): Use it to highlight the match of filters.query.
      -                    To enable highlights with default parameters, pass an empty object.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'list_archives', 'payload': payload})
      -
      -
      -
      -def list_chats(self, filters: dict = None, sort_order: str = None, limit: int = None, page_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Returns summaries of the chats an Agent has access to.

      -

      Args

      -
      -
      filters : dict
      -
      Possible request filters. Mustn't change between requests for subsequent pages. -Otherwise, the behavior is undefined.
      -
      sort_order : str
      -
      Possible values: asc, desc (default). Chat summaries are sorted by the -creation date of its last thread.
      -
      limit : int
      -
      Chats limit per page. Default: 10, maximum: 100.
      -
      page_id : str
      -
      Page ID.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def list_chats(self,
      -               filters: dict = None,
      -               sort_order: str = None,
      -               limit: int = None,
      -               page_id: str = None,
      -               payload: dict = None) -> RtmResponse:
      -    ''' Returns summaries of the chats an Agent has access to.
      -
      -        Args:
      -            filters (dict): Possible request filters. Mustn't change between requests for subsequent pages.
      -                    Otherwise, the behavior is undefined.
      -            sort_order (str): Possible values: asc, desc (default). Chat summaries are sorted by the
      -                    creation date of its last thread.
      -            limit (int): Chats limit per page. Default: 10, maximum: 100.
      -            page_id (str): Page ID.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'list_chats', 'payload': payload})
      -
      -
      -
      -def list_customers(self, page_id: str = None, limit: int = None, sort_order: str = None, sort_by: str = None, filters: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Returns the list of Customers.

      -

      Args

      -
      -
      page_id : str
      -
      Page ID.
      -
      limit : int
      -
      Customers limit. Default: 10, maximum: 100.
      -
      sort_order : str
      -
      Possible values: asc, desc (default). Customers are sorted -by the creation date.
      -
      sort_by : str
      -
      Possible values: created_at (default), threads_count, visits_count, -agent_last_event or customer_last_event.
      -
      filters : dict
      -
      Filters object.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def list_customers(self,
      -                   page_id: str = None,
      -                   limit: int = None,
      -                   sort_order: str = None,
      -                   sort_by: str = None,
      -                   filters: dict = None,
      -                   payload: dict = None) -> RtmResponse:
      -    ''' Returns the list of Customers.
      -
      -        Args:
      -            page_id (str): Page ID.
      -            limit (int): Customers limit. Default: 10, maximum: 100.
      -            sort_order (str): Possible values: asc, desc (default). Customers are sorted
      -                    by the creation date.
      -            sort_by (str): Possible values: created_at (default), threads_count, visits_count,
      -                    agent_last_event or customer_last_event.
      -            filters (dict): Filters object.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'list_customers', 'payload': payload})
      -
      -
      -
      -def list_routing_statuses(self, filters: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Returns the current routing status of each agent selected by the provided filters.

      -

      Args

      -
      -
      filters : dict
      -
      Filters object.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def list_routing_statuses(self,
      -                          filters: dict = None,
      -                          payload: dict = None) -> RtmResponse:
      -    ''' Returns the current routing status of each agent selected by the provided filters.
      -
      -        Args:
      -            filters (dict): Filters object.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({
      -        'action': 'list_routing_statuses',
      -        'payload': payload
      -    })
      -
      -
      -
      -def list_threads(self, chat_id: str = None, sort_order: str = None, limit: int = None, page_id: str = None, min_events_count: int = None, filters: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Returns threads that the current Agent has access to in a given chat.

      -

      Args

      -
      -
      chat_id : str
      -
      Chat ID to get threads from.
      -
      sort_order : str
      -
      Possible values: asc - oldest threads first and desc - -newest threads first (default).
      -
      limit : int
      -
      Default: 3, maximum: 100.
      -
      page_id : str
      -
      Page ID.
      -
      min_events_count : int
      -
      Range: 1-100; Specifies the minimum number of -events to be returned in the response.
      -
      filters : dict
      -
      Filters object.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def list_threads(self,
      -                 chat_id: str = None,
      -                 sort_order: str = None,
      -                 limit: int = None,
      -                 page_id: str = None,
      -                 min_events_count: int = None,
      -                 filters: dict = None,
      -                 payload: dict = None) -> RtmResponse:
      -    ''' Returns threads that the current Agent has access to in a given chat.
      -
      -        Args:
      -            chat_id (str): Chat ID to get threads from.
      -            sort_order (str): Possible values: asc - oldest threads first and desc -
      -                    newest threads first (default).
      -            limit (int): Default: 3, maximum: 100.
      -            page_id (str): Page ID.
      -            min_events_count (int): Range: 1-100; Specifies the minimum number of
      -                    events to be returned in the response.
      -            filters (dict): Filters object.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'list_threads', 'payload': payload})
      -
      -
      -
      -def login(self, token: Union[livechat.utils.structures.AccessToken, str] = None, timezone: str = None, reconnect: bool = None, push_notifications: dict = None, application: dict = None, away: bool = None, customer_monitoring_level: str = None, pushes: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Logs in agent.

      -

      Args

      -
      -
      token : str
      -
      OAuth token from the Agent's account.
      -
      timezone : str
      -
      Agent's timezone.
      -
      reconnect : bool
      -
      Reconnecting sets the status to the -last known state instead of the default one.
      -
      push_notifications : dict
      -
      Push notifications for the requested token.
      -
      application : dict
      -
      Object containing information related to -the application's name and version.
      -
      away : bool
      -
      When True, the connection is set to the away state. -Defaults to False.
      -
      customer_monitoring_level : str
      -
      Possible values are: my, chatting, invited, online and highest_available. -Defaults to my if login creates the first session; -otherwise it preserves the current customer_monitoring_level.
      -
      pushes : dict
      -
      Use case: when you want to receive only specific pushes.
      -
      By default, it's set to all for the version of your currently established RTM connection.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def login(self,
      -          token: Union[AccessToken, str] = None,
      -          timezone: str = None,
      -          reconnect: bool = None,
      -          push_notifications: dict = None,
      -          application: dict = None,
      -          away: bool = None,
      -          customer_monitoring_level: str = None,
      -          pushes: dict = None,
      -          payload: dict = None) -> RtmResponse:
      -    ''' Logs in agent.
      -
      -        Args:
      -            token (str): OAuth token from the Agent's account.
      -            timezone (str): Agent's timezone.
      -            reconnect (bool): Reconnecting sets the status to the
      -                    last known state instead of the default one.
      -            push_notifications (dict): Push notifications for the requested token.
      -            application (dict): Object containing information related to
      -                    the application's name and version.
      -            away (bool): When True, the connection is set to the away state.
      -                    Defaults to False.
      -            customer_monitoring_level (str): Possible values are: `my`, `chatting`, `invited`, `online` and `highest_available`.
      -                    Defaults to my if login creates the first session;
      -                    otherwise it preserves the current customer_monitoring_level.
      -            pushes (dict): Use case: when you want to receive only specific pushes.
      -            By default, it's set to all for the version of your currently established RTM connection.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if token:
      -        token = str(token)
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'login', 'payload': payload})
      -
      -
      -
      -def logout(self, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Logs out agent.

      -

      Args

      -
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def logout(self, payload: dict = None) -> RtmResponse:
      -    ''' Logs out agent.
      -
      -        Args:
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    return self.ws.send({
      -        'action': 'logout',
      -        'payload': {} if payload is None else payload
      -    })
      -
      -
      -
      -def mark_events_as_seen(self, chat_id: str = None, seen_up_to: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Marks events as seen by agent.

      -

      Args

      -
      -
      chat_id : str
      -
      Chat to mark events.
      -
      seen_up_to : str
      -
      Date up to which mark events - RFC 3339 date-time format.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def mark_events_as_seen(self,
      -                        chat_id: str = None,
      -                        seen_up_to: str = None,
      -                        payload: dict = None) -> RtmResponse:
      -    ''' Marks events as seen by agent.
      -
      -        Args:
      -            chat_id (str): Chat to mark events.
      -            seen_up_to (str): Date up to which mark events - RFC 3339 date-time format.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({
      -        'action': 'mark_events_as_seen',
      -        'payload': payload
      -    })
      -
      -
      -
      -def multicast(self, recipients: dict = None, content: Any = None, type: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Sends a multicast (chat-unrelated communication).

      -

      Args

      -
      -
      recipients : object
      -
      Object containing filters related to multicast recipients.
      -
      content : typing.Any
      -
      A JSON message to be sent.
      -
      type : str
      -
      Multicast message type.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def multicast(self,
      -              recipients: dict = None,
      -              content: Any = None,
      -              type: str = None,
      -              payload: dict = None) -> RtmResponse:
      -    ''' Sends a multicast (chat-unrelated communication).
      -
      -        Args:
      -            recipients (object): Object containing filters related to multicast recipients.
      -            content (typing.Any): A JSON message to be sent.
      -            type (str): Multicast message type.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'multicast', 'payload': payload})
      -
      -
      -
      -def open_connection(self, origin: dict = None, ping_timeout: Union[float, int] = 3, ping_interval: Union[float, int] = 5, ws_conn_timeout: Union[float, int] = 10, keep_alive: bool = True, response_timeout: Union[float, int] = 3) ‑> None -
      -
      -

      Opens WebSocket connection.

      -

      Args

      -
      -
      origin : dict
      -
      Specifies origin while creating websocket connection.
      -
      ping_timeout : int or float
      -
      timeout (in seconds) if the pong message is not received, -by default sets to 3 seconds.
      -
      ping_interval : int or float
      -
      automatically sends "ping" command every specified period (in seconds). -If set to 0, no ping is sent periodically, by default sets to 5 seconds.
      -
      ws_conn_timeout : int or float
      -
      timeout (in seconds) to wait for WebSocket connection, -by default sets to 10 seconds.
      -
      keep_alive(bool): Bool which states if connection should be kept, by default sets to True.
      -
      response_timeout : int or float
      -
      timeout (in seconds) to wait for the response, -by default sets to 3 seconds.
      -
      -
      - -Expand source code - -
      def open_connection(self,
      -                    origin: dict = None,
      -                    ping_timeout: Union[float, int] = 3,
      -                    ping_interval: Union[float, int] = 5,
      -                    ws_conn_timeout: Union[float, int] = 10,
      -                    keep_alive: bool = True,
      -                    response_timeout: Union[float, int] = 3) -> None:
      -    ''' Opens WebSocket connection.
      -
      -        Args:
      -            origin (dict): Specifies origin while creating websocket connection.
      -            ping_timeout (int or float): timeout (in seconds) if the pong message is not received,
      -                by default sets to 3 seconds.
      -            ping_interval (int or float): automatically sends "ping" command every specified period (in seconds).
      -                If set to 0, no ping is sent periodically, by default sets to 5 seconds.
      -            ws_conn_timeout (int or float): timeout (in seconds) to wait for WebSocket connection,
      -                by default sets to 10 seconds.
      -            keep_alive(bool): Bool which states if connection should be kept, by default sets to `True`.
      -            response_timeout (int or float): timeout (in seconds) to wait for the response,
      -                by default sets to 3 seconds.
      -    '''
      -    self.ws.open(origin, ping_timeout, ping_interval, ws_conn_timeout,
      -                 keep_alive, response_timeout)
      -
      -
      -
      -def remove_user_from_chat(self, chat_id: str = None, user_id: str = None, user_type: str = None, ignore_requester_presence: bool = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Removes a user from chat.

      -

      Args

      -
      -
      chat_id : str
      -
      Chat ID.
      -
      user_id : str
      -
      ID of the user that will be added to the chat.
      -
      user_type : str
      -
      Possible values: agent or customer.
      -
      ignore_requester_presence : bool
      -
      If True, allows requester to remove user from chat -without being present in the chat's users list.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def remove_user_from_chat(self,
      -                          chat_id: str = None,
      -                          user_id: str = None,
      -                          user_type: str = None,
      -                          ignore_requester_presence: bool = None,
      -                          payload: dict = None) -> RtmResponse:
      -    ''' Removes a user from chat.
      -
      -        Args:
      -            chat_id (str): Chat ID.
      -            user_id (str): ID of the user that will be added to the chat.
      -            user_type (str): Possible values: agent or customer.
      -            ignore_requester_presence (bool): If `True`, allows requester to remove user from chat
      -                                              without being present in the chat's users list.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({
      -        'action': 'remove_user_from_chat',
      -        'payload': payload
      -    })
      -
      -
      -
      -def resume_chat(self, chat: dict = None, active: bool = None, continuous: bool = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Restarts an archived chat.

      -

      Args

      -
      -
      chat : dict
      -
      Chat object.
      -
      active : bool
      -
      When set to False, creates an inactive thread; default: True.
      -
      continuous : bool
      -
      Sets a chat to the continuous mode. When unset, leaves the mode unchanged.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def resume_chat(self,
      -                chat: dict = None,
      -                active: bool = None,
      -                continuous: bool = None,
      -                payload: dict = None) -> RtmResponse:
      -    ''' Restarts an archived chat.
      -
      -        Args:
      -            chat (dict): Chat object.
      -            active (bool): When set to False, creates an inactive thread; default: True.
      -            continuous (bool): Sets a chat to the continuous mode. When unset, leaves the mode unchanged.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'resume_chat', 'payload': payload})
      -
      -
      -
      -def send_event(self, chat_id: str = None, event: dict = None, attach_to_last_thread: bool = None, author_id: Optional[str] = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Sends an Event object.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you want to send the message to.
      -
      event : dict
      -
      Event object.
      -
      attach_to_last_thread : bool
      -
      Flag which states if event object should be added to last thread. -The flag is ignored for active chats.
      -
      author_id : optional str
      -
      Provide if the event should be sent on behalf of a bot.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def send_event(self,
      -               chat_id: str = None,
      -               event: dict = None,
      -               attach_to_last_thread: bool = None,
      -               author_id: Optional[str] = None,
      -               payload: dict = None) -> RtmResponse:
      -    ''' Sends an Event object.
      -
      -        Args:
      -            chat_id (str): ID of the chat you want to send the message to.
      -            event (dict): Event object.
      -            attach_to_last_thread (bool): Flag which states if event object should be added to last thread.
      -                    The flag is ignored for active chats.
      -            author_id (optional str): Provide if the event should be sent on behalf of a bot.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    opts = {}
      -    if author_id:
      -        opts['author_id'] = author_id
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({
      -        'action': 'send_event',
      -        'payload': payload,
      -        **opts
      -    })
      -
      -
      -
      -def send_rich_message_postback(self, chat_id: str = None, thread_id: str = None, event_id: str = None, postback: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Sends rich message postback.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat to send a rich message to.
      -
      thread_id : str
      -
      ID of the thread.
      -
      event_id : str
      -
      ID of the event.
      -
      postback : dict
      -
      Postback object.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def send_rich_message_postback(self,
      -                               chat_id: str = None,
      -                               thread_id: str = None,
      -                               event_id: str = None,
      -                               postback: dict = None,
      -                               payload: dict = None) -> RtmResponse:
      -    ''' Sends rich message postback.
      -
      -        Args:
      -            chat_id (str): ID of the chat to send a rich message to.
      -            thread_id (str): ID of the thread.
      -            event_id (str): ID of the event.
      -            postback (dict): Postback object.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({
      -        'action': 'send_rich_message_postback',
      -        'payload': payload
      -    })
      -
      -
      -
      -def send_typing_indicator(self, chat_id: str = None, visibility: str = None, is_typing: bool = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Sends a typing indicator.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you want to send the typing indicator to.
      -
      visibility : str
      -
      Possible values: all, agents.
      -
      is_typing : bool
      -
      A flag that indicates if you are typing.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def send_typing_indicator(self,
      -                          chat_id: str = None,
      -                          visibility: str = None,
      -                          is_typing: bool = None,
      -                          payload: dict = None) -> RtmResponse:
      -    ''' Sends a typing indicator.
      -
      -        Args:
      -            chat_id (str): ID of the chat you want to send the typing indicator to.
      -            visibility (str): Possible values: `all`, `agents`.
      -            is_typing (bool): A flag that indicates if you are typing.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({
      -        'action': 'send_typing_indicator',
      -        'payload': payload
      -    })
      -
      -
      -
      -def set_away_status(self, away: bool = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Sets an Agent's connection to the away state.

      -

      Args

      -
      -
      away : bool
      -
      A flag.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def set_away_status(self,
      -                    away: bool = None,
      -                    payload: dict = None) -> RtmResponse:
      -    ''' Sets an Agent's connection to the away state.
      -
      -        Args:
      -            away (bool): A flag.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'set_away_status', 'payload': payload})
      -
      -
      -
      -def set_routing_status(self, status: str = None, agent_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Changes the status of an Agent or a Bot Agent.

      -

      Args

      -
      -
      status : str
      -
      For Agents: accepting_chats or not_accepting_chats. -For Bot Agents: accepting_chats, not_accepting_chats, or offline.
      -
      agent_id : str
      -
      If not specified, the requester's status will be updated.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def set_routing_status(self,
      -                       status: str = None,
      -                       agent_id: str = None,
      -                       payload: dict = None) -> RtmResponse:
      -    ''' Changes the status of an Agent or a Bot Agent.
      -
      -        Args:
      -            status (str): For Agents: accepting_chats or not_accepting_chats.
      -                    For Bot Agents: accepting_chats, not_accepting_chats, or offline.
      -            agent_id (str): If not specified, the requester's status will be updated.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({
      -        'action': 'set_routing_status',
      -        'payload': payload
      -    })
      -
      -
      -
      -def start_chat(self, chat: dict = None, active: bool = None, continuous: bool = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Starts a chat.

      -

      Args

      -
      -
      chat : dict
      -
      Chat object.
      -
      active : bool
      -
      When set to False, creates an inactive thread; default: True.
      -
      continuous : bool
      -
      Starts chat as continuous (online group is not required); default: False.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def start_chat(self,
      -               chat: dict = None,
      -               active: bool = None,
      -               continuous: bool = None,
      -               payload: dict = None) -> RtmResponse:
      -    ''' Starts a chat.
      -
      -        Args:
      -            chat (dict): Chat object.
      -            active (bool): When set to False, creates an inactive thread; default: True.
      -            continuous (bool): Starts chat as continuous (online group is not required); default: False.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'start_chat', 'payload': payload})
      -
      -
      -
      -def tag_thread(self, chat_id: str = None, thread_id: str = None, tag: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Tags thread.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you want to add a tag to.
      -
      thread_id : str
      -
      ID of the thread you want to add a tag to.
      -
      tag : str
      -
      Tag name.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def tag_thread(self,
      -               chat_id: str = None,
      -               thread_id: str = None,
      -               tag: str = None,
      -               payload: dict = None) -> RtmResponse:
      -    ''' Tags thread.
      -
      -        Args:
      -            chat_id (str): ID of the chat you want to add a tag to.
      -            thread_id (str): ID of the thread you want to add a tag to.
      -            tag (str): Tag name.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'tag_thread', 'payload': payload})
      -
      -
      -
      -def transfer_chat(self, id: str = None, target: dict = None, ignore_agents_availability: bool = None, ignore_requester_presence: bool = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Transfers a chat to an agent or a group.

      -

      Args

      -
      -
      id : str
      -
      Chat ID.
      -
      target : dict
      -
      Target object. If missing, the chat will be -transferred within the current group.
      -
      ignore_agents_availability : bool
      -
      If True, always transfers chats. Otherwise, fails -when unable to assign any agent from the requested groups.
      -
      ignore_requester_presence : bool
      -
      If True, allows requester to transfer chat -without being present in the chat's users list.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def transfer_chat(self,
      -                  id: str = None,
      -                  target: dict = None,
      -                  ignore_agents_availability: bool = None,
      -                  ignore_requester_presence: bool = None,
      -                  payload: dict = None) -> RtmResponse:
      -    ''' Transfers a chat to an agent or a group.
      -
      -        Args:
      -            id (str): Chat ID.
      -            target (dict): Target object. If missing, the chat will be
      -                    transferred within the current group.
      -            ignore_agents_availability (bool): If `True`, always transfers chats. Otherwise, fails
      -                          when unable to assign any agent from the requested groups.
      -            ignore_requester_presence (bool): If `True`, allows requester to transfer chat
      -                                              without being present in the chat's users list.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'transfer_chat', 'payload': payload})
      -
      -
      -
      -def unfollow_chat(self, id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Removes the requester from the chat followers.

      -

      Args

      -
      -
      id : str
      -
      Chat ID to unfollow.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def unfollow_chat(self,
      -                  id: str = None,
      -                  payload: dict = None) -> RtmResponse:
      -    ''' Removes the requester from the chat followers.
      -
      -        Args:
      -            id (str): Chat ID to unfollow.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'unfollow_chat', 'payload': payload})
      -
      -
      -
      -def unfollow_customer(self, id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Removes the agent from the list of customer's followers.

      -

      Args

      -
      -
      id : str
      -
      ID of the Customer. UUID v4 format is required.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def unfollow_customer(self,
      -                      id: str = None,
      -                      payload: dict = None) -> RtmResponse:
      -    ''' Removes the agent from the list of customer's followers.
      -
      -        Args:
      -            id (str): ID of the Customer. UUID v4 format is required.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({
      -        'action': 'unfollow_customer',
      -        'payload': payload
      -    })
      -
      -
      -
      -def untag_thread(self, chat_id: str = None, thread_id: str = None, tag: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Untags thread.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you want to remove a tag from.
      -
      thread_id : str
      -
      ID of the thread you want to remove a tag from.
      -
      tag : str
      -
      Tag name.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def untag_thread(self,
      -                 chat_id: str = None,
      -                 thread_id: str = None,
      -                 tag: str = None,
      -                 payload: dict = None) -> RtmResponse:
      -    ''' Untags thread.
      -
      -        Args:
      -            chat_id (str): ID of the chat you want to remove a tag from.
      -            thread_id (str): ID of the thread you want to remove a tag from.
      -            tag (str): Tag name.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'untag_thread', 'payload': payload})
      -
      -
      -
      -def update_chat_properties(self, id: str = None, properties: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Updates chat properties.

      -

      Args

      -
      -
      id : str
      -
      ID of the chat you to set a property for.
      -
      properties : dict
      -
      Chat properties to set.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def update_chat_properties(self,
      -                           id: str = None,
      -                           properties: dict = None,
      -                           payload: dict = None) -> RtmResponse:
      -    ''' Updates chat properties.
      -
      -        Args:
      -            id (str): ID of the chat you to set a property for.
      -            properties (dict): Chat properties to set.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({
      -        'action': 'update_chat_properties',
      -        'payload': payload
      -    })
      -
      -
      -
      -def update_customer(self, id: str = None, name: str = None, email: str = None, avatar: str = None, session_fields: list = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Updates Customer's properties.

      -

      Args

      -
      -
      id : str
      -
      ID of the Customer. UUID v4 format is required.
      -
      name : str
      -
      Customer's name.
      -
      email : str
      -
      Customer's email.
      -
      avatar : str
      -
      URL of the Customer's avatar.
      -
      session_fields : list
      -
      An array of custom object-enclosed key:value pairs. -Respects the order of items.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def update_customer(self,
      -                    id: str = None,
      -                    name: str = None,
      -                    email: str = None,
      -                    avatar: str = None,
      -                    session_fields: list = None,
      -                    payload: dict = None) -> RtmResponse:
      -    ''' Updates Customer's properties.
      -
      -        Args:
      -            id (str): ID of the Customer. UUID v4 format is required.
      -            name (str): Customer's name.
      -            email (str): Customer's email.
      -            avatar (str): URL of the Customer's avatar.
      -            session_fields (list): An array of custom object-enclosed key:value pairs.
      -                    Respects the order of items.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'update_customer', 'payload': payload})
      -
      -
      -
      -def update_event_properties(self, chat_id: str = None, thread_id: str = None, event_id: str = None, properties: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Updates event properties.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you want to set properties for.
      -
      thread_id : str
      -
      ID of the thread you want to set properties for.
      -
      event_id : str
      -
      ID of the event you want to set properties for.
      -
      properties : dict
      -
      Chat properties to set.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def update_event_properties(self,
      -                            chat_id: str = None,
      -                            thread_id: str = None,
      -                            event_id: str = None,
      -                            properties: dict = None,
      -                            payload: dict = None) -> RtmResponse:
      -    ''' Updates event properties.
      -
      -        Args:
      -            chat_id (str): ID of the chat you want to set properties for.
      -            thread_id (str): ID of the thread you want to set properties for.
      -            event_id (str): ID of the event you want to set properties for.
      -            properties (dict): Chat properties to set.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({
      -        'action': 'update_event_properties',
      -        'payload': payload
      -    })
      -
      -
      -
      -def update_thread_properties(self, chat_id: str = None, thread_id: str = None, properties: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Updates thread properties.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you want to set properties for.
      -
      thread_id : str
      -
      ID of the thread you want to set properties for.
      -
      properties : dict
      -
      Chat properties to set.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def update_thread_properties(self,
      -                             chat_id: str = None,
      -                             thread_id: str = None,
      -                             properties: dict = None,
      -                             payload: dict = None) -> RtmResponse:
      -    ''' Updates thread properties.
      -
      -        Args:
      -            chat_id (str): ID of the chat you want to set properties for.
      -            thread_id (str): ID of the thread you want to set properties for.
      -            properties (dict): Chat properties to set.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({
      -        'action': 'update_thread_properties',
      -        'payload': payload
      -    })
      -
      -
      -
      -
      -
      -
      -
      - -
      - - - \ No newline at end of file diff --git a/docs/agent/rtm/api/v35.html b/docs/agent/rtm/api/v35.html index f6ce342..71d64a8 100644 --- a/docs/agent/rtm/api/v35.html +++ b/docs/agent/rtm/api/v35.html @@ -750,45 +750,6 @@

      Module livechat.agent.rtm.api.v35

      payload = prepare_payload(locals()) return self.ws.send({'action': 'ban_customer', 'payload': payload}) - def follow_customer(self, - id: str = None, - payload: dict = None) -> RtmResponse: - ''' Marks a customer as followed. - - Args: - id (str): ID of the Customer. UUID v4 format is required. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - - Returns: - RtmResponse: RTM response structure (`request_id`, `action`, - `type`, `success` and `payload` properties) - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.ws.send({'action': 'follow_customer', 'payload': payload}) - - def unfollow_customer(self, - id: str = None, - payload: dict = None) -> RtmResponse: - ''' Removes the agent from the list of customer's followers. - - Args: - id (str): ID of the Customer. UUID v4 format is required. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - - Returns: - RtmResponse: RTM response structure (`request_id`, `action`, - `type`, `success` and `payload` properties) - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.ws.send({ - 'action': 'unfollow_customer', - 'payload': payload - }) - # Status def login(self, @@ -1041,7 +1002,7 @@

      Classes

      class AgentRtmV35 -(url: str, header: Union[list, dict, Callable, None]) +(url: str, header: Union[list, dict, Callable, ForwardRef(None)])

      Agent RTM API Class containing methods in version 3.5.

      @@ -1761,45 +1722,6 @@

      Classes

      payload = prepare_payload(locals()) return self.ws.send({'action': 'ban_customer', 'payload': payload}) - def follow_customer(self, - id: str = None, - payload: dict = None) -> RtmResponse: - ''' Marks a customer as followed. - - Args: - id (str): ID of the Customer. UUID v4 format is required. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - - Returns: - RtmResponse: RTM response structure (`request_id`, `action`, - `type`, `success` and `payload` properties) - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.ws.send({'action': 'follow_customer', 'payload': payload}) - - def unfollow_customer(self, - id: str = None, - payload: dict = None) -> RtmResponse: - ''' Removes the agent from the list of customer's followers. - - Args: - id (str): ID of the Customer. UUID v4 format is required. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - - Returns: - RtmResponse: RTM response structure (`request_id`, `action`, - `type`, `success` and `payload` properties) - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.ws.send({ - 'action': 'unfollow_customer', - 'payload': payload - }) - # Status def login(self, @@ -2526,48 +2448,6 @@

      Returns

      return self.ws.send({'action': 'follow_chat', 'payload': payload})
      -
      -def follow_customer(self, id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
      -
      -

      Marks a customer as followed.

      -

      Args

      -
      -
      id : str
      -
      ID of the Customer. UUID v4 format is required.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      -

      Returns

      -
      -
      RtmResponse
      -
      RTM response structure (request_id, action, -type, success and payload properties)
      -
      -
      - -Expand source code - -
      def follow_customer(self,
      -                    id: str = None,
      -                    payload: dict = None) -> RtmResponse:
      -    ''' Marks a customer as followed.
      -
      -        Args:
      -            id (str): ID of the Customer. UUID v4 format is required.
      -            payload (dict): Custom payload to be used as request's data.
      -                    It overrides all other parameters provided for the method.
      -
      -        Returns:
      -            RtmResponse: RTM response structure (`request_id`, `action`,
      -                         `type`, `success` and `payload` properties)
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.ws.send({'action': 'follow_customer', 'payload': payload})
      -
      -
      def get_chat(self, chat_id: str = None, thread_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
      @@ -3844,51 +3724,6 @@

      Returns

      return self.ws.send({'action': 'unfollow_chat', 'payload': payload})
  • -
    -def unfollow_customer(self, id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
    -
    -

    Removes the agent from the list of customer's followers.

    -

    Args

    -
    -
    id : str
    -
    ID of the Customer. UUID v4 format is required.
    -
    payload : dict
    -
    Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
    -
    -

    Returns

    -
    -
    RtmResponse
    -
    RTM response structure (request_id, action, -type, success and payload properties)
    -
    -
    - -Expand source code - -
    def unfollow_customer(self,
    -                      id: str = None,
    -                      payload: dict = None) -> RtmResponse:
    -    ''' Removes the agent from the list of customer's followers.
    -
    -        Args:
    -            id (str): ID of the Customer. UUID v4 format is required.
    -            payload (dict): Custom payload to be used as request's data.
    -                    It overrides all other parameters provided for the method.
    -
    -        Returns:
    -            RtmResponse: RTM response structure (`request_id`, `action`,
    -                         `type`, `success` and `payload` properties)
    -    '''
    -    if payload is None:
    -        payload = prepare_payload(locals())
    -    return self.ws.send({
    -        'action': 'unfollow_customer',
    -        'payload': payload
    -    })
    -
    -
    def untag_thread(self, chat_id: str = None, thread_id: str = None, tag: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
    @@ -4189,7 +4024,6 @@

    delete_event_properties
  • delete_thread_properties
  • follow_chat
  • -
  • follow_customer
  • get_chat
  • get_customer
  • list_agents_for_transfer
  • @@ -4214,7 +4048,6 @@

    tag_thread
  • transfer_chat
  • unfollow_chat
  • -
  • unfollow_customer
  • untag_thread
  • update_chat_properties
  • update_customer
  • diff --git a/docs/agent/rtm/api/v36.html b/docs/agent/rtm/api/v36.html index d0c141c..f4e8d94 100644 --- a/docs/agent/rtm/api/v36.html +++ b/docs/agent/rtm/api/v36.html @@ -86,12 +86,12 @@

    Module livechat.agent.rtm.api.v36

    limit: int = None, page_id: str = None, payload: dict = None) -> RtmResponse: - ''' Returns summaries of the chats an Agent has access to. + ''' Returns chat info for the chats an Agent has access to. Args: filters (dict): Possible request filters. Mustn't change between requests for subsequent pages. Otherwise, the behavior is undefined. - sort_order (str): Possible values: asc, desc (default). Chat summaries are sorted by the + sort_order (str): Possible values: asc, desc (default). Chat info entries are sorted by the creation date of its last thread. limit (int): Chats limit per page. Default: 10, maximum: 100. page_id (str): Page ID. @@ -456,6 +456,29 @@

    Module livechat.agent.rtm.api.v36

    'payload': payload }) + def get_thread_transcript(self, + chat_id: str = None, + thread_id: str = None, + payload: dict = None) -> RtmResponse: + ''' Returns a plain-text transcript of a given thread. + + Args: + chat_id (str): ID of the chat the thread belongs to. + thread_id (str): ID of the thread to return the transcript for. + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + + Returns: + RtmResponse: RTM response structure (`request_id`, `action`, + `type`, `success` and `payload` properties) + ''' + if payload is None: + payload = prepare_payload(locals()) + return self.ws.send({ + 'action': 'get_thread_transcript', + 'payload': payload + }) + # Properties def update_chat_properties(self, @@ -722,45 +745,6 @@

    Module livechat.agent.rtm.api.v36

    payload = prepare_payload(locals()) return self.ws.send({'action': 'ban_customer', 'payload': payload}) - def follow_customer(self, - id: str = None, - payload: dict = None) -> RtmResponse: - ''' Marks a customer as followed. - - Args: - id (str): ID of the Customer. UUID v4 format is required. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - - Returns: - RtmResponse: RTM response structure (`request_id`, `action`, - `type`, `success` and `payload` properties) - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.ws.send({'action': 'follow_customer', 'payload': payload}) - - def unfollow_customer(self, - id: str = None, - payload: dict = None) -> RtmResponse: - ''' Removes the agent from the list of customer's followers. - - Args: - id (str): ID of the Customer. UUID v4 format is required. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - - Returns: - RtmResponse: RTM response structure (`request_id`, `action`, - `type`, `success` and `payload` properties) - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.ws.send({ - 'action': 'unfollow_customer', - 'payload': payload - }) - # Status def login(self, @@ -1086,7 +1070,7 @@

    Classes

    class AgentRtmV36 -(url: str, header: Union[list, dict, Callable, None]) +(url: str, header: Union[list, dict, Callable, ForwardRef(None)])

    Agent RTM API Class containing methods in version 3.6.

    @@ -1142,12 +1126,12 @@

    Classes

    limit: int = None, page_id: str = None, payload: dict = None) -> RtmResponse: - ''' Returns summaries of the chats an Agent has access to. + ''' Returns chat info for the chats an Agent has access to. Args: filters (dict): Possible request filters. Mustn't change between requests for subsequent pages. Otherwise, the behavior is undefined. - sort_order (str): Possible values: asc, desc (default). Chat summaries are sorted by the + sort_order (str): Possible values: asc, desc (default). Chat info entries are sorted by the creation date of its last thread. limit (int): Chats limit per page. Default: 10, maximum: 100. page_id (str): Page ID. @@ -1512,6 +1496,29 @@

    Classes

    'payload': payload }) + def get_thread_transcript(self, + chat_id: str = None, + thread_id: str = None, + payload: dict = None) -> RtmResponse: + ''' Returns a plain-text transcript of a given thread. + + Args: + chat_id (str): ID of the chat the thread belongs to. + thread_id (str): ID of the thread to return the transcript for. + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + + Returns: + RtmResponse: RTM response structure (`request_id`, `action`, + `type`, `success` and `payload` properties) + ''' + if payload is None: + payload = prepare_payload(locals()) + return self.ws.send({ + 'action': 'get_thread_transcript', + 'payload': payload + }) + # Properties def update_chat_properties(self, @@ -1778,45 +1785,6 @@

    Classes

    payload = prepare_payload(locals()) return self.ws.send({'action': 'ban_customer', 'payload': payload}) - def follow_customer(self, - id: str = None, - payload: dict = None) -> RtmResponse: - ''' Marks a customer as followed. - - Args: - id (str): ID of the Customer. UUID v4 format is required. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - - Returns: - RtmResponse: RTM response structure (`request_id`, `action`, - `type`, `success` and `payload` properties) - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.ws.send({'action': 'follow_customer', 'payload': payload}) - - def unfollow_customer(self, - id: str = None, - payload: dict = None) -> RtmResponse: - ''' Removes the agent from the list of customer's followers. - - Args: - id (str): ID of the Customer. UUID v4 format is required. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - - Returns: - RtmResponse: RTM response structure (`request_id`, `action`, - `type`, `success` and `payload` properties) - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.ws.send({ - 'action': 'unfollow_customer', - 'payload': payload - }) - # Status def login(self, @@ -2560,15 +2528,17 @@

    Returns

    return self.ws.send({'action': 'follow_chat', 'payload': payload})
    -
    -def follow_customer(self, id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse +
    +def get_chat(self, chat_id: str = None, thread_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
    -

    Marks a customer as followed.

    +

    Returns a thread that the current Agent has access to in a given chat.

    Args

    -
    id : str
    -
    ID of the Customer. UUID v4 format is required.
    +
    chat_id : str
    +
    ID of a chat to get.
    +
    thread_id : str
    +
    Thread ID to get. Default: the latest thread (if exists).
    payload : dict
    Custom payload to be used as request's data. It overrides all other parameters provided for the method.
    @@ -2583,13 +2553,15 @@

    Returns

    Expand source code -
    def follow_customer(self,
    -                    id: str = None,
    -                    payload: dict = None) -> RtmResponse:
    -    ''' Marks a customer as followed.
    +
    def get_chat(self,
    +             chat_id: str = None,
    +             thread_id: str = None,
    +             payload: dict = None) -> RtmResponse:
    +    ''' Returns a thread that the current Agent has access to in a given chat.
     
             Args:
    -            id (str): ID of the Customer. UUID v4 format is required.
    +            chat_id (str): ID of a chat to get.
    +            thread_id (str): Thread ID to get. Default: the latest thread (if exists).
                 payload (dict): Custom payload to be used as request's data.
                         It overrides all other parameters provided for the method.
     
    @@ -2599,20 +2571,18 @@ 

    Returns

    ''' if payload is None: payload = prepare_payload(locals()) - return self.ws.send({'action': 'follow_customer', 'payload': payload})
    + return self.ws.send({'action': 'get_chat', 'payload': payload})
    -
    -def get_chat(self, chat_id: str = None, thread_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse +
    +def get_customer(self, id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
    -

    Returns a thread that the current Agent has access to in a given chat.

    +

    Returns the info about the Customer with a given ID.

    Args

    -
    chat_id : str
    -
    ID of a chat to get.
    -
    thread_id : str
    -
    Thread ID to get. Default: the latest thread (if exists).
    +
    id : str
    +
    ID of the Customer.
    payload : dict
    Custom payload to be used as request's data. It overrides all other parameters provided for the method.
    @@ -2627,15 +2597,13 @@

    Returns

    Expand source code -
    def get_chat(self,
    -             chat_id: str = None,
    -             thread_id: str = None,
    -             payload: dict = None) -> RtmResponse:
    -    ''' Returns a thread that the current Agent has access to in a given chat.
    +
    def get_customer(self,
    +                 id: str = None,
    +                 payload: dict = None) -> RtmResponse:
    +    ''' Returns the info about the Customer with a given ID.
     
             Args:
    -            chat_id (str): ID of a chat to get.
    -            thread_id (str): Thread ID to get. Default: the latest thread (if exists).
    +            id (str): ID of the Customer.
                 payload (dict): Custom payload to be used as request's data.
                         It overrides all other parameters provided for the method.
     
    @@ -2645,18 +2613,20 @@ 

    Returns

    ''' if payload is None: payload = prepare_payload(locals()) - return self.ws.send({'action': 'get_chat', 'payload': payload})
    + return self.ws.send({'action': 'get_customer', 'payload': payload})
    -
    -def get_customer(self, id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse +
    +def get_thread_transcript(self, chat_id: str = None, thread_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
    -

    Returns the info about the Customer with a given ID.

    +

    Returns a plain-text transcript of a given thread.

    Args

    -
    id : str
    -
    ID of the Customer.
    +
    chat_id : str
    +
    ID of the chat the thread belongs to.
    +
    thread_id : str
    +
    ID of the thread to return the transcript for.
    payload : dict
    Custom payload to be used as request's data. It overrides all other parameters provided for the method.
    @@ -2671,13 +2641,15 @@

    Returns

    Expand source code -
    def get_customer(self,
    -                 id: str = None,
    -                 payload: dict = None) -> RtmResponse:
    -    ''' Returns the info about the Customer with a given ID.
    +
    def get_thread_transcript(self,
    +                          chat_id: str = None,
    +                          thread_id: str = None,
    +                          payload: dict = None) -> RtmResponse:
    +    ''' Returns a plain-text transcript of a given thread.
     
             Args:
    -            id (str): ID of the Customer.
    +            chat_id (str): ID of the chat the thread belongs to.
    +            thread_id (str): ID of the thread to return the transcript for.
                 payload (dict): Custom payload to be used as request's data.
                         It overrides all other parameters provided for the method.
     
    @@ -2687,7 +2659,10 @@ 

    Returns

    ''' if payload is None: payload = prepare_payload(locals()) - return self.ws.send({'action': 'get_customer', 'payload': payload})
    + return self.ws.send({ + 'action': 'get_thread_transcript', + 'payload': payload + })
    @@ -2801,14 +2776,14 @@

    Returns

    def list_chats(self, filters: dict = None, sort_order: str = None, limit: int = None, page_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
    -

    Returns summaries of the chats an Agent has access to.

    +

    Returns chat info for the chats an Agent has access to.

    Args

    filters : dict
    Possible request filters. Mustn't change between requests for subsequent pages. Otherwise, the behavior is undefined.
    sort_order : str
    -
    Possible values: asc, desc (default). Chat summaries are sorted by the +
    Possible values: asc, desc (default). Chat info entries are sorted by the creation date of its last thread.
    limit : int
    Chats limit per page. Default: 10, maximum: 100.
    @@ -2834,12 +2809,12 @@

    Returns

    limit: int = None, page_id: str = None, payload: dict = None) -> RtmResponse: - ''' Returns summaries of the chats an Agent has access to. + ''' Returns chat info for the chats an Agent has access to. Args: filters (dict): Possible request filters. Mustn't change between requests for subsequent pages. Otherwise, the behavior is undefined. - sort_order (str): Possible values: asc, desc (default). Chat summaries are sorted by the + sort_order (str): Possible values: asc, desc (default). Chat info entries are sorted by the creation date of its last thread. limit (int): Chats limit per page. Default: 10, maximum: 100. page_id (str): Page ID. @@ -3979,51 +3954,6 @@

    Returns

    return self.ws.send({'action': 'unfollow_chat', 'payload': payload})
    -
    -def unfollow_customer(self, id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
    -
    -

    Removes the agent from the list of customer's followers.

    -

    Args

    -
    -
    id : str
    -
    ID of the Customer. UUID v4 format is required.
    -
    payload : dict
    -
    Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
    -
    -

    Returns

    -
    -
    RtmResponse
    -
    RTM response structure (request_id, action, -type, success and payload properties)
    -
    -
    - -Expand source code - -
    def unfollow_customer(self,
    -                      id: str = None,
    -                      payload: dict = None) -> RtmResponse:
    -    ''' Removes the agent from the list of customer's followers.
    -
    -        Args:
    -            id (str): ID of the Customer. UUID v4 format is required.
    -            payload (dict): Custom payload to be used as request's data.
    -                    It overrides all other parameters provided for the method.
    -
    -        Returns:
    -            RtmResponse: RTM response structure (`request_id`, `action`,
    -                         `type`, `success` and `payload` properties)
    -    '''
    -    if payload is None:
    -        payload = prepare_payload(locals())
    -    return self.ws.send({
    -        'action': 'unfollow_customer',
    -        'payload': payload
    -    })
    -
    -
    def untag_thread(self, chat_id: str = None, thread_id: str = None, tag: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
    @@ -4367,9 +4297,9 @@

    delete_event_properties
  • delete_thread_properties
  • follow_chat
  • -
  • follow_customer
  • get_chat
  • get_customer
  • +
  • get_thread_transcript
  • list_agents_for_transfer
  • list_archives
  • list_chats
  • @@ -4394,7 +4324,6 @@

    tag_thread
  • transfer_chat
  • unfollow_chat
  • -
  • unfollow_customer
  • untag_thread
  • update_chat_properties
  • update_customer
  • diff --git a/docs/agent/rtm/api/v37.html b/docs/agent/rtm/api/v37.html index b1b0b2b..5632144 100644 --- a/docs/agent/rtm/api/v37.html +++ b/docs/agent/rtm/api/v37.html @@ -86,12 +86,12 @@

    Module livechat.agent.rtm.api.v37

    limit: int = None, page_id: str = None, payload: dict = None) -> RtmResponse: - ''' Returns summaries of the chats an Agent has access to. + ''' Returns chat info for the chats an Agent has access to. Args: filters (dict): Possible request filters. Mustn't change between requests for subsequent pages. Otherwise, the behavior is undefined. - sort_order (str): Possible values: asc, desc (default). Chat summaries are sorted by the + sort_order (str): Possible values: asc, desc (default). Chat info entries are sorted by the creation date of its last thread. limit (int): Chats limit per page. Default: 10, maximum: 100. page_id (str): Page ID. @@ -456,6 +456,29 @@

    Module livechat.agent.rtm.api.v37

    'payload': payload }) + def get_thread_transcript(self, + chat_id: str = None, + thread_id: str = None, + payload: dict = None) -> RtmResponse: + ''' Returns a plain-text transcript of a given thread. + + Args: + chat_id (str): ID of the chat the thread belongs to. + thread_id (str): ID of the thread to return the transcript for. + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + + Returns: + RtmResponse: RTM response structure (`request_id`, `action`, + `type`, `success` and `payload` properties) + ''' + if payload is None: + payload = prepare_payload(locals()) + return self.ws.send({ + 'action': 'get_thread_transcript', + 'payload': payload + }) + # Properties def update_chat_properties(self, @@ -722,45 +745,6 @@

    Module livechat.agent.rtm.api.v37

    payload = prepare_payload(locals()) return self.ws.send({'action': 'ban_customer', 'payload': payload}) - def follow_customer(self, - id: str = None, - payload: dict = None) -> RtmResponse: - ''' Marks a customer as followed. - - Args: - id (str): ID of the Customer. UUID v4 format is required. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - - Returns: - RtmResponse: RTM response structure (`request_id`, `action`, - `type`, `success` and `payload` properties) - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.ws.send({'action': 'follow_customer', 'payload': payload}) - - def unfollow_customer(self, - id: str = None, - payload: dict = None) -> RtmResponse: - ''' Removes the agent from the list of customer's followers. - - Args: - id (str): ID of the Customer. UUID v4 format is required. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - - Returns: - RtmResponse: RTM response structure (`request_id`, `action`, - `type`, `success` and `payload` properties) - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.ws.send({ - 'action': 'unfollow_customer', - 'payload': payload - }) - # Status def login(self, @@ -1086,7 +1070,7 @@

    Classes

    class AgentRtmV37 -(url: str, header: Union[list, dict, Callable, None]) +(url: str, header: Union[list, dict, Callable, ForwardRef(None)])

    Agent RTM API Class containing methods in version 3.7.

    @@ -1142,12 +1126,12 @@

    Classes

    limit: int = None, page_id: str = None, payload: dict = None) -> RtmResponse: - ''' Returns summaries of the chats an Agent has access to. + ''' Returns chat info for the chats an Agent has access to. Args: filters (dict): Possible request filters. Mustn't change between requests for subsequent pages. Otherwise, the behavior is undefined. - sort_order (str): Possible values: asc, desc (default). Chat summaries are sorted by the + sort_order (str): Possible values: asc, desc (default). Chat info entries are sorted by the creation date of its last thread. limit (int): Chats limit per page. Default: 10, maximum: 100. page_id (str): Page ID. @@ -1512,6 +1496,29 @@

    Classes

    'payload': payload }) + def get_thread_transcript(self, + chat_id: str = None, + thread_id: str = None, + payload: dict = None) -> RtmResponse: + ''' Returns a plain-text transcript of a given thread. + + Args: + chat_id (str): ID of the chat the thread belongs to. + thread_id (str): ID of the thread to return the transcript for. + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + + Returns: + RtmResponse: RTM response structure (`request_id`, `action`, + `type`, `success` and `payload` properties) + ''' + if payload is None: + payload = prepare_payload(locals()) + return self.ws.send({ + 'action': 'get_thread_transcript', + 'payload': payload + }) + # Properties def update_chat_properties(self, @@ -1778,45 +1785,6 @@

    Classes

    payload = prepare_payload(locals()) return self.ws.send({'action': 'ban_customer', 'payload': payload}) - def follow_customer(self, - id: str = None, - payload: dict = None) -> RtmResponse: - ''' Marks a customer as followed. - - Args: - id (str): ID of the Customer. UUID v4 format is required. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - - Returns: - RtmResponse: RTM response structure (`request_id`, `action`, - `type`, `success` and `payload` properties) - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.ws.send({'action': 'follow_customer', 'payload': payload}) - - def unfollow_customer(self, - id: str = None, - payload: dict = None) -> RtmResponse: - ''' Removes the agent from the list of customer's followers. - - Args: - id (str): ID of the Customer. UUID v4 format is required. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - - Returns: - RtmResponse: RTM response structure (`request_id`, `action`, - `type`, `success` and `payload` properties) - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.ws.send({ - 'action': 'unfollow_customer', - 'payload': payload - }) - # Status def login(self, @@ -2560,15 +2528,17 @@

    Returns

    return self.ws.send({'action': 'follow_chat', 'payload': payload})
    -
    -def follow_customer(self, id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse +
    +def get_chat(self, chat_id: str = None, thread_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
    -

    Marks a customer as followed.

    +

    Returns a thread that the current Agent has access to in a given chat.

    Args

    -
    id : str
    -
    ID of the Customer. UUID v4 format is required.
    +
    chat_id : str
    +
    ID of a chat to get.
    +
    thread_id : str
    +
    Thread ID to get. Default: the latest thread (if exists).
    payload : dict
    Custom payload to be used as request's data. It overrides all other parameters provided for the method.
    @@ -2583,13 +2553,15 @@

    Returns

    Expand source code -
    def follow_customer(self,
    -                    id: str = None,
    -                    payload: dict = None) -> RtmResponse:
    -    ''' Marks a customer as followed.
    +
    def get_chat(self,
    +             chat_id: str = None,
    +             thread_id: str = None,
    +             payload: dict = None) -> RtmResponse:
    +    ''' Returns a thread that the current Agent has access to in a given chat.
     
             Args:
    -            id (str): ID of the Customer. UUID v4 format is required.
    +            chat_id (str): ID of a chat to get.
    +            thread_id (str): Thread ID to get. Default: the latest thread (if exists).
                 payload (dict): Custom payload to be used as request's data.
                         It overrides all other parameters provided for the method.
     
    @@ -2599,20 +2571,18 @@ 

    Returns

    ''' if payload is None: payload = prepare_payload(locals()) - return self.ws.send({'action': 'follow_customer', 'payload': payload})
    + return self.ws.send({'action': 'get_chat', 'payload': payload})
    -
    -def get_chat(self, chat_id: str = None, thread_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse +
    +def get_customer(self, id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
    -

    Returns a thread that the current Agent has access to in a given chat.

    +

    Returns the info about the Customer with a given ID.

    Args

    -
    chat_id : str
    -
    ID of a chat to get.
    -
    thread_id : str
    -
    Thread ID to get. Default: the latest thread (if exists).
    +
    id : str
    +
    ID of the Customer.
    payload : dict
    Custom payload to be used as request's data. It overrides all other parameters provided for the method.
    @@ -2627,15 +2597,13 @@

    Returns

    Expand source code -
    def get_chat(self,
    -             chat_id: str = None,
    -             thread_id: str = None,
    -             payload: dict = None) -> RtmResponse:
    -    ''' Returns a thread that the current Agent has access to in a given chat.
    +
    def get_customer(self,
    +                 id: str = None,
    +                 payload: dict = None) -> RtmResponse:
    +    ''' Returns the info about the Customer with a given ID.
     
             Args:
    -            chat_id (str): ID of a chat to get.
    -            thread_id (str): Thread ID to get. Default: the latest thread (if exists).
    +            id (str): ID of the Customer.
                 payload (dict): Custom payload to be used as request's data.
                         It overrides all other parameters provided for the method.
     
    @@ -2645,18 +2613,20 @@ 

    Returns

    ''' if payload is None: payload = prepare_payload(locals()) - return self.ws.send({'action': 'get_chat', 'payload': payload})
    + return self.ws.send({'action': 'get_customer', 'payload': payload})
    -
    -def get_customer(self, id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse +
    +def get_thread_transcript(self, chat_id: str = None, thread_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
    -

    Returns the info about the Customer with a given ID.

    +

    Returns a plain-text transcript of a given thread.

    Args

    -
    id : str
    -
    ID of the Customer.
    +
    chat_id : str
    +
    ID of the chat the thread belongs to.
    +
    thread_id : str
    +
    ID of the thread to return the transcript for.
    payload : dict
    Custom payload to be used as request's data. It overrides all other parameters provided for the method.
    @@ -2671,13 +2641,15 @@

    Returns

    Expand source code -
    def get_customer(self,
    -                 id: str = None,
    -                 payload: dict = None) -> RtmResponse:
    -    ''' Returns the info about the Customer with a given ID.
    +
    def get_thread_transcript(self,
    +                          chat_id: str = None,
    +                          thread_id: str = None,
    +                          payload: dict = None) -> RtmResponse:
    +    ''' Returns a plain-text transcript of a given thread.
     
             Args:
    -            id (str): ID of the Customer.
    +            chat_id (str): ID of the chat the thread belongs to.
    +            thread_id (str): ID of the thread to return the transcript for.
                 payload (dict): Custom payload to be used as request's data.
                         It overrides all other parameters provided for the method.
     
    @@ -2687,7 +2659,10 @@ 

    Returns

    ''' if payload is None: payload = prepare_payload(locals()) - return self.ws.send({'action': 'get_customer', 'payload': payload})
    + return self.ws.send({ + 'action': 'get_thread_transcript', + 'payload': payload + })
    @@ -2801,14 +2776,14 @@

    Returns

    def list_chats(self, filters: dict = None, sort_order: str = None, limit: int = None, page_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
    -

    Returns summaries of the chats an Agent has access to.

    +

    Returns chat info for the chats an Agent has access to.

    Args

    filters : dict
    Possible request filters. Mustn't change between requests for subsequent pages. Otherwise, the behavior is undefined.
    sort_order : str
    -
    Possible values: asc, desc (default). Chat summaries are sorted by the +
    Possible values: asc, desc (default). Chat info entries are sorted by the creation date of its last thread.
    limit : int
    Chats limit per page. Default: 10, maximum: 100.
    @@ -2834,12 +2809,12 @@

    Returns

    limit: int = None, page_id: str = None, payload: dict = None) -> RtmResponse: - ''' Returns summaries of the chats an Agent has access to. + ''' Returns chat info for the chats an Agent has access to. Args: filters (dict): Possible request filters. Mustn't change between requests for subsequent pages. Otherwise, the behavior is undefined. - sort_order (str): Possible values: asc, desc (default). Chat summaries are sorted by the + sort_order (str): Possible values: asc, desc (default). Chat info entries are sorted by the creation date of its last thread. limit (int): Chats limit per page. Default: 10, maximum: 100. page_id (str): Page ID. @@ -3979,51 +3954,6 @@

    Returns

    return self.ws.send({'action': 'unfollow_chat', 'payload': payload})
    -
    -def unfollow_customer(self, id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
    -
    -

    Removes the agent from the list of customer's followers.

    -

    Args

    -
    -
    id : str
    -
    ID of the Customer. UUID v4 format is required.
    -
    payload : dict
    -
    Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
    -
    -

    Returns

    -
    -
    RtmResponse
    -
    RTM response structure (request_id, action, -type, success and payload properties)
    -
    -
    - -Expand source code - -
    def unfollow_customer(self,
    -                      id: str = None,
    -                      payload: dict = None) -> RtmResponse:
    -    ''' Removes the agent from the list of customer's followers.
    -
    -        Args:
    -            id (str): ID of the Customer. UUID v4 format is required.
    -            payload (dict): Custom payload to be used as request's data.
    -                    It overrides all other parameters provided for the method.
    -
    -        Returns:
    -            RtmResponse: RTM response structure (`request_id`, `action`,
    -                         `type`, `success` and `payload` properties)
    -    '''
    -    if payload is None:
    -        payload = prepare_payload(locals())
    -    return self.ws.send({
    -        'action': 'unfollow_customer',
    -        'payload': payload
    -    })
    -
    -
    def untag_thread(self, chat_id: str = None, thread_id: str = None, tag: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
    @@ -4367,9 +4297,9 @@

    delete_event_properties
  • delete_thread_properties
  • follow_chat
  • -
  • follow_customer
  • get_chat
  • get_customer
  • +
  • get_thread_transcript
  • list_agents_for_transfer
  • list_archives
  • list_chats
  • @@ -4394,7 +4324,6 @@

    tag_thread
  • transfer_chat
  • unfollow_chat
  • -
  • unfollow_customer
  • untag_thread
  • update_chat_properties
  • update_customer
  • diff --git a/docs/agent/rtm/base.html b/docs/agent/rtm/base.html index fd9f19d..03326e1 100644 --- a/docs/agent/rtm/base.html +++ b/docs/agent/rtm/base.html @@ -34,7 +34,6 @@

    Module livechat.agent.rtm.base

    from typing import Callable, Union -from livechat.agent.rtm.api.v34 import AgentRtmV34 from livechat.agent.rtm.api.v35 import AgentRtmV35 from livechat.agent.rtm.api.v36 import AgentRtmV36 from livechat.agent.rtm.api.v37 import AgentRtmV37 @@ -51,7 +50,7 @@

    Module livechat.agent.rtm.base

    version: str = stable_version, base_url: str = api_url, header: Union[list, dict, Callable, None] = None, - ) -> Union[AgentRtmV34, AgentRtmV35, AgentRtmV36, AgentRtmV37]: + ) -> Union[AgentRtmV35, AgentRtmV36, AgentRtmV37]: ''' Returns client for specific Agent RTM version. Args: @@ -67,7 +66,6 @@

    Module livechat.agent.rtm.base

    ValueError: If the specified version does not exist. ''' client = { - '3.4': AgentRtmV34, '3.5': AgentRtmV35, '3.6': AgentRtmV36, '3.7': AgentRtmV37, @@ -102,7 +100,7 @@

    Classes

    version: str = stable_version, base_url: str = api_url, header: Union[list, dict, Callable, None] = None, - ) -> Union[AgentRtmV34, AgentRtmV35, AgentRtmV36, AgentRtmV37]: + ) -> Union[AgentRtmV35, AgentRtmV36, AgentRtmV37]: ''' Returns client for specific Agent RTM version. Args: @@ -118,7 +116,6 @@

    Classes

    ValueError: If the specified version does not exist. ''' client = { - '3.4': AgentRtmV34, '3.5': AgentRtmV35, '3.6': AgentRtmV36, '3.7': AgentRtmV37, @@ -130,7 +127,7 @@

    Classes

    Static methods

    -def get_client(version: str = '3.6', base_url: str = 'api.livechatinc.com', header: Union[list, dict, Callable, None] = None) ‑> Union[AgentRtmV34, AgentRtmV35, AgentRtmV36, AgentRtmV37] +def get_client(version: str = '3.6', base_url: str = 'api.livechatinc.com', header: Union[list, dict, Callable, None] = None) ‑> Union[AgentRtmV35, AgentRtmV36, AgentRtmV37]

    Returns client for specific Agent RTM version.

    @@ -160,7 +157,7 @@

    Raises

    version: str = stable_version, base_url: str = api_url, header: Union[list, dict, Callable, None] = None, -) -> Union[AgentRtmV34, AgentRtmV35, AgentRtmV36, AgentRtmV37]: +) -> Union[AgentRtmV35, AgentRtmV36, AgentRtmV37]: ''' Returns client for specific Agent RTM version. Args: @@ -176,7 +173,6 @@

    Raises

    ValueError: If the specified version does not exist. ''' client = { - '3.4': AgentRtmV34, '3.5': AgentRtmV35, '3.6': AgentRtmV36, '3.7': AgentRtmV37, diff --git a/docs/agent/web/api/index.html b/docs/agent/web/api/index.html index 611584c..6ddc450 100644 --- a/docs/agent/web/api/index.html +++ b/docs/agent/web/api/index.html @@ -26,10 +26,6 @@

    Module livechat.agent.web.api

    Sub-modules

    -
    livechat.agent.web.api.v34
    -
    -

    Agent Web client implementation for v3.4.

    -
    livechat.agent.web.api.v35

    Agent Web client implementation for v3.5.

    @@ -64,7 +60,6 @@

    Index

  • Sub-modules

      -
    • livechat.agent.web.api.v34
    • livechat.agent.web.api.v35
    • livechat.agent.web.api.v36
    • livechat.agent.web.api.v37
    • diff --git a/docs/agent/web/api/v34.html b/docs/agent/web/api/v34.html deleted file mode 100644 index 3965746..0000000 --- a/docs/agent/web/api/v34.html +++ /dev/null @@ -1,4466 +0,0 @@ - - - - - - -livechat.agent.web.api.v34 API documentation - - - - - - - - - - - -
      -
      -
      -

      Module livechat.agent.web.api.v34

      -
      -
      -

      Agent Web client implementation for v3.4.

      -
      - -Expand source code - -
      ''' Agent Web client implementation for v3.4. '''
      -
      -# pylint: disable=W0613,R0913,W0622,C0103,W0221
      -from __future__ import annotations
      -
      -import typing
      -
      -import httpx
      -
      -from livechat.utils.helpers import prepare_payload
      -from livechat.utils.http_client import HttpClient
      -from livechat.utils.structures import AccessToken
      -
      -# pylint: disable=R0903
      -
      -
      -class AgentWebV34(HttpClient):
      -    ''' Agent Web API Class containing methods in version 3.4. '''
      -    def __init__(self,
      -                 access_token: typing.Union[AccessToken, str],
      -                 base_url: str,
      -                 http2: bool,
      -                 proxies=None,
      -                 verify: bool = True,
      -                 disable_logging: bool = False,
      -                 timeout: float = httpx.Timeout(15)):
      -        super().__init__(access_token, base_url, http2, proxies, verify,
      -                         disable_logging, timeout)
      -        self.api_url = f'https://{base_url}/v3.4/agent/action'
      -
      -    # Chats
      -
      -    def list_chats(self,
      -                   filters: dict = None,
      -                   sort_order: str = None,
      -                   limit: int = None,
      -                   page_id: str = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Returns summaries of the chats an Agent has access to.
      -
      -            Args:
      -                filters (dict): Possible request filters. Mustn't change between
      -                                requests for subsequent pages. Otherwise,
      -                                the behavior is undefined.
      -                sort_order (str): Possible values: asc, desc (default).
      -                                  Chat summaries are sorted by the creation
      -                                  date of its last thread.
      -                limit (int): Limit of results per page. Default: 10, maximum: 100.
      -                page_id (str): ID of the page with paginated results.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided
      -                                for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_chats',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_threads(self,
      -                     chat_id: str = None,
      -                     sort_order: str = None,
      -                     limit: str = None,
      -                     page_id: str = None,
      -                     min_events_count: int = None,
      -                     filters: dict = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Returns threads that the current Agent has access to in a given chat.
      -
      -            Args:
      -                chat_id (str): ID of the chat for which threads are to be listed.
      -                sort_order (str): Possible values: asc, desc (default).
      -                limit (str): Limit of results per page. Default: 3, maximum: 100.
      -                page_id (str): ID of the page with paginated results.
      -                min_events_count (int): Range: 1-100;
      -                                        Specifies the minimum number of events
      -                                        to be returned in the response.
      -                filters (dict): Possible request filters.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_threads',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def get_chat(self,
      -                 chat_id: str = None,
      -                 thread_id: str = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -        ''' Returns a thread that the current Agent has access to in a given chat
      -
      -            Args:
      -                chat_id (str): ID of the chat for which thread is to be returned.
      -                thread_id (str): ID of the thread to show. Default: the latest thread (if exists)
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/get_chat',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_archives(self,
      -                      filters: dict = None,
      -                      page_id: str = None,
      -                      sort_order: str = None,
      -                      limit: str = None,
      -                      highlights: dict = None,
      -                      payload: dict = None,
      -                      headers: dict = None) -> httpx.Response:
      -        ''' Returns a list of the chats an Agent has access to.
      -            Together with a chat, the events of one thread from this chat are returned.
      -
      -            Args:
      -                filters (dict): Possible request filters.
      -                page_id (str): ID of the page with paginated results.
      -                sort_order (str): Possible values: asc, desc (default).
      -                                  Chat summaries are sorted by the creation date
      -                                  of its last thread.
      -                limit (str): Limit of results per page. Default: 10, maximum: 100.
      -                highlights (dict): Use it to highlight the match of filters.query.
      -                                   To enable highlights with default parameters,
      -                                   pass an empty object.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_archives',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def start_chat(self,
      -                   chat: dict = None,
      -                   active: bool = None,
      -                   continuous: bool = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Starts a chat.
      -
      -            Args:
      -                chat (dict): Dict containing chat properties, access and thread.
      -                active (bool): When set to False, creates an inactive thread; default: True.
      -                continuous (bool): Starts chat as continuous (online group is not required); default: False.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/start_chat',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def resume_chat(self,
      -                    chat: dict = None,
      -                    active: bool = None,
      -                    continuous: bool = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Restarts an archived chat.
      -
      -            Args:
      -                chat (dict): Dict containing chat properties, access and thread.
      -                active (bool): When set to False, creates an inactive thread; default: True.
      -                continuous (bool): Starts chat as continuous (online group is not required); default: False.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/resume_chat',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def deactivate_chat(self,
      -                        id: str = None,
      -                        ignore_requester_presence: bool = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Deactivates a chat by closing the currently open thread.
      -            Sending messages to this thread will no longer be possible.
      -
      -            Args:
      -                id (str): Chat ID to deactivate.
      -                ignore_requester_presence (bool): If `True`, allows requester to deactivate chat
      -                                                  without being present in the chat's users list.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/deactivate_chat',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def follow_chat(self,
      -                    id: str = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Marks a chat as followed. All changes to the chat will be sent to the requester
      -            until the chat is reactivated or unfollowed. Chat members don't need to follow
      -            their chats. They receive all chat pushes regardless of their follower status.
      -
      -            Args:
      -                id (str): ID of chat to be followed.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/follow_chat',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def unfollow_chat(self,
      -                      id: str = None,
      -                      payload: dict = None,
      -                      headers: dict = None) -> httpx.Response:
      -        ''' Removes the requester from the chat followers. After that, only key changes
      -            to the chat (like transfer_chat or close_active_thread) will be sent
      -            to the requester. Chat members cannot unfollow the chat.
      -
      -            Args:
      -                id (str): ID of chat to be unfollowed.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/unfollow_chat',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Chat access
      -
      -    def transfer_chat(self,
      -                      id: str = None,
      -                      target: dict = None,
      -                      ignore_agents_availability: bool = None,
      -                      ignore_requester_presence: bool = None,
      -                      payload: dict = None,
      -                      headers: dict = None) -> httpx.Response:
      -        ''' Transfers a chat to an agent or a group.
      -
      -            Args:
      -                id (str): chat ID
      -                target (dict): If missing, chat will be transferred within the current group.
      -                ignore_agents_availability (bool): If `True`, always transfers chats. Otherwise, fails
      -                              when unable to assign any agent from the requested groups.
      -                ignore_requester_presence (bool): If `True`, allows requester to transfer chat
      -                                                  without being present in the chat's users list.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/transfer_chat',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Chat users
      -
      -    def add_user_to_chat(self,
      -                         chat_id: str = None,
      -                         user_id: str = None,
      -                         user_type: str = None,
      -                         visibility: str = None,
      -                         ignore_requester_presence: bool = None,
      -                         payload: dict = None,
      -                         headers: dict = None) -> httpx.Response:
      -        ''' Adds a user to the chat. You can't add more than one customer user
      -            type to the chat.
      -
      -            Args:
      -                chat_id (str): chat ID.
      -                user_id (str): user ID.
      -                user_type (str): Possible values: agent or customer.
      -                visibility (str): Determines the visibility of events sent by
      -                                  the agent. Possible values: `all` or `agents`.
      -                ignore_requester_presence (bool): If `True`, allows requester to add user to chat
      -                                                  without being present in the chat's users list.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/add_user_to_chat',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def remove_user_from_chat(self,
      -                              chat_id: str = None,
      -                              user_id: str = None,
      -                              user_type: str = None,
      -                              ignore_requester_presence: bool = None,
      -                              payload: dict = None,
      -                              headers: dict = None) -> httpx.Response:
      -        ''' Removes a user from chat.
      -
      -            Args:
      -                chat_id (str): chat ID.
      -                user_id (str): user ID.
      -                user_type (str): Possible values: agent or customer.
      -                ignore_requester_presence (bool): If `True`, allows requester to remove user from chat
      -                                                  without being present in the chat's users list.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/remove_user_from_chat',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Events
      -
      -    def send_event(self,
      -                   chat_id: str = None,
      -                   event: dict = None,
      -                   attach_to_last_thread: bool = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Sends an Event object. Use this method to send a message by specifying the Message event type in the request.
      -            The method updates the requester's `events_seen_up_to` as if they've seen all chat events.
      -
      -            Args:
      -                chat_id (int): ID of the chat that you to send a message to.
      -                event (dict): Event object.
      -                attach_to_last_thread (bool): The flag is ignored for active chats.
      -                                              For inactive chats:
      -                                              True – the event will be added to the last thread;
      -                                              False – the request will fail. Default: False.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/send_event',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def upload_file(self,
      -                    file: typing.BinaryIO = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Uploads a file to the server as a temporary file. It returns a URL that expires
      -            after 24 hours unless the URL is used in `send_event`.
      -
      -            Args:
      -                file (typing.BinaryIO): File-like object with file to upload (Maximum size: 10MB).
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        return self.session.post(f'{self.api_url}/upload_file',
      -                                 files=file,
      -                                 headers=headers)
      -
      -    def send_rich_message_postback(self,
      -                                   chat_id: str = None,
      -                                   thread_id: str = None,
      -                                   event_id: str = None,
      -                                   postback: dict = None,
      -                                   payload: dict = None,
      -                                   headers: dict = None) -> httpx.Response:
      -        ''' Sends a rich message postback.
      -
      -            Args:
      -                chat_id (str): ID of the chat to send rich message postback to.
      -                thread_id (str): ID of the thread to send rich message postback to.
      -                event_id (str): ID of the event related to the rich message postback.
      -                postback (dict): Object containing postback data (id, toggled).
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/send_rich_message_postback',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Properties
      -
      -    def update_chat_properties(self,
      -                               id: str = None,
      -                               properties: dict = None,
      -                               payload: dict = None,
      -                               headers: dict = None) -> httpx.Response:
      -        ''' Updates chat properties.
      -
      -            Args:
      -                id (str): ID of the chat you to set a property for.
      -                properties (dict): Chat properties to set.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_chat_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def delete_chat_properties(self,
      -                               id: str = None,
      -                               properties: dict = None,
      -                               payload: dict = None,
      -                               headers: dict = None) -> httpx.Response:
      -        ''' Deletes chat properties.
      -
      -            Args:
      -                id (str): ID of the chat you want to delete properties of.
      -                properties (dict): Chat properties to delete.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/delete_chat_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def update_thread_properties(self,
      -                                 chat_id: str = None,
      -                                 thread_id: str = None,
      -                                 properties: dict = None,
      -                                 payload: dict = None,
      -                                 headers: dict = None) -> httpx.Response:
      -        ''' Updates chat thread properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you to set properties for.
      -                thread_id (str): ID of the thread you want to set properties for.
      -                properties (dict): Thread properties to set.
      -                                   You should stick to the general properties format and include namespace, property name and value.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_thread_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def delete_thread_properties(self,
      -                                 chat_id: str = None,
      -                                 thread_id: str = None,
      -                                 properties: dict = None,
      -                                 payload: dict = None,
      -                                 headers: dict = None) -> httpx.Response:
      -        ''' Deletes chat thread properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to delete the properties of.
      -                thread_id (str): ID of the thread you want to delete the properties of.
      -                properties (dict): Thread properties to delete.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/delete_thread_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def update_event_properties(self,
      -                                chat_id: str = None,
      -                                thread_id: str = None,
      -                                event_id: str = None,
      -                                properties: dict = None,
      -                                payload: dict = None,
      -                                headers: dict = None) -> httpx.Response:
      -        ''' Updates event properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you to set properties for.
      -                thread_id (str): ID of the thread you want to set properties for.
      -                event_id (str): ID of the event you want to set properties for.
      -                properties (dict): Thread properties to set.
      -                                   You should stick to the general properties format and include namespace, property name and value.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_event_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def delete_event_properties(self,
      -                                chat_id: str = None,
      -                                thread_id: str = None,
      -                                event_id: str = None,
      -                                properties: dict = None,
      -                                payload: dict = None,
      -                                headers: dict = None) -> httpx.Response:
      -        ''' Deletes event properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you to delete the properties for.
      -                thread_id (str): ID of the thread you want to delete the properties for.
      -                event_id (str): ID of the event you want to delete the properties for.
      -                properties (dict): Event properties to delete.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/delete_event_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Thread tags
      -
      -    def tag_thread(self,
      -                   chat_id: str = None,
      -                   thread_id: str = None,
      -                   tag: str = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Tags thread.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to add a tag to.
      -                thread_id (str): ID of the thread you want to add a tag to.
      -                tag (str): Tag name.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/tag_thread',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def untag_thread(self,
      -                     chat_id: str = None,
      -                     thread_id: str = None,
      -                     tag: str = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Untags thread.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to remove a tag from.
      -                thread_id (str): ID of the thread you want to remove a tag from.
      -                tag (str): Tag name.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/untag_thread',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Customers
      -
      -    def get_customer(self,
      -                     id: str = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Returns the info about the Customer with a given id.
      -
      -            Args:
      -                id (str): customer id
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/get_customer',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_customers(self,
      -                       page_id: str = None,
      -                       limit: str = None,
      -                       sort_order: str = None,
      -                       sort_by: str = None,
      -                       filters: dict = None,
      -                       payload: dict = None,
      -                       headers: dict = None) -> httpx.Response:
      -        ''' Returns the list of Customers.
      -
      -            Args:
      -                page_id (str): ID of the page with paginated results.
      -                limit (str): Limit of results per page. Default: 10, maximum: 100.
      -                sort_order (str): Possible values: asc, desc (default).
      -                sort_by (str): When sorting by fields other than created_at, the entries
      -                               with identical values will be additionally sorted by their
      -                               creation time. Possible values: created_at (default),
      -                               threads_count, visits_count, agent_last_event, customer_last_event.
      -                filters (dict): Possible request filters.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_customers',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def create_customer(self,
      -                        name: str = None,
      -                        email: str = None,
      -                        avatar: str = None,
      -                        session_fields: list = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Creates a new Customer user type.
      -
      -            Args:
      -                name (str): Customer's name.
      -                email (str): Customer's email.
      -                avatar (str): URL of the Customer's avatar
      -                session_fields (list): An array of custom object-enclosed key:value pairs.
      -                                       Respects the order of items.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/create_customer',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def update_customer(self,
      -                        id: str = None,
      -                        name: str = None,
      -                        email: str = None,
      -                        avatar: str = None,
      -                        session_fields: list = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Updates Customer's properties.
      -
      -            Args:
      -                id (str): ID of the Customer.
      -                name (str): Customer's name.
      -                email (str): Customer's email.
      -                avatar (str): URL of the Customer's avatar.
      -                session_fields (list): An array of custom object-enclosed key:value pairs.
      -                                       Respects the order of items.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_customer',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def ban_customer(self,
      -                     id: str = None,
      -                     ban: dict = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Bans the customer for a specific period of time. It immediately
      -            disconnects all active sessions of this customer and does not accept
      -            new ones during the ban lifespan.
      -
      -            Args:
      -                id (str): ID of the Customer.
      -                ban (dict): Ban object containing the number of days that
      -                        the Customer will be banned.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/ban_customer',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def follow_customer(self,
      -                        id: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Marks a customer as followed. As a result, the requester (an agent)
      -            will receive the info about all the changes related to that customer
      -            via pushes. Once the customer leaves the website or is unfollowed,
      -            the agent will no longer receive that information.
      -
      -            Args:
      -                id (str): ID of the Customer.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/follow_customer',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def unfollow_customer(self,
      -                          id: str = None,
      -                          payload: dict = None,
      -                          headers: dict = None) -> httpx.Response:
      -        ''' Removes the agent from the list of customer's followers. Calling this
      -            method on a customer the agent's chatting with will result in success,
      -            however, the agent will still receive pushes about the customer's data
      -            updates. The unfollowing will take effect once the chat ends.
      -
      -            Args:
      -                id (str): ID of the Customer.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/unfollow_customer',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Status
      -
      -    def set_routing_status(self,
      -                           status: str = None,
      -                           agent_id: str = None,
      -                           payload: dict = None,
      -                           headers: dict = None) -> httpx.Response:
      -        ''' Changes the status of an Agent or a Bot Agent.
      -
      -            Args:
      -                status (str): For Agents: accepting_chats or not_accepting_chats;
      -                              for Bot Agents: accepting_chats, not_accepting_chats, or offline
      -                agent_id (str): If not specified, the requester's status will be updated.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/set_routing_status',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_routing_statuses(self,
      -                              filters: dict = None,
      -                              payload: dict = None,
      -                              headers: dict = None) -> httpx.Response:
      -        ''' Returns the current routing status of each agent selected by the provided filters.
      -
      -            Args:
      -                filters (dict): Possible request filters.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_routing_statuses',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -
      -# Other
      -
      -    def mark_events_as_seen(self,
      -                            chat_id: str = None,
      -                            seen_up_to: str = None,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -        ''' Updates `seen_up_to` value for a given chat.
      -
      -            Args:
      -                chat_id (str): Chat to mark events.
      -                seen_up_to (str): Date up to which mark events - RFC 3339 date-time format
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/mark_events_as_seen',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def send_typing_indicator(self,
      -                              chat_id: str = None,
      -                              visibility: str = None,
      -                              is_typing: bool = None,
      -                              payload: dict = None,
      -                              headers: dict = None) -> httpx.Response:
      -        ''' Sends typing indicator.
      -
      -            Args:
      -                chat_id (str): ID of the chat that to send the typing indicator to.
      -                visibility (str): Possible values: `all`, `agents`.
      -                is_typing (bool): A flag that indicates if you are typing.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/send_typing_indicator',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def multicast(self,
      -                  recipients: dict = None,
      -                  content: typing.Any = None,
      -                  type: str = None,
      -                  payload: dict = None,
      -                  headers: dict = None) -> httpx.Response:
      -        ''' Sends a multicast (chat-unrelated communication).
      -
      -            Args:
      -                recipients (dict): Object containing filters related to multicast recipients.
      -                content (typing.Any): A JSON message to be sent.
      -                type (str): Multicast message type.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/multicast',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_agents_for_transfer(self,
      -                                 chat_id: str = None,
      -                                 payload: dict = None,
      -                                 headers: dict = None) -> httpx.Response:
      -        ''' Returns the list of Agents you can transfer a chat to.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to transfer.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_agents_for_transfer',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Classes

      -
      -
      -class AgentWebV34 -(access_token: typing.Union[AccessToken, str], base_url: str, http2: bool, proxies=None, verify: bool = True, disable_logging: bool = False, timeout: float = Timeout(timeout=15)) -
      -
      -

      Agent Web API Class containing methods in version 3.4.

      -
      - -Expand source code - -
      class AgentWebV34(HttpClient):
      -    ''' Agent Web API Class containing methods in version 3.4. '''
      -    def __init__(self,
      -                 access_token: typing.Union[AccessToken, str],
      -                 base_url: str,
      -                 http2: bool,
      -                 proxies=None,
      -                 verify: bool = True,
      -                 disable_logging: bool = False,
      -                 timeout: float = httpx.Timeout(15)):
      -        super().__init__(access_token, base_url, http2, proxies, verify,
      -                         disable_logging, timeout)
      -        self.api_url = f'https://{base_url}/v3.4/agent/action'
      -
      -    # Chats
      -
      -    def list_chats(self,
      -                   filters: dict = None,
      -                   sort_order: str = None,
      -                   limit: int = None,
      -                   page_id: str = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Returns summaries of the chats an Agent has access to.
      -
      -            Args:
      -                filters (dict): Possible request filters. Mustn't change between
      -                                requests for subsequent pages. Otherwise,
      -                                the behavior is undefined.
      -                sort_order (str): Possible values: asc, desc (default).
      -                                  Chat summaries are sorted by the creation
      -                                  date of its last thread.
      -                limit (int): Limit of results per page. Default: 10, maximum: 100.
      -                page_id (str): ID of the page with paginated results.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided
      -                                for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_chats',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_threads(self,
      -                     chat_id: str = None,
      -                     sort_order: str = None,
      -                     limit: str = None,
      -                     page_id: str = None,
      -                     min_events_count: int = None,
      -                     filters: dict = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Returns threads that the current Agent has access to in a given chat.
      -
      -            Args:
      -                chat_id (str): ID of the chat for which threads are to be listed.
      -                sort_order (str): Possible values: asc, desc (default).
      -                limit (str): Limit of results per page. Default: 3, maximum: 100.
      -                page_id (str): ID of the page with paginated results.
      -                min_events_count (int): Range: 1-100;
      -                                        Specifies the minimum number of events
      -                                        to be returned in the response.
      -                filters (dict): Possible request filters.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_threads',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def get_chat(self,
      -                 chat_id: str = None,
      -                 thread_id: str = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -        ''' Returns a thread that the current Agent has access to in a given chat
      -
      -            Args:
      -                chat_id (str): ID of the chat for which thread is to be returned.
      -                thread_id (str): ID of the thread to show. Default: the latest thread (if exists)
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/get_chat',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_archives(self,
      -                      filters: dict = None,
      -                      page_id: str = None,
      -                      sort_order: str = None,
      -                      limit: str = None,
      -                      highlights: dict = None,
      -                      payload: dict = None,
      -                      headers: dict = None) -> httpx.Response:
      -        ''' Returns a list of the chats an Agent has access to.
      -            Together with a chat, the events of one thread from this chat are returned.
      -
      -            Args:
      -                filters (dict): Possible request filters.
      -                page_id (str): ID of the page with paginated results.
      -                sort_order (str): Possible values: asc, desc (default).
      -                                  Chat summaries are sorted by the creation date
      -                                  of its last thread.
      -                limit (str): Limit of results per page. Default: 10, maximum: 100.
      -                highlights (dict): Use it to highlight the match of filters.query.
      -                                   To enable highlights with default parameters,
      -                                   pass an empty object.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_archives',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def start_chat(self,
      -                   chat: dict = None,
      -                   active: bool = None,
      -                   continuous: bool = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Starts a chat.
      -
      -            Args:
      -                chat (dict): Dict containing chat properties, access and thread.
      -                active (bool): When set to False, creates an inactive thread; default: True.
      -                continuous (bool): Starts chat as continuous (online group is not required); default: False.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/start_chat',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def resume_chat(self,
      -                    chat: dict = None,
      -                    active: bool = None,
      -                    continuous: bool = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Restarts an archived chat.
      -
      -            Args:
      -                chat (dict): Dict containing chat properties, access and thread.
      -                active (bool): When set to False, creates an inactive thread; default: True.
      -                continuous (bool): Starts chat as continuous (online group is not required); default: False.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/resume_chat',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def deactivate_chat(self,
      -                        id: str = None,
      -                        ignore_requester_presence: bool = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Deactivates a chat by closing the currently open thread.
      -            Sending messages to this thread will no longer be possible.
      -
      -            Args:
      -                id (str): Chat ID to deactivate.
      -                ignore_requester_presence (bool): If `True`, allows requester to deactivate chat
      -                                                  without being present in the chat's users list.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/deactivate_chat',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def follow_chat(self,
      -                    id: str = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Marks a chat as followed. All changes to the chat will be sent to the requester
      -            until the chat is reactivated or unfollowed. Chat members don't need to follow
      -            their chats. They receive all chat pushes regardless of their follower status.
      -
      -            Args:
      -                id (str): ID of chat to be followed.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/follow_chat',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def unfollow_chat(self,
      -                      id: str = None,
      -                      payload: dict = None,
      -                      headers: dict = None) -> httpx.Response:
      -        ''' Removes the requester from the chat followers. After that, only key changes
      -            to the chat (like transfer_chat or close_active_thread) will be sent
      -            to the requester. Chat members cannot unfollow the chat.
      -
      -            Args:
      -                id (str): ID of chat to be unfollowed.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/unfollow_chat',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Chat access
      -
      -    def transfer_chat(self,
      -                      id: str = None,
      -                      target: dict = None,
      -                      ignore_agents_availability: bool = None,
      -                      ignore_requester_presence: bool = None,
      -                      payload: dict = None,
      -                      headers: dict = None) -> httpx.Response:
      -        ''' Transfers a chat to an agent or a group.
      -
      -            Args:
      -                id (str): chat ID
      -                target (dict): If missing, chat will be transferred within the current group.
      -                ignore_agents_availability (bool): If `True`, always transfers chats. Otherwise, fails
      -                              when unable to assign any agent from the requested groups.
      -                ignore_requester_presence (bool): If `True`, allows requester to transfer chat
      -                                                  without being present in the chat's users list.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/transfer_chat',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Chat users
      -
      -    def add_user_to_chat(self,
      -                         chat_id: str = None,
      -                         user_id: str = None,
      -                         user_type: str = None,
      -                         visibility: str = None,
      -                         ignore_requester_presence: bool = None,
      -                         payload: dict = None,
      -                         headers: dict = None) -> httpx.Response:
      -        ''' Adds a user to the chat. You can't add more than one customer user
      -            type to the chat.
      -
      -            Args:
      -                chat_id (str): chat ID.
      -                user_id (str): user ID.
      -                user_type (str): Possible values: agent or customer.
      -                visibility (str): Determines the visibility of events sent by
      -                                  the agent. Possible values: `all` or `agents`.
      -                ignore_requester_presence (bool): If `True`, allows requester to add user to chat
      -                                                  without being present in the chat's users list.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/add_user_to_chat',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def remove_user_from_chat(self,
      -                              chat_id: str = None,
      -                              user_id: str = None,
      -                              user_type: str = None,
      -                              ignore_requester_presence: bool = None,
      -                              payload: dict = None,
      -                              headers: dict = None) -> httpx.Response:
      -        ''' Removes a user from chat.
      -
      -            Args:
      -                chat_id (str): chat ID.
      -                user_id (str): user ID.
      -                user_type (str): Possible values: agent or customer.
      -                ignore_requester_presence (bool): If `True`, allows requester to remove user from chat
      -                                                  without being present in the chat's users list.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/remove_user_from_chat',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Events
      -
      -    def send_event(self,
      -                   chat_id: str = None,
      -                   event: dict = None,
      -                   attach_to_last_thread: bool = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Sends an Event object. Use this method to send a message by specifying the Message event type in the request.
      -            The method updates the requester's `events_seen_up_to` as if they've seen all chat events.
      -
      -            Args:
      -                chat_id (int): ID of the chat that you to send a message to.
      -                event (dict): Event object.
      -                attach_to_last_thread (bool): The flag is ignored for active chats.
      -                                              For inactive chats:
      -                                              True – the event will be added to the last thread;
      -                                              False – the request will fail. Default: False.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/send_event',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def upload_file(self,
      -                    file: typing.BinaryIO = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Uploads a file to the server as a temporary file. It returns a URL that expires
      -            after 24 hours unless the URL is used in `send_event`.
      -
      -            Args:
      -                file (typing.BinaryIO): File-like object with file to upload (Maximum size: 10MB).
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        return self.session.post(f'{self.api_url}/upload_file',
      -                                 files=file,
      -                                 headers=headers)
      -
      -    def send_rich_message_postback(self,
      -                                   chat_id: str = None,
      -                                   thread_id: str = None,
      -                                   event_id: str = None,
      -                                   postback: dict = None,
      -                                   payload: dict = None,
      -                                   headers: dict = None) -> httpx.Response:
      -        ''' Sends a rich message postback.
      -
      -            Args:
      -                chat_id (str): ID of the chat to send rich message postback to.
      -                thread_id (str): ID of the thread to send rich message postback to.
      -                event_id (str): ID of the event related to the rich message postback.
      -                postback (dict): Object containing postback data (id, toggled).
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/send_rich_message_postback',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Properties
      -
      -    def update_chat_properties(self,
      -                               id: str = None,
      -                               properties: dict = None,
      -                               payload: dict = None,
      -                               headers: dict = None) -> httpx.Response:
      -        ''' Updates chat properties.
      -
      -            Args:
      -                id (str): ID of the chat you to set a property for.
      -                properties (dict): Chat properties to set.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_chat_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def delete_chat_properties(self,
      -                               id: str = None,
      -                               properties: dict = None,
      -                               payload: dict = None,
      -                               headers: dict = None) -> httpx.Response:
      -        ''' Deletes chat properties.
      -
      -            Args:
      -                id (str): ID of the chat you want to delete properties of.
      -                properties (dict): Chat properties to delete.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/delete_chat_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def update_thread_properties(self,
      -                                 chat_id: str = None,
      -                                 thread_id: str = None,
      -                                 properties: dict = None,
      -                                 payload: dict = None,
      -                                 headers: dict = None) -> httpx.Response:
      -        ''' Updates chat thread properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you to set properties for.
      -                thread_id (str): ID of the thread you want to set properties for.
      -                properties (dict): Thread properties to set.
      -                                   You should stick to the general properties format and include namespace, property name and value.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_thread_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def delete_thread_properties(self,
      -                                 chat_id: str = None,
      -                                 thread_id: str = None,
      -                                 properties: dict = None,
      -                                 payload: dict = None,
      -                                 headers: dict = None) -> httpx.Response:
      -        ''' Deletes chat thread properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to delete the properties of.
      -                thread_id (str): ID of the thread you want to delete the properties of.
      -                properties (dict): Thread properties to delete.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/delete_thread_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def update_event_properties(self,
      -                                chat_id: str = None,
      -                                thread_id: str = None,
      -                                event_id: str = None,
      -                                properties: dict = None,
      -                                payload: dict = None,
      -                                headers: dict = None) -> httpx.Response:
      -        ''' Updates event properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you to set properties for.
      -                thread_id (str): ID of the thread you want to set properties for.
      -                event_id (str): ID of the event you want to set properties for.
      -                properties (dict): Thread properties to set.
      -                                   You should stick to the general properties format and include namespace, property name and value.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_event_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def delete_event_properties(self,
      -                                chat_id: str = None,
      -                                thread_id: str = None,
      -                                event_id: str = None,
      -                                properties: dict = None,
      -                                payload: dict = None,
      -                                headers: dict = None) -> httpx.Response:
      -        ''' Deletes event properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you to delete the properties for.
      -                thread_id (str): ID of the thread you want to delete the properties for.
      -                event_id (str): ID of the event you want to delete the properties for.
      -                properties (dict): Event properties to delete.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/delete_event_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Thread tags
      -
      -    def tag_thread(self,
      -                   chat_id: str = None,
      -                   thread_id: str = None,
      -                   tag: str = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Tags thread.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to add a tag to.
      -                thread_id (str): ID of the thread you want to add a tag to.
      -                tag (str): Tag name.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/tag_thread',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def untag_thread(self,
      -                     chat_id: str = None,
      -                     thread_id: str = None,
      -                     tag: str = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Untags thread.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to remove a tag from.
      -                thread_id (str): ID of the thread you want to remove a tag from.
      -                tag (str): Tag name.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/untag_thread',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Customers
      -
      -    def get_customer(self,
      -                     id: str = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Returns the info about the Customer with a given id.
      -
      -            Args:
      -                id (str): customer id
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/get_customer',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_customers(self,
      -                       page_id: str = None,
      -                       limit: str = None,
      -                       sort_order: str = None,
      -                       sort_by: str = None,
      -                       filters: dict = None,
      -                       payload: dict = None,
      -                       headers: dict = None) -> httpx.Response:
      -        ''' Returns the list of Customers.
      -
      -            Args:
      -                page_id (str): ID of the page with paginated results.
      -                limit (str): Limit of results per page. Default: 10, maximum: 100.
      -                sort_order (str): Possible values: asc, desc (default).
      -                sort_by (str): When sorting by fields other than created_at, the entries
      -                               with identical values will be additionally sorted by their
      -                               creation time. Possible values: created_at (default),
      -                               threads_count, visits_count, agent_last_event, customer_last_event.
      -                filters (dict): Possible request filters.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_customers',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def create_customer(self,
      -                        name: str = None,
      -                        email: str = None,
      -                        avatar: str = None,
      -                        session_fields: list = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Creates a new Customer user type.
      -
      -            Args:
      -                name (str): Customer's name.
      -                email (str): Customer's email.
      -                avatar (str): URL of the Customer's avatar
      -                session_fields (list): An array of custom object-enclosed key:value pairs.
      -                                       Respects the order of items.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/create_customer',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def update_customer(self,
      -                        id: str = None,
      -                        name: str = None,
      -                        email: str = None,
      -                        avatar: str = None,
      -                        session_fields: list = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Updates Customer's properties.
      -
      -            Args:
      -                id (str): ID of the Customer.
      -                name (str): Customer's name.
      -                email (str): Customer's email.
      -                avatar (str): URL of the Customer's avatar.
      -                session_fields (list): An array of custom object-enclosed key:value pairs.
      -                                       Respects the order of items.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_customer',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def ban_customer(self,
      -                     id: str = None,
      -                     ban: dict = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Bans the customer for a specific period of time. It immediately
      -            disconnects all active sessions of this customer and does not accept
      -            new ones during the ban lifespan.
      -
      -            Args:
      -                id (str): ID of the Customer.
      -                ban (dict): Ban object containing the number of days that
      -                        the Customer will be banned.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/ban_customer',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def follow_customer(self,
      -                        id: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Marks a customer as followed. As a result, the requester (an agent)
      -            will receive the info about all the changes related to that customer
      -            via pushes. Once the customer leaves the website or is unfollowed,
      -            the agent will no longer receive that information.
      -
      -            Args:
      -                id (str): ID of the Customer.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/follow_customer',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def unfollow_customer(self,
      -                          id: str = None,
      -                          payload: dict = None,
      -                          headers: dict = None) -> httpx.Response:
      -        ''' Removes the agent from the list of customer's followers. Calling this
      -            method on a customer the agent's chatting with will result in success,
      -            however, the agent will still receive pushes about the customer's data
      -            updates. The unfollowing will take effect once the chat ends.
      -
      -            Args:
      -                id (str): ID of the Customer.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/unfollow_customer',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Status
      -
      -    def set_routing_status(self,
      -                           status: str = None,
      -                           agent_id: str = None,
      -                           payload: dict = None,
      -                           headers: dict = None) -> httpx.Response:
      -        ''' Changes the status of an Agent or a Bot Agent.
      -
      -            Args:
      -                status (str): For Agents: accepting_chats or not_accepting_chats;
      -                              for Bot Agents: accepting_chats, not_accepting_chats, or offline
      -                agent_id (str): If not specified, the requester's status will be updated.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/set_routing_status',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_routing_statuses(self,
      -                              filters: dict = None,
      -                              payload: dict = None,
      -                              headers: dict = None) -> httpx.Response:
      -        ''' Returns the current routing status of each agent selected by the provided filters.
      -
      -            Args:
      -                filters (dict): Possible request filters.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_routing_statuses',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -
      -# Other
      -
      -    def mark_events_as_seen(self,
      -                            chat_id: str = None,
      -                            seen_up_to: str = None,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -        ''' Updates `seen_up_to` value for a given chat.
      -
      -            Args:
      -                chat_id (str): Chat to mark events.
      -                seen_up_to (str): Date up to which mark events - RFC 3339 date-time format
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/mark_events_as_seen',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def send_typing_indicator(self,
      -                              chat_id: str = None,
      -                              visibility: str = None,
      -                              is_typing: bool = None,
      -                              payload: dict = None,
      -                              headers: dict = None) -> httpx.Response:
      -        ''' Sends typing indicator.
      -
      -            Args:
      -                chat_id (str): ID of the chat that to send the typing indicator to.
      -                visibility (str): Possible values: `all`, `agents`.
      -                is_typing (bool): A flag that indicates if you are typing.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/send_typing_indicator',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def multicast(self,
      -                  recipients: dict = None,
      -                  content: typing.Any = None,
      -                  type: str = None,
      -                  payload: dict = None,
      -                  headers: dict = None) -> httpx.Response:
      -        ''' Sends a multicast (chat-unrelated communication).
      -
      -            Args:
      -                recipients (dict): Object containing filters related to multicast recipients.
      -                content (typing.Any): A JSON message to be sent.
      -                type (str): Multicast message type.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/multicast',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_agents_for_transfer(self,
      -                                 chat_id: str = None,
      -                                 payload: dict = None,
      -                                 headers: dict = None) -> httpx.Response:
      -        ''' Returns the list of Agents you can transfer a chat to.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to transfer.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_agents_for_transfer',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -

      Ancestors

      -
        -
      • livechat.utils.http_client.HttpClient
      • -
      -

      Methods

      -
      -
      -def add_user_to_chat(self, chat_id: str = None, user_id: str = None, user_type: str = None, visibility: str = None, ignore_requester_presence: bool = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Adds a user to the chat. You can't add more than one customer user -type to the chat.

      -

      Args

      -
      -
      chat_id : str
      -
      chat ID.
      -
      user_id : str
      -
      user ID.
      -
      user_type : str
      -
      Possible values: agent or customer.
      -
      visibility : str
      -
      Determines the visibility of events sent by -the agent. Possible values: all or agents.
      -
      ignore_requester_presence : bool
      -
      If True, allows requester to add user to chat -without being present in the chat's users list.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def add_user_to_chat(self,
      -                     chat_id: str = None,
      -                     user_id: str = None,
      -                     user_type: str = None,
      -                     visibility: str = None,
      -                     ignore_requester_presence: bool = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -    ''' Adds a user to the chat. You can't add more than one customer user
      -        type to the chat.
      -
      -        Args:
      -            chat_id (str): chat ID.
      -            user_id (str): user ID.
      -            user_type (str): Possible values: agent or customer.
      -            visibility (str): Determines the visibility of events sent by
      -                              the agent. Possible values: `all` or `agents`.
      -            ignore_requester_presence (bool): If `True`, allows requester to add user to chat
      -                                              without being present in the chat's users list.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/add_user_to_chat',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def ban_customer(self, id: str = None, ban: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Bans the customer for a specific period of time. It immediately -disconnects all active sessions of this customer and does not accept -new ones during the ban lifespan.

      -

      Args

      -
      -
      id : str
      -
      ID of the Customer.
      -
      ban : dict
      -
      Ban object containing the number of days that -the Customer will be banned.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def ban_customer(self,
      -                 id: str = None,
      -                 ban: dict = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -    ''' Bans the customer for a specific period of time. It immediately
      -        disconnects all active sessions of this customer and does not accept
      -        new ones during the ban lifespan.
      -
      -        Args:
      -            id (str): ID of the Customer.
      -            ban (dict): Ban object containing the number of days that
      -                    the Customer will be banned.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/ban_customer',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def create_customer(self, name: str = None, email: str = None, avatar: str = None, session_fields: list = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Creates a new Customer user type.

      -

      Args

      -
      -
      name : str
      -
      Customer's name.
      -
      email : str
      -
      Customer's email.
      -
      avatar : str
      -
      URL of the Customer's avatar
      -
      session_fields : list
      -
      An array of custom object-enclosed key:value pairs. -Respects the order of items.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def create_customer(self,
      -                    name: str = None,
      -                    email: str = None,
      -                    avatar: str = None,
      -                    session_fields: list = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -    ''' Creates a new Customer user type.
      -
      -        Args:
      -            name (str): Customer's name.
      -            email (str): Customer's email.
      -            avatar (str): URL of the Customer's avatar
      -            session_fields (list): An array of custom object-enclosed key:value pairs.
      -                                   Respects the order of items.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/create_customer',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def deactivate_chat(self, id: str = None, ignore_requester_presence: bool = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Deactivates a chat by closing the currently open thread. -Sending messages to this thread will no longer be possible.

      -

      Args

      -
      -
      id : str
      -
      Chat ID to deactivate.
      -
      ignore_requester_presence : bool
      -
      If True, allows requester to deactivate chat -without being present in the chat's users list.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def deactivate_chat(self,
      -                    id: str = None,
      -                    ignore_requester_presence: bool = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -    ''' Deactivates a chat by closing the currently open thread.
      -        Sending messages to this thread will no longer be possible.
      -
      -        Args:
      -            id (str): Chat ID to deactivate.
      -            ignore_requester_presence (bool): If `True`, allows requester to deactivate chat
      -                                              without being present in the chat's users list.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/deactivate_chat',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def delete_chat_properties(self, id: str = None, properties: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Deletes chat properties.

      -

      Args

      -
      -
      id : str
      -
      ID of the chat you want to delete properties of.
      -
      properties : dict
      -
      Chat properties to delete.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def delete_chat_properties(self,
      -                           id: str = None,
      -                           properties: dict = None,
      -                           payload: dict = None,
      -                           headers: dict = None) -> httpx.Response:
      -    ''' Deletes chat properties.
      -
      -        Args:
      -            id (str): ID of the chat you want to delete properties of.
      -            properties (dict): Chat properties to delete.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/delete_chat_properties',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def delete_event_properties(self, chat_id: str = None, thread_id: str = None, event_id: str = None, properties: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Deletes event properties.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you to delete the properties for.
      -
      thread_id : str
      -
      ID of the thread you want to delete the properties for.
      -
      event_id : str
      -
      ID of the event you want to delete the properties for.
      -
      properties : dict
      -
      Event properties to delete.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def delete_event_properties(self,
      -                            chat_id: str = None,
      -                            thread_id: str = None,
      -                            event_id: str = None,
      -                            properties: dict = None,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -    ''' Deletes event properties.
      -
      -        Args:
      -            chat_id (str): ID of the chat you to delete the properties for.
      -            thread_id (str): ID of the thread you want to delete the properties for.
      -            event_id (str): ID of the event you want to delete the properties for.
      -            properties (dict): Event properties to delete.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/delete_event_properties',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def delete_thread_properties(self, chat_id: str = None, thread_id: str = None, properties: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Deletes chat thread properties.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you want to delete the properties of.
      -
      thread_id : str
      -
      ID of the thread you want to delete the properties of.
      -
      properties : dict
      -
      Thread properties to delete.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def delete_thread_properties(self,
      -                             chat_id: str = None,
      -                             thread_id: str = None,
      -                             properties: dict = None,
      -                             payload: dict = None,
      -                             headers: dict = None) -> httpx.Response:
      -    ''' Deletes chat thread properties.
      -
      -        Args:
      -            chat_id (str): ID of the chat you want to delete the properties of.
      -            thread_id (str): ID of the thread you want to delete the properties of.
      -            properties (dict): Thread properties to delete.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/delete_thread_properties',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def follow_chat(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Marks a chat as followed. All changes to the chat will be sent to the requester -until the chat is reactivated or unfollowed. Chat members don't need to follow -their chats. They receive all chat pushes regardless of their follower status.

      -

      Args

      -
      -
      id : str
      -
      ID of chat to be followed.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def follow_chat(self,
      -                id: str = None,
      -                payload: dict = None,
      -                headers: dict = None) -> httpx.Response:
      -    ''' Marks a chat as followed. All changes to the chat will be sent to the requester
      -        until the chat is reactivated or unfollowed. Chat members don't need to follow
      -        their chats. They receive all chat pushes regardless of their follower status.
      -
      -        Args:
      -            id (str): ID of chat to be followed.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/follow_chat',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def follow_customer(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Marks a customer as followed. As a result, the requester (an agent) -will receive the info about all the changes related to that customer -via pushes. Once the customer leaves the website or is unfollowed, -the agent will no longer receive that information.

      -

      Args

      -
      -
      id : str
      -
      ID of the Customer.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def follow_customer(self,
      -                    id: str = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -    ''' Marks a customer as followed. As a result, the requester (an agent)
      -        will receive the info about all the changes related to that customer
      -        via pushes. Once the customer leaves the website or is unfollowed,
      -        the agent will no longer receive that information.
      -
      -        Args:
      -            id (str): ID of the Customer.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/follow_customer',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def get_chat(self, chat_id: str = None, thread_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns a thread that the current Agent has access to in a given chat

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat for which thread is to be returned.
      -
      thread_id : str
      -
      ID of the thread to show. Default: the latest thread (if exists)
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def get_chat(self,
      -             chat_id: str = None,
      -             thread_id: str = None,
      -             payload: dict = None,
      -             headers: dict = None) -> httpx.Response:
      -    ''' Returns a thread that the current Agent has access to in a given chat
      -
      -        Args:
      -            chat_id (str): ID of the chat for which thread is to be returned.
      -            thread_id (str): ID of the thread to show. Default: the latest thread (if exists)
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/get_chat',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def get_customer(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns the info about the Customer with a given id.

      -

      Args

      -
      -
      id : str
      -
      customer id
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def get_customer(self,
      -                 id: str = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -    ''' Returns the info about the Customer with a given id.
      -
      -        Args:
      -            id (str): customer id
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/get_customer',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def list_agents_for_transfer(self, chat_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns the list of Agents you can transfer a chat to.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you want to transfer.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_agents_for_transfer(self,
      -                             chat_id: str = None,
      -                             payload: dict = None,
      -                             headers: dict = None) -> httpx.Response:
      -    ''' Returns the list of Agents you can transfer a chat to.
      -
      -        Args:
      -            chat_id (str): ID of the chat you want to transfer.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/list_agents_for_transfer',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def list_archives(self, filters: dict = None, page_id: str = None, sort_order: str = None, limit: str = None, highlights: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns a list of the chats an Agent has access to. -Together with a chat, the events of one thread from this chat are returned.

      -

      Args

      -
      -
      filters : dict
      -
      Possible request filters.
      -
      page_id : str
      -
      ID of the page with paginated results.
      -
      sort_order : str
      -
      Possible values: asc, desc (default). -Chat summaries are sorted by the creation date -of its last thread.
      -
      limit : str
      -
      Limit of results per page. Default: 10, maximum: 100.
      -
      highlights : dict
      -
      Use it to highlight the match of filters.query. -To enable highlights with default parameters, -pass an empty object.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_archives(self,
      -                  filters: dict = None,
      -                  page_id: str = None,
      -                  sort_order: str = None,
      -                  limit: str = None,
      -                  highlights: dict = None,
      -                  payload: dict = None,
      -                  headers: dict = None) -> httpx.Response:
      -    ''' Returns a list of the chats an Agent has access to.
      -        Together with a chat, the events of one thread from this chat are returned.
      -
      -        Args:
      -            filters (dict): Possible request filters.
      -            page_id (str): ID of the page with paginated results.
      -            sort_order (str): Possible values: asc, desc (default).
      -                              Chat summaries are sorted by the creation date
      -                              of its last thread.
      -            limit (str): Limit of results per page. Default: 10, maximum: 100.
      -            highlights (dict): Use it to highlight the match of filters.query.
      -                               To enable highlights with default parameters,
      -                               pass an empty object.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/list_archives',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def list_chats(self, filters: dict = None, sort_order: str = None, limit: int = None, page_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns summaries of the chats an Agent has access to.

      -

      Args

      -
      -
      filters : dict
      -
      Possible request filters. Mustn't change between -requests for subsequent pages. Otherwise, -the behavior is undefined.
      -
      sort_order : str
      -
      Possible values: asc, desc (default). -Chat summaries are sorted by the creation -date of its last thread.
      -
      limit : int
      -
      Limit of results per page. Default: 10, maximum: 100.
      -
      page_id : str
      -
      ID of the page with paginated results.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided -for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_chats(self,
      -               filters: dict = None,
      -               sort_order: str = None,
      -               limit: int = None,
      -               page_id: str = None,
      -               payload: dict = None,
      -               headers: dict = None) -> httpx.Response:
      -    ''' Returns summaries of the chats an Agent has access to.
      -
      -        Args:
      -            filters (dict): Possible request filters. Mustn't change between
      -                            requests for subsequent pages. Otherwise,
      -                            the behavior is undefined.
      -            sort_order (str): Possible values: asc, desc (default).
      -                              Chat summaries are sorted by the creation
      -                              date of its last thread.
      -            limit (int): Limit of results per page. Default: 10, maximum: 100.
      -            page_id (str): ID of the page with paginated results.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided
      -                            for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/list_chats',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def list_customers(self, page_id: str = None, limit: str = None, sort_order: str = None, sort_by: str = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns the list of Customers.

      -

      Args

      -
      -
      page_id : str
      -
      ID of the page with paginated results.
      -
      limit : str
      -
      Limit of results per page. Default: 10, maximum: 100.
      -
      sort_order : str
      -
      Possible values: asc, desc (default).
      -
      sort_by : str
      -
      When sorting by fields other than created_at, the entries -with identical values will be additionally sorted by their -creation time. Possible values: created_at (default), -threads_count, visits_count, agent_last_event, customer_last_event.
      -
      filters : dict
      -
      Possible request filters.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_customers(self,
      -                   page_id: str = None,
      -                   limit: str = None,
      -                   sort_order: str = None,
      -                   sort_by: str = None,
      -                   filters: dict = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -    ''' Returns the list of Customers.
      -
      -        Args:
      -            page_id (str): ID of the page with paginated results.
      -            limit (str): Limit of results per page. Default: 10, maximum: 100.
      -            sort_order (str): Possible values: asc, desc (default).
      -            sort_by (str): When sorting by fields other than created_at, the entries
      -                           with identical values will be additionally sorted by their
      -                           creation time. Possible values: created_at (default),
      -                           threads_count, visits_count, agent_last_event, customer_last_event.
      -            filters (dict): Possible request filters.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/list_customers',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def list_routing_statuses(self, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns the current routing status of each agent selected by the provided filters.

      -

      Args

      -
      -
      filters : dict
      -
      Possible request filters.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_routing_statuses(self,
      -                          filters: dict = None,
      -                          payload: dict = None,
      -                          headers: dict = None) -> httpx.Response:
      -    ''' Returns the current routing status of each agent selected by the provided filters.
      -
      -        Args:
      -            filters (dict): Possible request filters.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/list_routing_statuses',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def list_threads(self, chat_id: str = None, sort_order: str = None, limit: str = None, page_id: str = None, min_events_count: int = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns threads that the current Agent has access to in a given chat.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat for which threads are to be listed.
      -
      sort_order : str
      -
      Possible values: asc, desc (default).
      -
      limit : str
      -
      Limit of results per page. Default: 3, maximum: 100.
      -
      page_id : str
      -
      ID of the page with paginated results.
      -
      min_events_count : int
      -
      Range: 1-100; -Specifies the minimum number of events -to be returned in the response.
      -
      filters : dict
      -
      Possible request filters.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_threads(self,
      -                 chat_id: str = None,
      -                 sort_order: str = None,
      -                 limit: str = None,
      -                 page_id: str = None,
      -                 min_events_count: int = None,
      -                 filters: dict = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -    ''' Returns threads that the current Agent has access to in a given chat.
      -
      -        Args:
      -            chat_id (str): ID of the chat for which threads are to be listed.
      -            sort_order (str): Possible values: asc, desc (default).
      -            limit (str): Limit of results per page. Default: 3, maximum: 100.
      -            page_id (str): ID of the page with paginated results.
      -            min_events_count (int): Range: 1-100;
      -                                    Specifies the minimum number of events
      -                                    to be returned in the response.
      -            filters (dict): Possible request filters.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/list_threads',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def mark_events_as_seen(self, chat_id: str = None, seen_up_to: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Updates seen_up_to value for a given chat.

      -

      Args

      -
      -
      chat_id : str
      -
      Chat to mark events.
      -
      seen_up_to : str
      -
      Date up to which mark events - RFC 3339 date-time format
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def mark_events_as_seen(self,
      -                        chat_id: str = None,
      -                        seen_up_to: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -    ''' Updates `seen_up_to` value for a given chat.
      -
      -        Args:
      -            chat_id (str): Chat to mark events.
      -            seen_up_to (str): Date up to which mark events - RFC 3339 date-time format
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/mark_events_as_seen',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def multicast(self, recipients: dict = None, content: typing.Any = None, type: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Sends a multicast (chat-unrelated communication).

      -

      Args

      -
      -
      recipients : dict
      -
      Object containing filters related to multicast recipients.
      -
      content : typing.Any
      -
      A JSON message to be sent.
      -
      type : str
      -
      Multicast message type.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def multicast(self,
      -              recipients: dict = None,
      -              content: typing.Any = None,
      -              type: str = None,
      -              payload: dict = None,
      -              headers: dict = None) -> httpx.Response:
      -    ''' Sends a multicast (chat-unrelated communication).
      -
      -        Args:
      -            recipients (dict): Object containing filters related to multicast recipients.
      -            content (typing.Any): A JSON message to be sent.
      -            type (str): Multicast message type.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/multicast',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def remove_user_from_chat(self, chat_id: str = None, user_id: str = None, user_type: str = None, ignore_requester_presence: bool = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Removes a user from chat.

      -

      Args

      -
      -
      chat_id : str
      -
      chat ID.
      -
      user_id : str
      -
      user ID.
      -
      user_type : str
      -
      Possible values: agent or customer.
      -
      ignore_requester_presence : bool
      -
      If True, allows requester to remove user from chat -without being present in the chat's users list.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def remove_user_from_chat(self,
      -                          chat_id: str = None,
      -                          user_id: str = None,
      -                          user_type: str = None,
      -                          ignore_requester_presence: bool = None,
      -                          payload: dict = None,
      -                          headers: dict = None) -> httpx.Response:
      -    ''' Removes a user from chat.
      -
      -        Args:
      -            chat_id (str): chat ID.
      -            user_id (str): user ID.
      -            user_type (str): Possible values: agent or customer.
      -            ignore_requester_presence (bool): If `True`, allows requester to remove user from chat
      -                                              without being present in the chat's users list.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/remove_user_from_chat',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def resume_chat(self, chat: dict = None, active: bool = None, continuous: bool = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Restarts an archived chat.

      -

      Args

      -
      -
      chat : dict
      -
      Dict containing chat properties, access and thread.
      -
      active : bool
      -
      When set to False, creates an inactive thread; default: True.
      -
      continuous : bool
      -
      Starts chat as continuous (online group is not required); default: False.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def resume_chat(self,
      -                chat: dict = None,
      -                active: bool = None,
      -                continuous: bool = None,
      -                payload: dict = None,
      -                headers: dict = None) -> httpx.Response:
      -    ''' Restarts an archived chat.
      -
      -        Args:
      -            chat (dict): Dict containing chat properties, access and thread.
      -            active (bool): When set to False, creates an inactive thread; default: True.
      -            continuous (bool): Starts chat as continuous (online group is not required); default: False.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/resume_chat',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def send_event(self, chat_id: str = None, event: dict = None, attach_to_last_thread: bool = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Sends an Event object. Use this method to send a message by specifying the Message event type in the request. -The method updates the requester's events_seen_up_to as if they've seen all chat events.

      -

      Args

      -
      -
      chat_id : int
      -
      ID of the chat that you to send a message to.
      -
      event : dict
      -
      Event object.
      -
      attach_to_last_thread : bool
      -
      The flag is ignored for active chats. -For inactive chats: -True – the event will be added to the last thread; -False – the request will fail. Default: False.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def send_event(self,
      -               chat_id: str = None,
      -               event: dict = None,
      -               attach_to_last_thread: bool = None,
      -               payload: dict = None,
      -               headers: dict = None) -> httpx.Response:
      -    ''' Sends an Event object. Use this method to send a message by specifying the Message event type in the request.
      -        The method updates the requester's `events_seen_up_to` as if they've seen all chat events.
      -
      -        Args:
      -            chat_id (int): ID of the chat that you to send a message to.
      -            event (dict): Event object.
      -            attach_to_last_thread (bool): The flag is ignored for active chats.
      -                                          For inactive chats:
      -                                          True – the event will be added to the last thread;
      -                                          False – the request will fail. Default: False.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/send_event',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def send_rich_message_postback(self, chat_id: str = None, thread_id: str = None, event_id: str = None, postback: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Sends a rich message postback.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat to send rich message postback to.
      -
      thread_id : str
      -
      ID of the thread to send rich message postback to.
      -
      event_id : str
      -
      ID of the event related to the rich message postback.
      -
      postback : dict
      -
      Object containing postback data (id, toggled).
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def send_rich_message_postback(self,
      -                               chat_id: str = None,
      -                               thread_id: str = None,
      -                               event_id: str = None,
      -                               postback: dict = None,
      -                               payload: dict = None,
      -                               headers: dict = None) -> httpx.Response:
      -    ''' Sends a rich message postback.
      -
      -        Args:
      -            chat_id (str): ID of the chat to send rich message postback to.
      -            thread_id (str): ID of the thread to send rich message postback to.
      -            event_id (str): ID of the event related to the rich message postback.
      -            postback (dict): Object containing postback data (id, toggled).
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/send_rich_message_postback',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def send_typing_indicator(self, chat_id: str = None, visibility: str = None, is_typing: bool = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Sends typing indicator.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat that to send the typing indicator to.
      -
      visibility : str
      -
      Possible values: all, agents.
      -
      is_typing : bool
      -
      A flag that indicates if you are typing.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def send_typing_indicator(self,
      -                          chat_id: str = None,
      -                          visibility: str = None,
      -                          is_typing: bool = None,
      -                          payload: dict = None,
      -                          headers: dict = None) -> httpx.Response:
      -    ''' Sends typing indicator.
      -
      -        Args:
      -            chat_id (str): ID of the chat that to send the typing indicator to.
      -            visibility (str): Possible values: `all`, `agents`.
      -            is_typing (bool): A flag that indicates if you are typing.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/send_typing_indicator',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def set_routing_status(self, status: str = None, agent_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Changes the status of an Agent or a Bot Agent.

      -

      Args

      -
      -
      status : str
      -
      For Agents: accepting_chats or not_accepting_chats; -for Bot Agents: accepting_chats, not_accepting_chats, or offline
      -
      agent_id : str
      -
      If not specified, the requester's status will be updated.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def set_routing_status(self,
      -                       status: str = None,
      -                       agent_id: str = None,
      -                       payload: dict = None,
      -                       headers: dict = None) -> httpx.Response:
      -    ''' Changes the status of an Agent or a Bot Agent.
      -
      -        Args:
      -            status (str): For Agents: accepting_chats or not_accepting_chats;
      -                          for Bot Agents: accepting_chats, not_accepting_chats, or offline
      -            agent_id (str): If not specified, the requester's status will be updated.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/set_routing_status',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def start_chat(self, chat: dict = None, active: bool = None, continuous: bool = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Starts a chat.

      -

      Args

      -
      -
      chat : dict
      -
      Dict containing chat properties, access and thread.
      -
      active : bool
      -
      When set to False, creates an inactive thread; default: True.
      -
      continuous : bool
      -
      Starts chat as continuous (online group is not required); default: False.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def start_chat(self,
      -               chat: dict = None,
      -               active: bool = None,
      -               continuous: bool = None,
      -               payload: dict = None,
      -               headers: dict = None) -> httpx.Response:
      -    ''' Starts a chat.
      -
      -        Args:
      -            chat (dict): Dict containing chat properties, access and thread.
      -            active (bool): When set to False, creates an inactive thread; default: True.
      -            continuous (bool): Starts chat as continuous (online group is not required); default: False.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/start_chat',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def tag_thread(self, chat_id: str = None, thread_id: str = None, tag: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Tags thread.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you want to add a tag to.
      -
      thread_id : str
      -
      ID of the thread you want to add a tag to.
      -
      tag : str
      -
      Tag name.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def tag_thread(self,
      -               chat_id: str = None,
      -               thread_id: str = None,
      -               tag: str = None,
      -               payload: dict = None,
      -               headers: dict = None) -> httpx.Response:
      -    ''' Tags thread.
      -
      -        Args:
      -            chat_id (str): ID of the chat you want to add a tag to.
      -            thread_id (str): ID of the thread you want to add a tag to.
      -            tag (str): Tag name.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/tag_thread',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def transfer_chat(self, id: str = None, target: dict = None, ignore_agents_availability: bool = None, ignore_requester_presence: bool = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Transfers a chat to an agent or a group.

      -

      Args

      -
      -
      id : str
      -
      chat ID
      -
      target : dict
      -
      If missing, chat will be transferred within the current group.
      -
      ignore_agents_availability : bool
      -
      If True, always transfers chats. Otherwise, fails -when unable to assign any agent from the requested groups.
      -
      ignore_requester_presence : bool
      -
      If True, allows requester to transfer chat -without being present in the chat's users list.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def transfer_chat(self,
      -                  id: str = None,
      -                  target: dict = None,
      -                  ignore_agents_availability: bool = None,
      -                  ignore_requester_presence: bool = None,
      -                  payload: dict = None,
      -                  headers: dict = None) -> httpx.Response:
      -    ''' Transfers a chat to an agent or a group.
      -
      -        Args:
      -            id (str): chat ID
      -            target (dict): If missing, chat will be transferred within the current group.
      -            ignore_agents_availability (bool): If `True`, always transfers chats. Otherwise, fails
      -                          when unable to assign any agent from the requested groups.
      -            ignore_requester_presence (bool): If `True`, allows requester to transfer chat
      -                                              without being present in the chat's users list.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/transfer_chat',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def unfollow_chat(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Removes the requester from the chat followers. After that, only key changes -to the chat (like transfer_chat or close_active_thread) will be sent -to the requester. Chat members cannot unfollow the chat.

      -

      Args

      -
      -
      id : str
      -
      ID of chat to be unfollowed.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def unfollow_chat(self,
      -                  id: str = None,
      -                  payload: dict = None,
      -                  headers: dict = None) -> httpx.Response:
      -    ''' Removes the requester from the chat followers. After that, only key changes
      -        to the chat (like transfer_chat or close_active_thread) will be sent
      -        to the requester. Chat members cannot unfollow the chat.
      -
      -        Args:
      -            id (str): ID of chat to be unfollowed.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/unfollow_chat',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def unfollow_customer(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Removes the agent from the list of customer's followers. Calling this -method on a customer the agent's chatting with will result in success, -however, the agent will still receive pushes about the customer's data -updates. The unfollowing will take effect once the chat ends.

      -

      Args

      -
      -
      id : str
      -
      ID of the Customer.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def unfollow_customer(self,
      -                      id: str = None,
      -                      payload: dict = None,
      -                      headers: dict = None) -> httpx.Response:
      -    ''' Removes the agent from the list of customer's followers. Calling this
      -        method on a customer the agent's chatting with will result in success,
      -        however, the agent will still receive pushes about the customer's data
      -        updates. The unfollowing will take effect once the chat ends.
      -
      -        Args:
      -            id (str): ID of the Customer.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/unfollow_customer',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def untag_thread(self, chat_id: str = None, thread_id: str = None, tag: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Untags thread.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you want to remove a tag from.
      -
      thread_id : str
      -
      ID of the thread you want to remove a tag from.
      -
      tag : str
      -
      Tag name.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def untag_thread(self,
      -                 chat_id: str = None,
      -                 thread_id: str = None,
      -                 tag: str = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -    ''' Untags thread.
      -
      -        Args:
      -            chat_id (str): ID of the chat you want to remove a tag from.
      -            thread_id (str): ID of the thread you want to remove a tag from.
      -            tag (str): Tag name.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/untag_thread',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def update_chat_properties(self, id: str = None, properties: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Updates chat properties.

      -

      Args

      -
      -
      id : str
      -
      ID of the chat you to set a property for.
      -
      properties : dict
      -
      Chat properties to set.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def update_chat_properties(self,
      -                           id: str = None,
      -                           properties: dict = None,
      -                           payload: dict = None,
      -                           headers: dict = None) -> httpx.Response:
      -    ''' Updates chat properties.
      -
      -        Args:
      -            id (str): ID of the chat you to set a property for.
      -            properties (dict): Chat properties to set.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/update_chat_properties',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def update_customer(self, id: str = None, name: str = None, email: str = None, avatar: str = None, session_fields: list = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Updates Customer's properties.

      -

      Args

      -
      -
      id : str
      -
      ID of the Customer.
      -
      name : str
      -
      Customer's name.
      -
      email : str
      -
      Customer's email.
      -
      avatar : str
      -
      URL of the Customer's avatar.
      -
      session_fields : list
      -
      An array of custom object-enclosed key:value pairs. -Respects the order of items.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def update_customer(self,
      -                    id: str = None,
      -                    name: str = None,
      -                    email: str = None,
      -                    avatar: str = None,
      -                    session_fields: list = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -    ''' Updates Customer's properties.
      -
      -        Args:
      -            id (str): ID of the Customer.
      -            name (str): Customer's name.
      -            email (str): Customer's email.
      -            avatar (str): URL of the Customer's avatar.
      -            session_fields (list): An array of custom object-enclosed key:value pairs.
      -                                   Respects the order of items.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/update_customer',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def update_event_properties(self, chat_id: str = None, thread_id: str = None, event_id: str = None, properties: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Updates event properties.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you to set properties for.
      -
      thread_id : str
      -
      ID of the thread you want to set properties for.
      -
      event_id : str
      -
      ID of the event you want to set properties for.
      -
      properties : dict
      -
      Thread properties to set. -You should stick to the general properties format and include namespace, property name and value.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def update_event_properties(self,
      -                            chat_id: str = None,
      -                            thread_id: str = None,
      -                            event_id: str = None,
      -                            properties: dict = None,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -    ''' Updates event properties.
      -
      -        Args:
      -            chat_id (str): ID of the chat you to set properties for.
      -            thread_id (str): ID of the thread you want to set properties for.
      -            event_id (str): ID of the event you want to set properties for.
      -            properties (dict): Thread properties to set.
      -                               You should stick to the general properties format and include namespace, property name and value.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/update_event_properties',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def update_thread_properties(self, chat_id: str = None, thread_id: str = None, properties: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Updates chat thread properties.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you to set properties for.
      -
      thread_id : str
      -
      ID of the thread you want to set properties for.
      -
      properties : dict
      -
      Thread properties to set. -You should stick to the general properties format and include namespace, property name and value.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def update_thread_properties(self,
      -                             chat_id: str = None,
      -                             thread_id: str = None,
      -                             properties: dict = None,
      -                             payload: dict = None,
      -                             headers: dict = None) -> httpx.Response:
      -    ''' Updates chat thread properties.
      -
      -        Args:
      -            chat_id (str): ID of the chat you to set properties for.
      -            thread_id (str): ID of the thread you want to set properties for.
      -            properties (dict): Thread properties to set.
      -                               You should stick to the general properties format and include namespace, property name and value.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/update_thread_properties',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def upload_file(self, file: typing.BinaryIO = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Uploads a file to the server as a temporary file. It returns a URL that expires -after 24 hours unless the URL is used in send_event.

      -

      Args

      -
      -
      file : typing.BinaryIO
      -
      File-like object with file to upload (Maximum size: 10MB).
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def upload_file(self,
      -                file: typing.BinaryIO = None,
      -                headers: dict = None) -> httpx.Response:
      -    ''' Uploads a file to the server as a temporary file. It returns a URL that expires
      -        after 24 hours unless the URL is used in `send_event`.
      -
      -        Args:
      -            file (typing.BinaryIO): File-like object with file to upload (Maximum size: 10MB).
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    return self.session.post(f'{self.api_url}/upload_file',
      -                             files=file,
      -                             headers=headers)
      -
      -
      -
      -
      -
      -
      -
      - -
      - - - \ No newline at end of file diff --git a/docs/agent/web/api/v35.html b/docs/agent/web/api/v35.html index c558572..d6b0b5d 100644 --- a/docs/agent/web/api/v35.html +++ b/docs/agent/web/api/v35.html @@ -889,60 +889,6 @@

      Module livechat.agent.web.api.v35

      json=payload, headers=headers) - def follow_customer(self, - id: str = None, - payload: dict = None, - headers: dict = None) -> httpx.Response: - ''' Marks a customer as followed. As a result, the requester (an agent) - will receive the info about all the changes related to that customer - via pushes. Once the customer leaves the website or is unfollowed, - the agent will no longer receive that information. - - Args: - id (str): ID of the Customer. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - headers (dict): Custom headers to be used with session headers. - They will be merged with session-level values that are set, - however, these method-level parameters will not be persisted across requests. - - Returns: - httpx.Response: The Response object from `httpx` library, - which contains a server’s response to an HTTP request. - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.session.post(f'{self.api_url}/follow_customer', - json=payload, - headers=headers) - - def unfollow_customer(self, - id: str = None, - payload: dict = None, - headers: dict = None) -> httpx.Response: - ''' Removes the agent from the list of customer's followers. Calling this - method on a customer the agent's chatting with will result in success, - however, the agent will still receive pushes about the customer's data - updates. The unfollowing will take effect once the chat ends. - - Args: - id (str): ID of the Customer. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - headers (dict): Custom headers to be used with session headers. - They will be merged with session-level values that are set, - however, these method-level parameters will not be persisted across requests. - - Returns: - httpx.Response: The Response object from `httpx` library, - which contains a server’s response to an HTTP request. - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.session.post(f'{self.api_url}/unfollow_customer', - json=payload, - headers=headers) - # Status def set_routing_status(self, @@ -1988,60 +1934,6 @@

      Classes

      json=payload, headers=headers) - def follow_customer(self, - id: str = None, - payload: dict = None, - headers: dict = None) -> httpx.Response: - ''' Marks a customer as followed. As a result, the requester (an agent) - will receive the info about all the changes related to that customer - via pushes. Once the customer leaves the website or is unfollowed, - the agent will no longer receive that information. - - Args: - id (str): ID of the Customer. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - headers (dict): Custom headers to be used with session headers. - They will be merged with session-level values that are set, - however, these method-level parameters will not be persisted across requests. - - Returns: - httpx.Response: The Response object from `httpx` library, - which contains a server’s response to an HTTP request. - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.session.post(f'{self.api_url}/follow_customer', - json=payload, - headers=headers) - - def unfollow_customer(self, - id: str = None, - payload: dict = None, - headers: dict = None) -> httpx.Response: - ''' Removes the agent from the list of customer's followers. Calling this - method on a customer the agent's chatting with will result in success, - however, the agent will still receive pushes about the customer's data - updates. The unfollowing will take effect once the chat ends. - - Args: - id (str): ID of the Customer. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - headers (dict): Custom headers to be used with session headers. - They will be merged with session-level values that are set, - however, these method-level parameters will not be persisted across requests. - - Returns: - httpx.Response: The Response object from `httpx` library, - which contains a server’s response to an HTTP request. - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.session.post(f'{self.api_url}/unfollow_customer', - json=payload, - headers=headers) - # Status def set_routing_status(self, @@ -2722,64 +2614,6 @@

      Returns

      headers=headers)
  • -
    -def follow_customer(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
    -
    -

    Marks a customer as followed. As a result, the requester (an agent) -will receive the info about all the changes related to that customer -via pushes. Once the customer leaves the website or is unfollowed, -the agent will no longer receive that information.

    -

    Args

    -
    -
    id : str
    -
    ID of the Customer.
    -
    payload : dict
    -
    Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
    -
    headers : dict
    -
    Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
    -
    -

    Returns

    -
    -
    httpx.Response
    -
    The Response object from httpx library, -which contains a server’s response to an HTTP request.
    -
    -
    - -Expand source code - -
    def follow_customer(self,
    -                    id: str = None,
    -                    payload: dict = None,
    -                    headers: dict = None) -> httpx.Response:
    -    ''' Marks a customer as followed. As a result, the requester (an agent)
    -        will receive the info about all the changes related to that customer
    -        via pushes. Once the customer leaves the website or is unfollowed,
    -        the agent will no longer receive that information.
    -
    -        Args:
    -            id (str): ID of the Customer.
    -            payload (dict): Custom payload to be used as request's data.
    -                            It overrides all other parameters provided for the method.
    -            headers (dict): Custom headers to be used with session headers.
    -                            They will be merged with session-level values that are set,
    -                            however, these method-level parameters will not be persisted across requests.
    -
    -        Returns:
    -            httpx.Response: The Response object from `httpx` library,
    -                            which contains a server’s response to an HTTP request.
    -    '''
    -    if payload is None:
    -        payload = prepare_payload(locals())
    -    return self.session.post(f'{self.api_url}/follow_customer',
    -                             json=payload,
    -                             headers=headers)
    -
    -
    def get_chat(self, chat_id: str = None, thread_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
    @@ -4070,64 +3904,6 @@

    Returns

    headers=headers)
    -
    -def unfollow_customer(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
    -
    -

    Removes the agent from the list of customer's followers. Calling this -method on a customer the agent's chatting with will result in success, -however, the agent will still receive pushes about the customer's data -updates. The unfollowing will take effect once the chat ends.

    -

    Args

    -
    -
    id : str
    -
    ID of the Customer.
    -
    payload : dict
    -
    Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
    -
    headers : dict
    -
    Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
    -
    -

    Returns

    -
    -
    httpx.Response
    -
    The Response object from httpx library, -which contains a server’s response to an HTTP request.
    -
    -
    - -Expand source code - -
    def unfollow_customer(self,
    -                      id: str = None,
    -                      payload: dict = None,
    -                      headers: dict = None) -> httpx.Response:
    -    ''' Removes the agent from the list of customer's followers. Calling this
    -        method on a customer the agent's chatting with will result in success,
    -        however, the agent will still receive pushes about the customer's data
    -        updates. The unfollowing will take effect once the chat ends.
    -
    -        Args:
    -            id (str): ID of the Customer.
    -            payload (dict): Custom payload to be used as request's data.
    -                            It overrides all other parameters provided for the method.
    -            headers (dict): Custom headers to be used with session headers.
    -                            They will be merged with session-level values that are set,
    -                            however, these method-level parameters will not be persisted across requests.
    -
    -        Returns:
    -            httpx.Response: The Response object from `httpx` library,
    -                            which contains a server’s response to an HTTP request.
    -    '''
    -    if payload is None:
    -        payload = prepare_payload(locals())
    -    return self.session.post(f'{self.api_url}/unfollow_customer',
    -                             json=payload,
    -                             headers=headers)
    -
    -
    def untag_thread(self, chat_id: str = None, thread_id: str = None, tag: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
    @@ -4513,7 +4289,6 @@

    delete_event_properties
  • delete_thread_properties
  • follow_chat
  • -
  • follow_customer
  • get_chat
  • get_customer
  • get_license_info
  • @@ -4535,7 +4310,6 @@

    tag_thread
  • transfer_chat
  • unfollow_chat
  • -
  • unfollow_customer
  • untag_thread
  • update_chat_properties
  • update_customer
  • diff --git a/docs/agent/web/api/v36.html b/docs/agent/web/api/v36.html index e3432e1..0f178f1 100644 --- a/docs/agent/web/api/v36.html +++ b/docs/agent/web/api/v36.html @@ -66,14 +66,14 @@

    Module livechat.agent.web.api.v36

    page_id: str = None, payload: dict = None, headers: dict = None) -> httpx.Response: - ''' Returns summaries of the chats an Agent has access to. + ''' Returns chat info for the chats an Agent has access to. Args: filters (dict): Possible request filters. Mustn't change between requests for subsequent pages. Otherwise, the behavior is undefined. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation + Chat info entries are sorted by the creation date of its last thread. limit (int): Limit of results per page. Default: 10, maximum: 100. page_id (str): ID of the page with paginated results. @@ -171,7 +171,7 @@

    Module livechat.agent.web.api.v36

    filters (dict): Possible request filters. page_id (str): ID of the page with paginated results. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation date + Chat info entries are sorted by the creation date of its last thread. limit (str): Limit of results per page. Default: 10, maximum: 100. highlights (dict): Use it to highlight the match of filters.query. @@ -537,6 +537,31 @@

    Module livechat.agent.web.api.v36

    json=payload, headers=headers) + def get_thread_transcript(self, + chat_id: str = None, + thread_id: str = None, + payload: dict = None, + headers: dict = None) -> httpx.Response: + ''' Returns a plain-text transcript of a given thread. + + Args: + chat_id (str): ID of the chat the thread belongs to. + thread_id (str): ID of the thread to return the transcript for. + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + headers (dict): Custom headers to be used with session headers. + They will be merged with session-level values that are set, + however, these method-level parameters will not be persisted across requests. + + Returns: + httpx.Response: The Response object from `httpx` library, + which contains a server's response to an HTTP request. ''' + if payload is None: + payload = prepare_payload(locals()) + return self.session.post(f'{self.api_url}/get_thread_transcript', + json=payload, + headers=headers) + # Properties def update_chat_properties(self, @@ -848,60 +873,6 @@

    Module livechat.agent.web.api.v36

    json=payload, headers=headers) - def follow_customer(self, - id: str = None, - payload: dict = None, - headers: dict = None) -> httpx.Response: - ''' Marks a customer as followed. As a result, the requester (an agent) - will receive the info about all the changes related to that customer - via pushes. Once the customer leaves the website or is unfollowed, - the agent will no longer receive that information. - - Args: - id (str): ID of the Customer. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - headers (dict): Custom headers to be used with session headers. - They will be merged with session-level values that are set, - however, these method-level parameters will not be persisted across requests. - - Returns: - httpx.Response: The Response object from `httpx` library, - which contains a server’s response to an HTTP request. - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.session.post(f'{self.api_url}/follow_customer', - json=payload, - headers=headers) - - def unfollow_customer(self, - id: str = None, - payload: dict = None, - headers: dict = None) -> httpx.Response: - ''' Removes the agent from the list of customer's followers. Calling this - method on a customer the agent's chatting with will result in success, - however, the agent will still receive pushes about the customer's data - updates. The unfollowing will take effect once the chat ends. - - Args: - id (str): ID of the Customer. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - headers (dict): Custom headers to be used with session headers. - They will be merged with session-level values that are set, - however, these method-level parameters will not be persisted across requests. - - Returns: - httpx.Response: The Response object from `httpx` library, - which contains a server’s response to an HTTP request. - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.session.post(f'{self.api_url}/unfollow_customer', - json=payload, - headers=headers) - # Status def set_routing_status(self, @@ -1182,14 +1153,14 @@

    Classes

    page_id: str = None, payload: dict = None, headers: dict = None) -> httpx.Response: - ''' Returns summaries of the chats an Agent has access to. + ''' Returns chat info for the chats an Agent has access to. Args: filters (dict): Possible request filters. Mustn't change between requests for subsequent pages. Otherwise, the behavior is undefined. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation + Chat info entries are sorted by the creation date of its last thread. limit (int): Limit of results per page. Default: 10, maximum: 100. page_id (str): ID of the page with paginated results. @@ -1287,7 +1258,7 @@

    Classes

    filters (dict): Possible request filters. page_id (str): ID of the page with paginated results. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation date + Chat info entries are sorted by the creation date of its last thread. limit (str): Limit of results per page. Default: 10, maximum: 100. highlights (dict): Use it to highlight the match of filters.query. @@ -1653,6 +1624,31 @@

    Classes

    json=payload, headers=headers) + def get_thread_transcript(self, + chat_id: str = None, + thread_id: str = None, + payload: dict = None, + headers: dict = None) -> httpx.Response: + ''' Returns a plain-text transcript of a given thread. + + Args: + chat_id (str): ID of the chat the thread belongs to. + thread_id (str): ID of the thread to return the transcript for. + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + headers (dict): Custom headers to be used with session headers. + They will be merged with session-level values that are set, + however, these method-level parameters will not be persisted across requests. + + Returns: + httpx.Response: The Response object from `httpx` library, + which contains a server's response to an HTTP request. ''' + if payload is None: + payload = prepare_payload(locals()) + return self.session.post(f'{self.api_url}/get_thread_transcript', + json=payload, + headers=headers) + # Properties def update_chat_properties(self, @@ -1964,60 +1960,6 @@

    Classes

    json=payload, headers=headers) - def follow_customer(self, - id: str = None, - payload: dict = None, - headers: dict = None) -> httpx.Response: - ''' Marks a customer as followed. As a result, the requester (an agent) - will receive the info about all the changes related to that customer - via pushes. Once the customer leaves the website or is unfollowed, - the agent will no longer receive that information. - - Args: - id (str): ID of the Customer. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - headers (dict): Custom headers to be used with session headers. - They will be merged with session-level values that are set, - however, these method-level parameters will not be persisted across requests. - - Returns: - httpx.Response: The Response object from `httpx` library, - which contains a server’s response to an HTTP request. - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.session.post(f'{self.api_url}/follow_customer', - json=payload, - headers=headers) - - def unfollow_customer(self, - id: str = None, - payload: dict = None, - headers: dict = None) -> httpx.Response: - ''' Removes the agent from the list of customer's followers. Calling this - method on a customer the agent's chatting with will result in success, - however, the agent will still receive pushes about the customer's data - updates. The unfollowing will take effect once the chat ends. - - Args: - id (str): ID of the Customer. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - headers (dict): Custom headers to be used with session headers. - They will be merged with session-level values that are set, - however, these method-level parameters will not be persisted across requests. - - Returns: - httpx.Response: The Response object from `httpx` library, - which contains a server’s response to an HTTP request. - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.session.post(f'{self.api_url}/unfollow_customer', - json=payload, - headers=headers) - # Status def set_routing_status(self, @@ -2690,18 +2632,17 @@

    Returns

    headers=headers) -
    -def follow_customer(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response +
    +def get_chat(self, chat_id: str = None, thread_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
    -

    Marks a customer as followed. As a result, the requester (an agent) -will receive the info about all the changes related to that customer -via pushes. Once the customer leaves the website or is unfollowed, -the agent will no longer receive that information.

    +

    Returns a thread that the current Agent has access to in a given chat

    Args

    -
    id : str
    -
    ID of the Customer.
    +
    chat_id : str
    +
    ID of the chat for which thread is to be returned.
    +
    thread_id : str
    +
    ID of the thread to show. Default: the latest thread (if exists)
    payload : dict
    Custom payload to be used as request's data. It overrides all other parameters provided for the method.
    @@ -2720,17 +2661,16 @@

    Returns

    Expand source code -
    def follow_customer(self,
    -                    id: str = None,
    -                    payload: dict = None,
    -                    headers: dict = None) -> httpx.Response:
    -    ''' Marks a customer as followed. As a result, the requester (an agent)
    -        will receive the info about all the changes related to that customer
    -        via pushes. Once the customer leaves the website or is unfollowed,
    -        the agent will no longer receive that information.
    +
    def get_chat(self,
    +             chat_id: str = None,
    +             thread_id: str = None,
    +             payload: dict = None,
    +             headers: dict = None) -> httpx.Response:
    +    ''' Returns a thread that the current Agent has access to in a given chat
     
             Args:
    -            id (str): ID of the Customer.
    +            chat_id (str): ID of the chat for which thread is to be returned.
    +            thread_id (str): ID of the thread to show. Default: the latest thread (if exists)
                 payload (dict): Custom payload to be used as request's data.
                                 It overrides all other parameters provided for the method.
                 headers (dict): Custom headers to be used with session headers.
    @@ -2743,22 +2683,20 @@ 

    Returns

    ''' if payload is None: payload = prepare_payload(locals()) - return self.session.post(f'{self.api_url}/follow_customer', + return self.session.post(f'{self.api_url}/get_chat', json=payload, headers=headers)
    -
    -def get_chat(self, chat_id: str = None, thread_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response +
    +def get_customer(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
    -

    Returns a thread that the current Agent has access to in a given chat

    +

    Returns the info about the Customer with a given id.

    Args

    -
    chat_id : str
    -
    ID of the chat for which thread is to be returned.
    -
    thread_id : str
    -
    ID of the thread to show. Default: the latest thread (if exists)
    +
    id : str
    +
    customer id
    payload : dict
    Custom payload to be used as request's data. It overrides all other parameters provided for the method.
    @@ -2777,16 +2715,14 @@

    Returns

    Expand source code -
    def get_chat(self,
    -             chat_id: str = None,
    -             thread_id: str = None,
    -             payload: dict = None,
    -             headers: dict = None) -> httpx.Response:
    -    ''' Returns a thread that the current Agent has access to in a given chat
    +
    def get_customer(self,
    +                 id: str = None,
    +                 payload: dict = None,
    +                 headers: dict = None) -> httpx.Response:
    +    ''' Returns the info about the Customer with a given id.
     
             Args:
    -            chat_id (str): ID of the chat for which thread is to be returned.
    -            thread_id (str): ID of the thread to show. Default: the latest thread (if exists)
    +            id (str): customer id
                 payload (dict): Custom payload to be used as request's data.
                                 It overrides all other parameters provided for the method.
                 headers (dict): Custom headers to be used with session headers.
    @@ -2795,24 +2731,25 @@ 

    Returns

    Returns: httpx.Response: The Response object from `httpx` library, - which contains a server’s response to an HTTP request. - ''' + which contains a server’s response to an HTTP request. ''' if payload is None: payload = prepare_payload(locals()) - return self.session.post(f'{self.api_url}/get_chat', + return self.session.post(f'{self.api_url}/get_customer', json=payload, headers=headers)
    -
    -def get_customer(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response +
    +def get_thread_transcript(self, chat_id: str = None, thread_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
    -

    Returns the info about the Customer with a given id.

    +

    Returns a plain-text transcript of a given thread.

    Args

    -
    id : str
    -
    customer id
    +
    chat_id : str
    +
    ID of the chat the thread belongs to.
    +
    thread_id : str
    +
    ID of the thread to return the transcript for.
    payload : dict
    Custom payload to be used as request's data. It overrides all other parameters provided for the method.
    @@ -2825,20 +2762,22 @@

    Returns

    httpx.Response
    The Response object from httpx library, -which contains a server’s response to an HTTP request.
    +which contains a server's response to an HTTP request.
    Expand source code -
    def get_customer(self,
    -                 id: str = None,
    -                 payload: dict = None,
    -                 headers: dict = None) -> httpx.Response:
    -    ''' Returns the info about the Customer with a given id.
    +
    def get_thread_transcript(self,
    +                          chat_id: str = None,
    +                          thread_id: str = None,
    +                          payload: dict = None,
    +                          headers: dict = None) -> httpx.Response:
    +    ''' Returns a plain-text transcript of a given thread.
     
             Args:
    -            id (str): customer id
    +            chat_id (str): ID of the chat the thread belongs to.
    +            thread_id (str): ID of the thread to return the transcript for.
                 payload (dict): Custom payload to be used as request's data.
                                 It overrides all other parameters provided for the method.
                 headers (dict): Custom headers to be used with session headers.
    @@ -2847,10 +2786,10 @@ 

    Returns

    Returns: httpx.Response: The Response object from `httpx` library, - which contains a server’s response to an HTTP request. ''' + which contains a server's response to an HTTP request. ''' if payload is None: payload = prepare_payload(locals()) - return self.session.post(f'{self.api_url}/get_customer', + return self.session.post(f'{self.api_url}/get_thread_transcript', json=payload, headers=headers)
    @@ -2920,7 +2859,7 @@

    Args

    ID of the page with paginated results.
    sort_order : str
    Possible values: asc, desc (default). -Chat summaries are sorted by the creation date +Chat info entries are sorted by the creation date of its last thread.
    limit : str
    Limit of results per page. Default: 10, maximum: 100.
    @@ -2961,7 +2900,7 @@

    Returns

    filters (dict): Possible request filters. page_id (str): ID of the page with paginated results. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation date + Chat info entries are sorted by the creation date of its last thread. limit (str): Limit of results per page. Default: 10, maximum: 100. highlights (dict): Use it to highlight the match of filters.query. @@ -2988,7 +2927,7 @@

    Returns

    def list_chats(self, filters: dict = None, sort_order: str = None, limit: int = None, page_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
    -

    Returns summaries of the chats an Agent has access to.

    +

    Returns chat info for the chats an Agent has access to.

    Args

    filters : dict
    @@ -2997,7 +2936,7 @@

    Args

    the behavior is undefined.
    sort_order : str
    Possible values: asc, desc (default). -Chat summaries are sorted by the creation +Chat info entries are sorted by the creation date of its last thread.
    limit : int
    Limit of results per page. Default: 10, maximum: 100.
    @@ -3029,14 +2968,14 @@

    Returns

    page_id: str = None, payload: dict = None, headers: dict = None) -> httpx.Response: - ''' Returns summaries of the chats an Agent has access to. + ''' Returns chat info for the chats an Agent has access to. Args: filters (dict): Possible request filters. Mustn't change between requests for subsequent pages. Otherwise, the behavior is undefined. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation + Chat info entries are sorted by the creation date of its last thread. limit (int): Limit of results per page. Default: 10, maximum: 100. page_id (str): ID of the page with paginated results. @@ -4145,64 +4084,6 @@

    Returns

    headers=headers)
    -
    -def unfollow_customer(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
    -
    -

    Removes the agent from the list of customer's followers. Calling this -method on a customer the agent's chatting with will result in success, -however, the agent will still receive pushes about the customer's data -updates. The unfollowing will take effect once the chat ends.

    -

    Args

    -
    -
    id : str
    -
    ID of the Customer.
    -
    payload : dict
    -
    Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
    -
    headers : dict
    -
    Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
    -
    -

    Returns

    -
    -
    httpx.Response
    -
    The Response object from httpx library, -which contains a server’s response to an HTTP request.
    -
    -
    - -Expand source code - -
    def unfollow_customer(self,
    -                      id: str = None,
    -                      payload: dict = None,
    -                      headers: dict = None) -> httpx.Response:
    -    ''' Removes the agent from the list of customer's followers. Calling this
    -        method on a customer the agent's chatting with will result in success,
    -        however, the agent will still receive pushes about the customer's data
    -        updates. The unfollowing will take effect once the chat ends.
    -
    -        Args:
    -            id (str): ID of the Customer.
    -            payload (dict): Custom payload to be used as request's data.
    -                            It overrides all other parameters provided for the method.
    -            headers (dict): Custom headers to be used with session headers.
    -                            They will be merged with session-level values that are set,
    -                            however, these method-level parameters will not be persisted across requests.
    -
    -        Returns:
    -            httpx.Response: The Response object from `httpx` library,
    -                            which contains a server’s response to an HTTP request.
    -    '''
    -    if payload is None:
    -        payload = prepare_payload(locals())
    -    return self.session.post(f'{self.api_url}/unfollow_customer',
    -                             json=payload,
    -                             headers=headers)
    -
    -
    def untag_thread(self, chat_id: str = None, thread_id: str = None, tag: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
    @@ -4587,9 +4468,9 @@

    delete_event_properties
  • delete_thread_properties
  • follow_chat
  • -
  • follow_customer
  • get_chat
  • get_customer
  • +
  • get_thread_transcript
  • list_agents_for_transfer
  • list_archives
  • list_chats
  • @@ -4611,7 +4492,6 @@

    tag_thread
  • transfer_chat
  • unfollow_chat
  • -
  • unfollow_customer
  • untag_thread
  • update_chat_properties
  • update_customer
  • diff --git a/docs/agent/web/api/v37.html b/docs/agent/web/api/v37.html index 11fa920..95f4f4f 100644 --- a/docs/agent/web/api/v37.html +++ b/docs/agent/web/api/v37.html @@ -66,14 +66,14 @@

    Module livechat.agent.web.api.v37

    page_id: str = None, payload: dict = None, headers: dict = None) -> httpx.Response: - ''' Returns summaries of the chats an Agent has access to. + ''' Returns chat info for the chats an Agent has access to. Args: filters (dict): Possible request filters. Mustn't change between requests for subsequent pages. Otherwise, the behavior is undefined. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation + Chat info entries are sorted by the creation date of its last thread. limit (int): Limit of results per page. Default: 10, maximum: 100. page_id (str): ID of the page with paginated results. @@ -171,7 +171,7 @@

    Module livechat.agent.web.api.v37

    filters (dict): Possible request filters. page_id (str): ID of the page with paginated results. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation date + Chat info entries are sorted by the creation date of its last thread. limit (str): Limit of results per page. Default: 10, maximum: 100. highlights (dict): Use it to highlight the match of filters.query. @@ -537,6 +537,31 @@

    Module livechat.agent.web.api.v37

    json=payload, headers=headers) + def get_thread_transcript(self, + chat_id: str = None, + thread_id: str = None, + payload: dict = None, + headers: dict = None) -> httpx.Response: + ''' Returns a plain-text transcript of a given thread. + + Args: + chat_id (str): ID of the chat the thread belongs to. + thread_id (str): ID of the thread to return the transcript for. + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + headers (dict): Custom headers to be used with session headers. + They will be merged with session-level values that are set, + however, these method-level parameters will not be persisted across requests. + + Returns: + httpx.Response: The Response object from `httpx` library, + which contains a server's response to an HTTP request. ''' + if payload is None: + payload = prepare_payload(locals()) + return self.session.post(f'{self.api_url}/get_thread_transcript', + json=payload, + headers=headers) + # Properties def update_chat_properties(self, @@ -848,60 +873,6 @@

    Module livechat.agent.web.api.v37

    json=payload, headers=headers) - def follow_customer(self, - id: str = None, - payload: dict = None, - headers: dict = None) -> httpx.Response: - ''' Marks a customer as followed. As a result, the requester (an agent) - will receive the info about all the changes related to that customer - via pushes. Once the customer leaves the website or is unfollowed, - the agent will no longer receive that information. - - Args: - id (str): ID of the Customer. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - headers (dict): Custom headers to be used with session headers. - They will be merged with session-level values that are set, - however, these method-level parameters will not be persisted across requests. - - Returns: - httpx.Response: The Response object from `httpx` library, - which contains a server’s response to an HTTP request. - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.session.post(f'{self.api_url}/follow_customer', - json=payload, - headers=headers) - - def unfollow_customer(self, - id: str = None, - payload: dict = None, - headers: dict = None) -> httpx.Response: - ''' Removes the agent from the list of customer's followers. Calling this - method on a customer the agent's chatting with will result in success, - however, the agent will still receive pushes about the customer's data - updates. The unfollowing will take effect once the chat ends. - - Args: - id (str): ID of the Customer. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - headers (dict): Custom headers to be used with session headers. - They will be merged with session-level values that are set, - however, these method-level parameters will not be persisted across requests. - - Returns: - httpx.Response: The Response object from `httpx` library, - which contains a server’s response to an HTTP request. - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.session.post(f'{self.api_url}/unfollow_customer', - json=payload, - headers=headers) - # Status def set_routing_status(self, @@ -1182,14 +1153,14 @@

    Classes

    page_id: str = None, payload: dict = None, headers: dict = None) -> httpx.Response: - ''' Returns summaries of the chats an Agent has access to. + ''' Returns chat info for the chats an Agent has access to. Args: filters (dict): Possible request filters. Mustn't change between requests for subsequent pages. Otherwise, the behavior is undefined. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation + Chat info entries are sorted by the creation date of its last thread. limit (int): Limit of results per page. Default: 10, maximum: 100. page_id (str): ID of the page with paginated results. @@ -1287,7 +1258,7 @@

    Classes

    filters (dict): Possible request filters. page_id (str): ID of the page with paginated results. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation date + Chat info entries are sorted by the creation date of its last thread. limit (str): Limit of results per page. Default: 10, maximum: 100. highlights (dict): Use it to highlight the match of filters.query. @@ -1653,6 +1624,31 @@

    Classes

    json=payload, headers=headers) + def get_thread_transcript(self, + chat_id: str = None, + thread_id: str = None, + payload: dict = None, + headers: dict = None) -> httpx.Response: + ''' Returns a plain-text transcript of a given thread. + + Args: + chat_id (str): ID of the chat the thread belongs to. + thread_id (str): ID of the thread to return the transcript for. + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + headers (dict): Custom headers to be used with session headers. + They will be merged with session-level values that are set, + however, these method-level parameters will not be persisted across requests. + + Returns: + httpx.Response: The Response object from `httpx` library, + which contains a server's response to an HTTP request. ''' + if payload is None: + payload = prepare_payload(locals()) + return self.session.post(f'{self.api_url}/get_thread_transcript', + json=payload, + headers=headers) + # Properties def update_chat_properties(self, @@ -1964,60 +1960,6 @@

    Classes

    json=payload, headers=headers) - def follow_customer(self, - id: str = None, - payload: dict = None, - headers: dict = None) -> httpx.Response: - ''' Marks a customer as followed. As a result, the requester (an agent) - will receive the info about all the changes related to that customer - via pushes. Once the customer leaves the website or is unfollowed, - the agent will no longer receive that information. - - Args: - id (str): ID of the Customer. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - headers (dict): Custom headers to be used with session headers. - They will be merged with session-level values that are set, - however, these method-level parameters will not be persisted across requests. - - Returns: - httpx.Response: The Response object from `httpx` library, - which contains a server’s response to an HTTP request. - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.session.post(f'{self.api_url}/follow_customer', - json=payload, - headers=headers) - - def unfollow_customer(self, - id: str = None, - payload: dict = None, - headers: dict = None) -> httpx.Response: - ''' Removes the agent from the list of customer's followers. Calling this - method on a customer the agent's chatting with will result in success, - however, the agent will still receive pushes about the customer's data - updates. The unfollowing will take effect once the chat ends. - - Args: - id (str): ID of the Customer. - payload (dict): Custom payload to be used as request's data. - It overrides all other parameters provided for the method. - headers (dict): Custom headers to be used with session headers. - They will be merged with session-level values that are set, - however, these method-level parameters will not be persisted across requests. - - Returns: - httpx.Response: The Response object from `httpx` library, - which contains a server’s response to an HTTP request. - ''' - if payload is None: - payload = prepare_payload(locals()) - return self.session.post(f'{self.api_url}/unfollow_customer', - json=payload, - headers=headers) - # Status def set_routing_status(self, @@ -2690,18 +2632,17 @@

    Returns

    headers=headers)
    -
    -def follow_customer(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response +
    +def get_chat(self, chat_id: str = None, thread_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
    -

    Marks a customer as followed. As a result, the requester (an agent) -will receive the info about all the changes related to that customer -via pushes. Once the customer leaves the website or is unfollowed, -the agent will no longer receive that information.

    +

    Returns a thread that the current Agent has access to in a given chat

    Args

    -
    id : str
    -
    ID of the Customer.
    +
    chat_id : str
    +
    ID of the chat for which thread is to be returned.
    +
    thread_id : str
    +
    ID of the thread to show. Default: the latest thread (if exists)
    payload : dict
    Custom payload to be used as request's data. It overrides all other parameters provided for the method.
    @@ -2720,17 +2661,16 @@

    Returns

    Expand source code -
    def follow_customer(self,
    -                    id: str = None,
    -                    payload: dict = None,
    -                    headers: dict = None) -> httpx.Response:
    -    ''' Marks a customer as followed. As a result, the requester (an agent)
    -        will receive the info about all the changes related to that customer
    -        via pushes. Once the customer leaves the website or is unfollowed,
    -        the agent will no longer receive that information.
    +
    def get_chat(self,
    +             chat_id: str = None,
    +             thread_id: str = None,
    +             payload: dict = None,
    +             headers: dict = None) -> httpx.Response:
    +    ''' Returns a thread that the current Agent has access to in a given chat
     
             Args:
    -            id (str): ID of the Customer.
    +            chat_id (str): ID of the chat for which thread is to be returned.
    +            thread_id (str): ID of the thread to show. Default: the latest thread (if exists)
                 payload (dict): Custom payload to be used as request's data.
                                 It overrides all other parameters provided for the method.
                 headers (dict): Custom headers to be used with session headers.
    @@ -2743,22 +2683,20 @@ 

    Returns

    ''' if payload is None: payload = prepare_payload(locals()) - return self.session.post(f'{self.api_url}/follow_customer', + return self.session.post(f'{self.api_url}/get_chat', json=payload, headers=headers)
    -
    -def get_chat(self, chat_id: str = None, thread_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response +
    +def get_customer(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
    -

    Returns a thread that the current Agent has access to in a given chat

    +

    Returns the info about the Customer with a given id.

    Args

    -
    chat_id : str
    -
    ID of the chat for which thread is to be returned.
    -
    thread_id : str
    -
    ID of the thread to show. Default: the latest thread (if exists)
    +
    id : str
    +
    customer id
    payload : dict
    Custom payload to be used as request's data. It overrides all other parameters provided for the method.
    @@ -2777,16 +2715,14 @@

    Returns

    Expand source code -
    def get_chat(self,
    -             chat_id: str = None,
    -             thread_id: str = None,
    -             payload: dict = None,
    -             headers: dict = None) -> httpx.Response:
    -    ''' Returns a thread that the current Agent has access to in a given chat
    +
    def get_customer(self,
    +                 id: str = None,
    +                 payload: dict = None,
    +                 headers: dict = None) -> httpx.Response:
    +    ''' Returns the info about the Customer with a given id.
     
             Args:
    -            chat_id (str): ID of the chat for which thread is to be returned.
    -            thread_id (str): ID of the thread to show. Default: the latest thread (if exists)
    +            id (str): customer id
                 payload (dict): Custom payload to be used as request's data.
                                 It overrides all other parameters provided for the method.
                 headers (dict): Custom headers to be used with session headers.
    @@ -2795,24 +2731,25 @@ 

    Returns

    Returns: httpx.Response: The Response object from `httpx` library, - which contains a server’s response to an HTTP request. - ''' + which contains a server’s response to an HTTP request. ''' if payload is None: payload = prepare_payload(locals()) - return self.session.post(f'{self.api_url}/get_chat', + return self.session.post(f'{self.api_url}/get_customer', json=payload, headers=headers)
    -
    -def get_customer(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response +
    +def get_thread_transcript(self, chat_id: str = None, thread_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
    -

    Returns the info about the Customer with a given id.

    +

    Returns a plain-text transcript of a given thread.

    Args

    -
    id : str
    -
    customer id
    +
    chat_id : str
    +
    ID of the chat the thread belongs to.
    +
    thread_id : str
    +
    ID of the thread to return the transcript for.
    payload : dict
    Custom payload to be used as request's data. It overrides all other parameters provided for the method.
    @@ -2825,20 +2762,22 @@

    Returns

    httpx.Response
    The Response object from httpx library, -which contains a server’s response to an HTTP request.
    +which contains a server's response to an HTTP request.
    Expand source code -
    def get_customer(self,
    -                 id: str = None,
    -                 payload: dict = None,
    -                 headers: dict = None) -> httpx.Response:
    -    ''' Returns the info about the Customer with a given id.
    +
    def get_thread_transcript(self,
    +                          chat_id: str = None,
    +                          thread_id: str = None,
    +                          payload: dict = None,
    +                          headers: dict = None) -> httpx.Response:
    +    ''' Returns a plain-text transcript of a given thread.
     
             Args:
    -            id (str): customer id
    +            chat_id (str): ID of the chat the thread belongs to.
    +            thread_id (str): ID of the thread to return the transcript for.
                 payload (dict): Custom payload to be used as request's data.
                                 It overrides all other parameters provided for the method.
                 headers (dict): Custom headers to be used with session headers.
    @@ -2847,10 +2786,10 @@ 

    Returns

    Returns: httpx.Response: The Response object from `httpx` library, - which contains a server’s response to an HTTP request. ''' + which contains a server's response to an HTTP request. ''' if payload is None: payload = prepare_payload(locals()) - return self.session.post(f'{self.api_url}/get_customer', + return self.session.post(f'{self.api_url}/get_thread_transcript', json=payload, headers=headers)
    @@ -2920,7 +2859,7 @@

    Args

    ID of the page with paginated results.
    sort_order : str
    Possible values: asc, desc (default). -Chat summaries are sorted by the creation date +Chat info entries are sorted by the creation date of its last thread.
    limit : str
    Limit of results per page. Default: 10, maximum: 100.
    @@ -2961,7 +2900,7 @@

    Returns

    filters (dict): Possible request filters. page_id (str): ID of the page with paginated results. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation date + Chat info entries are sorted by the creation date of its last thread. limit (str): Limit of results per page. Default: 10, maximum: 100. highlights (dict): Use it to highlight the match of filters.query. @@ -2988,7 +2927,7 @@

    Returns

    def list_chats(self, filters: dict = None, sort_order: str = None, limit: int = None, page_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
    -

    Returns summaries of the chats an Agent has access to.

    +

    Returns chat info for the chats an Agent has access to.

    Args

    filters : dict
    @@ -2997,7 +2936,7 @@

    Args

    the behavior is undefined.
    sort_order : str
    Possible values: asc, desc (default). -Chat summaries are sorted by the creation +Chat info entries are sorted by the creation date of its last thread.
    limit : int
    Limit of results per page. Default: 10, maximum: 100.
    @@ -3029,14 +2968,14 @@

    Returns

    page_id: str = None, payload: dict = None, headers: dict = None) -> httpx.Response: - ''' Returns summaries of the chats an Agent has access to. + ''' Returns chat info for the chats an Agent has access to. Args: filters (dict): Possible request filters. Mustn't change between requests for subsequent pages. Otherwise, the behavior is undefined. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation + Chat info entries are sorted by the creation date of its last thread. limit (int): Limit of results per page. Default: 10, maximum: 100. page_id (str): ID of the page with paginated results. @@ -4145,64 +4084,6 @@

    Returns

    headers=headers)
    -
    -def unfollow_customer(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
    -
    -

    Removes the agent from the list of customer's followers. Calling this -method on a customer the agent's chatting with will result in success, -however, the agent will still receive pushes about the customer's data -updates. The unfollowing will take effect once the chat ends.

    -

    Args

    -
    -
    id : str
    -
    ID of the Customer.
    -
    payload : dict
    -
    Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
    -
    headers : dict
    -
    Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
    -
    -

    Returns

    -
    -
    httpx.Response
    -
    The Response object from httpx library, -which contains a server’s response to an HTTP request.
    -
    -
    - -Expand source code - -
    def unfollow_customer(self,
    -                      id: str = None,
    -                      payload: dict = None,
    -                      headers: dict = None) -> httpx.Response:
    -    ''' Removes the agent from the list of customer's followers. Calling this
    -        method on a customer the agent's chatting with will result in success,
    -        however, the agent will still receive pushes about the customer's data
    -        updates. The unfollowing will take effect once the chat ends.
    -
    -        Args:
    -            id (str): ID of the Customer.
    -            payload (dict): Custom payload to be used as request's data.
    -                            It overrides all other parameters provided for the method.
    -            headers (dict): Custom headers to be used with session headers.
    -                            They will be merged with session-level values that are set,
    -                            however, these method-level parameters will not be persisted across requests.
    -
    -        Returns:
    -            httpx.Response: The Response object from `httpx` library,
    -                            which contains a server’s response to an HTTP request.
    -    '''
    -    if payload is None:
    -        payload = prepare_payload(locals())
    -    return self.session.post(f'{self.api_url}/unfollow_customer',
    -                             json=payload,
    -                             headers=headers)
    -
    -
    def untag_thread(self, chat_id: str = None, thread_id: str = None, tag: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
    @@ -4587,9 +4468,9 @@

    delete_event_properties
  • delete_thread_properties
  • follow_chat
  • -
  • follow_customer
  • get_chat
  • get_customer
  • +
  • get_thread_transcript
  • list_agents_for_transfer
  • list_archives
  • list_chats
  • @@ -4611,7 +4492,6 @@

    tag_thread
  • transfer_chat
  • unfollow_chat
  • -
  • unfollow_customer
  • untag_thread
  • update_chat_properties
  • update_customer
  • diff --git a/docs/agent/web/base.html b/docs/agent/web/base.html index 35e1079..0ae428d 100644 --- a/docs/agent/web/base.html +++ b/docs/agent/web/base.html @@ -36,7 +36,6 @@

    Module livechat.agent.web.base

    import httpx -from livechat.agent.web.api.v34 import AgentWebV34 from livechat.agent.web.api.v35 import AgentWebV35 from livechat.agent.web.api.v36 import AgentWebV36 from livechat.agent.web.api.v37 import AgentWebV37 @@ -60,7 +59,7 @@

    Module livechat.agent.web.base

    verify: bool = True, disable_logging: bool = False, timeout: float = httpx.Timeout(15) - ) -> Union[AgentWebV34, AgentWebV35, AgentWebV36, AgentWebV37]: + ) -> Union[AgentWebV35, AgentWebV36, AgentWebV37]: ''' Returns client for specific API version. Args: @@ -86,9 +85,6 @@

    Module livechat.agent.web.base

    ValueError: If the specified version does not exist. ''' client = { - '3.4': - AgentWebV34(access_token, base_url, http2, proxies, verify, - disable_logging, timeout), '3.5': AgentWebV35(access_token, base_url, http2, proxies, verify, disable_logging, timeout), @@ -136,7 +132,7 @@

    Classes

    verify: bool = True, disable_logging: bool = False, timeout: float = httpx.Timeout(15) - ) -> Union[AgentWebV34, AgentWebV35, AgentWebV36, AgentWebV37]: + ) -> Union[AgentWebV35, AgentWebV36, AgentWebV37]: ''' Returns client for specific API version. Args: @@ -162,9 +158,6 @@

    Classes

    ValueError: If the specified version does not exist. ''' client = { - '3.4': - AgentWebV34(access_token, base_url, http2, proxies, verify, - disable_logging, timeout), '3.5': AgentWebV35(access_token, base_url, http2, proxies, verify, disable_logging, timeout), @@ -182,7 +175,7 @@

    Classes

    Static methods

    -def get_client(access_token: Union[AccessToken, str], version: str = '3.6', base_url: str = 'api.livechatinc.com', http2: bool = False, proxies: dict = None, verify: bool = True, disable_logging: bool = False, timeout: float = Timeout(timeout=15)) ‑> Union[AgentWebV34, AgentWebV35, AgentWebV36, AgentWebV37] +def get_client(access_token: Union[AccessToken, str], version: str = '3.6', base_url: str = 'api.livechatinc.com', http2: bool = False, proxies: dict = None, verify: bool = True, disable_logging: bool = False, timeout: float = Timeout(timeout=15)) ‑> Union[AgentWebV35, AgentWebV36, AgentWebV37]

    Returns client for specific API version.

    @@ -232,7 +225,7 @@

    Raises

    verify: bool = True, disable_logging: bool = False, timeout: float = httpx.Timeout(15) -) -> Union[AgentWebV34, AgentWebV35, AgentWebV36, AgentWebV37]: +) -> Union[AgentWebV35, AgentWebV36, AgentWebV37]: ''' Returns client for specific API version. Args: @@ -258,9 +251,6 @@

    Raises

    ValueError: If the specified version does not exist. ''' client = { - '3.4': - AgentWebV34(access_token, base_url, http2, proxies, verify, - disable_logging, timeout), '3.5': AgentWebV35(access_token, base_url, http2, proxies, verify, disable_logging, timeout), diff --git a/docs/configuration/api/index.html b/docs/configuration/api/index.html index 2d36a34..68d8fed 100644 --- a/docs/configuration/api/index.html +++ b/docs/configuration/api/index.html @@ -26,10 +26,6 @@

    Module livechat.configuration.api

    Sub-modules

    -
    livechat.configuration.api.v34
    -
    -

    Configuration API module with client class in version 3.4.

    -
    livechat.configuration.api.v35

    Configuration API module with client class in version 3.5.

    @@ -64,7 +60,6 @@

    Index

  • Sub-modules

      -
    • livechat.configuration.api.v34
    • livechat.configuration.api.v35
    • livechat.configuration.api.v36
    • livechat.configuration.api.v37
    • diff --git a/docs/configuration/api/v34.html b/docs/configuration/api/v34.html deleted file mode 100644 index ceba24c..0000000 --- a/docs/configuration/api/v34.html +++ /dev/null @@ -1,5050 +0,0 @@ - - - - - - -livechat.configuration.api.v34 API documentation - - - - - - - - - - - -
      -
      -
      -

      Module livechat.configuration.api.v34

      -
      -
      -

      Configuration API module with client class in version 3.4.

      -
      - -Expand source code - -
      ''' Configuration API module with client class in version 3.4. '''
      -
      -from typing import Union
      -
      -import httpx
      -
      -from livechat.utils.helpers import prepare_payload
      -from livechat.utils.http_client import HttpClient
      -from livechat.utils.structures import AccessToken
      -
      -
      -class ConfigurationApiV34(HttpClient):
      -    ''' Configuration API client class in version 3.4. '''
      -    def __init__(self,
      -                 token: Union[AccessToken, str],
      -                 base_url: str,
      -                 http2: bool,
      -                 proxies=None,
      -                 verify: bool = True,
      -                 disable_logging: bool = False,
      -                 timeout: float = httpx.Timeout(15)):
      -        super().__init__(token, base_url, http2, proxies, verify,
      -                         disable_logging, timeout)
      -        self.api_url = f'https://{base_url}/v3.4/configuration/action'
      -
      -# Agents
      -
      -    def create_agent(self,
      -                     id: str = None,
      -                     name: str = None,
      -                     role: str = None,
      -                     avatar_path: str = None,
      -                     job_title: str = None,
      -                     mobile: str = None,
      -                     max_chats_count: int = None,
      -                     awaiting_approval: bool = None,
      -                     groups: list = None,
      -                     notifications: list = None,
      -                     email_subscriptions: list = None,
      -                     work_scheduler: dict = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Creates a new Agent with specified parameters within a license.
      -
      -            Args:
      -                id (str): Agent's ID.
      -                name (str): Agent's name.
      -                role (str): Agent role, should be one of the following:
      -                            `viceowner`, `administrator`, `normal` (default).
      -                avatar_path (str): URL path of the Agent's avatar.
      -                job_title (str): Agent's job title.
      -                mobile (str): Agent's mobile number.
      -                max_chats_count (int): Agent's maximum number of concurrent chats.
      -                awaiting_approval (bool): Determines if the Agent will be awaiting
      -                                          approval after creation.
      -                groups (list): Groups an Agent belongs to.
      -                notifications (list): Represents which Agent notifications are turned on.
      -                email_subscriptions (list): Represents which subscriptions will be send to
      -                                           the Agent via email.
      -                work_scheduler (dict): Work scheduler options to set for the new Agent.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/create_agent',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def get_agent(self,
      -                  id: str = None,
      -                  fields: list = None,
      -                  payload: dict = None,
      -                  headers: dict = None) -> httpx.Response:
      -        ''' Returns the info about an Agent specified by `id`.
      -
      -            Args:
      -                id (str): Agent's ID.
      -                fields (list): Additional fields to include.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/get_agent',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_agents(self,
      -                    filters: dict = None,
      -                    fields: list = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Returns all Agents within a license.
      -
      -            Args:
      -                filters (dict): Possible request filters.
      -                fields (list): Additional fields to include.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_agents',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def update_agent(self,
      -                     id: str = None,
      -                     name: str = None,
      -                     role: str = None,
      -                     avatar_path: str = None,
      -                     job_title: str = None,
      -                     mobile: str = None,
      -                     max_chats_count: int = None,
      -                     groups: list = None,
      -                     notifications: list = None,
      -                     email_subscriptions: list = None,
      -                     work_scheduler: dict = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Updates the properties of an Agent specified by `id`.
      -
      -            Args:
      -                id (str): Agent's ID.
      -                name (str): Agent's name.
      -                role (str): Agent role, should be one of the following:
      -                            `viceowner`, `administrator`, `normal` (default).
      -                avatar_path (str): URL path of the Agent's avatar.
      -                job_title (str): Agent's job title.
      -                mobile (str): Agent's mobile number.
      -                max_chats_count (int): Agent's maximum number of concurrent chats.
      -                groups (list): Groups an Agent belongs to.
      -                notifications (list): Represents which Agent notifications are turned on.
      -                email_subscriptions (list): Represents which subscriptions will be send to
      -                                           the Agent via email.
      -                work_scheduler (dict): Work scheduler options to set for the new Agent.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_agent',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def delete_agent(self,
      -                     id: str = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Deletes an Agent specified by `id`.
      -
      -            Args:
      -                id (str): Agent's ID.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/delete_agent',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def suspend_agent(self,
      -                      id: str = None,
      -                      payload: dict = None,
      -                      headers: dict = None) -> httpx.Response:
      -        ''' Suspends an Agent specified by `id`.
      -
      -            Args:
      -                id (str): Agent's ID.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/suspend_agent',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def unsuspend_agent(self,
      -                        id: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Unsuspends an Agent specified by `id`.
      -
      -            Args:
      -                id (str): Agent's ID.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/unsuspend_agent',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def request_agent_unsuspension(self,
      -                                   payload: dict = None,
      -                                   headers: dict = None) -> httpx.Response:
      -        ''' A suspended Agent can send emails to license owners and vice owners
      -            with an unsuspension request.
      -
      -            Args:
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/request_agent_unsuspension',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def approve_agent(self,
      -                      id: str = None,
      -                      payload: dict = None,
      -                      headers: dict = None) -> httpx.Response:
      -        ''' Approves an Agent thus allowing the Agent to use the application.
      -
      -            Args:
      -                id (str): Agent's ID.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/approve_agent',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Auto access
      -
      -    def add_auto_access(self,
      -                        access: dict = None,
      -                        conditions: dict = None,
      -                        description: str = None,
      -                        next_id: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Creates an auto access data structure, which is a set of conditions
      -            for the tracking URL and geolocation of a customer.
      -
      -        Args:
      -            access (dict): Destination access.
      -            conditions (dict): Conditions to check.
      -            description (str):  Description of the auto access.
      -            next_id (str): ID of an existing auto access.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/add_auto_access',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_auto_accesses(self,
      -                           payload: dict = None,
      -                           headers: dict = None) -> httpx.Response:
      -        ''' Returns all existing auto access data structures.
      -
      -        Args:
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_auto_accesses',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def delete_auto_access(self,
      -                           id: str = None,
      -                           payload: dict = None,
      -                           headers: dict = None) -> httpx.Response:
      -        ''' Deletes an existing auto access data structure specified by its ID.
      -
      -            Args:
      -                id (str): Auto access ID.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/delete_auto_access',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def update_auto_access(self,
      -                           id: str = None,
      -                           next_id: str = None,
      -                           access: dict = None,
      -                           conditions: dict = None,
      -                           description: str = None,
      -                           payload: dict = None,
      -                           headers: dict = None) -> httpx.Response:
      -        ''' Moves an existing auto access data structure, specified by id,
      -            before another one, specified by next_id.
      -
      -            Args:
      -                id (str): ID of the auto access to move.
      -                next_id (str): ID of the auto access that should follow the moved auto access.
      -                access (dict): Destination access.
      -                conditions (dict): Conditions to check.
      -                description (str): Description of the auto access.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_auto_access',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Bots
      -
      -    def create_bot(self,
      -                   name: str = None,
      -                   avatar: str = None,
      -                   max_chats_count: int = None,
      -                   default_group_priority: str = None,
      -                   job_title: str = None,
      -                   groups: list = None,
      -                   work_scheduler: dict = None,
      -                   timezone: str = None,
      -                   owner_client_id: str = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Creates a new Bot.
      -
      -            Args:
      -                name (str): Display name.
      -                avatar (str): Avatar URL.
      -                max_chats_count (int): Max. number of incoming chats that can be routed to the Bot; default: 6.
      -                default_group_priority (str): The default routing priority for a group without defined priority.
      -                job_title (str): Bot's job title.
      -                groups (list): Groups the Bot belongs to.
      -                work_scheduler (dict): Work scheduler options to set for the new Bot.
      -                timezone (str): The time zone in which the Bot's work scheduler should operate.
      -                owner_client_id (str): Required only when authorizing via PATs.
      -                                The request will be rejected if you provide owner_client_id when authorizing with a Bearer Token.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/create_bot',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def delete_bot(self,
      -                   id: str = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Deletes a Bot.
      -
      -            Args:
      -                id (str): Bot's ID.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/delete_bot',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def update_bot(self,
      -                   id: str = None,
      -                   name: str = None,
      -                   avatar: str = None,
      -                   max_chats_count: int = None,
      -                   default_group_priority: str = None,
      -                   groups: list = None,
      -                   webhooks: dict = None,
      -                   work_scheduler: dict = None,
      -                   timezone: str = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Updates an existing Bot.
      -
      -            Args:
      -                id (str): Bot's ID.
      -                name (str): Display name.
      -                avatar (str): Avatar URL.
      -                max_chats_count (int): Max. number of incoming chats that can be routed to the Bot.
      -                default_group_priority (str): The default routing priority for a group without defined priority.
      -                groups (list): Groups the Bot belongs to.
      -                webhooks (dict): Webhooks sent to the Bot.
      -                work_scheduler (dict): Work scheduler options to set for the new Bot.
      -                timezone (str): The time zone in which the Bot's work scheduler should operate.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_bot',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_bots(self,
      -                  all: bool = None,
      -                  fields: list = None,
      -                  payload: dict = None,
      -                  headers: dict = None) -> httpx.Response:
      -        ''' Returns the list of Bots created within a license.
      -
      -            Args:
      -                all (bool): `True` gets all Bots within a license. `False` (default) returns only the requester's Bots.
      -                fields (list): Additional Bot fields to include.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_bots',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def get_bot(self,
      -                id: str = None,
      -                fields: list = None,
      -                payload: dict = None,
      -                headers: dict = None) -> httpx.Response:
      -        ''' Gets a Bot specified by `id`.
      -
      -            Args:
      -                id (str): Bot's ID.
      -                fields (list): Additional Bot fields to include.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/get_bot',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Groups
      -
      -    def create_group(self,
      -                     name: str = None,
      -                     language_code: str = None,
      -                     agent_priorities: dict = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Creates a new group.
      -
      -            Args:
      -                name (str): Group name (up to 180 chars).
      -                language_code (str): The code of the group languange.
      -                agent_priorities (dict): Agents' priorities in a group as a map in the "<id>": "<priority>" format.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/create_group',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def update_group(self,
      -                     id: int = None,
      -                     name: str = None,
      -                     language_code: str = None,
      -                     agent_priorities: dict = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Updates an existing group.
      -
      -            Args:
      -                id (int): Groups' ID.
      -                name (str): Group name (up to 180 chars).
      -                language_code (str): The code of the group languange.
      -                agent_priorities (dict): Agents' priorities in a group as a map in the "<id>": "<priority>" format.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_group',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def delete_group(self,
      -                     id: int = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Deletes an existing group.
      -
      -            Args:
      -                id (int): Groups' ID.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/delete_group',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_groups(self,
      -                    fields: list = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Lists all the exisiting groups.
      -
      -            Args:
      -                fields (list): Additional fields to include.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_groups',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def get_group(self,
      -                  id: int = None,
      -                  fields: list = None,
      -                  payload: dict = None,
      -                  headers: dict = None) -> httpx.Response:
      -        ''' Returns details about a group specified by its id.
      -
      -            Args:
      -                id (int): Groups' ID.
      -                fields (list): Additional fields to include.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/get_group',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Properties
      -
      -    def register_property(self,
      -                          name: str = None,
      -                          owner_client_id: str = None,
      -                          type: str = None,
      -                          access: dict = None,
      -                          description: str = None,
      -                          domain: list = None,
      -                          range: dict = None,
      -                          default_value: str = None,
      -                          payload: dict = None,
      -                          headers: dict = None) -> httpx.Response:
      -        ''' Registers a new private property for a given Client ID.
      -
      -            Args:
      -                name (str): Property name.
      -                owner_client_id (str): Client ID that will own the property; must be owned by your organization.
      -                type (str):  Possible values: `int`, `string`, `bool`, and `tokenized_string`.
      -                access (dict): Destination access.
      -                description (str): Property description.
      -                domain (list): Array of values that properties can be set to.
      -                range (dict): Range of values that properties can be set to.
      -                default_value (str): Default value of property; validated by domain or range, if one exists.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/register_property',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def unregister_property(self,
      -                            name: str = None,
      -                            owner_client_id: str = None,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -        ''' Unregisters a private property.
      -
      -            Args:
      -                name (str): Property name.
      -                owner_client_id (str): Client ID that will own the property; must be owned by your organization.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/unregister_property',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def publish_property(self,
      -                         name: str = None,
      -                         owner_client_id: str = None,
      -                         access_type: list = None,
      -                         payload: dict = None,
      -                         headers: dict = None) -> httpx.Response:
      -        ''' Publishes a private property.
      -
      -            Args:
      -                name (str): Property name.
      -                owner_client_id (str): Client ID that will own the property; must be owned by your organization.
      -                access_type (list): Possible values: `read`, `write`.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/publish_property',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_properties(self,
      -                        owner_client_id: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Lists private and public properties owned by a given Client ID.
      -
      -            Args:
      -                owner_client_id (str): Client ID that will own the property; must be owned by your organization.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def update_license_properties(self,
      -                                  properties: dict = None,
      -                                  payload: dict = None,
      -                                  headers: dict = None) -> httpx.Response:
      -        ''' Updates a property value within a license. This operation doesn't
      -            overwrite the existing values.
      -
      -            Args:
      -                properties (dict): An object with namespaces as keys and properties (grouped in objects) as values.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_license_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_license_properties(self,
      -                                namespace: str = None,
      -                                name_prefix: str = None,
      -                                payload: dict = None,
      -                                headers: dict = None) -> httpx.Response:
      -        ''' Returns the properties set within a license.
      -
      -            Args:
      -                namespace (str): Properties namespace.
      -                name_prefix (str): Properties name prefix.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_license_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def delete_license_properties(self,
      -                                  properties: dict = None,
      -                                  payload: dict = None,
      -                                  headers: dict = None) -> httpx.Response:
      -        ''' Deletes the properties set within a license.
      -
      -            Args:
      -                properties (dict): An object with namespaces as keys and property_names (in an array) as values.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/delete_license_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def update_group_properties(self,
      -                                group_id: int = None,
      -                                properties: dict = None,
      -                                payload: dict = None,
      -                                headers: dict = None) -> httpx.Response:
      -        ''' Updates a property value within a group as the property location.
      -            This operation doesn't overwrite the existing values.
      -
      -            Args:
      -                group_id (int): ID of the group you set the properties for.
      -                properties (dict): An object with namespaces as keys and properties (grouped in objects) as values.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_group_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_group_properties(self,
      -                              id: int = None,
      -                              namespace: str = None,
      -                              name_prefix: str = None,
      -                              payload: dict = None,
      -                              headers: dict = None) -> httpx.Response:
      -        ''' Returns the properties set within a group.
      -
      -            Args:
      -                id (int): ID of the group you retrieve properties from.
      -                namespace (str): Properties namespace.
      -                name_prefix (str): Properties name prefix.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_group_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def delete_group_properties(self,
      -                                id: int = None,
      -                                properties: dict = None,
      -                                payload: dict = None,
      -                                headers: dict = None) -> httpx.Response:
      -        ''' Deletes the properties set within a group.
      -
      -            Args:
      -                id (int): ID of the group you delete properties from.
      -                properties (dict): An object with namespaces as keys and property_names (in an array) as values.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/delete_group_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Webhooks
      -
      -    def register_webhook(self,
      -                         action: str = None,
      -                         secret_key: str = None,
      -                         url: str = None,
      -                         additional_data: list = None,
      -                         description: str = None,
      -                         filters: dict = None,
      -                         owner_client_id: str = None,
      -                         type: str = None,
      -                         payload: dict = None,
      -                         headers: dict = None) -> httpx.Response:
      -        ''' Registers a webhook for the Client ID (application) provided in the request.
      -
      -            Args:
      -                action (str): The action that triggers sending a webhook.
      -                secret_key (str): The secret key sent in webhooks to verify the source of a webhook.
      -                url (str): Destination URL for the webhook.
      -                additional_data (list): Additional data arriving with the webhook.
      -                description (str):      Webhook description.
      -                filters (dict): Filters to check if a webhook should be triggered.
      -                owner_client_id (str): The Client ID for which the webhook will be registered.
      -                type (str): `bot` or `license`.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/register_webhook',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_webhooks(self,
      -                      owner_client_id: str = None,
      -                      payload: dict = None,
      -                      headers: dict = None) -> httpx.Response:
      -        ''' Lists all webhooks registered for the given Client ID.
      -
      -            Args:
      -                owner_client_id (str): The webhook owner (the Client ID for which the webhook is registered).
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_webhooks',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def unregister_webhook(self,
      -                           id: str = None,
      -                           owner_client_id: str = None,
      -                           payload: dict = None,
      -                           headers: dict = None) -> httpx.Response:
      -        ''' Unregisters a webhook previously registered for a Client ID (application).
      -
      -            Args:
      -                id (str): Webhook's ID.
      -                owner_client_id (str): The webhook owner (the Client ID for which the webhook is registered).
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/unregister_webhook',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_webhook_names(self,
      -                           version: str = None,
      -                           payload: dict = None,
      -                           headers: dict = None) -> httpx.Response:
      -        ''' Lists all webhooks that are supported in a given API version. This method requires no authorization.
      -
      -            Args:
      -                version (str): API's version. Defaults to the current stable API version.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_webhook_names',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def enable_license_webhooks(self,
      -                                owner_client_id: str = None,
      -                                payload: dict = None,
      -                                headers: dict = None) -> httpx.Response:
      -        ''' Enables the webhooks registered for a given Client ID (application)
      -            for the license associated with the access token used in the request.
      -
      -            Args:
      -                owner_client_id (str): The webhook owner (the Client ID for which the webhook is registered).
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/enable_license_webhooks',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def disable_license_webhooks(self,
      -                                 owner_client_id: str = None,
      -                                 payload: dict = None,
      -                                 headers: dict = None) -> httpx.Response:
      -        ''' Disables the enabled webhooks.
      -
      -            Args:
      -                owner_client_id (str): Required when authorizing via PATs; ignored otherwise.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/disable_license_webhooks',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def get_license_webhooks_state(self,
      -                                   owner_client_id: str = None,
      -                                   payload: dict = None,
      -                                   headers: dict = None) -> httpx.Response:
      -        ''' Gets the state of the webhooks registered for a given Client ID (application)
      -            on the license associated with the access token used in the request.
      -
      -            Args:
      -                owner_client_id (str): Required when authorizing via PATs; ignored otherwise.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/get_license_webhooks_state',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -
      -# Other
      -
      -    def get_license_id(self,
      -                       organization_id: str = None,
      -                       params: dict = None,
      -                       headers: dict = None) -> httpx.Response:
      -        ''' Returns license ID by given organization ID.
      -
      -            Args:
      -                organization_id (str): Organization ID to get license ID for.
      -                params (dict): Custom params to be used in request's query string.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if params is None:
      -            params = prepare_payload(locals())
      -        return self.session.get(f'{self.api_url}/get_license_id',
      -                                params=params,
      -                                headers=headers)
      -
      -    def get_organization_id(self,
      -                            license_id: int = None,
      -                            params: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -        ''' Returns organization ID by given license ID.
      -
      -            Args:
      -                license_id (int): License ID to get organization ID for.
      -                params (dict): Custom params to be used in request's query string.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if params is None:
      -            params = prepare_payload(locals())
      -        return self.session.get(f'{self.api_url}/get_organization_id',
      -                                params=params,
      -                                headers=headers)
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Classes

      -
      -
      -class ConfigurationApiV34 -(token: Union[livechat.utils.structures.AccessToken, str], base_url: str, http2: bool, proxies=None, verify: bool = True, disable_logging: bool = False, timeout: float = Timeout(timeout=15)) -
      -
      -

      Configuration API client class in version 3.4.

      -
      - -Expand source code - -
      class ConfigurationApiV34(HttpClient):
      -    ''' Configuration API client class in version 3.4. '''
      -    def __init__(self,
      -                 token: Union[AccessToken, str],
      -                 base_url: str,
      -                 http2: bool,
      -                 proxies=None,
      -                 verify: bool = True,
      -                 disable_logging: bool = False,
      -                 timeout: float = httpx.Timeout(15)):
      -        super().__init__(token, base_url, http2, proxies, verify,
      -                         disable_logging, timeout)
      -        self.api_url = f'https://{base_url}/v3.4/configuration/action'
      -
      -# Agents
      -
      -    def create_agent(self,
      -                     id: str = None,
      -                     name: str = None,
      -                     role: str = None,
      -                     avatar_path: str = None,
      -                     job_title: str = None,
      -                     mobile: str = None,
      -                     max_chats_count: int = None,
      -                     awaiting_approval: bool = None,
      -                     groups: list = None,
      -                     notifications: list = None,
      -                     email_subscriptions: list = None,
      -                     work_scheduler: dict = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Creates a new Agent with specified parameters within a license.
      -
      -            Args:
      -                id (str): Agent's ID.
      -                name (str): Agent's name.
      -                role (str): Agent role, should be one of the following:
      -                            `viceowner`, `administrator`, `normal` (default).
      -                avatar_path (str): URL path of the Agent's avatar.
      -                job_title (str): Agent's job title.
      -                mobile (str): Agent's mobile number.
      -                max_chats_count (int): Agent's maximum number of concurrent chats.
      -                awaiting_approval (bool): Determines if the Agent will be awaiting
      -                                          approval after creation.
      -                groups (list): Groups an Agent belongs to.
      -                notifications (list): Represents which Agent notifications are turned on.
      -                email_subscriptions (list): Represents which subscriptions will be send to
      -                                           the Agent via email.
      -                work_scheduler (dict): Work scheduler options to set for the new Agent.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/create_agent',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def get_agent(self,
      -                  id: str = None,
      -                  fields: list = None,
      -                  payload: dict = None,
      -                  headers: dict = None) -> httpx.Response:
      -        ''' Returns the info about an Agent specified by `id`.
      -
      -            Args:
      -                id (str): Agent's ID.
      -                fields (list): Additional fields to include.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/get_agent',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_agents(self,
      -                    filters: dict = None,
      -                    fields: list = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Returns all Agents within a license.
      -
      -            Args:
      -                filters (dict): Possible request filters.
      -                fields (list): Additional fields to include.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_agents',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def update_agent(self,
      -                     id: str = None,
      -                     name: str = None,
      -                     role: str = None,
      -                     avatar_path: str = None,
      -                     job_title: str = None,
      -                     mobile: str = None,
      -                     max_chats_count: int = None,
      -                     groups: list = None,
      -                     notifications: list = None,
      -                     email_subscriptions: list = None,
      -                     work_scheduler: dict = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Updates the properties of an Agent specified by `id`.
      -
      -            Args:
      -                id (str): Agent's ID.
      -                name (str): Agent's name.
      -                role (str): Agent role, should be one of the following:
      -                            `viceowner`, `administrator`, `normal` (default).
      -                avatar_path (str): URL path of the Agent's avatar.
      -                job_title (str): Agent's job title.
      -                mobile (str): Agent's mobile number.
      -                max_chats_count (int): Agent's maximum number of concurrent chats.
      -                groups (list): Groups an Agent belongs to.
      -                notifications (list): Represents which Agent notifications are turned on.
      -                email_subscriptions (list): Represents which subscriptions will be send to
      -                                           the Agent via email.
      -                work_scheduler (dict): Work scheduler options to set for the new Agent.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_agent',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def delete_agent(self,
      -                     id: str = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Deletes an Agent specified by `id`.
      -
      -            Args:
      -                id (str): Agent's ID.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/delete_agent',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def suspend_agent(self,
      -                      id: str = None,
      -                      payload: dict = None,
      -                      headers: dict = None) -> httpx.Response:
      -        ''' Suspends an Agent specified by `id`.
      -
      -            Args:
      -                id (str): Agent's ID.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/suspend_agent',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def unsuspend_agent(self,
      -                        id: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Unsuspends an Agent specified by `id`.
      -
      -            Args:
      -                id (str): Agent's ID.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/unsuspend_agent',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def request_agent_unsuspension(self,
      -                                   payload: dict = None,
      -                                   headers: dict = None) -> httpx.Response:
      -        ''' A suspended Agent can send emails to license owners and vice owners
      -            with an unsuspension request.
      -
      -            Args:
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/request_agent_unsuspension',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def approve_agent(self,
      -                      id: str = None,
      -                      payload: dict = None,
      -                      headers: dict = None) -> httpx.Response:
      -        ''' Approves an Agent thus allowing the Agent to use the application.
      -
      -            Args:
      -                id (str): Agent's ID.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/approve_agent',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Auto access
      -
      -    def add_auto_access(self,
      -                        access: dict = None,
      -                        conditions: dict = None,
      -                        description: str = None,
      -                        next_id: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Creates an auto access data structure, which is a set of conditions
      -            for the tracking URL and geolocation of a customer.
      -
      -        Args:
      -            access (dict): Destination access.
      -            conditions (dict): Conditions to check.
      -            description (str):  Description of the auto access.
      -            next_id (str): ID of an existing auto access.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/add_auto_access',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_auto_accesses(self,
      -                           payload: dict = None,
      -                           headers: dict = None) -> httpx.Response:
      -        ''' Returns all existing auto access data structures.
      -
      -        Args:
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_auto_accesses',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def delete_auto_access(self,
      -                           id: str = None,
      -                           payload: dict = None,
      -                           headers: dict = None) -> httpx.Response:
      -        ''' Deletes an existing auto access data structure specified by its ID.
      -
      -            Args:
      -                id (str): Auto access ID.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/delete_auto_access',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def update_auto_access(self,
      -                           id: str = None,
      -                           next_id: str = None,
      -                           access: dict = None,
      -                           conditions: dict = None,
      -                           description: str = None,
      -                           payload: dict = None,
      -                           headers: dict = None) -> httpx.Response:
      -        ''' Moves an existing auto access data structure, specified by id,
      -            before another one, specified by next_id.
      -
      -            Args:
      -                id (str): ID of the auto access to move.
      -                next_id (str): ID of the auto access that should follow the moved auto access.
      -                access (dict): Destination access.
      -                conditions (dict): Conditions to check.
      -                description (str): Description of the auto access.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_auto_access',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Bots
      -
      -    def create_bot(self,
      -                   name: str = None,
      -                   avatar: str = None,
      -                   max_chats_count: int = None,
      -                   default_group_priority: str = None,
      -                   job_title: str = None,
      -                   groups: list = None,
      -                   work_scheduler: dict = None,
      -                   timezone: str = None,
      -                   owner_client_id: str = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Creates a new Bot.
      -
      -            Args:
      -                name (str): Display name.
      -                avatar (str): Avatar URL.
      -                max_chats_count (int): Max. number of incoming chats that can be routed to the Bot; default: 6.
      -                default_group_priority (str): The default routing priority for a group without defined priority.
      -                job_title (str): Bot's job title.
      -                groups (list): Groups the Bot belongs to.
      -                work_scheduler (dict): Work scheduler options to set for the new Bot.
      -                timezone (str): The time zone in which the Bot's work scheduler should operate.
      -                owner_client_id (str): Required only when authorizing via PATs.
      -                                The request will be rejected if you provide owner_client_id when authorizing with a Bearer Token.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/create_bot',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def delete_bot(self,
      -                   id: str = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Deletes a Bot.
      -
      -            Args:
      -                id (str): Bot's ID.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/delete_bot',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def update_bot(self,
      -                   id: str = None,
      -                   name: str = None,
      -                   avatar: str = None,
      -                   max_chats_count: int = None,
      -                   default_group_priority: str = None,
      -                   groups: list = None,
      -                   webhooks: dict = None,
      -                   work_scheduler: dict = None,
      -                   timezone: str = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Updates an existing Bot.
      -
      -            Args:
      -                id (str): Bot's ID.
      -                name (str): Display name.
      -                avatar (str): Avatar URL.
      -                max_chats_count (int): Max. number of incoming chats that can be routed to the Bot.
      -                default_group_priority (str): The default routing priority for a group without defined priority.
      -                groups (list): Groups the Bot belongs to.
      -                webhooks (dict): Webhooks sent to the Bot.
      -                work_scheduler (dict): Work scheduler options to set for the new Bot.
      -                timezone (str): The time zone in which the Bot's work scheduler should operate.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_bot',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_bots(self,
      -                  all: bool = None,
      -                  fields: list = None,
      -                  payload: dict = None,
      -                  headers: dict = None) -> httpx.Response:
      -        ''' Returns the list of Bots created within a license.
      -
      -            Args:
      -                all (bool): `True` gets all Bots within a license. `False` (default) returns only the requester's Bots.
      -                fields (list): Additional Bot fields to include.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_bots',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def get_bot(self,
      -                id: str = None,
      -                fields: list = None,
      -                payload: dict = None,
      -                headers: dict = None) -> httpx.Response:
      -        ''' Gets a Bot specified by `id`.
      -
      -            Args:
      -                id (str): Bot's ID.
      -                fields (list): Additional Bot fields to include.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/get_bot',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Groups
      -
      -    def create_group(self,
      -                     name: str = None,
      -                     language_code: str = None,
      -                     agent_priorities: dict = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Creates a new group.
      -
      -            Args:
      -                name (str): Group name (up to 180 chars).
      -                language_code (str): The code of the group languange.
      -                agent_priorities (dict): Agents' priorities in a group as a map in the "<id>": "<priority>" format.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/create_group',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def update_group(self,
      -                     id: int = None,
      -                     name: str = None,
      -                     language_code: str = None,
      -                     agent_priorities: dict = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Updates an existing group.
      -
      -            Args:
      -                id (int): Groups' ID.
      -                name (str): Group name (up to 180 chars).
      -                language_code (str): The code of the group languange.
      -                agent_priorities (dict): Agents' priorities in a group as a map in the "<id>": "<priority>" format.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_group',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def delete_group(self,
      -                     id: int = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Deletes an existing group.
      -
      -            Args:
      -                id (int): Groups' ID.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/delete_group',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_groups(self,
      -                    fields: list = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Lists all the exisiting groups.
      -
      -            Args:
      -                fields (list): Additional fields to include.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_groups',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def get_group(self,
      -                  id: int = None,
      -                  fields: list = None,
      -                  payload: dict = None,
      -                  headers: dict = None) -> httpx.Response:
      -        ''' Returns details about a group specified by its id.
      -
      -            Args:
      -                id (int): Groups' ID.
      -                fields (list): Additional fields to include.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/get_group',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Properties
      -
      -    def register_property(self,
      -                          name: str = None,
      -                          owner_client_id: str = None,
      -                          type: str = None,
      -                          access: dict = None,
      -                          description: str = None,
      -                          domain: list = None,
      -                          range: dict = None,
      -                          default_value: str = None,
      -                          payload: dict = None,
      -                          headers: dict = None) -> httpx.Response:
      -        ''' Registers a new private property for a given Client ID.
      -
      -            Args:
      -                name (str): Property name.
      -                owner_client_id (str): Client ID that will own the property; must be owned by your organization.
      -                type (str):  Possible values: `int`, `string`, `bool`, and `tokenized_string`.
      -                access (dict): Destination access.
      -                description (str): Property description.
      -                domain (list): Array of values that properties can be set to.
      -                range (dict): Range of values that properties can be set to.
      -                default_value (str): Default value of property; validated by domain or range, if one exists.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/register_property',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def unregister_property(self,
      -                            name: str = None,
      -                            owner_client_id: str = None,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -        ''' Unregisters a private property.
      -
      -            Args:
      -                name (str): Property name.
      -                owner_client_id (str): Client ID that will own the property; must be owned by your organization.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/unregister_property',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def publish_property(self,
      -                         name: str = None,
      -                         owner_client_id: str = None,
      -                         access_type: list = None,
      -                         payload: dict = None,
      -                         headers: dict = None) -> httpx.Response:
      -        ''' Publishes a private property.
      -
      -            Args:
      -                name (str): Property name.
      -                owner_client_id (str): Client ID that will own the property; must be owned by your organization.
      -                access_type (list): Possible values: `read`, `write`.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/publish_property',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_properties(self,
      -                        owner_client_id: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Lists private and public properties owned by a given Client ID.
      -
      -            Args:
      -                owner_client_id (str): Client ID that will own the property; must be owned by your organization.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def update_license_properties(self,
      -                                  properties: dict = None,
      -                                  payload: dict = None,
      -                                  headers: dict = None) -> httpx.Response:
      -        ''' Updates a property value within a license. This operation doesn't
      -            overwrite the existing values.
      -
      -            Args:
      -                properties (dict): An object with namespaces as keys and properties (grouped in objects) as values.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_license_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_license_properties(self,
      -                                namespace: str = None,
      -                                name_prefix: str = None,
      -                                payload: dict = None,
      -                                headers: dict = None) -> httpx.Response:
      -        ''' Returns the properties set within a license.
      -
      -            Args:
      -                namespace (str): Properties namespace.
      -                name_prefix (str): Properties name prefix.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_license_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def delete_license_properties(self,
      -                                  properties: dict = None,
      -                                  payload: dict = None,
      -                                  headers: dict = None) -> httpx.Response:
      -        ''' Deletes the properties set within a license.
      -
      -            Args:
      -                properties (dict): An object with namespaces as keys and property_names (in an array) as values.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/delete_license_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def update_group_properties(self,
      -                                group_id: int = None,
      -                                properties: dict = None,
      -                                payload: dict = None,
      -                                headers: dict = None) -> httpx.Response:
      -        ''' Updates a property value within a group as the property location.
      -            This operation doesn't overwrite the existing values.
      -
      -            Args:
      -                group_id (int): ID of the group you set the properties for.
      -                properties (dict): An object with namespaces as keys and properties (grouped in objects) as values.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/update_group_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_group_properties(self,
      -                              id: int = None,
      -                              namespace: str = None,
      -                              name_prefix: str = None,
      -                              payload: dict = None,
      -                              headers: dict = None) -> httpx.Response:
      -        ''' Returns the properties set within a group.
      -
      -            Args:
      -                id (int): ID of the group you retrieve properties from.
      -                namespace (str): Properties namespace.
      -                name_prefix (str): Properties name prefix.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_group_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def delete_group_properties(self,
      -                                id: int = None,
      -                                properties: dict = None,
      -                                payload: dict = None,
      -                                headers: dict = None) -> httpx.Response:
      -        ''' Deletes the properties set within a group.
      -
      -            Args:
      -                id (int): ID of the group you delete properties from.
      -                properties (dict): An object with namespaces as keys and property_names (in an array) as values.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/delete_group_properties',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -# Webhooks
      -
      -    def register_webhook(self,
      -                         action: str = None,
      -                         secret_key: str = None,
      -                         url: str = None,
      -                         additional_data: list = None,
      -                         description: str = None,
      -                         filters: dict = None,
      -                         owner_client_id: str = None,
      -                         type: str = None,
      -                         payload: dict = None,
      -                         headers: dict = None) -> httpx.Response:
      -        ''' Registers a webhook for the Client ID (application) provided in the request.
      -
      -            Args:
      -                action (str): The action that triggers sending a webhook.
      -                secret_key (str): The secret key sent in webhooks to verify the source of a webhook.
      -                url (str): Destination URL for the webhook.
      -                additional_data (list): Additional data arriving with the webhook.
      -                description (str):      Webhook description.
      -                filters (dict): Filters to check if a webhook should be triggered.
      -                owner_client_id (str): The Client ID for which the webhook will be registered.
      -                type (str): `bot` or `license`.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/register_webhook',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_webhooks(self,
      -                      owner_client_id: str = None,
      -                      payload: dict = None,
      -                      headers: dict = None) -> httpx.Response:
      -        ''' Lists all webhooks registered for the given Client ID.
      -
      -            Args:
      -                owner_client_id (str): The webhook owner (the Client ID for which the webhook is registered).
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_webhooks',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def unregister_webhook(self,
      -                           id: str = None,
      -                           owner_client_id: str = None,
      -                           payload: dict = None,
      -                           headers: dict = None) -> httpx.Response:
      -        ''' Unregisters a webhook previously registered for a Client ID (application).
      -
      -            Args:
      -                id (str): Webhook's ID.
      -                owner_client_id (str): The webhook owner (the Client ID for which the webhook is registered).
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/unregister_webhook',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def list_webhook_names(self,
      -                           version: str = None,
      -                           payload: dict = None,
      -                           headers: dict = None) -> httpx.Response:
      -        ''' Lists all webhooks that are supported in a given API version. This method requires no authorization.
      -
      -            Args:
      -                version (str): API's version. Defaults to the current stable API version.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/list_webhook_names',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def enable_license_webhooks(self,
      -                                owner_client_id: str = None,
      -                                payload: dict = None,
      -                                headers: dict = None) -> httpx.Response:
      -        ''' Enables the webhooks registered for a given Client ID (application)
      -            for the license associated with the access token used in the request.
      -
      -            Args:
      -                owner_client_id (str): The webhook owner (the Client ID for which the webhook is registered).
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/enable_license_webhooks',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def disable_license_webhooks(self,
      -                                 owner_client_id: str = None,
      -                                 payload: dict = None,
      -                                 headers: dict = None) -> httpx.Response:
      -        ''' Disables the enabled webhooks.
      -
      -            Args:
      -                owner_client_id (str): Required when authorizing via PATs; ignored otherwise.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/disable_license_webhooks',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def get_license_webhooks_state(self,
      -                                   owner_client_id: str = None,
      -                                   payload: dict = None,
      -                                   headers: dict = None) -> httpx.Response:
      -        ''' Gets the state of the webhooks registered for a given Client ID (application)
      -            on the license associated with the access token used in the request.
      -
      -            Args:
      -                owner_client_id (str): Required when authorizing via PATs; ignored otherwise.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/get_license_webhooks_state',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -
      -# Other
      -
      -    def get_license_id(self,
      -                       organization_id: str = None,
      -                       params: dict = None,
      -                       headers: dict = None) -> httpx.Response:
      -        ''' Returns license ID by given organization ID.
      -
      -            Args:
      -                organization_id (str): Organization ID to get license ID for.
      -                params (dict): Custom params to be used in request's query string.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if params is None:
      -            params = prepare_payload(locals())
      -        return self.session.get(f'{self.api_url}/get_license_id',
      -                                params=params,
      -                                headers=headers)
      -
      -    def get_organization_id(self,
      -                            license_id: int = None,
      -                            params: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -        ''' Returns organization ID by given license ID.
      -
      -            Args:
      -                license_id (int): License ID to get organization ID for.
      -                params (dict): Custom params to be used in request's query string.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if params is None:
      -            params = prepare_payload(locals())
      -        return self.session.get(f'{self.api_url}/get_organization_id',
      -                                params=params,
      -                                headers=headers)
      -
      -

      Ancestors

      -
        -
      • livechat.utils.http_client.HttpClient
      • -
      -

      Methods

      -
      -
      -def add_auto_access(self, access: dict = None, conditions: dict = None, description: str = None, next_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Creates an auto access data structure, which is a set of conditions -for the tracking URL and geolocation of a customer.

      -

      Args

      -
      -
      access : dict
      -
      Destination access.
      -
      conditions : dict
      -
      Conditions to check.
      -
      description : str
      -
      Description of the auto access.
      -
      next_id : str
      -
      ID of an existing auto access.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def add_auto_access(self,
      -                    access: dict = None,
      -                    conditions: dict = None,
      -                    description: str = None,
      -                    next_id: str = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -    ''' Creates an auto access data structure, which is a set of conditions
      -        for the tracking URL and geolocation of a customer.
      -
      -    Args:
      -        access (dict): Destination access.
      -        conditions (dict): Conditions to check.
      -        description (str):  Description of the auto access.
      -        next_id (str): ID of an existing auto access.
      -        payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -        headers (dict): Custom headers to be used with session headers.
      -                        They will be merged with session-level values that are set,
      -                        however, these method-level parameters will not be persisted across requests.
      -
      -    Returns:
      -        httpx.Response: The Response object from `httpx` library,
      -                        which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/add_auto_access',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def approve_agent(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Approves an Agent thus allowing the Agent to use the application.

      -

      Args

      -
      -
      id : str
      -
      Agent's ID.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def approve_agent(self,
      -                  id: str = None,
      -                  payload: dict = None,
      -                  headers: dict = None) -> httpx.Response:
      -    ''' Approves an Agent thus allowing the Agent to use the application.
      -
      -        Args:
      -            id (str): Agent's ID.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/approve_agent',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def create_agent(self, id: str = None, name: str = None, role: str = None, avatar_path: str = None, job_title: str = None, mobile: str = None, max_chats_count: int = None, awaiting_approval: bool = None, groups: list = None, notifications: list = None, email_subscriptions: list = None, work_scheduler: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Creates a new Agent with specified parameters within a license.

      -

      Args

      -
      -
      id : str
      -
      Agent's ID.
      -
      name : str
      -
      Agent's name.
      -
      role : str
      -
      Agent role, should be one of the following: -viceowner, administrator, normal (default).
      -
      avatar_path : str
      -
      URL path of the Agent's avatar.
      -
      job_title : str
      -
      Agent's job title.
      -
      mobile : str
      -
      Agent's mobile number.
      -
      max_chats_count : int
      -
      Agent's maximum number of concurrent chats.
      -
      awaiting_approval : bool
      -
      Determines if the Agent will be awaiting -approval after creation.
      -
      groups : list
      -
      Groups an Agent belongs to.
      -
      notifications : list
      -
      Represents which Agent notifications are turned on.
      -
      email_subscriptions : list
      -
      Represents which subscriptions will be send to -the Agent via email.
      -
      work_scheduler : dict
      -
      Work scheduler options to set for the new Agent.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def create_agent(self,
      -                 id: str = None,
      -                 name: str = None,
      -                 role: str = None,
      -                 avatar_path: str = None,
      -                 job_title: str = None,
      -                 mobile: str = None,
      -                 max_chats_count: int = None,
      -                 awaiting_approval: bool = None,
      -                 groups: list = None,
      -                 notifications: list = None,
      -                 email_subscriptions: list = None,
      -                 work_scheduler: dict = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -    ''' Creates a new Agent with specified parameters within a license.
      -
      -        Args:
      -            id (str): Agent's ID.
      -            name (str): Agent's name.
      -            role (str): Agent role, should be one of the following:
      -                        `viceowner`, `administrator`, `normal` (default).
      -            avatar_path (str): URL path of the Agent's avatar.
      -            job_title (str): Agent's job title.
      -            mobile (str): Agent's mobile number.
      -            max_chats_count (int): Agent's maximum number of concurrent chats.
      -            awaiting_approval (bool): Determines if the Agent will be awaiting
      -                                      approval after creation.
      -            groups (list): Groups an Agent belongs to.
      -            notifications (list): Represents which Agent notifications are turned on.
      -            email_subscriptions (list): Represents which subscriptions will be send to
      -                                       the Agent via email.
      -            work_scheduler (dict): Work scheduler options to set for the new Agent.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/create_agent',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def create_bot(self, name: str = None, avatar: str = None, max_chats_count: int = None, default_group_priority: str = None, job_title: str = None, groups: list = None, work_scheduler: dict = None, timezone: str = None, owner_client_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Creates a new Bot.

      -

      Args

      -
      -
      name : str
      -
      Display name.
      -
      avatar : str
      -
      Avatar URL.
      -
      max_chats_count : int
      -
      Max. number of incoming chats that can be routed to the Bot; default: 6.
      -
      default_group_priority : str
      -
      The default routing priority for a group without defined priority.
      -
      job_title : str
      -
      Bot's job title.
      -
      groups : list
      -
      Groups the Bot belongs to.
      -
      work_scheduler : dict
      -
      Work scheduler options to set for the new Bot.
      -
      timezone : str
      -
      The time zone in which the Bot's work scheduler should operate.
      -
      owner_client_id : str
      -
      Required only when authorizing via PATs. -The request will be rejected if you provide owner_client_id when authorizing with a Bearer Token.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def create_bot(self,
      -               name: str = None,
      -               avatar: str = None,
      -               max_chats_count: int = None,
      -               default_group_priority: str = None,
      -               job_title: str = None,
      -               groups: list = None,
      -               work_scheduler: dict = None,
      -               timezone: str = None,
      -               owner_client_id: str = None,
      -               payload: dict = None,
      -               headers: dict = None) -> httpx.Response:
      -    ''' Creates a new Bot.
      -
      -        Args:
      -            name (str): Display name.
      -            avatar (str): Avatar URL.
      -            max_chats_count (int): Max. number of incoming chats that can be routed to the Bot; default: 6.
      -            default_group_priority (str): The default routing priority for a group without defined priority.
      -            job_title (str): Bot's job title.
      -            groups (list): Groups the Bot belongs to.
      -            work_scheduler (dict): Work scheduler options to set for the new Bot.
      -            timezone (str): The time zone in which the Bot's work scheduler should operate.
      -            owner_client_id (str): Required only when authorizing via PATs.
      -                            The request will be rejected if you provide owner_client_id when authorizing with a Bearer Token.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/create_bot',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def create_group(self, name: str = None, language_code: str = None, agent_priorities: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Creates a new group.

      -

      Args

      -
      -
      name : str
      -
      Group name (up to 180 chars).
      -
      language_code : str
      -
      The code of the group languange.
      -
      agent_priorities : dict
      -
      Agents' priorities in a group as a map in the "": "" format.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def create_group(self,
      -                 name: str = None,
      -                 language_code: str = None,
      -                 agent_priorities: dict = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -    ''' Creates a new group.
      -
      -        Args:
      -            name (str): Group name (up to 180 chars).
      -            language_code (str): The code of the group languange.
      -            agent_priorities (dict): Agents' priorities in a group as a map in the "<id>": "<priority>" format.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/create_group',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def delete_agent(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Deletes an Agent specified by id.

      -

      Args

      -
      -
      id : str
      -
      Agent's ID.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def delete_agent(self,
      -                 id: str = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -    ''' Deletes an Agent specified by `id`.
      -
      -        Args:
      -            id (str): Agent's ID.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/delete_agent',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def delete_auto_access(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Deletes an existing auto access data structure specified by its ID.

      -

      Args

      -
      -
      id : str
      -
      Auto access ID.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def delete_auto_access(self,
      -                       id: str = None,
      -                       payload: dict = None,
      -                       headers: dict = None) -> httpx.Response:
      -    ''' Deletes an existing auto access data structure specified by its ID.
      -
      -        Args:
      -            id (str): Auto access ID.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/delete_auto_access',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def delete_bot(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Deletes a Bot.

      -

      Args

      -
      -
      id : str
      -
      Bot's ID.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def delete_bot(self,
      -               id: str = None,
      -               payload: dict = None,
      -               headers: dict = None) -> httpx.Response:
      -    ''' Deletes a Bot.
      -
      -        Args:
      -            id (str): Bot's ID.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/delete_bot',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def delete_group(self, id: int = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Deletes an existing group.

      -

      Args

      -
      -
      id : int
      -
      Groups' ID.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def delete_group(self,
      -                 id: int = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -    ''' Deletes an existing group.
      -
      -        Args:
      -            id (int): Groups' ID.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/delete_group',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def delete_group_properties(self, id: int = None, properties: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Deletes the properties set within a group.

      -

      Args

      -
      -
      id : int
      -
      ID of the group you delete properties from.
      -
      properties : dict
      -
      An object with namespaces as keys and property_names (in an array) as values.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def delete_group_properties(self,
      -                            id: int = None,
      -                            properties: dict = None,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -    ''' Deletes the properties set within a group.
      -
      -        Args:
      -            id (int): ID of the group you delete properties from.
      -            properties (dict): An object with namespaces as keys and property_names (in an array) as values.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/delete_group_properties',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def delete_license_properties(self, properties: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Deletes the properties set within a license.

      -

      Args

      -
      -
      properties : dict
      -
      An object with namespaces as keys and property_names (in an array) as values.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def delete_license_properties(self,
      -                              properties: dict = None,
      -                              payload: dict = None,
      -                              headers: dict = None) -> httpx.Response:
      -    ''' Deletes the properties set within a license.
      -
      -        Args:
      -            properties (dict): An object with namespaces as keys and property_names (in an array) as values.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/delete_license_properties',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def disable_license_webhooks(self, owner_client_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Disables the enabled webhooks.

      -

      Args

      -
      -
      owner_client_id : str
      -
      Required when authorizing via PATs; ignored otherwise.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def disable_license_webhooks(self,
      -                             owner_client_id: str = None,
      -                             payload: dict = None,
      -                             headers: dict = None) -> httpx.Response:
      -    ''' Disables the enabled webhooks.
      -
      -        Args:
      -            owner_client_id (str): Required when authorizing via PATs; ignored otherwise.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/disable_license_webhooks',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def enable_license_webhooks(self, owner_client_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Enables the webhooks registered for a given Client ID (application) -for the license associated with the access token used in the request.

      -

      Args

      -
      -
      owner_client_id : str
      -
      The webhook owner (the Client ID for which the webhook is registered).
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def enable_license_webhooks(self,
      -                            owner_client_id: str = None,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -    ''' Enables the webhooks registered for a given Client ID (application)
      -        for the license associated with the access token used in the request.
      -
      -        Args:
      -            owner_client_id (str): The webhook owner (the Client ID for which the webhook is registered).
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/enable_license_webhooks',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def get_agent(self, id: str = None, fields: list = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns the info about an Agent specified by id.

      -

      Args

      -
      -
      id : str
      -
      Agent's ID.
      -
      fields : list
      -
      Additional fields to include.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def get_agent(self,
      -              id: str = None,
      -              fields: list = None,
      -              payload: dict = None,
      -              headers: dict = None) -> httpx.Response:
      -    ''' Returns the info about an Agent specified by `id`.
      -
      -        Args:
      -            id (str): Agent's ID.
      -            fields (list): Additional fields to include.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/get_agent',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def get_bot(self, id: str = None, fields: list = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Gets a Bot specified by id.

      -

      Args

      -
      -
      id : str
      -
      Bot's ID.
      -
      fields : list
      -
      Additional Bot fields to include.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def get_bot(self,
      -            id: str = None,
      -            fields: list = None,
      -            payload: dict = None,
      -            headers: dict = None) -> httpx.Response:
      -    ''' Gets a Bot specified by `id`.
      -
      -        Args:
      -            id (str): Bot's ID.
      -            fields (list): Additional Bot fields to include.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/get_bot',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def get_group(self, id: int = None, fields: list = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns details about a group specified by its id.

      -

      Args

      -
      -
      id : int
      -
      Groups' ID.
      -
      fields : list
      -
      Additional fields to include.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def get_group(self,
      -              id: int = None,
      -              fields: list = None,
      -              payload: dict = None,
      -              headers: dict = None) -> httpx.Response:
      -    ''' Returns details about a group specified by its id.
      -
      -        Args:
      -            id (int): Groups' ID.
      -            fields (list): Additional fields to include.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/get_group',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def get_license_id(self, organization_id: str = None, params: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns license ID by given organization ID.

      -

      Args

      -
      -
      organization_id : str
      -
      Organization ID to get license ID for.
      -
      params : dict
      -
      Custom params to be used in request's query string. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def get_license_id(self,
      -                   organization_id: str = None,
      -                   params: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -    ''' Returns license ID by given organization ID.
      -
      -        Args:
      -            organization_id (str): Organization ID to get license ID for.
      -            params (dict): Custom params to be used in request's query string.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if params is None:
      -        params = prepare_payload(locals())
      -    return self.session.get(f'{self.api_url}/get_license_id',
      -                            params=params,
      -                            headers=headers)
      -
      -
      -
      -def get_license_webhooks_state(self, owner_client_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Gets the state of the webhooks registered for a given Client ID (application) -on the license associated with the access token used in the request.

      -

      Args

      -
      -
      owner_client_id : str
      -
      Required when authorizing via PATs; ignored otherwise.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def get_license_webhooks_state(self,
      -                               owner_client_id: str = None,
      -                               payload: dict = None,
      -                               headers: dict = None) -> httpx.Response:
      -    ''' Gets the state of the webhooks registered for a given Client ID (application)
      -        on the license associated with the access token used in the request.
      -
      -        Args:
      -            owner_client_id (str): Required when authorizing via PATs; ignored otherwise.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/get_license_webhooks_state',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def get_organization_id(self, license_id: int = None, params: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns organization ID by given license ID.

      -

      Args

      -
      -
      license_id : int
      -
      License ID to get organization ID for.
      -
      params : dict
      -
      Custom params to be used in request's query string. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def get_organization_id(self,
      -                        license_id: int = None,
      -                        params: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -    ''' Returns organization ID by given license ID.
      -
      -        Args:
      -            license_id (int): License ID to get organization ID for.
      -            params (dict): Custom params to be used in request's query string.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if params is None:
      -        params = prepare_payload(locals())
      -    return self.session.get(f'{self.api_url}/get_organization_id',
      -                            params=params,
      -                            headers=headers)
      -
      -
      -
      -def list_agents(self, filters: dict = None, fields: list = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns all Agents within a license.

      -

      Args

      -
      -
      filters : dict
      -
      Possible request filters.
      -
      fields : list
      -
      Additional fields to include.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_agents(self,
      -                filters: dict = None,
      -                fields: list = None,
      -                payload: dict = None,
      -                headers: dict = None) -> httpx.Response:
      -    ''' Returns all Agents within a license.
      -
      -        Args:
      -            filters (dict): Possible request filters.
      -            fields (list): Additional fields to include.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/list_agents',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def list_auto_accesses(self, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns all existing auto access data structures.

      -

      Args

      -
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns: -httpx.Response: The Response object from httpx library, -which contains a server’s response to an HTTP request.

      -
      - -Expand source code - -
      def list_auto_accesses(self,
      -                       payload: dict = None,
      -                       headers: dict = None) -> httpx.Response:
      -    ''' Returns all existing auto access data structures.
      -
      -    Args:
      -        payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -        headers (dict): Custom headers to be used with session headers.
      -                        They will be merged with session-level values that are set,
      -                        however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/list_auto_accesses',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def list_bots(self, all: bool = None, fields: list = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns the list of Bots created within a license.

      -

      Args

      -
      -
      all : bool
      -
      True gets all Bots within a license. False (default) returns only the requester's Bots.
      -
      fields : list
      -
      Additional Bot fields to include.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_bots(self,
      -              all: bool = None,
      -              fields: list = None,
      -              payload: dict = None,
      -              headers: dict = None) -> httpx.Response:
      -    ''' Returns the list of Bots created within a license.
      -
      -        Args:
      -            all (bool): `True` gets all Bots within a license. `False` (default) returns only the requester's Bots.
      -            fields (list): Additional Bot fields to include.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/list_bots',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def list_group_properties(self, id: int = None, namespace: str = None, name_prefix: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns the properties set within a group.

      -

      Args

      -
      -
      id : int
      -
      ID of the group you retrieve properties from.
      -
      namespace : str
      -
      Properties namespace.
      -
      name_prefix : str
      -
      Properties name prefix.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_group_properties(self,
      -                          id: int = None,
      -                          namespace: str = None,
      -                          name_prefix: str = None,
      -                          payload: dict = None,
      -                          headers: dict = None) -> httpx.Response:
      -    ''' Returns the properties set within a group.
      -
      -        Args:
      -            id (int): ID of the group you retrieve properties from.
      -            namespace (str): Properties namespace.
      -            name_prefix (str): Properties name prefix.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/list_group_properties',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def list_groups(self, fields: list = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Lists all the exisiting groups.

      -

      Args

      -
      -
      fields : list
      -
      Additional fields to include.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_groups(self,
      -                fields: list = None,
      -                payload: dict = None,
      -                headers: dict = None) -> httpx.Response:
      -    ''' Lists all the exisiting groups.
      -
      -        Args:
      -            fields (list): Additional fields to include.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/list_groups',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def list_license_properties(self, namespace: str = None, name_prefix: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns the properties set within a license.

      -

      Args

      -
      -
      namespace : str
      -
      Properties namespace.
      -
      name_prefix : str
      -
      Properties name prefix.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_license_properties(self,
      -                            namespace: str = None,
      -                            name_prefix: str = None,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -    ''' Returns the properties set within a license.
      -
      -        Args:
      -            namespace (str): Properties namespace.
      -            name_prefix (str): Properties name prefix.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/list_license_properties',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def list_properties(self, owner_client_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Lists private and public properties owned by a given Client ID.

      -

      Args

      -
      -
      owner_client_id : str
      -
      Client ID that will own the property; must be owned by your organization.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_properties(self,
      -                    owner_client_id: str = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -    ''' Lists private and public properties owned by a given Client ID.
      -
      -        Args:
      -            owner_client_id (str): Client ID that will own the property; must be owned by your organization.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/list_properties',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def list_webhook_names(self, version: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Lists all webhooks that are supported in a given API version. This method requires no authorization.

      -

      Args

      -
      -
      version : str
      -
      API's version. Defaults to the current stable API version.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_webhook_names(self,
      -                       version: str = None,
      -                       payload: dict = None,
      -                       headers: dict = None) -> httpx.Response:
      -    ''' Lists all webhooks that are supported in a given API version. This method requires no authorization.
      -
      -        Args:
      -            version (str): API's version. Defaults to the current stable API version.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/list_webhook_names',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def list_webhooks(self, owner_client_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Lists all webhooks registered for the given Client ID.

      -

      Args

      -
      -
      owner_client_id : str
      -
      The webhook owner (the Client ID for which the webhook is registered).
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_webhooks(self,
      -                  owner_client_id: str = None,
      -                  payload: dict = None,
      -                  headers: dict = None) -> httpx.Response:
      -    ''' Lists all webhooks registered for the given Client ID.
      -
      -        Args:
      -            owner_client_id (str): The webhook owner (the Client ID for which the webhook is registered).
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/list_webhooks',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def publish_property(self, name: str = None, owner_client_id: str = None, access_type: list = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Publishes a private property.

      -

      Args

      -
      -
      name : str
      -
      Property name.
      -
      owner_client_id : str
      -
      Client ID that will own the property; must be owned by your organization.
      -
      access_type : list
      -
      Possible values: read, write.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def publish_property(self,
      -                     name: str = None,
      -                     owner_client_id: str = None,
      -                     access_type: list = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -    ''' Publishes a private property.
      -
      -        Args:
      -            name (str): Property name.
      -            owner_client_id (str): Client ID that will own the property; must be owned by your organization.
      -            access_type (list): Possible values: `read`, `write`.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/publish_property',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def register_property(self, name: str = None, owner_client_id: str = None, type: str = None, access: dict = None, description: str = None, domain: list = None, range: dict = None, default_value: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Registers a new private property for a given Client ID.

      -

      Args

      -
      -
      name : str
      -
      Property name.
      -
      owner_client_id : str
      -
      Client ID that will own the property; must be owned by your organization.
      -
      type : str
      -
      Possible values: int, string, bool, and tokenized_string.
      -
      access : dict
      -
      Destination access.
      -
      description : str
      -
      Property description.
      -
      domain : list
      -
      Array of values that properties can be set to.
      -
      range : dict
      -
      Range of values that properties can be set to.
      -
      default_value : str
      -
      Default value of property; validated by domain or range, if one exists.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def register_property(self,
      -                      name: str = None,
      -                      owner_client_id: str = None,
      -                      type: str = None,
      -                      access: dict = None,
      -                      description: str = None,
      -                      domain: list = None,
      -                      range: dict = None,
      -                      default_value: str = None,
      -                      payload: dict = None,
      -                      headers: dict = None) -> httpx.Response:
      -    ''' Registers a new private property for a given Client ID.
      -
      -        Args:
      -            name (str): Property name.
      -            owner_client_id (str): Client ID that will own the property; must be owned by your organization.
      -            type (str):  Possible values: `int`, `string`, `bool`, and `tokenized_string`.
      -            access (dict): Destination access.
      -            description (str): Property description.
      -            domain (list): Array of values that properties can be set to.
      -            range (dict): Range of values that properties can be set to.
      -            default_value (str): Default value of property; validated by domain or range, if one exists.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/register_property',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def register_webhook(self, action: str = None, secret_key: str = None, url: str = None, additional_data: list = None, description: str = None, filters: dict = None, owner_client_id: str = None, type: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Registers a webhook for the Client ID (application) provided in the request.

      -

      Args

      -
      -
      action : str
      -
      The action that triggers sending a webhook.
      -
      secret_key : str
      -
      The secret key sent in webhooks to verify the source of a webhook.
      -
      url : str
      -
      Destination URL for the webhook.
      -
      additional_data : list
      -
      Additional data arriving with the webhook.
      -
      description : str
      -
      -

      Webhook description.

      -
      -
      filters : dict
      -
      Filters to check if a webhook should be triggered.
      -
      owner_client_id : str
      -
      The Client ID for which the webhook will be registered.
      -
      type : str
      -
      bot or license.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def register_webhook(self,
      -                     action: str = None,
      -                     secret_key: str = None,
      -                     url: str = None,
      -                     additional_data: list = None,
      -                     description: str = None,
      -                     filters: dict = None,
      -                     owner_client_id: str = None,
      -                     type: str = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -    ''' Registers a webhook for the Client ID (application) provided in the request.
      -
      -        Args:
      -            action (str): The action that triggers sending a webhook.
      -            secret_key (str): The secret key sent in webhooks to verify the source of a webhook.
      -            url (str): Destination URL for the webhook.
      -            additional_data (list): Additional data arriving with the webhook.
      -            description (str):      Webhook description.
      -            filters (dict): Filters to check if a webhook should be triggered.
      -            owner_client_id (str): The Client ID for which the webhook will be registered.
      -            type (str): `bot` or `license`.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/register_webhook',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def request_agent_unsuspension(self, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      A suspended Agent can send emails to license owners and vice owners -with an unsuspension request.

      -

      Args

      -
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def request_agent_unsuspension(self,
      -                               payload: dict = None,
      -                               headers: dict = None) -> httpx.Response:
      -    ''' A suspended Agent can send emails to license owners and vice owners
      -        with an unsuspension request.
      -
      -        Args:
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/request_agent_unsuspension',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def suspend_agent(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Suspends an Agent specified by id.

      -

      Args

      -
      -
      id : str
      -
      Agent's ID.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def suspend_agent(self,
      -                  id: str = None,
      -                  payload: dict = None,
      -                  headers: dict = None) -> httpx.Response:
      -    ''' Suspends an Agent specified by `id`.
      -
      -        Args:
      -            id (str): Agent's ID.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/suspend_agent',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def unregister_property(self, name: str = None, owner_client_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Unregisters a private property.

      -

      Args

      -
      -
      name : str
      -
      Property name.
      -
      owner_client_id : str
      -
      Client ID that will own the property; must be owned by your organization.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def unregister_property(self,
      -                        name: str = None,
      -                        owner_client_id: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -    ''' Unregisters a private property.
      -
      -        Args:
      -            name (str): Property name.
      -            owner_client_id (str): Client ID that will own the property; must be owned by your organization.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/unregister_property',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def unregister_webhook(self, id: str = None, owner_client_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Unregisters a webhook previously registered for a Client ID (application).

      -

      Args

      -
      -
      id : str
      -
      Webhook's ID.
      -
      owner_client_id : str
      -
      The webhook owner (the Client ID for which the webhook is registered).
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def unregister_webhook(self,
      -                       id: str = None,
      -                       owner_client_id: str = None,
      -                       payload: dict = None,
      -                       headers: dict = None) -> httpx.Response:
      -    ''' Unregisters a webhook previously registered for a Client ID (application).
      -
      -        Args:
      -            id (str): Webhook's ID.
      -            owner_client_id (str): The webhook owner (the Client ID for which the webhook is registered).
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/unregister_webhook',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def unsuspend_agent(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Unsuspends an Agent specified by id.

      -

      Args

      -
      -
      id : str
      -
      Agent's ID.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def unsuspend_agent(self,
      -                    id: str = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -    ''' Unsuspends an Agent specified by `id`.
      -
      -        Args:
      -            id (str): Agent's ID.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/unsuspend_agent',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def update_agent(self, id: str = None, name: str = None, role: str = None, avatar_path: str = None, job_title: str = None, mobile: str = None, max_chats_count: int = None, groups: list = None, notifications: list = None, email_subscriptions: list = None, work_scheduler: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Updates the properties of an Agent specified by id.

      -

      Args

      -
      -
      id : str
      -
      Agent's ID.
      -
      name : str
      -
      Agent's name.
      -
      role : str
      -
      Agent role, should be one of the following: -viceowner, administrator, normal (default).
      -
      avatar_path : str
      -
      URL path of the Agent's avatar.
      -
      job_title : str
      -
      Agent's job title.
      -
      mobile : str
      -
      Agent's mobile number.
      -
      max_chats_count : int
      -
      Agent's maximum number of concurrent chats.
      -
      groups : list
      -
      Groups an Agent belongs to.
      -
      notifications : list
      -
      Represents which Agent notifications are turned on.
      -
      email_subscriptions : list
      -
      Represents which subscriptions will be send to -the Agent via email.
      -
      work_scheduler : dict
      -
      Work scheduler options to set for the new Agent.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def update_agent(self,
      -                 id: str = None,
      -                 name: str = None,
      -                 role: str = None,
      -                 avatar_path: str = None,
      -                 job_title: str = None,
      -                 mobile: str = None,
      -                 max_chats_count: int = None,
      -                 groups: list = None,
      -                 notifications: list = None,
      -                 email_subscriptions: list = None,
      -                 work_scheduler: dict = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -    ''' Updates the properties of an Agent specified by `id`.
      -
      -        Args:
      -            id (str): Agent's ID.
      -            name (str): Agent's name.
      -            role (str): Agent role, should be one of the following:
      -                        `viceowner`, `administrator`, `normal` (default).
      -            avatar_path (str): URL path of the Agent's avatar.
      -            job_title (str): Agent's job title.
      -            mobile (str): Agent's mobile number.
      -            max_chats_count (int): Agent's maximum number of concurrent chats.
      -            groups (list): Groups an Agent belongs to.
      -            notifications (list): Represents which Agent notifications are turned on.
      -            email_subscriptions (list): Represents which subscriptions will be send to
      -                                       the Agent via email.
      -            work_scheduler (dict): Work scheduler options to set for the new Agent.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/update_agent',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def update_auto_access(self, id: str = None, next_id: str = None, access: dict = None, conditions: dict = None, description: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Moves an existing auto access data structure, specified by id, -before another one, specified by next_id.

      -

      Args

      -
      -
      id : str
      -
      ID of the auto access to move.
      -
      next_id : str
      -
      ID of the auto access that should follow the moved auto access.
      -
      access : dict
      -
      Destination access.
      -
      conditions : dict
      -
      Conditions to check.
      -
      description : str
      -
      Description of the auto access.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def update_auto_access(self,
      -                       id: str = None,
      -                       next_id: str = None,
      -                       access: dict = None,
      -                       conditions: dict = None,
      -                       description: str = None,
      -                       payload: dict = None,
      -                       headers: dict = None) -> httpx.Response:
      -    ''' Moves an existing auto access data structure, specified by id,
      -        before another one, specified by next_id.
      -
      -        Args:
      -            id (str): ID of the auto access to move.
      -            next_id (str): ID of the auto access that should follow the moved auto access.
      -            access (dict): Destination access.
      -            conditions (dict): Conditions to check.
      -            description (str): Description of the auto access.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/update_auto_access',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def update_bot(self, id: str = None, name: str = None, avatar: str = None, max_chats_count: int = None, default_group_priority: str = None, groups: list = None, webhooks: dict = None, work_scheduler: dict = None, timezone: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Updates an existing Bot.

      -

      Args

      -
      -
      id : str
      -
      Bot's ID.
      -
      name : str
      -
      Display name.
      -
      avatar : str
      -
      Avatar URL.
      -
      max_chats_count : int
      -
      Max. number of incoming chats that can be routed to the Bot.
      -
      default_group_priority : str
      -
      The default routing priority for a group without defined priority.
      -
      groups : list
      -
      Groups the Bot belongs to.
      -
      webhooks : dict
      -
      Webhooks sent to the Bot.
      -
      work_scheduler : dict
      -
      Work scheduler options to set for the new Bot.
      -
      timezone : str
      -
      The time zone in which the Bot's work scheduler should operate.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def update_bot(self,
      -               id: str = None,
      -               name: str = None,
      -               avatar: str = None,
      -               max_chats_count: int = None,
      -               default_group_priority: str = None,
      -               groups: list = None,
      -               webhooks: dict = None,
      -               work_scheduler: dict = None,
      -               timezone: str = None,
      -               payload: dict = None,
      -               headers: dict = None) -> httpx.Response:
      -    ''' Updates an existing Bot.
      -
      -        Args:
      -            id (str): Bot's ID.
      -            name (str): Display name.
      -            avatar (str): Avatar URL.
      -            max_chats_count (int): Max. number of incoming chats that can be routed to the Bot.
      -            default_group_priority (str): The default routing priority for a group without defined priority.
      -            groups (list): Groups the Bot belongs to.
      -            webhooks (dict): Webhooks sent to the Bot.
      -            work_scheduler (dict): Work scheduler options to set for the new Bot.
      -            timezone (str): The time zone in which the Bot's work scheduler should operate.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/update_bot',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def update_group(self, id: int = None, name: str = None, language_code: str = None, agent_priorities: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Updates an existing group.

      -

      Args

      -
      -
      id : int
      -
      Groups' ID.
      -
      name : str
      -
      Group name (up to 180 chars).
      -
      language_code : str
      -
      The code of the group languange.
      -
      agent_priorities : dict
      -
      Agents' priorities in a group as a map in the "": "" format.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def update_group(self,
      -                 id: int = None,
      -                 name: str = None,
      -                 language_code: str = None,
      -                 agent_priorities: dict = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -    ''' Updates an existing group.
      -
      -        Args:
      -            id (int): Groups' ID.
      -            name (str): Group name (up to 180 chars).
      -            language_code (str): The code of the group languange.
      -            agent_priorities (dict): Agents' priorities in a group as a map in the "<id>": "<priority>" format.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/update_group',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def update_group_properties(self, group_id: int = None, properties: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Updates a property value within a group as the property location. -This operation doesn't overwrite the existing values.

      -

      Args

      -
      -
      group_id : int
      -
      ID of the group you set the properties for.
      -
      properties : dict
      -
      An object with namespaces as keys and properties (grouped in objects) as values.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def update_group_properties(self,
      -                            group_id: int = None,
      -                            properties: dict = None,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -    ''' Updates a property value within a group as the property location.
      -        This operation doesn't overwrite the existing values.
      -
      -        Args:
      -            group_id (int): ID of the group you set the properties for.
      -            properties (dict): An object with namespaces as keys and properties (grouped in objects) as values.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/update_group_properties',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def update_license_properties(self, properties: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Updates a property value within a license. This operation doesn't -overwrite the existing values.

      -

      Args

      -
      -
      properties : dict
      -
      An object with namespaces as keys and properties (grouped in objects) as values.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def update_license_properties(self,
      -                              properties: dict = None,
      -                              payload: dict = None,
      -                              headers: dict = None) -> httpx.Response:
      -    ''' Updates a property value within a license. This operation doesn't
      -        overwrite the existing values.
      -
      -        Args:
      -            properties (dict): An object with namespaces as keys and properties (grouped in objects) as values.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/update_license_properties',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -
      -
      -
      -
      - -
      - - - \ No newline at end of file diff --git a/docs/configuration/base.html b/docs/configuration/base.html index 308eb9b..1f50a17 100644 --- a/docs/configuration/base.html +++ b/docs/configuration/base.html @@ -40,7 +40,6 @@

      Module livechat.configuration.base

      import httpx from livechat.config import CONFIG -from livechat.configuration.api.v34 import ConfigurationApiV34 from livechat.configuration.api.v35 import ConfigurationApiV35 from livechat.configuration.api.v36 import ConfigurationApiV36 from livechat.configuration.api.v37 import ConfigurationApiV37 @@ -63,7 +62,7 @@

      Module livechat.configuration.base

      verify: bool = True, disable_logging: bool = False, timeout: float = httpx.Timeout(15) - ) -> Union[ConfigurationApiV34, ConfigurationApiV35, ConfigurationApiV36, + ) -> Union[ConfigurationApiV35, ConfigurationApiV36, ConfigurationApiV37]: ''' Returns client for specific Configuration API version. @@ -90,9 +89,6 @@

      Module livechat.configuration.base

      ValueError: If the specified version does not exist. ''' client = { - '3.4': - ConfigurationApiV34(token, base_url, http2, proxies, verify, - disable_logging, timeout), '3.5': ConfigurationApiV35(token, base_url, http2, proxies, verify, disable_logging, timeout), @@ -140,7 +136,7 @@

      Classes

      verify: bool = True, disable_logging: bool = False, timeout: float = httpx.Timeout(15) - ) -> Union[ConfigurationApiV34, ConfigurationApiV35, ConfigurationApiV36, + ) -> Union[ConfigurationApiV35, ConfigurationApiV36, ConfigurationApiV37]: ''' Returns client for specific Configuration API version. @@ -167,9 +163,6 @@

      Classes

      ValueError: If the specified version does not exist. ''' client = { - '3.4': - ConfigurationApiV34(token, base_url, http2, proxies, verify, - disable_logging, timeout), '3.5': ConfigurationApiV35(token, base_url, http2, proxies, verify, disable_logging, timeout), @@ -187,7 +180,7 @@

      Classes

      Static methods

      -def get_client(token: Union[AccessToken, str], version: str = '3.6', base_url: str = 'api.livechatinc.com', http2: bool = False, proxies: dict = None, verify: bool = True, disable_logging: bool = False, timeout: float = Timeout(timeout=15)) ‑> Union[ConfigurationApiV34, ConfigurationApiV35, ConfigurationApiV36, ConfigurationApiV37] +def get_client(token: Union[AccessToken, str], version: str = '3.6', base_url: str = 'api.livechatinc.com', http2: bool = False, proxies: dict = None, verify: bool = True, disable_logging: bool = False, timeout: float = Timeout(timeout=15)) ‑> Union[ConfigurationApiV35, ConfigurationApiV36, ConfigurationApiV37]

      Returns client for specific Configuration API version.

      @@ -240,7 +233,7 @@

      Raises

      verify: bool = True, disable_logging: bool = False, timeout: float = httpx.Timeout(15) -) -> Union[ConfigurationApiV34, ConfigurationApiV35, ConfigurationApiV36, +) -> Union[ConfigurationApiV35, ConfigurationApiV36, ConfigurationApiV37]: ''' Returns client for specific Configuration API version. @@ -267,9 +260,6 @@

      Raises

      ValueError: If the specified version does not exist. ''' client = { - '3.4': - ConfigurationApiV34(token, base_url, http2, proxies, verify, - disable_logging, timeout), '3.5': ConfigurationApiV35(token, base_url, http2, proxies, verify, disable_logging, timeout), diff --git a/docs/customer/rtm/api/index.html b/docs/customer/rtm/api/index.html index b5a09fa..625430c 100644 --- a/docs/customer/rtm/api/index.html +++ b/docs/customer/rtm/api/index.html @@ -26,10 +26,6 @@

      Module livechat.customer.rtm.api

      Sub-modules

      -
      livechat.customer.rtm.api.v34
      -
      -

      Customer RTM API module with client class in version 3.4.

      -
      livechat.customer.rtm.api.v35

      Customer RTM API module with client class in version 3.5.

      @@ -64,7 +60,6 @@

      Index

    • Sub-modules

        -
      • livechat.customer.rtm.api.v34
      • livechat.customer.rtm.api.v35
      • livechat.customer.rtm.api.v36
      • livechat.customer.rtm.api.v37
      • diff --git a/docs/customer/rtm/api/v34.html b/docs/customer/rtm/api/v34.html deleted file mode 100644 index 66e035d..0000000 --- a/docs/customer/rtm/api/v34.html +++ /dev/null @@ -1,2813 +0,0 @@ - - - - - - -livechat.customer.rtm.api.v34 API documentation - - - - - - - - - - - -
        -
        -
        -

        Module livechat.customer.rtm.api.v34

        -
        -
        -

        Customer RTM API module with client class in version 3.4.

        -
        - -Expand source code - -
        ''' Customer RTM API module with client class in version 3.4. '''
        -
        -# pylint: disable=C0103,R0903,R0913,W0107,W0231,W0613,W0622
        -
        -from typing import Callable, Optional, Union
        -
        -from livechat.utils.helpers import prepare_payload
        -from livechat.utils.structures import AccessToken, RtmResponse
        -from livechat.utils.ws_client import WebsocketClient
        -
        -
        -class CustomerRtmV34:
        -    ''' Customer RTM API client class in version 3.4. '''
        -    def __init__(
        -        self,
        -        organization_id: str,
        -        base_url: str,
        -        header: Union[list, dict, Callable, None],
        -    ):
        -        if isinstance(organization_id, str):
        -            self.ws = WebsocketClient(
        -                url=
        -                f'wss://{base_url}/v3.4/customer/rtm/ws?organization_id={organization_id}',
        -                header=header)
        -        else:
        -            raise ValueError(
        -                f'Provided `organization_id` (`{organization_id}`) seems invalid. Websocket connection may not open.'
        -            )
        -
        -    def open_connection(self,
        -                        origin: dict = None,
        -                        ping_timeout: Union[float, int] = 3,
        -                        ping_interval: Union[float, int] = 5,
        -                        ws_conn_timeout: Union[float, int] = 10,
        -                        keep_alive: bool = True,
        -                        response_timeout: Union[float, int] = 3) -> None:
        -        ''' Opens WebSocket connection.
        -
        -            Args:
        -                origin (dict): Specifies origin while creating websocket connection.
        -                ping_timeout (int or float): timeout (in seconds) if the pong message is not received,
        -                    by default sets to 3 seconds.
        -                ping_interval (int or float): automatically sends "ping" command every specified period (in seconds).
        -                    If set to 0, no ping is sent periodically, by default sets to 5 seconds.
        -                ws_conn_timeout (int or float): timeout (in seconds) to wait for WebSocket connection,
        -                    by default sets to 10 seconds.
        -                keep_alive(bool): Bool which states if connection should be kept, by default sets to `True`.
        -                response_timeout (int or float): timeout (in seconds) to wait for the response,
        -                    by default sets to 3 seconds.
        -        '''
        -        self.ws.open(origin, ping_timeout, ping_interval, ws_conn_timeout,
        -                     keep_alive, response_timeout)
        -
        -    def close_connection(self) -> None:
        -        ''' Closes WebSocket connection. '''
        -        self.ws.close()
        -
        -# Chats
        -
        -    def list_chats(self,
        -                   limit: int = None,
        -                   sort_order: str = None,
        -                   page_id: str = None,
        -                   payload: dict = None) -> RtmResponse:
        -        ''' It returns summaries of the chats a Customer participated in.
        -
        -            Args:
        -                limit (int): Chat limit. Default: 10, maximum: 25.
        -                sort_order (str): Possible values: asc, desc (default). Chat summaries are sorted by the
        -                        creation date of its last thread.
        -                page_id (str): Page ID.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'list_chats', 'payload': payload})
        -
        -    def list_threads(self,
        -                     chat_id: str = None,
        -                     sort_order: str = None,
        -                     limit: int = None,
        -                     page_id: str = None,
        -                     min_events_count: int = None,
        -                     payload: dict = None) -> RtmResponse:
        -        ''' It returns threads that the current Customer has access to in a given chat.
        -
        -            Args:
        -                chat_id (str): Chat ID to get threads from.
        -                sort_order (str): Possible values: asc - oldest threads first and desc
        -                        newest threads first (default).
        -                limit (int): Default: 3, maximum: 100.
        -                page_id (str): Page ID.
        -                min_events_count (int):Range: 1-100; Specifies the minimum number of
        -                        events to be returned in the response.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'list_threads', 'payload': payload})
        -
        -    def get_chat(self,
        -                 chat_id: str = None,
        -                 thread_id: str = None,
        -                 payload: dict = None) -> RtmResponse:
        -        ''' It returns a thread that the current Customer has access to in a given chat.
        -
        -            Args:
        -                chat_id (str): ID of a chat to get.
        -                thread_id (str): Thread ID to get. Default: the latest thread (if exists).
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'get_chat', 'payload': payload})
        -
        -    def start_chat(self,
        -                   chat: dict = None,
        -                   active: bool = None,
        -                   continuous: bool = None,
        -                   payload: dict = None) -> RtmResponse:
        -        ''' Starts a chat.
        -
        -            Args:
        -                chat (dict): Chat object.
        -                active (bool): When set to False, creates an inactive thread; default: True.
        -                continuous (bool): Starts chat as continuous (online group is not required); default: False.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'start_chat', 'payload': payload})
        -
        -    def resume_chat(self,
        -                    chat: dict = None,
        -                    active: bool = None,
        -                    continuous: bool = None,
        -                    payload: dict = None) -> RtmResponse:
        -        ''' Restarts an archived chat.
        -
        -            Args:
        -                chat (dict): Chat object.
        -                active (bool): When set to false, creates an inactive thread; default: true.
        -                continuous (bool): Sets a chat to the continuous mode. When unset, leaves the mode unchanged.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'resume_chat', 'payload': payload})
        -
        -    def deactivate_chat(self,
        -                        id: str = None,
        -                        payload: dict = None) -> RtmResponse:
        -        ''' Deactivates a chat by closing the currently open thread.
        -
        -            Args:
        -                id (str): Chat ID to deactivate.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'deactivate_chat', 'payload': payload})
        -
        -# Events
        -
        -    def send_event(self,
        -                   chat_id: str = None,
        -                   event: dict = None,
        -                   attach_to_last_thread: bool = None,
        -                   payload: dict = None) -> RtmResponse:
        -        ''' Sends an Event object.
        -
        -            Args:
        -                chat_id (str): ID of the chat you want to send the message to.
        -                event (dict): Event object.
        -                attach_to_last_thread (bool): Flag which states if event object should be added to last thread.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'send_event', 'payload': payload})
        -
        -    def send_rich_message_postback(self,
        -                                   chat_id: str = None,
        -                                   thread_id: str = None,
        -                                   event_id: str = None,
        -                                   postback: dict = None,
        -                                   payload: dict = None) -> RtmResponse:
        -        ''' Sends rich message postback.
        -
        -            Args:
        -                chat_id (str): ID of the chat to send a rich message to.
        -                thread_id (str): ID of the thread.
        -                event_id (str): ID of the event.
        -                postback (dict): Postback object.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'send_rich_message_postback',
        -            'payload': payload
        -        })
        -
        -    def send_sneak_peek(self,
        -                        chat_id: str = None,
        -                        sneak_peek_text: str = None,
        -                        payload: dict = None) -> RtmResponse:
        -        ''' Sends a sneak peek to a chat.
        -
        -            Args:
        -                chat_id (str): ID of the chat to send a sneak peek to.
        -                sneak_peek_text (str): Sneak peek text.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'send_sneak_peek', 'payload': payload})
        -
        -# Properties
        -
        -    def update_chat_properties(self,
        -                               id: str = None,
        -                               properties: dict = None,
        -                               payload: dict = None) -> RtmResponse:
        -        ''' Updates chat properties.
        -
        -            Args:
        -                id (str): ID of the chat you to set a property for.
        -                properties (dict): Chat properties to set.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'update_chat_properties',
        -            'payload': payload
        -        })
        -
        -    def delete_chat_properties(self,
        -                               id: str = None,
        -                               properties: dict = None,
        -                               payload: dict = None) -> RtmResponse:
        -        ''' Deletes chat properties.
        -
        -            Args:
        -                id (str): ID of the chat you want to delete properties of.
        -                properties (dict): Chat properties to delete.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'delete_chat_properties',
        -            'payload': payload
        -        })
        -
        -    def update_thread_properties(self,
        -                                 chat_id: str = None,
        -                                 thread_id: str = None,
        -                                 properties: dict = None,
        -                                 payload: dict = None) -> RtmResponse:
        -        ''' Updates thread properties.
        -
        -            Args:
        -                chat_id (str): ID of the chat you want to set properties for.
        -                thread_id (str): ID of the thread you want to set properties for.
        -                properties (dict): Chat properties to set.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'update_thread_properties',
        -            'payload': payload
        -        })
        -
        -    def delete_thread_properties(self,
        -                                 chat_id: str = None,
        -                                 thread_id: str = None,
        -                                 properties: dict = None,
        -                                 payload: dict = None) -> RtmResponse:
        -        ''' Deletes thread properties.
        -
        -            Args:
        -                chat_id (str): ID of the chat you want to delete the properties of.
        -                thread_id (str): ID of the thread you want to delete the properties of.
        -                properties (dict): Thread properties to delete.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'delete_thread_properties',
        -            'payload': payload
        -        })
        -
        -    def update_event_properties(self,
        -                                chat_id: str = None,
        -                                thread_id: str = None,
        -                                event_id: str = None,
        -                                properties: dict = None,
        -                                payload: dict = None) -> RtmResponse:
        -        ''' Updates event properties.
        -
        -            Args:
        -                chat_id (str): ID of the chat you want to set properties for.
        -                thread_id (str): ID of the thread you want to set properties for.
        -                event_id (str): ID of the event you want to set properties for.
        -                properties (dict): Chat properties to set.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'update_event_properties',
        -            'payload': payload
        -        })
        -
        -    def delete_event_properties(self,
        -                                chat_id: str = None,
        -                                thread_id: str = None,
        -                                event_id: str = None,
        -                                properties: dict = None,
        -                                payload: dict = None) -> RtmResponse:
        -        ''' Deletes event properties.
        -
        -            Args:
        -                chat_id (str): ID of the chat you want to delete the properties of.
        -                thread_id (str): ID of the thread you want to delete the properties of.
        -                event_id (str): ID of the event you want to delete the properties of.
        -                properties (dict): Event properties to delete.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'delete_event_properties',
        -            'payload': payload
        -        })
        -
        -# Customers
        -
        -    def update_customer(self,
        -                        name: str = None,
        -                        email: str = None,
        -                        avatar: str = None,
        -                        session_fields: list = None,
        -                        payload: dict = None) -> RtmResponse:
        -        ''' Updates customer's properties.
        -
        -            Args:
        -                name (str): Customer`s name.
        -                email (str): Customer`s email.
        -                avatar (str): Customer`s avatar.
        -                session_fields (list): An array of custom object-enclosed key:value pairs.
        -                        Respects the order of items.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'update_customer', 'payload': payload})
        -
        -    def update_customer_page(self,
        -                             url: str = None,
        -                             title: str = None,
        -                             payload: dict = None) -> RtmResponse:
        -        ''' Updates customer's page.
        -
        -            Args:
        -                url (str): Customer`s url.
        -                title (str): Customer`s page title.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'update_customer_page',
        -            'payload': payload
        -        })
        -
        -    def set_customer_session_fields(self,
        -                                    session_fields: list = None,
        -                                    payload: dict = None) -> RtmResponse:
        -        ''' Sets customer's session fields.
        -
        -            Args:
        -                session_fields (list): List of custom object-enclosed key:value pairs.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'set_customer_session_fields',
        -            'payload': payload
        -        })
        -
        -    def get_customer(self, payload: dict = None) -> RtmResponse:
        -        ''' Returns the info about the customer requesting it.
        -
        -            Args:
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        return self.ws.send({
        -            'action': 'get_customer',
        -            'payload': {} if payload is None else payload
        -        })
        -
        -# Status
        -
        -    def login(self,
        -              token: Optional[Union[AccessToken, str]] = None,
        -              payload: dict = None) -> RtmResponse:
        -        ''' Logs in customer.
        -
        -            Args:
        -                token (str) : OAuth token from the Customer's account.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if token:
        -            token = str(token)
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'login', 'payload': payload})
        -
        -    def list_group_statuses(self,
        -                            all: bool = None,
        -                            group_ids: list = None,
        -                            payload: dict = None) -> RtmResponse:
        -        ''' Lists statuses of groups.
        -
        -            Args:
        -                all (bool): If set to True, you will get statuses of all the groups.
        -                group_ids (list): A table of a groups' IDs.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'list_group_statuses',
        -            'payload': payload
        -        })
        -
        -
        -# Other
        -
        -    def get_form(self,
        -                 group_id: int = None,
        -                 type: str = None,
        -                 payload: dict = None) -> RtmResponse:
        -        ''' Returns an empty ticket form of a prechat or postchat survey.
        -
        -            Args:
        -                group_id (int): ID of the group from which you want the form.
        -                type (str): Form type. Possible values: prechat or postchat.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'get_form', 'payload': payload})
        -
        -    def get_predicted_agent(self, payload: dict = None) -> RtmResponse:
        -        ''' Gets the predicted Agent - the one the Customer will chat with when the chat starts.
        -
        -            Args:
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        return self.ws.send({
        -            'action': 'get_predicted_agent',
        -            'payload': {} if payload is None else payload
        -        })
        -
        -    def get_url_info(self,
        -                     url: str = None,
        -                     payload: dict = None) -> RtmResponse:
        -        ''' It returns the info on a given URL.
        -
        -            Args:
        -                url (str): URL to get info about.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'get_url_info', 'payload': payload})
        -
        -    def mark_events_as_seen(self,
        -                            chat_id: str = None,
        -                            seen_up_to: str = None,
        -                            payload: dict = None) -> RtmResponse:
        -        ''' Marks events as seen by agent.
        -
        -            Args:
        -                chat_id (str): Chat to mark events.
        -                seen_up_to (str): Date up to which mark events - RFC 3339 date-time format.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'mark_events_as_seen',
        -            'payload': payload
        -        })
        -
        -    def accept_greeting(self,
        -                        greeting_id: int = None,
        -                        unique_id: str = None,
        -                        payload: dict = None) -> RtmResponse:
        -        ''' Marks an incoming greeting as seen.
        -
        -            Args:
        -                greeting_id (int): Number representing type of a greeting.
        -                unique_id (str): Specific greeting event ID.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'accept_greeting', 'payload': payload})
        -
        -    def cancel_greeting(self,
        -                        unique_id: str = None,
        -                        payload: dict = None) -> RtmResponse:
        -        ''' Cancels a greeting.
        -
        -            Args:
        -                unique_id (str): Specific greeting event ID.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'cancel_greeting', 'payload': payload})
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -

        Classes

        -
        -
        -class CustomerRtmV34 -(organization_id: str, base_url: str, header: Union[list, dict, Callable, None]) -
        -
        -

        Customer RTM API client class in version 3.4.

        -
        - -Expand source code - -
        class CustomerRtmV34:
        -    ''' Customer RTM API client class in version 3.4. '''
        -    def __init__(
        -        self,
        -        organization_id: str,
        -        base_url: str,
        -        header: Union[list, dict, Callable, None],
        -    ):
        -        if isinstance(organization_id, str):
        -            self.ws = WebsocketClient(
        -                url=
        -                f'wss://{base_url}/v3.4/customer/rtm/ws?organization_id={organization_id}',
        -                header=header)
        -        else:
        -            raise ValueError(
        -                f'Provided `organization_id` (`{organization_id}`) seems invalid. Websocket connection may not open.'
        -            )
        -
        -    def open_connection(self,
        -                        origin: dict = None,
        -                        ping_timeout: Union[float, int] = 3,
        -                        ping_interval: Union[float, int] = 5,
        -                        ws_conn_timeout: Union[float, int] = 10,
        -                        keep_alive: bool = True,
        -                        response_timeout: Union[float, int] = 3) -> None:
        -        ''' Opens WebSocket connection.
        -
        -            Args:
        -                origin (dict): Specifies origin while creating websocket connection.
        -                ping_timeout (int or float): timeout (in seconds) if the pong message is not received,
        -                    by default sets to 3 seconds.
        -                ping_interval (int or float): automatically sends "ping" command every specified period (in seconds).
        -                    If set to 0, no ping is sent periodically, by default sets to 5 seconds.
        -                ws_conn_timeout (int or float): timeout (in seconds) to wait for WebSocket connection,
        -                    by default sets to 10 seconds.
        -                keep_alive(bool): Bool which states if connection should be kept, by default sets to `True`.
        -                response_timeout (int or float): timeout (in seconds) to wait for the response,
        -                    by default sets to 3 seconds.
        -        '''
        -        self.ws.open(origin, ping_timeout, ping_interval, ws_conn_timeout,
        -                     keep_alive, response_timeout)
        -
        -    def close_connection(self) -> None:
        -        ''' Closes WebSocket connection. '''
        -        self.ws.close()
        -
        -# Chats
        -
        -    def list_chats(self,
        -                   limit: int = None,
        -                   sort_order: str = None,
        -                   page_id: str = None,
        -                   payload: dict = None) -> RtmResponse:
        -        ''' It returns summaries of the chats a Customer participated in.
        -
        -            Args:
        -                limit (int): Chat limit. Default: 10, maximum: 25.
        -                sort_order (str): Possible values: asc, desc (default). Chat summaries are sorted by the
        -                        creation date of its last thread.
        -                page_id (str): Page ID.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'list_chats', 'payload': payload})
        -
        -    def list_threads(self,
        -                     chat_id: str = None,
        -                     sort_order: str = None,
        -                     limit: int = None,
        -                     page_id: str = None,
        -                     min_events_count: int = None,
        -                     payload: dict = None) -> RtmResponse:
        -        ''' It returns threads that the current Customer has access to in a given chat.
        -
        -            Args:
        -                chat_id (str): Chat ID to get threads from.
        -                sort_order (str): Possible values: asc - oldest threads first and desc
        -                        newest threads first (default).
        -                limit (int): Default: 3, maximum: 100.
        -                page_id (str): Page ID.
        -                min_events_count (int):Range: 1-100; Specifies the minimum number of
        -                        events to be returned in the response.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'list_threads', 'payload': payload})
        -
        -    def get_chat(self,
        -                 chat_id: str = None,
        -                 thread_id: str = None,
        -                 payload: dict = None) -> RtmResponse:
        -        ''' It returns a thread that the current Customer has access to in a given chat.
        -
        -            Args:
        -                chat_id (str): ID of a chat to get.
        -                thread_id (str): Thread ID to get. Default: the latest thread (if exists).
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'get_chat', 'payload': payload})
        -
        -    def start_chat(self,
        -                   chat: dict = None,
        -                   active: bool = None,
        -                   continuous: bool = None,
        -                   payload: dict = None) -> RtmResponse:
        -        ''' Starts a chat.
        -
        -            Args:
        -                chat (dict): Chat object.
        -                active (bool): When set to False, creates an inactive thread; default: True.
        -                continuous (bool): Starts chat as continuous (online group is not required); default: False.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'start_chat', 'payload': payload})
        -
        -    def resume_chat(self,
        -                    chat: dict = None,
        -                    active: bool = None,
        -                    continuous: bool = None,
        -                    payload: dict = None) -> RtmResponse:
        -        ''' Restarts an archived chat.
        -
        -            Args:
        -                chat (dict): Chat object.
        -                active (bool): When set to false, creates an inactive thread; default: true.
        -                continuous (bool): Sets a chat to the continuous mode. When unset, leaves the mode unchanged.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'resume_chat', 'payload': payload})
        -
        -    def deactivate_chat(self,
        -                        id: str = None,
        -                        payload: dict = None) -> RtmResponse:
        -        ''' Deactivates a chat by closing the currently open thread.
        -
        -            Args:
        -                id (str): Chat ID to deactivate.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'deactivate_chat', 'payload': payload})
        -
        -# Events
        -
        -    def send_event(self,
        -                   chat_id: str = None,
        -                   event: dict = None,
        -                   attach_to_last_thread: bool = None,
        -                   payload: dict = None) -> RtmResponse:
        -        ''' Sends an Event object.
        -
        -            Args:
        -                chat_id (str): ID of the chat you want to send the message to.
        -                event (dict): Event object.
        -                attach_to_last_thread (bool): Flag which states if event object should be added to last thread.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'send_event', 'payload': payload})
        -
        -    def send_rich_message_postback(self,
        -                                   chat_id: str = None,
        -                                   thread_id: str = None,
        -                                   event_id: str = None,
        -                                   postback: dict = None,
        -                                   payload: dict = None) -> RtmResponse:
        -        ''' Sends rich message postback.
        -
        -            Args:
        -                chat_id (str): ID of the chat to send a rich message to.
        -                thread_id (str): ID of the thread.
        -                event_id (str): ID of the event.
        -                postback (dict): Postback object.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'send_rich_message_postback',
        -            'payload': payload
        -        })
        -
        -    def send_sneak_peek(self,
        -                        chat_id: str = None,
        -                        sneak_peek_text: str = None,
        -                        payload: dict = None) -> RtmResponse:
        -        ''' Sends a sneak peek to a chat.
        -
        -            Args:
        -                chat_id (str): ID of the chat to send a sneak peek to.
        -                sneak_peek_text (str): Sneak peek text.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'send_sneak_peek', 'payload': payload})
        -
        -# Properties
        -
        -    def update_chat_properties(self,
        -                               id: str = None,
        -                               properties: dict = None,
        -                               payload: dict = None) -> RtmResponse:
        -        ''' Updates chat properties.
        -
        -            Args:
        -                id (str): ID of the chat you to set a property for.
        -                properties (dict): Chat properties to set.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'update_chat_properties',
        -            'payload': payload
        -        })
        -
        -    def delete_chat_properties(self,
        -                               id: str = None,
        -                               properties: dict = None,
        -                               payload: dict = None) -> RtmResponse:
        -        ''' Deletes chat properties.
        -
        -            Args:
        -                id (str): ID of the chat you want to delete properties of.
        -                properties (dict): Chat properties to delete.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'delete_chat_properties',
        -            'payload': payload
        -        })
        -
        -    def update_thread_properties(self,
        -                                 chat_id: str = None,
        -                                 thread_id: str = None,
        -                                 properties: dict = None,
        -                                 payload: dict = None) -> RtmResponse:
        -        ''' Updates thread properties.
        -
        -            Args:
        -                chat_id (str): ID of the chat you want to set properties for.
        -                thread_id (str): ID of the thread you want to set properties for.
        -                properties (dict): Chat properties to set.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'update_thread_properties',
        -            'payload': payload
        -        })
        -
        -    def delete_thread_properties(self,
        -                                 chat_id: str = None,
        -                                 thread_id: str = None,
        -                                 properties: dict = None,
        -                                 payload: dict = None) -> RtmResponse:
        -        ''' Deletes thread properties.
        -
        -            Args:
        -                chat_id (str): ID of the chat you want to delete the properties of.
        -                thread_id (str): ID of the thread you want to delete the properties of.
        -                properties (dict): Thread properties to delete.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'delete_thread_properties',
        -            'payload': payload
        -        })
        -
        -    def update_event_properties(self,
        -                                chat_id: str = None,
        -                                thread_id: str = None,
        -                                event_id: str = None,
        -                                properties: dict = None,
        -                                payload: dict = None) -> RtmResponse:
        -        ''' Updates event properties.
        -
        -            Args:
        -                chat_id (str): ID of the chat you want to set properties for.
        -                thread_id (str): ID of the thread you want to set properties for.
        -                event_id (str): ID of the event you want to set properties for.
        -                properties (dict): Chat properties to set.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'update_event_properties',
        -            'payload': payload
        -        })
        -
        -    def delete_event_properties(self,
        -                                chat_id: str = None,
        -                                thread_id: str = None,
        -                                event_id: str = None,
        -                                properties: dict = None,
        -                                payload: dict = None) -> RtmResponse:
        -        ''' Deletes event properties.
        -
        -            Args:
        -                chat_id (str): ID of the chat you want to delete the properties of.
        -                thread_id (str): ID of the thread you want to delete the properties of.
        -                event_id (str): ID of the event you want to delete the properties of.
        -                properties (dict): Event properties to delete.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'delete_event_properties',
        -            'payload': payload
        -        })
        -
        -# Customers
        -
        -    def update_customer(self,
        -                        name: str = None,
        -                        email: str = None,
        -                        avatar: str = None,
        -                        session_fields: list = None,
        -                        payload: dict = None) -> RtmResponse:
        -        ''' Updates customer's properties.
        -
        -            Args:
        -                name (str): Customer`s name.
        -                email (str): Customer`s email.
        -                avatar (str): Customer`s avatar.
        -                session_fields (list): An array of custom object-enclosed key:value pairs.
        -                        Respects the order of items.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'update_customer', 'payload': payload})
        -
        -    def update_customer_page(self,
        -                             url: str = None,
        -                             title: str = None,
        -                             payload: dict = None) -> RtmResponse:
        -        ''' Updates customer's page.
        -
        -            Args:
        -                url (str): Customer`s url.
        -                title (str): Customer`s page title.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'update_customer_page',
        -            'payload': payload
        -        })
        -
        -    def set_customer_session_fields(self,
        -                                    session_fields: list = None,
        -                                    payload: dict = None) -> RtmResponse:
        -        ''' Sets customer's session fields.
        -
        -            Args:
        -                session_fields (list): List of custom object-enclosed key:value pairs.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'set_customer_session_fields',
        -            'payload': payload
        -        })
        -
        -    def get_customer(self, payload: dict = None) -> RtmResponse:
        -        ''' Returns the info about the customer requesting it.
        -
        -            Args:
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        return self.ws.send({
        -            'action': 'get_customer',
        -            'payload': {} if payload is None else payload
        -        })
        -
        -# Status
        -
        -    def login(self,
        -              token: Optional[Union[AccessToken, str]] = None,
        -              payload: dict = None) -> RtmResponse:
        -        ''' Logs in customer.
        -
        -            Args:
        -                token (str) : OAuth token from the Customer's account.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if token:
        -            token = str(token)
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'login', 'payload': payload})
        -
        -    def list_group_statuses(self,
        -                            all: bool = None,
        -                            group_ids: list = None,
        -                            payload: dict = None) -> RtmResponse:
        -        ''' Lists statuses of groups.
        -
        -            Args:
        -                all (bool): If set to True, you will get statuses of all the groups.
        -                group_ids (list): A table of a groups' IDs.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'list_group_statuses',
        -            'payload': payload
        -        })
        -
        -
        -# Other
        -
        -    def get_form(self,
        -                 group_id: int = None,
        -                 type: str = None,
        -                 payload: dict = None) -> RtmResponse:
        -        ''' Returns an empty ticket form of a prechat or postchat survey.
        -
        -            Args:
        -                group_id (int): ID of the group from which you want the form.
        -                type (str): Form type. Possible values: prechat or postchat.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'get_form', 'payload': payload})
        -
        -    def get_predicted_agent(self, payload: dict = None) -> RtmResponse:
        -        ''' Gets the predicted Agent - the one the Customer will chat with when the chat starts.
        -
        -            Args:
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        return self.ws.send({
        -            'action': 'get_predicted_agent',
        -            'payload': {} if payload is None else payload
        -        })
        -
        -    def get_url_info(self,
        -                     url: str = None,
        -                     payload: dict = None) -> RtmResponse:
        -        ''' It returns the info on a given URL.
        -
        -            Args:
        -                url (str): URL to get info about.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'get_url_info', 'payload': payload})
        -
        -    def mark_events_as_seen(self,
        -                            chat_id: str = None,
        -                            seen_up_to: str = None,
        -                            payload: dict = None) -> RtmResponse:
        -        ''' Marks events as seen by agent.
        -
        -            Args:
        -                chat_id (str): Chat to mark events.
        -                seen_up_to (str): Date up to which mark events - RFC 3339 date-time format.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({
        -            'action': 'mark_events_as_seen',
        -            'payload': payload
        -        })
        -
        -    def accept_greeting(self,
        -                        greeting_id: int = None,
        -                        unique_id: str = None,
        -                        payload: dict = None) -> RtmResponse:
        -        ''' Marks an incoming greeting as seen.
        -
        -            Args:
        -                greeting_id (int): Number representing type of a greeting.
        -                unique_id (str): Specific greeting event ID.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'accept_greeting', 'payload': payload})
        -
        -    def cancel_greeting(self,
        -                        unique_id: str = None,
        -                        payload: dict = None) -> RtmResponse:
        -        ''' Cancels a greeting.
        -
        -            Args:
        -                unique_id (str): Specific greeting event ID.
        -                payload (dict): Custom payload to be used as request's data.
        -                        It overrides all other parameters provided for the method.
        -
        -            Returns:
        -                RtmResponse: RTM response structure (`request_id`, `action`,
        -                             `type`, `success` and `payload` properties)
        -        '''
        -        if payload is None:
        -            payload = prepare_payload(locals())
        -        return self.ws.send({'action': 'cancel_greeting', 'payload': payload})
        -
        -

        Methods

        -
        -
        -def accept_greeting(self, greeting_id: int = None, unique_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Marks an incoming greeting as seen.

        -

        Args

        -
        -
        greeting_id : int
        -
        Number representing type of a greeting.
        -
        unique_id : str
        -
        Specific greeting event ID.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def accept_greeting(self,
        -                    greeting_id: int = None,
        -                    unique_id: str = None,
        -                    payload: dict = None) -> RtmResponse:
        -    ''' Marks an incoming greeting as seen.
        -
        -        Args:
        -            greeting_id (int): Number representing type of a greeting.
        -            unique_id (str): Specific greeting event ID.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({'action': 'accept_greeting', 'payload': payload})
        -
        -
        -
        -def cancel_greeting(self, unique_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Cancels a greeting.

        -

        Args

        -
        -
        unique_id : str
        -
        Specific greeting event ID.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def cancel_greeting(self,
        -                    unique_id: str = None,
        -                    payload: dict = None) -> RtmResponse:
        -    ''' Cancels a greeting.
        -
        -        Args:
        -            unique_id (str): Specific greeting event ID.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({'action': 'cancel_greeting', 'payload': payload})
        -
        -
        -
        -def close_connection(self) ‑> None -
        -
        -

        Closes WebSocket connection.

        -
        - -Expand source code - -
        def close_connection(self) -> None:
        -    ''' Closes WebSocket connection. '''
        -    self.ws.close()
        -
        -
        -
        -def deactivate_chat(self, id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Deactivates a chat by closing the currently open thread.

        -

        Args

        -
        -
        id : str
        -
        Chat ID to deactivate.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def deactivate_chat(self,
        -                    id: str = None,
        -                    payload: dict = None) -> RtmResponse:
        -    ''' Deactivates a chat by closing the currently open thread.
        -
        -        Args:
        -            id (str): Chat ID to deactivate.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({'action': 'deactivate_chat', 'payload': payload})
        -
        -
        -
        -def delete_chat_properties(self, id: str = None, properties: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Deletes chat properties.

        -

        Args

        -
        -
        id : str
        -
        ID of the chat you want to delete properties of.
        -
        properties : dict
        -
        Chat properties to delete.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def delete_chat_properties(self,
        -                           id: str = None,
        -                           properties: dict = None,
        -                           payload: dict = None) -> RtmResponse:
        -    ''' Deletes chat properties.
        -
        -        Args:
        -            id (str): ID of the chat you want to delete properties of.
        -            properties (dict): Chat properties to delete.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({
        -        'action': 'delete_chat_properties',
        -        'payload': payload
        -    })
        -
        -
        -
        -def delete_event_properties(self, chat_id: str = None, thread_id: str = None, event_id: str = None, properties: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Deletes event properties.

        -

        Args

        -
        -
        chat_id : str
        -
        ID of the chat you want to delete the properties of.
        -
        thread_id : str
        -
        ID of the thread you want to delete the properties of.
        -
        event_id : str
        -
        ID of the event you want to delete the properties of.
        -
        properties : dict
        -
        Event properties to delete.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def delete_event_properties(self,
        -                            chat_id: str = None,
        -                            thread_id: str = None,
        -                            event_id: str = None,
        -                            properties: dict = None,
        -                            payload: dict = None) -> RtmResponse:
        -    ''' Deletes event properties.
        -
        -        Args:
        -            chat_id (str): ID of the chat you want to delete the properties of.
        -            thread_id (str): ID of the thread you want to delete the properties of.
        -            event_id (str): ID of the event you want to delete the properties of.
        -            properties (dict): Event properties to delete.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({
        -        'action': 'delete_event_properties',
        -        'payload': payload
        -    })
        -
        -
        -
        -def delete_thread_properties(self, chat_id: str = None, thread_id: str = None, properties: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Deletes thread properties.

        -

        Args

        -
        -
        chat_id : str
        -
        ID of the chat you want to delete the properties of.
        -
        thread_id : str
        -
        ID of the thread you want to delete the properties of.
        -
        properties : dict
        -
        Thread properties to delete.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def delete_thread_properties(self,
        -                             chat_id: str = None,
        -                             thread_id: str = None,
        -                             properties: dict = None,
        -                             payload: dict = None) -> RtmResponse:
        -    ''' Deletes thread properties.
        -
        -        Args:
        -            chat_id (str): ID of the chat you want to delete the properties of.
        -            thread_id (str): ID of the thread you want to delete the properties of.
        -            properties (dict): Thread properties to delete.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({
        -        'action': 'delete_thread_properties',
        -        'payload': payload
        -    })
        -
        -
        -
        -def get_chat(self, chat_id: str = None, thread_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        It returns a thread that the current Customer has access to in a given chat.

        -

        Args

        -
        -
        chat_id : str
        -
        ID of a chat to get.
        -
        thread_id : str
        -
        Thread ID to get. Default: the latest thread (if exists).
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def get_chat(self,
        -             chat_id: str = None,
        -             thread_id: str = None,
        -             payload: dict = None) -> RtmResponse:
        -    ''' It returns a thread that the current Customer has access to in a given chat.
        -
        -        Args:
        -            chat_id (str): ID of a chat to get.
        -            thread_id (str): Thread ID to get. Default: the latest thread (if exists).
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({'action': 'get_chat', 'payload': payload})
        -
        -
        -
        -def get_customer(self, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Returns the info about the customer requesting it.

        -

        Args

        -
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def get_customer(self, payload: dict = None) -> RtmResponse:
        -    ''' Returns the info about the customer requesting it.
        -
        -        Args:
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    return self.ws.send({
        -        'action': 'get_customer',
        -        'payload': {} if payload is None else payload
        -    })
        -
        -
        -
        -def get_form(self, group_id: int = None, type: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Returns an empty ticket form of a prechat or postchat survey.

        -

        Args

        -
        -
        group_id : int
        -
        ID of the group from which you want the form.
        -
        type : str
        -
        Form type. Possible values: prechat or postchat.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def get_form(self,
        -             group_id: int = None,
        -             type: str = None,
        -             payload: dict = None) -> RtmResponse:
        -    ''' Returns an empty ticket form of a prechat or postchat survey.
        -
        -        Args:
        -            group_id (int): ID of the group from which you want the form.
        -            type (str): Form type. Possible values: prechat or postchat.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({'action': 'get_form', 'payload': payload})
        -
        -
        -
        -def get_predicted_agent(self, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Gets the predicted Agent - the one the Customer will chat with when the chat starts.

        -

        Args

        -
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def get_predicted_agent(self, payload: dict = None) -> RtmResponse:
        -    ''' Gets the predicted Agent - the one the Customer will chat with when the chat starts.
        -
        -        Args:
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    return self.ws.send({
        -        'action': 'get_predicted_agent',
        -        'payload': {} if payload is None else payload
        -    })
        -
        -
        -
        -def get_url_info(self, url: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        It returns the info on a given URL.

        -

        Args

        -
        -
        url : str
        -
        URL to get info about.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def get_url_info(self,
        -                 url: str = None,
        -                 payload: dict = None) -> RtmResponse:
        -    ''' It returns the info on a given URL.
        -
        -        Args:
        -            url (str): URL to get info about.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({'action': 'get_url_info', 'payload': payload})
        -
        -
        -
        -def list_chats(self, limit: int = None, sort_order: str = None, page_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        It returns summaries of the chats a Customer participated in.

        -

        Args

        -
        -
        limit : int
        -
        Chat limit. Default: 10, maximum: 25.
        -
        sort_order : str
        -
        Possible values: asc, desc (default). Chat summaries are sorted by the -creation date of its last thread.
        -
        page_id : str
        -
        Page ID.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def list_chats(self,
        -               limit: int = None,
        -               sort_order: str = None,
        -               page_id: str = None,
        -               payload: dict = None) -> RtmResponse:
        -    ''' It returns summaries of the chats a Customer participated in.
        -
        -        Args:
        -            limit (int): Chat limit. Default: 10, maximum: 25.
        -            sort_order (str): Possible values: asc, desc (default). Chat summaries are sorted by the
        -                    creation date of its last thread.
        -            page_id (str): Page ID.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({'action': 'list_chats', 'payload': payload})
        -
        -
        -
        -def list_group_statuses(self, all: bool = None, group_ids: list = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Lists statuses of groups.

        -

        Args

        -
        -
        all : bool
        -
        If set to True, you will get statuses of all the groups.
        -
        group_ids : list
        -
        A table of a groups' IDs.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def list_group_statuses(self,
        -                        all: bool = None,
        -                        group_ids: list = None,
        -                        payload: dict = None) -> RtmResponse:
        -    ''' Lists statuses of groups.
        -
        -        Args:
        -            all (bool): If set to True, you will get statuses of all the groups.
        -            group_ids (list): A table of a groups' IDs.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({
        -        'action': 'list_group_statuses',
        -        'payload': payload
        -    })
        -
        -
        -
        -def list_threads(self, chat_id: str = None, sort_order: str = None, limit: int = None, page_id: str = None, min_events_count: int = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        It returns threads that the current Customer has access to in a given chat.

        -

        Args

        -
        -
        chat_id : str
        -
        Chat ID to get threads from.
        -
        sort_order : str
        -
        Possible values: asc - oldest threads first and desc -newest threads first (default).
        -
        limit : int
        -
        Default: 3, maximum: 100.
        -
        page_id : str
        -
        Page ID.
        -
        min_events_count (int):Range: 1-100; Specifies the minimum number of
        -
        events to be returned in the response.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def list_threads(self,
        -                 chat_id: str = None,
        -                 sort_order: str = None,
        -                 limit: int = None,
        -                 page_id: str = None,
        -                 min_events_count: int = None,
        -                 payload: dict = None) -> RtmResponse:
        -    ''' It returns threads that the current Customer has access to in a given chat.
        -
        -        Args:
        -            chat_id (str): Chat ID to get threads from.
        -            sort_order (str): Possible values: asc - oldest threads first and desc
        -                    newest threads first (default).
        -            limit (int): Default: 3, maximum: 100.
        -            page_id (str): Page ID.
        -            min_events_count (int):Range: 1-100; Specifies the minimum number of
        -                    events to be returned in the response.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({'action': 'list_threads', 'payload': payload})
        -
        -
        -
        -def login(self, token: Union[livechat.utils.structures.AccessToken, str, None] = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Logs in customer.

        -

        Args

        -
        -
        token (str) : OAuth token from the Customer's account.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def login(self,
        -          token: Optional[Union[AccessToken, str]] = None,
        -          payload: dict = None) -> RtmResponse:
        -    ''' Logs in customer.
        -
        -        Args:
        -            token (str) : OAuth token from the Customer's account.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if token:
        -        token = str(token)
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({'action': 'login', 'payload': payload})
        -
        -
        -
        -def mark_events_as_seen(self, chat_id: str = None, seen_up_to: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Marks events as seen by agent.

        -

        Args

        -
        -
        chat_id : str
        -
        Chat to mark events.
        -
        seen_up_to : str
        -
        Date up to which mark events - RFC 3339 date-time format.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def mark_events_as_seen(self,
        -                        chat_id: str = None,
        -                        seen_up_to: str = None,
        -                        payload: dict = None) -> RtmResponse:
        -    ''' Marks events as seen by agent.
        -
        -        Args:
        -            chat_id (str): Chat to mark events.
        -            seen_up_to (str): Date up to which mark events - RFC 3339 date-time format.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({
        -        'action': 'mark_events_as_seen',
        -        'payload': payload
        -    })
        -
        -
        -
        -def open_connection(self, origin: dict = None, ping_timeout: Union[float, int] = 3, ping_interval: Union[float, int] = 5, ws_conn_timeout: Union[float, int] = 10, keep_alive: bool = True, response_timeout: Union[float, int] = 3) ‑> None -
        -
        -

        Opens WebSocket connection.

        -

        Args

        -
        -
        origin : dict
        -
        Specifies origin while creating websocket connection.
        -
        ping_timeout : int or float
        -
        timeout (in seconds) if the pong message is not received, -by default sets to 3 seconds.
        -
        ping_interval : int or float
        -
        automatically sends "ping" command every specified period (in seconds). -If set to 0, no ping is sent periodically, by default sets to 5 seconds.
        -
        ws_conn_timeout : int or float
        -
        timeout (in seconds) to wait for WebSocket connection, -by default sets to 10 seconds.
        -
        keep_alive(bool): Bool which states if connection should be kept, by default sets to True.
        -
        response_timeout : int or float
        -
        timeout (in seconds) to wait for the response, -by default sets to 3 seconds.
        -
        -
        - -Expand source code - -
        def open_connection(self,
        -                    origin: dict = None,
        -                    ping_timeout: Union[float, int] = 3,
        -                    ping_interval: Union[float, int] = 5,
        -                    ws_conn_timeout: Union[float, int] = 10,
        -                    keep_alive: bool = True,
        -                    response_timeout: Union[float, int] = 3) -> None:
        -    ''' Opens WebSocket connection.
        -
        -        Args:
        -            origin (dict): Specifies origin while creating websocket connection.
        -            ping_timeout (int or float): timeout (in seconds) if the pong message is not received,
        -                by default sets to 3 seconds.
        -            ping_interval (int or float): automatically sends "ping" command every specified period (in seconds).
        -                If set to 0, no ping is sent periodically, by default sets to 5 seconds.
        -            ws_conn_timeout (int or float): timeout (in seconds) to wait for WebSocket connection,
        -                by default sets to 10 seconds.
        -            keep_alive(bool): Bool which states if connection should be kept, by default sets to `True`.
        -            response_timeout (int or float): timeout (in seconds) to wait for the response,
        -                by default sets to 3 seconds.
        -    '''
        -    self.ws.open(origin, ping_timeout, ping_interval, ws_conn_timeout,
        -                 keep_alive, response_timeout)
        -
        -
        -
        -def resume_chat(self, chat: dict = None, active: bool = None, continuous: bool = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Restarts an archived chat.

        -

        Args

        -
        -
        chat : dict
        -
        Chat object.
        -
        active : bool
        -
        When set to false, creates an inactive thread; default: true.
        -
        continuous : bool
        -
        Sets a chat to the continuous mode. When unset, leaves the mode unchanged.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def resume_chat(self,
        -                chat: dict = None,
        -                active: bool = None,
        -                continuous: bool = None,
        -                payload: dict = None) -> RtmResponse:
        -    ''' Restarts an archived chat.
        -
        -        Args:
        -            chat (dict): Chat object.
        -            active (bool): When set to false, creates an inactive thread; default: true.
        -            continuous (bool): Sets a chat to the continuous mode. When unset, leaves the mode unchanged.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({'action': 'resume_chat', 'payload': payload})
        -
        -
        -
        -def send_event(self, chat_id: str = None, event: dict = None, attach_to_last_thread: bool = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Sends an Event object.

        -

        Args

        -
        -
        chat_id : str
        -
        ID of the chat you want to send the message to.
        -
        event : dict
        -
        Event object.
        -
        attach_to_last_thread : bool
        -
        Flag which states if event object should be added to last thread.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def send_event(self,
        -               chat_id: str = None,
        -               event: dict = None,
        -               attach_to_last_thread: bool = None,
        -               payload: dict = None) -> RtmResponse:
        -    ''' Sends an Event object.
        -
        -        Args:
        -            chat_id (str): ID of the chat you want to send the message to.
        -            event (dict): Event object.
        -            attach_to_last_thread (bool): Flag which states if event object should be added to last thread.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({'action': 'send_event', 'payload': payload})
        -
        -
        -
        -def send_rich_message_postback(self, chat_id: str = None, thread_id: str = None, event_id: str = None, postback: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Sends rich message postback.

        -

        Args

        -
        -
        chat_id : str
        -
        ID of the chat to send a rich message to.
        -
        thread_id : str
        -
        ID of the thread.
        -
        event_id : str
        -
        ID of the event.
        -
        postback : dict
        -
        Postback object.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def send_rich_message_postback(self,
        -                               chat_id: str = None,
        -                               thread_id: str = None,
        -                               event_id: str = None,
        -                               postback: dict = None,
        -                               payload: dict = None) -> RtmResponse:
        -    ''' Sends rich message postback.
        -
        -        Args:
        -            chat_id (str): ID of the chat to send a rich message to.
        -            thread_id (str): ID of the thread.
        -            event_id (str): ID of the event.
        -            postback (dict): Postback object.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({
        -        'action': 'send_rich_message_postback',
        -        'payload': payload
        -    })
        -
        -
        -
        -def send_sneak_peek(self, chat_id: str = None, sneak_peek_text: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Sends a sneak peek to a chat.

        -

        Args

        -
        -
        chat_id : str
        -
        ID of the chat to send a sneak peek to.
        -
        sneak_peek_text : str
        -
        Sneak peek text.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def send_sneak_peek(self,
        -                    chat_id: str = None,
        -                    sneak_peek_text: str = None,
        -                    payload: dict = None) -> RtmResponse:
        -    ''' Sends a sneak peek to a chat.
        -
        -        Args:
        -            chat_id (str): ID of the chat to send a sneak peek to.
        -            sneak_peek_text (str): Sneak peek text.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({'action': 'send_sneak_peek', 'payload': payload})
        -
        -
        -
        -def set_customer_session_fields(self, session_fields: list = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Sets customer's session fields.

        -

        Args

        -
        -
        session_fields : list
        -
        List of custom object-enclosed key:value pairs.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def set_customer_session_fields(self,
        -                                session_fields: list = None,
        -                                payload: dict = None) -> RtmResponse:
        -    ''' Sets customer's session fields.
        -
        -        Args:
        -            session_fields (list): List of custom object-enclosed key:value pairs.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({
        -        'action': 'set_customer_session_fields',
        -        'payload': payload
        -    })
        -
        -
        -
        -def start_chat(self, chat: dict = None, active: bool = None, continuous: bool = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Starts a chat.

        -

        Args

        -
        -
        chat : dict
        -
        Chat object.
        -
        active : bool
        -
        When set to False, creates an inactive thread; default: True.
        -
        continuous : bool
        -
        Starts chat as continuous (online group is not required); default: False.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def start_chat(self,
        -               chat: dict = None,
        -               active: bool = None,
        -               continuous: bool = None,
        -               payload: dict = None) -> RtmResponse:
        -    ''' Starts a chat.
        -
        -        Args:
        -            chat (dict): Chat object.
        -            active (bool): When set to False, creates an inactive thread; default: True.
        -            continuous (bool): Starts chat as continuous (online group is not required); default: False.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({'action': 'start_chat', 'payload': payload})
        -
        -
        -
        -def update_chat_properties(self, id: str = None, properties: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Updates chat properties.

        -

        Args

        -
        -
        id : str
        -
        ID of the chat you to set a property for.
        -
        properties : dict
        -
        Chat properties to set.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def update_chat_properties(self,
        -                           id: str = None,
        -                           properties: dict = None,
        -                           payload: dict = None) -> RtmResponse:
        -    ''' Updates chat properties.
        -
        -        Args:
        -            id (str): ID of the chat you to set a property for.
        -            properties (dict): Chat properties to set.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({
        -        'action': 'update_chat_properties',
        -        'payload': payload
        -    })
        -
        -
        -
        -def update_customer(self, name: str = None, email: str = None, avatar: str = None, session_fields: list = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Updates customer's properties.

        -

        Args

        -
        -
        name : str
        -
        Customer`s name.
        -
        email : str
        -
        Customer`s email.
        -
        avatar : str
        -
        Customer`s avatar.
        -
        session_fields : list
        -
        An array of custom object-enclosed key:value pairs. -Respects the order of items.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def update_customer(self,
        -                    name: str = None,
        -                    email: str = None,
        -                    avatar: str = None,
        -                    session_fields: list = None,
        -                    payload: dict = None) -> RtmResponse:
        -    ''' Updates customer's properties.
        -
        -        Args:
        -            name (str): Customer`s name.
        -            email (str): Customer`s email.
        -            avatar (str): Customer`s avatar.
        -            session_fields (list): An array of custom object-enclosed key:value pairs.
        -                    Respects the order of items.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({'action': 'update_customer', 'payload': payload})
        -
        -
        -
        -def update_customer_page(self, url: str = None, title: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Updates customer's page.

        -

        Args

        -
        -
        url : str
        -
        Customer`s url.
        -
        title : str
        -
        Customer`s page title.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def update_customer_page(self,
        -                         url: str = None,
        -                         title: str = None,
        -                         payload: dict = None) -> RtmResponse:
        -    ''' Updates customer's page.
        -
        -        Args:
        -            url (str): Customer`s url.
        -            title (str): Customer`s page title.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({
        -        'action': 'update_customer_page',
        -        'payload': payload
        -    })
        -
        -
        -
        -def update_event_properties(self, chat_id: str = None, thread_id: str = None, event_id: str = None, properties: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Updates event properties.

        -

        Args

        -
        -
        chat_id : str
        -
        ID of the chat you want to set properties for.
        -
        thread_id : str
        -
        ID of the thread you want to set properties for.
        -
        event_id : str
        -
        ID of the event you want to set properties for.
        -
        properties : dict
        -
        Chat properties to set.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def update_event_properties(self,
        -                            chat_id: str = None,
        -                            thread_id: str = None,
        -                            event_id: str = None,
        -                            properties: dict = None,
        -                            payload: dict = None) -> RtmResponse:
        -    ''' Updates event properties.
        -
        -        Args:
        -            chat_id (str): ID of the chat you want to set properties for.
        -            thread_id (str): ID of the thread you want to set properties for.
        -            event_id (str): ID of the event you want to set properties for.
        -            properties (dict): Chat properties to set.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({
        -        'action': 'update_event_properties',
        -        'payload': payload
        -    })
        -
        -
        -
        -def update_thread_properties(self, chat_id: str = None, thread_id: str = None, properties: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
        -
        -

        Updates thread properties.

        -

        Args

        -
        -
        chat_id : str
        -
        ID of the chat you want to set properties for.
        -
        thread_id : str
        -
        ID of the thread you want to set properties for.
        -
        properties : dict
        -
        Chat properties to set.
        -
        payload : dict
        -
        Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
        -
        -

        Returns

        -
        -
        RtmResponse
        -
        RTM response structure (request_id, action, -type, success and payload properties)
        -
        -
        - -Expand source code - -
        def update_thread_properties(self,
        -                             chat_id: str = None,
        -                             thread_id: str = None,
        -                             properties: dict = None,
        -                             payload: dict = None) -> RtmResponse:
        -    ''' Updates thread properties.
        -
        -        Args:
        -            chat_id (str): ID of the chat you want to set properties for.
        -            thread_id (str): ID of the thread you want to set properties for.
        -            properties (dict): Chat properties to set.
        -            payload (dict): Custom payload to be used as request's data.
        -                    It overrides all other parameters provided for the method.
        -
        -        Returns:
        -            RtmResponse: RTM response structure (`request_id`, `action`,
        -                         `type`, `success` and `payload` properties)
        -    '''
        -    if payload is None:
        -        payload = prepare_payload(locals())
        -    return self.ws.send({
        -        'action': 'update_thread_properties',
        -        'payload': payload
        -    })
        -
        -
        -
        -
        -
        -
        -
        - -
        - - - \ No newline at end of file diff --git a/docs/customer/rtm/api/v35.html b/docs/customer/rtm/api/v35.html index d8261ae..8f4a051 100644 --- a/docs/customer/rtm/api/v35.html +++ b/docs/customer/rtm/api/v35.html @@ -704,7 +704,7 @@

        Classes

        class CustomerRtmV35 -(organization_id: str, base_url: str, header: Union[list, dict, Callable, None]) +(organization_id: str, base_url: str, header: Union[list, dict, Callable, ForwardRef(None)])

        Customer RTM API client class in version 3.5.

        @@ -2044,7 +2044,7 @@

        Returns

        -def login(self, token: Union[livechat.utils.structures.AccessToken, str, None] = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse +def login(self, token: Union[livechat.utils.structures.AccessToken, str, ForwardRef(None)] = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse

        Logs in customer.

        diff --git a/docs/customer/rtm/api/v36.html b/docs/customer/rtm/api/v36.html index a981b69..3120392 100644 --- a/docs/customer/rtm/api/v36.html +++ b/docs/customer/rtm/api/v36.html @@ -91,11 +91,11 @@

        Module livechat.customer.rtm.api.v36

        sort_order: str = None, page_id: str = None, payload: dict = None) -> RtmResponse: - ''' It returns summaries of the chats a Customer participated in. + ''' It returns chat info for the chats a Customer participated in. Args: limit (int): Chat limit. Default: 10, maximum: 25. - sort_order (str): Possible values: asc, desc (default). Chat summaries are sorted by the + sort_order (str): Possible values: asc, desc (default). Chat info entries are sorted by the creation date of its last thread. page_id (str): Page ID. payload (dict): Custom payload to be used as request's data. @@ -468,7 +468,9 @@

        Module livechat.customer.rtm.api.v36

        def update_customer(self, name: str = None, + name_is_default: bool = None, email: str = None, + phone_number: str = None, avatar: str = None, session_fields: list = None, payload: dict = None) -> RtmResponse: @@ -476,7 +478,9 @@

        Module livechat.customer.rtm.api.v36

        Args: name (str): Customer`s name. + name_is_default (bool): Flag which states if the name is default. email (str): Customer`s email. + phone_number (str): Customer`s phone number. avatar (str): Customer`s avatar. session_fields (list): An array of custom object-enclosed key:value pairs. Respects the order of items. @@ -514,6 +518,40 @@

        Module livechat.customer.rtm.api.v36

        'payload': payload }) + def activate_customer_page(self, + payload: dict = None) -> RtmResponse: + ''' Marks the current Customer's page tab as active (focused). + + Args: + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + + Returns: + RtmResponse: RTM response structure (`request_id`, `action`, + `type`, `success` and `payload` properties) + ''' + return self.ws.send({ + 'action': 'activate_customer_page', + 'payload': {} if payload is None else payload + }) + + def deactivate_customer_page(self, + payload: dict = None) -> RtmResponse: + ''' Marks the current Customer's page tab as inactive (unfocused). + + Args: + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + + Returns: + RtmResponse: RTM response structure (`request_id`, `action`, + `type`, `success` and `payload` properties) + ''' + return self.ws.send({ + 'action': 'deactivate_customer_page', + 'payload': {} if payload is None else payload + }) + def set_customer_session_fields(self, session_fields: list = None, payload: dict = None) -> RtmResponse: @@ -634,6 +672,22 @@

        Module livechat.customer.rtm.api.v36

        'action': 'get_predicted_agent', 'payload': {} if payload is None else payload }) + + def request_welcome_message(self, payload: dict = None) -> RtmResponse: + ''' Requests a welcome message. + + Args: + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + + Returns: + RtmResponse: RTM response structure (`request_id`, `action`, + `type`, `success` and `payload` properties) + ''' + return self.ws.send({ + 'action': 'request_welcome_message', + 'payload': {} if payload is None else payload + }) def get_url_info(self, url: str = None, @@ -726,7 +780,7 @@

        Classes

        class CustomerRtmV36 -(organization_id: str, base_url: str, header: Union[list, dict, Callable, None]) +(organization_id: str, base_url: str, header: Union[list, dict, Callable, ForwardRef(None)])

        Customer RTM API client class in version 3.6.

        @@ -787,11 +841,11 @@

        Classes

        sort_order: str = None, page_id: str = None, payload: dict = None) -> RtmResponse: - ''' It returns summaries of the chats a Customer participated in. + ''' It returns chat info for the chats a Customer participated in. Args: limit (int): Chat limit. Default: 10, maximum: 25. - sort_order (str): Possible values: asc, desc (default). Chat summaries are sorted by the + sort_order (str): Possible values: asc, desc (default). Chat info entries are sorted by the creation date of its last thread. page_id (str): Page ID. payload (dict): Custom payload to be used as request's data. @@ -1164,7 +1218,9 @@

        Classes

        def update_customer(self, name: str = None, + name_is_default: bool = None, email: str = None, + phone_number: str = None, avatar: str = None, session_fields: list = None, payload: dict = None) -> RtmResponse: @@ -1172,7 +1228,9 @@

        Classes

        Args: name (str): Customer`s name. + name_is_default (bool): Flag which states if the name is default. email (str): Customer`s email. + phone_number (str): Customer`s phone number. avatar (str): Customer`s avatar. session_fields (list): An array of custom object-enclosed key:value pairs. Respects the order of items. @@ -1210,6 +1268,40 @@

        Classes

        'payload': payload }) + def activate_customer_page(self, + payload: dict = None) -> RtmResponse: + ''' Marks the current Customer's page tab as active (focused). + + Args: + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + + Returns: + RtmResponse: RTM response structure (`request_id`, `action`, + `type`, `success` and `payload` properties) + ''' + return self.ws.send({ + 'action': 'activate_customer_page', + 'payload': {} if payload is None else payload + }) + + def deactivate_customer_page(self, + payload: dict = None) -> RtmResponse: + ''' Marks the current Customer's page tab as inactive (unfocused). + + Args: + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + + Returns: + RtmResponse: RTM response structure (`request_id`, `action`, + `type`, `success` and `payload` properties) + ''' + return self.ws.send({ + 'action': 'deactivate_customer_page', + 'payload': {} if payload is None else payload + }) + def set_customer_session_fields(self, session_fields: list = None, payload: dict = None) -> RtmResponse: @@ -1330,6 +1422,22 @@

        Classes

        'action': 'get_predicted_agent', 'payload': {} if payload is None else payload }) + + def request_welcome_message(self, payload: dict = None) -> RtmResponse: + ''' Requests a welcome message. + + Args: + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + + Returns: + RtmResponse: RTM response structure (`request_id`, `action`, + `type`, `success` and `payload` properties) + ''' + return self.ws.send({ + 'action': 'request_welcome_message', + 'payload': {} if payload is None else payload + }) def get_url_info(self, url: str = None, @@ -1458,6 +1566,45 @@

        Returns

        return self.ws.send({'action': 'accept_greeting', 'payload': payload})
        +
        +def activate_customer_page(self, payload: dict = None) ‑> livechat.utils.structures.RtmResponse +
        +
        +

        Marks the current Customer's page tab as active (focused).

        +

        Args

        +
        +
        payload : dict
        +
        Custom payload to be used as request's data. +It overrides all other parameters provided for the method.
        +
        +

        Returns

        +
        +
        RtmResponse
        +
        RTM response structure (request_id, action, +type, success and payload properties)
        +
        +
        + +Expand source code + +
        def activate_customer_page(self,
        +                           payload: dict = None) -> RtmResponse:
        +    ''' Marks the current Customer's page tab as active (focused).
        +
        +        Args:
        +            payload (dict): Custom payload to be used as request's data.
        +                    It overrides all other parameters provided for the method.
        +
        +        Returns:
        +            RtmResponse: RTM response structure (`request_id`, `action`,
        +                         `type`, `success` and `payload` properties)
        +    '''
        +    return self.ws.send({
        +        'action': 'activate_customer_page',
        +        'payload': {} if payload is None else payload
        +    })
        +
        +
        def cancel_greeting(self, unique_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
        @@ -1556,6 +1703,45 @@

        Returns

        return self.ws.send({'action': 'deactivate_chat', 'payload': payload})
        +
        +def deactivate_customer_page(self, payload: dict = None) ‑> livechat.utils.structures.RtmResponse +
        +
        +

        Marks the current Customer's page tab as inactive (unfocused).

        +

        Args

        +
        +
        payload : dict
        +
        Custom payload to be used as request's data. +It overrides all other parameters provided for the method.
        +
        +

        Returns

        +
        +
        RtmResponse
        +
        RTM response structure (request_id, action, +type, success and payload properties)
        +
        +
        + +Expand source code + +
        def deactivate_customer_page(self,
        +                             payload: dict = None) -> RtmResponse:
        +    ''' Marks the current Customer's page tab as inactive (unfocused).
        +
        +        Args:
        +            payload (dict): Custom payload to be used as request's data.
        +                    It overrides all other parameters provided for the method.
        +
        +        Returns:
        +            RtmResponse: RTM response structure (`request_id`, `action`,
        +                         `type`, `success` and `payload` properties)
        +    '''
        +    return self.ws.send({
        +        'action': 'deactivate_customer_page',
        +        'payload': {} if payload is None else payload
        +    })
        +
        +
        def delete_chat_properties(self, id: str = None, properties: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
        @@ -1979,13 +2165,13 @@

        Returns

        def list_chats(self, limit: int = None, sort_order: str = None, page_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
        -

        It returns summaries of the chats a Customer participated in.

        +

        It returns chat info for the chats a Customer participated in.

        Args

        limit : int
        Chat limit. Default: 10, maximum: 25.
        sort_order : str
        -
        Possible values: asc, desc (default). Chat summaries are sorted by the +
        Possible values: asc, desc (default). Chat info entries are sorted by the creation date of its last thread.
        page_id : str
        Page ID.
        @@ -2008,11 +2194,11 @@

        Returns

        sort_order: str = None, page_id: str = None, payload: dict = None) -> RtmResponse: - ''' It returns summaries of the chats a Customer participated in. + ''' It returns chat info for the chats a Customer participated in. Args: limit (int): Chat limit. Default: 10, maximum: 25. - sort_order (str): Possible values: asc, desc (default). Chat summaries are sorted by the + sort_order (str): Possible values: asc, desc (default). Chat info entries are sorted by the creation date of its last thread. page_id (str): Page ID. payload (dict): Custom payload to be used as request's data. @@ -2138,7 +2324,7 @@

        Returns

        -def login(self, token: Union[livechat.utils.structures.AccessToken, str, None] = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse +def login(self, token: Union[livechat.utils.structures.AccessToken, str, ForwardRef(None)] = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse

        Logs in customer.

        @@ -2281,6 +2467,44 @@

        Args

        keep_alive, response_timeout)
        +
        +def request_welcome_message(self, payload: dict = None) ‑> livechat.utils.structures.RtmResponse +
        +
        +

        Requests a welcome message.

        +

        Args

        +
        +
        payload : dict
        +
        Custom payload to be used as request's data. +It overrides all other parameters provided for the method.
        +
        +

        Returns

        +
        +
        RtmResponse
        +
        RTM response structure (request_id, action, +type, success and payload properties)
        +
        +
        + +Expand source code + +
        def request_welcome_message(self, payload: dict = None) -> RtmResponse:
        +    ''' Requests a welcome message.
        +
        +        Args:
        +            payload (dict): Custom payload to be used as request's data.
        +                    It overrides all other parameters provided for the method.
        +
        +        Returns:
        +            RtmResponse: RTM response structure (`request_id`, `action`,
        +                         `type`, `success` and `payload` properties)
        +    '''
        +    return self.ws.send({
        +        'action': 'request_welcome_message',
        +        'payload': {} if payload is None else payload
        +    })
        +
        +
        def resume_chat(self, chat: dict = None, active: bool = None, continuous: bool = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
        @@ -2629,7 +2853,7 @@

        Returns

    • -def update_customer(self, name: str = None, email: str = None, avatar: str = None, session_fields: list = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse +def update_customer(self, name: str = None, name_is_default: bool = None, email: str = None, phone_number: str = None, avatar: str = None, session_fields: list = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse

      Updates customer's properties.

      @@ -2637,8 +2861,12 @@

      Args

      name : str
      Customer`s name.
      +
      name_is_default : bool
      +
      Flag which states if the name is default.
      email : str
      Customer`s email.
      +
      phone_number : str
      +
      Customer`s phone number.
      avatar : str
      Customer`s avatar.
      session_fields : list
      @@ -2660,7 +2888,9 @@

      Returns

      def update_customer(self,
                           name: str = None,
      +                    name_is_default: bool = None,
                           email: str = None,
      +                    phone_number: str = None,
                           avatar: str = None,
                           session_fields: list = None,
                           payload: dict = None) -> RtmResponse:
      @@ -2668,7 +2898,9 @@ 

      Returns

      Args: name (str): Customer`s name. + name_is_default (bool): Flag which states if the name is default. email (str): Customer`s email. + phone_number (str): Customer`s phone number. avatar (str): Customer`s avatar. session_fields (list): An array of custom object-enclosed key:value pairs. Respects the order of items. @@ -2865,9 +3097,11 @@

      Index

      CustomerRtmV36

      • accept_greeting
      • +
      • activate_customer_page
      • cancel_greeting
      • close_connection
      • deactivate_chat
      • +
      • deactivate_customer_page
      • delete_chat_properties
      • delete_event
      • delete_event_properties
      • @@ -2883,6 +3117,7 @@

        login
      • mark_events_as_seen
      • open_connection
      • +
      • request_welcome_message
      • resume_chat
      • send_event
      • send_rich_message_postback
      • diff --git a/docs/customer/rtm/api/v37.html b/docs/customer/rtm/api/v37.html index 634d374..50278c6 100644 --- a/docs/customer/rtm/api/v37.html +++ b/docs/customer/rtm/api/v37.html @@ -91,11 +91,11 @@

        Module livechat.customer.rtm.api.v37

        sort_order: str = None, page_id: str = None, payload: dict = None) -> RtmResponse: - ''' It returns summaries of the chats a Customer participated in. + ''' It returns chat info for the chats a Customer participated in. Args: limit (int): Chat limit. Default: 10, maximum: 25. - sort_order (str): Possible values: asc, desc (default). Chat summaries are sorted by the + sort_order (str): Possible values: asc, desc (default). Chat info entries are sorted by the creation date of its last thread. page_id (str): Page ID. payload (dict): Custom payload to be used as request's data. @@ -468,7 +468,9 @@

        Module livechat.customer.rtm.api.v37

        def update_customer(self, name: str = None, + name_is_default: bool = None, email: str = None, + phone_number: str = None, avatar: str = None, session_fields: list = None, payload: dict = None) -> RtmResponse: @@ -476,7 +478,9 @@

        Module livechat.customer.rtm.api.v37

        Args: name (str): Customer`s name. + name_is_default (bool): Flag which states if the name is default. email (str): Customer`s email. + phone_number (str): Customer`s phone number. avatar (str): Customer`s avatar. session_fields (list): An array of custom object-enclosed key:value pairs. Respects the order of items. @@ -514,6 +518,40 @@

        Module livechat.customer.rtm.api.v37

        'payload': payload }) + def activate_customer_page(self, + payload: dict = None) -> RtmResponse: + ''' Marks the current Customer's page tab as active (focused). + + Args: + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + + Returns: + RtmResponse: RTM response structure (`request_id`, `action`, + `type`, `success` and `payload` properties) + ''' + return self.ws.send({ + 'action': 'activate_customer_page', + 'payload': {} if payload is None else payload + }) + + def deactivate_customer_page(self, + payload: dict = None) -> RtmResponse: + ''' Marks the current Customer's page tab as inactive (unfocused). + + Args: + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + + Returns: + RtmResponse: RTM response structure (`request_id`, `action`, + `type`, `success` and `payload` properties) + ''' + return self.ws.send({ + 'action': 'deactivate_customer_page', + 'payload': {} if payload is None else payload + }) + def set_customer_session_fields(self, session_fields: list = None, payload: dict = None) -> RtmResponse: @@ -619,8 +657,8 @@

        Module livechat.customer.rtm.api.v37

        payload = prepare_payload(locals()) return self.ws.send({'action': 'get_form', 'payload': payload}) - def get_predicted_agent(self, payload: dict = None) -> RtmResponse: - ''' Gets the predicted Agent - the one the Customer will chat with when the chat starts. + def request_welcome_message(self, payload: dict = None) -> RtmResponse: + ''' Requests a welcome message. Args: payload (dict): Custom payload to be used as request's data. @@ -631,7 +669,7 @@

        Module livechat.customer.rtm.api.v37

        `type`, `success` and `payload` properties) ''' return self.ws.send({ - 'action': 'get_predicted_agent', + 'action': 'request_welcome_message', 'payload': {} if payload is None else payload }) @@ -726,7 +764,7 @@

        Classes

        class CustomerRtmV37 -(organization_id: str, base_url: str, header: Union[list, dict, Callable, None]) +(organization_id: str, base_url: str, header: Union[list, dict, Callable, ForwardRef(None)])

        Customer RTM API client class in version 3.7.

        @@ -787,11 +825,11 @@

        Classes

        sort_order: str = None, page_id: str = None, payload: dict = None) -> RtmResponse: - ''' It returns summaries of the chats a Customer participated in. + ''' It returns chat info for the chats a Customer participated in. Args: limit (int): Chat limit. Default: 10, maximum: 25. - sort_order (str): Possible values: asc, desc (default). Chat summaries are sorted by the + sort_order (str): Possible values: asc, desc (default). Chat info entries are sorted by the creation date of its last thread. page_id (str): Page ID. payload (dict): Custom payload to be used as request's data. @@ -1164,7 +1202,9 @@

        Classes

        def update_customer(self, name: str = None, + name_is_default: bool = None, email: str = None, + phone_number: str = None, avatar: str = None, session_fields: list = None, payload: dict = None) -> RtmResponse: @@ -1172,7 +1212,9 @@

        Classes

        Args: name (str): Customer`s name. + name_is_default (bool): Flag which states if the name is default. email (str): Customer`s email. + phone_number (str): Customer`s phone number. avatar (str): Customer`s avatar. session_fields (list): An array of custom object-enclosed key:value pairs. Respects the order of items. @@ -1210,6 +1252,40 @@

        Classes

        'payload': payload }) + def activate_customer_page(self, + payload: dict = None) -> RtmResponse: + ''' Marks the current Customer's page tab as active (focused). + + Args: + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + + Returns: + RtmResponse: RTM response structure (`request_id`, `action`, + `type`, `success` and `payload` properties) + ''' + return self.ws.send({ + 'action': 'activate_customer_page', + 'payload': {} if payload is None else payload + }) + + def deactivate_customer_page(self, + payload: dict = None) -> RtmResponse: + ''' Marks the current Customer's page tab as inactive (unfocused). + + Args: + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + + Returns: + RtmResponse: RTM response structure (`request_id`, `action`, + `type`, `success` and `payload` properties) + ''' + return self.ws.send({ + 'action': 'deactivate_customer_page', + 'payload': {} if payload is None else payload + }) + def set_customer_session_fields(self, session_fields: list = None, payload: dict = None) -> RtmResponse: @@ -1315,8 +1391,8 @@

        Classes

        payload = prepare_payload(locals()) return self.ws.send({'action': 'get_form', 'payload': payload}) - def get_predicted_agent(self, payload: dict = None) -> RtmResponse: - ''' Gets the predicted Agent - the one the Customer will chat with when the chat starts. + def request_welcome_message(self, payload: dict = None) -> RtmResponse: + ''' Requests a welcome message. Args: payload (dict): Custom payload to be used as request's data. @@ -1327,7 +1403,7 @@

        Classes

        `type`, `success` and `payload` properties) ''' return self.ws.send({ - 'action': 'get_predicted_agent', + 'action': 'request_welcome_message', 'payload': {} if payload is None else payload }) @@ -1458,6 +1534,45 @@

        Returns

        return self.ws.send({'action': 'accept_greeting', 'payload': payload})
      +
      +def activate_customer_page(self, payload: dict = None) ‑> livechat.utils.structures.RtmResponse +
      +
      +

      Marks the current Customer's page tab as active (focused).

      +

      Args

      +
      +
      payload : dict
      +
      Custom payload to be used as request's data. +It overrides all other parameters provided for the method.
      +
      +

      Returns

      +
      +
      RtmResponse
      +
      RTM response structure (request_id, action, +type, success and payload properties)
      +
      +
      + +Expand source code + +
      def activate_customer_page(self,
      +                           payload: dict = None) -> RtmResponse:
      +    ''' Marks the current Customer's page tab as active (focused).
      +
      +        Args:
      +            payload (dict): Custom payload to be used as request's data.
      +                    It overrides all other parameters provided for the method.
      +
      +        Returns:
      +            RtmResponse: RTM response structure (`request_id`, `action`,
      +                         `type`, `success` and `payload` properties)
      +    '''
      +    return self.ws.send({
      +        'action': 'activate_customer_page',
      +        'payload': {} if payload is None else payload
      +    })
      +
      +
      def cancel_greeting(self, unique_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
      @@ -1556,6 +1671,45 @@

      Returns

      return self.ws.send({'action': 'deactivate_chat', 'payload': payload})
      +
      +def deactivate_customer_page(self, payload: dict = None) ‑> livechat.utils.structures.RtmResponse +
      +
      +

      Marks the current Customer's page tab as inactive (unfocused).

      +

      Args

      +
      +
      payload : dict
      +
      Custom payload to be used as request's data. +It overrides all other parameters provided for the method.
      +
      +

      Returns

      +
      +
      RtmResponse
      +
      RTM response structure (request_id, action, +type, success and payload properties)
      +
      +
      + +Expand source code + +
      def deactivate_customer_page(self,
      +                             payload: dict = None) -> RtmResponse:
      +    ''' Marks the current Customer's page tab as inactive (unfocused).
      +
      +        Args:
      +            payload (dict): Custom payload to be used as request's data.
      +                    It overrides all other parameters provided for the method.
      +
      +        Returns:
      +            RtmResponse: RTM response structure (`request_id`, `action`,
      +                         `type`, `success` and `payload` properties)
      +    '''
      +    return self.ws.send({
      +        'action': 'deactivate_customer_page',
      +        'payload': {} if payload is None else payload
      +    })
      +
      +
      def delete_chat_properties(self, id: str = None, properties: dict = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
      @@ -1895,44 +2049,6 @@

      Returns

      return self.ws.send({'action': 'get_form', 'payload': payload})
  • -
    -def get_predicted_agent(self, payload: dict = None) ‑> livechat.utils.structures.RtmResponse -
    -
    -

    Gets the predicted Agent - the one the Customer will chat with when the chat starts.

    -

    Args

    -
    -
    payload : dict
    -
    Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
    -
    -

    Returns

    -
    -
    RtmResponse
    -
    RTM response structure (request_id, action, -type, success and payload properties)
    -
    -
    - -Expand source code - -
    def get_predicted_agent(self, payload: dict = None) -> RtmResponse:
    -    ''' Gets the predicted Agent - the one the Customer will chat with when the chat starts.
    -
    -        Args:
    -            payload (dict): Custom payload to be used as request's data.
    -                    It overrides all other parameters provided for the method.
    -
    -        Returns:
    -            RtmResponse: RTM response structure (`request_id`, `action`,
    -                         `type`, `success` and `payload` properties)
    -    '''
    -    return self.ws.send({
    -        'action': 'get_predicted_agent',
    -        'payload': {} if payload is None else payload
    -    })
    -
    -
    def get_url_info(self, url: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
    @@ -1979,13 +2095,13 @@

    Returns

    def list_chats(self, limit: int = None, sort_order: str = None, page_id: str = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
    -

    It returns summaries of the chats a Customer participated in.

    +

    It returns chat info for the chats a Customer participated in.

    Args

    limit : int
    Chat limit. Default: 10, maximum: 25.
    sort_order : str
    -
    Possible values: asc, desc (default). Chat summaries are sorted by the +
    Possible values: asc, desc (default). Chat info entries are sorted by the creation date of its last thread.
    page_id : str
    Page ID.
    @@ -2008,11 +2124,11 @@

    Returns

    sort_order: str = None, page_id: str = None, payload: dict = None) -> RtmResponse: - ''' It returns summaries of the chats a Customer participated in. + ''' It returns chat info for the chats a Customer participated in. Args: limit (int): Chat limit. Default: 10, maximum: 25. - sort_order (str): Possible values: asc, desc (default). Chat summaries are sorted by the + sort_order (str): Possible values: asc, desc (default). Chat info entries are sorted by the creation date of its last thread. page_id (str): Page ID. payload (dict): Custom payload to be used as request's data. @@ -2138,7 +2254,7 @@

    Returns

    -def login(self, token: Union[livechat.utils.structures.AccessToken, str, None] = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse +def login(self, token: Union[livechat.utils.structures.AccessToken, str, ForwardRef(None)] = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse

    Logs in customer.

    @@ -2281,6 +2397,44 @@

    Args

    keep_alive, response_timeout)
    +
    +def request_welcome_message(self, payload: dict = None) ‑> livechat.utils.structures.RtmResponse +
    +
    +

    Requests a welcome message.

    +

    Args

    +
    +
    payload : dict
    +
    Custom payload to be used as request's data. +It overrides all other parameters provided for the method.
    +
    +

    Returns

    +
    +
    RtmResponse
    +
    RTM response structure (request_id, action, +type, success and payload properties)
    +
    +
    + +Expand source code + +
    def request_welcome_message(self, payload: dict = None) -> RtmResponse:
    +    ''' Requests a welcome message.
    +
    +        Args:
    +            payload (dict): Custom payload to be used as request's data.
    +                    It overrides all other parameters provided for the method.
    +
    +        Returns:
    +            RtmResponse: RTM response structure (`request_id`, `action`,
    +                         `type`, `success` and `payload` properties)
    +    '''
    +    return self.ws.send({
    +        'action': 'request_welcome_message',
    +        'payload': {} if payload is None else payload
    +    })
    +
    +
    def resume_chat(self, chat: dict = None, active: bool = None, continuous: bool = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse
    @@ -2629,7 +2783,7 @@

    Returns

    -def update_customer(self, name: str = None, email: str = None, avatar: str = None, session_fields: list = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse +def update_customer(self, name: str = None, name_is_default: bool = None, email: str = None, phone_number: str = None, avatar: str = None, session_fields: list = None, payload: dict = None) ‑> livechat.utils.structures.RtmResponse

    Updates customer's properties.

    @@ -2637,8 +2791,12 @@

    Args

    name : str
    Customer`s name.
    +
    name_is_default : bool
    +
    Flag which states if the name is default.
    email : str
    Customer`s email.
    +
    phone_number : str
    +
    Customer`s phone number.
    avatar : str
    Customer`s avatar.
    session_fields : list
    @@ -2660,7 +2818,9 @@

    Returns

    def update_customer(self,
                         name: str = None,
    +                    name_is_default: bool = None,
                         email: str = None,
    +                    phone_number: str = None,
                         avatar: str = None,
                         session_fields: list = None,
                         payload: dict = None) -> RtmResponse:
    @@ -2668,7 +2828,9 @@ 

    Returns

    Args: name (str): Customer`s name. + name_is_default (bool): Flag which states if the name is default. email (str): Customer`s email. + phone_number (str): Customer`s phone number. avatar (str): Customer`s avatar. session_fields (list): An array of custom object-enclosed key:value pairs. Respects the order of items. @@ -2865,9 +3027,11 @@

    Index

    CustomerRtmV37

    • accept_greeting
    • +
    • activate_customer_page
    • cancel_greeting
    • close_connection
    • deactivate_chat
    • +
    • deactivate_customer_page
    • delete_chat_properties
    • delete_event
    • delete_event_properties
    • @@ -2875,7 +3039,6 @@

      get_chat
    • get_customer
    • get_form
    • -
    • get_predicted_agent
    • get_url_info
    • list_chats
    • list_group_statuses
    • @@ -2883,6 +3046,7 @@

      login
    • mark_events_as_seen
    • open_connection
    • +
    • request_welcome_message
    • resume_chat
    • send_event
    • send_rich_message_postback
    • diff --git a/docs/customer/rtm/base.html b/docs/customer/rtm/base.html index 8fdef0b..10bfcba 100644 --- a/docs/customer/rtm/base.html +++ b/docs/customer/rtm/base.html @@ -34,7 +34,6 @@

      Module livechat.customer.rtm.base

      from typing import Callable, Union from livechat.config import CONFIG -from livechat.customer.rtm.api.v34 import CustomerRtmV34 from livechat.customer.rtm.api.v35 import CustomerRtmV35 from livechat.customer.rtm.api.v36 import CustomerRtmV36 from livechat.customer.rtm.api.v37 import CustomerRtmV37 @@ -51,7 +50,7 @@

      Module livechat.customer.rtm.base

      base_url: str = api_url, organization_id: str = None, header: Union[list, dict, Callable, None] = None, - ) -> Union[CustomerRtmV34, CustomerRtmV35, CustomerRtmV36, CustomerRtmV37]: + ) -> Union[CustomerRtmV35, CustomerRtmV36, CustomerRtmV37]: ''' Returns client for specific Customer RTM version. Args: @@ -68,30 +67,15 @@

      Module livechat.customer.rtm.base

      ValueError: If the specified version does not exist. ''' client = { - '3.4': CustomerRtmV34, '3.5': CustomerRtmV35, '3.6': CustomerRtmV36, '3.7': CustomerRtmV37, }.get(version) - client_kwargs = { - '3.4': { - 'organization_id': organization_id, - 'base_url': base_url - }, - '3.5': { - 'organization_id': organization_id, - 'base_url': base_url - }, - '3.6': { - 'organization_id': organization_id, - 'base_url': base_url - }, - '3.7': { + if client: + client_kwargs = { 'organization_id': organization_id, 'base_url': base_url - }, - }.get(version) - if client: + } return client(**client_kwargs, header=header) raise ValueError('Provided version does not exist.')
    @@ -122,7 +106,7 @@

    Classes

    base_url: str = api_url, organization_id: str = None, header: Union[list, dict, Callable, None] = None, - ) -> Union[CustomerRtmV34, CustomerRtmV35, CustomerRtmV36, CustomerRtmV37]: + ) -> Union[CustomerRtmV35, CustomerRtmV36, CustomerRtmV37]: ''' Returns client for specific Customer RTM version. Args: @@ -139,37 +123,22 @@

    Classes

    ValueError: If the specified version does not exist. ''' client = { - '3.4': CustomerRtmV34, '3.5': CustomerRtmV35, '3.6': CustomerRtmV36, '3.7': CustomerRtmV37, }.get(version) - client_kwargs = { - '3.4': { - 'organization_id': organization_id, - 'base_url': base_url - }, - '3.5': { - 'organization_id': organization_id, - 'base_url': base_url - }, - '3.6': { - 'organization_id': organization_id, - 'base_url': base_url - }, - '3.7': { + if client: + client_kwargs = { 'organization_id': organization_id, 'base_url': base_url - }, - }.get(version) - if client: + } return client(**client_kwargs, header=header) raise ValueError('Provided version does not exist.')

    Static methods

    -def get_client(version: str = '3.6', base_url: str = 'api.livechatinc.com', organization_id: str = None, header: Union[list, dict, Callable, None] = None) ‑> Union[CustomerRtmV34, CustomerRtmV35, CustomerRtmV36, CustomerRtmV37] +def get_client(version: str = '3.6', base_url: str = 'api.livechatinc.com', organization_id: str = None, header: Union[list, dict, Callable, ForwardRef(None)] = None) ‑> Union[CustomerRtmV35, CustomerRtmV36, CustomerRtmV37]

    Returns client for specific Customer RTM version.

    @@ -202,7 +171,7 @@

    Raises

    base_url: str = api_url, organization_id: str = None, header: Union[list, dict, Callable, None] = None, -) -> Union[CustomerRtmV34, CustomerRtmV35, CustomerRtmV36, CustomerRtmV37]: +) -> Union[CustomerRtmV35, CustomerRtmV36, CustomerRtmV37]: ''' Returns client for specific Customer RTM version. Args: @@ -219,30 +188,15 @@

    Raises

    ValueError: If the specified version does not exist. ''' client = { - '3.4': CustomerRtmV34, '3.5': CustomerRtmV35, '3.6': CustomerRtmV36, '3.7': CustomerRtmV37, }.get(version) - client_kwargs = { - '3.4': { - 'organization_id': organization_id, - 'base_url': base_url - }, - '3.5': { - 'organization_id': organization_id, - 'base_url': base_url - }, - '3.6': { - 'organization_id': organization_id, - 'base_url': base_url - }, - '3.7': { + if client: + client_kwargs = { 'organization_id': organization_id, 'base_url': base_url - }, - }.get(version) - if client: + } return client(**client_kwargs, header=header) raise ValueError('Provided version does not exist.') diff --git a/docs/customer/web/api/index.html b/docs/customer/web/api/index.html index c6d85b4..94296c6 100644 --- a/docs/customer/web/api/index.html +++ b/docs/customer/web/api/index.html @@ -26,10 +26,6 @@

    Module livechat.customer.web.api

    Sub-modules

    -
    livechat.customer.web.api.v34
    -
    -

    Module containing Customer Web API client class in v3.4.

    -
    livechat.customer.web.api.v35

    Module containing Customer Web API client class in v3.5.

    @@ -64,7 +60,6 @@

    Index

  • Sub-modules

      -
    • livechat.customer.web.api.v34
    • livechat.customer.web.api.v35
    • livechat.customer.web.api.v36
    • livechat.customer.web.api.v37
    • diff --git a/docs/customer/web/api/v34.html b/docs/customer/web/api/v34.html deleted file mode 100644 index cc0b89a..0000000 --- a/docs/customer/web/api/v34.html +++ /dev/null @@ -1,3980 +0,0 @@ - - - - - - -livechat.customer.web.api.v34 API documentation - - - - - - - - - - - -
      -
      -
      -

      Module livechat.customer.web.api.v34

      -
      -
      -

      Module containing Customer Web API client class in v3.4.

      -
      - -Expand source code - -
      ''' Module containing Customer Web API client class in v3.4. '''
      -from __future__ import annotations
      -
      -import typing
      -
      -import httpx
      -
      -from livechat.utils.helpers import prepare_payload
      -from livechat.utils.http_client import HttpClient
      -from livechat.utils.structures import AccessToken
      -
      -
      -class CustomerWebV34(HttpClient):
      -    ''' Customer Web API Class containing methods in version 3.4. '''
      -    def __init__(self,
      -                 organization_id: str,
      -                 access_token: typing.Union[AccessToken, str],
      -                 base_url: str,
      -                 http2: bool,
      -                 proxies=None,
      -                 verify: bool = True,
      -                 disable_logging: bool = False,
      -                 timeout: float = httpx.Timeout(15)):
      -        if all([access_token, isinstance(access_token, str)]):
      -            super().__init__(access_token, base_url, http2, proxies, verify,
      -                             disable_logging, timeout)
      -        else:
      -            raise ValueError(
      -                'Incorrect or missing `access_token` argument (should be of type str.)'
      -            )
      -
      -        self.api_url = f'https://{base_url}/v3.4/customer/action'
      -        if isinstance(organization_id, str):
      -            self.organization_id = organization_id
      -            self.query_string = f'?organization_id={organization_id}'
      -        else:
      -            raise ValueError(
      -                'Incorrect or missing `organization_id` argument (should be of type str.)'
      -            )
      -
      -# Chats
      -
      -    def list_chats(self,
      -                   limit: int = None,
      -                   sort_order: str = None,
      -                   page_id: str = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Returns summaries of the chats a Customer participated in.
      -
      -            Args:
      -                limit (int): Limit of results per page. Default: 10, maximum: 25.
      -                sort_order (str): Possible values: asc, desc (default).
      -                                  Chat summaries are sorted by the creation date of its last thread.
      -                page_id (str): ID of the page with paginated results.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/list_chats{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def list_threads(self,
      -                     chat_id: str = None,
      -                     limit: str = None,
      -                     sort_order: str = None,
      -                     page_id: str = None,
      -                     min_events_count: int = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Returns threads that the current Customer has access to in a given chat.
      -
      -            Args:
      -                chat_id (str): ID of the chat for which threads are to be listed.
      -                limit (str): Limit of results per page. Default: 10, maximum: 25.
      -                sort_order (str): Possible values: asc, desc (default).
      -                                  Chat summaries are sorted by the creation date of its last thread.
      -                page_id (str): ID of the page with paginated results.
      -                min_events_count (int): Range: 1-100;
      -                    Specifies the minimum number of events to be returned in the response.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/list_threads{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def get_chat(self,
      -                 chat_id: str = None,
      -                 thread_id: str = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -        ''' Returns a thread that the current Customer has access to in a given chat.
      -
      -            Args:
      -                chat_id (str): ID of the chat for which thread is to be returned.
      -                thread_id (str): ID of the thread to show. Default: the latest thread (if exists)
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/get_chat{self.query_string}',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def start_chat(self,
      -                   chat: dict = None,
      -                   active: bool = None,
      -                   continuous: bool = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Starts a chat.
      -
      -            Args:
      -                chat (dict): Dict containing chat properties, access and thread.
      -                active (bool): When set to False, creates an inactive thread; default: True.
      -                continuous (bool): Starts chat as continuous (online group is not required); default: False.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/start_chat{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def resume_chat(self,
      -                    chat: dict = None,
      -                    active: bool = None,
      -                    continuous: bool = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Restarts an archived chat.
      -
      -            Args:
      -                chat (dict): Dict containing chat properties, access and thread.
      -                active (bool): When set to False, creates an inactive thread; default: True.
      -                continuous (bool): Starts chat as continuous (online group is not required); default: False.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/resume_chat{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def deactivate_chat(self,
      -                        id: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Deactivates a chat by closing the currently open thread.
      -            Sending messages to this thread will no longer be possible.
      -
      -            Args:
      -                id (str): ID of chat to be deactivated.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/deactivate_chat{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -# Configuration
      -
      -    def get_dynamic_configuration(self,
      -                                  group_id: int = None,
      -                                  url: str = None,
      -                                  channel_type: str = None,
      -                                  test: bool = None,
      -                                  payload: dict = None,
      -                                  headers: dict = None) -> httpx.Response:
      -        ''' Returns the dynamic configuration of a given group.
      -            It provides data to call Get Configuration and Get Localization.
      -
      -            Args:
      -                group_id (int): The ID of the group that you want to get a dynamic configuration for. ID of the default group is used if not provided.
      -                url (str): The URL that you want to get a dynamic configuration for.
      -                channel_type (str): The channel type that you want to get a dynamic configuration for.
      -                test (bool): Treats a dynamic configuration request as a test.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -           '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        payload['organization_id'] = self.organization_id
      -        return self.session.get(f'{self.api_url}/get_dynamic_configuration',
      -                                params=payload,
      -                                headers=headers)
      -
      -    def get_configuration(self,
      -                          group_id: int = None,
      -                          version: str = None,
      -                          payload: dict = None,
      -                          headers: dict = None) -> httpx.Response:
      -        ''' Returns the configuration of a given group in a given version. Contains data based on which the Chat Widget can be built.
      -
      -            Args:
      -                group_id (int): The ID of the group that you want to get a configuration for.
      -                version (str): The version that you want to get a configuration for.
      -                               Returned from Get Dynamic Configuration as the config_version parameter.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -         '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        payload['organization_id'] = self.organization_id
      -        return self.session.get(f'{self.api_url}/get_configuration',
      -                                params=payload,
      -                                headers=headers)
      -
      -# Events
      -
      -    def send_event(self,
      -                   chat_id: str = None,
      -                   event: dict = None,
      -                   attach_to_last_thread: bool = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Sends an Event object. Use this method to send a message by specifying the Message event type in the request.
      -            The method updates the requester's `events_seen_up_to` as if they've seen all chat events.
      -
      -            Args:
      -                chat_id (int): ID of the chat that you to send a message to.
      -                event (dict): The event object.
      -                attach_to_last_thread (bool): The flag is ignored for active chats.
      -                                              For inactive chats:
      -                                              True – the event will be added to the last thread;
      -                                              False – the request will fail. Default: False.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/send_event{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def upload_file(self,
      -                    file: typing.BinaryIO = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Uploads a file to the server as a temporary file. It returns a URL that expires after 24 hours unless the URL is used in `send_event`.
      -
      -            Args:
      -                file (typing.BinaryIO): File-like object with file to upload (Maximum size: 10MB).
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        return self.session.post(
      -            f'{self.api_url}/upload_file{self.query_string}',
      -            files=file,
      -            headers=headers)
      -
      -    def send_rich_message_postback(self,
      -                                   chat_id: str = None,
      -                                   event_id: str = None,
      -                                   postback: dict = None,
      -                                   thread_id: str = None,
      -                                   payload: dict = None,
      -                                   headers: dict = None) -> httpx.Response:
      -        ''' Sends a rich message postback.
      -
      -            Args:
      -                chat_id (str): ID of the chat to send rich message postback to.
      -                event_id (str): ID of the event related to the rich message postback.
      -                postback (dict): Object containing postback data (id, toggled).
      -                thread_id (str): ID of the thread to send rich message postback to.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/send_rich_message_postback{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def send_sneak_peek(self,
      -                        chat_id: str = None,
      -                        sneak_peek_text: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Sends a sneak peek to a chat.
      -
      -            Args:
      -                chat_id (str): ID of the chat to send a sneak peek to.
      -                sneak_peek_text (str): Sneak peek text.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/send_sneak_peek{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -# Localization
      -
      -    def get_localization(self,
      -                         group_id: int = None,
      -                         language: str = None,
      -                         version: str = None,
      -                         payload: dict = None,
      -                         headers: dict = None) -> httpx.Response:
      -        ''' Returns the localization of a given language and group in a given version. Contains translated phrases for the Chat Widget.
      -
      -            Args:
      -                group_id (int): ID of the group that you want to get a localization for.
      -                language (str): The language that you want to get a localization for.
      -                version (str): The version that you want to get a localization for.
      -                               Returned from `get_dynamic_configuration` as the `localization_version` parameter.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        payload['organization_id'] = self.organization_id
      -        return self.session.get(f'{self.api_url}/get_localization',
      -                                params=payload,
      -                                headers=headers)
      -
      -# Properties
      -
      -    def update_chat_properties(self,
      -                               id: str = None,
      -                               properties: dict = None,
      -                               payload: dict = None,
      -                               headers: dict = None) -> httpx.Response:
      -        ''' Updates chat properties.
      -
      -            Args:
      -                id (str): ID of the chat you to set a property for.
      -                properties (dict): Chat properties to set.
      -                                   You should stick to the general properties format and include namespace, property name and value.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/update_chat_properties{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def delete_chat_properties(self,
      -                               id: str = None,
      -                               properties: dict = None,
      -                               payload: dict = None,
      -                               headers: dict = None) -> httpx.Response:
      -        ''' Deletes chat properties.
      -
      -            Args:
      -                id (str): ID of the chat you want to delete properties of.
      -                properties (dict): Chat properties to delete.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/delete_chat_properties{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def update_thread_properties(self,
      -                                 chat_id: str = None,
      -                                 thread_id: str = None,
      -                                 properties: dict = None,
      -                                 payload: dict = None,
      -                                 headers: dict = None) -> httpx.Response:
      -        ''' Updates chat thread properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you to set properties for.
      -                thread_id (str): ID of the thread you want to set properties for.
      -                properties (dict): Thread properties to set.
      -                                   You should stick to the general properties format and include namespace, property name and value.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/update_thread_properties{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def delete_thread_properties(self,
      -                                 chat_id: str = None,
      -                                 thread_id: str = None,
      -                                 properties: dict = None,
      -                                 payload: dict = None,
      -                                 headers: dict = None) -> httpx.Response:
      -        ''' Deletes chat thread properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to delete the properties of.
      -                thread_id (str): ID of the thread you want to delete the properties of.
      -                properties (dict): Thread properties to delete.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/delete_thread_properties{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def update_event_properties(self,
      -                                chat_id: str = None,
      -                                thread_id: str = None,
      -                                event_id: str = None,
      -                                properties: dict = None,
      -                                payload: dict = None,
      -                                headers: dict = None) -> httpx.Response:
      -        ''' Updates event properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you to set properties for.
      -                thread_id (str): ID of the thread you want to set properties for.
      -                event_id (str): ID of the event you want to set properties for.
      -                properties (dict): Thread properties to set.
      -                                   You should stick to the general properties format and include namespace, property name and value.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/update_event_properties{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def delete_event_properties(self,
      -                                chat_id: str = None,
      -                                thread_id: str = None,
      -                                event_id: str = None,
      -                                properties: dict = None,
      -                                payload: dict = None,
      -                                headers: dict = None) -> httpx.Response:
      -        ''' Deletes event properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you to delete the properties for.
      -                thread_id (str): ID of the thread you want to delete the properties for.
      -                event_id (str): ID of the event you want to delete the properties for.
      -                properties (dict): Event properties to delete.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/delete_event_properties{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def list_license_properties(self,
      -                                namespace: str = None,
      -                                name: str = None,
      -                                headers: dict = None) -> httpx.Response:
      -        ''' Returns the properties of a given license. It only returns the properties a Customer has access to.
      -
      -            Args:
      -                namespace (str): Property namespace to retrieve.
      -                name (str): Property name.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        params = {}
      -        if namespace:
      -            params['namespace'] = namespace
      -        if name:
      -            params['name'] = name
      -        params['organization_id'] = self.organization_id
      -        return self.session.get(f'{self.api_url}/list_license_properties',
      -                                params=params,
      -                                headers=headers)
      -
      -    def list_group_properties(self,
      -                              group_id: int = None,
      -                              namespace: str = None,
      -                              name: str = None,
      -                              headers: dict = None) -> httpx.Response:
      -        ''' Returns the properties of a given group. It only returns the properties a Customer has access to.
      -            Args:
      -                group_id (int): ID of the group you want to return the properties of.
      -                namespace (str): Property namespace to retrieve.
      -                name (str): Property name.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        params = {}
      -        if namespace:
      -            params['namespace'] = namespace
      -        if name:
      -            params['name'] = name
      -        if group_id is not None:
      -            params['id'] = str(group_id)
      -        params['organization_id'] = self.organization_id
      -        return self.session.get(f'{self.api_url}/list_group_properties',
      -                                params=params,
      -                                headers=headers)
      -
      -# Customers
      -
      -    def get_customer(self,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Returns the info about the Customer requesting it.
      -
      -            Args:
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        return self.session.post(
      -            f'{self.api_url}/get_customer{self.query_string}',
      -            json={} if payload is None else payload,
      -            headers=headers)
      -
      -    def update_customer(self,
      -                        name: str = None,
      -                        email: str = None,
      -                        avatar: str = None,
      -                        session_fields: list = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Updates Customer's properties.
      -
      -            Args:
      -                name (str): Name of the customer.
      -                email (str): Email of the customer.
      -                avatar (str): The URL of the Customer's avatar.
      -                session_fields (list): An array of custom object-enclosed key:value pairs.
      -                                       Respects the order of items.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/update_customer{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def set_customer_session_fields(self,
      -                                    session_fields: list = None,
      -                                    payload: dict = None,
      -                                    headers: dict = None) -> httpx.Response:
      -        ''' Updates Customer's session fields.
      -
      -            Args:
      -                session_fields (list): An array of custom object-enclosed key:value pairs.
      -                                       Respects the order of items. Max keys: 100.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/set_customer_session_fields{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -# Status
      -
      -    def list_group_statuses(self,
      -                            all: bool = None,
      -                            group_ids: list = None,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -        ''' Returns object with info about current routing statuses of agent groups.
      -            One of the optional parameters needs to be included in the request.
      -
      -            Args:
      -                all (bool): If set to True, you will get statuses of all the groups.
      -                group_ids (list): A table of groups' IDs
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/list_group_statuses{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -
      -# Other
      -
      -    def check_goals(self,
      -                    session_fields: list = None,
      -                    group_id: int = None,
      -                    page_url: str = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Customer can use this method to trigger checking if goals were achieved.
      -            Then, Agents receive the information. You should call this method to provide goals parameters for the server
      -            when the customers limit is reached. Works only for offline Customers.
      -
      -            Args:
      -                session_fields (list): An array of custom object-enclosed key:value pairs.
      -                group_id (int): Group ID to check the goals for.
      -                page_url (str): URL of the page to check the goals for.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/check_goals{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def get_form(self,
      -                 group_id: int = None,
      -                 type: str = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -        ''' Returns an empty ticket form of a prechat or postchat survey.
      -
      -            Args:
      -                group_id (int): ID of the group from which you want the form.
      -                type (str): Form type; possible values: prechat or postchat.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/get_form{self.query_string}',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def get_predicted_agent(self,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -        ''' Gets the predicted Agent - the one the Customer will chat with when the chat starts.
      -            To use this method, the Customer needs to be logged in, which can be done via the `login` method.
      -
      -            Args:
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        return self.session.post(
      -            f'{self.api_url}/get_predicted_agent{self.query_string}',
      -            json={} if payload is None else payload,
      -            headers=headers)
      -
      -    def get_url_info(self,
      -                     url: str = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Returns the info on a given URL.
      -
      -            Args:
      -                url (str): Valid website URL.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/get_url_info{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def mark_events_as_seen(self,
      -                            chat_id: str = None,
      -                            seen_up_to: str = None,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -        ''' Updates `seen_up_to` value for a given chat.
      -
      -            Args:
      -                chat_id (str): ID of the chat to update `seen_up_to`.
      -                seen_up_to (str): RFC 3339 date-time format.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/mark_events_as_seen{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def accept_greeting(self,
      -                        greeting_id: int = None,
      -                        unique_id: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Marks an incoming greeting as seen.
      -
      -            Args:
      -                greeting_id (int): ID of the greeting configured within the license to accept.
      -                unique_id (str): ID of the greeting to accept. You can get it from the `incoming_greeting` push.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/accept_greeting{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def cancel_greeting(self,
      -                        unique_id: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Cancels a greeting (an invitation to the chat).
      -            For example, Customers could cancel greetings by minimalizing the chat widget with a greeting.
      -
      -            Args:
      -                unique_id (str): ID of the greeting to cancel. You can get it from the `incoming_greeting` push.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/cancel_greeting{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def request_email_verification(self,
      -                                   callback_uri: str = None,
      -                                   payload: dict = None,
      -                                   headers: dict = None) -> httpx.Response:
      -        ''' Requests the verification of the customer's email address by sending them a verification email
      -            with the identity confirmation link.
      -
      -            Args:
      -                callback_uri (str): URI to be called after the customer confirms their email address.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/request_email_verification{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Classes

      -
      -
      -class CustomerWebV34 -(organization_id: str, access_token: typing.Union[AccessToken, str], base_url: str, http2: bool, proxies=None, verify: bool = True, disable_logging: bool = False, timeout: float = Timeout(timeout=15)) -
      -
      -

      Customer Web API Class containing methods in version 3.4.

      -
      - -Expand source code - -
      class CustomerWebV34(HttpClient):
      -    ''' Customer Web API Class containing methods in version 3.4. '''
      -    def __init__(self,
      -                 organization_id: str,
      -                 access_token: typing.Union[AccessToken, str],
      -                 base_url: str,
      -                 http2: bool,
      -                 proxies=None,
      -                 verify: bool = True,
      -                 disable_logging: bool = False,
      -                 timeout: float = httpx.Timeout(15)):
      -        if all([access_token, isinstance(access_token, str)]):
      -            super().__init__(access_token, base_url, http2, proxies, verify,
      -                             disable_logging, timeout)
      -        else:
      -            raise ValueError(
      -                'Incorrect or missing `access_token` argument (should be of type str.)'
      -            )
      -
      -        self.api_url = f'https://{base_url}/v3.4/customer/action'
      -        if isinstance(organization_id, str):
      -            self.organization_id = organization_id
      -            self.query_string = f'?organization_id={organization_id}'
      -        else:
      -            raise ValueError(
      -                'Incorrect or missing `organization_id` argument (should be of type str.)'
      -            )
      -
      -# Chats
      -
      -    def list_chats(self,
      -                   limit: int = None,
      -                   sort_order: str = None,
      -                   page_id: str = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Returns summaries of the chats a Customer participated in.
      -
      -            Args:
      -                limit (int): Limit of results per page. Default: 10, maximum: 25.
      -                sort_order (str): Possible values: asc, desc (default).
      -                                  Chat summaries are sorted by the creation date of its last thread.
      -                page_id (str): ID of the page with paginated results.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/list_chats{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def list_threads(self,
      -                     chat_id: str = None,
      -                     limit: str = None,
      -                     sort_order: str = None,
      -                     page_id: str = None,
      -                     min_events_count: int = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Returns threads that the current Customer has access to in a given chat.
      -
      -            Args:
      -                chat_id (str): ID of the chat for which threads are to be listed.
      -                limit (str): Limit of results per page. Default: 10, maximum: 25.
      -                sort_order (str): Possible values: asc, desc (default).
      -                                  Chat summaries are sorted by the creation date of its last thread.
      -                page_id (str): ID of the page with paginated results.
      -                min_events_count (int): Range: 1-100;
      -                    Specifies the minimum number of events to be returned in the response.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/list_threads{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def get_chat(self,
      -                 chat_id: str = None,
      -                 thread_id: str = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -        ''' Returns a thread that the current Customer has access to in a given chat.
      -
      -            Args:
      -                chat_id (str): ID of the chat for which thread is to be returned.
      -                thread_id (str): ID of the thread to show. Default: the latest thread (if exists)
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/get_chat{self.query_string}',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def start_chat(self,
      -                   chat: dict = None,
      -                   active: bool = None,
      -                   continuous: bool = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Starts a chat.
      -
      -            Args:
      -                chat (dict): Dict containing chat properties, access and thread.
      -                active (bool): When set to False, creates an inactive thread; default: True.
      -                continuous (bool): Starts chat as continuous (online group is not required); default: False.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/start_chat{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def resume_chat(self,
      -                    chat: dict = None,
      -                    active: bool = None,
      -                    continuous: bool = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Restarts an archived chat.
      -
      -            Args:
      -                chat (dict): Dict containing chat properties, access and thread.
      -                active (bool): When set to False, creates an inactive thread; default: True.
      -                continuous (bool): Starts chat as continuous (online group is not required); default: False.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/resume_chat{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def deactivate_chat(self,
      -                        id: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Deactivates a chat by closing the currently open thread.
      -            Sending messages to this thread will no longer be possible.
      -
      -            Args:
      -                id (str): ID of chat to be deactivated.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/deactivate_chat{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -# Configuration
      -
      -    def get_dynamic_configuration(self,
      -                                  group_id: int = None,
      -                                  url: str = None,
      -                                  channel_type: str = None,
      -                                  test: bool = None,
      -                                  payload: dict = None,
      -                                  headers: dict = None) -> httpx.Response:
      -        ''' Returns the dynamic configuration of a given group.
      -            It provides data to call Get Configuration and Get Localization.
      -
      -            Args:
      -                group_id (int): The ID of the group that you want to get a dynamic configuration for. ID of the default group is used if not provided.
      -                url (str): The URL that you want to get a dynamic configuration for.
      -                channel_type (str): The channel type that you want to get a dynamic configuration for.
      -                test (bool): Treats a dynamic configuration request as a test.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -           '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        payload['organization_id'] = self.organization_id
      -        return self.session.get(f'{self.api_url}/get_dynamic_configuration',
      -                                params=payload,
      -                                headers=headers)
      -
      -    def get_configuration(self,
      -                          group_id: int = None,
      -                          version: str = None,
      -                          payload: dict = None,
      -                          headers: dict = None) -> httpx.Response:
      -        ''' Returns the configuration of a given group in a given version. Contains data based on which the Chat Widget can be built.
      -
      -            Args:
      -                group_id (int): The ID of the group that you want to get a configuration for.
      -                version (str): The version that you want to get a configuration for.
      -                               Returned from Get Dynamic Configuration as the config_version parameter.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -         '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        payload['organization_id'] = self.organization_id
      -        return self.session.get(f'{self.api_url}/get_configuration',
      -                                params=payload,
      -                                headers=headers)
      -
      -# Events
      -
      -    def send_event(self,
      -                   chat_id: str = None,
      -                   event: dict = None,
      -                   attach_to_last_thread: bool = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Sends an Event object. Use this method to send a message by specifying the Message event type in the request.
      -            The method updates the requester's `events_seen_up_to` as if they've seen all chat events.
      -
      -            Args:
      -                chat_id (int): ID of the chat that you to send a message to.
      -                event (dict): The event object.
      -                attach_to_last_thread (bool): The flag is ignored for active chats.
      -                                              For inactive chats:
      -                                              True – the event will be added to the last thread;
      -                                              False – the request will fail. Default: False.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/send_event{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def upload_file(self,
      -                    file: typing.BinaryIO = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Uploads a file to the server as a temporary file. It returns a URL that expires after 24 hours unless the URL is used in `send_event`.
      -
      -            Args:
      -                file (typing.BinaryIO): File-like object with file to upload (Maximum size: 10MB).
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        return self.session.post(
      -            f'{self.api_url}/upload_file{self.query_string}',
      -            files=file,
      -            headers=headers)
      -
      -    def send_rich_message_postback(self,
      -                                   chat_id: str = None,
      -                                   event_id: str = None,
      -                                   postback: dict = None,
      -                                   thread_id: str = None,
      -                                   payload: dict = None,
      -                                   headers: dict = None) -> httpx.Response:
      -        ''' Sends a rich message postback.
      -
      -            Args:
      -                chat_id (str): ID of the chat to send rich message postback to.
      -                event_id (str): ID of the event related to the rich message postback.
      -                postback (dict): Object containing postback data (id, toggled).
      -                thread_id (str): ID of the thread to send rich message postback to.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/send_rich_message_postback{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def send_sneak_peek(self,
      -                        chat_id: str = None,
      -                        sneak_peek_text: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Sends a sneak peek to a chat.
      -
      -            Args:
      -                chat_id (str): ID of the chat to send a sneak peek to.
      -                sneak_peek_text (str): Sneak peek text.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/send_sneak_peek{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -# Localization
      -
      -    def get_localization(self,
      -                         group_id: int = None,
      -                         language: str = None,
      -                         version: str = None,
      -                         payload: dict = None,
      -                         headers: dict = None) -> httpx.Response:
      -        ''' Returns the localization of a given language and group in a given version. Contains translated phrases for the Chat Widget.
      -
      -            Args:
      -                group_id (int): ID of the group that you want to get a localization for.
      -                language (str): The language that you want to get a localization for.
      -                version (str): The version that you want to get a localization for.
      -                               Returned from `get_dynamic_configuration` as the `localization_version` parameter.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        payload['organization_id'] = self.organization_id
      -        return self.session.get(f'{self.api_url}/get_localization',
      -                                params=payload,
      -                                headers=headers)
      -
      -# Properties
      -
      -    def update_chat_properties(self,
      -                               id: str = None,
      -                               properties: dict = None,
      -                               payload: dict = None,
      -                               headers: dict = None) -> httpx.Response:
      -        ''' Updates chat properties.
      -
      -            Args:
      -                id (str): ID of the chat you to set a property for.
      -                properties (dict): Chat properties to set.
      -                                   You should stick to the general properties format and include namespace, property name and value.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/update_chat_properties{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def delete_chat_properties(self,
      -                               id: str = None,
      -                               properties: dict = None,
      -                               payload: dict = None,
      -                               headers: dict = None) -> httpx.Response:
      -        ''' Deletes chat properties.
      -
      -            Args:
      -                id (str): ID of the chat you want to delete properties of.
      -                properties (dict): Chat properties to delete.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/delete_chat_properties{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def update_thread_properties(self,
      -                                 chat_id: str = None,
      -                                 thread_id: str = None,
      -                                 properties: dict = None,
      -                                 payload: dict = None,
      -                                 headers: dict = None) -> httpx.Response:
      -        ''' Updates chat thread properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you to set properties for.
      -                thread_id (str): ID of the thread you want to set properties for.
      -                properties (dict): Thread properties to set.
      -                                   You should stick to the general properties format and include namespace, property name and value.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/update_thread_properties{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def delete_thread_properties(self,
      -                                 chat_id: str = None,
      -                                 thread_id: str = None,
      -                                 properties: dict = None,
      -                                 payload: dict = None,
      -                                 headers: dict = None) -> httpx.Response:
      -        ''' Deletes chat thread properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you want to delete the properties of.
      -                thread_id (str): ID of the thread you want to delete the properties of.
      -                properties (dict): Thread properties to delete.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/delete_thread_properties{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def update_event_properties(self,
      -                                chat_id: str = None,
      -                                thread_id: str = None,
      -                                event_id: str = None,
      -                                properties: dict = None,
      -                                payload: dict = None,
      -                                headers: dict = None) -> httpx.Response:
      -        ''' Updates event properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you to set properties for.
      -                thread_id (str): ID of the thread you want to set properties for.
      -                event_id (str): ID of the event you want to set properties for.
      -                properties (dict): Thread properties to set.
      -                                   You should stick to the general properties format and include namespace, property name and value.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/update_event_properties{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def delete_event_properties(self,
      -                                chat_id: str = None,
      -                                thread_id: str = None,
      -                                event_id: str = None,
      -                                properties: dict = None,
      -                                payload: dict = None,
      -                                headers: dict = None) -> httpx.Response:
      -        ''' Deletes event properties.
      -
      -            Args:
      -                chat_id (str): ID of the chat you to delete the properties for.
      -                thread_id (str): ID of the thread you want to delete the properties for.
      -                event_id (str): ID of the event you want to delete the properties for.
      -                properties (dict): Event properties to delete.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/delete_event_properties{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def list_license_properties(self,
      -                                namespace: str = None,
      -                                name: str = None,
      -                                headers: dict = None) -> httpx.Response:
      -        ''' Returns the properties of a given license. It only returns the properties a Customer has access to.
      -
      -            Args:
      -                namespace (str): Property namespace to retrieve.
      -                name (str): Property name.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        params = {}
      -        if namespace:
      -            params['namespace'] = namespace
      -        if name:
      -            params['name'] = name
      -        params['organization_id'] = self.organization_id
      -        return self.session.get(f'{self.api_url}/list_license_properties',
      -                                params=params,
      -                                headers=headers)
      -
      -    def list_group_properties(self,
      -                              group_id: int = None,
      -                              namespace: str = None,
      -                              name: str = None,
      -                              headers: dict = None) -> httpx.Response:
      -        ''' Returns the properties of a given group. It only returns the properties a Customer has access to.
      -            Args:
      -                group_id (int): ID of the group you want to return the properties of.
      -                namespace (str): Property namespace to retrieve.
      -                name (str): Property name.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        params = {}
      -        if namespace:
      -            params['namespace'] = namespace
      -        if name:
      -            params['name'] = name
      -        if group_id is not None:
      -            params['id'] = str(group_id)
      -        params['organization_id'] = self.organization_id
      -        return self.session.get(f'{self.api_url}/list_group_properties',
      -                                params=params,
      -                                headers=headers)
      -
      -# Customers
      -
      -    def get_customer(self,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Returns the info about the Customer requesting it.
      -
      -            Args:
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        return self.session.post(
      -            f'{self.api_url}/get_customer{self.query_string}',
      -            json={} if payload is None else payload,
      -            headers=headers)
      -
      -    def update_customer(self,
      -                        name: str = None,
      -                        email: str = None,
      -                        avatar: str = None,
      -                        session_fields: list = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Updates Customer's properties.
      -
      -            Args:
      -                name (str): Name of the customer.
      -                email (str): Email of the customer.
      -                avatar (str): The URL of the Customer's avatar.
      -                session_fields (list): An array of custom object-enclosed key:value pairs.
      -                                       Respects the order of items.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/update_customer{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def set_customer_session_fields(self,
      -                                    session_fields: list = None,
      -                                    payload: dict = None,
      -                                    headers: dict = None) -> httpx.Response:
      -        ''' Updates Customer's session fields.
      -
      -            Args:
      -                session_fields (list): An array of custom object-enclosed key:value pairs.
      -                                       Respects the order of items. Max keys: 100.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/set_customer_session_fields{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -# Status
      -
      -    def list_group_statuses(self,
      -                            all: bool = None,
      -                            group_ids: list = None,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -        ''' Returns object with info about current routing statuses of agent groups.
      -            One of the optional parameters needs to be included in the request.
      -
      -            Args:
      -                all (bool): If set to True, you will get statuses of all the groups.
      -                group_ids (list): A table of groups' IDs
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/list_group_statuses{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -
      -# Other
      -
      -    def check_goals(self,
      -                    session_fields: list = None,
      -                    group_id: int = None,
      -                    page_url: str = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Customer can use this method to trigger checking if goals were achieved.
      -            Then, Agents receive the information. You should call this method to provide goals parameters for the server
      -            when the customers limit is reached. Works only for offline Customers.
      -
      -            Args:
      -                session_fields (list): An array of custom object-enclosed key:value pairs.
      -                group_id (int): Group ID to check the goals for.
      -                page_url (str): URL of the page to check the goals for.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/check_goals{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def get_form(self,
      -                 group_id: int = None,
      -                 type: str = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -        ''' Returns an empty ticket form of a prechat or postchat survey.
      -
      -            Args:
      -                group_id (int): ID of the group from which you want the form.
      -                type (str): Form type; possible values: prechat or postchat.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/get_form{self.query_string}',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def get_predicted_agent(self,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -        ''' Gets the predicted Agent - the one the Customer will chat with when the chat starts.
      -            To use this method, the Customer needs to be logged in, which can be done via the `login` method.
      -
      -            Args:
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        return self.session.post(
      -            f'{self.api_url}/get_predicted_agent{self.query_string}',
      -            json={} if payload is None else payload,
      -            headers=headers)
      -
      -    def get_url_info(self,
      -                     url: str = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Returns the info on a given URL.
      -
      -            Args:
      -                url (str): Valid website URL.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/get_url_info{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def mark_events_as_seen(self,
      -                            chat_id: str = None,
      -                            seen_up_to: str = None,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -        ''' Updates `seen_up_to` value for a given chat.
      -
      -            Args:
      -                chat_id (str): ID of the chat to update `seen_up_to`.
      -                seen_up_to (str): RFC 3339 date-time format.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/mark_events_as_seen{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def accept_greeting(self,
      -                        greeting_id: int = None,
      -                        unique_id: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Marks an incoming greeting as seen.
      -
      -            Args:
      -                greeting_id (int): ID of the greeting configured within the license to accept.
      -                unique_id (str): ID of the greeting to accept. You can get it from the `incoming_greeting` push.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/accept_greeting{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def cancel_greeting(self,
      -                        unique_id: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -        ''' Cancels a greeting (an invitation to the chat).
      -            For example, Customers could cancel greetings by minimalizing the chat widget with a greeting.
      -
      -            Args:
      -                unique_id (str): ID of the greeting to cancel. You can get it from the `incoming_greeting` push.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/cancel_greeting{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -    def request_email_verification(self,
      -                                   callback_uri: str = None,
      -                                   payload: dict = None,
      -                                   headers: dict = None) -> httpx.Response:
      -        ''' Requests the verification of the customer's email address by sending them a verification email
      -            with the identity confirmation link.
      -
      -            Args:
      -                callback_uri (str): URI to be called after the customer confirms their email address.
      -                payload (dict): Custom payload to be used as request's data.
      -                                It overrides all other parameters provided for the method.
      -                headers (dict): Custom headers to be used with session headers.
      -                                They will be merged with session-level values that are set,
      -                                however, these method-level parameters will not be persisted across requests.
      -
      -            Returns:
      -                httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request. '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(
      -            f'{self.api_url}/request_email_verification{self.query_string}',
      -            json=payload,
      -            headers=headers)
      -
      -

      Ancestors

      -
        -
      • livechat.utils.http_client.HttpClient
      • -
      -

      Methods

      -
      -
      -def accept_greeting(self, greeting_id: int = None, unique_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Marks an incoming greeting as seen.

      -

      Args

      -
      -
      greeting_id : int
      -
      ID of the greeting configured within the license to accept.
      -
      unique_id : str
      -
      ID of the greeting to accept. You can get it from the incoming_greeting push.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def accept_greeting(self,
      -                    greeting_id: int = None,
      -                    unique_id: str = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -    ''' Marks an incoming greeting as seen.
      -
      -        Args:
      -            greeting_id (int): ID of the greeting configured within the license to accept.
      -            unique_id (str): ID of the greeting to accept. You can get it from the `incoming_greeting` push.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/accept_greeting{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def cancel_greeting(self, unique_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Cancels a greeting (an invitation to the chat). -For example, Customers could cancel greetings by minimalizing the chat widget with a greeting.

      -

      Args

      -
      -
      unique_id : str
      -
      ID of the greeting to cancel. You can get it from the incoming_greeting push.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def cancel_greeting(self,
      -                    unique_id: str = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -    ''' Cancels a greeting (an invitation to the chat).
      -        For example, Customers could cancel greetings by minimalizing the chat widget with a greeting.
      -
      -        Args:
      -            unique_id (str): ID of the greeting to cancel. You can get it from the `incoming_greeting` push.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/cancel_greeting{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def check_goals(self, session_fields: list = None, group_id: int = None, page_url: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Customer can use this method to trigger checking if goals were achieved. -Then, Agents receive the information. You should call this method to provide goals parameters for the server -when the customers limit is reached. Works only for offline Customers.

      -

      Args

      -
      -
      session_fields : list
      -
      An array of custom object-enclosed key:value pairs.
      -
      group_id : int
      -
      Group ID to check the goals for.
      -
      page_url : str
      -
      URL of the page to check the goals for.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def check_goals(self,
      -                session_fields: list = None,
      -                group_id: int = None,
      -                page_url: str = None,
      -                payload: dict = None,
      -                headers: dict = None) -> httpx.Response:
      -    ''' Customer can use this method to trigger checking if goals were achieved.
      -        Then, Agents receive the information. You should call this method to provide goals parameters for the server
      -        when the customers limit is reached. Works only for offline Customers.
      -
      -        Args:
      -            session_fields (list): An array of custom object-enclosed key:value pairs.
      -            group_id (int): Group ID to check the goals for.
      -            page_url (str): URL of the page to check the goals for.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/check_goals{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def deactivate_chat(self, id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Deactivates a chat by closing the currently open thread. -Sending messages to this thread will no longer be possible.

      -

      Args

      -
      -
      id : str
      -
      ID of chat to be deactivated.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def deactivate_chat(self,
      -                    id: str = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -    ''' Deactivates a chat by closing the currently open thread.
      -        Sending messages to this thread will no longer be possible.
      -
      -        Args:
      -            id (str): ID of chat to be deactivated.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/deactivate_chat{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def delete_chat_properties(self, id: str = None, properties: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Deletes chat properties.

      -

      Args

      -
      -
      id : str
      -
      ID of the chat you want to delete properties of.
      -
      properties : dict
      -
      Chat properties to delete.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def delete_chat_properties(self,
      -                           id: str = None,
      -                           properties: dict = None,
      -                           payload: dict = None,
      -                           headers: dict = None) -> httpx.Response:
      -    ''' Deletes chat properties.
      -
      -        Args:
      -            id (str): ID of the chat you want to delete properties of.
      -            properties (dict): Chat properties to delete.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/delete_chat_properties{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def delete_event_properties(self, chat_id: str = None, thread_id: str = None, event_id: str = None, properties: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Deletes event properties.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you to delete the properties for.
      -
      thread_id : str
      -
      ID of the thread you want to delete the properties for.
      -
      event_id : str
      -
      ID of the event you want to delete the properties for.
      -
      properties : dict
      -
      Event properties to delete.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def delete_event_properties(self,
      -                            chat_id: str = None,
      -                            thread_id: str = None,
      -                            event_id: str = None,
      -                            properties: dict = None,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -    ''' Deletes event properties.
      -
      -        Args:
      -            chat_id (str): ID of the chat you to delete the properties for.
      -            thread_id (str): ID of the thread you want to delete the properties for.
      -            event_id (str): ID of the event you want to delete the properties for.
      -            properties (dict): Event properties to delete.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/delete_event_properties{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def delete_thread_properties(self, chat_id: str = None, thread_id: str = None, properties: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Deletes chat thread properties.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you want to delete the properties of.
      -
      thread_id : str
      -
      ID of the thread you want to delete the properties of.
      -
      properties : dict
      -
      Thread properties to delete.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def delete_thread_properties(self,
      -                             chat_id: str = None,
      -                             thread_id: str = None,
      -                             properties: dict = None,
      -                             payload: dict = None,
      -                             headers: dict = None) -> httpx.Response:
      -    ''' Deletes chat thread properties.
      -
      -        Args:
      -            chat_id (str): ID of the chat you want to delete the properties of.
      -            thread_id (str): ID of the thread you want to delete the properties of.
      -            properties (dict): Thread properties to delete.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/delete_thread_properties{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def get_chat(self, chat_id: str = None, thread_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns a thread that the current Customer has access to in a given chat.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat for which thread is to be returned.
      -
      thread_id : str
      -
      ID of the thread to show. Default: the latest thread (if exists)
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def get_chat(self,
      -             chat_id: str = None,
      -             thread_id: str = None,
      -             payload: dict = None,
      -             headers: dict = None) -> httpx.Response:
      -    ''' Returns a thread that the current Customer has access to in a given chat.
      -
      -        Args:
      -            chat_id (str): ID of the chat for which thread is to be returned.
      -            thread_id (str): ID of the thread to show. Default: the latest thread (if exists)
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/get_chat{self.query_string}',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def get_configuration(self, group_id: int = None, version: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns the configuration of a given group in a given version. Contains data based on which the Chat Widget can be built.

      -

      Args

      -
      -
      group_id : int
      -
      The ID of the group that you want to get a configuration for.
      -
      version : str
      -
      The version that you want to get a configuration for. -Returned from Get Dynamic Configuration as the config_version parameter.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def get_configuration(self,
      -                      group_id: int = None,
      -                      version: str = None,
      -                      payload: dict = None,
      -                      headers: dict = None) -> httpx.Response:
      -    ''' Returns the configuration of a given group in a given version. Contains data based on which the Chat Widget can be built.
      -
      -        Args:
      -            group_id (int): The ID of the group that you want to get a configuration for.
      -            version (str): The version that you want to get a configuration for.
      -                           Returned from Get Dynamic Configuration as the config_version parameter.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -     '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    payload['organization_id'] = self.organization_id
      -    return self.session.get(f'{self.api_url}/get_configuration',
      -                            params=payload,
      -                            headers=headers)
      -
      -
      -
      -def get_customer(self, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns the info about the Customer requesting it.

      -

      Args

      -
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def get_customer(self,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -    ''' Returns the info about the Customer requesting it.
      -
      -        Args:
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    return self.session.post(
      -        f'{self.api_url}/get_customer{self.query_string}',
      -        json={} if payload is None else payload,
      -        headers=headers)
      -
      -
      -
      -def get_dynamic_configuration(self, group_id: int = None, url: str = None, channel_type: str = None, test: bool = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns the dynamic configuration of a given group. -It provides data to call Get Configuration and Get Localization.

      -

      Args

      -
      -
      group_id : int
      -
      The ID of the group that you want to get a dynamic configuration for. ID of the default group is used if not provided.
      -
      url : str
      -
      The URL that you want to get a dynamic configuration for.
      -
      channel_type : str
      -
      The channel type that you want to get a dynamic configuration for.
      -
      test : bool
      -
      Treats a dynamic configuration request as a test.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def get_dynamic_configuration(self,
      -                              group_id: int = None,
      -                              url: str = None,
      -                              channel_type: str = None,
      -                              test: bool = None,
      -                              payload: dict = None,
      -                              headers: dict = None) -> httpx.Response:
      -    ''' Returns the dynamic configuration of a given group.
      -        It provides data to call Get Configuration and Get Localization.
      -
      -        Args:
      -            group_id (int): The ID of the group that you want to get a dynamic configuration for. ID of the default group is used if not provided.
      -            url (str): The URL that you want to get a dynamic configuration for.
      -            channel_type (str): The channel type that you want to get a dynamic configuration for.
      -            test (bool): Treats a dynamic configuration request as a test.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -       '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    payload['organization_id'] = self.organization_id
      -    return self.session.get(f'{self.api_url}/get_dynamic_configuration',
      -                            params=payload,
      -                            headers=headers)
      -
      -
      -
      -def get_form(self, group_id: int = None, type: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns an empty ticket form of a prechat or postchat survey.

      -

      Args

      -
      -
      group_id : int
      -
      ID of the group from which you want the form.
      -
      type : str
      -
      Form type; possible values: prechat or postchat.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def get_form(self,
      -             group_id: int = None,
      -             type: str = None,
      -             payload: dict = None,
      -             headers: dict = None) -> httpx.Response:
      -    ''' Returns an empty ticket form of a prechat or postchat survey.
      -
      -        Args:
      -            group_id (int): ID of the group from which you want the form.
      -            type (str): Form type; possible values: prechat or postchat.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/get_form{self.query_string}',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def get_localization(self, group_id: int = None, language: str = None, version: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns the localization of a given language and group in a given version. Contains translated phrases for the Chat Widget.

      -

      Args

      -
      -
      group_id : int
      -
      ID of the group that you want to get a localization for.
      -
      language : str
      -
      The language that you want to get a localization for.
      -
      version : str
      -
      The version that you want to get a localization for. -Returned from get_dynamic_configuration as the localization_version parameter.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def get_localization(self,
      -                     group_id: int = None,
      -                     language: str = None,
      -                     version: str = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -    ''' Returns the localization of a given language and group in a given version. Contains translated phrases for the Chat Widget.
      -
      -        Args:
      -            group_id (int): ID of the group that you want to get a localization for.
      -            language (str): The language that you want to get a localization for.
      -            version (str): The version that you want to get a localization for.
      -                           Returned from `get_dynamic_configuration` as the `localization_version` parameter.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    payload['organization_id'] = self.organization_id
      -    return self.session.get(f'{self.api_url}/get_localization',
      -                            params=payload,
      -                            headers=headers)
      -
      -
      -
      -def get_predicted_agent(self, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Gets the predicted Agent - the one the Customer will chat with when the chat starts. -To use this method, the Customer needs to be logged in, which can be done via the login method.

      -

      Args

      -
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def get_predicted_agent(self,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -    ''' Gets the predicted Agent - the one the Customer will chat with when the chat starts.
      -        To use this method, the Customer needs to be logged in, which can be done via the `login` method.
      -
      -        Args:
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    return self.session.post(
      -        f'{self.api_url}/get_predicted_agent{self.query_string}',
      -        json={} if payload is None else payload,
      -        headers=headers)
      -
      -
      -
      -def get_url_info(self, url: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns the info on a given URL.

      -

      Args

      -
      -
      url : str
      -
      Valid website URL.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def get_url_info(self,
      -                 url: str = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -    ''' Returns the info on a given URL.
      -
      -        Args:
      -            url (str): Valid website URL.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/get_url_info{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def list_chats(self, limit: int = None, sort_order: str = None, page_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns summaries of the chats a Customer participated in.

      -

      Args

      -
      -
      limit : int
      -
      Limit of results per page. Default: 10, maximum: 25.
      -
      sort_order : str
      -
      Possible values: asc, desc (default). -Chat summaries are sorted by the creation date of its last thread.
      -
      page_id : str
      -
      ID of the page with paginated results.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_chats(self,
      -               limit: int = None,
      -               sort_order: str = None,
      -               page_id: str = None,
      -               payload: dict = None,
      -               headers: dict = None) -> httpx.Response:
      -    ''' Returns summaries of the chats a Customer participated in.
      -
      -        Args:
      -            limit (int): Limit of results per page. Default: 10, maximum: 25.
      -            sort_order (str): Possible values: asc, desc (default).
      -                              Chat summaries are sorted by the creation date of its last thread.
      -            page_id (str): ID of the page with paginated results.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/list_chats{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def list_group_properties(self, group_id: int = None, namespace: str = None, name: str = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns the properties of a given group. It only returns the properties a Customer has access to.

      -

      Args

      -
      -
      group_id : int
      -
      ID of the group you want to return the properties of.
      -
      namespace : str
      -
      Property namespace to retrieve.
      -
      name : str
      -
      Property name.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_group_properties(self,
      -                          group_id: int = None,
      -                          namespace: str = None,
      -                          name: str = None,
      -                          headers: dict = None) -> httpx.Response:
      -    ''' Returns the properties of a given group. It only returns the properties a Customer has access to.
      -        Args:
      -            group_id (int): ID of the group you want to return the properties of.
      -            namespace (str): Property namespace to retrieve.
      -            name (str): Property name.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    params = {}
      -    if namespace:
      -        params['namespace'] = namespace
      -    if name:
      -        params['name'] = name
      -    if group_id is not None:
      -        params['id'] = str(group_id)
      -    params['organization_id'] = self.organization_id
      -    return self.session.get(f'{self.api_url}/list_group_properties',
      -                            params=params,
      -                            headers=headers)
      -
      -
      -
      -def list_group_statuses(self, all: bool = None, group_ids: list = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns object with info about current routing statuses of agent groups. -One of the optional parameters needs to be included in the request.

      -

      Args

      -
      -
      all : bool
      -
      If set to True, you will get statuses of all the groups.
      -
      group_ids : list
      -
      A table of groups' IDs
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_group_statuses(self,
      -                        all: bool = None,
      -                        group_ids: list = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -    ''' Returns object with info about current routing statuses of agent groups.
      -        One of the optional parameters needs to be included in the request.
      -
      -        Args:
      -            all (bool): If set to True, you will get statuses of all the groups.
      -            group_ids (list): A table of groups' IDs
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/list_group_statuses{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def list_license_properties(self, namespace: str = None, name: str = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns the properties of a given license. It only returns the properties a Customer has access to.

      -

      Args

      -
      -
      namespace : str
      -
      Property namespace to retrieve.
      -
      name : str
      -
      Property name.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_license_properties(self,
      -                            namespace: str = None,
      -                            name: str = None,
      -                            headers: dict = None) -> httpx.Response:
      -    ''' Returns the properties of a given license. It only returns the properties a Customer has access to.
      -
      -        Args:
      -            namespace (str): Property namespace to retrieve.
      -            name (str): Property name.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    params = {}
      -    if namespace:
      -        params['namespace'] = namespace
      -    if name:
      -        params['name'] = name
      -    params['organization_id'] = self.organization_id
      -    return self.session.get(f'{self.api_url}/list_license_properties',
      -                            params=params,
      -                            headers=headers)
      -
      -
      -
      -def list_threads(self, chat_id: str = None, limit: str = None, sort_order: str = None, page_id: str = None, min_events_count: int = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns threads that the current Customer has access to in a given chat.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat for which threads are to be listed.
      -
      limit : str
      -
      Limit of results per page. Default: 10, maximum: 25.
      -
      sort_order : str
      -
      Possible values: asc, desc (default). -Chat summaries are sorted by the creation date of its last thread.
      -
      page_id : str
      -
      ID of the page with paginated results.
      -
      min_events_count : int
      -
      Range: 1-100; -Specifies the minimum number of events to be returned in the response.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def list_threads(self,
      -                 chat_id: str = None,
      -                 limit: str = None,
      -                 sort_order: str = None,
      -                 page_id: str = None,
      -                 min_events_count: int = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -    ''' Returns threads that the current Customer has access to in a given chat.
      -
      -        Args:
      -            chat_id (str): ID of the chat for which threads are to be listed.
      -            limit (str): Limit of results per page. Default: 10, maximum: 25.
      -            sort_order (str): Possible values: asc, desc (default).
      -                              Chat summaries are sorted by the creation date of its last thread.
      -            page_id (str): ID of the page with paginated results.
      -            min_events_count (int): Range: 1-100;
      -                Specifies the minimum number of events to be returned in the response.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/list_threads{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def mark_events_as_seen(self, chat_id: str = None, seen_up_to: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Updates seen_up_to value for a given chat.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat to update seen_up_to.
      -
      seen_up_to : str
      -
      RFC 3339 date-time format.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def mark_events_as_seen(self,
      -                        chat_id: str = None,
      -                        seen_up_to: str = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -    ''' Updates `seen_up_to` value for a given chat.
      -
      -        Args:
      -            chat_id (str): ID of the chat to update `seen_up_to`.
      -            seen_up_to (str): RFC 3339 date-time format.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/mark_events_as_seen{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def request_email_verification(self, callback_uri: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Requests the verification of the customer's email address by sending them a verification email -with the identity confirmation link.

      -

      Args

      -
      -
      callback_uri : str
      -
      URI to be called after the customer confirms their email address.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def request_email_verification(self,
      -                               callback_uri: str = None,
      -                               payload: dict = None,
      -                               headers: dict = None) -> httpx.Response:
      -    ''' Requests the verification of the customer's email address by sending them a verification email
      -        with the identity confirmation link.
      -
      -        Args:
      -            callback_uri (str): URI to be called after the customer confirms their email address.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/request_email_verification{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def resume_chat(self, chat: dict = None, active: bool = None, continuous: bool = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Restarts an archived chat.

      -

      Args

      -
      -
      chat : dict
      -
      Dict containing chat properties, access and thread.
      -
      active : bool
      -
      When set to False, creates an inactive thread; default: True.
      -
      continuous : bool
      -
      Starts chat as continuous (online group is not required); default: False.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def resume_chat(self,
      -                chat: dict = None,
      -                active: bool = None,
      -                continuous: bool = None,
      -                payload: dict = None,
      -                headers: dict = None) -> httpx.Response:
      -    ''' Restarts an archived chat.
      -
      -        Args:
      -            chat (dict): Dict containing chat properties, access and thread.
      -            active (bool): When set to False, creates an inactive thread; default: True.
      -            continuous (bool): Starts chat as continuous (online group is not required); default: False.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/resume_chat{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def send_event(self, chat_id: str = None, event: dict = None, attach_to_last_thread: bool = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Sends an Event object. Use this method to send a message by specifying the Message event type in the request. -The method updates the requester's events_seen_up_to as if they've seen all chat events.

      -

      Args

      -
      -
      chat_id : int
      -
      ID of the chat that you to send a message to.
      -
      event : dict
      -
      The event object.
      -
      attach_to_last_thread : bool
      -
      The flag is ignored for active chats. -For inactive chats: -True – the event will be added to the last thread; -False – the request will fail. Default: False.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def send_event(self,
      -               chat_id: str = None,
      -               event: dict = None,
      -               attach_to_last_thread: bool = None,
      -               payload: dict = None,
      -               headers: dict = None) -> httpx.Response:
      -    ''' Sends an Event object. Use this method to send a message by specifying the Message event type in the request.
      -        The method updates the requester's `events_seen_up_to` as if they've seen all chat events.
      -
      -        Args:
      -            chat_id (int): ID of the chat that you to send a message to.
      -            event (dict): The event object.
      -            attach_to_last_thread (bool): The flag is ignored for active chats.
      -                                          For inactive chats:
      -                                          True – the event will be added to the last thread;
      -                                          False – the request will fail. Default: False.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/send_event{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def send_rich_message_postback(self, chat_id: str = None, event_id: str = None, postback: dict = None, thread_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Sends a rich message postback.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat to send rich message postback to.
      -
      event_id : str
      -
      ID of the event related to the rich message postback.
      -
      postback : dict
      -
      Object containing postback data (id, toggled).
      -
      thread_id : str
      -
      ID of the thread to send rich message postback to.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def send_rich_message_postback(self,
      -                               chat_id: str = None,
      -                               event_id: str = None,
      -                               postback: dict = None,
      -                               thread_id: str = None,
      -                               payload: dict = None,
      -                               headers: dict = None) -> httpx.Response:
      -    ''' Sends a rich message postback.
      -
      -        Args:
      -            chat_id (str): ID of the chat to send rich message postback to.
      -            event_id (str): ID of the event related to the rich message postback.
      -            postback (dict): Object containing postback data (id, toggled).
      -            thread_id (str): ID of the thread to send rich message postback to.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/send_rich_message_postback{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def send_sneak_peek(self, chat_id: str = None, sneak_peek_text: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Sends a sneak peek to a chat.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat to send a sneak peek to.
      -
      sneak_peek_text : str
      -
      Sneak peek text.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def send_sneak_peek(self,
      -                    chat_id: str = None,
      -                    sneak_peek_text: str = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -    ''' Sends a sneak peek to a chat.
      -
      -        Args:
      -            chat_id (str): ID of the chat to send a sneak peek to.
      -            sneak_peek_text (str): Sneak peek text.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/send_sneak_peek{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def set_customer_session_fields(self, session_fields: list = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Updates Customer's session fields.

      -

      Args

      -
      -
      session_fields : list
      -
      An array of custom object-enclosed key:value pairs. -Respects the order of items. Max keys: 100.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def set_customer_session_fields(self,
      -                                session_fields: list = None,
      -                                payload: dict = None,
      -                                headers: dict = None) -> httpx.Response:
      -    ''' Updates Customer's session fields.
      -
      -        Args:
      -            session_fields (list): An array of custom object-enclosed key:value pairs.
      -                                   Respects the order of items. Max keys: 100.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/set_customer_session_fields{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def start_chat(self, chat: dict = None, active: bool = None, continuous: bool = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Starts a chat.

      -

      Args

      -
      -
      chat : dict
      -
      Dict containing chat properties, access and thread.
      -
      active : bool
      -
      When set to False, creates an inactive thread; default: True.
      -
      continuous : bool
      -
      Starts chat as continuous (online group is not required); default: False.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def start_chat(self,
      -               chat: dict = None,
      -               active: bool = None,
      -               continuous: bool = None,
      -               payload: dict = None,
      -               headers: dict = None) -> httpx.Response:
      -    ''' Starts a chat.
      -
      -        Args:
      -            chat (dict): Dict containing chat properties, access and thread.
      -            active (bool): When set to False, creates an inactive thread; default: True.
      -            continuous (bool): Starts chat as continuous (online group is not required); default: False.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/start_chat{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def update_chat_properties(self, id: str = None, properties: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Updates chat properties.

      -

      Args

      -
      -
      id : str
      -
      ID of the chat you to set a property for.
      -
      properties : dict
      -
      Chat properties to set. -You should stick to the general properties format and include namespace, property name and value.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def update_chat_properties(self,
      -                           id: str = None,
      -                           properties: dict = None,
      -                           payload: dict = None,
      -                           headers: dict = None) -> httpx.Response:
      -    ''' Updates chat properties.
      -
      -        Args:
      -            id (str): ID of the chat you to set a property for.
      -            properties (dict): Chat properties to set.
      -                               You should stick to the general properties format and include namespace, property name and value.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/update_chat_properties{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def update_customer(self, name: str = None, email: str = None, avatar: str = None, session_fields: list = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Updates Customer's properties.

      -

      Args

      -
      -
      name : str
      -
      Name of the customer.
      -
      email : str
      -
      Email of the customer.
      -
      avatar : str
      -
      The URL of the Customer's avatar.
      -
      session_fields : list
      -
      An array of custom object-enclosed key:value pairs. -Respects the order of items.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def update_customer(self,
      -                    name: str = None,
      -                    email: str = None,
      -                    avatar: str = None,
      -                    session_fields: list = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -    ''' Updates Customer's properties.
      -
      -        Args:
      -            name (str): Name of the customer.
      -            email (str): Email of the customer.
      -            avatar (str): The URL of the Customer's avatar.
      -            session_fields (list): An array of custom object-enclosed key:value pairs.
      -                                   Respects the order of items.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/update_customer{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def update_event_properties(self, chat_id: str = None, thread_id: str = None, event_id: str = None, properties: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Updates event properties.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you to set properties for.
      -
      thread_id : str
      -
      ID of the thread you want to set properties for.
      -
      event_id : str
      -
      ID of the event you want to set properties for.
      -
      properties : dict
      -
      Thread properties to set. -You should stick to the general properties format and include namespace, property name and value.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def update_event_properties(self,
      -                            chat_id: str = None,
      -                            thread_id: str = None,
      -                            event_id: str = None,
      -                            properties: dict = None,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -    ''' Updates event properties.
      -
      -        Args:
      -            chat_id (str): ID of the chat you to set properties for.
      -            thread_id (str): ID of the thread you want to set properties for.
      -            event_id (str): ID of the event you want to set properties for.
      -            properties (dict): Thread properties to set.
      -                               You should stick to the general properties format and include namespace, property name and value.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/update_event_properties{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def update_thread_properties(self, chat_id: str = None, thread_id: str = None, properties: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Updates chat thread properties.

      -

      Args

      -
      -
      chat_id : str
      -
      ID of the chat you to set properties for.
      -
      thread_id : str
      -
      ID of the thread you want to set properties for.
      -
      properties : dict
      -
      Thread properties to set. -You should stick to the general properties format and include namespace, property name and value.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def update_thread_properties(self,
      -                             chat_id: str = None,
      -                             thread_id: str = None,
      -                             properties: dict = None,
      -                             payload: dict = None,
      -                             headers: dict = None) -> httpx.Response:
      -    ''' Updates chat thread properties.
      -
      -        Args:
      -            chat_id (str): ID of the chat you to set properties for.
      -            thread_id (str): ID of the thread you want to set properties for.
      -            properties (dict): Thread properties to set.
      -                               You should stick to the general properties format and include namespace, property name and value.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(
      -        f'{self.api_url}/update_thread_properties{self.query_string}',
      -        json=payload,
      -        headers=headers)
      -
      -
      -
      -def upload_file(self, file: typing.BinaryIO = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Uploads a file to the server as a temporary file. It returns a URL that expires after 24 hours unless the URL is used in send_event.

      -

      Args

      -
      -
      file : typing.BinaryIO
      -
      File-like object with file to upload (Maximum size: 10MB).
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def upload_file(self,
      -                file: typing.BinaryIO = None,
      -                headers: dict = None) -> httpx.Response:
      -    ''' Uploads a file to the server as a temporary file. It returns a URL that expires after 24 hours unless the URL is used in `send_event`.
      -
      -        Args:
      -            file (typing.BinaryIO): File-like object with file to upload (Maximum size: 10MB).
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request. '''
      -    return self.session.post(
      -        f'{self.api_url}/upload_file{self.query_string}',
      -        files=file,
      -        headers=headers)
      -
      -
      -
      -
      -
      -
      -
      - -
      - - - \ No newline at end of file diff --git a/docs/customer/web/api/v36.html b/docs/customer/web/api/v36.html index 95af5ec..fe9e545 100644 --- a/docs/customer/web/api/v36.html +++ b/docs/customer/web/api/v36.html @@ -75,12 +75,12 @@

      Module livechat.customer.web.api.v36

      page_id: str = None, payload: dict = None, headers: dict = None) -> httpx.Response: - ''' Returns summaries of the chats a Customer participated in. + ''' Returns chat info for the chats a Customer participated in. Args: limit (int): Limit of results per page. Default: 10, maximum: 25. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation date of its last thread. + Chat info entries are sorted by the creation date of its last thread. page_id (str): ID of the page with paginated results. payload (dict): Custom payload to be used as request's data. It overrides all other parameters provided for the method. @@ -113,7 +113,7 @@

      Module livechat.customer.web.api.v36

      chat_id (str): ID of the chat for which threads are to be listed. limit (str): Limit of results per page. Default: 10, maximum: 25. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation date of its last thread. + Chat info entries are sorted by the creation date of its last thread. page_id (str): ID of the page with paginated results. min_events_count (int): Range: 1-100; Specifies the minimum number of events to be returned in the response. @@ -729,7 +729,9 @@

      Module livechat.customer.web.api.v36

      def update_customer(self, name: str = None, + name_is_default: bool = None, email: str = None, + phone_number: str = None, avatar: str = None, session_fields: list = None, payload: dict = None, @@ -738,7 +740,9 @@

      Module livechat.customer.web.api.v36

      Args: name (str): Name of the customer. + name_is_default (bool): Flag which states if the name is default. email (str): Email of the customer. + phone_number (str): Phone number of the customer. avatar (str): The URL of the Customer's avatar. session_fields (list): An array of custom object-enclosed key:value pairs. Respects the order of items. @@ -896,6 +900,28 @@

      Module livechat.customer.web.api.v36

      f'{self.api_url}/get_predicted_agent{self.query_string}', json={} if payload is None else payload, headers=headers) + + def request_welcome_message(self, + payload: dict = None, + headers: dict = None) -> httpx.Response: + ''' Requests a welcome message. + To use this method, the Customer needs to be logged in, which can be done via the `login` method. + + Args: + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + headers (dict): Custom headers to be used with session headers. + They will be merged with session-level values that are set, + however, these method-level parameters will not be persisted across requests. + + Returns: + httpx.Response: The Response object from `httpx` library, + which contains a server’s response to an HTTP request. + ''' + return self.session.post( + f'{self.api_url}/request_welcome_message{self.query_string}', + json={} if payload is None else payload, + headers=headers) def get_url_info(self, url: str = None, @@ -1079,12 +1105,12 @@

      Classes

      page_id: str = None, payload: dict = None, headers: dict = None) -> httpx.Response: - ''' Returns summaries of the chats a Customer participated in. + ''' Returns chat info for the chats a Customer participated in. Args: limit (int): Limit of results per page. Default: 10, maximum: 25. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation date of its last thread. + Chat info entries are sorted by the creation date of its last thread. page_id (str): ID of the page with paginated results. payload (dict): Custom payload to be used as request's data. It overrides all other parameters provided for the method. @@ -1117,7 +1143,7 @@

      Classes

      chat_id (str): ID of the chat for which threads are to be listed. limit (str): Limit of results per page. Default: 10, maximum: 25. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation date of its last thread. + Chat info entries are sorted by the creation date of its last thread. page_id (str): ID of the page with paginated results. min_events_count (int): Range: 1-100; Specifies the minimum number of events to be returned in the response. @@ -1733,7 +1759,9 @@

      Classes

      def update_customer(self, name: str = None, + name_is_default: bool = None, email: str = None, + phone_number: str = None, avatar: str = None, session_fields: list = None, payload: dict = None, @@ -1742,7 +1770,9 @@

      Classes

      Args: name (str): Name of the customer. + name_is_default (bool): Flag which states if the name is default. email (str): Email of the customer. + phone_number (str): Phone number of the customer. avatar (str): The URL of the Customer's avatar. session_fields (list): An array of custom object-enclosed key:value pairs. Respects the order of items. @@ -1900,6 +1930,28 @@

      Classes

      f'{self.api_url}/get_predicted_agent{self.query_string}', json={} if payload is None else payload, headers=headers) + + def request_welcome_message(self, + payload: dict = None, + headers: dict = None) -> httpx.Response: + ''' Requests a welcome message. + To use this method, the Customer needs to be logged in, which can be done via the `login` method. + + Args: + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + headers (dict): Custom headers to be used with session headers. + They will be merged with session-level values that are set, + however, these method-level parameters will not be persisted across requests. + + Returns: + httpx.Response: The Response object from `httpx` library, + which contains a server’s response to an HTTP request. + ''' + return self.session.post( + f'{self.api_url}/request_welcome_message{self.query_string}', + json={} if payload is None else payload, + headers=headers) def get_url_info(self, url: str = None, @@ -2957,14 +3009,14 @@

      Returns

      def list_chats(self, limit: int = None, sort_order: str = None, page_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
      -

      Returns summaries of the chats a Customer participated in.

      +

      Returns chat info for the chats a Customer participated in.

      Args

      limit : int
      Limit of results per page. Default: 10, maximum: 25.
      sort_order : str
      Possible values: asc, desc (default). -Chat summaries are sorted by the creation date of its last thread.
      +Chat info entries are sorted by the creation date of its last thread.
      page_id : str
      ID of the page with paginated results.
      payload : dict
      @@ -2991,12 +3043,12 @@

      Returns

      page_id: str = None, payload: dict = None, headers: dict = None) -> httpx.Response: - ''' Returns summaries of the chats a Customer participated in. + ''' Returns chat info for the chats a Customer participated in. Args: limit (int): Limit of results per page. Default: 10, maximum: 25. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation date of its last thread. + Chat info entries are sorted by the creation date of its last thread. page_id (str): ID of the page with paginated results. payload (dict): Custom payload to be used as request's data. It overrides all other parameters provided for the method. @@ -3199,7 +3251,7 @@

      Args

      Limit of results per page. Default: 10, maximum: 25.
      sort_order : str
      Possible values: asc, desc (default). -Chat summaries are sorted by the creation date of its last thread.
      +Chat info entries are sorted by the creation date of its last thread.
  • page_id : str
    ID of the page with paginated results.
    min_events_count : int
    @@ -3237,7 +3289,7 @@

    Returns

    chat_id (str): ID of the chat for which threads are to be listed. limit (str): Limit of results per page. Default: 10, maximum: 25. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation date of its last thread. + Chat info entries are sorted by the creation date of its last thread. page_id (str): ID of the page with paginated results. min_events_count (int): Range: 1-100; Specifies the minimum number of events to be returned in the response. @@ -3369,6 +3421,55 @@

    Returns

    headers=headers)
    +
    +def request_welcome_message(self, payload: dict = None, headers: dict = None) ‑> httpx.Response +
    +
    +

    Requests a welcome message. +To use this method, the Customer needs to be logged in, which can be done via the login method.

    +

    Args

    +
    +
    payload : dict
    +
    Custom payload to be used as request's data. +It overrides all other parameters provided for the method.
    +
    headers : dict
    +
    Custom headers to be used with session headers. +They will be merged with session-level values that are set, +however, these method-level parameters will not be persisted across requests.
    +
    +

    Returns

    +
    +
    httpx.Response
    +
    The Response object from httpx library, +which contains a server’s response to an HTTP request.
    +
    +
    + +Expand source code + +
    def request_welcome_message(self,
    +                        payload: dict = None,
    +                        headers: dict = None) -> httpx.Response:
    +    ''' Requests a welcome message.
    +        To use this method, the Customer needs to be logged in, which can be done via the `login` method.
    +
    +        Args:
    +            payload (dict): Custom payload to be used as request's data.
    +                            It overrides all other parameters provided for the method.
    +            headers (dict): Custom headers to be used with session headers.
    +                            They will be merged with session-level values that are set,
    +                            however, these method-level parameters will not be persisted across requests.
    +
    +        Returns:
    +            httpx.Response: The Response object from `httpx` library,
    +                            which contains a server’s response to an HTTP request.
    +    '''
    +    return self.session.post(
    +        f'{self.api_url}/request_welcome_message{self.query_string}',
    +        json={} if payload is None else payload,
    +        headers=headers)
    +
    +
    def resume_chat(self, chat: dict = None, active: bool = None, continuous: bool = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
    @@ -3793,7 +3894,7 @@

    Returns

    -def update_customer(self, name: str = None, email: str = None, avatar: str = None, session_fields: list = None, payload: dict = None, headers: dict = None) ‑> httpx.Response +def update_customer(self, name: str = None, name_is_default: bool = None, email: str = None, phone_number: str = None, avatar: str = None, session_fields: list = None, payload: dict = None, headers: dict = None) ‑> httpx.Response

    Updates Customer's properties.

    @@ -3801,8 +3902,12 @@

    Args

    name : str
    Name of the customer.
    +
    name_is_default : bool
    +
    Flag which states if the name is default.
    email : str
    Email of the customer.
    +
    phone_number : str
    +
    Phone number of the customer.
    avatar : str
    The URL of the Customer's avatar.
    session_fields : list
    @@ -3828,7 +3933,9 @@

    Returns

    def update_customer(self,
                         name: str = None,
    +                    name_is_default: bool = None,
                         email: str = None,
    +                    phone_number: str = None,
                         avatar: str = None,
                         session_fields: list = None,
                         payload: dict = None,
    @@ -3837,7 +3944,9 @@ 

    Returns

    Args: name (str): Name of the customer. + name_is_default (bool): Flag which states if the name is default. email (str): Email of the customer. + phone_number (str): Phone number of the customer. avatar (str): The URL of the Customer's avatar. session_fields (list): An array of custom object-enclosed key:value pairs. Respects the order of items. @@ -4075,6 +4184,7 @@

    list_threads
  • mark_events_as_seen
  • request_email_verification
  • +
  • request_welcome_message
  • resume_chat
  • send_event
  • send_rich_message_postback
  • diff --git a/docs/customer/web/api/v37.html b/docs/customer/web/api/v37.html index 4d24b41..d085cdc 100644 --- a/docs/customer/web/api/v37.html +++ b/docs/customer/web/api/v37.html @@ -75,12 +75,12 @@

    Module livechat.customer.web.api.v37

    page_id: str = None, payload: dict = None, headers: dict = None) -> httpx.Response: - ''' Returns summaries of the chats a Customer participated in. + ''' Returns chat info for the chats a Customer participated in. Args: limit (int): Limit of results per page. Default: 10, maximum: 25. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation date of its last thread. + Chat info entries are sorted by the creation date of its last thread. page_id (str): ID of the page with paginated results. payload (dict): Custom payload to be used as request's data. It overrides all other parameters provided for the method. @@ -113,7 +113,7 @@

    Module livechat.customer.web.api.v37

    chat_id (str): ID of the chat for which threads are to be listed. limit (str): Limit of results per page. Default: 10, maximum: 25. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation date of its last thread. + Chat info entries are sorted by the creation date of its last thread. page_id (str): ID of the page with paginated results. min_events_count (int): Range: 1-100; Specifies the minimum number of events to be returned in the response. @@ -729,7 +729,9 @@

    Module livechat.customer.web.api.v37

    def update_customer(self, name: str = None, + name_is_default: bool = None, email: str = None, + phone_number: str = None, avatar: str = None, session_fields: list = None, payload: dict = None, @@ -738,7 +740,9 @@

    Module livechat.customer.web.api.v37

    Args: name (str): Name of the customer. + name_is_default (bool): Flag which states if the name is default. email (str): Email of the customer. + phone_number (str): Phone number of the customer. avatar (str): The URL of the Customer's avatar. session_fields (list): An array of custom object-enclosed key:value pairs. Respects the order of items. @@ -875,10 +879,10 @@

    Module livechat.customer.web.api.v37

    json=payload, headers=headers) - def get_predicted_agent(self, + def request_welcome_message(self, payload: dict = None, headers: dict = None) -> httpx.Response: - ''' Gets the predicted Agent - the one the Customer will chat with when the chat starts. + ''' Requests a welcome message. To use this method, the Customer needs to be logged in, which can be done via the `login` method. Args: @@ -893,7 +897,7 @@

    Module livechat.customer.web.api.v37

    which contains a server’s response to an HTTP request. ''' return self.session.post( - f'{self.api_url}/get_predicted_agent{self.query_string}', + f'{self.api_url}/request_welcome_message{self.query_string}', json={} if payload is None else payload, headers=headers) @@ -1079,12 +1083,12 @@

    Classes

    page_id: str = None, payload: dict = None, headers: dict = None) -> httpx.Response: - ''' Returns summaries of the chats a Customer participated in. + ''' Returns chat info for the chats a Customer participated in. Args: limit (int): Limit of results per page. Default: 10, maximum: 25. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation date of its last thread. + Chat info entries are sorted by the creation date of its last thread. page_id (str): ID of the page with paginated results. payload (dict): Custom payload to be used as request's data. It overrides all other parameters provided for the method. @@ -1117,7 +1121,7 @@

    Classes

    chat_id (str): ID of the chat for which threads are to be listed. limit (str): Limit of results per page. Default: 10, maximum: 25. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation date of its last thread. + Chat info entries are sorted by the creation date of its last thread. page_id (str): ID of the page with paginated results. min_events_count (int): Range: 1-100; Specifies the minimum number of events to be returned in the response. @@ -1733,7 +1737,9 @@

    Classes

    def update_customer(self, name: str = None, + name_is_default: bool = None, email: str = None, + phone_number: str = None, avatar: str = None, session_fields: list = None, payload: dict = None, @@ -1742,7 +1748,9 @@

    Classes

    Args: name (str): Name of the customer. + name_is_default (bool): Flag which states if the name is default. email (str): Email of the customer. + phone_number (str): Phone number of the customer. avatar (str): The URL of the Customer's avatar. session_fields (list): An array of custom object-enclosed key:value pairs. Respects the order of items. @@ -1879,10 +1887,10 @@

    Classes

    json=payload, headers=headers) - def get_predicted_agent(self, + def request_welcome_message(self, payload: dict = None, headers: dict = None) -> httpx.Response: - ''' Gets the predicted Agent - the one the Customer will chat with when the chat starts. + ''' Requests a welcome message. To use this method, the Customer needs to be logged in, which can be done via the `login` method. Args: @@ -1897,7 +1905,7 @@

    Classes

    which contains a server’s response to an HTTP request. ''' return self.session.post( - f'{self.api_url}/get_predicted_agent{self.query_string}', + f'{self.api_url}/request_welcome_message{self.query_string}', json={} if payload is None else payload, headers=headers) @@ -2852,55 +2860,6 @@

    Returns

    headers=headers)
    -
    -def get_predicted_agent(self, payload: dict = None, headers: dict = None) ‑> httpx.Response -
    -
    -

    Gets the predicted Agent - the one the Customer will chat with when the chat starts. -To use this method, the Customer needs to be logged in, which can be done via the login method.

    -

    Args

    -
    -
    payload : dict
    -
    Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
    -
    headers : dict
    -
    Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
    -
    -

    Returns

    -
    -
    httpx.Response
    -
    The Response object from httpx library, -which contains a server’s response to an HTTP request.
    -
    -
    - -Expand source code - -
    def get_predicted_agent(self,
    -                        payload: dict = None,
    -                        headers: dict = None) -> httpx.Response:
    -    ''' Gets the predicted Agent - the one the Customer will chat with when the chat starts.
    -        To use this method, the Customer needs to be logged in, which can be done via the `login` method.
    -
    -        Args:
    -            payload (dict): Custom payload to be used as request's data.
    -                            It overrides all other parameters provided for the method.
    -            headers (dict): Custom headers to be used with session headers.
    -                            They will be merged with session-level values that are set,
    -                            however, these method-level parameters will not be persisted across requests.
    -
    -        Returns:
    -            httpx.Response: The Response object from `httpx` library,
    -                            which contains a server’s response to an HTTP request.
    -    '''
    -    return self.session.post(
    -        f'{self.api_url}/get_predicted_agent{self.query_string}',
    -        json={} if payload is None else payload,
    -        headers=headers)
    -
    -
    def get_url_info(self, url: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
    @@ -2957,14 +2916,14 @@

    Returns

    def list_chats(self, limit: int = None, sort_order: str = None, page_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
    -

    Returns summaries of the chats a Customer participated in.

    +

    Returns chat info for the chats a Customer participated in.

    Args

    limit : int
    Limit of results per page. Default: 10, maximum: 25.
    sort_order : str
    Possible values: asc, desc (default). -Chat summaries are sorted by the creation date of its last thread.
    +Chat info entries are sorted by the creation date of its last thread.
    page_id : str
    ID of the page with paginated results.
    payload : dict
    @@ -2991,12 +2950,12 @@

    Returns

    page_id: str = None, payload: dict = None, headers: dict = None) -> httpx.Response: - ''' Returns summaries of the chats a Customer participated in. + ''' Returns chat info for the chats a Customer participated in. Args: limit (int): Limit of results per page. Default: 10, maximum: 25. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation date of its last thread. + Chat info entries are sorted by the creation date of its last thread. page_id (str): ID of the page with paginated results. payload (dict): Custom payload to be used as request's data. It overrides all other parameters provided for the method. @@ -3199,7 +3158,7 @@

    Args

    Limit of results per page. Default: 10, maximum: 25.
    sort_order : str
    Possible values: asc, desc (default). -Chat summaries are sorted by the creation date of its last thread.
    +Chat info entries are sorted by the creation date of its last thread.
    page_id : str
    ID of the page with paginated results.
    min_events_count : int
    @@ -3237,7 +3196,7 @@

    Returns

    chat_id (str): ID of the chat for which threads are to be listed. limit (str): Limit of results per page. Default: 10, maximum: 25. sort_order (str): Possible values: asc, desc (default). - Chat summaries are sorted by the creation date of its last thread. + Chat info entries are sorted by the creation date of its last thread. page_id (str): ID of the page with paginated results. min_events_count (int): Range: 1-100; Specifies the minimum number of events to be returned in the response. @@ -3369,6 +3328,55 @@

    Returns

    headers=headers) +
    +def request_welcome_message(self, payload: dict = None, headers: dict = None) ‑> httpx.Response +
    +
    +

    Requests a welcome message. +To use this method, the Customer needs to be logged in, which can be done via the login method.

    +

    Args

    +
    +
    payload : dict
    +
    Custom payload to be used as request's data. +It overrides all other parameters provided for the method.
    +
    headers : dict
    +
    Custom headers to be used with session headers. +They will be merged with session-level values that are set, +however, these method-level parameters will not be persisted across requests.
    +
    +

    Returns

    +
    +
    httpx.Response
    +
    The Response object from httpx library, +which contains a server’s response to an HTTP request.
    +
    +
    + +Expand source code + +
    def request_welcome_message(self,
    +                        payload: dict = None,
    +                        headers: dict = None) -> httpx.Response:
    +    ''' Requests a welcome message.
    +        To use this method, the Customer needs to be logged in, which can be done via the `login` method.
    +
    +        Args:
    +            payload (dict): Custom payload to be used as request's data.
    +                            It overrides all other parameters provided for the method.
    +            headers (dict): Custom headers to be used with session headers.
    +                            They will be merged with session-level values that are set,
    +                            however, these method-level parameters will not be persisted across requests.
    +
    +        Returns:
    +            httpx.Response: The Response object from `httpx` library,
    +                            which contains a server’s response to an HTTP request.
    +    '''
    +    return self.session.post(
    +        f'{self.api_url}/request_welcome_message{self.query_string}',
    +        json={} if payload is None else payload,
    +        headers=headers)
    +
    +
    def resume_chat(self, chat: dict = None, active: bool = None, continuous: bool = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
    @@ -3793,7 +3801,7 @@

    Returns

    -def update_customer(self, name: str = None, email: str = None, avatar: str = None, session_fields: list = None, payload: dict = None, headers: dict = None) ‑> httpx.Response +def update_customer(self, name: str = None, name_is_default: bool = None, email: str = None, phone_number: str = None, avatar: str = None, session_fields: list = None, payload: dict = None, headers: dict = None) ‑> httpx.Response

    Updates Customer's properties.

    @@ -3801,8 +3809,12 @@

    Args

    name : str
    Name of the customer.
    +
    name_is_default : bool
    +
    Flag which states if the name is default.
    email : str
    Email of the customer.
    +
    phone_number : str
    +
    Phone number of the customer.
    avatar : str
    The URL of the Customer's avatar.
    session_fields : list
    @@ -3828,7 +3840,9 @@

    Returns

    def update_customer(self,
                         name: str = None,
    +                    name_is_default: bool = None,
                         email: str = None,
    +                    phone_number: str = None,
                         avatar: str = None,
                         session_fields: list = None,
                         payload: dict = None,
    @@ -3837,7 +3851,9 @@ 

    Returns

    Args: name (str): Name of the customer. + name_is_default (bool): Flag which states if the name is default. email (str): Email of the customer. + phone_number (str): Phone number of the customer. avatar (str): The URL of the Customer's avatar. session_fields (list): An array of custom object-enclosed key:value pairs. Respects the order of items. @@ -4066,7 +4082,6 @@

    get_dynamic_configuration
  • get_form
  • get_localization
  • -
  • get_predicted_agent
  • get_url_info
  • list_chats
  • list_group_properties
  • @@ -4075,6 +4090,7 @@

    list_threads
  • mark_events_as_seen
  • request_email_verification
  • +
  • request_welcome_message
  • resume_chat
  • send_event
  • send_rich_message_postback
  • diff --git a/docs/customer/web/base.html b/docs/customer/web/base.html index 6dfc8bc..1eb15bd 100644 --- a/docs/customer/web/base.html +++ b/docs/customer/web/base.html @@ -37,7 +37,6 @@

    Module livechat.customer.web.base

    import httpx from livechat.config import CONFIG -from livechat.customer.web.api.v34 import CustomerWebV34 from livechat.customer.web.api.v35 import CustomerWebV35 from livechat.customer.web.api.v36 import CustomerWebV36 from livechat.customer.web.api.v37 import CustomerWebV37 @@ -53,7 +52,6 @@

    Module livechat.customer.web.base

    API version. ''' @staticmethod def get_client( - license_id: int = None, access_token: Optional[Union[AccessToken, str]] = None, version: str = stable_version, base_url: str = api_url, @@ -63,7 +61,7 @@

    Module livechat.customer.web.base

    organization_id: str = None, disable_logging: bool = False, timeout: float = httpx.Timeout(15) - ) -> Union[CustomerWebV34, CustomerWebV35, CustomerWebV36, CustomerWebV37]: + ) -> Union[CustomerWebV35, CustomerWebV36, CustomerWebV37]: ''' Returns client for specific API version. Args: @@ -91,43 +89,12 @@

    Module livechat.customer.web.base

    ValueError: If the specified version does not exist. ''' client = { - '3.4': CustomerWebV34, '3.5': CustomerWebV35, '3.6': CustomerWebV36, '3.7': CustomerWebV37, }.get(version) - client_kwargs = { - '3.4': { - 'organization_id': organization_id, - 'access_token': access_token, - 'base_url': base_url, - 'http2': http2, - 'proxies': proxies, - 'verify': verify, - 'disable_logging': disable_logging, - 'timeout': timeout - }, - '3.5': { - 'organization_id': organization_id, - 'access_token': access_token, - 'base_url': base_url, - 'http2': http2, - 'proxies': proxies, - 'verify': verify, - 'disable_logging': disable_logging, - 'timeout': timeout - }, - '3.6': { - 'organization_id': organization_id, - 'access_token': access_token, - 'base_url': base_url, - 'http2': http2, - 'proxies': proxies, - 'verify': verify, - 'disable_logging': disable_logging, - 'timeout': timeout - }, - '3.7': { + if client: + client_kwargs = { 'organization_id': organization_id, 'access_token': access_token, 'base_url': base_url, @@ -136,9 +103,7 @@

    Module livechat.customer.web.base

    'verify': verify, 'disable_logging': disable_logging, 'timeout': timeout - }, - }.get(version) - if client: + } return client(**client_kwargs) raise ValueError('Provided version does not exist.')
    @@ -167,7 +132,6 @@

    Classes

    API version. ''' @staticmethod def get_client( - license_id: int = None, access_token: Optional[Union[AccessToken, str]] = None, version: str = stable_version, base_url: str = api_url, @@ -177,7 +141,7 @@

    Classes

    organization_id: str = None, disable_logging: bool = False, timeout: float = httpx.Timeout(15) - ) -> Union[CustomerWebV34, CustomerWebV35, CustomerWebV36, CustomerWebV37]: + ) -> Union[CustomerWebV35, CustomerWebV36, CustomerWebV37]: ''' Returns client for specific API version. Args: @@ -205,43 +169,12 @@

    Classes

    ValueError: If the specified version does not exist. ''' client = { - '3.4': CustomerWebV34, '3.5': CustomerWebV35, '3.6': CustomerWebV36, '3.7': CustomerWebV37, }.get(version) - client_kwargs = { - '3.4': { - 'organization_id': organization_id, - 'access_token': access_token, - 'base_url': base_url, - 'http2': http2, - 'proxies': proxies, - 'verify': verify, - 'disable_logging': disable_logging, - 'timeout': timeout - }, - '3.5': { - 'organization_id': organization_id, - 'access_token': access_token, - 'base_url': base_url, - 'http2': http2, - 'proxies': proxies, - 'verify': verify, - 'disable_logging': disable_logging, - 'timeout': timeout - }, - '3.6': { - 'organization_id': organization_id, - 'access_token': access_token, - 'base_url': base_url, - 'http2': http2, - 'proxies': proxies, - 'verify': verify, - 'disable_logging': disable_logging, - 'timeout': timeout - }, - '3.7': { + if client: + client_kwargs = { 'organization_id': organization_id, 'access_token': access_token, 'base_url': base_url, @@ -250,16 +183,14 @@

    Classes

    'verify': verify, 'disable_logging': disable_logging, 'timeout': timeout - }, - }.get(version) - if client: + } return client(**client_kwargs) raise ValueError('Provided version does not exist.')

    Static methods

    -def get_client(license_id: int = None, access_token: Optional[Union[AccessToken, str]] = None, version: str = '3.6', base_url: str = 'api.livechatinc.com', http2: bool = False, proxies: dict = None, verify: bool = True, organization_id: str = None, disable_logging: bool = False, timeout: float = Timeout(timeout=15)) ‑> Union[CustomerWebV34, CustomerWebV35, CustomerWebV36, CustomerWebV37] +def get_client(access_token: Optional[Union[AccessToken, str]] = None, version: str = '3.6', base_url: str = 'api.livechatinc.com', http2: bool = False, proxies: dict = None, verify: bool = True, organization_id: str = None, disable_logging: bool = False, timeout: float = Timeout(timeout=15)) ‑> Union[CustomerWebV35, CustomerWebV36, CustomerWebV37]

    Returns client for specific API version.

    @@ -304,7 +235,6 @@

    Raises

    @staticmethod
     def get_client(
    -    license_id: int = None,
         access_token: Optional[Union[AccessToken, str]] = None,
         version: str = stable_version,
         base_url: str = api_url,
    @@ -314,7 +244,7 @@ 

    Raises

    organization_id: str = None, disable_logging: bool = False, timeout: float = httpx.Timeout(15) -) -> Union[CustomerWebV34, CustomerWebV35, CustomerWebV36, CustomerWebV37]: +) -> Union[CustomerWebV35, CustomerWebV36, CustomerWebV37]: ''' Returns client for specific API version. Args: @@ -342,43 +272,12 @@

    Raises

    ValueError: If the specified version does not exist. ''' client = { - '3.4': CustomerWebV34, '3.5': CustomerWebV35, '3.6': CustomerWebV36, '3.7': CustomerWebV37, }.get(version) - client_kwargs = { - '3.4': { - 'organization_id': organization_id, - 'access_token': access_token, - 'base_url': base_url, - 'http2': http2, - 'proxies': proxies, - 'verify': verify, - 'disable_logging': disable_logging, - 'timeout': timeout - }, - '3.5': { - 'organization_id': organization_id, - 'access_token': access_token, - 'base_url': base_url, - 'http2': http2, - 'proxies': proxies, - 'verify': verify, - 'disable_logging': disable_logging, - 'timeout': timeout - }, - '3.6': { - 'organization_id': organization_id, - 'access_token': access_token, - 'base_url': base_url, - 'http2': http2, - 'proxies': proxies, - 'verify': verify, - 'disable_logging': disable_logging, - 'timeout': timeout - }, - '3.7': { + if client: + client_kwargs = { 'organization_id': organization_id, 'access_token': access_token, 'base_url': base_url, @@ -387,9 +286,7 @@

    Raises

    'verify': verify, 'disable_logging': disable_logging, 'timeout': timeout - }, - }.get(version) - if client: + } return client(**client_kwargs) raise ValueError('Provided version does not exist.')
    diff --git a/docs/reports/api/index.html b/docs/reports/api/index.html index f024d8b..09f50cb 100644 --- a/docs/reports/api/index.html +++ b/docs/reports/api/index.html @@ -26,10 +26,6 @@

    Module livechat.reports.api

    Sub-modules

    -
    livechat.reports.api.v34
    -
    -

    Reports API module with client class in version 3.4.

    -
    livechat.reports.api.v35

    Reports API module with client class in version 3.5.

    @@ -64,7 +60,6 @@

    Index

  • Sub-modules

      -
    • livechat.reports.api.v34
    • livechat.reports.api.v35
    • livechat.reports.api.v36
    • livechat.reports.api.v37
    • diff --git a/docs/reports/api/v34.html b/docs/reports/api/v34.html deleted file mode 100644 index 1c29ebc..0000000 --- a/docs/reports/api/v34.html +++ /dev/null @@ -1,1627 +0,0 @@ - - - - - - -livechat.reports.api.v34 API documentation - - - - - - - - - - - -
      -
      -
      -

      Module livechat.reports.api.v34

      -
      -
      -

      Reports API module with client class in version 3.4.

      -
      - -Expand source code - -
      ''' Reports API module with client class in version 3.4. '''
      -
      -from typing import Union
      -
      -import httpx
      -
      -from livechat.utils.helpers import prepare_payload
      -from livechat.utils.http_client import HttpClient
      -from livechat.utils.structures import AccessToken
      -
      -
      -class ReportsApiV34(HttpClient):
      -    ''' Reports API client class in version 3.4. '''
      -    def __init__(self,
      -                 token: Union[AccessToken, str],
      -                 base_url: str,
      -                 http2: bool,
      -                 proxies=None,
      -                 verify: bool = True,
      -                 disable_logging: bool = False,
      -                 timeout: float = httpx.Timeout(15)):
      -        super().__init__(token, base_url, http2, proxies, verify,
      -                         disable_logging, timeout)
      -        self.api_url = f'https://{base_url}/v3.4/reports'
      -
      -    # Chats
      -
      -    def duration(self,
      -                 distribution: str = None,
      -                 timezone: str = None,
      -                 filters: dict = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -        ''' Shows the average chatting duration of agents within a license.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/duration',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def tags(self,
      -             distribution: str = None,
      -             timezone: str = None,
      -             filters: dict = None,
      -             payload: dict = None,
      -             headers: dict = None) -> httpx.Response:
      -        ''' Shows the distribution of tags for chats.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/tags',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def total_chats(self,
      -                    distribution: str = None,
      -                    timezone: str = None,
      -                    filters: dict = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Shows how many chats occurred during the specified period.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/total_chats',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def ratings(self,
      -                distribution: str = None,
      -                timezone: str = None,
      -                filters: dict = None,
      -                payload: dict = None,
      -                headers: dict = None) -> httpx.Response:
      -        ''' Shows the number of rated chats along with their ratings during a specified period of time.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/ratings',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def ranking(self,
      -                distribution: str = None,
      -                timezone: str = None,
      -                filters: dict = None,
      -                payload: dict = None,
      -                headers: dict = None) -> httpx.Response:
      -        ''' Shows the ratio of good to bad ratings for each operator.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/ranking',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def engagement(self,
      -                   distribution: str = None,
      -                   timezone: str = None,
      -                   filters: dict = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Shows the distribution of chats based on engagement during the specified period.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/engagement',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def greetings_conversion(self,
      -                             distribution: str = None,
      -                             timezone: str = None,
      -                             filters: dict = None,
      -                             payload: dict = None,
      -                             headers: dict = None) -> httpx.Response:
      -        ''' Shows the number of greetings sent to the customers and how many of those resulted in a chat or a goal.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/greetings_conversion',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def surveys(self,
      -                timezone: str = None,
      -                filters: dict = None,
      -                payload: dict = None,
      -                headers: dict = None) -> httpx.Response:
      -        ''' Returns the number of submitted chat surveys along with the count of specific answers.
      -
      -        Args:
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/surveys',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def response_time(self,
      -                      distribution: str = None,
      -                      timezone: str = None,
      -                      filters: dict = None,
      -                      payload: dict = None,
      -                      headers: dict = None) -> httpx.Response:
      -        ''' Shows the average agents' response time within a licence.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/response_time',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def first_response_time(self,
      -                            distribution: str = None,
      -                            timezone: str = None,
      -                            filters: dict = None,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -        ''' Shows the average agents' first response time within a licence.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/first_response_time',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    # Agents
      -
      -    def availability(self,
      -                     distribution: str = None,
      -                     timezone: str = None,
      -                     filters: dict = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Shows for how long an agent, group, or the whole account was available for chatting during a specified period of time.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/agents/availability',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def performance(self,
      -                    distribution: str = None,
      -                    timezone: str = None,
      -                    filters: dict = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Shows for how long an agent, group, or the whole account was available for chatting during a specified period of time.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/agents/performance',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -

      Classes

      -
      -
      -class ReportsApiV34 -(token: Union[livechat.utils.structures.AccessToken, str], base_url: str, http2: bool, proxies=None, verify: bool = True, disable_logging: bool = False, timeout: float = Timeout(timeout=15)) -
      -
      -

      Reports API client class in version 3.4.

      -
      - -Expand source code - -
      class ReportsApiV34(HttpClient):
      -    ''' Reports API client class in version 3.4. '''
      -    def __init__(self,
      -                 token: Union[AccessToken, str],
      -                 base_url: str,
      -                 http2: bool,
      -                 proxies=None,
      -                 verify: bool = True,
      -                 disable_logging: bool = False,
      -                 timeout: float = httpx.Timeout(15)):
      -        super().__init__(token, base_url, http2, proxies, verify,
      -                         disable_logging, timeout)
      -        self.api_url = f'https://{base_url}/v3.4/reports'
      -
      -    # Chats
      -
      -    def duration(self,
      -                 distribution: str = None,
      -                 timezone: str = None,
      -                 filters: dict = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -        ''' Shows the average chatting duration of agents within a license.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/duration',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def tags(self,
      -             distribution: str = None,
      -             timezone: str = None,
      -             filters: dict = None,
      -             payload: dict = None,
      -             headers: dict = None) -> httpx.Response:
      -        ''' Shows the distribution of tags for chats.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/tags',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def total_chats(self,
      -                    distribution: str = None,
      -                    timezone: str = None,
      -                    filters: dict = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Shows how many chats occurred during the specified period.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/total_chats',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def ratings(self,
      -                distribution: str = None,
      -                timezone: str = None,
      -                filters: dict = None,
      -                payload: dict = None,
      -                headers: dict = None) -> httpx.Response:
      -        ''' Shows the number of rated chats along with their ratings during a specified period of time.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/ratings',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def ranking(self,
      -                distribution: str = None,
      -                timezone: str = None,
      -                filters: dict = None,
      -                payload: dict = None,
      -                headers: dict = None) -> httpx.Response:
      -        ''' Shows the ratio of good to bad ratings for each operator.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/ranking',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def engagement(self,
      -                   distribution: str = None,
      -                   timezone: str = None,
      -                   filters: dict = None,
      -                   payload: dict = None,
      -                   headers: dict = None) -> httpx.Response:
      -        ''' Shows the distribution of chats based on engagement during the specified period.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/engagement',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def greetings_conversion(self,
      -                             distribution: str = None,
      -                             timezone: str = None,
      -                             filters: dict = None,
      -                             payload: dict = None,
      -                             headers: dict = None) -> httpx.Response:
      -        ''' Shows the number of greetings sent to the customers and how many of those resulted in a chat or a goal.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/greetings_conversion',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def surveys(self,
      -                timezone: str = None,
      -                filters: dict = None,
      -                payload: dict = None,
      -                headers: dict = None) -> httpx.Response:
      -        ''' Returns the number of submitted chat surveys along with the count of specific answers.
      -
      -        Args:
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/surveys',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def response_time(self,
      -                      distribution: str = None,
      -                      timezone: str = None,
      -                      filters: dict = None,
      -                      payload: dict = None,
      -                      headers: dict = None) -> httpx.Response:
      -        ''' Shows the average agents' response time within a licence.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/response_time',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def first_response_time(self,
      -                            distribution: str = None,
      -                            timezone: str = None,
      -                            filters: dict = None,
      -                            payload: dict = None,
      -                            headers: dict = None) -> httpx.Response:
      -        ''' Shows the average agents' first response time within a licence.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/chats/first_response_time',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    # Agents
      -
      -    def availability(self,
      -                     distribution: str = None,
      -                     timezone: str = None,
      -                     filters: dict = None,
      -                     payload: dict = None,
      -                     headers: dict = None) -> httpx.Response:
      -        ''' Shows for how long an agent, group, or the whole account was available for chatting during a specified period of time.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/agents/availability',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -    def performance(self,
      -                    distribution: str = None,
      -                    timezone: str = None,
      -                    filters: dict = None,
      -                    payload: dict = None,
      -                    headers: dict = None) -> httpx.Response:
      -        ''' Shows for how long an agent, group, or the whole account was available for chatting during a specified period of time.
      -
      -        Args:
      -            distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -            timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                            Defaults to the requester's timezone.
      -                            When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -            filters (dict): If none provided, your report will span the last seven days.
      -            payload (dict): Custom payload to be used as request's data.
      -                            It overrides all other parameters provided for the method.
      -            headers (dict): Custom headers to be used with session headers.
      -                            They will be merged with session-level values that are set,
      -                            however, these method-level parameters will not be persisted across requests.
      -
      -        Returns:
      -            httpx.Response: The Response object from `httpx` library,
      -                                which contains a server’s response to an HTTP request.
      -        '''
      -        if payload is None:
      -            payload = prepare_payload(locals())
      -        return self.session.post(f'{self.api_url}/agents/performance',
      -                                 json=payload,
      -                                 headers=headers)
      -
      -

      Ancestors

      -
        -
      • livechat.utils.http_client.HttpClient
      • -
      -

      Methods

      -
      -
      -def availability(self, distribution: str = None, timezone: str = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Shows for how long an agent, group, or the whole account was available for chatting during a specified period of time.

      -

      Args

      -
      -
      distribution : str
      -
      Allowed values: hour, day, day-hours, month or year. Defaults to day.
      -
      timezone : str
      -
      IANA Time Zone (e.g. America/Phoenix). -Defaults to the requester's timezone. -When the requester's timezone isn't present, then filters.from is parsed to get the timezone.
      -
      filters : dict
      -
      If none provided, your report will span the last seven days.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def availability(self,
      -                 distribution: str = None,
      -                 timezone: str = None,
      -                 filters: dict = None,
      -                 payload: dict = None,
      -                 headers: dict = None) -> httpx.Response:
      -    ''' Shows for how long an agent, group, or the whole account was available for chatting during a specified period of time.
      -
      -    Args:
      -        distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -        timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                        Defaults to the requester's timezone.
      -                        When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -        filters (dict): If none provided, your report will span the last seven days.
      -        payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -        headers (dict): Custom headers to be used with session headers.
      -                        They will be merged with session-level values that are set,
      -                        however, these method-level parameters will not be persisted across requests.
      -
      -    Returns:
      -        httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/agents/availability',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def duration(self, distribution: str = None, timezone: str = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Shows the average chatting duration of agents within a license.

      -

      Args

      -
      -
      distribution : str
      -
      Allowed values: hour, day, day-hours, month or year. Defaults to day.
      -
      timezone : str
      -
      IANA Time Zone (e.g. America/Phoenix). -Defaults to the requester's timezone. -When the requester's timezone isn't present, then filters.from is parsed to get the timezone.
      -
      filters : dict
      -
      If none provided, your report will span the last seven days.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def duration(self,
      -             distribution: str = None,
      -             timezone: str = None,
      -             filters: dict = None,
      -             payload: dict = None,
      -             headers: dict = None) -> httpx.Response:
      -    ''' Shows the average chatting duration of agents within a license.
      -
      -    Args:
      -        distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -        timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                        Defaults to the requester's timezone.
      -                        When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -        filters (dict): If none provided, your report will span the last seven days.
      -        payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -        headers (dict): Custom headers to be used with session headers.
      -                        They will be merged with session-level values that are set,
      -                        however, these method-level parameters will not be persisted across requests.
      -
      -    Returns:
      -        httpx.Response: The Response object from `httpx` library,
      -                        which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/chats/duration',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def engagement(self, distribution: str = None, timezone: str = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Shows the distribution of chats based on engagement during the specified period.

      -

      Args

      -
      -
      distribution : str
      -
      Allowed values: hour, day, day-hours, month or year. Defaults to day.
      -
      timezone : str
      -
      IANA Time Zone (e.g. America/Phoenix). -Defaults to the requester's timezone. -When the requester's timezone isn't present, then filters.from is parsed to get the timezone.
      -
      filters : dict
      -
      If none provided, your report will span the last seven days.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def engagement(self,
      -               distribution: str = None,
      -               timezone: str = None,
      -               filters: dict = None,
      -               payload: dict = None,
      -               headers: dict = None) -> httpx.Response:
      -    ''' Shows the distribution of chats based on engagement during the specified period.
      -
      -    Args:
      -        distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -        timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                        Defaults to the requester's timezone.
      -                        When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -        filters (dict): If none provided, your report will span the last seven days.
      -        payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -        headers (dict): Custom headers to be used with session headers.
      -                        They will be merged with session-level values that are set,
      -                        however, these method-level parameters will not be persisted across requests.
      -
      -    Returns:
      -        httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/chats/engagement',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def first_response_time(self, distribution: str = None, timezone: str = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Shows the average agents' first response time within a licence.

      -

      Args

      -
      -
      distribution : str
      -
      Allowed values: hour, day, day-hours, month or year. Defaults to day.
      -
      timezone : str
      -
      IANA Time Zone (e.g. America/Phoenix). -Defaults to the requester's timezone. -When the requester's timezone isn't present, then filters.from is parsed to get the timezone.
      -
      filters : dict
      -
      If none provided, your report will span the last seven days.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def first_response_time(self,
      -                        distribution: str = None,
      -                        timezone: str = None,
      -                        filters: dict = None,
      -                        payload: dict = None,
      -                        headers: dict = None) -> httpx.Response:
      -    ''' Shows the average agents' first response time within a licence.
      -
      -    Args:
      -        distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -        timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                        Defaults to the requester's timezone.
      -                        When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -        filters (dict): If none provided, your report will span the last seven days.
      -        payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -        headers (dict): Custom headers to be used with session headers.
      -                        They will be merged with session-level values that are set,
      -                        however, these method-level parameters will not be persisted across requests.
      -
      -    Returns:
      -        httpx.Response: The Response object from `httpx` library,
      -                        which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/chats/first_response_time',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def greetings_conversion(self, distribution: str = None, timezone: str = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Shows the number of greetings sent to the customers and how many of those resulted in a chat or a goal.

      -

      Args

      -
      -
      distribution : str
      -
      Allowed values: hour, day, day-hours, month or year. Defaults to day.
      -
      timezone : str
      -
      IANA Time Zone (e.g. America/Phoenix). -Defaults to the requester's timezone. -When the requester's timezone isn't present, then filters.from is parsed to get the timezone.
      -
      filters : dict
      -
      If none provided, your report will span the last seven days.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def greetings_conversion(self,
      -                         distribution: str = None,
      -                         timezone: str = None,
      -                         filters: dict = None,
      -                         payload: dict = None,
      -                         headers: dict = None) -> httpx.Response:
      -    ''' Shows the number of greetings sent to the customers and how many of those resulted in a chat or a goal.
      -
      -    Args:
      -        distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -        timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                        Defaults to the requester's timezone.
      -                        When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -        filters (dict): If none provided, your report will span the last seven days.
      -        payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -        headers (dict): Custom headers to be used with session headers.
      -                        They will be merged with session-level values that are set,
      -                        however, these method-level parameters will not be persisted across requests.
      -
      -    Returns:
      -        httpx.Response: The Response object from `httpx` library,
      -                        which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/chats/greetings_conversion',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def performance(self, distribution: str = None, timezone: str = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Shows for how long an agent, group, or the whole account was available for chatting during a specified period of time.

      -

      Args

      -
      -
      distribution : str
      -
      Allowed values: hour, day, day-hours, month or year. Defaults to day.
      -
      timezone : str
      -
      IANA Time Zone (e.g. America/Phoenix). -Defaults to the requester's timezone. -When the requester's timezone isn't present, then filters.from is parsed to get the timezone.
      -
      filters : dict
      -
      If none provided, your report will span the last seven days.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def performance(self,
      -                distribution: str = None,
      -                timezone: str = None,
      -                filters: dict = None,
      -                payload: dict = None,
      -                headers: dict = None) -> httpx.Response:
      -    ''' Shows for how long an agent, group, or the whole account was available for chatting during a specified period of time.
      -
      -    Args:
      -        distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -        timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                        Defaults to the requester's timezone.
      -                        When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -        filters (dict): If none provided, your report will span the last seven days.
      -        payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -        headers (dict): Custom headers to be used with session headers.
      -                        They will be merged with session-level values that are set,
      -                        however, these method-level parameters will not be persisted across requests.
      -
      -    Returns:
      -        httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/agents/performance',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def ranking(self, distribution: str = None, timezone: str = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Shows the ratio of good to bad ratings for each operator.

      -

      Args

      -
      -
      distribution : str
      -
      Allowed values: hour, day, day-hours, month or year. Defaults to day.
      -
      timezone : str
      -
      IANA Time Zone (e.g. America/Phoenix). -Defaults to the requester's timezone. -When the requester's timezone isn't present, then filters.from is parsed to get the timezone.
      -
      filters : dict
      -
      If none provided, your report will span the last seven days.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def ranking(self,
      -            distribution: str = None,
      -            timezone: str = None,
      -            filters: dict = None,
      -            payload: dict = None,
      -            headers: dict = None) -> httpx.Response:
      -    ''' Shows the ratio of good to bad ratings for each operator.
      -
      -    Args:
      -        distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -        timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                        Defaults to the requester's timezone.
      -                        When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -        filters (dict): If none provided, your report will span the last seven days.
      -        payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -        headers (dict): Custom headers to be used with session headers.
      -                        They will be merged with session-level values that are set,
      -                        however, these method-level parameters will not be persisted across requests.
      -
      -    Returns:
      -        httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/chats/ranking',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def ratings(self, distribution: str = None, timezone: str = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Shows the number of rated chats along with their ratings during a specified period of time.

      -

      Args

      -
      -
      distribution : str
      -
      Allowed values: hour, day, day-hours, month or year. Defaults to day.
      -
      timezone : str
      -
      IANA Time Zone (e.g. America/Phoenix). -Defaults to the requester's timezone. -When the requester's timezone isn't present, then filters.from is parsed to get the timezone.
      -
      filters : dict
      -
      If none provided, your report will span the last seven days.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def ratings(self,
      -            distribution: str = None,
      -            timezone: str = None,
      -            filters: dict = None,
      -            payload: dict = None,
      -            headers: dict = None) -> httpx.Response:
      -    ''' Shows the number of rated chats along with their ratings during a specified period of time.
      -
      -    Args:
      -        distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -        timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                        Defaults to the requester's timezone.
      -                        When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -        filters (dict): If none provided, your report will span the last seven days.
      -        payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -        headers (dict): Custom headers to be used with session headers.
      -                        They will be merged with session-level values that are set,
      -                        however, these method-level parameters will not be persisted across requests.
      -
      -    Returns:
      -        httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/chats/ratings',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def response_time(self, distribution: str = None, timezone: str = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Shows the average agents' response time within a licence.

      -

      Args

      -
      -
      distribution : str
      -
      Allowed values: hour, day, day-hours, month or year. Defaults to day.
      -
      timezone : str
      -
      IANA Time Zone (e.g. America/Phoenix). -Defaults to the requester's timezone. -When the requester's timezone isn't present, then filters.from is parsed to get the timezone.
      -
      filters : dict
      -
      If none provided, your report will span the last seven days.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def response_time(self,
      -                  distribution: str = None,
      -                  timezone: str = None,
      -                  filters: dict = None,
      -                  payload: dict = None,
      -                  headers: dict = None) -> httpx.Response:
      -    ''' Shows the average agents' response time within a licence.
      -
      -    Args:
      -        distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -        timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                        Defaults to the requester's timezone.
      -                        When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -        filters (dict): If none provided, your report will span the last seven days.
      -        payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -        headers (dict): Custom headers to be used with session headers.
      -                        They will be merged with session-level values that are set,
      -                        however, these method-level parameters will not be persisted across requests.
      -
      -    Returns:
      -        httpx.Response: The Response object from `httpx` library,
      -                        which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/chats/response_time',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def surveys(self, timezone: str = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Returns the number of submitted chat surveys along with the count of specific answers.

      -

      Args

      -
      -
      timezone : str
      -
      IANA Time Zone (e.g. America/Phoenix). -Defaults to the requester's timezone. -When the requester's timezone isn't present, then filters.from is parsed to get the timezone.
      -
      filters : dict
      -
      If none provided, your report will span the last seven days.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def surveys(self,
      -            timezone: str = None,
      -            filters: dict = None,
      -            payload: dict = None,
      -            headers: dict = None) -> httpx.Response:
      -    ''' Returns the number of submitted chat surveys along with the count of specific answers.
      -
      -    Args:
      -        timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                        Defaults to the requester's timezone.
      -                        When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -        filters (dict): If none provided, your report will span the last seven days.
      -        payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -        headers (dict): Custom headers to be used with session headers.
      -                        They will be merged with session-level values that are set,
      -                        however, these method-level parameters will not be persisted across requests.
      -
      -    Returns:
      -        httpx.Response: The Response object from `httpx` library,
      -                        which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/chats/surveys',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def tags(self, distribution: str = None, timezone: str = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Shows the distribution of tags for chats.

      -

      Args

      -
      -
      distribution : str
      -
      Allowed values: hour, day, day-hours, month or year. Defaults to day.
      -
      timezone : str
      -
      IANA Time Zone (e.g. America/Phoenix). -Defaults to the requester's timezone. -When the requester's timezone isn't present, then filters.from is parsed to get the timezone.
      -
      filters : dict
      -
      If none provided, your report will span the last seven days.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def tags(self,
      -         distribution: str = None,
      -         timezone: str = None,
      -         filters: dict = None,
      -         payload: dict = None,
      -         headers: dict = None) -> httpx.Response:
      -    ''' Shows the distribution of tags for chats.
      -
      -    Args:
      -        distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -        timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                        Defaults to the requester's timezone.
      -                        When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -        filters (dict): If none provided, your report will span the last seven days.
      -        payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -        headers (dict): Custom headers to be used with session headers.
      -                        They will be merged with session-level values that are set,
      -                        however, these method-level parameters will not be persisted across requests.
      -
      -    Returns:
      -        httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/chats/tags',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -def total_chats(self, distribution: str = None, timezone: str = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response -
      -
      -

      Shows how many chats occurred during the specified period.

      -

      Args

      -
      -
      distribution : str
      -
      Allowed values: hour, day, day-hours, month or year. Defaults to day.
      -
      timezone : str
      -
      IANA Time Zone (e.g. America/Phoenix). -Defaults to the requester's timezone. -When the requester's timezone isn't present, then filters.from is parsed to get the timezone.
      -
      filters : dict
      -
      If none provided, your report will span the last seven days.
      -
      payload : dict
      -
      Custom payload to be used as request's data. -It overrides all other parameters provided for the method.
      -
      headers : dict
      -
      Custom headers to be used with session headers. -They will be merged with session-level values that are set, -however, these method-level parameters will not be persisted across requests.
      -
      -

      Returns

      -
      -
      httpx.Response
      -
      The Response object from httpx library, -which contains a server’s response to an HTTP request.
      -
      -
      - -Expand source code - -
      def total_chats(self,
      -                distribution: str = None,
      -                timezone: str = None,
      -                filters: dict = None,
      -                payload: dict = None,
      -                headers: dict = None) -> httpx.Response:
      -    ''' Shows how many chats occurred during the specified period.
      -
      -    Args:
      -        distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
      -        timezone (str): IANA Time Zone (e.g. America/Phoenix).
      -                        Defaults to the requester's timezone.
      -                        When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
      -        filters (dict): If none provided, your report will span the last seven days.
      -        payload (dict): Custom payload to be used as request's data.
      -                        It overrides all other parameters provided for the method.
      -        headers (dict): Custom headers to be used with session headers.
      -                        They will be merged with session-level values that are set,
      -                        however, these method-level parameters will not be persisted across requests.
      -
      -    Returns:
      -        httpx.Response: The Response object from `httpx` library,
      -                            which contains a server’s response to an HTTP request.
      -    '''
      -    if payload is None:
      -        payload = prepare_payload(locals())
      -    return self.session.post(f'{self.api_url}/chats/total_chats',
      -                             json=payload,
      -                             headers=headers)
      -
      -
      -
      -
      -
      -
      -
      - -
      - - - \ No newline at end of file diff --git a/docs/reports/api/v37.html b/docs/reports/api/v37.html index c299b71..8c63d9f 100644 --- a/docs/reports/api/v37.html +++ b/docs/reports/api/v37.html @@ -567,6 +567,38 @@

      Module livechat.reports.api.v37

      if payload is None: payload = prepare_payload(locals()) return self.session.post(f'{self.api_url}/customers/unique_visitors', + json=payload, + headers=headers) + +# Campaigns + + def campaigns_conversion(self, + distribution: str = None, + timezone: str = None, + filters: dict = None, + payload: dict = None, + headers: dict = None) -> httpx.Response: + ''' Shows the number of campaigns sent and how many of those resulted in a chat or a goal. + + Args: + distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`. + timezone (str): IANA Time Zone (e.g. America/Phoenix). + Defaults to the requester's timezone. + When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone. + filters (dict): If none provided, your report will span the last seven days. + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + headers (dict): Custom headers to be used with session headers. + They will be merged with session-level values that are set, + however, these method-level parameters will not be persisted across requests. + + Returns: + httpx.Response: The Response object from `httpx` library, + which contains a server's response to an HTTP request. + ''' + if payload is None: + payload = prepare_payload(locals()) + return self.session.post(f'{self.api_url}/campaigns/campaigns_conversion', json=payload, headers=headers) @@ -1117,6 +1149,38 @@

      Classes

      if payload is None: payload = prepare_payload(locals()) return self.session.post(f'{self.api_url}/customers/unique_visitors', + json=payload, + headers=headers) + +# Campaigns + + def campaigns_conversion(self, + distribution: str = None, + timezone: str = None, + filters: dict = None, + payload: dict = None, + headers: dict = None) -> httpx.Response: + ''' Shows the number of campaigns sent and how many of those resulted in a chat or a goal. + + Args: + distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`. + timezone (str): IANA Time Zone (e.g. America/Phoenix). + Defaults to the requester's timezone. + When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone. + filters (dict): If none provided, your report will span the last seven days. + payload (dict): Custom payload to be used as request's data. + It overrides all other parameters provided for the method. + headers (dict): Custom headers to be used with session headers. + They will be merged with session-level values that are set, + however, these method-level parameters will not be persisted across requests. + + Returns: + httpx.Response: The Response object from `httpx` library, + which contains a server's response to an HTTP request. + ''' + if payload is None: + payload = prepare_payload(locals()) + return self.session.post(f'{self.api_url}/campaigns/campaigns_conversion', json=payload, headers=headers) @@ -1190,6 +1254,70 @@

      Returns

      headers=headers)
  • +
    +def campaigns_conversion(self, distribution: str = None, timezone: str = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response +
    +
    +

    Shows the number of campaigns sent and how many of those resulted in a chat or a goal.

    +

    Args

    +
    +
    distribution : str
    +
    Allowed values: hour, day, day-hours, month or year. Defaults to day.
    +
    timezone : str
    +
    IANA Time Zone (e.g. America/Phoenix). +Defaults to the requester's timezone. +When the requester's timezone isn't present, then filters.from is parsed to get the timezone.
    +
    filters : dict
    +
    If none provided, your report will span the last seven days.
    +
    payload : dict
    +
    Custom payload to be used as request's data. +It overrides all other parameters provided for the method.
    +
    headers : dict
    +
    Custom headers to be used with session headers. +They will be merged with session-level values that are set, +however, these method-level parameters will not be persisted across requests.
    +
    +

    Returns

    +
    +
    httpx.Response
    +
    The Response object from httpx library, +which contains a server's response to an HTTP request.
    +
    +
    + +Expand source code + +
    def campaigns_conversion(self,
    +                         distribution: str = None,
    +                         timezone: str = None,
    +                         filters: dict = None,
    +                         payload: dict = None,
    +                         headers: dict = None) -> httpx.Response:
    +    ''' Shows the number of campaigns sent and how many of those resulted in a chat or a goal.
    +
    +    Args:
    +        distribution (str): Allowed values: `hour`, `day`, `day-hours`, `month` or `year`. Defaults to `day`.
    +        timezone (str): IANA Time Zone (e.g. America/Phoenix).
    +                        Defaults to the requester's timezone.
    +                        When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
    +        filters (dict): If none provided, your report will span the last seven days.
    +        payload (dict): Custom payload to be used as request's data.
    +                        It overrides all other parameters provided for the method.
    +        headers (dict): Custom headers to be used with session headers.
    +                        They will be merged with session-level values that are set,
    +                        however, these method-level parameters will not be persisted across requests.
    +
    +    Returns:
    +        httpx.Response: The Response object from `httpx` library,
    +                        which contains a server's response to an HTTP request.
    +    '''
    +    if payload is None:
    +        payload = prepare_payload(locals())
    +    return self.session.post(f'{self.api_url}/campaigns/campaigns_conversion',
    +                             json=payload,
    +                             headers=headers)
    +
    +
    def chat_usage(self, timezone: str = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
    @@ -2229,6 +2357,7 @@

    Index

    ReportsApiV37

    • availability
    • +
    • campaigns_conversion
    • chat_usage
    • duration
    • engagement
    • diff --git a/docs/reports/base.html b/docs/reports/base.html index e1335a8..4ee39c1 100644 --- a/docs/reports/base.html +++ b/docs/reports/base.html @@ -41,7 +41,6 @@

      Module livechat.reports.base

      import httpx from livechat.config import CONFIG -from livechat.reports.api.v34 import ReportsApiV34 from livechat.reports.api.v35 import ReportsApiV35 from livechat.reports.api.v36 import ReportsApiV36 from livechat.reports.api.v37 import ReportsApiV37 @@ -64,7 +63,7 @@

      Module livechat.reports.base

      verify: bool = True, disable_logging: bool = False, timeout: float = httpx.Timeout(15) - ) -> Union[ReportsApiV34, ReportsApiV35, ReportsApiV36, ReportsApiV37]: + ) -> Union[ReportsApiV35, ReportsApiV36, ReportsApiV37]: ''' Returns client for specific Reports API version. Args: @@ -90,9 +89,6 @@

      Module livechat.reports.base

      ValueError: If the specified version does not exist. ''' client = { - '3.4': - ReportsApiV34(token, base_url, http2, proxies, verify, - disable_logging, timeout), '3.5': ReportsApiV35(token, base_url, http2, proxies, verify, disable_logging, timeout), @@ -140,7 +136,7 @@

      Classes

      verify: bool = True, disable_logging: bool = False, timeout: float = httpx.Timeout(15) - ) -> Union[ReportsApiV34, ReportsApiV35, ReportsApiV36, ReportsApiV37]: + ) -> Union[ReportsApiV35, ReportsApiV36, ReportsApiV37]: ''' Returns client for specific Reports API version. Args: @@ -166,9 +162,6 @@

      Classes

      ValueError: If the specified version does not exist. ''' client = { - '3.4': - ReportsApiV34(token, base_url, http2, proxies, verify, - disable_logging, timeout), '3.5': ReportsApiV35(token, base_url, http2, proxies, verify, disable_logging, timeout), @@ -186,7 +179,7 @@

      Classes

      Static methods

      -def get_client(token: Union[AccessToken, str], version: str = '3.6', base_url: str = 'api.livechatinc.com', http2: bool = False, proxies: dict = None, verify: bool = True, disable_logging: bool = False, timeout: float = Timeout(timeout=15)) ‑> Union[ReportsApiV34, ReportsApiV35, ReportsApiV36, ReportsApiV37] +def get_client(token: Union[AccessToken, str], version: str = '3.6', base_url: str = 'api.livechatinc.com', http2: bool = False, proxies: dict = None, verify: bool = True, disable_logging: bool = False, timeout: float = Timeout(timeout=15)) ‑> Union[ReportsApiV35, ReportsApiV36, ReportsApiV37]

      Returns client for specific Reports API version.

      @@ -239,7 +232,7 @@

      Raises

      verify: bool = True, disable_logging: bool = False, timeout: float = httpx.Timeout(15) -) -> Union[ReportsApiV34, ReportsApiV35, ReportsApiV36, ReportsApiV37]: +) -> Union[ReportsApiV35, ReportsApiV36, ReportsApiV37]: ''' Returns client for specific Reports API version. Args: @@ -265,9 +258,6 @@

      Raises

      ValueError: If the specified version does not exist. ''' client = { - '3.4': - ReportsApiV34(token, base_url, http2, proxies, verify, - disable_logging, timeout), '3.5': ReportsApiV35(token, base_url, http2, proxies, verify, disable_logging, timeout), diff --git a/requirements.txt b/requirements.txt index b6c7c7c..5570357 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,16 +1,16 @@ -i https://pypi.org/simple -anyio==4.12.1; python_version >= '3.9' +anyio==4.14.2; python_version >= '3.10' certifi==2026.10.19; python_version >= '3.7' exceptiongroup==1.3.1; python_version >= '3.7' h11==0.16.0; python_version >= '3.8' -h2==4.3.0; python_version >= '3.9' -hpack==4.1.0; python_version >= '3.9' +h2==4.4.1; python_version >= '3.10' +hpack==4.2.0; python_version >= '3.10' httpcore==1.0.9; python_version >= '3.8' httpx[http2]==0.28.1; python_version >= '3.8' hyperframe==6.1.0; python_version >= '3.9' -idna==3.11; python_version >= '3.8' +idna==3.15; python_version >= '3.8' loguru==0.7.3; python_version >= '3.5' and python_version < '4.0' sniffio==1.3.1; python_version >= '3.7' typing-extensions==4.15.0; python_version >= '3.9' -urllib3==2.6.3; python_version >= '3.9' +urllib3==2.8.0; python_version >= '3.10' websocket-client==1.9.0; python_version >= '3.9' diff --git a/setup.cfg b/setup.cfg index a778793..aae1836 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = lc-sdk-python -version = 0.4.1 +version = 0.4.2 description = Package which lets to work with LiveChat API. long_description = file: README.md long_description_content_type = text/markdown