medicafe 0.251017.0__py3-none-any.whl → 0.251017.1__py3-none-any.whl

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.

Potentially problematic release.


This version of medicafe might be problematic. Click here for more details.

MediBot/__init__.py CHANGED
@@ -19,7 +19,7 @@ Smart Import Integration:
19
19
  medibot_main = get_components('medibot_main')
20
20
  """
21
21
 
22
- __version__ = "0.251017.0"
22
+ __version__ = "0.251017.1"
23
23
  __author__ = "Daniel Vidaud"
24
24
  __email__ = "daniel@personalizedtransformation.com"
25
25
 
MediCafe/__init__.py CHANGED
@@ -27,7 +27,7 @@ Smart Import System:
27
27
  api_suite = get_api_access()
28
28
  """
29
29
 
30
- __version__ = "0.251017.0"
30
+ __version__ = "0.251017.1"
31
31
  __author__ = "Daniel Vidaud"
32
32
  __email__ = "daniel@personalizedtransformation.com"
33
33
 
@@ -470,13 +470,22 @@ def handle_post_response(url, payload, headers):
470
470
  else:
471
471
  log("Link retrieval initiated successfully.")
472
472
  elif response.status_code == 401:
473
- log("Unauthorized. Check if the token has the necessary scopes.Response body: {}".format(response.text))
474
- token_info = http_inspect_token(headers['Authorization'].split(' ')[1], log, delete_token_file_fn=delete_token_file, stop_server_fn=stop_server)
475
- log("Token details: {}".format(token_info))
476
- shutdown_event.set()
473
+ # Automatic re-auth: clear token and prompt user to re-consent, keep server up
474
+ log("Unauthorized (401). Clearing cached token and initiating re-authentication flow. Response body: {}".format(response.text))
475
+ delete_token_file()
476
+ auth_url = get_authorization_url()
477
+ print("Your Google session needs to be refreshed to regain permissions. A browser window will open to re-authorize the app with the required scopes.")
478
+ open_browser_with_executable(auth_url)
479
+ # Wait for the OAuth redirect/flow to complete; the server remains running
480
+ shutdown_event.wait()
477
481
  elif response.status_code == 403:
478
- log("Forbidden access. Ensure that the OAuth client has the correct permissions. Response body: {}".format(response.text))
479
- shutdown_event.set()
482
+ # Treat 403 similarly; scopes may be missing/changed. Force a fresh consent.
483
+ log("Forbidden (403). Clearing cached token and prompting for fresh consent. Response body: {}".format(response.text))
484
+ delete_token_file()
485
+ auth_url = get_authorization_url()
486
+ print("Permissions appear insufficient (403). Opening browser to request the correct Google permissions.")
487
+ open_browser_with_executable(auth_url)
488
+ shutdown_event.wait()
480
489
  elif response.status_code == 404:
481
490
  log("Not Found. Verify the URL and ensure the Apps Script is deployed correctly. Response body: {}".format(response.text))
482
491
  shutdown_event.set()
MediLink/__init__.py CHANGED
@@ -22,7 +22,7 @@ Smart Import Integration:
22
22
  datamgmt = get_components('medilink_datamgmt')
