@@ -122,6 +122,8 @@ def update_journal_scopes(
122122 holder_type : HolderType ,
123123 holder_id : Union [str , uuid .UUID ],
124124 permission_list : List [str ],
125+ auth_type : AuthType = AuthType .bearer ,
126+ ** kwargs : Dict [str , Any ],
125127 ) -> BugoutJournalScopeSpecs :
126128 journal_scopes_path = f"journals/{ journal_id } /scopes"
127129 json = {
@@ -130,8 +132,10 @@ def update_journal_scopes(
130132 "permission_list" : permission_list ,
131133 }
132134 headers = {
133- "Authorization" : f"Bearer { token } " ,
135+ "Authorization" : f"{ auth_type . value } { token } " ,
134136 }
137+ if "headers" in kwargs .keys ():
138+ headers .update (kwargs ["headers" ])
135139 result = self ._call (
136140 method = Method .post , path = journal_scopes_path , headers = headers , json = json
137141 )
@@ -144,6 +148,8 @@ def delete_journal_scopes(
144148 holder_type : HolderType ,
145149 holder_id : Union [str , uuid .UUID ],
146150 permission_list : List [str ],
151+ auth_type : AuthType = AuthType .bearer ,
152+ ** kwargs : Dict [str , Any ],
147153 ) -> BugoutJournalScopeSpecs :
148154 journal_scopes_path = f"journals/{ journal_id } /scopes"
149155 json = {
@@ -152,8 +158,10 @@ def delete_journal_scopes(
152158 "permission_list" : permission_list ,
153159 }
154160 headers = {
155- "Authorization" : f"Bearer { token } " ,
161+ "Authorization" : f"{ auth_type . value } { token } " ,
156162 }
163+ if "headers" in kwargs .keys ():
164+ headers .update (kwargs ["headers" ])
157165 result = self ._call (
158166 method = Method .delete , path = journal_scopes_path , headers = headers , json = json
159167 )
0 commit comments