@@ -81,11 +81,15 @@ def get_journal_permissions(
8181 token : Union [str , uuid .UUID ],
8282 journal_id : Union [str , uuid .UUID ],
8383 holder_ids : Optional [List [Union [str , uuid .UUID ]]] = None ,
84+ auth_type : AuthType = AuthType .bearer ,
85+ ** kwargs : Dict [str , Any ],
8486 ) -> BugoutJournalPermissions :
8587 journal_scopes_path = f"journals/{ journal_id } /permissions"
8688 headers = {
87- "Authorization" : f"Bearer { token } " ,
89+ "Authorization" : f"{ auth_type . value } { token } " ,
8890 }
91+ if "headers" in kwargs .keys ():
92+ headers .update (kwargs ["headers" ])
8993 query_params = {}
9094 if holder_ids is not None :
9195 holder_ids_string = [str (holder_id ) for holder_id in holder_ids ]
@@ -118,6 +122,8 @@ def update_journal_scopes(
118122 holder_type : HolderType ,
119123 holder_id : Union [str , uuid .UUID ],
120124 permission_list : List [str ],
125+ auth_type : AuthType = AuthType .bearer ,
126+ ** kwargs : Dict [str , Any ],
121127 ) -> BugoutJournalScopeSpecs :
122128 journal_scopes_path = f"journals/{ journal_id } /scopes"
123129 json = {
@@ -126,8 +132,10 @@ def update_journal_scopes(
126132 "permission_list" : permission_list ,
127133 }
128134 headers = {
129- "Authorization" : f"Bearer { token } " ,
135+ "Authorization" : f"{ auth_type . value } { token } " ,
130136 }
137+ if "headers" in kwargs .keys ():
138+ headers .update (kwargs ["headers" ])
131139 result = self ._call (
132140 method = Method .post , path = journal_scopes_path , headers = headers , json = json
133141 )
@@ -140,6 +148,8 @@ def delete_journal_scopes(
140148 holder_type : HolderType ,
141149 holder_id : Union [str , uuid .UUID ],
142150 permission_list : List [str ],
151+ auth_type : AuthType = AuthType .bearer ,
152+ ** kwargs : Dict [str , Any ],
143153 ) -> BugoutJournalScopeSpecs :
144154 journal_scopes_path = f"journals/{ journal_id } /scopes"
145155 json = {
@@ -148,8 +158,10 @@ def delete_journal_scopes(
148158 "permission_list" : permission_list ,
149159 }
150160 headers = {
151- "Authorization" : f"Bearer { token } " ,
161+ "Authorization" : f"{ auth_type . value } { token } " ,
152162 }
163+ if "headers" in kwargs .keys ():
164+ headers .update (kwargs ["headers" ])
153165 result = self ._call (
154166 method = Method .delete , path = journal_scopes_path , headers = headers , json = json
155167 )
0 commit comments