gam7 7.7.0__py3-none-any.whl → 7.7.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.
gam/__init__.py CHANGED
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
25
25
  """
26
26
 
27
27
  __author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
28
- __version__ = '7.07.00'
28
+ __version__ = '7.07.01'
29
29
  __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
30
30
 
31
31
  #pylint: disable=wrong-import-position
@@ -28183,75 +28183,171 @@ def doDeleteChromePolicy():
28183
28183
  except (GAPI.notFound, GAPI.permissionDenied, GAPI.invalidArgument, GAPI.serviceNotAvailable, GAPI.quotaExceeded) as e:
28184
28184
  entityActionFailedWarning(kvList, str(e))
28185
28185
 
28186
- CHROME_SCHEMA_TYPE_MESSAGE = {
28187
- 'chrome.users.AutoUpdateCheckPeriodNew':
28188
- {'autoupdatecheckperiodminutesnew':
28189
- {'casedField': 'autoUpdateCheckPeriodMinutesNew',
28190
- 'type': 'duration', 'minVal': 1, 'maxVal': 720, 'scale': 60}},
28186
+ CHROME_SCHEMA_SPECIAL_CASES = {
28191
28187
  'chrome.users.AutoUpdateCheckPeriodNewV2':
28192
28188
  {'autoupdatecheckperiodminutesnew':
28193
28189
  {'casedField': 'autoUpdateCheckPeriodMinutesNew',
28194
- 'type': 'duration', 'minVal': 1, 'maxVal': 720, 'scale': 60}},
28195
- 'chrome.users.BrowserSwitcherDelayDuration':
28190
+ 'type': 'duration', 'minVal': 1, 'maxVal': 720}},
28191
+ 'chrome.users.Avatar':
28192
+ {'useravatarimage':
28193
+ {'casedField': 'userAvatarImage',
28194
+ 'type': 'downloadUri'}},
28195
+ 'chrome.users.BrowserSwitcherDelayDurationV2':
28196
28196
  {'browserswitcherdelayduration':
28197
28197
  {'casedField': 'browserSwitcherDelayDuration',
28198
- 'type': 'duration', 'minVal': 0, 'maxVal': 30, 'scale': 1}},
28198
+ 'type': 'duration', 'minVal': 0, 'maxVal': 30}},
28199
+ 'chrome.users.BrowsingDataLifetimeV2':
28200
+ {'browsinghistoryttl':
28201
+ {'casedField': 'browsingHistoryTtl',
28202
+ 'type': 'duration', 'minVal': 1, 'maxVal': None},
28203
+ 'downloadhistoryttl':
28204
+ {'casedField': 'downloadHistoryTtl',
28205
+ 'type': 'duration', 'minVal': 1, 'maxVal': None},
28206
+ 'cookiesandothersitedatattl':
28207
+ {'casedField': 'cookiesAndOtherSiteDataTtl',
28208
+ 'type': 'duration', 'minVal': 1, 'maxVal': None},
28209
+ 'cachedimagesandfilesttl':
28210
+ {'casedField': 'cachedImagesAndFilesTtl',
28211
+ 'type': 'duration', 'minVal': 1, 'maxVal': None},
28212
+ 'passwordsigninttl':
28213
+ {'casedField': 'passwordSigninTtl',
28214
+ 'type': 'duration', 'minVal': 1, 'maxVal': None},
28215
+ 'autofillttl':
28216
+ {'casedField': 'autofillTtl',
28217
+ 'type': 'duration', 'minVal': 1, 'maxVal': None},
28218
+ 'sitesettingsttl':
28219
+ {'casedField': 'siteSettingsTtl',
28220
+ 'type': 'duration', 'minVal': 1, 'maxVal': None},
28221
+ 'hostedappdatattl':
28222
+ {'casedField': 'hostedAppDataTtl',
28223
+ 'type': 'duration', 'minVal': 1, 'maxVal': None}},
28199
28224
  'chrome.users.CloudReportingUploadFrequencyV2':
28200
28225
  {'cloudreportinguploadfrequency':
28201
28226
  {'casedField': 'cloudReportingUploadFrequency',
28202
- 'type': 'count', 'minVal': 3, 'maxVal': 24, 'scale': 1}},
28203
- 'chrome.users.FetchKeepaliveDurationSecondsOnShutdown':
28227
+ 'type': 'duration', 'minVal': 3, 'maxVal': 24}},
28228
+ 'chrome.users.FetchKeepaliveDurationSecondsOnShutdownV2':
28204
28229
  {'fetchkeepalivedurationsecondsonshutdown':
28205
28230
  {'casedField': 'fetchKeepaliveDurationSecondsOnShutdown',
28206
- 'type': 'duration', 'minVal': 0, 'maxVal': 5, 'scale': 1}},
28207
- 'chrome.users.MaxInvalidationFetchDelay':
28231
+ 'type': 'duration', 'minVal': 0, 'maxVal': 5}},
28232
+ 'chrome.users.MaxInvalidationFetchDelayV2':
28208
28233
  {'maxinvalidationfetchdelay':
28209
28234
  {'casedField': 'maxInvalidationFetchDelay',
28210
- 'type': 'duration', 'minVal': 1, 'maxVal': 30, 'scale': 1, 'default': 10}},
28235
+ 'type': 'duration', 'minVal': 1, 'maxVal': 30, 'default': 10}},
28211
28236
  'chrome.users.PrintingMaxSheetsAllowed':
28212
28237
  {'printingmaxsheetsallowednullable':
28213
28238
  {'casedField': 'printingMaxSheetsAllowedNullable',
28214
- 'type': 'value', 'minVal': 1, 'maxVal': None, 'scale': 1}},
28215
- 'chrome.users.PrintJobHistoryExpirationPeriodNew':
28239
+ 'type': 'value', 'minVal': 1, 'maxVal': None}},
28240
+ 'chrome.users.PrintJobHistoryExpirationPeriodNewV2':
28216
28241
  {'printjobhistoryexpirationperioddaysnew':
28217
28242
  {'casedField': 'printJobHistoryExpirationPeriodDaysNew',
28218
- 'type': 'duration', 'minVal': -1, 'maxVal': None, 'scale': 86400}},
28243
+ 'type': 'duration', 'minVal': -1, 'maxVal': None}},
28219
28244
  'chrome.users.RelaunchNotificationWithDurationV2':
28220
28245
  {'relaunchnotificationperiodduration':
28221
28246
  {'casedField': 'relaunchNotificationPeriodDuration',
28222
- 'type': 'duration', 'minVal': -1, 'maxVal': None, 'scale': 3600}},
28223
- 'chrome.users.SecurityTokenSessionSettings':
28247
+ 'type': 'duration', 'minVal': -1, 'maxVal': None}},
28248
+ 'chrome.users.SecurityTokenSessionSettingsV2':
28224
28249
  {'securitytokensessionnotificationseconds':
28225
28250
  {'casedField': 'securityTokenSessionNotificationSeconds',
28226
- 'type': 'duration', 'minVal': 0, 'maxVal': 9999, 'scale': 1}},
28227
- 'chrome.users.SessionLength':
28251
+ 'type': 'duration', 'minVal': 0, 'maxVal': 9999}},
28252
+ 'chrome.users.SessionLengthV2':
28228
28253
  {'sessiondurationlimit':
28229
28254
  {'casedField': 'sessionDurationLimit',
28230
- 'type': 'duration', 'minVal': 1, 'maxVal': 1440, 'scale': 60}},
28255
+ 'type': 'duration', 'minVal': 1, 'maxVal': 1440}},
28231
28256
  'chrome.users.UpdatesSuppressed':
28232
28257
  {'updatessuppresseddurationmin':
28233
28258
  {'casedField': 'updatesSuppressedDurationMin',
28234
- 'type': 'count', 'minVal': 1, 'maxVal': 1440, 'scale': 1},
28259
+ 'type': 'count', 'minVal': 1, 'maxVal': 1440},
28235
28260
  'updatessuppressedstarttime':
28236
28261
  {'casedField': 'updatesSuppressedStartTime',
28237
28262
  'type': 'timeOfDay'}},
28238
- 'chrome.devices.managedguest.Avatar':
28239
- {'useravatarimage':
28240
- {'casedField': 'userAvatarImage',
28241
- 'type': 'downloadUri'}},
28242
- 'chrome.devices.managedguest.Wallpaper':
28263
+ 'chrome.users.Wallpaper':
28243
28264
  {'wallpaperimage':
28244
28265
  {'casedField': 'wallpaperImage',
28245
28266
  'type': 'downloadUri'}},
28267
+ 'chrome.devices.EnableReportUploadFrequencyV2':
28268
+ {'reportdeviceuploadfrequency':
28269
+ {'casedField': 'reportDeviceUploadFrequency',
28270
+ 'type': 'duration', 'minVal': 60, 'maxVal': 25379}},
28271
+ 'chrome.devices.ScheduledRebootDurationV2':
28272
+ {'uptimelimitduration':
28273
+ {'casedField': 'uptimeLimitDuration',
28274
+ 'type': 'duration', 'minVal': 1, 'maxVal': 365}},
28246
28275
  'chrome.devices.SignInWallpaperImage':
28247
28276
  {'devicewallpaperimage':
28248
28277
  {'casedField': 'deviceWallpaperImage',
28249
28278
  'type': 'downloadUri'}},
28250
- 'chrome.users.Avatar':
28279
+ 'chrome.devices.kiosk.AcPowerSettingsV2':
28280
+ {'acidletimeout':
28281
+ {'casedField': 'acIdleTimeout',
28282
+ 'type': 'duration', 'minVal': 1, 'maxVal': 35000},
28283
+ 'acwarningtimeout':
28284
+ {'casedField': 'acWarningTimeout',
28285
+ 'type': 'duration', 'minVal': 0, 'maxVal': 35000},
28286
+ 'acdimtimeout':
28287
+ {'casedField': 'acDimTimeout',
28288
+ 'type': 'duration', 'minVal': 0, 'maxVal': 35000},
28289
+ 'acscreenofftimeout':
28290
+ {'casedField': 'acScreenOffTimeout',
28291
+ 'type': 'duration', 'minVal': 0, 'maxVal': 35000}},
28292
+ 'chrome.devices.kiosk.BatteryPowerSettingsV2':
28293
+ {'batteryidletimeout':
28294
+ {'casedField': 'batteryIdleTimeout',
28295
+ 'type': 'duration', 'minVal': 1, 'maxVal': 35000},
28296
+ 'batterywarningtimeout':
28297
+ {'casedField': 'batteryWarningTimeout',
28298
+ 'type': 'duration', 'minVal': 0, 'maxVal': 35000},
28299
+ 'batterydimtimeout':
28300
+ {'casedField': 'batteryDimTimeout',
28301
+ 'type': 'duration', 'minVal': 0, 'maxVal': 35000},
28302
+ 'batteryscreenofftimeout':
28303
+ {'casedField': 'batteryScreenOffTimeout',
28304
+ 'type': 'duration', 'minVal': 0, 'maxVal': 35000}},
28305
+ 'chrome.devices.managedguest.Avatar':
28251
28306
  {'useravatarimage':
28252
28307
  {'casedField': 'userAvatarImage',
28253
28308
  'type': 'downloadUri'}},
28254
- 'chrome.users.Wallpaper':
28309
+ 'chrome.devices.managedguest.BrowsingDataLifetimeV2':
28310
+ {'browsinghistoryttl':
28311
+ {'casedField': 'browsingHistoryTtl',
28312
+ 'type': 'duration', 'minVal': 1, 'maxVal': None},
28313
+ 'downloadhistoryttl':
28314
+ {'casedField': 'downloadHistoryTtl',
28315
+ 'type': 'duration', 'minVal': 1, 'maxVal': None},
28316
+ 'cookiesandothersitedatattl':
28317
+ {'casedField': 'cookiesAndOtherSiteDataTtl',
28318
+ 'type': 'duration', 'minVal': 1, 'maxVal': None},
28319
+ 'cachedimagesandfilesttl':
28320
+ {'casedField': 'cachedImagesAndFilesTtl',
28321
+ 'type': 'duration', 'minVal': 1, 'maxVal': None},
28322
+ 'passwordsigninttl':
28323
+ {'casedField': 'passwordSigninTtl',
28324
+ 'type': 'duration', 'minVal': 1, 'maxVal': None},
28325
+ 'autofillttl':
28326
+ {'casedField': 'autofillTtl',
28327
+ 'type': 'duration', 'minVal': 1, 'maxVal': None},
28328
+ 'sitesettingsttl':
28329
+ {'casedField': 'siteSettingsTtl',
28330
+ 'type': 'duration', 'minVal': 1, 'maxVal': None},
28331
+ 'hostedappdatattl':
28332
+ {'casedField': 'hostedAppDataTtl',
28333
+ 'type': 'duration', 'minVal': 1, 'maxVal': None}},
28334
+ 'chrome.devices.managedguest.MaxInvalidationFetchDelayV2':
28335
+ {'maxinvalidationfetchdelay':
28336
+ {'casedField': 'maxInvalidationFetchDelay',
28337
+ 'type': 'duration', 'minVal': 1, 'maxVal': 30, 'default': 10}},
28338
+ 'chrome.devices.managedguest.PrintJobHistoryExpirationPeriodNewV2':
28339
+ {'printjobhistoryexpirationperioddaysnew':
28340
+ {'casedField': 'printJobHistoryExpirationPeriodDaysNew',
28341
+ 'type': 'duration', 'minVal': -1, 'maxVal': None}},
28342
+ 'chrome.devices.managedguest.SecurityTokenSessionSettingsV2':
28343
+ {'securitytokensessionnotificationseconds':
28344
+ {'casedField': 'securityTokenSessionNotificationSeconds',
28345
+ 'type': 'duration', 'minVal': 0, 'maxVal': 9999}},
28346
+ 'chrome.devices.managedguest.SessionLengthV2':
28347
+ {'sessiondurationlimit':
28348
+ {'casedField': 'sessionDurationLimit',
28349
+ 'type': 'duration', 'minVal': 1, 'maxVal': 1440}},
28350
+ 'chrome.devices.managedguest.Wallpaper':
28255
28351
  {'wallpaperimage':
28256
28352
  {'casedField': 'wallpaperImage',
28257
28353
  'type': 'downloadUri'}},
@@ -28266,9 +28362,7 @@ CHROME_TARGET_VERSION_PATTERN = re.compile(r'^(\d{1,4}\.){1,4}$')
28266
28362
  # [(printerid <PrinterID>)|(appid <AppID>)]
28267
28363
  def doUpdateChromePolicy():
28268
28364
  def getSpecialVtypeValue(vtype, value):
28269
- if vtype == 'duration':
28270
- return {vtype: f'{value}s'}
28271
- if vtype in {'value', 'downloadUri'}:
28365
+ if vtype in {'duration', 'value', 'downloadUri'}:
28272
28366
  return {vtype: value}
28273
28367
  if vtype == 'count':
28274
28368
  return value
@@ -28326,8 +28420,8 @@ def doUpdateChromePolicy():
28326
28420
  for field in jsonData.get('fields', []):
28327
28421
  casedField = field['name']
28328
28422
  lowerField = casedField.lower()
28329
- # Handle TYPE_MESSAGE fields with durations, values, counts and timeOfDay as special cases
28330
- tmschema = CHROME_SCHEMA_TYPE_MESSAGE.get(schemaName, {}).get(lowerField)
28423
+ # Handle fields with durations, values, counts and timeOfDay as special cases
28424
+ tmschema = CHROME_SCHEMA_SPECIAL_CASES.get(schemaName, {}).get(lowerField)
28331
28425
  if tmschema:
28332
28426
  body['requests'][-1]['policyValue']['value'][casedField] = getSpecialVtypeValue(tmschema['type'], field['value'])
28333
28427
  body['requests'][-1]['updateMask'] += f'{casedField},'
@@ -28363,8 +28457,8 @@ def doUpdateChromePolicy():
28363
28457
  body['requests'][-1]['policyValue']['value'][casedField] = value
28364
28458
  body['requests'][-1]['updateMask'] += f'{casedField},'
28365
28459
  break
28366
- # Handle TYPE_MESSAGE fields with durations, values, counts and timeOfDay as special cases
28367
- tmschema = CHROME_SCHEMA_TYPE_MESSAGE.get(schemaName, {}).get(field)
28460
+ # Handle fields with durations, values, counts and timeOfDay as special cases
28461
+ tmschema = CHROME_SCHEMA_SPECIAL_CASES.get(schemaName, {}).get(field)
28368
28462
  if tmschema:
28369
28463
  casedField = tmschema['casedField']
28370
28464
  vtype = tmschema['type']
@@ -28372,9 +28466,9 @@ def doUpdateChromePolicy():
28372
28466
  value = getString(Cmd.OB_STRING)
28373
28467
  elif vtype != 'timeOfDay':
28374
28468
  if 'default' not in tmschema:
28375
- value = getInteger(minVal=tmschema['minVal'], maxVal=tmschema['maxVal'])*tmschema['scale']
28469
+ value = getInteger(minVal=tmschema['minVal'], maxVal=tmschema['maxVal'])
28376
28470
  else:
28377
- value = getIntegerEmptyAllowed(minVal=tmschema['minVal'], maxVal=tmschema['maxVal'], default=tmschema['default'])*tmschema['scale']
28471
+ value = getIntegerEmptyAllowed(minVal=tmschema['minVal'], maxVal=tmschema['maxVal'], default=tmschema['default'])
28378
28472
  else:
28379
28473
  value = getHHMM()
28380
28474
  body['requests'][-1]['policyValue']['value'][casedField] = getSpecialVtypeValue(vtype, value)
@@ -28507,20 +28601,14 @@ def doPrintShowChromePolicies():
28507
28601
  'chrome.users.apps.ManagedConfiguration'} and 'managedConfiguration' in values:
28508
28602
  values['managedConfiguration'] = json.dumps(values['managedConfiguration'], ensure_ascii=False).replace('\\n', '').replace('\\"', '"')[1:-1]
28509
28603
  for setting, value in values.items():
28510
- # Handle TYPE_MESSAGE fields with durations, values, counts and timeOfDay as special cases
28511
- schema = CHROME_SCHEMA_TYPE_MESSAGE.get(name, {}).get(setting.lower())
28604
+ # Handle fields with durations, values, counts and timeOfDay as special cases
28605
+ schema = CHROME_SCHEMA_SPECIAL_CASES.get(name, {}).get(setting.lower())
28512
28606
  if schema and setting == schema['casedField']:
28513
28607
  vtype = schema['type']
28514
- if vtype in {'duration', 'value'}:
28608
+ if vtype in {'duration', 'value', 'downloadUri'}:
28515
28609
  value = value.get(vtype, '')
28516
- if value:
28517
- if value.endswith('s'):
28518
- value = value[:-1]
28519
- value = int(value) // schema['scale']
28520
28610
  elif vtype == 'count':
28521
28611
  pass
28522
- elif vtype == 'downloadUri':
28523
- value = value.get(vtype, '')
28524
28612
  else: #timeOfDay
28525
28613
  hours = value.get(vtype, {}).get('hours', 0)
28526
28614
  minutes = value.get(vtype, {}).get('minutes', 0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gam7
3
- Version: 7.7.0
3
+ Version: 7.7.1
4
4
  Summary: CLI tool to manage Google Workspace
5
5
  Project-URL: Homepage, https://github.com/GAM-team/GAM
6
6
  Project-URL: Issues, https://github.com/GAM-team/GAM/issues
@@ -1,4 +1,4 @@
1
- gam/__init__.py,sha256=WZoLfil7JdhIYFdy5VijYGf0x_mUzURBAWAwqLkLgkc,3494807
1
+ gam/__init__.py,sha256=ZrcsSOvwCZR3oAYBrH2ei3gtfbJ7RKvu49OUNN-1TaA,3498690
2
2
  gam/__main__.py,sha256=amz0-959ph6zkZKqjaar4n60yho-T37w6qWI36qx0CA,1049
3
3
  gam/cacerts.pem,sha256=nJuWha0xm5dHw_5ptGphwRoO-r36Ccpqiww9pCEDbSc,67484
4
4
  gam/cbcm-v1.1beta1.json,sha256=xO5XloCQQULmPbFBx5bckdqmbLFQ7sJ2TImhE1ysDIY,19439
@@ -65,8 +65,8 @@ gam/googleapiclient/discovery_cache/base.py,sha256=yCDPtxnbNN-p5_9fzBacC6P3wcUPl
65
65
  gam/googleapiclient/discovery_cache/file_cache.py,sha256=sim3Mg4HgRYo3vX75jvcKy_aV568EvIrtBfvfbw-044,4774
66
66
  gam/iso8601/__init__.py,sha256=Z2PsYbXgAH5a5xzUvgczCboPzqWpm65kRcIngCnhViU,1218
67
67
  gam/iso8601/iso8601.py,sha256=Li2FHZ4sBTWuthuQhyCvmvj0j6At8JbGzkSv2fc2RHU,4384
68
- gam7-7.7.0.dist-info/METADATA,sha256=jeufu2vV_fW7CSQMkK0iLMjSk3gk1xvYzwZd6IM2Im8,2969
69
- gam7-7.7.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
70
- gam7-7.7.0.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
71
- gam7-7.7.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
72
- gam7-7.7.0.dist-info/RECORD,,
68
+ gam7-7.7.1.dist-info/METADATA,sha256=XFgikxYfyOd56QEPd77XMra_-N0HfZnASQXsi1fIhmU,2969
69
+ gam7-7.7.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
70
+ gam7-7.7.1.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
71
+ gam7-7.7.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
72
+ gam7-7.7.1.dist-info/RECORD,,
File without changes