23
23
  """
24
24
 
25
- __version__ = "0.251017.0"
25
+ __version__ = "0.251017.1"
26
26
  __author__ = "Daniel Vidaud"
27
27
  __email__ = "daniel@personalizedtransformation.com"
28
28
 
@@ -76,11 +76,10 @@ def inspect_token(access_token, log, delete_token_file_fn=None, stop_server_fn=N
76
76
  else:
77
77
  log("Failed to inspect token. Status code: {}, Body: {}".format(response.status_code, response.text))
78
78
  if response.status_code == 400 and "invalid_token" in response.text:
79
- log("Access token is invalid. Deleting token.json and stopping the server.")
79
+ # Token is invalid (revoked/expired). Clear cache and let caller trigger re-auth.
80
+ log("Access token is invalid. Clearing token cache and keeping server running for re-auth.")
80
81
  if delete_token_file_fn:
81
82
  delete_token_file_fn()
82
- if stop_server_fn:
83
- stop_server_fn()
84
83
  return None
85
84
  return None
86
85
  except Exception as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: medicafe
3
- Version: 0.251017.0
3
+ Version: 0.251017.1
4
4
  Summary: MediCafe
5
5
  Home-page: https://github.com/katanada2/MediCafe
6
6
  Author: Daniel Vidaud
@@ -12,7 +12,7 @@ MediBot/MediBot_dataformat_library.py,sha256=D46fdPtxcgfWTzaLBtSvjtozzZBNqNiODgu
12
12
  MediBot/MediBot_debug.bat,sha256=F5Lfi3nFEEo4Ddx9EbX94u3fNAMgzMp3wsn-ULyASTM,6017
13
13
  MediBot/MediBot_docx_decoder.py,sha256=9BSjV-kB90VHnqfL_5iX4zl5u0HcHvHuL7YNfx3gXpQ,33143
14
14
  MediBot/MediBot_smart_import.py,sha256=Emvz7NwemHGCHvG5kZcUyXMcCheidbGKaPfOTg-YCEs,6684
15
- MediBot/__init__.py,sha256=Gj1gmPtY2Ua-T9wxwcjl2OXVo7dMcZI4FkOg-YVWvLg,3192
15
+ MediBot/__init__.py,sha256=tPc3GRS2hYeSa5NEwTCpUOiplwJyo9DZvaiQBvuaDzU,3192
16
16
  MediBot/clear_cache.bat,sha256=F6-VhETWw6xDdGWG2wUqvtXjCl3lY4sSUFqF90bM8-8,1860
17
17
  MediBot/crash_diagnostic.bat,sha256=j8kUtyBg6NOWbXpeFuEqIRHOkVzgUrLOqO3FBMfNxTo,9268
18
18
  MediBot/f_drive_diagnostic.bat,sha256=4572hZaiwZ5wVAarPcZJQxkOSTwAdDuT_X914noARak,6878
@@ -22,7 +22,7 @@ MediBot/process_csvs.bat,sha256=3tI7h1z9eRj8rUUL4wJ7dy-Qrak20lRmpAPtGbUMbVQ,3489
22
22
  MediBot/update_json.py,sha256=vvUF4mKCuaVly8MmoadDO59M231fCIInc0KI1EtDtPA,3704
23
23
  MediBot/update_medicafe.py,sha256=G1lyvVOHYuho1d-TJQNN6qaB4HBWaJ2PpXqemBoPlRQ,17937
24
24
  MediCafe/MediLink_ConfigLoader.py,sha256=NoLb2YiJwlkrRYCt2PHvcFJ7yTIRWQCrsvkZIJWreM4,11141
25
- MediCafe/__init__.py,sha256=5NhwImtNbn5vzqKaqRB0It076F7C2Zmb0REd1jY4BxE,5721
25
+ MediCafe/__init__.py,sha256=ya-2HryLmR_NeJXCktxeWdfoFvaI3NK7obHmRu6-A5M,5721
26
26
  MediCafe/__main__.py,sha256=mRNyk3D9Ilnu2XhgVI_rut7r5Ro7UIKtwV871giAHI8,12992
27
27
  MediCafe/api_core.py,sha256=r9cqa5-HU4A7iz3NLxzRwuxsxOfDiJn9SRgtPjT83qU,90764
28
28
  MediCafe/api_factory.py,sha256=I5AeJoyu6m7oCrjc2OvVvO_4KSBRutTsR1riiWhTZV0,12086
@@ -51,7 +51,7 @@ MediLink/MediLink_Deductible.py,sha256=8Npibnv4p7HDGhz8t7bf760lbkGbV3fMVIfKjNgxY
51
51
  MediLink/MediLink_Deductible_Validator.py,sha256=x6tHJOi88TblUpDPSH6QhIdXXRgr3rXI7kYPVGZYCgU,24998
52
52
  MediLink/MediLink_Display_Utils.py,sha256=MonsX6VPbdvqwY_V8sHUYrXCS0fMKc4toJvG0oyr-V4,24872
53
53
  MediLink/MediLink_Down.py,sha256=s4_z-RaqHYanjwbQCl-OSkg4XIpcIQ2Q6jXa8-q_QXw,28111
54
- MediLink/MediLink_Gmail.py,sha256=hMHgseSi58qPMivZpEhZbY6k-tyxC-hHcWaS7xVNFbI,28011
54
+ MediLink/MediLink_Gmail.py,sha256=KnTm7Z_Q5B1n9hNtCR00wDWWWmRVf86f-JtKdZKRKpA,28637
55
55
  MediLink/MediLink_Mailer.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
56
56
  MediLink/MediLink_Parser.py,sha256=eRVZ4ckZ5gDOrcvtCUZP3DOd3Djly66rCIk0aYXLz14,12567
57
57
  MediLink/MediLink_PatientProcessor.py,sha256=9r2w4p45d30Tn0kbXL3j5574MYOehP83tDirNOw_Aek,19977
@@ -63,15 +63,15 @@ MediLink/MediLink_insurance_utils.py,sha256=g741Fj2K26cMy0JX5d_XavMw9LgkK6hjaUJY
63
63
  MediLink/MediLink_main.py,sha256=CAXu0IRzhra3ppIFDcCppFNAZp7kCuN6gPtJSdFqGzs,24857
64
64
  MediLink/MediLink_smart_import.py,sha256=B5SfBn_4bYEWJJDolXbjnwKx_-MaqGZ76LyXQwWDV80,9838
65
65
  MediLink/Soumit_api.py,sha256=5JfOecK98ZC6NpZklZW2AkOzkjvrbYxpJpZNH3rFxDw,497
66
- MediLink/__init__.py,sha256=xK9uzY41kqKgKT5uxifwKQd001nXnAzeHPJdwjB4Yeo,3888
67
- MediLink/gmail_http_utils.py,sha256=gtqCCrzJC7e8JFQzMNrf7EbK8na2h4sfTu-NMaZ_UHc,4006
66
+ MediLink/__init__.py,sha256=wN-T-InivqDJu-lk3TyAyx6-ozGaDOsqbqBSLQWo4zw,3888
67
+ MediLink/gmail_http_utils.py,sha256=mYChIhkbA1oJaAJA-nY3XgHQY-H7zvZJUZPhUagomsI,4047
68
68
  MediLink/gmail_oauth_utils.py,sha256=Ugr-DEqs4_RddRMSCJ_dbgA3TVeaxpbAor-dktcTIgY,3713
69
69
  MediLink/openssl.cnf,sha256=76VdcGCykf0Typyiv8Wd1mMVKixrQ5RraG6HnfKFqTo,887
70
70
  MediLink/test.py,sha256=DM_E8gEbhbVfTAm3wTMiNnK2GCD1e5eH6gwTk89QIc4,3116
71
71
  MediLink/webapp.html,sha256=DwDYjVvluGJ7eDdvEogfKN4t24ZJRoIUuSBfCYCL-3w,21252
72
- medicafe-0.251017.0.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
73
- medicafe-0.251017.0.dist-info/METADATA,sha256=d86uW7sAJWTEBOxVF00UdawI9PmXuNoMuiE7iGCTYE0,3414
74
- medicafe-0.251017.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
75
- medicafe-0.251017.0.dist-info/entry_points.txt,sha256=m3RBUBjr-xRwEkKJ5W4a7NlqHZP_1rllGtjZnrRqKe8,52
76
- medicafe-0.251017.0.dist-info/top_level.txt,sha256=U6-WBJ9RCEjyIs0BlzbQq_PwedCp_IV9n1616NNV5zA,26
77
- medicafe-0.251017.0.dist-info/RECORD,,
72
+ medicafe-0.251017.1.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
73
+ medicafe-0.251017.1.dist-info/METADATA,sha256=55QUT57-HhWixs_lDUf-5pEre_oqUdEIJtvWJUPaL0M,3414
74
+ medicafe-0.251017.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
75
+ medicafe-0.251017.1.dist-info/entry_points.txt,sha256=m3RBUBjr-xRwEkKJ5W4a7NlqHZP_1rllGtjZnrRqKe8,52
76
+ medicafe-0.251017.1.dist-info/top_level.txt,sha256=U6-WBJ9RCEjyIs0BlzbQq_PwedCp_IV9n1616NNV5zA,26
77
+ medicafe-0.251017.1.dist-info/RECORD,,