Added option conferencedata meet <MeetID> to <EventAttribute>

This commit is contained in:
Ross Scroggs
2025-12-18 09:28:08 -08:00
parent a7df79b75e
commit c77d0806c9
4 changed files with 32 additions and 7 deletions

View File

@@ -1737,13 +1737,16 @@ gam calendar <CalendarEntity> printacl [todrive <ToDriveAttribute>*]
<AttendeeStatus> ::= accepted|declined|needsaction|tentative
<EventAttribute> ::=
(allday <Date>)|
(anyonecanaddself [<Boolean>])|
(attachment <String> <URL>)|
(attendee <EmailAddress>)|
(attendeestatus [<AttendeeAttendance>] [<AttendeeStatus>] <EmailAddress>)|
available|
(birthday <Date>)|
(color <EventColorName>)|
(colorindex|colorid <EventColorIndex>)|
(conferencedata meet <MeetID>)|
(description <String>)|
(end|endtime (allday <Date>)|<Time>)|
(guestscaninviteothers <Boolean>)|
@@ -1751,7 +1754,7 @@ gam calendar <CalendarEntity> printacl [todrive <ToDriveAttribute>*]
(guestscanmodify <Boolean>)|
(guestscanseeotherguests <Boolean>)|
guestscantseeotherguests|
hangoutsmeet|
googlemeet|hangoutsmeet|
<JSONData>|
(jsonattendees [charset <Charset>] <String>)|
(jsonattendees file <FileName> [charset <Charset>])|
@@ -1762,7 +1765,7 @@ gam calendar <CalendarEntity> printacl [todrive <ToDriveAttribute>*]
(privateproperty <PropertyKey> <PropertyValue>)|
(range <Date> <Date>)|
(recurrence <RRULE, EXRULE, RDATE and EXDATE line>)|
(reminder <Number> email|popup))|
(reminder <Number> email|popup)|
(resource <ResourceID>)|
(selectattendees [<AttendeeAttendance>] [<AttendeeStatus>] <UserTypeEntity>)|
(sequence <Integer>)|
@@ -1792,7 +1795,7 @@ The following attributes are equivalent:
<EventAttribute>|
clearattachments|
clearattendees|
clearhangoutsmeet|
cleargooglemeet|clearhangoutsmeet|
(clearprivateproperty <PropertyKey>)|
clearresources|
(clearsharedproperty <PropertyKey>)|
@@ -1911,7 +1914,7 @@ gam calendar|calendars <CalendarEntity> empty calendartrash
<EventOrganizerSubfieldName>|
originalstart|originalstarttime|
outofofficeproperties|
<EventOutOfOfficePropertiesSubfieldName>
<EventOutOfOfficePropertiesSubfieldName>|
privatecopy|
recurrence|
recurringeventid|
@@ -6228,6 +6231,7 @@ gam <UserTypeEntity> transfer calendars|seccals <UserItem> [<UserCalendarEntity>
(birthday <Date>)|
(color <EventColorName>)|
(colorindex|colorid <EventColorIndex>)|
(conferencedata meet <MeetID>)|
(description <String>)|
(end|endtime (allday <Date>)|<Time>)|
(guestscaninviteothers <Boolean>)|
@@ -6235,7 +6239,7 @@ gam <UserTypeEntity> transfer calendars|seccals <UserItem> [<UserCalendarEntity>
(guestscanmodify <Boolean>)|
(guestscanseeotherguests <Boolean>)|
guestscantseeotherguests|
hangoutsmeet|
googlemeet|hangoutsmeet|
<JSONData>|
(jsonattendees [charset <Charset>] <String>)|
(jsonattendees file <FileName> [charset <Charset>])|
@@ -6247,6 +6251,7 @@ gam <UserTypeEntity> transfer calendars|seccals <UserItem> [<UserCalendarEntity>
(range <Date> <Date>)|
(recurrence <RRULE, EXRULE, RDATE and EXDATE line>)|
(reminder <Number> email|popup)|
(resource <ResourceID>)|
(selectattendees [<AttendeeAttendance>] [<AttendeeStatus>] <UserTypeEntity>)|
(sequence <Integer>)|
(sharedproperty <PropertyKey> <PropertyValue>)|
@@ -6275,10 +6280,12 @@ The following attributes are equivalent:
<EventAttribute>|
clearattachments|
clearattendees|
clearhangoutsmeet|
cleargooglemeet|clearhangoutsmeet|
(clearprivateproperty <PropertyKey>)|
clearresources|
(clearsharedproperty <PropertyKey>)|
(removeattendee <EmailAddress>)|
(removeresource <ResourceID>)|
(replacedescription <REMatchPattern> <RESubstitution>)|
(selectremoveattendees <UserTypeEntity>)

View File

@@ -1,3 +1,8 @@
7.30.02
Added option `conferencedata meet <MeetID>` to `<EventAttribute>` that allows specifying
a reference to an existing Google Meet when creating/updating a calendar event.
7.30.01
Fixed bug introduced in 7.30.00 that caused errors when reading CSV files.

View File

@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
"""
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
__version__ = '7.30.01'
__version__ = '7.30.02'
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
#pylint: disable=wrong-import-position
@@ -240,6 +240,9 @@ PASSWORD_SAFE_CHARS = ALPHANUMERIC_CHARS+'!#$%&()*-./:;<=>?@[\\]^_{|}~'
FILENAME_SAFE_CHARS = ALPHANUMERIC_CHARS+'-_.() '
CHAT_MESSAGEID_CHARS = string.ascii_lowercase+string.digits+'-'
GOOGLE_MEETID_PATTERN = re.compile(r'^[a-z]{3}-[a-z]{4}-[a-z]{3}$')
GOOGLE_MEETID_FORMAT_REQUIRED = 'abc-defg-hij'
ADMIN_ACCESS_OPTIONS = {'adminaccess', 'asadmin'}
OWNER_ACCESS_OPTIONS = {'owneraccess', 'asowner'}
@@ -40133,6 +40136,15 @@ def _getCalendarEventAttribute(myarg, body, parameters, function):
body['attachments'] = []
elif myarg in {'hangoutsmeet', 'googlemeet'}:
body['conferenceData'] = {'createRequest': {'conferenceSolutionKey': {'type': 'hangoutsMeet'}, 'requestId': f'{str(uuid.uuid4())}'}}
elif myarg == 'conferencedata':
checkArgumentPresent(['meet'], True)
epLabel = getString(Cmd.OB_MEET_ID)
if not GOOGLE_MEETID_PATTERN.match(epLabel):
invalidArgumentExit(GOOGLE_MEETID_FORMAT_REQUIRED)
body['conferenceData'] = {"conferenceId": epLabel,
"conferenceSolution": {"key": {"type": "hangoutsMeet"}},
"entryPoints": [{"entryPointType": "video", "label": f'meet.google.com/{epLabel}',
"uri": f'https://meet.google.com/{epLabel}'}]}
elif function == 'update' and myarg in {'clearhangoutsmeet', 'cleargooglemeet'}:
body['conferenceData'] = None
elif myarg == 'recurrence':

View File

@@ -1278,6 +1278,7 @@ class GamCLArgs():
OB_MATTER_ITEM = 'MatterItem'
OB_MATTER_ITEM_LIST = 'MatterItemList'
OB_MEET_CONFERENCE_NAME = 'MeetConferenceName'
OB_MEET_ID = 'MeetID'
OB_MESSAGE_ID = 'MessageID'
OB_MIMETYPE = 'MimeType'
OB_MIMETYPE_LIST = 'MimeTypeList'