@backtomyfuture/exchange-cli-darwin-arm64 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/_internal/Python +0 -0
- package/bin/_internal/Python.framework/Python +0 -0
- package/bin/_internal/Python.framework/Resources/Info.plist +3 -3
- package/bin/_internal/Python.framework/Versions/3.12/Python +0 -0
- package/bin/_internal/Python.framework/Versions/{3.14 → 3.12}/Resources/Info.plist +3 -3
- package/bin/_internal/Python.framework/Versions/Current/Python +0 -0
- package/bin/_internal/Python.framework/Versions/Current/Resources/Info.plist +3 -3
- package/bin/_internal/_cffi_backend.cpython-312-darwin.so +0 -0
- package/bin/_internal/ada92cb5d92a588d1b93__mypyc.cpython-312-darwin.so +0 -0
- package/bin/_internal/base_library.zip +0 -0
- package/bin/_internal/certifi/cacert.pem +125 -660
- package/bin/_internal/charset_normalizer/{md.cpython-314-darwin.so → cd.cpython-312-darwin.so} +0 -0
- package/bin/_internal/charset_normalizer/{cd.cpython-314-darwin.so → md.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{click-8.3.2.dist-info → click-8.4.2.dist-info}/METADATA +1 -1
- package/bin/_internal/click-8.4.2.dist-info/RECORD +40 -0
- package/bin/_internal/cryptography/hazmat/bindings/_rust.abi3.so +0 -0
- package/bin/_internal/{cryptography-46.0.7.dist-info → cryptography-48.0.1.dist-info}/METADATA +7 -36
- package/bin/_internal/{cryptography-46.0.7.dist-info → cryptography-48.0.1.dist-info}/RECORD +137 -122
- package/bin/_internal/{cryptography-46.0.7.dist-info → cryptography-48.0.1.dist-info}/WHEEL +1 -1
- package/bin/_internal/cryptography-48.0.1.dist-info/sboms/cryptography-rust.cyclonedx.json +1362 -0
- package/bin/_internal/cryptography-48.0.1.dist-info/sboms/sbom.json +43 -0
- package/bin/_internal/exchangelib/__init__.py +120 -0
- package/bin/_internal/exchangelib/account.py +896 -0
- package/bin/_internal/exchangelib/attachments.py +268 -0
- package/bin/_internal/exchangelib/autodiscover/__init__.py +24 -0
- package/bin/_internal/exchangelib/autodiscover/cache.py +150 -0
- package/bin/_internal/exchangelib/autodiscover/discovery.py +491 -0
- package/bin/_internal/exchangelib/autodiscover/protocol.py +58 -0
- package/bin/_internal/exchangelib/configuration.py +106 -0
- package/bin/_internal/exchangelib/credentials.py +319 -0
- package/bin/_internal/exchangelib/errors.py +1710 -0
- package/bin/_internal/exchangelib/ewsdatetime.py +309 -0
- package/bin/_internal/exchangelib/extended_properties.py +311 -0
- package/bin/_internal/exchangelib/fields.py +1842 -0
- package/bin/_internal/exchangelib/folders/__init__.py +249 -0
- package/bin/_internal/exchangelib/folders/base.py +954 -0
- package/bin/_internal/exchangelib/folders/collections.py +576 -0
- package/bin/_internal/exchangelib/folders/known_folders.py +856 -0
- package/bin/_internal/exchangelib/folders/queryset.py +187 -0
- package/bin/_internal/exchangelib/folders/roots.py +390 -0
- package/bin/_internal/exchangelib/indexed_properties.py +96 -0
- package/bin/_internal/exchangelib/items/__init__.py +147 -0
- package/bin/_internal/exchangelib/items/base.py +241 -0
- package/bin/_internal/exchangelib/items/calendar_item.py +466 -0
- package/bin/_internal/exchangelib/items/contact.py +263 -0
- package/bin/_internal/exchangelib/items/item.py +413 -0
- package/bin/_internal/exchangelib/items/message.py +201 -0
- package/bin/_internal/exchangelib/items/post.py +38 -0
- package/bin/_internal/exchangelib/items/task.py +139 -0
- package/bin/_internal/exchangelib/properties.py +2364 -0
- package/bin/_internal/exchangelib/protocol.py +823 -0
- package/bin/_internal/exchangelib/queryset.py +691 -0
- package/bin/_internal/exchangelib/recurrence.py +349 -0
- package/bin/_internal/exchangelib/restriction.py +568 -0
- package/bin/_internal/exchangelib/services/__init__.py +117 -0
- package/bin/_internal/exchangelib/services/archive_item.py +33 -0
- package/bin/_internal/exchangelib/services/common.py +983 -0
- package/bin/_internal/exchangelib/services/convert_id.py +45 -0
- package/bin/_internal/exchangelib/services/copy_item.py +7 -0
- package/bin/_internal/exchangelib/services/create_attachment.py +34 -0
- package/bin/_internal/exchangelib/services/create_folder.py +45 -0
- package/bin/_internal/exchangelib/services/create_item.py +97 -0
- package/bin/_internal/exchangelib/services/create_user_configuration.py +19 -0
- package/bin/_internal/exchangelib/services/delete_attachment.py +28 -0
- package/bin/_internal/exchangelib/services/delete_folder.py +21 -0
- package/bin/_internal/exchangelib/services/delete_item.py +51 -0
- package/bin/_internal/exchangelib/services/delete_user_configuration.py +19 -0
- package/bin/_internal/exchangelib/services/empty_folder.py +25 -0
- package/bin/_internal/exchangelib/services/expand_dl.py +21 -0
- package/bin/_internal/exchangelib/services/export_items.py +27 -0
- package/bin/_internal/exchangelib/services/find_folder.py +80 -0
- package/bin/_internal/exchangelib/services/find_item.py +112 -0
- package/bin/_internal/exchangelib/services/find_people.py +106 -0
- package/bin/_internal/exchangelib/services/get_attachment.py +117 -0
- package/bin/_internal/exchangelib/services/get_delegate.py +45 -0
- package/bin/_internal/exchangelib/services/get_events.py +39 -0
- package/bin/_internal/exchangelib/services/get_folder.py +65 -0
- package/bin/_internal/exchangelib/services/get_item.py +41 -0
- package/bin/_internal/exchangelib/services/get_mail_tips.py +43 -0
- package/bin/_internal/exchangelib/services/get_persona.py +31 -0
- package/bin/_internal/exchangelib/services/get_room_lists.py +21 -0
- package/bin/_internal/exchangelib/services/get_rooms.py +21 -0
- package/bin/_internal/exchangelib/services/get_searchable_mailboxes.py +48 -0
- package/bin/_internal/exchangelib/services/get_server_time_zones.py +39 -0
- package/bin/_internal/exchangelib/services/get_streaming_events.py +102 -0
- package/bin/_internal/exchangelib/services/get_user_availability.py +67 -0
- package/bin/_internal/exchangelib/services/get_user_configuration.py +43 -0
- package/bin/_internal/exchangelib/services/get_user_oof_settings.py +40 -0
- package/bin/_internal/exchangelib/services/get_user_settings.py +87 -0
- package/bin/_internal/exchangelib/services/inbox_rules.py +104 -0
- package/bin/_internal/exchangelib/services/mark_as_junk.py +27 -0
- package/bin/_internal/exchangelib/services/move_folder.py +27 -0
- package/bin/_internal/exchangelib/services/move_item.py +28 -0
- package/bin/_internal/exchangelib/services/resolve_names.py +104 -0
- package/bin/_internal/exchangelib/services/send_item.py +26 -0
- package/bin/_internal/exchangelib/services/send_notification.py +43 -0
- package/bin/_internal/exchangelib/services/set_user_oof_settings.py +34 -0
- package/bin/_internal/exchangelib/services/subscribe.py +125 -0
- package/bin/_internal/exchangelib/services/sync_folder_hierarchy.py +95 -0
- package/bin/_internal/exchangelib/services/sync_folder_items.py +77 -0
- package/bin/_internal/exchangelib/services/unsubscribe.py +21 -0
- package/bin/_internal/exchangelib/services/update_folder.py +158 -0
- package/bin/_internal/exchangelib/services/update_item.py +113 -0
- package/bin/_internal/exchangelib/services/update_user_configuration.py +17 -0
- package/bin/_internal/exchangelib/services/upload_items.py +47 -0
- package/bin/_internal/exchangelib/settings.py +88 -0
- package/bin/_internal/exchangelib/transport.py +214 -0
- package/bin/_internal/exchangelib/util.py +894 -0
- package/bin/_internal/exchangelib/version.py +320 -0
- package/bin/_internal/exchangelib/winzone.py +662 -0
- package/bin/_internal/exchangelib-5.6.0.dist-info/INSTALLER +1 -0
- package/bin/_internal/exchangelib-5.6.0.dist-info/METADATA +77 -0
- package/bin/_internal/exchangelib-5.6.0.dist-info/RECORD +184 -0
- package/bin/_internal/exchangelib-5.6.0.dist-info/licenses/LICENSE +21 -0
- package/bin/_internal/exchangelib-5.6.0.dist-info/top_level.txt +1 -0
- package/bin/_internal/libcrypto.3.dylib +0 -0
- package/bin/_internal/libssl.3.dylib +0 -0
- package/bin/_internal/lxml/_elementpath.cpython-312-darwin.so +0 -0
- package/bin/_internal/lxml/builder.cpython-312-darwin.so +0 -0
- package/bin/_internal/lxml/{etree.cpython-314-darwin.so → etree.cpython-312-darwin.so} +0 -0
- package/bin/_internal/lxml/html/_difflib.cpython-312-darwin.so +0 -0
- package/bin/_internal/lxml/html/diff.cpython-312-darwin.so +0 -0
- package/bin/_internal/lxml/{objectify.cpython-314-darwin.so → objectify.cpython-312-darwin.so} +0 -0
- package/bin/_internal/lxml/sax.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/_asyncio.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/termios.cpython-314-darwin.so → python3.12/lib-dynload/_bisect.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_sha2.cpython-314-darwin.so → python3.12/lib-dynload/_blake2.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_bz2.cpython-314-darwin.so → python3.12/lib-dynload/_bz2.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_codecs_cn.cpython-314-darwin.so → python3.12/lib-dynload/_codecs_cn.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_codecs_hk.cpython-314-darwin.so → python3.12/lib-dynload/_codecs_hk.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_interpqueues.cpython-314-darwin.so → python3.12/lib-dynload/_codecs_iso2022.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_codecs_jp.cpython-314-darwin.so → python3.12/lib-dynload/_codecs_jp.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_codecs_kr.cpython-314-darwin.so → python3.12/lib-dynload/_codecs_kr.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_codecs_tw.cpython-314-darwin.so → python3.12/lib-dynload/_codecs_tw.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_statistics.cpython-314-darwin.so → python3.12/lib-dynload/_contextvars.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_csv.cpython-314-darwin.so → python3.12/lib-dynload/_csv.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/_ctypes.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/_datetime.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_dbm.cpython-314-darwin.so → python3.12/lib-dynload/_dbm.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/_decimal.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/_elementtree.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/_hashlib.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_heapq.cpython-314-darwin.so → python3.12/lib-dynload/_heapq.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/_json.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/_lzma.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_md5.cpython-314-darwin.so → python3.12/lib-dynload/_md5.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/_multibytecodec.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_multiprocessing.cpython-314-darwin.so → python3.12/lib-dynload/_multiprocessing.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/_opcode.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/_pickle.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_bisect.cpython-314-darwin.so → python3.12/lib-dynload/_posixshmem.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_posixsubprocess.cpython-314-darwin.so → python3.12/lib-dynload/_posixsubprocess.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_queue.cpython-314-darwin.so → python3.12/lib-dynload/_queue.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_random.cpython-314-darwin.so → python3.12/lib-dynload/_random.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_scproxy.cpython-314-darwin.so → python3.12/lib-dynload/_scproxy.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_sha1.cpython-314-darwin.so → python3.12/lib-dynload/_sha1.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/_sha2.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_blake2.cpython-314-darwin.so → python3.12/lib-dynload/_sha3.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/_socket.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/_ssl.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_posixshmem.cpython-314-darwin.so → python3.12/lib-dynload/_statistics.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/_struct.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_uuid.cpython-314-darwin.so → python3.12/lib-dynload/_uuid.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_zoneinfo.cpython-314-darwin.so → python3.12/lib-dynload/_zoneinfo.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/array.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/binascii.cpython-314-darwin.so → python3.12/lib-dynload/binascii.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/fcntl.cpython-314-darwin.so → python3.12/lib-dynload/fcntl.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/grp.cpython-314-darwin.so → python3.12/lib-dynload/grp.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/math.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/_sha3.cpython-314-darwin.so → python3.12/lib-dynload/mmap.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/pyexpat.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/readline.cpython-312-darwin.so +0 -0
- package/bin/_internal/{python3.14/lib-dynload/resource.cpython-314-darwin.so → python3.12/lib-dynload/resource.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/select.cpython-314-darwin.so → python3.12/lib-dynload/select.cpython-312-darwin.so} +0 -0
- package/bin/_internal/{python3.14/lib-dynload/syslog.cpython-314-darwin.so → python3.12/lib-dynload/syslog.cpython-312-darwin.so} +0 -0
- package/bin/_internal/python3.12/lib-dynload/termios.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/unicodedata.cpython-312-darwin.so +0 -0
- package/bin/_internal/python3.12/lib-dynload/zlib.cpython-312-darwin.so +0 -0
- package/bin/_internal/tzdata/zoneinfo/Africa/Casablanca +0 -0
- package/bin/_internal/tzdata/zoneinfo/Africa/El_Aaiun +0 -0
- package/bin/_internal/tzdata/zoneinfo/America/Edmonton +0 -0
- package/bin/_internal/tzdata/zoneinfo/America/Vancouver +0 -0
- package/bin/_internal/tzdata/zoneinfo/America/Yellowknife +0 -0
- package/bin/_internal/tzdata/zoneinfo/Asia/Ho_Chi_Minh +0 -0
- package/bin/_internal/tzdata/zoneinfo/Asia/Saigon +0 -0
- package/bin/_internal/tzdata/zoneinfo/Canada/Mountain +0 -0
- package/bin/_internal/tzdata/zoneinfo/Canada/Pacific +0 -0
- package/bin/_internal/tzdata/zoneinfo/leapseconds +4 -4
- package/bin/_internal/tzdata/zoneinfo/tzdata.zi +11 -131
- package/bin/_internal/tzdata/zoneinfo/zone.tab +2 -2
- package/bin/_internal/tzdata/zoneinfo/zone1970.tab +2 -2
- package/bin/_internal/tzdata/zoneinfo/zonenow.tab +8 -2
- package/bin/exchange-cli +0 -0
- package/package.json +10 -7
- package/bin/_internal/81d243bd2c585b0f4821__mypyc.cpython-314-darwin.so +0 -0
- package/bin/_internal/Python.framework/Versions/3.14/Python +0 -0
- package/bin/_internal/_cffi_backend.cpython-314-darwin.so +0 -0
- package/bin/_internal/click-8.3.2.dist-info/RECORD +0 -40
- package/bin/_internal/liblzma.5.dylib +0 -0
- package/bin/_internal/libmpdec.4.dylib +0 -0
- package/bin/_internal/libzstd.1.dylib +0 -0
- package/bin/_internal/lxml/_elementpath.cpython-314-darwin.so +0 -0
- package/bin/_internal/lxml/builder.cpython-314-darwin.so +0 -0
- package/bin/_internal/lxml/html/_difflib.cpython-314-darwin.so +0 -0
- package/bin/_internal/lxml/html/diff.cpython-314-darwin.so +0 -0
- package/bin/_internal/lxml/sax.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_asyncio.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_codecs_iso2022.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_ctypes.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_decimal.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_elementtree.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_hashlib.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_hmac.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_interpreters.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_json.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_lzma.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_multibytecodec.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_pickle.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_socket.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_ssl.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_struct.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/_zstd.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/array.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/math.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/mmap.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/pyexpat.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/readline.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/unicodedata.cpython-314-darwin.so +0 -0
- package/bin/_internal/python3.14/lib-dynload/zlib.cpython-314-darwin.so +0 -0
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/INSTALLER +0 -1
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/METADATA +0 -133
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/RECORD +0 -21
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/REQUESTED +0 -0
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/licenses/LICENSE +0 -73
- package/bin/_internal/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/top_level.txt +0 -1
- /package/bin/_internal/{click-8.3.2.dist-info → click-8.4.2.dist-info}/INSTALLER +0 -0
- /package/bin/_internal/{click-8.3.2.dist-info → click-8.4.2.dist-info}/WHEEL +0 -0
- /package/bin/_internal/{click-8.3.2.dist-info → click-8.4.2.dist-info}/licenses/LICENSE.txt +0 -0
- /package/bin/_internal/{cryptography-46.0.7.dist-info → cryptography-48.0.1.dist-info}/INSTALLER +0 -0
- /package/bin/_internal/{cryptography-46.0.7.dist-info → cryptography-48.0.1.dist-info}/licenses/LICENSE +0 -0
- /package/bin/_internal/{cryptography-46.0.7.dist-info → cryptography-48.0.1.dist-info}/licenses/LICENSE.APACHE +0 -0
- /package/bin/_internal/{cryptography-46.0.7.dist-info → cryptography-48.0.1.dist-info}/licenses/LICENSE.BSD +0 -0
- /package/bin/_internal/{setuptools/_vendor/importlib_metadata-8.7.1.dist-info → exchangelib-5.6.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import io
|
|
2
|
+
import logging
|
|
3
|
+
import mimetypes
|
|
4
|
+
|
|
5
|
+
from .errors import InvalidTypeError
|
|
6
|
+
from .fields import (
|
|
7
|
+
Base64Field,
|
|
8
|
+
BooleanField,
|
|
9
|
+
DateTimeField,
|
|
10
|
+
EWSElementField,
|
|
11
|
+
FieldPath,
|
|
12
|
+
IdField,
|
|
13
|
+
IntegerField,
|
|
14
|
+
ItemField,
|
|
15
|
+
TextField,
|
|
16
|
+
URIField,
|
|
17
|
+
)
|
|
18
|
+
from .properties import BaseItemId, EWSElement, EWSMeta
|
|
19
|
+
|
|
20
|
+
log = logging.getLogger(__name__)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class AttachmentId(BaseItemId):
|
|
24
|
+
"""MSDN: https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/attachmentid"""
|
|
25
|
+
|
|
26
|
+
ELEMENT_NAME = "AttachmentId"
|
|
27
|
+
|
|
28
|
+
ID_ATTR = "Id"
|
|
29
|
+
ROOT_ID_ATTR = "RootItemId"
|
|
30
|
+
ROOT_CHANGEKEY_ATTR = "RootItemChangeKey"
|
|
31
|
+
|
|
32
|
+
id = IdField(field_uri=ID_ATTR, is_required=True)
|
|
33
|
+
root_id = IdField(field_uri=ROOT_ID_ATTR)
|
|
34
|
+
root_changekey = IdField(field_uri=ROOT_CHANGEKEY_ATTR)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class Attachment(EWSElement, metaclass=EWSMeta):
|
|
38
|
+
"""Base class for FileAttachment and ItemAttachment."""
|
|
39
|
+
|
|
40
|
+
attachment_id = EWSElementField(value_cls=AttachmentId)
|
|
41
|
+
name = TextField(field_uri="Name")
|
|
42
|
+
content_type = TextField(field_uri="ContentType")
|
|
43
|
+
content_id = TextField(field_uri="ContentId")
|
|
44
|
+
content_location = URIField(field_uri="ContentLocation")
|
|
45
|
+
size = IntegerField(field_uri="Size", is_read_only=True) # Attachment size in bytes
|
|
46
|
+
last_modified_time = DateTimeField(field_uri="LastModifiedTime")
|
|
47
|
+
is_inline = BooleanField(field_uri="IsInline")
|
|
48
|
+
|
|
49
|
+
__slots__ = ("parent_item",)
|
|
50
|
+
|
|
51
|
+
def __init__(self, **kwargs):
|
|
52
|
+
self.parent_item = kwargs.pop("parent_item", None)
|
|
53
|
+
super().__init__(**kwargs)
|
|
54
|
+
|
|
55
|
+
def clean(self, version=None):
|
|
56
|
+
from .items import Item
|
|
57
|
+
|
|
58
|
+
if self.parent_item is not None and not isinstance(self.parent_item, Item):
|
|
59
|
+
raise InvalidTypeError("parent_item", self.parent_item, Item)
|
|
60
|
+
if self.content_type is None and self.name is not None:
|
|
61
|
+
self.content_type = mimetypes.guess_type(self.name)[0] or "application/octet-stream"
|
|
62
|
+
super().clean(version=version)
|
|
63
|
+
|
|
64
|
+
def attach(self):
|
|
65
|
+
from .services import CreateAttachment
|
|
66
|
+
|
|
67
|
+
# Adds this attachment to an item and updates the changekey of the parent item
|
|
68
|
+
if self.attachment_id:
|
|
69
|
+
raise ValueError("This attachment has already been created")
|
|
70
|
+
if not self.parent_item or not self.parent_item.account:
|
|
71
|
+
raise ValueError(f"Parent item {self.parent_item} must have an account")
|
|
72
|
+
item = CreateAttachment(account=self.parent_item.account).get(parent_item=self.parent_item, items=[self])
|
|
73
|
+
attachment_id = item.attachment_id
|
|
74
|
+
self.parent_item.changekey = attachment_id.root_changekey
|
|
75
|
+
# EWS does not like receiving root_id and root_changekey on subsequent requests
|
|
76
|
+
attachment_id.root_id = None
|
|
77
|
+
attachment_id.root_changekey = None
|
|
78
|
+
self.attachment_id = attachment_id
|
|
79
|
+
|
|
80
|
+
def detach(self):
|
|
81
|
+
from .services import DeleteAttachment
|
|
82
|
+
|
|
83
|
+
# Deletes an attachment remotely and updates the changekey of the parent item
|
|
84
|
+
if not self.attachment_id:
|
|
85
|
+
raise ValueError("This attachment has not been created")
|
|
86
|
+
if not self.parent_item or not self.parent_item.account:
|
|
87
|
+
raise ValueError(f"Parent item {self.parent_item} must have an account")
|
|
88
|
+
DeleteAttachment(account=self.parent_item.account).get(items=[self.attachment_id])
|
|
89
|
+
self.parent_item = None
|
|
90
|
+
self.attachment_id = None
|
|
91
|
+
|
|
92
|
+
def __hash__(self):
|
|
93
|
+
if self.attachment_id:
|
|
94
|
+
return hash(self.attachment_id)
|
|
95
|
+
# Be careful to avoid recursion on the back-reference to the parent item
|
|
96
|
+
return hash(tuple(getattr(self, f) for f in self._slots_keys if f != "parent_item"))
|
|
97
|
+
|
|
98
|
+
def __repr__(self):
|
|
99
|
+
args_str = ", ".join(
|
|
100
|
+
f"{f.name}={getattr(self, f.name)!r}" for f in self.FIELDS if f.name not in ("_item", "_content")
|
|
101
|
+
)
|
|
102
|
+
return f"{self.__class__.__name__}({args_str})"
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
class FileAttachment(Attachment):
|
|
106
|
+
"""MSDN: https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/fileattachment"""
|
|
107
|
+
|
|
108
|
+
ELEMENT_NAME = "FileAttachment"
|
|
109
|
+
|
|
110
|
+
is_contact_photo = BooleanField(field_uri="IsContactPhoto")
|
|
111
|
+
_content = Base64Field(field_uri="Content")
|
|
112
|
+
|
|
113
|
+
__slots__ = ("_fp",)
|
|
114
|
+
|
|
115
|
+
def __init__(self, **kwargs):
|
|
116
|
+
kwargs["_content"] = kwargs.pop("content", None)
|
|
117
|
+
super().__init__(**kwargs)
|
|
118
|
+
self._fp = None
|
|
119
|
+
|
|
120
|
+
@property
|
|
121
|
+
def fp(self):
|
|
122
|
+
# Return a file-like object for the content. This avoids creating multiple in-memory copies of the content.
|
|
123
|
+
if self._fp is None:
|
|
124
|
+
self._init_fp()
|
|
125
|
+
return self._fp
|
|
126
|
+
|
|
127
|
+
def _init_fp(self):
|
|
128
|
+
# Create a file-like object for the attachment content. We try hard to reduce memory consumption, so we never
|
|
129
|
+
# store the full attachment content in-memory.
|
|
130
|
+
if not self.parent_item or not self.parent_item.account:
|
|
131
|
+
raise ValueError(f"{self.__class__.__name__} must have an account")
|
|
132
|
+
self._fp = FileAttachmentIO(attachment=self)
|
|
133
|
+
|
|
134
|
+
@property
|
|
135
|
+
def content(self):
|
|
136
|
+
"""Return the attachment content. Stores a local copy of the content in case you want to upload the attachment
|
|
137
|
+
again later.
|
|
138
|
+
"""
|
|
139
|
+
if self.attachment_id is None:
|
|
140
|
+
return self._content
|
|
141
|
+
if self._content is not None:
|
|
142
|
+
return self._content
|
|
143
|
+
# We have an ID to the data but still haven't called GetAttachment to get the actual data. Do that now.
|
|
144
|
+
with self.fp as fp:
|
|
145
|
+
self._content = fp.read()
|
|
146
|
+
return self._content
|
|
147
|
+
|
|
148
|
+
@content.setter
|
|
149
|
+
def content(self, value):
|
|
150
|
+
"""Replace the attachment content."""
|
|
151
|
+
if not isinstance(value, bytes):
|
|
152
|
+
raise InvalidTypeError("value", value, bytes)
|
|
153
|
+
self._content = value
|
|
154
|
+
|
|
155
|
+
@classmethod
|
|
156
|
+
def from_xml(cls, elem, account):
|
|
157
|
+
kwargs = {f.name: f.from_xml(elem=elem, account=account) for f in cls.FIELDS}
|
|
158
|
+
kwargs["content"] = kwargs.pop("_content")
|
|
159
|
+
cls._clear(elem)
|
|
160
|
+
return cls(**kwargs)
|
|
161
|
+
|
|
162
|
+
def to_xml(self, version):
|
|
163
|
+
self._content = self.content # Make sure content is available, to avoid ErrorRequiredPropertyMissing
|
|
164
|
+
return super().to_xml(version=version)
|
|
165
|
+
|
|
166
|
+
def __getstate__(self):
|
|
167
|
+
# The fp does not need to be pickled
|
|
168
|
+
state = {k: getattr(self, k) for k in self._slots_keys}
|
|
169
|
+
del state["_fp"]
|
|
170
|
+
return state
|
|
171
|
+
|
|
172
|
+
def __setstate__(self, state):
|
|
173
|
+
# Restore the fp
|
|
174
|
+
for k in self._slots_keys:
|
|
175
|
+
setattr(self, k, state.get(k))
|
|
176
|
+
self._fp = None
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
class ItemAttachment(Attachment):
|
|
180
|
+
"""MSDN: https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/itemattachment"""
|
|
181
|
+
|
|
182
|
+
ELEMENT_NAME = "ItemAttachment"
|
|
183
|
+
|
|
184
|
+
_item = ItemField(field_uri="Item")
|
|
185
|
+
|
|
186
|
+
def __init__(self, **kwargs):
|
|
187
|
+
kwargs["_item"] = kwargs.pop("item", None)
|
|
188
|
+
super().__init__(**kwargs)
|
|
189
|
+
|
|
190
|
+
@property
|
|
191
|
+
def item(self):
|
|
192
|
+
from .folders import BaseFolder
|
|
193
|
+
from .services import GetAttachment
|
|
194
|
+
|
|
195
|
+
if self.attachment_id is None:
|
|
196
|
+
return self._item
|
|
197
|
+
if self._item is not None:
|
|
198
|
+
return self._item
|
|
199
|
+
# We have an ID to the data but still haven't called GetAttachment to get the actual data. Do that now.
|
|
200
|
+
if not self.parent_item or not self.parent_item.account:
|
|
201
|
+
raise ValueError(f"{self.__class__.__name__} must have an account")
|
|
202
|
+
additional_fields = {
|
|
203
|
+
FieldPath(field=f) for f in BaseFolder.allowed_item_fields(version=self.parent_item.account.version)
|
|
204
|
+
}
|
|
205
|
+
attachment = GetAttachment(account=self.parent_item.account).get(
|
|
206
|
+
items=[self.attachment_id],
|
|
207
|
+
include_mime_content=True,
|
|
208
|
+
body_type=None,
|
|
209
|
+
filter_html_content=None,
|
|
210
|
+
additional_fields=additional_fields,
|
|
211
|
+
)
|
|
212
|
+
self._item = attachment.item
|
|
213
|
+
return self._item
|
|
214
|
+
|
|
215
|
+
@item.setter
|
|
216
|
+
def item(self, value):
|
|
217
|
+
from .items import Item
|
|
218
|
+
|
|
219
|
+
if not isinstance(value, Item):
|
|
220
|
+
raise InvalidTypeError("value", value, Item)
|
|
221
|
+
self._item = value
|
|
222
|
+
|
|
223
|
+
@classmethod
|
|
224
|
+
def from_xml(cls, elem, account):
|
|
225
|
+
kwargs = {f.name: f.from_xml(elem=elem, account=account) for f in cls.FIELDS}
|
|
226
|
+
kwargs["item"] = kwargs.pop("_item")
|
|
227
|
+
cls._clear(elem)
|
|
228
|
+
return cls(**kwargs)
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
class FileAttachmentIO(io.RawIOBase):
|
|
232
|
+
"""A BytesIO where the stream of data comes from the GetAttachment service."""
|
|
233
|
+
|
|
234
|
+
def __init__(self, attachment):
|
|
235
|
+
self._attachment = attachment
|
|
236
|
+
self._stream = None
|
|
237
|
+
self._overflow = None
|
|
238
|
+
|
|
239
|
+
def readable(self):
|
|
240
|
+
return True
|
|
241
|
+
|
|
242
|
+
@property
|
|
243
|
+
def closed(self):
|
|
244
|
+
return self._stream is None
|
|
245
|
+
|
|
246
|
+
def readinto(self, b):
|
|
247
|
+
buf_size = len(b) # We can't return more than l bytes
|
|
248
|
+
try:
|
|
249
|
+
chunk = self._overflow or next(self._stream)
|
|
250
|
+
except StopIteration:
|
|
251
|
+
return 0
|
|
252
|
+
else:
|
|
253
|
+
output, self._overflow = chunk[:buf_size], chunk[buf_size:]
|
|
254
|
+
b[: len(output)] = output
|
|
255
|
+
return len(output)
|
|
256
|
+
|
|
257
|
+
def __enter__(self):
|
|
258
|
+
from .services import GetAttachment
|
|
259
|
+
|
|
260
|
+
self._stream = GetAttachment(account=self._attachment.parent_item.account).stream_file_content(
|
|
261
|
+
attachment_id=self._attachment.attachment_id
|
|
262
|
+
)
|
|
263
|
+
self._overflow = None
|
|
264
|
+
return io.BufferedReader(self, buffer_size=io.DEFAULT_BUFFER_SIZE)
|
|
265
|
+
|
|
266
|
+
def __exit__(self, *args, **kwargs):
|
|
267
|
+
self._stream = None
|
|
268
|
+
self._overflow = None
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from .cache import AutodiscoverCache, autodiscover_cache
|
|
2
|
+
from .discovery import Autodiscovery, discover
|
|
3
|
+
from .protocol import AutodiscoverProtocol
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def close_connections():
|
|
7
|
+
with autodiscover_cache:
|
|
8
|
+
autodiscover_cache.close()
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def clear_cache():
|
|
12
|
+
with autodiscover_cache:
|
|
13
|
+
autodiscover_cache.clear()
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"AutodiscoverCache",
|
|
18
|
+
"AutodiscoverProtocol",
|
|
19
|
+
"Autodiscovery",
|
|
20
|
+
"autodiscover_cache",
|
|
21
|
+
"clear_cache",
|
|
22
|
+
"close_connections",
|
|
23
|
+
"discover",
|
|
24
|
+
]
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import getpass
|
|
2
|
+
import logging
|
|
3
|
+
import shelve
|
|
4
|
+
import sys
|
|
5
|
+
import tempfile
|
|
6
|
+
from contextlib import contextmanager, suppress
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from threading import RLock
|
|
9
|
+
|
|
10
|
+
from ..configuration import Configuration
|
|
11
|
+
from .protocol import AutodiscoverProtocol
|
|
12
|
+
|
|
13
|
+
log = logging.getLogger(__name__)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def shelve_filename():
|
|
17
|
+
# Add the version of the cache format to the filename. If we change the format of the cached data, this version
|
|
18
|
+
# must be bumped. Otherwise, new versions of this package cannot open cache files generated by older versions.
|
|
19
|
+
version = 2
|
|
20
|
+
# 'shelve' may pickle objects using different pickle protocol versions. Append the python major+minor version
|
|
21
|
+
# numbers to the filename. Also append the username, to avoid permission errors.
|
|
22
|
+
major, minor = sys.version_info[:2]
|
|
23
|
+
try:
|
|
24
|
+
user = getpass.getuser()
|
|
25
|
+
except KeyError:
|
|
26
|
+
# getuser() fails on some systems. Provide a sane default. See issue #448
|
|
27
|
+
user = "exchangelib"
|
|
28
|
+
return f"exchangelib.{version}.cache.{user}.py{major}{minor}"
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
AUTODISCOVER_PERSISTENT_STORAGE = Path(tempfile.gettempdir(), shelve_filename())
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@contextmanager
|
|
35
|
+
def shelve_open_with_failover(file):
|
|
36
|
+
# We can expect empty or corrupt files. Whatever happens, just delete the cache file and try again.
|
|
37
|
+
# 'shelve' may add a backend-specific suffix to the file, so also delete all files with a suffix.
|
|
38
|
+
# We don't know which file caused the error, so just delete them all.
|
|
39
|
+
try:
|
|
40
|
+
shelve_handle = shelve.open(str(file))
|
|
41
|
+
# Try to actually use the file. Some implementations may allow opening the file but then throw
|
|
42
|
+
# errors on access.
|
|
43
|
+
with suppress(KeyError):
|
|
44
|
+
_ = shelve_handle[""]
|
|
45
|
+
except Exception as e:
|
|
46
|
+
for f in file.parent.glob(f"{file.name}*"):
|
|
47
|
+
log.warning("Deleting invalid cache file %s (%r)", f, e)
|
|
48
|
+
f.unlink()
|
|
49
|
+
shelve_handle = shelve.open(str(file))
|
|
50
|
+
yield shelve_handle
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class AutodiscoverCache:
|
|
54
|
+
"""Stores the translation from (email domain, credentials) -> AutodiscoverProtocol object, so we can re-use TCP
|
|
55
|
+
connections to an autodiscover server within the same process. Also persists the email domain -> (autodiscover
|
|
56
|
+
endpoint URL, auth_type) translation to the filesystem so the cache can be shared between multiple processes.
|
|
57
|
+
|
|
58
|
+
According to Microsoft, we may forever cache the (email domain -> autodiscover endpoint URL) mapping, or until
|
|
59
|
+
it stops responding. My previous experience with Exchange products in mind, I'm not sure if I should trust that
|
|
60
|
+
advice. But it could save some valuable seconds every time we start a new connection to a known server. In any
|
|
61
|
+
case, the persistent storage must not contain any sensitive information since the cache could be readable by
|
|
62
|
+
unprivileged users. Domain, endpoint and auth_type are OK to cache since this info is make publicly available on
|
|
63
|
+
HTTP and DNS servers via the autodiscover protocol. Just don't persist any credential info.
|
|
64
|
+
|
|
65
|
+
If an autodiscover lookup fails for any reason, the corresponding cache entry must be purged.
|
|
66
|
+
|
|
67
|
+
'shelve' is supposedly thread-safe and process-safe, which suits our needs.
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
def __init__(self):
|
|
71
|
+
self._protocols = {} # Mapping from (domain, credentials) to AutodiscoverProtocol
|
|
72
|
+
self._lock = RLock()
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def _storage_file(self):
|
|
76
|
+
return AUTODISCOVER_PERSISTENT_STORAGE
|
|
77
|
+
|
|
78
|
+
def clear(self):
|
|
79
|
+
# Wipe the entire cache
|
|
80
|
+
with shelve_open_with_failover(self._storage_file) as db:
|
|
81
|
+
db.clear()
|
|
82
|
+
self._protocols.clear()
|
|
83
|
+
|
|
84
|
+
def __len__(self):
|
|
85
|
+
return len(self._protocols)
|
|
86
|
+
|
|
87
|
+
def __contains__(self, key):
|
|
88
|
+
domain = key[0]
|
|
89
|
+
with shelve_open_with_failover(self._storage_file) as db:
|
|
90
|
+
return str(domain) in db
|
|
91
|
+
|
|
92
|
+
def __getitem__(self, key):
|
|
93
|
+
protocol = self._protocols.get(key)
|
|
94
|
+
if protocol:
|
|
95
|
+
return protocol
|
|
96
|
+
domain, credentials = key
|
|
97
|
+
with shelve_open_with_failover(self._storage_file) as db:
|
|
98
|
+
endpoint, auth_type, retry_policy = db[str(domain)] # It's OK to fail with KeyError here
|
|
99
|
+
protocol = AutodiscoverProtocol(
|
|
100
|
+
config=Configuration(
|
|
101
|
+
service_endpoint=endpoint, credentials=credentials, auth_type=auth_type, retry_policy=retry_policy
|
|
102
|
+
)
|
|
103
|
+
)
|
|
104
|
+
self._protocols[key] = protocol
|
|
105
|
+
return protocol
|
|
106
|
+
|
|
107
|
+
def __setitem__(self, key, protocol):
|
|
108
|
+
# Populate both local and persistent cache
|
|
109
|
+
domain = key[0]
|
|
110
|
+
with shelve_open_with_failover(self._storage_file) as db:
|
|
111
|
+
# Don't change this payload without bumping the cache file version in shelve_filename()
|
|
112
|
+
db[str(domain)] = (protocol.service_endpoint, protocol.auth_type, protocol.retry_policy)
|
|
113
|
+
self._protocols[key] = protocol
|
|
114
|
+
|
|
115
|
+
def __delitem__(self, key):
|
|
116
|
+
# Empty both local and persistent cache. Don't fail on non-existing entries because we could end here
|
|
117
|
+
# multiple times due to race conditions.
|
|
118
|
+
domain = key[0]
|
|
119
|
+
with shelve_open_with_failover(self._storage_file) as db, suppress(KeyError):
|
|
120
|
+
del db[str(domain)]
|
|
121
|
+
with suppress(KeyError):
|
|
122
|
+
del self._protocols[key]
|
|
123
|
+
|
|
124
|
+
def close(self):
|
|
125
|
+
# Close all open connections
|
|
126
|
+
for (domain, _), protocol in self._protocols.items():
|
|
127
|
+
log.debug("Domain %s: Closing sessions", domain)
|
|
128
|
+
protocol.close()
|
|
129
|
+
del protocol
|
|
130
|
+
self._protocols.clear()
|
|
131
|
+
|
|
132
|
+
def __enter__(self):
|
|
133
|
+
self._lock.__enter__()
|
|
134
|
+
|
|
135
|
+
def __exit__(self, *args, **kwargs):
|
|
136
|
+
self._lock.__exit__(*args, **kwargs)
|
|
137
|
+
|
|
138
|
+
def __del__(self):
|
|
139
|
+
# pylint: disable=bare-except
|
|
140
|
+
try:
|
|
141
|
+
self.close()
|
|
142
|
+
except Exception: # nosec
|
|
143
|
+
# __del__ should never fail
|
|
144
|
+
pass
|
|
145
|
+
|
|
146
|
+
def __str__(self):
|
|
147
|
+
return str(self._protocols)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
autodiscover_cache = AutodiscoverCache()
|