gam7 7.17.2__py3-none-any.whl → 7.18.0__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 +56 -3
- gam/gamlib/glapi.py +9 -0
- gam/gamlib/glclargs.py +2 -0
- gam/gamlib/glentity.py +2 -0
- {gam7-7.17.2.dist-info → gam7-7.18.0.dist-info}/METADATA +1 -1
- {gam7-7.17.2.dist-info → gam7-7.18.0.dist-info}/RECORD +9 -9
- {gam7-7.17.2.dist-info → gam7-7.18.0.dist-info}/WHEEL +0 -0
- {gam7-7.17.2.dist-info → gam7-7.18.0.dist-info}/entry_points.txt +0 -0
- {gam7-7.17.2.dist-info → gam7-7.18.0.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.00'
|
|
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]:
|
|
@@ -26940,7 +26945,7 @@ def printShowChatSpaces(users):
|
|
|
26940
26945
|
substituteQueryTimes(queries, queryTimes)
|
|
26941
26946
|
pfilter = kwargsCS['query'] = queries[0]
|
|
26942
26947
|
kwargsCS['useAdminAccess'] = True
|
|
26943
|
-
sortName = 'displayName'
|
|
26948
|
+
sortName = 'displayName' if 'displayName' in fieldsList else 'name'
|
|
26944
26949
|
else:
|
|
26945
26950
|
sortName = 'name'
|
|
26946
26951
|
for user in users:
|
|
@@ -47069,6 +47074,51 @@ def doUpdateSiteVerification():
|
|
|
47069
47074
|
_showSiteVerificationInfo(verify_result)
|
|
47070
47075
|
printKeyValueList([Msg.YOU_CAN_ADD_DOMAIN_TO_ACCOUNT.format(a_domain, GC.Values[GC.DOMAIN])])
|
|
47071
47076
|
|
|
47077
|
+
PROFILE_ACCOUNT_TYPE_MAP = {
|
|
47078
|
+
'locationgroup': 'LOCATION_GROUP',
|
|
47079
|
+
'organization': 'ORGANIZATION',
|
|
47080
|
+
'personal': 'PERSONAL',
|
|
47081
|
+
'usergroup': 'USER_GROUP',
|
|
47082
|
+
}
|
|
47083
|
+
|
|
47084
|
+
# gam show businessprofileaccounts
|
|
47085
|
+
# [type locationgroup|organization|personal|usergroup]
|
|
47086
|
+
# gam print businessprofileaccounts [todrive <ToDriveAttribute>*]
|
|
47087
|
+
# [type locationgroup|organization|personal|usergroup]
|
|
47088
|
+
def doPrintShowBusinessProfileAccounts():
|
|
47089
|
+
bp = buildGAPIObject(API.BUSINESSACCOUNTMANAGEMENT)
|
|
47090
|
+
csvPF = CSVPrintFile(['name', 'accountName']) if Act.csvFormat() else None
|
|
47091
|
+
kwargs = {}
|
|
47092
|
+
while Cmd.ArgumentsRemaining():
|
|
47093
|
+
myarg = getArgument()
|
|
47094
|
+
if csvPF and myarg == 'todrive':
|
|
47095
|
+
csvPF.GetTodriveParameters()
|
|
47096
|
+
elif myarg == 'type':
|
|
47097
|
+
kwargs['filter'] = f'type={getChoice(PROFILE_ACCOUNT_TYPE_MAP, mapChoice=True)}'
|
|
47098
|
+
else:
|
|
47099
|
+
unknownArgumentExit()
|
|
47100
|
+
try:
|
|
47101
|
+
accounts = callGAPIpages(bp.accounts(), 'list', 'accounts',
|
|
47102
|
+
throwReasons=[GAPI.PERMISSION_DENIED],
|
|
47103
|
+
**kwargs)
|
|
47104
|
+
except GAPI.permissionDenied as e:
|
|
47105
|
+
accessErrorExitNonDirectory(API.BUSINESSACCOUNTMANAGEMENT, str(e))
|
|
47106
|
+
if not csvPF:
|
|
47107
|
+
count = len(accounts)
|
|
47108
|
+
i = 0
|
|
47109
|
+
for account in sorted(accounts, key=lambda k: k['name']):
|
|
47110
|
+
i += 1
|
|
47111
|
+
printKeyValueListWithCount(['Account', account['name']], i, count)
|
|
47112
|
+
Ind.Increment()
|
|
47113
|
+
showJSON(None, account)
|
|
47114
|
+
Ind.Decrement()
|
|
47115
|
+
else:
|
|
47116
|
+
for account in accounts:
|
|
47117
|
+
row = flattenJSON(account, flattened={'name': account['name'], 'accountName': account['accountName']})
|
|
47118
|
+
csvPF.WriteRowTitles(row)
|
|
47119
|
+
if csvPF:
|
|
47120
|
+
csvPF.writeCSVfile('Business Profile Accounts')
|
|
47121
|
+
|
|
47072
47122
|
# gam info verify|verification
|
|
47073
47123
|
def doInfoSiteVerification():
|
|
47074
47124
|
verif = buildGAPIObject(API.SITEVERIFICATION)
|
|
@@ -77237,6 +77287,7 @@ MAIN_COMMANDS_WITH_OBJECTS = {
|
|
|
77237
77287
|
Cmd.ARG_BROWSER: doPrintShowBrowsers,
|
|
77238
77288
|
Cmd.ARG_BROWSERTOKEN: doPrintShowBrowserTokens,
|
|
77239
77289
|
Cmd.ARG_BUILDING: doPrintShowBuildings,
|
|
77290
|
+
Cmd.ARG_BUSINESSPROFILEACCOUNT: doPrintShowBusinessProfileAccounts,
|
|
77240
77291
|
Cmd.ARG_CAALEVEL: doPrintShowCAALevels,
|
|
77241
77292
|
Cmd.ARG_CHANNELCUSTOMER: doPrintShowChannelCustomers,
|
|
77242
77293
|
Cmd.ARG_CHANNELCUSTOMERENTITLEMENT: doPrintShowChannelCustomerEntitlements,
|
|
@@ -77370,6 +77421,7 @@ MAIN_COMMANDS_WITH_OBJECTS = {
|
|
|
77370
77421
|
Cmd.ARG_BROWSER: doPrintShowBrowsers,
|
|
77371
77422
|
Cmd.ARG_BROWSERTOKEN: doPrintShowBrowserTokens,
|
|
77372
77423
|
Cmd.ARG_BUILDING: doPrintShowBuildings,
|
|
77424
|
+
Cmd.ARG_BUSINESSPROFILEACCOUNT: doPrintShowBusinessProfileAccounts,
|
|
77373
77425
|
Cmd.ARG_CAALEVEL: doPrintShowCAALevels,
|
|
77374
77426
|
Cmd.ARG_CHANNELCUSTOMER: doPrintShowChannelCustomers,
|
|
77375
77427
|
Cmd.ARG_CHANNELCUSTOMERENTITLEMENT: doPrintShowChannelCustomerEntitlements,
|
|
@@ -77556,6 +77608,7 @@ MAIN_COMMANDS_OBJ_ALIASES = {
|
|
|
77556
77608
|
Cmd.ARG_BUCKET: Cmd.ARG_STORAGEBUCKET,
|
|
77557
77609
|
Cmd.ARG_BUCKETS: Cmd.ARG_STORAGEBUCKET,
|
|
77558
77610
|
Cmd.ARG_BUILDINGS: Cmd.ARG_BUILDING,
|
|
77611
|
+
Cmd.ARG_BUSINESSPROFILEACCOUNTS: Cmd.ARG_BUSINESSPROFILEACCOUNT,
|
|
77559
77612
|
Cmd.ARG_CAALEVELS: Cmd.ARG_CAALEVEL,
|
|
77560
77613
|
Cmd.ARG_CHATMEMBERS: Cmd.ARG_CHATMEMBER,
|
|
77561
77614
|
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=DMC0tmRDq8JqQ7Kc2CK5ymMsHWOgZng1cCK7YdmqDos,3571907
|
|
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.0.dist-info/METADATA,sha256=u2F6l-eY5Cb3JSoGvcvwRMx96Ca9_eImZ-bAhUdmJSk,2940
|
|
69
|
+
gam7-7.18.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
70
|
+
gam7-7.18.0.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
|
|
71
|
+
gam7-7.18.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
72
|
+
gam7-7.18.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|