diff --git a/docs/Authorization.md b/docs/Authorization.md index 0e3e4d31..30245352 100644 --- a/docs/Authorization.md +++ b/docs/Authorization.md @@ -837,7 +837,7 @@ gam update sakey (algorithm KEY_ALG_RSA_1024|KEY_ALG_RSA_2048)| (localkeysize 1024|2048|4096 [validityhours ])| (yubikey yubikey_pin yubikey_slot AUTHENTICATION|SIGNATURE yubikey_serialnumber ) -gam rotate sakey replace_existing +gam rotate sakey replace_current (algorithm KEY_ALG_RSA_1024|KEY_ALG_RSA_2048)| (localkeysize 1024|2048|4096 [validityhours ])| (yubikey yubikey_pin yubikey_slot AUTHENTICATION|SIGNATURE yubikey_serialnumber ) diff --git a/docs/Calendars-Events.md b/docs/Calendars-Events.md index f0e644e4..4e4f87a4 100644 --- a/docs/Calendars-Events.md +++ b/docs/Calendars-Events.md @@ -178,6 +178,7 @@ Client access works when accessing Resource calendars. ::= default| focustime| + fromgmail| outofoffice| workinglocation ::= "(,)*" diff --git a/docs/GamUpdates.md b/docs/GamUpdates.md index 4c24a51e..51bbeda8 100644 --- a/docs/GamUpdates.md +++ b/docs/GamUpdates.md @@ -10,6 +10,12 @@ Add the `-s` option to the end of the above commands to suppress creating the `g See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation +### 6.76.10 + +Added `fromgmail` to `` that can be used in `gam calendars print|show events ... eventtype fromgmail`. + +* See: https://workspaceupdates.googleblog.com/2024/05/google-calendar-api-event-type-fromgmail.html + ### 6.76.09 Updated `gam update|delete|info adminrole` to handle the following error: diff --git a/docs/How-to-Upgrade-from-Standard-GAM.md b/docs/How-to-Upgrade-from-Standard-GAM.md index d299543e..10a937c2 100644 --- a/docs/How-to-Upgrade-from-Standard-GAM.md +++ b/docs/How-to-Upgrade-from-Standard-GAM.md @@ -335,7 +335,7 @@ writes the credentials into the file oauth2.txt. admin@server:/Users/admin/bin/gamadv-xtd3$ rm -f /Users/admin/GAMConfig/oauth2.txt admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam version WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found -GAMADV-XTD3 6.76.09 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.76.10 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.3 64-bit final MacOS Sonoma 14.4.1 x86_64 @@ -1009,7 +1009,7 @@ writes the credentials into the file oauth2.txt. C:\GAMADV-XTD3>del C:\GAMConfig\oauth2.txt C:\GAMADV-XTD3>gam version WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found -GAMADV-XTD3 6.76.09 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.76.10 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.3 64-bit final Windows-10-10.0.17134 AMD64 diff --git a/docs/Users-Calendars-Events.md b/docs/Users-Calendars-Events.md index d63a4861..92a0060f 100644 --- a/docs/Users-Calendars-Events.md +++ b/docs/Users-Calendars-Events.md @@ -243,6 +243,7 @@ ::= default| focustime| + fromgmail| outofoffice| workinglocation ::= "(,)*" diff --git a/docs/Version-and-Help.md b/docs/Version-and-Help.md index 88153805..192d75ec 100644 --- a/docs/Version-and-Help.md +++ b/docs/Version-and-Help.md @@ -3,7 +3,7 @@ Print the current version of Gam with details ``` gam version -GAMADV-XTD3 6.76.09 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.76.10 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.3 64-bit final MacOS Sonoma 14.4.1 x86_64 @@ -15,7 +15,7 @@ Time: 2023-06-02T21:10:00-07:00 Print the current version of Gam with details and time offset information ``` gam version timeoffset -GAMADV-XTD3 6.76.09 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.76.10 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.3 64-bit final MacOS Sonoma 14.4.1 x86_64 @@ -27,7 +27,7 @@ Your system time differs from www.googleapis.com by less than 1 second Print the current version of Gam with extended details and SSL information ``` gam version extended -GAMADV-XTD3 6.76.09 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.76.10 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.3 64-bit final MacOS Sonoma 14.4.1 x86_64 @@ -64,7 +64,7 @@ MacOS High Sierra 10.13.6 x86_64 Path: /Users/Admin/bin/gamadv-xtd3 Version Check: Current: 5.35.08 - Latest: 6.76.09 + Latest: 6.76.10 echo $? 1 ``` @@ -72,7 +72,7 @@ echo $? Print the current version number without details ``` gam version simple -6.76.09 +6.76.10 ``` In Linux/MacOS you can do: ``` @@ -82,7 +82,7 @@ echo $VER Print the current version of Gam and address of this Wiki ``` gam help -GAM 6.76.09 - https://github.com/taers232c/GAMADV-XTD3 +GAM 6.76.10 - https://github.com/taers232c/GAMADV-XTD3 Ross Scroggs Python 3.12.3 64-bit final MacOS Sonoma 14.4.1 x86_64 diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 5ea86403..d554aad5 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -2,6 +2,12 @@ Merged GAM-Team version +6.76.10 + +Added `fromgmail` to `` that can be used in `gam calendars print|show events ... eventtype fromgmail`. + +* See: https://workspaceupdates.googleblog.com/2024/05/google-calendar-api-event-type-fromgmail.html + 6.76.09 Updated `gam update|delete|info adminrole` to handle the following error: diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 3ef785d1..66dd3751 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -12369,7 +12369,7 @@ def _formatOAuth2ServiceData(service_data): GM.Globals[GM.OAUTH2SERVICE_JSON_DATA] = service_data.copy() return json.dumps(GM.Globals[GM.OAUTH2SERVICE_JSON_DATA], indent=2, sort_keys=True) -def doProcessSvcAcctKeys(mode, iam=None, projectId=None, clientEmail=None, clientId=None): +def doProcessSvcAcctKeys(mode=None, iam=None, projectId=None, clientEmail=None, clientId=None): def getSAKeyParms(body, new_data): nonlocal local_key_size, validityHours while Cmd.ArgumentsRemaining(): @@ -12401,6 +12401,8 @@ def doProcessSvcAcctKeys(mode, iam=None, projectId=None, clientEmail=None, clien local_key_size = 2048 validityHours = 0 body = {} + if mode is None: + mode = getChoice(['retainnone', 'retainexisting', 'replacecurrent']) if iam is None or mode == 'upload': if iam is None: _, iam = buildGAPIServiceObject(API.IAM, None) @@ -36188,32 +36190,36 @@ def doCalendarsPrintShowACLs(calIds): EVENT_TYPE_DEFAULT = 'default' EVENT_TYPE_FOCUSTIME = 'focusTime' +EVENT_TYPE_FROMGMAIL = 'fromGmail' EVENT_TYPE_OUTOFOFFICE = 'outOfOffice' EVENT_TYPE_WORKINGLOCATION = 'workingLocation' EVENT_TYPES_CHOICE_MAP = { 'default': EVENT_TYPE_DEFAULT, 'focustime': EVENT_TYPE_FOCUSTIME, + 'fromgmail': EVENT_TYPE_FROMGMAIL, 'outofoffice': EVENT_TYPE_OUTOFOFFICE, 'workinglocation': EVENT_TYPE_WORKINGLOCATION, } -EVENT_TYPE_DEFAULT_PROPERTIES_MAP = { - EVENT_TYPE_DEFAULT: {'eventType': EVENT_TYPE_DEFAULT}, - EVENT_TYPE_FOCUSTIME: {'eventType': EVENT_TYPE_FOCUSTIME, - 'focusTimeProperties': {'autoDeclineMode': 'declineNone', 'declineMessage': 'Declined', 'chatStatus': 'doNotDisturb'}, - 'transparency':'opaque'}, - EVENT_TYPE_OUTOFOFFICE: {'eventType': EVENT_TYPE_OUTOFOFFICE, - 'outOfOfficeProperties': {'autoDeclineMode': 'declineOnlyNewConflictingInvitations', 'declineMessage': 'Declined'}, - 'transparency':'opaque'}, - EVENT_TYPE_WORKINGLOCATION: {'eventType': EVENT_TYPE_WORKINGLOCATION, - 'workingLocationProperties': {}, - 'visibility': 'public', 'transparency':'transparent'}, - } +#EVENT_TYPE_DEFAULT_PROPERTIES_MAP = { +# EVENT_TYPE_DEFAULT: {'eventType': EVENT_TYPE_DEFAULT}, +# EVENT_TYPE_FOCUSTIME: {'eventType': EVENT_TYPE_FOCUSTIME, +# 'focusTimeProperties': {'autoDeclineMode': 'declineNone', 'declineMessage': 'Declined', 'chatStatus': 'doNotDisturb'}, +# 'transparency':'opaque'}, +# EVENT_TYPE_FROMGMAIL: {'eventType': EVENT_TYPE_FROMGMAIL}, +# EVENT_TYPE_OUTOFOFFICE: {'eventType': EVENT_TYPE_OUTOFOFFICE, +# 'outOfOfficeProperties': {'autoDeclineMode': 'declineOnlyNewConflictingInvitations', 'declineMessage': 'Declined'}, +# 'transparency':'opaque'}, +# EVENT_TYPE_WORKINGLOCATION: {'eventType': EVENT_TYPE_WORKINGLOCATION, +# 'workingLocationProperties': {}, +# 'visibility': 'public', 'transparency':'transparent'}, +# } EVENT_TYPE_PROPERTIES_NAME_MAP = { EVENT_TYPE_DEFAULT: None, EVENT_TYPE_FOCUSTIME: f'{EVENT_TYPE_FOCUSTIME}Properties', + EVENT_TYPE_FROMGMAIL: None, EVENT_TYPE_OUTOFOFFICE: f'{EVENT_TYPE_OUTOFOFFICE}Properties', EVENT_TYPE_WORKINGLOCATION: f'{EVENT_TYPE_WORKINGLOCATION}Properties', } @@ -36221,6 +36227,7 @@ EVENT_TYPE_PROPERTIES_NAME_MAP = { EVENT_TYPE_ENTITY_MAP = { EVENT_TYPE_DEFAULT: None, EVENT_TYPE_FOCUSTIME: Ent.EVENT_FOCUSTIME, + EVENT_TYPE_FROMGMAIL: None, EVENT_TYPE_OUTOFOFFICE: Ent.EVENT_OUTOFOFFICE, EVENT_TYPE_WORKINGLOCATION: Ent.EVENT_WORKINGLOCATION, }