gam7 7.22.6__py3-none-any.whl → 7.22.7__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 +39 -10
- {gam7-7.22.6.dist-info → gam7-7.22.7.dist-info}/METADATA +1 -1
- {gam7-7.22.6.dist-info → gam7-7.22.7.dist-info}/RECORD +6 -6
- {gam7-7.22.6.dist-info → gam7-7.22.7.dist-info}/WHEEL +0 -0
- {gam7-7.22.6.dist-info → gam7-7.22.7.dist-info}/entry_points.txt +0 -0
- {gam7-7.22.6.dist-info → gam7-7.22.7.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.22.
|
|
28
|
+
__version__ = '7.22.07'
|
|
29
29
|
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
|
30
30
|
|
|
31
31
|
#pylint: disable=wrong-import-position
|
|
@@ -41814,11 +41814,13 @@ VAULT_QUERY_ARGS = [
|
|
|
41814
41814
|
# drive
|
|
41815
41815
|
'driveclientsideencryption', 'driveversiondate', 'includeshareddrives', 'includeteamdrives', 'shareddrivesoption',
|
|
41816
41816
|
# hangoutsChat
|
|
41817
|
-
'includerooms',
|
|
41817
|
+
'includerooms',
|
|
41818
41818
|
# mail
|
|
41819
41819
|
'mailclientsideencryption', 'excludedrafts',
|
|
41820
41820
|
# voice
|
|
41821
41821
|
'covereddata',
|
|
41822
|
+
# all
|
|
41823
|
+
'json',
|
|
41822
41824
|
] + list(VAULT_SEARCH_METHODS_MAP.keys())
|
|
41823
41825
|
|
|
41824
41826
|
def _buildVaultQuery(myarg, query, corpusArgumentMap):
|
|
@@ -41835,11 +41837,11 @@ def _buildVaultQuery(myarg, query, corpusArgumentMap):
|
|
|
41835
41837
|
elif myarg == 'scope':
|
|
41836
41838
|
query['dataScope'] = getChoice(VAULT_EXPORT_DATASCOPE_MAP, mapChoice=True)
|
|
41837
41839
|
elif myarg in VAULT_SEARCH_METHODS_MAP:
|
|
41838
|
-
if query.get('
|
|
41840
|
+
if query.get('method'):
|
|
41839
41841
|
Cmd.Backup()
|
|
41840
41842
|
usageErrorExit(Msg.MULTIPLE_SEARCH_METHODS_SPECIFIED.format(formatChoiceList(VAULT_SEARCH_METHODS_MAP)))
|
|
41841
41843
|
searchMethod = VAULT_SEARCH_METHODS_MAP[myarg]
|
|
41842
|
-
query['
|
|
41844
|
+
query['method'] = searchMethod
|
|
41843
41845
|
if searchMethod == 'ACCOUNT':
|
|
41844
41846
|
query['accountInfo'] = {'emails': getNormalizedEmailAddressEntity()}
|
|
41845
41847
|
elif searchMethod == 'ORG_UNIT':
|
|
@@ -41901,11 +41903,19 @@ def _buildVaultQuery(myarg, query, corpusArgumentMap):
|
|
|
41901
41903
|
elif myarg == 'covereddata':
|
|
41902
41904
|
query.setdefault('voiceOptions', {'coveredData': []})
|
|
41903
41905
|
query['voiceOptions']['coveredData'].append(getChoice(VAULT_VOICE_COVERED_DATA_MAP, mapChoice=True))
|
|
41906
|
+
# all
|
|
41907
|
+
elif myarg == 'json':
|
|
41908
|
+
jsonData = getJSON([])
|
|
41909
|
+
if 'query' in jsonData:
|
|
41910
|
+
query.update(jsonData['query'])
|
|
41911
|
+
else:
|
|
41912
|
+
query.update(jsonData)
|
|
41913
|
+
|
|
41904
41914
|
|
|
41905
41915
|
def _validateVaultQuery(body, corpusArgumentMap):
|
|
41906
41916
|
if 'corpus' not in body['query']:
|
|
41907
41917
|
missingArgumentExit(f'corpus {formatChoiceList(corpusArgumentMap)}')
|
|
41908
|
-
if '
|
|
41918
|
+
if 'method' not in body['query']:
|
|
41909
41919
|
missingArgumentExit(formatChoiceList(VAULT_SEARCH_METHODS_MAP))
|
|
41910
41920
|
if 'exportOptions' in body:
|
|
41911
41921
|
for corpus, options in VAULT_CORPUS_OPTIONS_MAP.items():
|
|
@@ -41935,6 +41945,7 @@ def _validateVaultQuery(body, corpusArgumentMap):
|
|
|
41935
41945
|
# [locationquery <StringList>] [peoplequery <StringList>] [minuswords <StringList>]
|
|
41936
41946
|
# [responsestatuses <AttendeeStatus>(,<AttendeeStatus>)*] [calendarversiondate <Date>|<Time>]
|
|
41937
41947
|
# (covereddata calllogs|textmessages|voicemails)*
|
|
41948
|
+
# [<JSONData>]
|
|
41938
41949
|
# [driveclientsideencryption any|encrypted|unencrypted]
|
|
41939
41950
|
# [includeaccessinfo <Boolean>]
|
|
41940
41951
|
# [excludedrafts <Boolean>] [mailclientsideencryption any|encrypted|unencrypted]
|
|
@@ -43054,6 +43065,7 @@ def doCreateCopyVaultQuery(copyCmd):
|
|
|
43054
43065
|
targetId = None
|
|
43055
43066
|
cd = drive = None
|
|
43056
43067
|
FJQC = FormatJSONQuoteChar()
|
|
43068
|
+
returnIdOnly = showDetails = False
|
|
43057
43069
|
while Cmd.ArgumentsRemaining():
|
|
43058
43070
|
myarg = getArgument()
|
|
43059
43071
|
if myarg == 'name':
|
|
@@ -43067,6 +43079,12 @@ def doCreateCopyVaultQuery(copyCmd):
|
|
|
43067
43079
|
_, drive = buildGAPIServiceObject(API.DRIVE3, _getAdminEmail())
|
|
43068
43080
|
if drive is None:
|
|
43069
43081
|
return
|
|
43082
|
+
elif myarg == 'showdetails':
|
|
43083
|
+
showDetails = True
|
|
43084
|
+
returnIdOnly = False
|
|
43085
|
+
elif myarg == 'returnidonly':
|
|
43086
|
+
returnIdOnly = True
|
|
43087
|
+
showDetails = False
|
|
43070
43088
|
else:
|
|
43071
43089
|
FJQC.GetFormatJSON(myarg)
|
|
43072
43090
|
if copyCmd:
|
|
@@ -43078,6 +43096,7 @@ def doCreateCopyVaultQuery(copyCmd):
|
|
|
43078
43096
|
resultId = targetId
|
|
43079
43097
|
resultNameId = targetNameId
|
|
43080
43098
|
else:
|
|
43099
|
+
_validateVaultQuery(body, VAULT_CORPUS_ARGUMENT_MAP)
|
|
43081
43100
|
if not body['displayName']:
|
|
43082
43101
|
body['displayName'] = 'GAM {body["query"]["corpus"]} Query - {ISOformatTimeStamp(todaysTime())}'
|
|
43083
43102
|
resultId = matterId
|
|
@@ -43086,7 +43105,13 @@ def doCreateCopyVaultQuery(copyCmd):
|
|
|
43086
43105
|
result = callGAPI(v.matters().savedQueries(), 'create',
|
|
43087
43106
|
throwReasons=[GAPI.NOT_FOUND, GAPI.BAD_REQUEST, GAPI.FORBIDDEN, GAPI.INVALID_ARGUMENT, GAPI.ALREADY_EXISTS],
|
|
43088
43107
|
matterId=resultId, body=body)
|
|
43089
|
-
|
|
43108
|
+
if not returnIdOnly:
|
|
43109
|
+
if not FJQC.formatJSON:
|
|
43110
|
+
entityActionPerformed([Ent.VAULT_MATTER, matterNameId, Ent.VAULT_QUERY, formatVaultNameId(result['displayName'], result['savedQueryId'])])
|
|
43111
|
+
if showDetails or FJQC.formatJSON:
|
|
43112
|
+
_showVaultQuery(resultNameId, result, cd, drive, FJQC)
|
|
43113
|
+
else:
|
|
43114
|
+
writeStdout(f'{result["savedQueryId"]}\n')
|
|
43090
43115
|
except (GAPI.notFound, GAPI.badRequest, GAPI.forbidden, GAPI.invalidArgument, GAPI.alreadyExists) as e:
|
|
43091
43116
|
entityActionFailedWarning([Ent.VAULT_MATTER, resultNameId, Ent.VAULT_QUERY, body['displayName']], str(e))
|
|
43092
43117
|
|
|
@@ -43105,12 +43130,15 @@ def doCreateCopyVaultQuery(copyCmd):
|
|
|
43105
43130
|
# [locationquery <StringList>] [peoplequery <StringList>] [minuswords <StringList>]
|
|
43106
43131
|
# [responsestatuses <AttendeeStatus>(,<AttendeeStatus>)*] [calendarversiondate <Date>|<Time>]
|
|
43107
43132
|
# (covereddata calllogs|textmessages|voicemails)*
|
|
43108
|
-
# [
|
|
43133
|
+
# [<JSONData>]
|
|
43134
|
+
# [shownames]
|
|
43135
|
+
# [showdetails|returnidonly|formatjson]
|
|
43109
43136
|
def doCreateVaultQuery():
|
|
43110
43137
|
doCreateCopyVaultQuery(False)
|
|
43111
43138
|
|
|
43112
|
-
# gam copy vaultquery <MatterItem> <QueryItem> [targetmatter <MatterItem
|
|
43113
|
-
# [shownames]
|
|
43139
|
+
# gam copy vaultquery <MatterItem> <QueryItem> [targetmatter <MatterItem>] [name <String>]
|
|
43140
|
+
# [shownames]
|
|
43141
|
+
# [showdetails|returnidonly|formatjson]
|
|
43114
43142
|
def doCopyVaultQuery():
|
|
43115
43143
|
doCreateCopyVaultQuery(True)
|
|
43116
43144
|
|
|
@@ -43632,6 +43660,7 @@ PRINT_VAULT_COUNTS_TITLES = ['account', 'count', 'error']
|
|
|
43632
43660
|
# (accounts <EmailAddressEntity>) | (orgunit|org|ou <OrgUnitPath>) | everyone|entireorg
|
|
43633
43661
|
# [terms <String>] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>] [timezone <TimeZone>]
|
|
43634
43662
|
# [excludedrafts <Boolean>]
|
|
43663
|
+
# [<JSONData>]
|
|
43635
43664
|
# [wait <Integer>]
|
|
43636
43665
|
# gam print vaultcounts [todrive <ToDriveAttributes>*]
|
|
43637
43666
|
# matter <MatterItem> operation <String> [wait <Integer>]
|
|
@@ -43686,7 +43715,7 @@ def doPrintVaultCounts():
|
|
|
43686
43715
|
doWait = True
|
|
43687
43716
|
response = operation.get('response', {})
|
|
43688
43717
|
query = operation['metadata']['query']
|
|
43689
|
-
search_method = query.get('
|
|
43718
|
+
search_method = query.get('method')
|
|
43690
43719
|
# ARGH count results don't include accounts with zero items.
|
|
43691
43720
|
# so we keep track of which accounts we searched and can report
|
|
43692
43721
|
# zero data for them.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
gam/__init__.py,sha256=
|
|
1
|
+
gam/__init__.py,sha256=dR4_9Ik2T201HEzHF-nOj5dtmbWwDDMUW8jb5RzZzFM,3618477
|
|
2
2
|
gam/__main__.py,sha256=amz0-959ph6zkZKqjaar4n60yho-T37w6qWI36qx0CA,1049
|
|
3
3
|
gam/cacerts.pem,sha256=DUsVo2XlFYwfkhe3gnxa-Km4Z4noz74hSApXwTT-nQE,44344
|
|
4
4
|
gam/cbcm-v1.1beta1.json,sha256=xO5XloCQQULmPbFBx5bckdqmbLFQ7sJ2TImhE1ysDIY,19439
|
|
@@ -47,8 +47,8 @@ gam/gdata/apps/audit/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrK
|
|
|
47
47
|
gam/gdata/apps/audit/service.py,sha256=Z1eueThcNeVUMWP1DRWc_DGHrJCiJI8W_xj6L-cqu-Q,9658
|
|
48
48
|
gam/gdata/apps/contacts/__init__.py,sha256=Um6zgIkiahZns7yAEuC3pxHSMD8iciZ_EoynSLoYPfU,30463
|
|
49
49
|
gam/gdata/apps/contacts/service.py,sha256=5lNb-Ii1Gyek6ePFji3kyoYtCBc8CuJTwagx2BL2o14,15684
|
|
50
|
-
gam7-7.22.
|
|
51
|
-
gam7-7.22.
|
|
52
|
-
gam7-7.22.
|
|
53
|
-
gam7-7.22.
|
|
54
|
-
gam7-7.22.
|
|
50
|
+
gam7-7.22.7.dist-info/METADATA,sha256=JC5zR6cORBbntdtONwjfHO83m9zcOD_dDFk3jS-FO50,3092
|
|
51
|
+
gam7-7.22.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
52
|
+
gam7-7.22.7.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
|
|
53
|
+
gam7-7.22.7.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
54
|
+
gam7-7.22.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|