diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 1236d41c..493a3389 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -1,3 +1,11 @@ +7.07.10 + +Updated `gam calendars update events` and `gam update events ` +to handle the following error: +``` +ERROR: 400: eventTypeRestriction - Attendees cannot be added to 'fromGmail' event with this visibility setting. +``` + 7.07.09 Updated `gam calendars update events` and `gam update events ` diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 813de4d6..df207196 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki """ __author__ = 'GAM Team ' -__version__ = '7.07.09' +__version__ = '7.07.10' __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' #pylint: disable=wrong-import-position @@ -39299,7 +39299,7 @@ def _updateCalendarEvents(origUser, user, origCal, calIds, count, calendarEventE throwReasons=GAPI.CALENDAR_THROW_REASONS+[GAPI.NOT_FOUND, GAPI.DELETED, GAPI.FORBIDDEN, GAPI.BACKEND_ERROR, GAPI.INVALID, GAPI.REQUIRED, GAPI.TIME_RANGE_EMPTY, GAPI.EVENT_DURATION_EXCEEDS_LIMIT, GAPI.REQUIRED_ACCESS_LEVEL, GAPI.CANNOT_CHANGE_ORGANIZER_OF_INSTANCE, - GAPI.MALFORMED_WORKING_LOCATION_EVENT], + GAPI.MALFORMED_WORKING_LOCATION_EVENT, GAPI.EVENT_TYPE_RESTRICTION], retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS+[GAPI.BACKEND_ERROR], calendarId=calId, eventId=eventId, conferenceDataVersion=1, sendUpdates=parameters['sendUpdates'], supportsAttachments=True, body=body, fields=pfields) @@ -39315,7 +39315,8 @@ def _updateCalendarEvents(origUser, user, origCal, calIds, count, calendarEventE break entityActionFailedWarning([Ent.CALENDAR, calId, Ent.EVENT, eventId], str(e), j, jcount) except (GAPI.forbidden, GAPI.backendError, GAPI.invalid, GAPI.required, GAPI.timeRangeEmpty, GAPI.eventDurationExceedsLimit, - GAPI.requiredAccessLevel, GAPI.cannotChangeOrganizerOfInstance, GAPI.malformedWorkingLocationEvent) as e: + GAPI.requiredAccessLevel, GAPI.cannotChangeOrganizerOfInstance, GAPI.malformedWorkingLocationEvent, + GAPI.eventTypeRestriction) as e: entityActionFailedWarning([Ent.CALENDAR, calId, Ent.EVENT, eventId], str(e), j, jcount) except GAPI.notACalendarUser: userCalServiceNotEnabledWarning(calId, i, count) diff --git a/src/gam/gamlib/glgapi.py b/src/gam/gamlib/glgapi.py index 1e535b21..28dfd3b1 100644 --- a/src/gam/gamlib/glgapi.py +++ b/src/gam/gamlib/glgapi.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2024 Ross Scroggs All Rights Reserved. +# Copyright (C) 2025 Ross Scroggs All Rights Reserved. # # All Rights Reserved. # @@ -72,6 +72,7 @@ DOMAIN_POLICY = 'domainPolicy' DOWNLOAD_QUOTA_EXCEEDED = 'downloadQuotaExceeded' DUPLICATE = 'duplicate' EVENT_DURATION_EXCEEDS_LIMIT = 'eventDurationExceedsLimit' +EVENT_TYPE_RESTRICTION = 'eventTypeRestriction' EXPIRATION_DATES_MUST_BE_IN_THE_FUTURE = 'expirationDatesMustBeInTheFuture' EXPIRATION_DATE_NOT_ALLOWED_FOR_SHARED_DRIVE_MEMBERS = 'expirationDateNotAllowedForSharedDriveMembers' FAILED_PRECONDITION = 'failedPrecondition' @@ -457,6 +458,8 @@ class duplicate(Exception): pass class eventDurationExceedsLimit(Exception): pass +class eventTypeRestriction(Exception): + pass class expirationDatesMustBeInTheFuture(Exception): pass class expirationDateNotAllowedForSharedDriveMembers(Exception): @@ -725,6 +728,7 @@ REASON_EXCEPTION_MAP = { DOWNLOAD_QUOTA_EXCEEDED: downloadQuotaExceeded, DUPLICATE: duplicate, EVENT_DURATION_EXCEEDS_LIMIT: eventDurationExceedsLimit, + EVENT_TYPE_RESTRICTION: eventTypeRestriction, EXPIRATION_DATES_MUST_BE_IN_THE_FUTURE: expirationDatesMustBeInTheFuture, EXPIRATION_DATE_NOT_ALLOWED_FOR_SHARED_DRIVE_MEMBERS: expirationDateNotAllowedForSharedDriveMembers, FAILED_PRECONDITION: failedPrecondition,