gam7 7.17.3__py3-none-any.whl → 7.18.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 gam7 might be problematic. Click here for more details.
- gam/__init__.py +149 -23
- gam/gamlib/glapi.py +9 -0
- gam/gamlib/glclargs.py +2 -0
- gam/gamlib/glentity.py +2 -0
- {gam7-7.17.3.dist-info → gam7-7.18.1.dist-info}/METADATA +1 -1
- {gam7-7.17.3.dist-info → gam7-7.18.1.dist-info}/RECORD +9 -9
- {gam7-7.17.3.dist-info → gam7-7.18.1.dist-info}/WHEEL +0 -0
- {gam7-7.17.3.dist-info → gam7-7.18.1.dist-info}/entry_points.txt +0 -0
- {gam7-7.17.3.dist-info → gam7-7.18.1.dist-info}/licenses/LICENSE +0 -0
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.
|
|
28
|
+
__version__ = '7.18.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
|
|
@@ -5579,7 +5579,12 @@ def buildGAPIObject(api, credentials=None):
|
|
|
5579
5579
|
try:
|
|
5580
5580
|
API_Scopes = set(list(service._rootDesc['auth']['oauth2']['scopes']))
|
|
5581
5581
|
except KeyError:
|
|
5582
|
-
|
|
5582
|
+
if api == API.VAULT:
|
|
5583
|
+
API_Scopes = set(API.VAULT_SCOPES)
|
|
5584
|
+
elif api == API.BUSINESSACCOUNTMANAGEMENT:
|
|
5585
|
+
API_Scopes = {API.BUSINESSACCOUNTMANAGEMENT_SCOPE}
|
|
5586
|
+
else:
|
|
5587
|
+
API_Scopes = set()
|
|
5583
5588
|
GM.Globals[GM.CURRENT_CLIENT_API] = api
|
|
5584
5589
|
GM.Globals[GM.CURRENT_CLIENT_API_SCOPES] = API_Scopes.intersection(GM.Globals[GM.CREDENTIALS_SCOPES])
|
|
5585
5590
|
if api not in API.SCOPELESS_APIS and not GM.Globals[GM.CURRENT_CLIENT_API_SCOPES]:
|
|
@@ -16616,10 +16621,14 @@ def getRoleId():
|
|
|
16616
16621
|
invalidChoiceExit(role, GM.Globals[GM.MAP_ROLE_NAME_TO_ID], True)
|
|
16617
16622
|
return (role, roleId)
|
|
16618
16623
|
|
|
16624
|
+
PRINT_ADMIN_ROLES_FIELDS = ['roleId', 'roleName', 'roleDescription', 'isSuperAdminRole', 'isSystemRole']
|
|
16625
|
+
|
|
16619
16626
|
# gam create adminrole <String> [description <String>]
|
|
16620
|
-
# privileges all|all_ou|<
|
|
16627
|
+
# privileges all|all_ou|<PrivilegeList>|(select <FileSelector>|<CSVFileSelector>)|<JSONData>
|
|
16628
|
+
# [csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]] (addcsvdata <FieldName> <String>)*]
|
|
16621
16629
|
# gam update adminrole <RoleItem> [name <String>] [description <String>]
|
|
16622
|
-
# [privileges all|all_ou|<
|
|
16630
|
+
# [privileges all|all_ou|<PrivilegeList>|(select <FileSelector>|<CSVFileSelector>)|<JSONData>]
|
|
16631
|
+
# [csv [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]] (addcsvdata <FieldName> <String>)*]
|
|
16623
16632
|
def doCreateUpdateAdminRoles():
|
|
16624
16633
|
def expandChildPrivileges(privilege):
|
|
16625
16634
|
for childPrivilege in privilege.get('childPrivileges', []):
|
|
@@ -16636,6 +16645,9 @@ def doCreateUpdateAdminRoles():
|
|
|
16636
16645
|
allPrivileges = {}
|
|
16637
16646
|
ouPrivileges = {}
|
|
16638
16647
|
childPrivileges = {}
|
|
16648
|
+
csvPF = None
|
|
16649
|
+
FJQC = FormatJSONQuoteChar(None)
|
|
16650
|
+
addCSVData = {}
|
|
16639
16651
|
for privilege in _listPrivileges(cd):
|
|
16640
16652
|
allPrivileges[privilege['privilegeName']] = privilege['serviceId']
|
|
16641
16653
|
if privilege['isOuScopable']:
|
|
@@ -16649,6 +16661,8 @@ def doCreateUpdateAdminRoles():
|
|
|
16649
16661
|
body['rolePrivileges'] = [{'privilegeName': p, 'serviceId': v} for p, v in allPrivileges.items()]
|
|
16650
16662
|
elif privs == 'ALL_OU':
|
|
16651
16663
|
body['rolePrivileges'] = [{'privilegeName': p, 'serviceId': v} for p, v in ouPrivileges.items()]
|
|
16664
|
+
elif privs == 'JSON':
|
|
16665
|
+
body['rolePrivileges'] = getJSON(['roleId', 'roleName', 'isAdminRole', 'isSystemRole']).get('rolePrivileges', [])
|
|
16652
16666
|
else:
|
|
16653
16667
|
if privs == 'SELECT':
|
|
16654
16668
|
privsList = [p.upper() for p in getEntityList(Cmd.OB_PRIVILEGE_LIST)]
|
|
@@ -16670,25 +16684,59 @@ def doCreateUpdateAdminRoles():
|
|
|
16670
16684
|
else:
|
|
16671
16685
|
invalidChoiceExit(p, list(allPrivileges.keys())+list(ouPrivileges.keys())+list(childPrivileges.keys()), True)
|
|
16672
16686
|
elif myarg == 'description':
|
|
16673
|
-
body['roleDescription'] = getString(Cmd.OB_STRING)
|
|
16687
|
+
body['roleDescription'] = getString(Cmd.OB_STRING, minLen=0)
|
|
16674
16688
|
elif myarg == 'name':
|
|
16675
16689
|
body['roleName'] = getString(Cmd.OB_STRING)
|
|
16690
|
+
elif myarg == 'csv':
|
|
16691
|
+
csvPF = CSVPrintFile(PRINT_ADMIN_ROLES_FIELDS)
|
|
16692
|
+
FJQC.SetCsvPF(csvPF)
|
|
16693
|
+
elif csvPF and myarg == 'todrive':
|
|
16694
|
+
csvPF.GetTodriveParameters()
|
|
16695
|
+
elif csvPF and myarg == 'addcsvdata':
|
|
16696
|
+
k = getString(Cmd.OB_STRING)
|
|
16697
|
+
addCSVData[k] = getString(Cmd.OB_STRING, minLen=0)
|
|
16676
16698
|
else:
|
|
16677
|
-
|
|
16699
|
+
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
|
16678
16700
|
if not updateCmd and not body.get('rolePrivileges'):
|
|
16679
16701
|
missingArgumentExit('privileges')
|
|
16702
|
+
if csvPF:
|
|
16703
|
+
if addCSVData:
|
|
16704
|
+
csvPF.AddTitles(sorted(addCSVData.keys()))
|
|
16705
|
+
if not FJQC.formatJSON:
|
|
16706
|
+
csvPF.AddTitles('rolePrivileges')
|
|
16707
|
+
else:
|
|
16708
|
+
csvPF.AddJSONTitles(sorted(addCSVData.keys()))
|
|
16709
|
+
csvPF.MoveJSONTitlesToEnd(['JSON'])
|
|
16710
|
+
fieldsList = ','.join(PRINT_ADMIN_ROLES_FIELDS+['rolePrivileges'])
|
|
16711
|
+
else:
|
|
16712
|
+
fieldsList = 'roleId,roleName'
|
|
16680
16713
|
try:
|
|
16681
16714
|
if not updateCmd:
|
|
16682
16715
|
result = callGAPI(cd.roles(), 'insert',
|
|
16683
16716
|
throwReasons=[GAPI.BAD_REQUEST, GAPI.CUSTOMER_NOT_FOUND,
|
|
16684
16717
|
GAPI.FORBIDDEN, GAPI.PERMISSION_DENIED]+[GAPI.DUPLICATE],
|
|
16685
|
-
customer=GC.Values[GC.CUSTOMER_ID], body=body, fields=
|
|
16718
|
+
customer=GC.Values[GC.CUSTOMER_ID], body=body, fields=fieldsList)
|
|
16686
16719
|
else:
|
|
16687
16720
|
result = callGAPI(cd.roles(), 'patch',
|
|
16688
16721
|
throwReasons=[GAPI.BAD_REQUEST, GAPI.CUSTOMER_NOT_FOUND,
|
|
16689
16722
|
GAPI.FORBIDDEN, GAPI.PERMISSION_DENIED]+[GAPI.NOT_FOUND, GAPI.FAILED_PRECONDITION, GAPI.CONFLICT],
|
|
16690
|
-
customer=GC.Values[GC.CUSTOMER_ID], roleId=roleId, body=body, fields=
|
|
16691
|
-
|
|
16723
|
+
customer=GC.Values[GC.CUSTOMER_ID], roleId=roleId, body=body, fields=fieldsList)
|
|
16724
|
+
if not csvPF:
|
|
16725
|
+
entityActionPerformed([Ent.ADMIN_ROLE, f"{result['roleName']}({result['roleId']})"])
|
|
16726
|
+
else:
|
|
16727
|
+
if not FJQC.formatJSON:
|
|
16728
|
+
if addCSVData:
|
|
16729
|
+
result.update(addCSVData)
|
|
16730
|
+
csvPF.WriteRowNoFilter(result)
|
|
16731
|
+
else:
|
|
16732
|
+
row = {}
|
|
16733
|
+
for field in PRINT_ADMIN_ROLES_FIELDS:
|
|
16734
|
+
if field in result:
|
|
16735
|
+
row[field] = result[field]
|
|
16736
|
+
if addCSVData:
|
|
16737
|
+
row.update(addCSVData)
|
|
16738
|
+
row['JSON'] = json.dumps(cleanJSON(result), ensure_ascii=False, sort_keys=True)
|
|
16739
|
+
csvPF.WriteRowNoFilter(row)
|
|
16692
16740
|
except GAPI.duplicate as e:
|
|
16693
16741
|
entityActionFailedWarning([Ent.ADMIN_ROLE, f"{body['roleName']}"], str(e))
|
|
16694
16742
|
except (GAPI.notFound, GAPI.failedPrecondition, GAPI.conflict) as e:
|
|
@@ -16697,6 +16745,8 @@ def doCreateUpdateAdminRoles():
|
|
|
16697
16745
|
accessErrorExit(cd)
|
|
16698
16746
|
except (GAPI.forbidden, GAPI.permissionDenied) as e:
|
|
16699
16747
|
ClientAPIAccessDeniedExit(str(e))
|
|
16748
|
+
if csvPF:
|
|
16749
|
+
csvPF.writeCSVfile('Admin Roles')
|
|
16700
16750
|
|
|
16701
16751
|
# gam delete adminrole <RoleItem>
|
|
16702
16752
|
def doDeleteAdminRole():
|
|
@@ -16716,9 +16766,10 @@ def doDeleteAdminRole():
|
|
|
16716
16766
|
except (GAPI.forbidden, GAPI.permissionDenied) as e:
|
|
16717
16767
|
ClientAPIAccessDeniedExit(str(e))
|
|
16718
16768
|
|
|
16719
|
-
|
|
16720
|
-
|
|
16721
|
-
|
|
16769
|
+
def _showAdminRole(role, FJQC, i=0, count=0):
|
|
16770
|
+
if FJQC.formatJSON:
|
|
16771
|
+
printLine(json.dumps(cleanJSON(role), ensure_ascii=False, sort_keys=True))
|
|
16772
|
+
return
|
|
16722
16773
|
printEntity([Ent.ADMIN_ROLE, role['roleName']], i, count)
|
|
16723
16774
|
Ind.Increment()
|
|
16724
16775
|
for field in PRINT_ADMIN_ROLES_FIELDS:
|
|
@@ -16739,15 +16790,21 @@ def _showAdminRole(role, i=0, count=0):
|
|
|
16739
16790
|
Ind.Decrement()
|
|
16740
16791
|
|
|
16741
16792
|
# gam info adminrole <RoleItem> [privileges]
|
|
16793
|
+
# [formatjson]
|
|
16742
16794
|
# gam print adminroles|roles [todrive <ToDriveAttribute>*]
|
|
16743
16795
|
# [role <RoleItem>] [privileges] [oneitemperrow]
|
|
16796
|
+
# [nosystemroles]
|
|
16797
|
+
# [formatjson [quotechar <Character>]]
|
|
16744
16798
|
# gam show adminroles|roles
|
|
16745
16799
|
# [role <RoleItem>] [privileges]
|
|
16800
|
+
# [nosystemroles]
|
|
16801
|
+
# [formatjson]
|
|
16746
16802
|
def doInfoPrintShowAdminRoles():
|
|
16747
16803
|
cd = buildGAPIObject(API.DIRECTORY)
|
|
16748
16804
|
fieldsList = PRINT_ADMIN_ROLES_FIELDS[:]
|
|
16749
16805
|
csvPF = CSVPrintFile(fieldsList, PRINT_ADMIN_ROLES_FIELDS) if Act.csvFormat() else None
|
|
16750
|
-
|
|
16806
|
+
FJQC = FormatJSONQuoteChar(csvPF)
|
|
16807
|
+
noSystemRoles = oneItemPerRow = False
|
|
16751
16808
|
if Act.Get() != Act.INFO:
|
|
16752
16809
|
roleId = None
|
|
16753
16810
|
else:
|
|
@@ -16762,13 +16819,17 @@ def doInfoPrintShowAdminRoles():
|
|
|
16762
16819
|
fieldsList.append('rolePrivileges')
|
|
16763
16820
|
elif myarg == 'oneitemperrow':
|
|
16764
16821
|
oneItemPerRow = True
|
|
16822
|
+
elif myarg == 'nosystemroles':
|
|
16823
|
+
noSystemRoles = True
|
|
16765
16824
|
else:
|
|
16766
|
-
|
|
16767
|
-
if csvPF
|
|
16768
|
-
if
|
|
16769
|
-
|
|
16770
|
-
|
|
16771
|
-
|
|
16825
|
+
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
|
16826
|
+
if csvPF:
|
|
16827
|
+
if 'rolePrivileges' in fieldsList:
|
|
16828
|
+
if not oneItemPerRow:
|
|
16829
|
+
if not FJQC.formatJSON:
|
|
16830
|
+
csvPF.AddTitles(['rolePrivileges'])
|
|
16831
|
+
else:
|
|
16832
|
+
csvPF.AddTitles(['privilegeName', 'serviceId'])
|
|
16772
16833
|
try:
|
|
16773
16834
|
if roleId is None:
|
|
16774
16835
|
fields = getItemFieldsFromFieldsList('items', fieldsList)
|
|
@@ -16778,6 +16839,8 @@ def doInfoPrintShowAdminRoles():
|
|
|
16778
16839
|
throwReasons=[GAPI.BAD_REQUEST, GAPI.CUSTOMER_NOT_FOUND,
|
|
16779
16840
|
GAPI.FORBIDDEN, GAPI.PERMISSION_DENIED],
|
|
16780
16841
|
customer=GC.Values[GC.CUSTOMER_ID], fields=fields)
|
|
16842
|
+
if noSystemRoles:
|
|
16843
|
+
roles = [role for role in roles if not role.get('isSystemRole', False)]
|
|
16781
16844
|
else:
|
|
16782
16845
|
fields = getFieldsFromFieldsList(fieldsList)
|
|
16783
16846
|
roles = [callGAPI(cd.roles(), 'get',
|
|
@@ -16796,23 +16859,38 @@ def doInfoPrintShowAdminRoles():
|
|
|
16796
16859
|
role.setdefault('isSystemRole', False)
|
|
16797
16860
|
if not csvPF:
|
|
16798
16861
|
count = len(roles)
|
|
16799
|
-
|
|
16862
|
+
if not FJQC.formatJSON:
|
|
16863
|
+
performActionNumItems(count, Ent.ADMIN_ROLE)
|
|
16800
16864
|
Ind.Increment()
|
|
16801
16865
|
i = 0
|
|
16802
16866
|
for role in roles:
|
|
16803
16867
|
i += 1
|
|
16804
|
-
_showAdminRole(role, i, count)
|
|
16868
|
+
_showAdminRole(role, FJQC, i, count)
|
|
16805
16869
|
Ind.Decrement()
|
|
16806
16870
|
else:
|
|
16807
16871
|
for role in roles:
|
|
16808
16872
|
if not oneItemPerRow or 'rolePrivileges' not in role:
|
|
16809
|
-
|
|
16873
|
+
row = flattenJSON(role)
|
|
16874
|
+
if not FJQC.formatJSON:
|
|
16875
|
+
csvPF.WriteRowTitles(row)
|
|
16876
|
+
elif csvPF.CheckRowTitles(row):
|
|
16877
|
+
row = {}
|
|
16878
|
+
for field in PRINT_ADMIN_ROLES_FIELDS:
|
|
16879
|
+
if field in role:
|
|
16880
|
+
row[field] = role[field]
|
|
16881
|
+
row['JSON'] = json.dumps(cleanJSON(role), ensure_ascii=False, sort_keys=True)
|
|
16882
|
+
csvPF.WriteRowNoFilter(row)
|
|
16810
16883
|
else:
|
|
16811
16884
|
privileges = role.pop('rolePrivileges')
|
|
16812
16885
|
baserow = flattenJSON(role)
|
|
16813
16886
|
for privilege in privileges:
|
|
16814
16887
|
row = flattenJSON(privilege, flattened=baserow.copy())
|
|
16815
|
-
|
|
16888
|
+
if not FJQC.formatJSON:
|
|
16889
|
+
csvPF.WriteRowTitles(row)
|
|
16890
|
+
elif csvPF.CheckRowTitles(row):
|
|
16891
|
+
row = baserow.copy()
|
|
16892
|
+
row['JSON'] = json.dumps(cleanJSON(privilege), ensure_ascii=False, sort_keys=True)
|
|
16893
|
+
csvPF.WriteRowNoFilter(row)
|
|
16816
16894
|
if csvPF:
|
|
16817
16895
|
csvPF.writeCSVfile('Admin Roles')
|
|
16818
16896
|
|
|
@@ -47069,6 +47147,51 @@ def doUpdateSiteVerification():
|
|
|
47069
47147
|
_showSiteVerificationInfo(verify_result)
|
|
47070
47148
|
printKeyValueList([Msg.YOU_CAN_ADD_DOMAIN_TO_ACCOUNT.format(a_domain, GC.Values[GC.DOMAIN])])
|
|
47071
47149
|
|
|
47150
|
+
PROFILE_ACCOUNT_TYPE_MAP = {
|
|
47151
|
+
'locationgroup': 'LOCATION_GROUP',
|
|
47152
|
+
'organization': 'ORGANIZATION',
|
|
47153
|
+
'personal': 'PERSONAL',
|
|
47154
|
+
'usergroup': 'USER_GROUP',
|
|
47155
|
+
}
|
|
47156
|
+
|
|
47157
|
+
# gam show businessprofileaccounts
|
|
47158
|
+
# [type locationgroup|organization|personal|usergroup]
|
|
47159
|
+
# gam print businessprofileaccounts [todrive <ToDriveAttribute>*]
|
|
47160
|
+
# [type locationgroup|organization|personal|usergroup]
|
|
47161
|
+
def doPrintShowBusinessProfileAccounts():
|
|
47162
|
+
bp = buildGAPIObject(API.BUSINESSACCOUNTMANAGEMENT)
|
|
47163
|
+
csvPF = CSVPrintFile(['name', 'accountName']) if Act.csvFormat() else None
|
|
47164
|
+
kwargs = {}
|
|
47165
|
+
while Cmd.ArgumentsRemaining():
|
|
47166
|
+
myarg = getArgument()
|
|
47167
|
+
if csvPF and myarg == 'todrive':
|
|
47168
|
+
csvPF.GetTodriveParameters()
|
|
47169
|
+
elif myarg == 'type':
|
|
47170
|
+
kwargs['filter'] = f'type={getChoice(PROFILE_ACCOUNT_TYPE_MAP, mapChoice=True)}'
|
|
47171
|
+
else:
|
|
47172
|
+
unknownArgumentExit()
|
|
47173
|
+
try:
|
|
47174
|
+
accounts = callGAPIpages(bp.accounts(), 'list', 'accounts',
|
|
47175
|
+
throwReasons=[GAPI.PERMISSION_DENIED],
|
|
47176
|
+
**kwargs)
|
|
47177
|
+
except GAPI.permissionDenied as e:
|
|
47178
|
+
accessErrorExitNonDirectory(API.BUSINESSACCOUNTMANAGEMENT, str(e))
|
|
47179
|
+
if not csvPF:
|
|
47180
|
+
count = len(accounts)
|
|
47181
|
+
i = 0
|
|
47182
|
+
for account in sorted(accounts, key=lambda k: k['name']):
|
|
47183
|
+
i += 1
|
|
47184
|
+
printKeyValueListWithCount(['Account', account['name']], i, count)
|
|
47185
|
+
Ind.Increment()
|
|
47186
|
+
showJSON(None, account)
|
|
47187
|
+
Ind.Decrement()
|
|
47188
|
+
else:
|
|
47189
|
+
for account in accounts:
|
|
47190
|
+
row = flattenJSON(account, flattened={'name': account['name'], 'accountName': account['accountName']})
|
|
47191
|
+
csvPF.WriteRowTitles(row)
|
|
47192
|
+
if csvPF:
|
|
47193
|
+
csvPF.writeCSVfile('Business Profile Accounts')
|
|
47194
|
+
|
|
47072
47195
|
# gam info verify|verification
|
|
47073
47196
|
def doInfoSiteVerification():
|
|
47074
47197
|
verif = buildGAPIObject(API.SITEVERIFICATION)
|
|
@@ -77237,6 +77360,7 @@ MAIN_COMMANDS_WITH_OBJECTS = {
|
|
|
77237
77360
|
Cmd.ARG_BROWSER: doPrintShowBrowsers,
|
|
77238
77361
|
Cmd.ARG_BROWSERTOKEN: doPrintShowBrowserTokens,
|
|
77239
77362
|
Cmd.ARG_BUILDING: doPrintShowBuildings,
|
|
77363
|
+
Cmd.ARG_BUSINESSPROFILEACCOUNT: doPrintShowBusinessProfileAccounts,
|
|
77240
77364
|
Cmd.ARG_CAALEVEL: doPrintShowCAALevels,
|
|
77241
77365
|
Cmd.ARG_CHANNELCUSTOMER: doPrintShowChannelCustomers,
|
|
77242
77366
|
Cmd.ARG_CHANNELCUSTOMERENTITLEMENT: doPrintShowChannelCustomerEntitlements,
|
|
@@ -77370,6 +77494,7 @@ MAIN_COMMANDS_WITH_OBJECTS = {
|
|
|
77370
77494
|
Cmd.ARG_BROWSER: doPrintShowBrowsers,
|
|
77371
77495
|
Cmd.ARG_BROWSERTOKEN: doPrintShowBrowserTokens,
|
|
77372
77496
|
Cmd.ARG_BUILDING: doPrintShowBuildings,
|
|
77497
|
+
Cmd.ARG_BUSINESSPROFILEACCOUNT: doPrintShowBusinessProfileAccounts,
|
|
77373
77498
|
Cmd.ARG_CAALEVEL: doPrintShowCAALevels,
|
|
77374
77499
|
Cmd.ARG_CHANNELCUSTOMER: doPrintShowChannelCustomers,
|
|
77375
77500
|
Cmd.ARG_CHANNELCUSTOMERENTITLEMENT: doPrintShowChannelCustomerEntitlements,
|
|
@@ -77556,6 +77681,7 @@ MAIN_COMMANDS_OBJ_ALIASES = {
|
|
|
77556
77681
|
Cmd.ARG_BUCKET: Cmd.ARG_STORAGEBUCKET,
|
|
77557
77682
|
Cmd.ARG_BUCKETS: Cmd.ARG_STORAGEBUCKET,
|
|
77558
77683
|
Cmd.ARG_BUILDINGS: Cmd.ARG_BUILDING,
|
|
77684
|
+
Cmd.ARG_BUSINESSPROFILEACCOUNTS: Cmd.ARG_BUSINESSPROFILEACCOUNT,
|
|
77559
77685
|
Cmd.ARG_CAALEVELS: Cmd.ARG_CAALEVEL,
|
|
77560
77686
|
Cmd.ARG_CHATMEMBERS: Cmd.ARG_CHATMEMBER,
|
|
77561
77687
|
Cmd.ARG_CHANNELCUSTOMERS: Cmd.ARG_CHANNELCUSTOMER,
|
gam/gamlib/glapi.py
CHANGED
|
@@ -24,6 +24,7 @@ ACCESSCONTEXTMANAGER = 'accesscontextmanager'
|
|
|
24
24
|
ALERTCENTER = 'alertcenter'
|
|
25
25
|
ANALYTICS_ADMIN = 'analyticsadmin'
|
|
26
26
|
CALENDAR = 'calendar'
|
|
27
|
+
BUSINESSACCOUNTMANAGEMENT = 'mybusinessaccountmanagement'
|
|
27
28
|
CBCM = 'cbcm'
|
|
28
29
|
CHAT = 'chat'
|
|
29
30
|
CHAT_CUSTOM_EMOJIS = 'chatcustomemojis'
|
|
@@ -101,6 +102,7 @@ TASKS = 'tasks'
|
|
|
101
102
|
VAULT = 'vault'
|
|
102
103
|
YOUTUBE = 'youtube'
|
|
103
104
|
#
|
|
105
|
+
BUSINESSACCOUNTMANAGEMENT_SCOPE = 'https://www.googleapis.com/auth/business.manage'
|
|
104
106
|
CHROMEVERSIONHISTORY_URL = 'https://versionhistory.googleapis.com/v1/chrome/platforms'
|
|
105
107
|
DRIVE_SCOPE = 'https://www.googleapis.com/auth/drive'
|
|
106
108
|
GMAIL_SEND_SCOPE = 'https://www.googleapis.com/auth/gmail.send'
|
|
@@ -174,6 +176,7 @@ PROJECT_APIS = [
|
|
|
174
176
|
'alertcenter.googleapis.com',
|
|
175
177
|
'analyticsadmin.googleapis.com',
|
|
176
178
|
# 'audit.googleapis.com',
|
|
179
|
+
'mybusinessaccountmanagement.googleapis.com',
|
|
177
180
|
'calendar-json.googleapis.com',
|
|
178
181
|
'chat.googleapis.com',
|
|
179
182
|
'chromemanagement.googleapis.com',
|
|
@@ -213,6 +216,7 @@ _INFO = {
|
|
|
213
216
|
ACCESSCONTEXTMANAGER: {'name': 'Access Context Manager API', 'version': 'v1', 'v2discovery': True},
|
|
214
217
|
ALERTCENTER: {'name': 'AlertCenter API', 'version': 'v1beta1', 'v2discovery': True},
|
|
215
218
|
ANALYTICS_ADMIN: {'name': 'Analytics Admin API', 'version': 'v1beta', 'v2discovery': True},
|
|
219
|
+
BUSINESSACCOUNTMANAGEMENT: {'name': 'Business Account Management API', 'version': 'v1', 'v2discovery': True},
|
|
216
220
|
CALENDAR: {'name': 'Calendar API', 'version': 'v3', 'v2discovery': True, 'mappedAPI': 'calendar-json'},
|
|
217
221
|
CBCM: {'name': 'Chrome Browser Cloud Management API', 'version': 'v1.1beta1', 'v2discovery': True, 'localjson': True},
|
|
218
222
|
CHAT: {'name': 'Chat API', 'version': 'v1', 'v2discovery': True},
|
|
@@ -293,6 +297,11 @@ _INFO = {
|
|
|
293
297
|
READONLY = ['readonly',]
|
|
294
298
|
|
|
295
299
|
_CLIENT_SCOPES = [
|
|
300
|
+
{'name': 'Business Account Management API',
|
|
301
|
+
'api': BUSINESSACCOUNTMANAGEMENT,
|
|
302
|
+
'subscopes': [],
|
|
303
|
+
'offByDefault': True,
|
|
304
|
+
'scope': BUSINESSACCOUNTMANAGEMENT_SCOPE},
|
|
296
305
|
{'name': 'Calendar API',
|
|
297
306
|
'api': CALENDAR,
|
|
298
307
|
'subscopes': READONLY,
|
gam/gamlib/glclargs.py
CHANGED
|
@@ -441,6 +441,8 @@ class GamCLArgs():
|
|
|
441
441
|
ARG_BUCKETS = 'buckets'
|
|
442
442
|
ARG_BUILDING = 'building'
|
|
443
443
|
ARG_BUILDINGS = 'buildings'
|
|
444
|
+
ARG_BUSINESSPROFILEACCOUNT = 'businessprofileaccount'
|
|
445
|
+
ARG_BUSINESSPROFILEACCOUNTS = 'businessprofileaccounts'
|
|
444
446
|
ARG_CAALEVEL = 'caalevel'
|
|
445
447
|
ARG_CAALEVELS = 'caalevels'
|
|
446
448
|
ARG_CALATTENDEES = 'calattendees'
|
gam/gamlib/glentity.py
CHANGED
|
@@ -75,6 +75,7 @@ class GamEntity():
|
|
|
75
75
|
BACKUP_VERIFICATION_CODES = 'buvc'
|
|
76
76
|
BUILDING = 'bldg'
|
|
77
77
|
BUILDING_ID = 'bldi'
|
|
78
|
+
BUSINESS_PROFILE_ACCOUNT = 'bpac'
|
|
78
79
|
CAA_LEVEL = 'calv'
|
|
79
80
|
CALENDAR = 'cale'
|
|
80
81
|
CALENDAR_ACL = 'cacl'
|
|
@@ -434,6 +435,7 @@ class GamEntity():
|
|
|
434
435
|
BACKUP_VERIFICATION_CODES: ['Backup Verification Codes', 'Backup Verification Codes'],
|
|
435
436
|
BUILDING: ['Buildings', 'Building'],
|
|
436
437
|
BUILDING_ID: ['Building IDs', 'Building ID'],
|
|
438
|
+
BUSINESS_PROFILE_ACCOUNT: ['Business Profile Accounts', 'Business Profile Account'],
|
|
437
439
|
CAA_LEVEL: ['CAA Levels', 'CAA Level'],
|
|
438
440
|
CALENDAR: ['Calendars', 'Calendar'],
|
|
439
441
|
CALENDAR_ACL: ['Calendar ACLs', 'Calendar ACL'],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
gam/__init__.py,sha256=
|
|
1
|
+
gam/__init__.py,sha256=LLcHrGsoakwCpuZYjaorAZYoRB8twyEGao6HIQA-gQg,3574736
|
|
2
2
|
gam/__main__.py,sha256=amz0-959ph6zkZKqjaar4n60yho-T37w6qWI36qx0CA,1049
|
|
3
3
|
gam/cacerts.pem,sha256=82Ak7btW_2XvocLUvAwPmpx8Chi0oqtZUG1gseLK_t4,50235
|
|
4
4
|
gam/cbcm-v1.1beta1.json,sha256=xO5XloCQQULmPbFBx5bckdqmbLFQ7sJ2TImhE1ysDIY,19439
|
|
@@ -23,10 +23,10 @@ gam/atom/token_store.py,sha256=7E6Ecvxa86WCvl1pJAhv78jg9OxQv8pMtIUcPhZCq04,3803
|
|
|
23
23
|
gam/atom/url.py,sha256=pxO1TlORxyKQTQ1bkBE1unFzjnv9c8LjJkm-UEORShY,4276
|
|
24
24
|
gam/gamlib/__init__.py,sha256=z5mF-y0j8pm-YNFBaiuxB4M_GAUPG-cXWwrhYwrVReM,679
|
|
25
25
|
gam/gamlib/glaction.py,sha256=1Il_HrChVnPkzZwiZs5au4mFQVtq4K1Z42uIuR6qdnI,9419
|
|
26
|
-
gam/gamlib/glapi.py,sha256=
|
|
26
|
+
gam/gamlib/glapi.py,sha256=kjiB-6k4B7l1XIHdWZzW5woBtrViwfvE6cjwQVjijVw,35725
|
|
27
27
|
gam/gamlib/glcfg.py,sha256=J4w16Nfk282S7iuSmk3601GHgt_MJ4qWeSzF5y7ZzX0,28139
|
|
28
|
-
gam/gamlib/glclargs.py,sha256=
|
|
29
|
-
gam/gamlib/glentity.py,sha256=
|
|
28
|
+
gam/gamlib/glclargs.py,sha256=u4OFdkNogXVBV7K7oH4pXTc8TmAEJPvnqy3r0NblD60,43800
|
|
29
|
+
gam/gamlib/glentity.py,sha256=WsSwlzwgp3uwYLDu8t5seFNKoZ9Bj0bTGRjTXcC56Ro,34694
|
|
30
30
|
gam/gamlib/glgapi.py,sha256=pdBbwNtnCwFWxJGaP-_3hdTjSNoOCJF2yo76WdQOi1k,40426
|
|
31
31
|
gam/gamlib/glgdata.py,sha256=weRppttWm6uRyqtBoGPKoHiNZ2h28nhfUV4J_mbCszY,2707
|
|
32
32
|
gam/gamlib/glglobals.py,sha256=J0xcHggVrUBzHJ5GruenKV-qV1zPKcK2qWgAgN3i5Jw,9608
|
|
@@ -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.
|
|
69
|
-
gam7-7.
|
|
70
|
-
gam7-7.
|
|
71
|
-
gam7-7.
|
|
72
|
-
gam7-7.
|
|
68
|
+
gam7-7.18.1.dist-info/METADATA,sha256=nKF2U5OFqxRrUcplrUrgwTDQgDuGQNDKq-NiF35fUmU,2940
|
|
69
|
+
gam7-7.18.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
70
|
+
gam7-7.18.1.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
|
|
71
|
+
gam7-7.18.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
72
|
+
gam7-7.18.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|