Ë
    daºiÞ„ ã                   ó  — d dl Z d dlZd dlZd dlmZmZmZmZmZm	Z	m
Z
 d dlmZ d dlmZ d dlmZmZ d dlZej$                  dk\  rd dlmZ nd dlmZ dd	lmZmZ dd
lmZ ddlmZmZ  e j:                  e«      Z G d„ de«      Z y)é    N)ÚAnyÚBinaryIOÚDictÚListÚOptionalÚUnionÚcast)Úwarn)Ú
deprecated)Ú	HTTPErrorÚResponse)é   é   )ÚLiteralé   )ÚApiNotFoundErrorÚApiPermissionError)ÚAtlassianRestAPI)ÚT_idÚT_resp_jsonc                   óD(  ‡ — e Zd ZdZdededefˆ fd„Z	 	 	 	 	 �dFdedee   d	ee   d
ee	   dee
   de
fˆ fd„Z	 	 	 	 �dGdedee   dee   dee   dee   defd„Zdefd„Z	 	 �dHdee   dee   dee   defd„Zdededefd„Zdefd„Z	 defd„Zdedefd „Z	 d!edeeeef      fd"„Zd#edefd$„Z�dId!ed%ee   dee   fd&„Z ed'd(¬)«      	 �dJd!ed%ee   d*e
dee   fd+„«       Zd#edefd,„Zd#edefd-„Zdefd.„Zd#edefd/„Z d#edefd0„Z!	 	 	 	 	 	 �dKd1ee"   d2ee"   d3ee   d4ee   d5ee   defd6„Z#d7e$eef   defd8„Z%	 �dLd:edefd;„Z&	 defd<„Z'd=edefd>„Z(d=edefd?„Z)de	fd@„Z*d=edefdA„Z+	 dBe	defdC„Z,dDedefdE„Z-dFedefdG„Z.	 defdH„Z/defdI„Z0defdJ„Z1defdK„Z2defdL„Z3dedefdM„Z4de"defdN„Z5dedOedefdP„Z6	 dOedefdQ„Z7dOedRedefdS„Z8dOedRedTe9defdU„Z:dOedRedefdV„Z;	 dWedefdX„Z<dWedefdY„Z=dZedefd[„Z>dZedWedefd\„Z?dWedefd]„Z@dWed^edefd_„ZA	 defd`„ZB	 daedefdb„ZC�dMdcee   dde"d2e"defde„ZDdefdf„ZE	 �dNdgedhediee   djee   def
dk„ZFdledmedefdn„ZGdledmedoe	defdp„ZH	 �dOd3edde"d2e"dee   fdq„ZIdredee   fds„ZJ	 �dPdgedtedjee   due
fdv„ZK	 	 	 �dHdwedgedtee   djee   duee
   f
dx„ZLdwefdy„ZMdwedtedefdz„ZNdwefd{„ZOdwefd|„ZP	 	 	 	 	 	 �dQdwedhedee   d}ee   d~ee   dee   d€ee   d�ee   fd‚„ZQdwedƒefd„„ZR	 �dRd…ee   d†ee   d2e"fd‡„ZSdgefdˆ„ZT�dIdged‰ee   fdŠ„ZU	 �dSd‹edŒe
dde"d2e"fd�„ZV	 �dHdŽee   d�ee   d�ee   fd‘„ZW	 �dHdŽee   d�ee   d�ee   defd’„ZX	 	 	 	 �dTdŽedee   dee   dde"d2e"defd“„ZY	 �dUded”e$eef   d•ee   fd–„ZZ	 	 	 	 �dVd—ed”e$ee	e[e\df   d˜ee   d™e
d•ee   f
dš„Z]�dUd›ed”e$ee	f   d•ee   fdœ„Z^�dWd�e	d”e$ee	f   fdž„Z_�dXdŸed•edefd „Z`�dNdŸeddee"   d2ee"   fd¡„Za	 �dNdŸed¢eddee"   d2ee"   fd£„Zbdefd¤„Zc�dNdeddee"   d2ee"   fd¥„Zdded¦e$eef   fd§„Ze�dIded¨ed©e"dªee   fd«„Zfd—efd¬„Zg�dId—ed­ee
   fd®„Zhd—efd¯„Zided°efd±„Zjdefd²„Zk�dYded”e$eef   d­e
fd³„Zl�dWd´e	d”e$eef   de
fdµ„Zm�dZd—ed°eded­e
fd¶„Zndedefd·„Zoded¸e$eef   defd¹„Zpdedºe	fd»„Zqdedºe	fd¼„Zrded½efd¾„Zsded¿etfdÀ„Zudedee
   fdÁ„Zvdede
fdÂ„Zw�dZd—edÃe
fdÄ„Zx	 	 	 	 �d[ded”e$eef   d¸eeeef      dÅeeeef      d˜eee      d­e
fdÆ„Zy�dZd—ed”e$eef   d­e
fdÇ„Zzded9efdÈ„Z{�dNded9ee   d�ee   fdÉ„Z|defdÊ„Z}�dId!ed�ee   fdË„Z~�d\d”e$eef   d™e
d¸ee   fdÌ„ZdÍe	fdÎ„Z€d”efdÏ„Z�d”efdÐ„Z‚�dIdedªedÑee   fdÒ„Zƒ	 	 �dJdedOedªedÑee   d­e
f
dÓ„Z„d!edÔefdÕ„Z…	 �dNdedÖee   d×ee   fdØ„Z†	 �dNdedÖee   d×ee   fdÙ„Z‡�dNdedÚee	   dÛee"   fdÜ„Zˆdddddi fdedÝedÞedÖee   dßee   dàee   dáee   dâe
dãefdä„Z‰dedåefdæ„ZŠ	 	 �dNdedåededÞedÖee   dßee   fdç„Z‹dedåedefdè„ZŒdedee   fdé„Z�dedêedefdë„ZŽ	 �dNdedìed”e$eedf   d¸ee   fdí„Z�defdî„Z�dedïefdð„Z‘dedñefdò„Z’defdó„Z“dedefdô„Z”	 �dNdedïee   d•ee   defdõ„Z•defdö„Z–dedRed	efd÷„Z—dedRefdø„Z˜dedRefdù„Z™�dIdúed•ee   fdû„Zšdúefdü„Z›�dIdýee   d•ee   fdþ„Zœ	 	 	 	 	 �dGdŽee   dee   d�ee   d•ee   fdÿ„Z��d „ ZždŽef�d„ZŸ�dHdŽee   d�ee   dee   f�d„Z dŽed	ef�d„Z¡�de�def�d„Z¢dŽe�def�d„Z£	 	 �dNdŽe�de�d	e�d
ee   �dee
   f
�d„Z¤�dNdŽee   d�ee   f�d„Z¥	 �dHdŽee   d�ee   �dee   f�d„Z¦	 	 	 	 �dGdŽee   d�ee   �dee   dTe$eedf   f�d„Z§	 �dHdŽee   d�ee   �dee   f�d„Z¨dŽededef�d„Z©dŽef�d„ZªdŽef�d„Z«	 	 �d]dŽede�def�d„Z¬�d„ Z­�d„ Z®	 	 �d^dde"d2e"f�d„Z¯	 	 	 	 	 	 	 	 �d_dŽee   d…ee   d�ee   dRee   dde"d2e"dŒe
�de
f�d„Z°dŽe�dede
f�d„Z±dŽe�def�d„Z²	 �dId�ee   f�d„Z³�dN�d ee
   d•ee   f�d!„Z´�dN�d ee
   d•ee   f�d"„Zµ�d#e$eef   f�d$„Z¶dededged^ef�d%„Z·def�d&„Z¸def�d'„Z¹�dIded•ee   f�d(„Zº�dIded•ee   f�d)„Z»def�d*„Z¼�dIded•ee   f�d+„Z½	 	 	 	 	 	 �dQdeddee"   d2ee"   �d,ee   d•ee   d…ee   dêee   f�d-„Z¾�d.ef�d/„Z¿	 	 �d`dede�d.e�d0e
�d1e
f
�d2„ZÀ�dN�d.e�d3ee   �d4ee   f�d5„ZÁ	 	 	 	 	 	 �dQ�d.edgee   djee   �d0ee
   �d1ee
   �d6ee   �d7ee   f�d8„ZÂ�dN�d.e�d9ee   �d:ee   f�d;„ZÃdef�d<„ZÄde�d=ef�d>„ZÅ	 �dIde�d=e�d?e�d@e$eÆd9   eÆd‹   df   f�dA„ZÇde�d=e�dBef�dC„ZÈde�d=e�d?e�d@ef�dD„ZÉ�dIded	ed•ee   f�dE„ZÊ	 �dIde�dFed•ee   f�dG„ZË	 �dHef�dI„ZÌ�dade�dJef�dK„ZÍ�dL„ ZÎ�dM„ ZÏ�dI�dNed•ee   f�dO„ZÐ�dHef�dP„ZÑ	 �dHe�dQef�dR„ZÒ�dI�dHed•ee   f�dS„ZÓdgedjedef�dT„ZÔ�dU„ ZÕ�dbdgedjedhef�dV„ZÖ�dW„ Z×�dX„ ZØdŸef�dY„ZÙ	 �dcdŸedde"d2ee"   d•ee   f�dZ„ZÚdŸef�d[„ZÛ	 �dddŸed”e$eee   f   dde"d2ee"   f�d\„ZÜ�d^dedde"d2e"f�d]„ZÝ	 �dededŽee   dde"d2e"def
�d^„ZÞdìef�d_„Zßdedef�d`„Zàdef�da„Zádef�db„Zâdef�dc„Zãdedìedee"   f�dd„Zä	 d	edef�de„Zådåedef�df„Zædåedef�dg„Zç	 de	f�dh„Zède	f�di„Zéd	edef�dj„Zê�dke�dle�dmede$eef   f�dn„Zë�doedef�dp„Zì�doedef�dq„Zí�doed	edef�dr„Zî	 def�ds„Zï�dtedef�du„Zð	 def�dv„Zñ	 def�dw„Zò�dxedef�dy„Zó�dxedee	   f�dz„Zô�dxe�d{edee	   f�d|„Zõ�dxede	f�d}„Zödle�dxe�d{edef�d~„Z÷	 	 	 	 	 	 �dfdted”e$eee   f   dde"d2ee"   d•ee   �dee   def�d€„Zø	 	 	 	 �dgdted”e$eee   f   �d�ee   d2ee"   d•ee   f
�d‚„Zùdtef�dƒ„Zú�d„ee"   �d…ee   deeeef      f�d†„Zû	 	 	 	 	 �dfdted”e$eef   dde"d2ee"   d•ee   �dee   de	f�d‡„Zü	 	 	 �dhdted”e$eef   d2ee"   d•ee   f�dˆ„Zý	 	 	 	 �didted2e"�d‰e
ddee"   �dŠee   def�d‹„Zþ�djdted2e"�d‰e
ddee"   def
�dŒ„Zÿ	 �dkdted2ee"   �d‰e
ddee"   def
�d�„�Z def�dŽ„�Z�d�edef�d�„�Z	 def�d‘„�Z	 	 	 	 �dG�d’ee"   �d“ee"   �d”ee   d•ee   def
�d•„�Zdef�d–„�Zdef�d—„�Z�d˜edef�d™„�Z�d˜edef�dš„�Z�d›edef�dœ„�Z	�d˜edef�d�„�Z
d�ef�dž„�Z�d˜e�dŸedef�d „�Z�d˜edef�d¡„�Z�d˜edef�d¢„�Z�dId•ee   f�d£„�Z�dIdƒed•ee   def�d¤„�Zdƒe�d¥edef�d¦„�Z	 	 	 	 �dGdƒedgedjee   deee      �d§ee   d•ee   f�d¨„�Z	 def�d©„�Z�dl�dªe�d«e
def�d¬„�Z�dl�dHe"�d«e
def�d­„�Z�dmdde"d2e"d•ee   def�d®„�Zd	edef�d¯„�Z	 �dI�d°ed•ee   def�d±„�Z�d°e�d²edef�d³„�Z	 �d°edef�d´„�Z	 def�dµ„�Z	 def�d¶„�Z	 dedef�d·„�Z	 �dªededef�d¸„�Zdgedje�d¹e�dºe	def
�d»„�Z 	 	 	 	 	 �dn�d¼e
�d½e
�d¾e
�d¿edef
�dÀ„�Z!�do�d¿edef�dÁ„�Z"def�dÂ„�Z#dedef�dÃ„�Z$�dÄe	ddf�dÅ„�Z%�dp�d“e"def�dÆ„�Z&�dl�dÇe
def�dÈ„�Z'	 �dN�dÉee
   d•ee   def�dÊ„�Z(dedef�dË„�Z)	 �dqd�ede�dÌe
�dÍedef
�dÎ„�Z*�dId	ee   de$eef   f�dÏ„�Z+d�edef�dÐ„�Z,d�edef�dÑ„�Z-�dÒedef�dÓ„�Z.	 �dNd…ee   �dÔee
   def�dÕ„�Z/dedgedef�dÖ„�Z0�dId	ee   de$eef   f�d×„�Z1�dr�dÒedef�dØ„�Z2	 �ds�dÒed	ee   de$eef   f�dÙ„�Z3�dr�dÒedef�dÚ„�Z4def�dÛ„�Z5def�dÜ„�Z6�dªedef�dÝ„�Z7�dªedef�dÞ„�Z8�dªedŽedef�dß„�Z9�dªedef�dà„�Z:�dªedef�dá„�Z;�dªe�dâedef�dã„�Z<def�dä„�Z=	 �dN�dåe�dæe�dçee   �dèee   def
�dé„�Z>	 	 	 	 	 	 �dQ�dæee   �dçee   dŽee   dee   �dêee   �dåee   def�dë„�Z?	 �dN�dæee   �dçee   dedef�dì„�Z@d!edef�dí„�ZA	 �dI�dîed¨e�dïe"dedªee   def�dð„�ZBde�dñedef�dò„�ZCd4ed5e�dBedef�dó„�ZD�dñe�dBedef�dô„�ZEdedef�dõ„�ZFdedef�dö„�ZG�dId•ee   def�d÷„�ZH�dåe�døedef�dù„�ZI�dåe�dúedef�dû„�ZJ�dåe�düedef�dý„�ZK�dåedef�dþ„�ZL�dåe�dúe�dÿedef�d „�ZM�dåe�dúe�dÿed	edef
�d„�ZNdef�d„�ZOdef�d„�ZPdŽedef�d„�ZQ�dl�de�de
def�d„�ZR�de	def�d	„�ZS�d
e	def�d„�ZTdwedef�d„�ZU�dIdgedhedwe�dee   def
�d„�ZV	 	 	 	 	 �dt�dee   dee   �dee   dde"d2e"def�d„�ZW�dedef�d„�ZX�dedef�d„�ZY�dedef�d„�ZZ�dedef�d„�Z[	 	 	 	 �du�dedted”edde"d2ee"   d•ee   def�d„�Z\	 	 	 �dS�de�de
dde"d2e"def
�d„�Z]	 	 	 	 	 	 �dv�de�dedte�ded”ed•edde"d2e"def�d„�Z^	 	 	 	 	 	 �dv�dedte�ded”ed•edde"d2e"def�d„�Z_�d^�dedde"d2e"def�d„�Z`�dedef�d„�Za�dedRedef�d„�Zb�dedRedef�d „�Zc�dedRedef�d!„�Zd�dedef�d"„�Ze�ded	edef�d#„�Zf	 �de�de�d$ee   dde"d2e"def
�d%„�Zg e�d&�d'¬)«      	 �de�de�d$ee   dde"d2e"def
�d(„«       �Zh	 	 	 	 	 	 �dw�de�d)edte�d*e
d”ed•edde"d2e"def�d+„�Zi	 �dx�de�d,edde"d2e"def
�d-„�Zj	 	 	 �dHdge�de�d6ee   �d.ee   �d/ee   def�d0„�Zk�d)e�d
ee   def�d1„�Zl�d)edef�d2„�Zm�d)edge�d6e�d.edef
�d3„�Zn�d)edef�d4„�Zo�d)ed	edef�d5„�Zp�d)edded2edef�d6„�Zq�d7e	�d8e�d9edef�d:„�Zrdef�d;„�Zs�d<edef�d=„�Zt�dZ�dee   �d>e
def�d?„�Zudef�d@„�Zvdef�dA„�Zwdef�dB„�Zxdef�dC„�Zy�dZde�dDe
def�dE„�Zzˆ x�Z{S (y  ÚJiraz‘
    Provide permission information for the current user.
    Reference: https://docs.atlassian.com/software/jira/docs/api/REST/8.5.0/#api/2
    ÚurlÚargsÚkwargsc                 óF   •— d|vrd|d<   t        t        | �
  |g|¢­i |¤Ž y )NÚapi_versionÚ2)Úsuperr   Ú__init__)Úselfr   r   r   Ú	__class__s       €úF/var/www/timesheet/venv/lib/python3.12/site-packages/atlassian/jira.pyr    zJira.__init__   s.   ø€ Ø Ñ&Ø$'ˆF�=Ñ!äŒd�DÑ" 3Ð8¨Ò8°Ó8ó    NFÚparamsÚdataÚflagsÚtrailingÚabsolutec              #   óT  •K  — | j                   r�|€i }	 t        dt        t        | �  ||||||¬«      «      }|j	                  dg «      }|D ]  }	|	–— Œ |j	                  dd«      st        |«      dk(  r	 yt        d	|j	                  d
«      «      }|€	 yd}i }d}Œˆt        d«      ‚­w)a>  
        Used to get the paged data

        :param url: string:                        The url to retrieve
        :param params: dict (default is None):     The parameter's
        :param data: dict (default is None):       The data
        :param flags: string[] (default is None):  The flags
        :param trailing: bool (default is None):   If True, a trailing slash is added to the url
        :param absolute: bool (default is False):  If True, the url is used absolute and not relative to the root

        :return: A generator object for the data elements
        NTÚdict)r(   r%   r&   r'   r)   ÚvaluesÚisLastFr   ÚstrÚnextPagez?``_get_paged`` method is only available for Jira Cloud platform)Úcloudr	   r   r   ÚgetÚlenÚ
ValueError)r!   r   r%   r&   r'   r(   r)   Úresponser,   Úvaluer"   s             €r#   Ú
_get_pagedzJira._get_paged#   sá   øè ø€ ð, �:Š:Øˆ~Ø�àÜØÜœ$ Ñ)ØØ!)Ø%Ø!Ø#Ø!)ð *ó ó
�ð "Ÿ™ h°Ó3�Ø#ò  �EØ“Kð ð —<‘< ¨%Ô0´C¸³KÀ1Ò4DØð 	ô ˜5 (§,¡,¨zÓ":Ó;�Ø�;Øð 	ð  �à�à �ð7 ô: Ð^Ó_Ð_ùs   ƒB%B(ÚpermissionsÚ
project_idÚproject_keyÚissue_idÚ	issue_keyÚreturnc                 óŠ   — | j                  d«      }d|i}|r||d<   |r||d<   |r||d<   |r||d<   | j                  ||¬«      S )aÖ  
        Returns a list of permissions indicating which permissions the user has. Details of the user's permissions can
         be obtained in a global, project, issue or comment context.

        The user is reported as having a project permission:
        - in the global context, if the user has the project permission in any project.
        - for a project, where the project permission is determined using issue data, if the user meets the
         permission's criteria for any issue in the project. Otherwise, if the user has the project permission in
         the project.
        - for an issue, where a project permission is determined using issue data, if the user has the permission in the
         issue. Otherwise, if the user has the project permission in the project containing the issue.
        - for a comment, where the user has both the permission to browse the comment and the project permission for the
         comment's parent issue. Only the BROWSE_PROJECTS permission is supported. If a commentId is provided whose
         permissions does not equal BROWSE_PROJECTS, a 400 error will be returned.

        This means that users may be shown as having an issue permission (such as EDIT_ISSUES) in the global context or
         a project context but may not have the permission for any or all issues. For example, if Reporters have the
         EDIT_ISSUES permission a user would be shown as having this permission in the global context or the context of
         a project, because any user can be a reporter. However, if they are not the user who reported the issue queried
         they would not have EDIT_ISSUES permission for that issue.

        Global permissions are unaffected by context.

        This operation can be accessed anonymously.

        :param permissions: (str)  A list of permission keys. This parameter accepts a comma-separated list. (Required)
        :param project_id: (str)  id of project to scope returned permissions for.
        :param project_key: (str) key of project to scope returned permissions for.
        :param issue_id: (str)  key of the issue to scope returned permissions for.
        :param issue_key: (str) id of the issue to scope returned permissions for.
        :return:
        Úmypermissionsr7   Ú	projectIdÚ
projectKeyÚissueIdÚissueKey©r%   ©Úresource_urlr1   )r!   r7   r8   r9   r:   r;   r   r%   s           r#   Úget_permissionszJira.get_permissions^   sf   € ðR ×Ñ Ó0ˆØ.;¸[Ð-IˆáØ",ˆF�;ÑÙØ#.ˆF�<Ñ ÙØ (ˆF�9ÑÙØ!*ˆF�:Ñà�x‰x˜ FˆxÓ+Ð+r$   c                 óF   — | j                  d«      }| j                  |«      S )z¯
        Returns all permissions that are present in the Jira instance -
        Global, Project and the global ones added by plugins
        :return: All permissions
        r7   rD   ©r!   r   s     r#   Úget_all_permissionszJira.get_all_permissions•   s"   € ð ×Ñ Ó.ˆØ�x‰x˜‹}Ðr$   ÚkeyÚpermission_levelÚ
key_filterc                 óx   — | j                  d«      }i }|r||d<   |r||d<   |r||d<   | j                  ||¬«      S )z«
        Returns an application property
        :param key: str
        :param permission_level: str
        :param key_filter: str
        :return: list or item
        úapplication-propertiesrJ   ÚpermissionLevelÚ	keyFilterrC   rD   )r!   rJ   rK   rL   r   r%   s         r#   Úget_propertyzJira.get_property£   sT   € ð ×ÑÐ 8Ó9ˆØˆáØˆF�5‰MÙØ(8ˆFÐ$Ñ%ÙØ",ˆF�;Ñà�x‰x˜ FˆxÓ+Ð+r$   Úproperty_idr5   c                 ób   — | j                  d«      }|› d|› �}||dœ}| j                  ||¬«      S )zÃ
        Modify an application property via PUT. The "value" field present in the PUT will override the existing value.
        :param property_id:
        :param value:
        :return:
        rN   ú/)Úidr5   ©r&   ©rE   Úput)r!   rR   r5   Úbase_urlr   r&   s         r#   Úset_propertyzJira.set_propertyº   sB   € ð ×$Ñ$Ð%=Ó>ˆØ�
˜!˜K˜=Ð)ˆØ!¨EÑ2ˆà�x‰x˜ $ˆxÓ'Ð'r$   c                 óF   — | j                  d«      }| j                  |«      S )z…
        Returns the properties that are displayed on the "General Configuration > Advanced Settings" page.
        :return:
        z(application-properties/advanced-settingsrD   rH   s     r#   Úget_advanced_settingszJira.get_advanced_settingsÇ   s#   € ð
 ×ÑÐ JÓKˆà�x‰x˜‹}Ðr$   c                 óN   — | j                  d«      }| j                  |«      xs i S )zM
        Returns all ApplicationRoles in the system
        :return:
        ÚapplicationrolerD   rH   s     r#   Úget_all_application_roleszJira.get_all_application_rolesÕ   s(   € ð
 ×ÑÐ 1Ó2ˆØ�x‰x˜‹}Ò" Ð"r$   Úrole_keyc                 ó\   — | j                  d«      }|› d|› �}| j                  |«      xs i S )zx
        Returns the ApplicationRole with passed key if it exists
        :param role_key: str
        :return:
        r^   rT   rD   )r!   r`   rY   r   s       r#   Úget_application_rolezJira.get_application_roleÝ   s8   € ð ×$Ñ$Ð%6Ó7ˆØ�
˜!˜H˜:Ð&ˆØ�x‰x˜‹}Ò" Ð"r$   Úissuec                 óz   — | j                  |«      d   d   }g }|D ]  }|j                  |d   |d   dœ«       Œ |S )z‘
        Get attachments IDs from jira issue
        :param issue: str : jira issue key
        :return: list of integers attachment IDs
        ÚfieldsÚ
attachmentÚfilenamerU   )rg   Úattachment_id©Ú	get_issueÚappend)r!   rc   r:   Úlist_attachments_idrf   s        r#   Úget_attachments_ids_from_issuez#Jira.get_attachments_ids_from_issueì   sX   € ð —>‘> %Ó(¨Ñ2°<Ñ@ˆØ ÐØ"ò 	pˆJØ×&Ñ&°J¸zÑ4JÐ]gÐhlÑ]mÑ'nÕoð	pà"Ð"r$   rh   c                 óT   — | j                  d«      }|› d|› �}| j                  |«      S )z›
        Returns the meta-data for an attachment, including the URI of the actual attached file
        :param attachment_id: int
        :return:
        rf   rT   rD   ©r!   rh   rY   r   s       r#   Úget_attachmentzJira.get_attachmentø   ó2   € ð ×$Ñ$ \Ó2ˆØ�
˜!˜M˜?Ð+ˆØ�x‰x˜‹}Ðr$   Úpathc                 ó>   — | j                  ||| j                  ¬«      S )a9  
        Downloads all attachments from a Jira issue.
        :param issue: The issue-key of the Jira issue
        :param path: Path to directory where attachments will be saved. If None, current working directory will be used.
        :return: A message indicating the result of the download operation.
        )rc   rr   r0   )Údownload_attachments_from_issuer0   )r!   rc   rr   s      r#   Údownload_issue_attachmentszJira.download_issue_attachments  s#   € ð ×3Ñ3¸%ÀdÐRV×R\ÑR\Ð3Ó]Ð]r$   z3.41.20z&Use download_issue_attachments instead)ÚversionÚreasonr0   c                 ó¨  — 	 |€t        j                  «       }| j                  |d¬«      d   }|r| j                  d|› d�z   }n| j                  d|› d�z   }| j                  j                  |«      }|› d�}t         j                  j                  ||«      }t        d„ |j                  d	«      D «       «      }	|	d
k(  ryt         j                  j                  |«      ryt        |d«      5 }
|
j                  |j                  «       ddd«       y# 1 sw Y   yxY w# t        $ r t        d«      ‚t        $ r t        d«      ‚t         $ r}|‚d}~ww xY w)a”  
        Downloads all attachments from a Jira issue.
        :param issue: The issue-key of the Jira issue
        :param path: Path to directory where attachments will be saved. If None, current working directory will be used.
        :param cloud: Use True for Jira Cloud, false when using Jira Data Center or Server
        :return: A message indicating the result of the download operation.
        NrU   ©re   z/secure/issueAttachments/z.zipz/secure/attachmentzip/z_attachments.zipc              3   ó2   K  — | ]  }t        |«      –— Œ y ­w©N)r2   )Ú.0Úchunks     r#   ú	<genexpr>z7Jira.download_attachments_from_issue.<locals>.<genexpr>#  s   è ø€ ÒP¨5œC ŸJÑPùs   ‚i   é   z&No attachments found on the Jira issuezFile already existsÚwbz#Attachments downloaded successfullyz>Verify if directory path is correct and/or if directory existszgDirectory found, but there is a problem with saving file to this directory. Check directory permissions)ÚosÚgetcwdrc   r   Ú_sessionr1   rr   ÚjoinÚsumÚiter_contentÚisfileÚopenÚwriteÚcontentÚFileNotFoundErrorÚPermissionErrorÚ	Exception)r!   rc   rr   r0   r:   r   r4   Úattachment_nameÚ	file_pathÚ	file_sizeÚfÚes               r#   rt   z$Jira.download_attachments_from_issue  sG  € ð	Øˆ|Ü—y‘y“{�Ø—z‘z %°�zÓ5°dÑ;ˆHÙØ—h‘hÐ#<¸X¸JÀdÐ!KÑK‘à—h‘hÐ#9¸(¸À4Ð!HÑH�Ø—}‘}×(Ñ(¨Ó-ˆHØ!) 
Ð*:Ð;ˆOÜŸ™Ÿ™ T¨?Ó;ˆIô ÑP°H×4IÑ4IÈ$Ó4OÔPÓPˆIØ˜BŠØ?Ü�w‰w�~‰~˜iÔ(Ø,Ü�i Ó&ð *¨!Ø—‘˜×(Ñ(Ô)÷*à8÷*à8ûä ò 	fÜ#Ð$dÓeÐeÜò 	Ü!Øyóð ô ò 	ØˆGûð	úsB   ‚B;D Â>D ÃD Ã*DÄD ÄDÄD ÄD Ä/EÅ
EÅEc                 óX   — | j                  d«      }|› d|› �}| j                  |d¬«      S )z{
        Returns the content for an attachment
        :param attachment_id: int
        :return: content as bytes
        rf   z	/content/T©Únot_json_responserD   ro   s       r#   Úget_attachment_contentzJira.get_attachment_content5  s7   € ð ×$Ñ$ \Ó2ˆØ�
˜) M ?Ð3ˆØ�x‰x˜¨tˆxÓ4Ð4r$   c                 óT   — | j                  d«      }|› d|› �}| j                  |«      S )z
        Remove an attachment from an issue
        :param attachment_id: int
        :return: if success, return None
        rf   rT   ©rE   Údeletero   s       r#   Úremove_attachmentzJira.remove_attachment?  s3   € ð ×$Ñ$ \Ó2ˆØ�
˜!˜M˜?Ð+ˆØ�{‰{˜3ÓÐr$   c                 óF   — | j                  d«      }| j                  |«      S )z 
        Returns the meta information for an attachments,
        specifically if they are enabled and the maximum upload size allowed
        :return:
        zattachment/metarD   rH   s     r#   Úget_attachment_metazJira.get_attachment_metaI  s#   € ð ×ÑÐ 1Ó2ˆØ�x‰x˜‹}Ðr$   c                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )z’
        Returns the information for an expandable attachment in human-readable format
        :param attachment_id: int
        :return:
        rf   rT   z/expand/humanrD   ro   s       r#   Úget_attachment_expand_humanz Jira.get_attachment_expand_humanR  s4   € ð ×$Ñ$ \Ó2ˆØ�
˜!˜M˜?¨-Ð8ˆØ�x‰x˜‹}Ðr$   c                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )z‡
        Returns the information for an expandable attachment in raw format
        :param attachment_id: int
        :return:
        rf   rT   z/expand/rawrD   ro   s       r#   Úget_attachment_expand_rawzJira.get_attachment_expand_raw\  s4   € ð ×$Ñ$ \Ó2ˆØ�
˜!˜M˜?¨+Ð6ˆØ�x‰x˜‹}Ðr$   ÚoffsetÚlimitÚfilterÚ	from_dateÚto_datec                 óœ   — i }|r||d<   |r||d<   |r||d<   |r||d<   |r||d<   | j                  d«      }| j                  ||¬«      xs i S )aÆ  
        Returns auditing records filtered using provided parameters
        :param offset: the number of record from which search starts
        :param limit: maximum number of returned results (if is limit is <= 0 or > 1000,
            it will be set do default value: 1000)
        :param str filter: text query; each record that will be returned must contain
            the provided text in one of its fields.
        :param str from_date: timestamp in the past; 'from' must be less or equal 'to',
            otherwise the result set will be empty only records that where created in the same moment or after
            the 'from' timestamp will be provided in response
        :param str to_date: timestamp in the past; 'from' must be less or equal 'to',
            otherwise the result set will be empty only records that where created in the same moment or earlier than
            the 'to' timestamp will be provided in response
        :return:
        r¡   r¢   r£   ÚfromÚtoúauditing/recordrC   rD   )r!   r¡   r¢   r£   r¤   r¥   r%   r   s           r#   Úget_audit_recordszJira.get_audit_recordsk  sp   € ð. ˆÙØ%ˆF�8ÑÙØ#ˆF�7‰OÙØ%ˆF�8ÑÙØ&ˆF�6‰NÙØ"ˆF�4‰LØ×ÑÐ 1Ó2ˆØ�x‰x˜ FˆxÓ+Ò1¨rÐ1r$   Úaudit_recordc                 óJ   — | j                  d«      }| j                  ||¬«      S )z¦
        Store a record in Audit Log
        :param audit_record: json with compat https://docs.atlassian.com/jira/REST/schema/audit-record#
        :return:
        r©   rV   ©rE   Úpost)r!   r«   r   s      r#   Úpost_audit_recordzJira.post_audit_record�  s(   € ð ×ÑÐ 1Ó2ˆØ�y‰y˜ <ˆyÓ0Ð0r$   ÚuserÚavatar_typec                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )a  
        Returns all system avatars of the given type.
        :param avatar_type:
        :return: Returns a map containing a list of system avatars.
                 A map is returned to be consistent with the shape of the project/KEY/avatars REST end point.
        ÚavatarrT   z/systemrD   )r!   r±   rY   r   s       r#   Úget_all_system_avatarszJira.get_all_system_avatarsž  s4   € ð ×$Ñ$ XÓ.ˆØ�
˜!˜K˜=¨Ð0ˆØ�x‰x˜‹}Ðr$   c                 óF   — | j                  d«      }| j                  |«      S )z?
        Get all nodes in the cluster
        :return:
        zcluster/nodesrD   rH   s     r#   Úget_cluster_all_nodeszJira.get_cluster_all_nodes®  s"   € ð
 ×Ñ Ó0ˆØ�x‰x˜‹}Ðr$   Únode_idc                 óT   — | j                  d«      }|› d|› �}| j                  |«      S )z{
        Delete the node from the cluster if state of node is OFFLINE
        :param node_id: str
        :return:
        úcluster/noderT   r˜   ©r!   r·   rY   r   s       r#   Údelete_cluster_nodezJira.delete_cluster_node¶  s3   € ð ×$Ñ$ ^Ó4ˆØ�
˜!˜G˜9Ð%ˆØ�{‰{˜3ÓÐr$   c                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )z–
        Change the node's state to offline if the node is reporting as active, but is not alive
        :param node_id: str
        :return:
        r¹   rT   z/offlinerW   rº   s       r#   Úset_node_to_offlinezJira.set_node_to_offlineÀ  s4   € ð ×$Ñ$ ^Ó4ˆØ�
˜!˜G˜9 HÐ-ˆØ�x‰x˜‹}Ðr$   c                 ó|   — | j                  «       }|r$|j                  «       D �cg c]
  }|d   sŒ	|‘Œ c}S g S c c}w )zZ
        Get cluster nodes where alive = True
        :return: list of node dicts
        Úalive)r¶   r,   )r!   ÚnodesÚ_s      r#   Úget_cluster_alive_nodeszJira.get_cluster_alive_nodesÊ  s9   € ð
 ×*Ñ*Ó,ˆÙ<A˜5Ÿ<™<›>Ö8�a¨Q¨w«Z’Ò8ÐIÀrÐIùÒ8s   ¥
9°9c                 óT   — | j                  d«      }|› d|› �}| j                  |«      S )zÏ
        Request current index from node (the request is processed asynchronously).
        This method is deprecated as it is Lucene specific and is planned for removal in Jira 11.
        :return:
        zcluster/index-snapshotrT   rW   rº   s       r#   Úrequest_current_index_from_nodez$Jira.request_current_index_from_nodeÒ  s3   € ð ×$Ñ$Ð%=Ó>ˆØ�
˜!˜G˜9Ð%ˆØ�x‰x˜‹}Ðr$   Únode_idsc                 ó4   — d|i}d}| j                  ||¬«      S )z�
        Generate a support zip on targeted nodes of a cluster
        :param node_ids: list
        :return: dict representing cluster task created
        ÚnodeIdsz0/rest/troubleshooting/latest/support-zip/clusterrV   ©r®   )r!   rÅ   r&   r   s       r#   Úgenerate_support_zip_on_nodesz"Jira.generate_support_zip_on_nodesá  s&   € ð ˜8Ð$ˆØ@ˆØ�y‰y˜ 4ˆyÓ(Ð(r$   Úcluster_task_idc                 ó.   — d|› �}| j                  |«      S )zp
        Check status of support zip creation task
        :param cluster_task_id: str
        :return:
        z8/rest/troubleshooting/latest/support-zip/status/cluster/©r1   )r!   rÊ   r   s      r#   Úcheck_support_zip_statuszJira.check_support_zip_statusë  s    € ð IÈÐHYÐZˆØ�x‰x˜‹}Ðr$   Ú	file_namec                 óF   — d|› �}| j                  |d¬«      j                  S )zt
        Download created support zip file
        :param file_name: str
        :return: bytes of zip file
        z2/rest/troubleshooting/latest/support-zip/download/T)Úadvanced_mode)r1   rŠ   )r!   rÎ   r   s      r#   Údownload_support_zipzJira.download_support_zipô  s*   € ð CÀ9À+ÐNˆØ�x‰x˜¨4ˆxÓ0×8Ñ8Ð8r$   c                 óF   — | j                  d«      }| j                  |«      S )z@
        Approves the cluster upgrade.
        :return:
        zcluster/zdu/approver­   rH   s     r#   Úapprove_cluster_zdu_upgradez Jira.approve_cluster_zdu_upgrade  s#   € ð
 ×ÑÐ 5Ó6ˆØ�y‰y˜‹~Ðr$   c                 óF   — | j                  d«      }| j                  |«      S )zG
        Cancels the ongoing cluster upgrade.
        :return:
        zcluster/zdu/cancelr­   rH   s     r#   Úcancel_cluster_zdu_upgradezJira.cancel_cluster_zdu_upgrade
  s#   € ð
 ×ÑÐ 4Ó5ˆØ�y‰y˜‹~Ðr$   c                 óF   — | j                  d«      }| j                  |«      S )z?
        Retries the cluster upgrade.
        :return:
        zcluster/zdu/retryUpgrader­   rH   s     r#   Úretry_cluster_zdu_upgradezJira.retry_cluster_zdu_upgrade  s#   € ð
 ×ÑÐ :Ó;ˆØ�y‰y˜‹~Ðr$   c                 óF   — | j                  d«      }| j                  |«      S )z>
        Starts the cluster upgrade.
        :return:
        zcluster/zdu/startr­   rH   s     r#   Ústart_cluster_zdu_upgradezJira.start_cluster_zdu_upgrade  s#   € ð
 ×ÑÐ 3Ó4ˆØ�y‰y˜‹~Ðr$   c                 óF   — | j                  d«      }| j                  |«      S )zH
        Get the state of the cluster upgrade.
        :return:
        zcluster/zdu/staterD   rH   s     r#   Úget_cluster_zdu_statezJira.get_cluster_zdu_state"  s#   € ð
 ×ÑÐ 3Ó4ˆØ�x‰x˜‹}Ðr$   c                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )z�
        Get Comments on an Issue.
        :param issue_id: Issue ID
        :raises: requests.exceptions.HTTPError
        :return:
        rc   rT   ú/commentrD   )r!   r:   rY   r   s       r#   Úissue_get_commentszJira.issue_get_comments+  s4   € ð ×$Ñ$ WÓ-ˆØ�
˜!˜H˜: XÐ.ˆØ�x‰x˜‹}Ðr$   c           	      óÜ   — t        |D �cg c]  }t        |t        «      ‘Œ c}«      st        d«      ‚dt	        |«      i}| j                  d«      }|› d�}| j                  ||¬«      S c c}w )z•
        Get Comments on Multiple Issues
        :param args: int Issue ID's
        :raises: requests.exceptions.HTTPError
        :return:
        z4Arguments to `issues_get_comments_by_id` must be intÚidsÚcommentz/listrV   )ÚallÚ
isinstanceÚintÚ	TypeErrorÚlistrE   r®   )r!   r   Úir&   rY   r   s         r#   Úissues_get_comments_by_idzJira.issues_get_comments_by_id6  sl   € ô °Ö5¨1”J˜q¤#Õ&Ò5Ô6ÜÐRÓSÐSØ”t˜D“zÐ"ˆØ×$Ñ$ YÓ/ˆØ�
˜%Ð ˆØ�y‰y˜ 4ˆyÓ(Ð(ùò 6s   ŠA)Ú
comment_idc                 óZ   — | j                  d«      }|› d|› d|› �}| j                  |«      S )z©
        Get a single comment
        :param issue_id: int or str
        :param comment_id: int
        :raises: requests.exceptions.HTTPError
        :return:
        rc   rT   ú	/comment/rD   )r!   r:   ré   rY   r   s        r#   Úissue_get_commentzJira.issue_get_commentD  s8   € ð ×$Ñ$ WÓ-ˆØ�
˜!˜H˜: Y¨z¨lÐ;ˆØ�x‰x˜‹}Ðr$   c                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )z”
        Returns the keys of all properties for the comment identified by the key or by the id.
        :param comment_id:
        :return:
        rá   rT   ú/propertiesrD   )r!   ré   rY   r   s       r#   Úget_comment_properties_keysz Jira.get_comment_properties_keysU  s4   € ð ×$Ñ$ YÓ/ˆØ�
˜!˜J˜< {Ð3ˆØ�x‰x˜‹}Ðr$   Úproperty_keyc                 óZ   — | j                  d«      }|› d|› d|› �}| j                  |«      S )z�
        Returns the value a property for a comment
        :param comment_id: int
        :param property_key: str
        :return:
        rá   rT   ú/properties/rD   ©r!   ré   rð   rY   r   s        r#   Úget_comment_propertyzJira.get_comment_property_  s8   € ð ×$Ñ$ YÓ/ˆØ�
˜!˜J˜< |°L°>ÐBˆØ�x‰x˜‹}Ðr$   Úvalue_propertyc                 óf   — | j                  d«      }|› d|› d|› �}d|i}| j                  ||¬«      S )zß
        Returns the keys of all properties for the comment identified by the key or by the id.
        :param comment_id: int
        :param property_key: str
        :param value_property: object
        :return:
        rá   rT   rò   r5   rV   rW   )r!   ré   rð   rõ   rY   r   r&   s          r#   Úset_comment_propertyzJira.set_comment_propertyj  sG   € ð ×$Ñ$ YÓ/ˆØ�
˜!˜J˜< |°L°>ÐBˆØ˜Ð(ˆØ�x‰x˜ $ˆxÓ'Ð'r$   c                 óZ   — | j                  d«      }|› d|› d|› �}| j                  |«      S )zƒ
        Deletes a property for a comment
        :param comment_id: int
        :param property_key: str
        :return:
        rá   rT   rò   r˜   ró   s        r#   Údelete_comment_propertyzJira.delete_comment_propertyw  s9   € ð ×$Ñ$ YÓ/ˆØ�
˜!˜J˜< |°L°>ÐBˆØ�{‰{˜3ÓÐr$   Úcomponent_idc                 óP   — | j                  d«      }| j                  |› d|› �«      S )NÚ	componentrT   rD   ©r!   rú   rY   s      r#   rü   zJira.component‡  s,   € Ø×$Ñ$ [Ó1ˆØ�x‰x˜8˜* A l ^Ð4Ó5Ð5r$   c                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )zs
        Returns counts of issues related to this component.
        :param component_id:
        :return:
        rü   rT   z/relatedIssueCountsrD   )r!   rú   rY   r   s       r#   Úget_component_related_issuesz!Jira.get_component_related_issues‹  s5   € ð ×$Ñ$ [Ó1ˆØ�
˜!˜L˜>Ð)<Ð=ˆØ�x‰x˜‹}Ðr$   rü   c                 ó†   — t         j                  d|d   «       | j                  d«      }|› d�}| j                  ||¬«      S )NzCreating component "%s"Únamerü   rT   rV   ©ÚlogÚinforE   r®   )r!   rü   rY   r   s       r#   Úcreate_componentzJira.create_component•  sD   € Ü�‰Ð*¨I°fÑ,=Ô>Ø×$Ñ$ [Ó1ˆØ�
˜!ˆnˆØ�y‰y˜ 9ˆyÓ-Ð-r$   c                 óX   — | j                  d«      }|› d|› �}| j                  ||¬«      S )Nrü   rT   rV   rW   )r!   rü   rú   rY   r   s        r#   Úupdate_componentzJira.update_component›  s5   € Ø×$Ñ$ [Ó1ˆØ�
˜!˜L˜>Ð*ˆØ�x‰x˜ )ˆxÓ,Ð,r$   c                 ó|   — t         j                  d|«       | j                  d«      }| j                  |› d|› �«      S )NzDeleting component "%s"rü   rT   ©r  r  rE   r™   rý   s      r#   Údelete_componentzJira.delete_component   s;   € Ü�‰Ð*¨LÔ9Ø×$Ñ$ [Ó1ˆØ�{‰{˜h˜Z q¨¨Ð7Ó8Ð8r$   Úleadc                 ó^   — ||dœ}| j                  d«      }| j                  |› d|› �|¬«      S )N)rU   ÚleadUserNamerü   rT   rV   rW   )r!   rú   r  r&   rY   s        r#   Úupdate_component_leadzJira.update_component_lead¥  sC   € Ø"°DÑ9ˆØ×$Ñ$ [Ó1ˆØ�x‰xØˆj˜˜,˜Ð(Øð ó 
ð 	
r$   c                 óF   — | j                  d«      }| j                  |«      S )zé
        Returns the information if the optional features in JIRA are enabled or disabled.
        If the time tracking is enabled, it also returns the detailed information about time tracking configuration.
        :return:
        ÚconfigurationrD   rH   s     r#   Úget_configurations_of_jirazJira.get_configurations_of_jira²  s"   € ð ×Ñ Ó0ˆØ�x‰x˜‹}Ðr$   Ú	option_idc                 óT   — | j                  d«      }|› d|› �}| j                  |«      S )zŒ
        Returns a full representation of the Custom Field Option that has the given id.
        :param option_id:
        :return:
        ÚcustomFieldOptionrT   rD   )r!   r  rY   r   s       r#   Úget_custom_field_optionzJira.get_custom_field_optionÂ  s3   € ð ×$Ñ$Ð%8Ó9ˆØ�
˜!˜I˜;Ð'ˆØ�x‰x˜‹}Ðr$   ÚsearchÚstartc                 ó´   — | j                   r| j                  d«      }n| j                  d«      }i }|r||d<   |r||d<   |r||d<   | j                  ||¬«      S )zÔ
        Get custom fields. Evaluated on 7.12
        Get fields paginated in cloud
        :param search: str
        :param start: long Default: 1
        :param limit: int Default: 50
        :return:
        zfield/searchÚcustomFieldsr  ÚstartAtÚ
maxResultsrC   ©r0   rE   r1   )r!   r  r  r¢   r   r%   s         r#   Úget_custom_fieldszJira.get_custom_fieldsÌ  sj   € ð �:Š:Ø×#Ñ# NÓ3‰Cà×#Ñ# NÓ3ˆCØˆÙØ%ˆF�8ÑÙØ %ˆF�9ÑÙØ#(ˆF�<Ñ Ø�x‰x˜ FˆxÓ+Ð+r$   c                 óF   — | j                  d«      }| j                  |«      S )z¥
        Returns a list of all fields, both System and Custom
        :return: application/jsonContains a full representation of all visible fields in JSON.
        ÚfieldrD   rH   s     r#   Úget_all_fieldszJira.get_all_fieldsâ  s"   € ð
 ×Ñ Ó(ˆØ�x‰x˜‹}Ðr$   r  ÚtypeÚ
search_keyÚdescriptionc                 ó   — | j                  d«      }|j                  «       |j                  «       dœ}|d   st        d«      ‚|d   st        d«      ‚|r|j                  «       |d<   |r|j                  «       |d<   | j                  ||¬	«      S )
a«  
        Creates a custom field with the given name and type
        This method is primarily for Jira Server/Data Center. For Jira Cloud, the
        `searcher_key` is not applicable.
        :param name: str - The name of the custom field (e.g., "My Custom Field"). Cannot be empty.
        :param type: str, The type of the custom field, which defines its behavior.
                          Example: 'com.atlassian.jira.plugin.system.customfieldtypes:textfield'
        :param search_key: str, (For Jira Server/DC) The searcher key to make the field searchable.
                                Example: 'com.atlassian.jira.plugin.system.customfieldtypes:textsearcher'
        :param description: str, An optional description for the custom field.
        :return: A dictionary representing the created custom field, or None if the
                 API returns no content. Raises HTTPError for API-level errors.
        API References:
        - Jira Server: https://docs.atlassian.com/software/jira/docs/api/REST/9.17.0/#api/2/field-createCustomField
        - Jira Cloud: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-fields/#api-rest-api-2-field-post
        r  )r  r!  r  z0The 'name' for the custom field cannot be empty.r!  z0The 'type' for the custom field cannot be empty.r#  ÚsearcherKeyrV   )rE   Ústripr3   r®   )r!   r  r!  r"  r#  r   r&   s          r#   Úcreate_custom_fieldzJira.create_custom_fieldê  s�   € ð& ×Ñ Ó(ˆØŸ
™
›¨d¯j©j«lÑ;ˆØ�FŠ|ÜÐOÓPÐPØ�FŠ|ÜÐOÓPÐPáØ"-×"3Ñ"3Ó"5ˆD�ÑáØ",×"2Ñ"2Ó"4ˆD�Ñà�y‰y˜ 4ˆyÓ(Ð(r$   Úfield_idÚ
context_idc                 óX   — | j                  d|› d|› d�d¬«      }| j                  |«      S )a0  
        Gets the current values of a custom field
        :param field_id:
        :param context_id:
        :return:

        Reference: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-custom-field-options/#api-rest-api-2-field-fieldid-context-contextid-option-get
        úfield/ú	/context/ú/optioné   ©r   rD   )r!   r(  r)  r   s       r#   Úget_custom_field_option_contextz$Jira.get_custom_field_option_context  s>   € ð ×ÑØ�X�J˜i¨
 |°7Ð;Øð  ó 
ˆð �x‰x˜‹}Ðr$   Úoptionsc                 ó    — dg i}|D ]  }|d   j                  d|dœ«       Œ | j                  d|› d|› d�d¬«      }| j                  ||¬	«      S )
a”  
         Adds the values given to the custom field
         Administrator permission required
         :param field_id:
         :param context_id:
         :param options: List of values to be added
         :return:

        Reference: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-custom-field-options/#api-rest-api-2-field-fieldid-context-contextid-option-post
        r1  Úfalse)Údisabledr5   r+  r,  r-  r.  r/  rV   )rk   rE   r®   )r!   r(  r)  r1  r&   rç   r   s          r#   Úadd_custom_field_optionzJira.add_custom_field_option  sv   € ð   �_ˆØò 	FˆAØ�‰O×"Ñ"°À!Ñ#DÕEð	Fð ×ÑØ�X�J˜i¨
 |°7Ð;Øð  ó 
ˆð �y‰y˜ 4ˆyÓ(Ð(r$   c                 óx   — i }|r||d<   |r||d<   |r||d<   | j                  d«      }| j                  ||¬«      S )a  
        Returns a list of all dashboards, optionally filtering them.
        :param filter: OPTIONAL: an optional filter that is applied to the list of dashboards.
                                Valid values include "favourite" for returning only favourite dashboards,
                                and "my" for returning dashboards that are owned by the calling user.
        :param start: the index of the first dashboard to return (0-based). must be 0 or a multiple of maxResults
        :param limit: a hint as to the maximum number of dashboards to return in each call.
                      Note that the JIRA server reserves the right to impose a maxResults limit that is lower
                      than the value that a client provides, dues to lack or resources or any other condition.
                      When this happens, your results will be truncated.
                      Callers should always check the returned maxResults to determine
                      the value that is effectively being used.
        :return:
        r£   r  r  Ú	dashboardrC   rD   )r!   r£   r  r¢   r%   r   s         r#   Úget_dashboardszJira.get_dashboards5  sS   € ð ˆÙØ%ˆF�8ÑÙØ %ˆF�9ÑÙØ#(ˆF�<Ñ Ø×Ñ Ó,ˆØ�x‰x˜ FˆxÓ+Ð+r$   Údashboard_idc                 óL   — | j                  d|› �«      }| j                  |«      S )zl
        Returns a single dashboard

        :param dashboard_id: Dashboard ID Int
        :return:
        z
dashboard/rD   )r!   r9  r   s      r#   Úget_dashboardzJira.get_dashboardN  s)   € ð ×Ñ *¨\¨NÐ ;Ó<ˆØ�x‰x˜‹}Ðr$   ÚjqlÚ	favouritec                 óh   — |||r|nd|rdnddœ}| j                  d«      }| j                  ||¬«      S )z¸
        :param name: str
        :param jql: str
        :param description: str, Optional. Empty string by default
        :param favourite: bool, Optional. False by default
        Ú Útruer3  )r<  r  r#  r=  r£   rV   r­   )r!   r  r<  r#  r=  r&   r   s          r#   Úcreate_filterzJira.create_filter]  sD   € ð ØÙ*5™;¸2Ù#,™°'ñ	
ˆð ×Ñ Ó)ˆØ�y‰y˜ 4ˆyÓ(Ð(r$   Ú	filter_idc                 óŠ   — d|i}|r||d<   |r||d<   |r||d<   | j                  d«      }|› d|› �}| j                  ||¬«      S )a:  
        Updates an existing filter.
        :param filter_id: Filter ID
        :param name: Filter Name
        :param jql: Filter JQL
        :param description: Filter description
        :param favourite: Indicates if filter is selected as favorite
        :return: Returns updated filter information
        r  r<  r#  r=  r£   rT   rV   rW   )	r!   rB  r  r<  r#  r=  r&   rY   r   s	            r#   Úedit_filterzJira.edit_filterm  sf   € ð" ˜d�^ˆÙØˆD�‰KÙØ"-ˆD�ÑÙØ )ˆD�ÑØ×$Ñ$ XÓ.ˆØ�
˜!˜I˜;Ð'ˆØ�x‰x˜ $ˆxÓ'Ð'r$   c                 óT   — | j                  d«      }|› d|› �}| j                  |«      S )z}
        Returns a full representation of a filter that has the given id.
        :param filter_id:
        :return:
        r£   rT   rD   ©r!   rB  rY   r   s       r#   Ú
get_filterzJira.get_filter‰  s2   € ð ×$Ñ$ XÓ.ˆØ�
˜!˜I˜;Ð'ˆØ�x‰x˜‹}Ðr$   c                 óÖ   — d}d|i}t        |j                  «       «      D ]  \  }}||v sŒ|j                  ||i«       Œ | j                  d«      }|› d|› �}	| j	                  |	|¬«      S )z•
        :param filter_id: int
        :param jql: str
        :param kwargs: dict, Optional (name, description, favourite)
        :return:
        )r  r#  r=  r<  r£   rT   rV   )ræ   ÚitemsÚupdaterE   rX   )
r!   rB  r<  r   Úallowed_fieldsr&   ÚkÚvrY   r   s
             r#   Úupdate_filterzJira.update_filter“  s}   € ð >ˆØ�sˆ|ˆÜ˜Ÿ™›Ó(ò 	$‰DˆAˆqØ�NÒ"Ø—‘˜Q ˜FÕ#ð	$ð ×$Ñ$ XÓ.ˆØ�
˜!˜I˜;Ð'ˆØ�x‰x˜ $ˆxÓ'Ð'r$   c                 óT   — | j                  d«      }|› d|› �}| j                  |«      S )zd
        Deletes a filter that has the given id.
        :param filter_id:
        :return:
        r£   rT   r˜   rF  s       r#   Údelete_filterzJira.delete_filter£  s3   € ð ×$Ñ$ XÓ.ˆØ�
˜!˜I˜;Ð'ˆØ�{‰{˜3ÓÐr$   c                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )z–
        Gets share permissions of a filter.
        :param filter_id: Filter ID
        :return: Returns current share permissions of filter
        r£   rT   ú/permissionrD   rF  s       r#   Úget_filter_share_permissionsz!Jira.get_filter_share_permissions­  s4   € ð ×$Ñ$ XÓ.ˆØ�
˜!˜I˜; kÐ2ˆØ�x‰x˜‹}Ðr$   Úproject_role_idÚ	groupnameÚuser_keyÚviewÚeditc	                 ó¶   — | j                  d«      }	|	› d|› d�}
d|i}|r||d<   |r||d<   |r||d<   |r||d<   |r||d	<   |r||d
<   | j                  |
|¬«      S )a~  
        Adds share permission for a filter. See the documentation of the sharePermissions.
        :param filter_id: Filter ID
        :param type: What type of permission is granted (i.e. user, project)
        :param project_id: Project ID, relevant for type 'project' and 'projectRole'
        :param project_role_id: Project role ID, relevant for type 'projectRole'
        :param groupname: Group name, relevant for type 'group'
        :param user_key: User key, relevant for type 'user'
        :param view: Sets view permission
        :param edit: Sets edit permission
        :return: Returns updated share permissions
        r£   rT   rR  r!  r?   ÚprojectRoleIdrU  ÚuserKeyrW  rX  rV   r­   )r!   rB  r!  r8   rT  rU  rV  rW  rX  rY   r   r&   s               r#   Úadd_filter_share_permissionz Jira.add_filter_share_permission·  s�   € ð. ×$Ñ$ XÓ.ˆØ�
˜!˜I˜; kÐ2ˆØ˜d�^ˆÙØ *ˆD�ÑÙØ$3ˆD�Ñ!ÙØ )ˆD�ÑÙØ&ˆD�‰OÙØˆD�‰LÙØˆD�‰LØ�y‰y˜ 4ˆyÓ(Ð(r$   Úpermission_idc                 óZ   — | j                  d«      }|› d|› d|› �}| j                  |«      S )z™
        Removes share permission
        :param filter_id: Filter ID
        :param permission_id: Permission ID to be removed
        :return:
        r£   rT   z/permission/r˜   )r!   rB  r]  rY   r   s        r#   Údelete_filter_share_permissionz#Jira.delete_filter_share_permissionß  s9   € ð ×$Ñ$ XÓ.ˆØ�
˜!˜I˜; l°=°/ÐBˆØ�{‰{˜3ÓÐr$   ÚqueryÚexcludec                 ó„   — | j                  d«      }i }|r||d<   nd|d<   |r||d<   |r||d<   | j                  ||¬«      S )a  
        REST endpoint for searching groups in a group picker
        Returns groups with substrings matching a given query. This is mainly for use with the group picker,
        so the returned groups contain html to be used as picker suggestions. The groups are also wrapped
        in a single response object that also contains a header for use in the picker,
        specifically Showing X of Y matching groups.
        The number of groups returned is limited by the system property "jira.ajax.autocomplete.limit"
        The groups will be unique and sorted.
        :param query: str - Query of searching groups by name.
        :param exclude: str - Exclude groups from search results.
        :param limit: int
        :return: Returned even if no groups match the given substring
        zgroups/pickerr`  r?  ra  r  rC   rD   )r!   r`  ra  r¢   r   r%   s         r#   Ú
get_groupszJira.get_groupsð  s[   € ð ×Ñ Ó0ˆØˆÙØ#ˆF�7ŠOà ˆF�7‰OÙØ 'ˆF�9ÑÙØ#(ˆF�<Ñ Ø�x‰x˜ FˆxÓ+Ð+r$   c                 óR   — | j                  d«      }d|i}| j                  ||¬«      S )zu
        Create a group by given group parameter

        :param name: str
        :return: New group params
        Úgroupr  rV   r­   )r!   r  r   r&   s       r#   Úcreate_groupzJira.create_group
  s0   € ð ×Ñ Ó(ˆØ˜ˆ~ˆØ�y‰y˜ 4ˆyÓ(Ð(r$   Ú
swap_groupc                 óŽ   — t         j                  d|«       | j                  d«      }|�||dœ}nd|i}| j                  ||¬«      S )a•  
        Delete a group by given group parameter
        If you delete a group and content is restricted to that group, the content will be hidden from all users
        To prevent this, use this parameter to specify a different group to transfer the restrictions
        (comments and worklogs only) to
        :param name: str - name
        :param swap_group: str - swap group
        :return:
        zRemoving group: %s re  )rU  Ú	swapGrouprU  rC   r	  )r!   r  rg  r   r%   s        r#   Úremove_groupzJira.remove_group  sP   € ô 	�‰Ð&¨Ô-Ø×Ñ Ó(ˆØÐ!Ø#'°jÑA‰Fà! 4Ð(ˆFà�{‰{˜3 vˆ{Ó.Ð.r$   re  Úinclude_inactive_usersc                 óz   — | j                  d«      }i }|r||d<   ||d<   ||d<   ||d<   | j                  ||¬«      S )aŠ  
        Just wrapping method user group members
        :param group:
        :param include_inactive_users:
        :param start: OPTIONAL: The start point of the collection to return. Default: 0.
        :param limit: OPTIONAL: The limit of the number of users to return, this may be restricted by
                fixed system limits. Default by built-in method: 50
        :return:
        zgroup/memberrU  ÚincludeInactiveUsersr  r  rC   rD   )r!   re  rk  r  r¢   r   r%   s          r#   Úget_all_users_from_groupzJira.get_all_users_from_group(  sX   € ð ×Ñ Ó/ˆØˆÙØ"'ˆF�;ÑØ)?ˆÐ%Ñ&Ø!ˆˆyÑØ$ˆˆ|ÑØ�x‰x˜ FˆxÓ+Ð+r$   ÚusernameÚ
group_nameÚ
account_idc                 ó†   — | j                  d«      }d|i}| j                  }d|v rd|i}nd|i}| j                  |||¬«      S )ay  
        Add given user to a group

        For Jira DC/Server platform
        :param username: str
        :param group_name: str
        :return: Current state of the group

        For Jira Cloud platform
        :param account_id: str (name is no longer available for Jira Cloud platform)
        :param group_name: str
        :return: Current state of the group
        ú
group/userrU  úatlassian.netÚ	accountIdr  ©r%   r&   )rE   r   r®   )r!   ro  rp  rq  r   r%   Ú
url_domainr&   s           r#   Úadd_user_to_groupzJira.add_user_to_group=  sX   € ð  ×Ñ Ó-ˆØ# ZÐ0ˆØ—X‘Xˆ
Ø˜jÑ(Ø Ð,‰Dà˜HÐ%ˆDØ�y‰y˜ V°$ˆyÓ7Ð7r$   c                 ó®   — t         j                  d||«       | j                  d«      }| j                  }d|v r||dœ}n||dœ}| j	                  ||¬«      S )aL  
        Remove given user from a group

        For Jira DC/Server platform
        :param username: str
        :param group_name: str
        :return:

        For Jira Cloud platform
        :param account_id: str (username is no longer available for Jira Cloud platform)
        :param group_name: str
        :return:
        z"Removing user: %s from a group: %srs  rt  )rU  ru  )rU  ro  rC   )r  r  rE   r   r™   )r!   ro  rp  rq  r   rw  r%   s          r#   Úremove_user_from_groupzJira.remove_user_from_groupV  s]   € ô  	�‰Ð5°xÀÔLØ×Ñ Ó-ˆØ—X‘Xˆ
Ø˜jÑ(Ø#-¸JÑG‰Fà#-¸8ÑDˆFØ�{‰{˜3 vˆ{Ó.Ð.r$   c                 ó”   — | j                  d«      }i }|r||d<   |r||d<   |r||d<   |r||d<   |r||d<   | j                  ||¬«      S )aT  
        Returns a list of active users that match the search string. This resource cannot be accessed anonymously
        and requires the Browse Users global permission. Given an issue key this resource will provide a list of users
        that match the search string and have the browse issue permission for the issue provided.

        :param: username:
        :param: issueKey:
        :param: projectKey:
        :param: startAt: OPTIONAL
        :param: maxResults: OPTIONAL
        :return: List of active users who has browser permission for the given project_key or issue_key
        zuser/viewissue/searchro  rB   r@   r  r  rC   rD   )r!   ro  r;   r9   r  r¢   r   r%   s           r#   Ú-get_users_with_browse_permission_to_a_projectz2Jira.get_users_with_browse_permission_to_a_projecto  sn   € ð( ×ÑÐ 7Ó8ˆØˆÙØ!)ˆF�:ÑÙØ!*ˆF�:ÑÙØ#.ˆF�<Ñ ÙØ %ˆF�9ÑÙØ#(ˆF�<Ñ à�x‰x˜ FˆxÓ+Ð+r$   re   Úexpandc                 óp   — | j                  d«      }|› d|› d|› �}i }|r||d<   | j                  ||¬«      S )Nrc   rT   ú?fields=r}  rC   rD   )r!   rJ   re   r}  rY   r   r%   s          r#   rc   z
Jira.issue—  sM   € Ø×$Ñ$ WÓ-ˆØ�
˜!˜C˜5 ¨¨Ð1ˆØˆÙØ%ˆF�8ÑØ�x‰x˜ FˆxÓ+Ð+r$   Úissue_id_or_keyÚ
propertiesÚupdate_historyc                 ó  — | j                  d«      }|› d|› �}i }|�1t        |t        t        t        f«      rdj                  |«      }||d<   |�||d<   |r||d<   t        |«      j                  «       |d<   | j                  ||¬«      S )	aP  
        Returns a full representation of the issue for the given issue key
        By default, all fields are returned in this get-issue resource

        :param issue_id_or_key: str
        :param fields: str
        :param properties: str
        :param update_history: bool
        :param expand: str
        :return: issue
        rc   rT   ú,re   r�  r}  ÚupdateHistoryrC   )	rE   rã   ræ   ÚtupleÚsetr„   r.   Úlowerr1   )	r!   r€  re   r�  r‚  r}  rY   r   r%   s	            r#   rj   zJira.get_issueŸ  s¡   € ð& ×$Ñ$ WÓ-ˆØ�
˜!˜OÐ,Ð-ˆØˆàÐÜ˜&¤4¬´Ð"4Ô5ØŸ™ &Ó)�Ø%ˆF�8ÑØÐ!Ø#-ˆF�<Ñ ÙØ%ˆF�8ÑÜ"% nÓ"5×";Ñ";Ó"=ˆˆÑØ�x‰x˜ FˆxÓ+Ð+r$   Úepicc                 óv   — | j                  ddd¬«      }|› d|› d|› �}i }|r||d<   | j                  ||¬«      S )	a¢  
        Given an epic return all child issues
        By default, all fields are returned in this get-issue resource
        Cloud Software API

        :param epic: str
        :param fields: list of fields, for example: ['priority', 'summary', 'customfield_10007']
        :param expand: str: A comma-separated list of the parameters to expand.
        :returns: Issues within the epic
        :rtype: list
        r‰  z
rest/agileú1.0)Úapi_rootr   rT   z/issue?fields=r}  rC   rD   )r!   r‰  re   r}  rY   r   r%   s          r#   Úepic_issueszJira.epic_issuesÁ  sW   € ð ×$Ñ$ V°lÐPUÐ$ÓVˆØ�
˜!˜D˜6 °¨xÐ8ˆØˆÙØ%ˆF�8ÑØ�x‰x˜ FˆxÓ+Ð+r$   Ú
issue_listc                 óð  — t        j                  d«      }t        «       }t        «       }|D ]*  }t        j                  ||«      sŒ|j	                  |«       Œ, ddj                  t        |«      «      › d�}| j                  ||¬«      }|rhdt        |j                  «       «      v rM|d   D ]0  }	|D ])  }||	v sŒ|j	                  |«       |j                  |«       Œ+ Œ2 | j                  ||«      \  }}||fS )zQ
        :param fields:
        :param list issue_list:
        :return:
        z\w+-\d+zkey in (z, ú)ry   ÚerrorMessages)ÚreÚcompileræ   Úmatchrk   r„   r‡  r<  ÚkeysÚremoveÚ
bulk_issue)
r!   rŽ  re   Újira_issue_regexÚmissing_issuesÚmatched_issue_keysrJ   r<  Úquery_resultÚmessages
             r#   r—  zJira.bulk_issueÔ  s   € ô Ÿ:™: jÓ1ÐÜ›ˆÜ!›VÐØò 	/ˆCÜ�x‰xÐ(¨#Õ.Ø"×)Ñ)¨#Õ.ð	/ð ˜Ÿ™¤3Ð'9Ó#:Ó;Ð<¸AÐ>ˆØ—x‘x ¨F�xÓ3ˆÙ˜O¬t°L×4EÑ4EÓ4GÓ/HÑHØ'¨Ñ8ò /�Ø%ò /�CØ˜g’~Ø&×-Ñ-¨cÔ2Ø"×)Ñ)¨#Õ.ñ/ð/ð
 ,0¯?©?¸:ÀvÓ+NÑ(ˆL˜.Ø˜^Ð+Ð+r$   Úprojectc                 ó†   — t        dt        d¬«       i }|r||d<   | j                  d|› �«      }| j                  ||¬«      S )z·
        This function is deprecated.
        See https://confluence.atlassian.com/jiracore/createmeta-rest-endpoint-to-be-removed-975040986.html
        for further details.
        zmThis function will fail from Jira 9+. Use issue_createmeta_issuetypes or issue_createmeta_fieldtypes instead.r.  )Ú
stacklevelr}  zissue/createmeta?projectKeys=rC   )r
   ÚDeprecationWarningrE   r1   )r!   r�  r}  r%   r   s        r#   Úissue_createmetazJira.issue_createmetaë  sW   € ô 	ðVäØõ		
ð ˆÙØ%ˆF�8ÑØ×ÑÐ"?À¸yÐ IÓJˆØ�x‰x˜ FˆxÓ+Ð+r$   c                 ór   — | j                  d|› d�«      }i }|r||d<   |r||d<   | j                  ||¬«      S )aJ  
        Get create metadata issue types for a project
        Returns a page of issue type metadata for a specified project.
        Use the information to populate the requests in Create issue and Create issues.
        :param project:
        :param start: default: 0
        :param limit: default: 50
        :return:
        úissue/createmeta/z/issuetypesr  r  rC   rD   )r!   r�  r  r¢   r   r%   s         r#   Úissue_createmeta_issuetypesz Jira.issue_createmeta_issuetypesý  sP   € ð ×ÑÐ"3°G°9¸KÐ HÓIˆØˆÙØ %ˆF�9ÑÙØ#(ˆF�<Ñ Ø�x‰x˜ FˆxÓ+Ð+r$   Úissue_type_idc                 óv   — | j                  d|› d|› �«      }i }|r||d<   |r||d<   | j                  ||¬«      S )a´  
        Get create field metadata for a project and issue type id
        Returns a page of field metadata for a specified project and issuetype id.
        Use the information to populate the requests in Create issue and Create issues.
        This operation can be accessed anonymously.
        :param project:
        :param issue_type_id:
        :param start: default: 0
        :param limit: default: 50
        :return:
        r£  z/issuetypes/r  r  rC   rD   )r!   r�  r¥  r  r¢   r   r%   s          r#   Úissue_createmeta_fieldtypesz Jira.issue_createmeta_fieldtypes  sT   € ð ×ÑÐ"3°G°9¸LÈÈÐ XÓYˆØˆÙØ %ˆF�9ÑÙØ#(ˆF�<Ñ Ø�x‰x˜ FˆxÓ+Ð+r$   c                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )Nrc   rT   z	/editmetarD   ©r!   rJ   rY   r   s       r#   Úissue_editmetazJira.issue_editmeta%  s2   € Ø×$Ñ$ WÓ-ˆØ�
˜!˜C˜5 	Ð*ˆØ�x‰x˜‹}Ðr$   c                 óÎ   — | j                  d«      }i }|r||d<   |r||d<   | j                  r|› d|› d�}| j                  ||¬«      S |› d|› d�}| j                  |d|fg¬	«      S )
z½
        Get issue related change log
        :param issue_key:
        :param start: start index, usually 0
        :param limit: limit of the results, usually 50
        :return:
        rc   r  r  rT   z
/changelogrC   z?expand=changelogÚ	changelogry   )rE   r0   r1   Ú_get_response_content)r!   r;   r  r¢   rY   r%   r   s          r#   Úget_issue_changelogzJira.get_issue_changelog*  s�   € ð ×$Ñ$ WÓ-ˆØˆÙØ %ˆF�9ÑÙØ#(ˆF�<Ñ à�:Š:Ø�J˜a 	˜{¨*Ð5ˆCØ—8‘8˜C¨�8Ó/Ð/à�J˜a 	˜{Ð*;Ð<ˆCØ×-Ñ-¨c¸KÈÐ;PÐ:QÐ-ÓRÐRr$   Úworklogc                 óZ   — | j                  d«      }|› d|› d�}| j                  ||¬«      S )zG

        :param key:
        :param worklog:
        :return:
        rc   rT   ú/worklogrV   r­   )r!   rJ   r¯  rY   r   s        r#   Úissue_add_json_worklogzJira.issue_add_json_worklog@  s9   € ð ×$Ñ$ WÓ-ˆØ�
˜!˜C˜5 Ð)ˆØ�y‰y˜ 7ˆyÓ+Ð+r$   ÚstartedÚtime_secrá   c                 ó@   — ||dœ}|r||d<   | j                  ||¬«      S )z°
        :param key:
        :param time_sec: int: second
        :param started: str: format ``%Y-%m-%dT%H:%M:%S.000+0000%z``
        :param comment:
        :return:
        )r³  ÚtimeSpentSecondsrá   )rJ   r¯  )r²  )r!   rJ   r³  r´  rá   r&   s         r#   Úissue_worklogzJira.issue_worklogK  s0   € ð #¸ÑAˆÙØ%ˆD�‰OØ×*Ñ*¨s¸DÐ*ÓAÐAr$   c                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )zÁ
        Returns all work logs for an issue.
        Note: Work logs won't be returned if the Log work field is hidden for the project.
        :param issue_id_or_key:
        :return:
        rc   rT   r±  rD   ©r!   r€  rY   r   s       r#   Úissue_get_worklogzJira.issue_get_worklogX  s5   € ð ×$Ñ$ WÓ-ˆØ�
˜!˜OÐ,¨HÐ5ˆà�x‰x˜‹}Ðr$   Únotify_usersc                 ól   — i }|�||d<   | j                  d«      }|› d|› d�}| j                  ||¬«      S )a  
        Archives an issue.
        :param issue_id_or_key: Issue id or issue key
        :param notify_users: shall users be notified by Jira about archival?
                             The default value of None will apply the default behavior of Jira
        :return:
        ÚnotifyUsersrc   rT   ú/archiverC   rW   )r!   r€  r»  r%   rY   r   s         r#   Úissue_archivezJira.issue_archived  sO   € ð ˆØÐ#Ø$0ˆF�=Ñ!Ø×$Ñ$ WÓ-ˆØ�
˜!˜OÐ,¨HÐ5ˆØ�x‰x˜ FˆxÓ+Ð+r$   c                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )zt
        Restores an archived issue.
        :param issue_id_or_key: Issue id or issue key
        :return:
        rc   rT   z/restorerW   r¹  s       r#   Úissue_restorezJira.issue_restores  s5   € ð ×$Ñ$ WÓ-ˆØ�
˜!˜OÐ,¨HÐ5ˆØ�x‰x˜‹}Ðr$   r  c                 ól   — | j                  d«      }| j                  |› d|› d|› �«      }|r|d   |   S y )Nrc   rT   r  re   rD   )r!   rJ   r  rY   rc   s        r#   Úissue_field_valuezJira.issue_field_value}  sH   € Ø×$Ñ$ WÓ-ˆØ—‘˜H˜: Q s e¨8°E°7Ð;Ó<ˆÙØ˜‘? 5Ñ)Ð)ð r$   c                 ó`   — | j                  d«      }| j                  |› d|› �«      }|r|d   S y )Nrc   rT   re   rD   )r!   rJ   rY   rc   s       r#   Úissue_fieldszJira.issue_fieldsƒ  s=   € Ø×$Ñ$ WÓ-ˆØ—‘˜H˜: Q s eÐ,Ó-ˆÙØ˜‘?Ð"ð r$   c                 ój   — | j                  d«      }d|rdndi}| j                  |› d|› �d|i|¬«      S )a(  
        Update an issue's fields.
        :param key: str Issue id or issye key
        :param fields: dict with target fields as keys and new contents as values
        :param notify_users: bool OPTIONAL if True, use project's default notification scheme to notify users via email.
                                           if False, do not send any email notifications. (only works with admin privilege)

        Reference: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-put
        rc   r½  r@  r3  rT   re   ©r&   r%   rW   )r!   rJ   re   r»  rY   r%   s         r#   Úupdate_issue_fieldzJira.update_issue_field‰  sQ   € ð ×$Ñ$ WÓ-ˆØ%±¡vÀ7ÐKˆØ�x‰xØˆj˜˜#˜ÐØ˜FÐ#Øð ó 
ð 	
r$   Úkey_listc                 óÂ   — | j                  d«      }	 |D ]  }| j                  |› d|› �d|i¬«       Œ 	 y# t        $ r}t        j	                  |«       Y d}~yd}~ww xY w)z¦
        :param key_list: list of issues with common filed to be updated
        :param fields: common fields to be updated
        return Boolean True/False
        rc   rT   re   rV   NFT)rE   rX   r�   r  Úerror)r!   rÉ  re   rY   rJ   r’   s         r#   Úbulk_update_issue_fieldzJira.bulk_update_issue_field›  st   € ð ×$Ñ$ WÓ-ˆð	Øò �Ø—‘Ø�j  # Ð'Ø" FÐ+ð õ ñð øô ò 	Ü�I‰I�aŒLÜûð	ús   “!6 ¶	A¿AÁAc                 ó²   — | j                  d«      }d|rdndi}| j                  ||¬«      }|r||gz   }n|g}|› |i}	| j                  |› d|› �d|	i|¬«      S )	aï  
        Add value to a multiple value field

        :param issue_id_or_key: str Issue id or issue key
        :param field: str Field key ("customfield_10000")
        :param value: str A value which need to append (use python value types)
        :param notify_users: bool OPTIONAL if True, use project's default notification scheme to notify users via email.
                                           if False, do not send any email notifications. (only works with admin privilege)
        rc   r½  TF)rJ   r  rT   re   rÇ  )rE   rÃ  rX   )
r!   r€  r  r5   r»  rY   r%   Úcurrent_valueÚ	new_valuere   s
             r#   Úissue_field_value_appendzJira.issue_field_value_append­  s‰   € ð ×$Ñ$ WÓ-ˆØ%©|¡tÀÐGˆØ×.Ñ.°?È%Ð.ÓPˆáØ%¨¨Ñ/‰Ià˜ˆIà�G˜iÐ(ˆà�x‰xØˆj˜˜/Ð*Ð+Ø˜FÐ#Øð ó 
ð 	
r$   c                 ó˜   — | j                  d«      }|› d|› d�}| j                  r| j                  |«      S | j                  |ddg¬«      S )zN
        Get issue labels.
        :param issue_key:
        :return:
        rc   rT   z?fields=labelsry   )Úlabels)rE   rÐ   r1   r­  ©r!   r;   rY   r   s       r#   Úget_issue_labelszJira.get_issue_labelsÈ  sX   € ð ×$Ñ$ WÓ-ˆØ�
˜!˜I˜; nÐ5ˆØ×ÒØ—8‘8˜C“=Ð Ø×)Ñ)¨#°{ÀKÐ6PÐ)ÓQÐQr$   rJ  c                 ó2   — d|› �}| j                  ||¬«      S )z“
        :param issue_key: the issue to update
        :param update: the update to make
        :return: True if successful, False if not
        z/rest/api/2/issue/rV   ©rX   )r!   r;   rJ  Úendpoints       r#   Úupdate_issuezJira.update_issueÔ  s#   € ð (¨	 {Ð3ˆØ�x‰x˜ vˆxÓ.Ð.r$   rÒ  c                 óZ   — |D �cg c]  }d|i‘Œ }}| j                  |dd|ii«      S c c}w )z’
        :param issue_key: the issue to update
        :param labels: the labels to add
        :return: True if successful, False if not
        ÚaddrJ  rÒ  ©rØ  ©r!   r;   rÒ  Úlabels       r#   Úlabel_issuezJira.label_issueÝ  s=   € ð /5Ö5 U�5˜%’.Ð5ˆÐ5Ø× Ñ  ¨X¸À&Ð7IÐ,JÓKÐKùò 6ó   …(c                 óZ   — |D �cg c]  }d|i‘Œ }}| j                  |dd|ii«      S c c}w )z•
        :param issue_key: the issue to update
        :param labels: the labels to remove
        :return: True if successful, False if not
        r–  rJ  rÒ  rÛ  rÜ  s       r#   Úunlabel_issuezJira.unlabel_issueæ  s>   € ð 28Ö8¨�8˜UÒ#Ð8ˆÐ8Ø× Ñ  ¨X¸À&Ð7IÐ,JÓKÐKùò 9rß  rg   c                 ój   — t        |d«      5 }| j                  ||«      cddd«       S # 1 sw Y   yxY w)z�
        Add attachment to Issue
        :param issue_key: str
        :param filename: str, name, if file in current directory or full path to file
        ÚrbN)rˆ   Úadd_attachment_object)r!   r;   rg   rf   s       r#   Úadd_attachmentzJira.add_attachmentï  s9   € ô �(˜DÓ!ð 	E ZØ×-Ñ-¨i¸ÓD÷	E÷ 	Eò 	Eús   �)©2rf   c                 óÖ   — t         j                  d|«       | j                  d«      }|› d|› d�}|rd|i}nt         j                  d«       y| j	                  || j
                  |¬«      S )	zl
        Add attachment to Issue
        :param issue_key: str
        :param attachment: IO Object
        zAdding attachment:  %src   rT   z/attachmentsÚfilezEmpty attachmentN)ÚheadersÚfiles)r  r  rE   rË  r®   Úno_check_headers)r!   r;   rf   rY   r   ré  s         r#   rä  zJira.add_attachment_objectø  sm   € ô 	�‰Ð)¨:Ô6Ø×$Ñ$ WÓ-ˆØ�
˜!˜I˜; lÐ3ˆÙØ˜ZÐ(‰Eä�I‰IÐ(Ô)ØØ�y‰y˜ d×&;Ñ&;À5ˆyÓIÐIr$   c                 ó6  — | j                   }d| _         	 t        d| j                  |d¬«      «      }|j                  dk(  rt        j                  d|«       	 || _         y|j                  «        t        j                  d|«       	 || _         y# || _         w xY w)	NTr   ú*nonery   é”  zIssue "%s" does not existsFzIssue "%s" exists)rÐ   r	   rc   Ústatus_coder  r  Úraise_for_status)r!   r;   Úoriginal_valueÚresps       r#   Úissue_existszJira.issue_exists  sŽ   € Ø×+Ñ+ˆØ!ˆÔð		0Ü˜
 D§J¡J¨yÀ JÓ$IÓJˆDØ×Ñ 3Ò&Ü—‘Ð5°yÔAØð
 "0ˆDÕð	 ×!Ñ!Ô#Ü�H‰HÐ(¨)Ô4Øà!/ˆDÕø ˆDÕús   •AB Á &B Â	Bc                 óŒ   — | j                  |«      }|rt        j                  d|«       | S t        j                  d|«       | S )NzIssue "%s" is not deletedzIssue "%s" is deleted)rò  r  r  )r!   r;   Úexistss      r#   Úissue_deletedzJira.issue_deleted  sG   € Ø×"Ñ" 9Ó-ˆÙÜ�H‰HÐ0°)Ô<ð ˆzÐô �H‰HÐ,¨iÔ8ØˆzÐr$   Údelete_subtasksc                 ó¦   — | j                  d«      }|› d|› �}i }|du rd|d<   nd|d<   t        j                  d|«       | j                  ||¬«      S )	a%  
        Delete an issue
        If the issue has subtasks you must set the parameter delete_subtasks = True to delete the issue
        You cannot delete an issue without its subtasks also being deleted
        :param issue_id_or_key:
        :param delete_subtasks:
        :return:
        rc   rT   Tr@  ÚdeleteSubtasksr3  zRemoving issue %s...rC   )rE   r  r  r™   )r!   r€  rö  rY   r   r%   s         r#   Údelete_issuezJira.delete_issue  sj   € ð ×$Ñ$ WÓ-ˆØ�
˜!˜OÐ,Ð-ˆØˆà˜dÑ"Ø'-ˆFÐ#Ò$à'.ˆFÐ#Ñ$ä�‰Ð'¨Ô9à�{‰{˜3 vˆ{Ó.Ð.r$   Úhistory_metadatac                 ó>  — t         j                  d|› d|› d|› d|› d|› d�«       | j                  d«      }|› d|› �}||xs i |xs i |xs g dœ}	|	j                  «       D �
�ci c]  \  }
}|sŒ	|
|“Œ }	}
}|d	u rd
|	d<   nd|	d<   | j	                  ||	¬«      S c c}}
w )as  
         Updates a Jira issue with specified fields, updates, history metadata, and properties.


        :param issue_key: The key or ID of the issue to update.
        :param fields: A dictionary containing field updates.
        :param update: A dictionary containing advanced updates (e.g., add/remove operations for labels).
        :param history_metadata: Metadata for tracking the history of changes.
        :param properties: A list of properties to add or update on the issue.
        :param notify_users: Whether to notify users of the update. default: True
        :return: Response from the PUT request.
        zUpdating issue "z" with "z", "z", and "ú"rc   rT   )re   rJ  ÚhistoryMetadatar�  Tr@  r½  r3  rV   )r  r  rE   rI  rX   )r!   r;   re   rJ  rú  r�  r»  rY   r   r%   rJ   r5   s               r#   Úissue_updatezJira.issue_update6  sÓ   € ô* 	�‰Ð# I ;¨h°v°h¸dÀ6À(È$ÐO_ÐN`Ð`hÐisÐhtÐtuÐvÔwà×$Ñ$ WÓ-ˆØ�
˜!˜I˜;Ð'ˆàØ’l Ø/Ò5°2Ø$Ò*¨ñ	
ˆð 06¯|©|«~×G¡  eÂ�#�u‘*ÐGˆÑGØ˜4ÑØ$*ˆF�=Ò!à$+ˆF�=Ñ!Ø�x‰x˜ &ˆxÓ)Ð)ùó Hs   Á$
BÁ/Bc                 ó„   — | j                  d«      }|› d|› �}i }d|i}|du rd|d<   nd|d<   | j                  |||¬«      S )	a@  
        Edits an issue fields from a JSON representation
        The issue can either be updated by setting explicit the field
        value(s) or by using an operation to change the field value

        :param issue_id_or_key: str
        :param fields: JSON
        :param notify_users: bool
        :return:
        rc   rT   rJ  Tr@  r½  r3  rÇ  rW   )r!   r€  re   r»  rY   r   r%   r&   s           r#   Ú
edit_issuezJira.edit_issue^  se   € ð ×$Ñ$ WÓ-ˆØ�
˜!˜OÐ,Ð-ˆØˆØ˜&Ð!ˆà˜4ÑØ$*ˆF�=Ò!à$+ˆF�=Ñ!Ø�x‰x˜ $¨vˆxÓ6Ð6r$   c                 óˆ   — t         j                  d||«       |}| j                  d«      }| j                  |› d|› d�|¬«      S )zf
        Start watching issue
        :param issue_key:
        :param user:
        :return:
        zAdding user %s to "%s" watchersrc   rT   ú	/watchersrV   r  )r!   r;   r°   r&   rY   s        r#   Úissue_add_watcherzJira.issue_add_watchert  sS   € ô 	�‰Ð2°D¸)ÔDØˆØ×$Ñ$ WÓ-ˆØ�y‰yØˆj˜˜)˜ IÐ.Øð ó 
ð 	
r$   c                 ó²   — t         j                  d||«       | j                  d«      }i }| j                  rd|i}nd|i}| j	                  |› d|› d�|¬«      S )ze
        Stop watching issue
        :param issue_key:
        :param user:
        :return:
        z#Deleting user %s from "%s" watchersrc   ru  ro  rT   r  rC   )r  r  rE   r0   r™   )r!   r;   r°   rq  rY   r%   s         r#   Úissue_delete_watcherzJira.issue_delete_watcherƒ  sn   € ô 	�‰Ð6¸¸iÔHØ×$Ñ$ WÓ-ˆØˆØ�:Š:Ø! :Ð.‰Fà  $Ð'ˆFØ�{‰{Øˆj˜˜)˜ IÐ.Øð ó 
ð 	
r$   c                 óR   — | j                  d«      }| j                  |› d|› d�«      S )z�
        Get watchers for an issue
        :param issue_key: Issue ID or Key
        :return: List of watchers for issue
        rc   rT   r  rD   )r!   r;   rY   s      r#   Úissue_get_watcherszJira.issue_get_watchers–  s0   € ð ×$Ñ$ WÓ-ˆØ�x‰x˜8˜* A i [°	Ð:Ó;Ð;r$   c                 ó„   — | j                  d«      }|› d|› d�}| j                  rd|i}nd|i}| j                  ||¬«      S )a�  Assign an issue to a user. None will set it to unassigned. -1 will set it to Automatic.
        :param issue : the issue ID or key to assign
        :type issue: int or str
        :param account_id: the account ID of the user to assign the issue to;
                for jira server the value for account_id should be a valid jira username
        :type account_id: str
        :rtype: bool
        rc   rT   z	/assigneeru  r  rV   ©rE   r0   rX   )r!   rc   rq  rY   r   r&   s         r#   Úassign_issuezJira.assign_issueŸ  sT   € ð ×$Ñ$ WÓ-ˆØ�
˜!˜E˜7 )Ð,ˆØ�:Š:Ø Ð,‰Dà˜JÐ'ˆDØ�x‰x˜ $ˆxÓ'Ð'r$   c                 ó„   — | j                  d«      }d|i}|r||d<   i }|du rd|d<   nd|d<   | j                  |||¬«      S )	a  
        Creates an issue or a sub-task from a JSON representation
        :param fields: JSON data
                mandatory keys are issuetype, summary and project
        :param update: JSON data
                Use it to link issues or update worklog
        :param update_history: bool (if true then the user's project history is updated)
        :return:
            example:
                fields = dict(summary='Into The Night',
                              project = dict(key='APA'),
                              issuetype = dict(name='Story')
                              )
                update = dict(issuelinks={
                    "add": {
                        "type": {
                            "name": "Child-Issue"
                            },
                        "inwardIssue": {
                            "key": "ISSUE-KEY"
                            }
                        }
                    }
                )
                jira.create_issue(fields=fields, update=update)
        rc   re   rJ  Tr@  r…  r3  rv  r­   )r!   re   r‚  rJ  r   r&   r%   s          r#   Úcreate_issuezJira.create_issue°  s`   € ð6 ×Ñ Ó(ˆØ˜&Ð!ˆÙØ#ˆD�‰NØˆà˜TÑ!Ø&,ˆF�?Ò#à&-ˆF�?Ñ#Ø�y‰y˜ V°$ˆyÓ7Ð7r$   Úlist_of_issues_datac                 óR   — | j                  d«      }d|i}| j                  ||¬«      S )zÁ
        Creates issues or sub-tasks from a JSON representation
        Creates many issues in one bulk operation
        :param list_of_issues_data: list of JSON data
        :return:
        z
issue/bulkÚissueUpdatesrV   r­   )r!   r  r   r&   s       r#   Úcreate_issueszJira.create_issues×  s2   € ð ×Ñ Ó-ˆØÐ 3Ð4ˆØ�y‰y˜ 4ˆyÓ(Ð(r$   c                 ó€   — t         j                  d|d   «       | j                  d«      }| j                  |d|i¬«      S )NzCreating issue "%s"Úsummaryrc   re   rV   r  )r!   re   r   s      r#   Úissue_createzJira.issue_createã  s>   € Ü�‰Ð&¨¨yÑ(9Ô:Ø×Ñ Ó(ˆØ�y‰y˜ H¨fÐ#5ˆyÓ6Ð6r$   c                 ó€  — |j                  dd «      }|r| j                  |«      s8t        j                  d«       |j	                  dd «       | j                  |«      S | j                  |«      rt        j                  d|«       y t        j                  d|«       |j	                  dd «       | j                  ||«      S )NÚissuekeyz[IssueKey is not provided or does not exists in destination. Will attempt to create an issuezIssue "%s" deleted, skippingzIssue "%s" exists, will update)	r1   rò  r  r  Úpopr  rõ  Úwarningrþ  )r!   re   r;   s      r#   Úissue_create_or_updatezJira.issue_create_or_updateè  sž   € Ø—J‘J˜z¨4Ó0ˆ	á × 1Ñ 1°)Ô <Ü�H‰HÐrÔsØ�J‰J�z 4Ô(Ø×$Ñ$ VÓ,Ð,à×Ñ˜iÔ(Ü�K‰KÐ6¸	ÔBØä�‰Ð1°9Ô=Ø�
‰
�:˜tÔ$Ø× Ñ  ¨FÓ3Ð3r$   Ú
visibilityc                 óp   — | j                  d«      }|› d|› d�}d|i}|r||d<   | j                  ||¬«      S )z”
        Add comment into Jira issue
        :param issue_key:
        :param comment:
        :param visibility: OPTIONAL
        :return:
        rc   rT   rÝ   Úbodyr  rV   r­   )r!   r;   rá   r  rY   r   r&   s          r#   Úissue_add_commentzJira.issue_add_commentø  sP   € ð ×$Ñ$ WÓ-ˆØ�
˜!˜I˜; hÐ/ˆØ˜gÐ&ˆÙØ!+ˆD�ÑØ�y‰y˜ 4ˆyÓ(Ð(r$   c                 ó†   — | j                  d«      }|› d|› d|› �}d|i}|r||d<   d|rdndi}	| j                  |||	¬	«      S )
zæ
        Updates an existing comment
        :param issue_key: str
        :param comment_id: int
        :param comment: str
        :param visibility: OPTIONAL
        :param notify_users: bool OPTIONAL
        :return:
        rc   rT   rë   r  r  r½  r@  r3  rÇ  rW   )
r!   r;   ré   rá   r  r»  rY   r   r&   r%   s
             r#   Úissue_edit_commentzJira.issue_edit_comment  sd   € ð" ×$Ñ$ WÓ-ˆØ�
˜!˜I˜; i°
¨|Ð<ˆØ˜gÐ&ˆÙØ!+ˆD�ÑØ%±¡vÀ7ÐKˆØ�x‰x˜ $¨vˆxÓ6Ð6r$   Úregexc                 ó>  — g }| j                  |«      }|d   d   }|d   d   d   }	 |�—t        j                  ||«      D �cg c]  }|j                  d«      ‘Œ }}|r|j	                  |«       |D ]M  }	|	d   }
t        j                  ||
«      D �cg c]  }|j                  d«      ‘Œ }}|sŒ=|j	                  |«       ŒO |S c c}w c c}w # t
        $ rF}|j                  j                  dk(  r#t        j                  d	|«       t        d
|¬«      ‚Y d}~yd}~ww xY w)a  
        This function scrapes the output of the given regex matches from the issue's description and comments.

        Parameters:
        issue (str): jira issue ide.
        regex (str): The regex to match.

        Returns:
        list: A list of matches.
        re   r#  rá   ÚcommentsNr   r  rí  zcouldn't find issue: zjThere is no content with the given issue ud,or the calling user does not have permission to view the issue©rw   )rj   r’  Úfinditerre  Úextendr   r4   rî  r  rË  r   )r!   rc   r  Úregex_outputÚissue_outputr#  r!  ÚxÚdescription_matchesrá   Úcomment_htmlÚcomment_matchesr’   s                r#   Úscrap_regex_from_issuezJira.scrap_regex_from_issue   s/  € ð ˆØ—~‘~ eÓ,ˆØ" 8Ñ,¨]Ñ;ˆØ Ñ)¨)Ñ4°ZÑ@ˆð	ØÐ&Ü;=¿;¹;ÀuÈkÓ;ZÖ&[°a q§w¡w¨q¥zÐ&[Ð#Ð&[Ù&Ø ×'Ñ'Ð(;Ô<à'ò =�GØ#*¨6¡?�LÜ;=¿;¹;ÀuÈlÓ;[Ö&\°a q§w¡w¨q¥zÐ&\�OÐ&\Ú&Ø$×+Ñ+¨OÕ<ð	=ð  Ðùò '\ùò ']øô
 ò 	Ø�z‰z×%Ñ%¨Ò,ä—	‘	Ð1°5Ô9Ü&ðUàôð ô -ûð	ús;   ¨C ÁCÁ7C ÂCÂ)C Â.C Ã
C Ã	DÃ<DÄDÚ	global_idÚinternal_idc                 ó(   — | j                  |||«      S )zK
        Compatibility naming method with get_issue_remote_links()
        )Úget_issue_remote_links)r!   r;   r,  r-  s       r#   Úget_issue_remotelinkszJira.get_issue_remotelinksG  s   € ð ×*Ñ*¨9°iÀÓMÐMr$   c                 ó€   — | j                  d«      }|› d|› d�}i }|r||d<   |r|d|z   z  }| j                  ||¬«      S )zë
        Finding all Remote Links on an issue, also with filtering by Global ID and internal ID
        :param issue_key:
        :param global_id: str - Global ID
        :param internal_id: str - internal ID
        :return:
        rc   rT   ú/remotelinkÚglobalIdrC   rD   )r!   r;   r,  r-  rY   r   r%   s          r#   r/  zJira.get_issue_remote_linksO  s]   € ð ×$Ñ$ WÓ-ˆØ�
˜!˜I˜; kÐ2ˆØˆÙØ!*ˆF�:ÑÙØ�3˜Ñ$Ñ$ˆCØ�x‰x˜ FˆxÓ+Ð+r$   ÚtreeÚdepthc           	      ó’  — |€g }|€d}|dkD  rt        d«      ‚| j                  |«      }|d   d   }|d   d   }|D ]�  }|j                  d«      €Œ|d   }|D �	cg c]&  }	|d   d   t        |	j	                  «       «      v sŒ%|	‘Œ( c}	rŒM|j                  ||d   d   i«       | j                  |d   d   ||d	z   «       Œƒ |D ]x  }
|
j                  d«      €Œ|d   }|D �	cg c]#  }	|
d   t        |	j	                  «       «      v sŒ"|	‘Œ% c}	rŒJ|j                  ||
d   i«       | j                  |
d   ||d	z   «       Œz |S c c}	w c c}	w )
a`  
        Returns a list that contains the tree structure of the root issue, with all subtasks and inward linked issues.
        (!) Function only returns child issues from the same Jira instance or from an instance to which the API key has access.
        :param issue_key: Jira issue key
        :param tree: list to store the tree structure for recursion. Do not change it.
        :param depth: current depth of the tree for recursion. Do not change it.
        :return: list of dictionaries containing the tree structure. Dictionary element contains a key (parent issue) and value (child issue).
        r   é–   zRecursion depth exceededre   Ú
issuelinksÚsubtasksÚinwardIssuerJ   r   )r�   rj   r1   ræ   r•  rk   Úget_issue_tree_recursive)r!   r;   r4  r5  rc   Úissue_linksr9  Ú
issue_linkÚparent_issue_keyr'  Úsubtasks              r#   r;  zJira.get_issue_tree_recursiveb  s‚  € ð ˆ<ØˆDØˆ=ØˆEà�3Š;ÜÐ6Ó7Ð7Ø—‘˜yÓ)ˆØ˜H‘o lÑ3ˆØ˜‘? :Ñ.ˆØ%ò 		ˆJØ�~‰~˜mÓ,Ñ8Ø#(¨¡<Ð à#öØ z°-Ñ'@ÀÑ'GÌ4ÐPQ×PVÑPVÓPXË>Ò'Y’Aôð —K‘KÐ!1°:¸mÑ3LÈUÑ3SÐ TÔUØ×1Ñ1Ø" =Ñ1°%Ñ8¸$ÀÈÁ	õð		ð  ò 	SˆGØ�{‰{˜5Ó!Ñ-Ø#(¨¡<Ð Ø#'ÖL˜a¨7°5©>¼TÀ!Ç&Á&Ã(»^Ò+KšÔLØ—K‘KÐ!1°7¸5±>Ð BÔCØ×1Ñ1°'¸%±.À$ÈÐPQÉ	ÕRð	Sð ˆùòùò Ms   Á&D?ÂD?Ã #EÄEÚlink_urlÚtitleÚrelationshipÚicon_urlÚ
icon_titleÚstatus_resolvedÚapplicationc
                 óÐ   — | j                  d«      }
|
› d|› d�}d||d|idœi}|r||d<   |r||d<   |s|ri }|r||d	<   |r||d
<   ||d   d<   |	r|	|d<   | j                  ||¬«      S )aõ  
        Add Remote Link to Issue, update url if global_id is passed
        :param issue_key: str - issue key
        :param link_url: str - url of the link
        :param title: str - title of the link
        :param global_id: str, OPTIONAL:
        :param relationship: str, OPTIONAL: Default by built-in method: 'Web Link'
        :param icon_url: str, OPTIONAL: Link to a 16x16 icon representing the type of the object in the remote system
        :param icon_title: str, OPTIONAL: Text for the tooltip of the main icon describing the type of the object in the remote system
        :param status_resolved: bool, OPTIONAL: if set to True, Jira renders the link strikethrough
        :param application: dict, OPTIONAL: Application description
        rc   rT   r2  ÚobjectÚresolved)r   rA  Ústatusr3  rB  Úurl16x16rA  ÚiconrF  rV   r­   )r!   r;   r@  rA  r,  rB  rC  rD  rE  rF  rY   r   r&   Ú	icon_datas                 r#   Ú#create_or_update_issue_remote_linksz(Jira.create_or_update_issue_remote_links‡  s©   € ð0 ×$Ñ$ WÓ-ˆØ�
˜!˜I˜; kÐ2ˆØ¨¸5ÈZÐYhÐLiÑ jÐkˆÙØ(ˆD�ÑÙØ#/ˆD�Ñ Ù‘zØˆIÙØ(0�	˜*Ñ%ÙØ%/�	˜'Ñ"Ø%.ˆD�‰N˜6Ñ"ÙØ"-ˆD�ÑØ�y‰y˜ 4ˆyÓ(Ð(r$   Úlink_idc                 óZ   — | j                  d«      }|› d|› d|› �}| j                  |«      S )Nrc   rT   ú/remotelink/rD   ©r!   r;   rO  rY   r   s        r#   Úget_issue_remote_link_by_idz Jira.get_issue_remote_link_by_id±  s6   € Ø×$Ñ$ WÓ-ˆØ�
˜!˜I˜; l°7°)Ð<ˆØ�x‰x˜‹}Ðr$   c                 óˆ   — d||dœi}|r||d<   |r||d<   | j                  d«      }|› d|› d|› �}| j                  ||¬«      S )	a  
        Update existing Remote Link on Issue
        :param issue_key: str
        :param link_id: str
        :param url: str
        :param title: str
        :param global_id: str, OPTIONAL:
        :param relationship: str, Optional. Default by built-in method: 'Web Link'

        rH  )r   rA  r3  rB  rc   rT   rQ  rV   rW   )	r!   r;   rO  r   rA  r,  rB  r&   rY   s	            r#   Úupdate_issue_remote_link_by_idz#Jira.update_issue_remote_link_by_id¶  sf   € ð& ¨°eÑ <Ð=ˆÙØ(ˆD�ÑÙØ#/ˆD�Ñ Ø×$Ñ$ WÓ-ˆØ�
˜!˜I˜; l°7°)Ð<ˆØ�x‰x˜ $ˆxÓ'Ð'r$   c                 óZ   — | j                  d«      }|› d|› d|› �}| j                  |«      S )zh
        Deletes Remote Link on Issue
        :param issue_key: str
        :param link_id: str
        rc   rT   rQ  r˜   rR  s        r#   Údelete_issue_remote_link_by_idz#Jira.delete_issue_remote_link_by_idÒ  s9   € ð ×$Ñ$ WÓ-ˆØ�
˜!˜I˜; l°7°)Ð<ˆØ�{‰{˜3ÓÐr$   c                 ó2  — | j                   r0t        d| j                  |«      «      }|j                  «       xs i }n| j                  |«      xs i }t        d|j	                  d«      «      D �cg c]  }|d   t        |d   «      |d   d   dœ‘Œ c}S c c}w )Nr   z
List[dict]Útransitionsr  rU   r¨   )r  rU   r¨   )rÐ   r	   Úget_issue_transitions_fullÚjsonr1   rä   )r!   r;   rñ  ÚdÚ
transitions        r#   Úget_issue_transitionszJira.get_issue_transitionsÜ  sŸ   € Ø×ÒÜ˜
 D×$CÑ$CÀIÓ$NÓOˆDØ!%§¡£Ò!2°‰Aà×/Ñ/°	Ó:Ò@¸bˆAô # <°·±°}Ó1EÓFö
ð ð	 # 6Ñ*Ü˜* TÑ*Ó+Ø  Ñ& vÑ.óò
ð 	
ùò 
s   Á/"BrJ  c                 ó&   — | j                  ||«      S r{   )Úset_issue_status)r!   r;   rJ  s      r#   Úissue_transitionzJira.issue_transitionì  s   € Ø×$Ñ$ Y°Ó7Ð7r$   Ústatus_namec                 ó¦   — | j                  d«      }|› d|› d�}| j                  ||«      }dd|ii}|�||d<   |�||d<   | j                  ||¬«      S )	a�  
        Setting status by status_name. Field defaults to None for transitions without mandatory fields.
        If there are mandatory fields for the transition, these can be set using a dict in 'fields'.
        For updating screen properties that cannot be set/updated via the fields properties,
        they can set using a dict through 'update'
        Example:
            jira.set_issue_status('MY-123','Resolved',{'myfield': 'myvalue'},
            {"comment": [{"add": { "body": "Issue Comments"}}]})
        :param issue_key: str
        :param status_name: str
        :param fields: dict, optional
        :param update: dict, optional
        rc   rT   ú/transitionsr]  rU   re   rJ  rV   )rE   Ú get_transition_id_to_status_namer®   )	r!   r;   rb  re   rJ  rY   r   Útransition_idr&   s	            r#   r`  zJira.set_issue_statusï  sx   € ð  ×$Ñ$ WÓ-ˆØ�
˜!˜I˜; lÐ3ˆØ×=Ñ=¸iÈÓUˆØ" T¨=Ð$9Ð:ˆØÐØ#ˆD�‰NØÐØ#ˆD�‰NØ�y‰y˜ 4ˆyÓ(Ð(r$   c                 ó¬   — | j                  |d¬«      }g }|d   d   D ]3  }|d   D ])  }|d   dk(  sŒ|j                  |d   |d   |d	   d
œ«       Œ+ Œ5 |S )Nr¬  ©r}  Ú	historiesrI  r  rJ  Ú
fromStringÚtoStringÚcreated)r§   r¨   Údateri   )r!   r:   Úresponse_get_issueÚstatus_change_historyÚhistoryÚitems         r#   Úget_issue_status_changelogzJira.get_issue_status_changelog	  s…   € à!Ÿ^™^¨H¸[˜^ÓIÐØ "ÐØ)¨+Ñ6°{ÑCò 	ˆGØ Ñ(ò �à˜‘= HÓ,Ø)×0Ñ0Ø!% lÑ!3¸4À
Ñ;KÐU\Ð]fÑUgÑhõñð	ð %Ð$r$   rf  c                 ób   — | j                  d«      }|› d|› d�}| j                  |dd|ii¬«      S )zq
        Setting status by transition_id
        :param issue_key: str
        :param transition_id: int
        rc   rT   rd  r]  rU   rV   r­   )r!   r;   rf  rY   r   s        r#   Ú!set_issue_status_by_transition_idz&Jira.set_issue_status_by_transition_id  sC   € ð ×$Ñ$ WÓ-ˆØ�
˜!˜I˜; lÐ3ˆØ�y‰y˜ L°4¸Ð2GÐ#HˆyÓIÐIr$   Útransition_namec                 ób   — | j                  d«      }|› d|› d�}| j                  |dd|ii¬«      S )zu
        Setting status by transition_name
        :param issue_key: str
        :param transition_name: str
        rc   rT   rd  r]  r  rV   r­   )r!   r;   ru  rY   r   s        r#   Ú#set_issue_status_by_transition_namez(Jira.set_issue_status_by_transition_name!  sC   € ð ×$Ñ$ WÓ-ˆØ�
˜!˜I˜; lÐ3ˆØ�y‰y˜ L°6¸?Ð2KÐ#LˆyÓMÐMr$   c                 ój   — | j                  d«      }|› d|› d�}g d¢}| j                  ||¬«      xs i S )Nrc   rT   ú?fields=status)ry   ©rJ  )r  ry   ©rE   r­  ©r!   r;   rY   r   re   s        r#   Úget_issue_statuszJira.get_issue_status+  sD   € Ø×$Ñ$ WÓ-ˆØ�
˜!˜I˜; nÐ5ˆÚ6ˆØ×)Ñ)¨#°fÐ)Ó=ÒCÀÐCr$   c                 ób   — | j                  d«      }|› d|› d�}g d¢}| j                  ||¬«      S )Nrc   rT   ry  )ry   rz  ©rU   ry   r{  r|  s        r#   Úget_issue_status_idzJira.get_issue_status_id1  s?   € Ø×$Ñ$ WÓ-ˆØ�
˜!˜I˜; nÐ5ˆÚ4ˆØ×)Ñ)¨#°fÐ)Ó=Ð=r$   c                 óz   — | j                  d«      }|› d|› d�}i }|r||d<   |r||d<   | j                  ||¬«      S )aô  
        Get a list of the transitions possible for this issue by the current user,
        along with fields that are required and their types.
        Fields will only be returned if expand = 'transitions.fields'.
        The fields in the metadata correspond to the fields in the transition screen for that transition.
        Fields not in the screen will not be in the metadata.
        :param issue_key: str
        :param transition_id: str
        :param expand: str
        :return:
        rc   rT   rd  ÚtransitionIdr}  rC   rD   )r!   r;   rf  r}  rY   r   r%   s          r#   rZ  zJira.get_issue_transitions_full7  sX   € ð ×$Ñ$ WÓ-ˆØ�
˜!˜I˜; lÐ3ˆØˆÙØ%2ˆF�>Ñ"ÙØ%ˆF�8ÑØ�x‰x˜ FˆxÓ+Ð+r$   c                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )z”
        Get Property Keys on an Issue.
        :param issue_key: Issue KEY
        :raises: requests.exceptions.HTTPError
        :return:
        rc   rT   rî   rD   rÓ  s       r#   Úget_issue_property_keyszJira.get_issue_property_keysN  s4   € ð ×$Ñ$ WÓ-ˆØ�
˜!˜I˜; kÐ2ˆØ�x‰x˜‹}Ðr$   c                 ó^   — | j                  d«      }|› d|› d|› �}| j                  ||¬«      S )Nrc   rT   rò   rV   rW   )r!   r;   rð   r&   rY   r   s         r#   Úset_issue_propertyzJira.set_issue_propertyY  s;   € Ø×$Ñ$ WÓ-ˆØ�
˜!˜I˜; l°<°.ÐAˆØ�x‰x˜ $ˆxÓ'Ð'r$   c                 óZ   — | j                  d«      }|› d|› d|› �}| j                  |«      S ©Nrc   rT   rò   rD   ©r!   r;   rð   rY   r   s        r#   Úget_issue_propertyzJira.get_issue_property^  s6   € Ø×$Ñ$ WÓ-ˆØ�
˜!˜I˜; l°<°.ÐAˆØ�x‰x˜‹}Ðr$   c                 óZ   — | j                  d«      }|› d|› d|› �}| j                  |«      S rˆ  r˜   r‰  s        r#   Údelete_issue_propertyzJira.delete_issue_propertyc  s7   € Ø×$Ñ$ WÓ-ˆØ�
˜!˜I˜; l°<°.ÐAˆØ�{‰{˜3ÓÐr$   Úsincec                 ó”   — | j                  d«      }i }|rt        t        |dz  «      «      |d<   |r||d<   | j                  ||¬«      S )a¡  
        Returns a list of IDs and update timestamps for worklogs updated after a date and time.
        :param since: The date and time, as a UNIX timestamp in milliseconds, after which updated worklogs are returned.
        :param expand: Use expand to include additional information about worklogs in the response.
            This parameter accepts properties that returns the properties of each worklog.
        zworklog/updatedéè  r�  r}  rC   ©rE   r.   rä   r1   )r!   r�  r}  r   r%   s        r#   Úget_updated_worklogszJira.get_updated_worklogsh  sT   € ð ×ÑÐ 1Ó2ˆØˆÙÜ!¤# e¨d¡lÓ"3Ó4ˆF�7‰OÙØ%ˆF�8Ñà�x‰x˜ FˆxÓ+Ð+r$   c                 ó†   — | j                  d«      }i }|rt        t        |dz  «      «      |d<   | j                  ||¬«      S )zÛ
        Returns a list of IDs and timestamps for worklogs deleted after a date and time.
        :param since: The date and time, as a UNIX timestamp in milliseconds, after which deleted worklogs are returned.
        zworklog/deletedr�  r�  rC   r�  )r!   r�  r   r%   s       r#   Úget_deleted_worklogszJira.get_deleted_worklogsx  sG   € ð
 ×ÑÐ 1Ó2ˆØˆÙÜ!¤# e¨d¡lÓ"3Ó4ˆF�7‰Oà�x‰x˜ FˆxÓ+Ð+r$   rà   c                 óf   — | j                  d«      }i }|r||d<   d|i}| j                  |||¬«      S )a7  
        Returns worklog details for a list of worklog IDs.
        :param expand: Use expand to include additional information about worklogs in the response.
            This parameter accepts properties that returns the properties of each worklog.
        :param ids: REQUIRED A list of worklog IDs.
        zworklog/listr}  rà   rv  r­   )r!   rà   r}  r   r%   r&   s         r#   Úget_worklogszJira.get_worklogs„  sD   € ð ×Ñ Ó/ˆØˆÙØ%ˆF�8ÑØ�sˆ|ˆØ�y‰y˜ V°$ˆyÓ7Ð7r$   c                 ó¸   — i }d}|rd|i}d}|s	|r|sd|i}n|s	|s|rd|i}n|s|r|ry|s|s|sy|r||d<   | j                  d	«      }| j                  ||¬
«      S )a;  
        Returns a user. This resource cannot be accessed anonymously.
        You can use only one parameter: username or key

        :param username:
        :param key: if username and key are different
        :param account_id:
        :param expand: Can be 'groups,applicationRoles'
        :return:
        Fru  Tro  rJ   z;You cannot specify both the username and the key parameterszFYou must specify at least one parameter: username or key or account_idr}  r°   rC   rD   )r!   ro  rJ   rq  r}  r%   Úmajor_parameter_enabledr   s           r#   r°   z	Jira.user˜  s‡   € ð" ˆØ"'ÐÙØ! :Ð.ˆFØ&*Ð#á&©8¹CØ  (Ð+‰FÙ(±¹cØ˜S�\‰FÙ(©X¹#ØPÙ¡C±Ø[ÙØ%ˆF�8Ñà×Ñ Ó'ˆØ�x‰x˜ FˆxÓ+Ð+r$   c                 óF   — | j                  d«      }| j                  |«      S )zA
        Currently logged user resource
        :return:
        ÚmyselfrD   rH   s     r#   r™  zJira.myself½  ó"   € ð
 ×Ñ Ó)ˆØ�x‰x˜‹}Ðr$   c                 óB   — | j                  |«      j                  d«      S )zP
        Check status of user
        :param username:
        :return:
        Úactive©r°   r1   ©r!   ro  s     r#   Úis_active_userzJira.is_active_userÅ  s   € ð �y‰y˜Ó"×&Ñ& xÓ0Ð0r$   c                 óx   — i }|r||d<   |r||d<   |r||d<   | j                  d«      }| j                  ||¬«      S )z¨
        Remove user from Jira if this user does not have any activity
        :param key:
        :param account_id:
        :param username:
        :return:
        ro  ru  rJ   r°   rC   r˜   )r!   ro  rq  rJ   r%   r   s         r#   Úuser_removezJira.user_removeÍ  sR   € ð ˆÙØ!)ˆF�:ÑÙØ",ˆF�;ÑÙØˆF�5‰MØ×Ñ Ó'ˆØ�{‰{˜3 vˆ{Ó.Ð.r$   c                 óX   — | j                  d«      }|› d|› �}| j                  ||¬«      S )zu
        Update user attributes based on json
        :param username:
        :param data:
        :return:
        r°   ú
?username=rV   rW   )r!   ro  r&   rY   r   s        r#   Úuser_updatezJira.user_updateß  s7   € ð ×$Ñ$ VÓ,ˆØ�
˜* X JÐ/ˆØ�x‰x˜ $ˆxÓ'Ð'r$   Úold_usernameÚnew_usernamec                 ó0   — d|i}| j                  ||¬«      S )zl
        Update username
        :param old_username:
        :param new_username:
        :return:
        r  rV   ©r¤  )r!   r¥  r¦  r&   s       r#   Úuser_update_usernamezJira.user_update_usernameê  s$   € ð ˜Ð%ˆØ×Ñ °4ÐÓ8Ð8r$   Úemailc                 ó2   — ||dœ}| j                  ||¬«      S )zz
        Update user email for new domain changes
        :param username:
        :param email:
        :return:
        )r  ÚemailAddressrV   r¨  )r!   ro  rª  r&   s       r#   Úuser_update_emailzJira.user_update_emailô  s$   € ð !°%Ñ8ˆØ×Ñ ¨tÐÓ4Ð4r$   Údisplay_nameÚpasswordÚnotificationc                 ó¼   — t         j                  d|«       |||dœ}|�||d<   nd|d<   |�d|d<   |du rd|d<   | j                  d«      }| j                  ||¬«      S )	a|  
        Create a user in Jira
        :param username:
        :param email:
        :param display_name:
        :param password: OPTIONAL: If a password is not set, a random password is generated.
        :param notification: OPTIONAL: Sends the user an email confirmation that they have been added to Jira.
                             Default:false.
        :return:
        zCreating user %s)r  r¬  ÚdisplayNamer¯  Tr°  Fr°   rV   r  )r!   ro  rª  r®  r¯  r°  r&   r   s           r#   Úuser_createzJira.user_createþ  s„   € ô$ 	�‰Ð# \Ô2àØ!Ø'ñ
ˆð
 ÐØ'ˆD�Òà#'ˆD�Ñ ØÐ#Ø#'ˆD�Ñ Ø˜5Ñ Ø#(ˆD�Ñ Ø×Ñ Ó'ˆØ�y‰y˜ 4ˆyÓ(Ð(r$   c                 ó    — | j                  d«      }d}|s| j                  s|› d|› �}n|s| j                  r|› d|› �}| j                  |«      S )z˜
        Get user property
        :param username:
        :param account_id: account_id is parameter used in Cloud instances
        :return:
        úuser/propertiesr?  ú?accountId=)rE   r0   r1   )r!   ro  rq  rY   r   s        r#   Úuser_propertieszJira.user_properties!	  sZ   € ð ×$Ñ$Ð%6Ó7ˆØˆÙ˜4Ÿ:š:Ø�J˜k¨(¨Ð4‰CÙ˜4Ÿ:š:Ø�J˜k¨*¨Ð6ˆCØ�x‰x˜‹}Ðr$   Úkey_propertyc                 ó¢   — i }|s| j                   sd|i}n|s| j                   rd|i}| j                  d«      }| j                  |› d|› �|¬«      S )zµ
        Get user property
        :param username:
        :param account_id: account_id is parameter used in Cloud instances
        :param key_property:
        :return:
        ro  ru  rµ  rT   rC   r  )r!   ro  rq  r¸  r%   rY   s         r#   Úuser_propertyzJira.user_property0	  sg   € ð ˆÙ˜4Ÿ:š:Ø  (Ð+‰FÙ˜4Ÿ:š:Ø! :Ð.ˆFØ×$Ñ$Ð%6Ó7ˆØ�x‰xØˆj˜˜,˜Ð(Øð ó 
ð 	
r$   c                 ó°   — | j                  d«      }d}|s| j                  s|› d|› d|› �}n|s| j                  r
|› d|› d|› �}| j                  ||¬«      S )zØ
        Set property for user
        :param username:
        :param account_id: account_id is parameter used in Cloud instances
        :param key_property:
        :param value_property:
        :return:
        rµ  r?  rT   r£  r¶  rV   r	  )r!   ro  rq  r¸  rõ   rY   r   s          r#   Úuser_set_propertyzJira.user_set_propertyE	  sk   € ð ×$Ñ$Ð%6Ó7ˆØˆÙ˜4Ÿ:š:Ø�J˜a ˜~¨Z¸°zÐB‰CÙ˜4Ÿ:š:Ø�J˜a ˜~¨[¸¸ÐEˆCà�x‰x˜ .ˆxÓ1Ð1r$   c                 ó¦   — | j                  d«      }|› d|› �}i }|s| j                  sd|i}n|s| j                  rd|i}| j                  ||¬«      S )z¼
        Delete property for user
        :param username:
        :param account_id: account_id is parameter used in Cloud instances
        :param key_property:
        :return:
        rµ  rT   ro  ru  rC   )rE   r0   r™   )r!   ro  rq  r¸  rY   r   r%   s          r#   Úuser_delete_propertyzJira.user_delete_property]	  sc   € ð ×$Ñ$Ð%6Ó7ˆØ�
˜!˜L˜>Ð*ˆØˆÙ˜4Ÿ:š:Ø  (Ð+‰FÙ˜4Ÿ:š:Ø! :Ð.ˆFØ�{‰{˜3 vˆ{Ó.Ð.r$   c                 ó8   — d}|||dœ}| j                  ||¬«      S )z»
        ATTENTION!
        This method used after configuration of rest endpoint on Jira side
        :param username:
        :param key:
        :param value:
        :return:
        z2rest/scriptrunner/latest/custom/updateUserProperty)ro  Úpropertyr5   rC   rÌ   )r!   ro  rJ   r5   r   r%   s         r#   Ú1user_update_or_create_property_through_rest_pointz6Jira.user_update_or_create_property_through_rest_pointp	  s)   € ð CˆØ$,¸#ÈÑNˆØ�x‰x˜ FˆxÓ+Ð+r$   c                 ó2   — d|dœ}| j                  ||¬«      S )z¾
        Disable user. Works from 8.3.0 Release
        https://docs.atlassian.com/software/jira/docs/api/REST/8.3.0/#api/2/user-updateUser
        :param username:
        :return:
        r3  )rœ  r  )ro  r&   r¨  )r!   ro  r&   s      r#   Úuser_deactivatezJira.user_deactivate}	  s$   € ð "¨8Ñ4ˆØ×Ñ¨¸ÐÓ=Ð=r$   c                 ó$   — | j                  |«      S )zOverride the disable method)rÃ  rž  s     r#   Úuser_disablezJira.user_disable‡	  s   € à×#Ñ# HÓ-Ð-r$   Úparamc                 ó:   — |› d|› d|› �}| j                  |¬«      S )z*The disable method throw own rest endpointú?ú=)rr   rÌ   )r!   ro  r   rÆ  s       r#   Ú user_disable_throw_rest_endpointz%Jira.user_disable_throw_rest_endpoint‹	  s+   € ð ��Q�u�g˜Q˜x˜jÐ)ˆØ�x‰x˜SˆxÓ!Ð!r$   c                 óB  — d}| j                   ddœ}| j                  d| j                  d¬«      }|j                  «       }d}|r8|j	                  d«      d   j	                  d	«      d
   j	                  d«      d
   }|r||d<   | j                  ||| j                  ¬«      S )z.Get web sudo cookies using normal http requestz%secure/admin/WebSudoAuthenticate.jspar3  )ÚwebSudoPasswordÚwebSudoIsPostTr”   Nz;<meta id="atlassian-token" name="atlassian-token" content="r   ú
r   rü  Ú	atl_token)rr   r&   rè  )r¯  r1   Úform_token_headersÚdecodeÚsplitr®   )r!   r   r&   ÚanswerÚdecoded_answerrÏ  s         r#   Úuser_get_websudozJira.user_get_websudo•	  s­   € à5ˆà#Ÿ}™}Ø$ñ
ˆð —‘ÐAÀ4×CZÑCZÐnr�ÓsˆØŸ™›ˆØˆ	Ùà×$Ñ$Ð%bÓcÐdeÑfß‘�t“˜Qñ ç‘�s“˜Añð ñ
 Ø )ˆD�Ñà�y‰y˜c¨°d×6MÑ6MˆyÓNÐNr$   c                 ó$   — | j                  d«      S )zÂ
        This method invalidates any current WebSudo session.
        link:
        https://developer.atlassian.com/server/jira/platform/rest/v10002/api-group-websudo/#api-group-websudo
        zrest/auth/1/websudo©r™   ©r!   s    r#   Úinvalidate_websudozJira.invalidate_websudoª	  s   € ð �{‰{Ð0Ó1Ð1r$   c                 óT   — | j                  d«      }||dœ}| j                  ||¬«      S )zF
        :param start:
        :param limit:
        :return:
        zusers/search)r  r  rC   rD   )r!   r  r¢   r   r%   s        r#   Úusers_get_allzJira.users_get_all²	  s6   € ð ×Ñ Ó/ˆàØñ
ˆð �x‰x˜ FˆxÓ+Ð+r$   Úinclude_active_usersc	                 óT  — | j                  d«      }	t        |«      j                  «       t        |«      j                  «       ||dœ}
| j                  r-|ry|r|ryt	        |||g«      sy|r||
d<   |r||
d<   |r||
d<   n|sy	t	        |||g«      ry
||
d<   | j                  |	|
¬«      S )a0  
        Fuzzy search using display name, emailAddress or property, or an exact search for accountId or username

        On Jira Cloud, you can use only one of query or account_id params. You may not specify username.
        On Jira Server, you must specify a username. You may not use query, account_id or property_key.

        :param username: OPTIONAL: Required for Jira Server, cannot be used on Jira Cloud.
                Use '.' to find all users.
        :param query: OPTIONAL: String matched against "displayName" and "emailAddress" user attributes
        :param account_id: OPTIONAL: String matched exactly against a user "accountId".
                Required unless "query" or "property" parameters are specified.
        :param property_key: OPTIONAL: String used to search properties by key. Required unless
                "account_id" or "query" is specified.
        :param start: OPTIONAL: The start point of the collection to return. Default: 0.
        :param limit: OPTIONAL: The limit of the number of users to return, this may be restricted by
                fixed system limits. Default by built-in method: 50
        :param include_inactive_users: OPTIONAL: Return users with "active: False"
        :param include_active_users: OPTIONAL: Return users with "active: True".
        :return:
        zuser/search)ÚincludeActiveÚincludeInactiver  r  zYJira Cloud no longer supports a username parameter, use account_id, query or property_keyz;You cannot specify both the query and account_id parameterszLYou must specify at least one parameter: query or account_id or property_keyru  r`  rÀ  z=Username parameter is required for user search on Jira ServerzIJira Server does not support account_id, query or property_key parametersro  rC   )rE   r.   rˆ  r0   Úanyr1   )r!   ro  r`  rq  rð   r  r¢   rk  rÜ  r   r%   s              r#   Úuser_find_by_user_stringzJira.user_find_by_user_stringÃ	  sÉ   € ð> ×Ñ Ó.ˆä Ð!5Ó6×<Ñ<Ó>Ü"Ð#9Ó:×@Ñ@ÓBØØñ	
ˆð �:Š:ÙØrÙ¡ØTÜ˜* e¨\Ð:Ô;ØeÙØ&0��{Ñ#áØ"'��w‘ÙØ%1��zÒ"ÙØRÜ�*˜e \Ð2Ô3Ø^à!)ˆF�:Ñà�x‰x˜ FˆxÓ+Ð+r$   Úapplication_keyc                 ó¦   — | j                  |d«      }d|v r;|j                  d«      j                  d«      D ]  }|j                  d«      |k(  sŒ y y)a  
        Utility function to test whether a user has an application role
        :param username: The username of the user to test.
        :param application_key: The application key of the application
        :return: True if the user has the application, else False
        ÚapplicationRolesr!   rI  rJ   TFr�  )r!   ro  râ  r°   Úapplication_roles        r#   Úis_user_in_applicationzJira.is_user_in_application
  s\   € ð �y‰y˜Ð#5Ó6ˆØ�T‰>Ø$(§H¡HÐ-?Ó$@×$DÑ$DÀWÓ$Mò  Ð Ø#×'Ñ'¨Ó.°/ÓAÙð ð r$   c                 óX   — ||dœ}| j                  d«      }| j                  ||¬«      du S )af  
        Add a user to an application
        :param username: The username of the user to add.
        :param application_key: The application key of the application
        :return: True if the user was added to the application, else False
        :see: https://docs.atlassian.com/software/jira/docs/api/REST/7.5.3/#api/2/user-addUserToApplication
        )ro  ÚapplicationKeyzuser/applicationrC   Nr­   )r!   ro  râ  r%   r   s        r#   Úadd_user_to_applicationzJira.add_user_to_application
  s7   € ð %-ÀÑPˆØ×ÑÐ 2Ó3ˆØ�y‰y˜ VˆyÓ,°Ð4Ð4r$   c                 óR   — d|i}| j                  d«      }| j                  ||¬«      S )z¤
        Get groups of a user
        This API is only available for Jira Cloud platform
        :param account_id: str
        :return: list of group info
        ru  zuser/groupsrC   rD   ©r!   rq  r%   r   s       r#   Úget_user_groupszJira.get_user_groups 
  s1   € ð ˜zÐ*ˆØ×Ñ Ó.ˆØ�x‰x˜ FˆxÓ+Ð+r$   Úincluded_archivedc                 ó&   — | j                  ||«      S r{   )Úprojects)r!   rí  r}  s      r#   Úget_all_projectszJira.get_all_projects+
  s   € Ø�}‰}Ð.°Ó7Ð7r$   c                 óÖ   — i }|r||d<   |r||d<   | j                   r*t        | j                  | j                  d«      |«      «      S | j                  d«      }| j	                  ||¬«      S )a\  
        Returns all projects which are visible for the currently logged-in user.
        If no user is logged in, it returns the list of projects that are visible when using anonymous access.
        :param included_archived: boolean whether to include archived projects in response, default: false
        :param expand:
        :return:
        ÚincludeArchivedr}  zproject/searchr�  rC   )r0   ræ   r6   rE   r1   )r!   rí  r}  r%   r   s        r#   rï  zJira.projects.
  s{   € ð ˆÙØ(9ˆFÐ$Ñ%ÙØ%ˆF�8ÑØ�:Š:ÜØ—‘Ø×%Ñ%Ð&6Ó7Øóóð ð ×#Ñ# IÓ.ˆCØ—8‘8˜C¨�8Ó/Ð/r$   r[  c                 ó(   — | j                  d|¬«      S )aÕ  
        Creates a new project.
            {
                "key": "EX",
                "name": "Example",
                "projectTypeKey": "business",
                "projectTemplateKey": "com.atlassian.jira-core-project-templates:jira-core-project-management",
                "description": "Example Project description",
                "lead": "Charlie",
                "url": "http://atlassian.com",
                "assigneeType": "PROJECT_LEAD",
                "avatarId": 10200,
                "issueSecurityScheme": 10001,
                "permissionScheme": 10011,
                "notificationScheme": 10021,
                "categoryId": 10120
            }
        :param json:
        :return:
        zrest/api/2/project©r[  rÈ   )r!   r[  s     r#   Úcreate_project_from_raw_jsonz!Jira.create_project_from_raw_jsonG
  s   € ð* �y‰yÐ-°DˆyÓ9Ð9r$   c                 ó:   — |||dœ}| j                  d|› �|¬«      S )aV  
        Creates a new project based on an existing project.
        :param str project_id: The numeric ID of the project to clone
        :param str key: The KEY to use for the new project, e.g. KEY-10000
        :param str name: The name of the new project
        :param str lead: The username of the project lead
        :return:
        )rJ   r  r  z(rest/project-templates/1.0/createshared/rô  rÈ   )r!   r8   rJ   r  r  r[  s         r#   Ú#create_project_from_shared_templatez(Jira.create_project_from_shared_template^
  s3   € ð  D°$Ñ7ˆà�y‰yØ6°z°lÐCØð ó 
ð 	
r$   c                 óT   — | j                  d«      }|› d|› �}| j                  |«      S )zc
        DELETE /rest/api/2/project/<project_key>
        :param key: str
        :return:
        r�  rT   r˜   r©  s       r#   Údelete_projectzJira.delete_projectn
  s3   € ð ×$Ñ$ YÓ/ˆØ�
˜!˜C˜5Ð!ˆØ�{‰{˜3ÓÐr$   c                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )z9
        Archives a project.
        :param key:
        r�  rT   r¾  rW   r©  s       r#   Úarchive_projectzJira.archive_projectx
  s4   € ð
 ×$Ñ$ YÓ/ˆØ�
˜!˜C˜5 Ð)ˆØ�x‰x˜‹}Ðr$   c                 ój   — i }|r||d<   | j                  d«      }|› d|› �}| j                  ||¬«      S )zf
        Get project with details
        :param key:
        :param expand:
        :return:
        r}  r�  rT   rC   rD   ©r!   rJ   r}  r%   rY   r   s         r#   r�  zJira.project�
  sI   € ð ˆÙØ%ˆF�8ÑØ×$Ñ$ YÓ/ˆØ�
˜!˜C˜5Ð!ˆØ�x‰x˜ FˆxÓ+Ð+r$   c                 ó(   — | j                  ||¬«      S )zó
            Contains a full representation of a project in JSON format.
            All project keys associated with the project will only be returned if expand=projectKeys.
        :param key:
        :param expand:
        :return:
        )rJ   r}  )r�  )r!   rJ   r}  s      r#   Úget_projectzJira.get_project�
  s   € ð �|‰| ¨Fˆ|Ó3Ð3r$   c                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )zc
        Get project components using project key
        :param key: str
        :return:
        r�  rT   z/componentsrD   r©  s       r#   Úget_project_componentszJira.get_project_components™
  s4   € ð ×$Ñ$ YÓ/ˆØ�
˜!˜C˜5 Ð,ˆØ�x‰x˜‹}Ðr$   c                 ól   — i }|�||d<   | j                  d«      }|› d|› d�}| j                  ||¬«      S )zª
        Contains a full representation of the specified project's versions.
        :param key:
        :param expand: the parameters to expand
        :return:
        r}  r�  rT   z	/versionsrC   rD   rý  s         r#   Úget_project_versionszJira.get_project_versions£
  sN   € ð ˆØÐØ%ˆF�8ÑØ×$Ñ$ YÓ/ˆØ�
˜!˜C˜5 	Ð*ˆØ�x‰x˜ FˆxÓ+Ð+r$   Úorder_byc                 óÚ   — i }|�t        |«      |d<   |�t        |«      |d<   |�||d<   |�||d<   |�||d<   |dv r||d<   | j                  d«      }	|	› d	|› d
�}
| j                  |
|¬«      S )aŽ  
        Returns all versions for the specified project. Results are paginated.
        Results can be ordered by the following fields:
            sequence
            name
            startDate
            releaseDate
        :param key: the project key or id
        :param start: the page offset, if not specified then defaults to 0
        :param limit: how many results on the page should be included. Defaults to 50.
        :param order_by: ordering of the results.
        :param expand: the parameters to expand
        :param query: Filter the results using a literal string. Versions with matching name or description
            are returned (case insensitive).
        :param status: A list of status values used to filter the results by version status.
            This parameter accepts a comma-separated list. The status values are released, unreleased, and archived.
        :return:
        r  r  ÚorderByr}  r`  )ÚreleasedÚ
unreleasedÚarchivedrJ  r�  rT   ú/versionrC   )rä   rE   r1   )r!   rJ   r  r¢   r  r}  r`  rJ  r%   rY   r   s              r#   Úget_project_versions_paginatedz#Jira.get_project_versions_paginated±
  s¨   € ð8 ˆØÐÜ # E£
ˆF�9ÑØÐÜ#& u£:ˆF�<Ñ ØÐØ (ˆF�9ÑØÐØ%ˆF�8ÑØÐØ#ˆF�7‰OØÐ;Ñ;Ø%ˆF�8ÑØ×$Ñ$ YÓ/ˆØ�
˜!˜C˜5 Ð)ˆØ�x‰x˜ FˆxÓ+Ð+r$   rv   c                 óT   — | j                  d«      }|› d|› �}| j                  |«      S )zw
        Returns a specific version with the given id.
        :param version: The id of the version to return
        rv   rT   rD   )r!   rv   rY   r   s       r#   Úget_versionzJira.get_versionÞ
  s2   € ð
 ×$Ñ$ YÓ/ˆØ�
˜!˜G˜9Ð%ˆØ�x‰x˜‹}Ðr$   Úis_archivedÚis_releasedc                 óZ   — |||||dœ}| j                  d«      }| j                  ||¬«      S )a  
        Add missing version to project
        :param project_key: the project key
        :param project_id: the project id
        :param version: the new project version to add
        :param is_archived:
        :param is_released:
        :return:
        )r  r	  r  r�  r?   rv   rV   r­   )r!   r9   r8   rv   r  r  Úpayloadr   s           r#   Úadd_versionzJira.add_versionç
  s?   € ð$ Ø#Ø#Ø"Ø#ñ
ˆð ×Ñ 	Ó*ˆØ�y‰y˜ 7ˆyÓ+Ð+r$   Úmoved_fixedÚmove_affectedc                 ó8   — ||dœ}| j                  d|› �|¬«      S )a  
        Delete version from the project
        :param int version: the version id to delete
        :param int moved_fixed: The version to set fixVersion to on issues where the deleted version is the fix version.
                                If null then the fixVersion is removed.
        :param int move_affected: The version to set affectedVersion to on issues where the deleted version is
                                  the affected version, If null then the affectedVersion is removed.
        :return:
        )ÚmoveFixIssuesToÚmoveAffectedIssuesTozrest/api/2/version/rV   r×  )r!   rv   r  r  r  s        r#   Údelete_versionzJira.delete_version  s.   € ð  +Ø$1ñ
ˆð �{‰{Ð0°°	Ð:Àˆ{ÓIÐIr$   Ú
start_dateÚrelease_datec                 ój   — ||||||dœ}| j                  d«      }	|	› d|› �}
| j                  |
|¬«      S )aÃ  
        Update a project version
        :param version: The version id to update
        :param name: The version name
        :param description: The version description
        :param is_archived:
        :param is_released:
        :param start_date: The Start Date in isoformat. Example value is "2015-04-11T15:22:00.000+10:00"
        :param release_date: The Release Date in isoformat. Example value is "2015-04-11T15:22:00.000+10:00"
        )r  r#  r	  r  Ú	startDateÚreleaseDaterv   rT   rV   rW   )r!   rv   r  r#  r  r  r  r  r  rY   r   s              r#   Úupdate_versionzJira.update_version  sR   € ð* Ø&Ø#Ø#Ø#Ø'ñ
ˆð ×$Ñ$ YÓ/ˆØ�
˜!˜G˜9Ð%ˆØ�x‰x˜ 'ˆxÓ*Ð*r$   ÚafterÚpositionc                 óP  — | j                  d«      }|› d|› d�}|€|€t        d«      ‚|r5| j                  |«      j                  d«      }| j	                  |d|i¬«      S |rE|j                  «       j                  «       }|d	vrt        d
|› �«      ‚| j	                  |d|i¬«      S y)zÓ
        Reposition a project version
        :param version: The version id to move
        :param after: The version id to move version below
        :param position: A position to move the version to
        rv   rT   z/moveNz)Must provide one of `after` or `position`r!   r  rV   )ÚEarlierÚLaterÚFirstÚLastz<position must be one of Earlier, Later, First, or Last. Got r   )rE   r3   r  r1   r®   rˆ  Ú
capitalize)r!   rv   r  r   rY   r   Ú	after_urls          r#   Úmove_versionzJira.move_version2  sÅ   € ð ×$Ñ$ YÓ/ˆØ�
˜!˜G˜9 EÐ*ˆØˆ=˜XÐ-ÜÐHÓIÐIÙØ×(Ñ(¨Ó/×3Ñ3°FÓ;ˆIØ—9‘9˜S¨°Ð';�9Ó<Ð<ÙØ—~‘~Ó'×2Ñ2Ó4ˆHØÐDÑDÜ Ð#_Ð`hÐ_iÐ!jÓkÐkØ—9‘9˜S¨
°HÐ'=�9Ó>Ð>ð	 r$   c                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )z_
        Provide associated project roles
        :param project_key:
        :return:
        r�  rT   z/rolerD   ©r!   r9   rY   r   s       r#   Úget_project_roleszJira.get_project_rolesF  s4   € ð ×$Ñ$ YÓ/ˆØ�
˜!˜K˜=¨Ð.ˆØ�x‰x˜‹}Ðr$   Úrole_idc                 ó`   — | j                  d«      }|› d|› d|› �}| j                  |dg¬«      S )z‘
        Returns the details for a given project role in a project.
        :param project_key:
        :param role_id:
        :return:
        r�  rT   ú/role/)Úactorsry   r{  )r!   r9   r,  rY   r   s        r#   Ú#get_project_actors_for_role_projectz(Jira.get_project_actors_for_role_projectP  sB   € ð ×$Ñ$ YÓ/ˆØ�
˜!˜K˜=¨¨w¨iÐ8ˆØ×)Ñ)¨#°{°mÐ)ÓDÐDr$   ÚactorÚ
actor_typec                 óx   — | j                  d«      }|› d|› d|› �}i }|�	|dv r|||<   | j                  ||¬«      S )a«  
        Deletes actors (users or groups) from a project role.
        Delete a user from the role: /rest/api/2/project/{projectIdOrKey}/role/{roleId}?user={username}
        Delete a group from the role: /rest/api/2/project/{projectIdOrKey}/role/{roleId}?group={groupname}
        :param project_key:
        :param role_id:
        :param actor:
        :param actor_type: str : group or user string
        :return:
        r�  rT   r.  )re  r°   rC   r˜   )r!   r9   r,  r1  r2  rY   r   r%   s           r#   Údelete_project_actorszJira.delete_project_actors[  sZ   € ð" ×$Ñ$ YÓ/ˆØ�
˜!˜K˜=¨¨w¨iÐ8ˆØˆØÐ! jÐ4EÑ&EØ!&ˆF�:ÑØ�{‰{˜3 vˆ{Ó.Ð.r$   Ú	user_namec                 ó*   — | j                  |||d«      S )zi

        :param project_key:
        :param role_id:
        :param user_name:
        :return:
        úatlassian-user-role-actor)Úadd_project_actor_in_role)r!   r9   r,  r5  s       r#   Úadd_user_into_project_rolezJira.add_user_into_project_roles  s   € ð ×-Ñ-¨k¸7ÀIÐOjÓkÐkr$   c                 óŒ   — | j                  d«      }|› d|› d|› �}i }|dv r|g|d<   n
|dv r|g|d<   | j                  ||¬«      S )	z€

        :param project_key:
        :param role_id:
        :param actor:
        :param actor_type:
        :return:
        r�  rT   r.  )re  zatlassian-group-role-actorre  )r°   r7  r°   rV   r­   )r!   r9   r,  r1  r2  rY   r   r&   s           r#   r8  zJira.add_project_actor_in_role}  sj   € ð ×$Ñ$ YÓ/ˆØ�
˜!˜K˜=¨¨w¨iÐ8ˆØˆØÐ@Ñ@Ø"˜GˆD�ŠMØÐ@Ñ@Ø!˜7ˆD�‰Là�y‰y˜ 4ˆyÓ(Ð(r$   c                 ól   — | j                  d«      }|› d|› �}i }|r||d<   | j                  |||¬«      S )aÄ  
        Updates a project.
        Only non-null values sent in JSON will be updated in the project.
        Values available for the assigneeType field are: "PROJECT_LEAD" and "UNASSIGNED".
        Update project: /rest/api/2/project/{projectIdOrKey}

        :param project_key: project key of project that needs to be updated
        :param data: dictionary containing the data to be updated
        :param expand: the parameters to expand
        r�  rT   r}  rC   rW   )r!   r9   r&   r}  rY   r   r%   s          r#   Úupdate_projectzJira.update_project�  sK   € ð ×$Ñ$ YÓ/ˆØ�
˜!˜K˜=Ð)ˆØˆÙØ%ˆF�8ÑØ�x‰x˜˜T¨&ˆxÓ1Ð1r$   Únew_project_category_idc                 ó2   — d|i}| j                  |||¬«      S )a  
        Updates a project.
        Update project: /rest/api/2/project/{projectIdOrKey}

        :param project_key: project key of project that needs to be updated
        :param new_project_category_id:
        :param expand: the parameters to expand
        Ú
categoryIdrh  ©r<  )r!   r9   r=  r}  r&   s        r#   Ú#update_project_category_for_projectz(Jira.update_project_category_for_project¢  s'   € ð Ð5Ð6ˆØ×"Ñ" ;°¸VÐ"ÓDÐDr$   Úproject_id_or_keyc                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )zè
        Gets a notification scheme associated with the project.
        Follow the documentation of /notificationscheme/{id} resource for all details about returned value.
        :param project_id_or_key:
        :return:
        r�  rT   ú/notificationschemerD   ©r!   rB  rY   r   s       r#   Ú#get_notification_scheme_for_projectz(Jira.get_notification_scheme_for_project¶  ó7   € ð ×$Ñ$ YÓ/ˆØ�
˜!Ð-Ð.Ð.AÐBˆØ�x‰x˜‹}Ðr$   Únew_notification_schemec                 ó.   — d|i}| j                  ||«      S )zÖ
        Updates a project.
        Update project: /rest/api/2/project/{projectIdOrKey}

        :param project_key: project key of project that needs to be updated
        :param new_notification_scheme:
        ÚnotificationSchemer@  )r!   r9   rH  r&   s       r#   Ú"assign_project_notification_schemez'Jira.assign_project_notification_schemeÁ  s"   € ð %Ð&=Ð>ˆØ×"Ñ" ;°Ó5Ð5r$   c                 óF   — | j                  d«      }| j                  |«      S )úB
        Returns a paginated list of notification schemes
        ÚnotificationschemerD   rH   s     r#   Úget_notification_schemeszJira.get_notification_schemesÌ  s#   € ð ×ÑÐ 4Ó5ˆØ�x‰x˜‹}Ðr$   c                 óH   — | j                  «       j                  d«      xs g S )rM  r,   )rO  r1   rØ  s    r#   Úget_all_notification_schemesz!Jira.get_all_notification_schemesÓ  s#   € ð ×,Ñ,Ó.×2Ñ2°8Ó<ÒBÀÐBr$   Únotification_scheme_idc                 ój   — | j                  d«      }|› d|› �}i }|r||d<   | j                  ||¬«      S )a³
  
        Returns a full representation of the notification scheme for the given id.
        Use 'expand' to get details
        Returns a full representation of the notification scheme for the given id. This resource will return a
        notification scheme containing a list of events and recipient configured to receive notifications for these
        events. Consumer should allow events without recipients to appear in response. User accessing the data is
        required to have permissions to administer at least one project associated with the requested notification
        scheme.
        Notification recipients can be:

            current assignee - the value of the notificationType is CurrentAssignee
            issue reporter - the value of the notificationType is Reporter
            current user - the value of the notificationType is CurrentUser
            project lead - the value of the notificationType is ProjectLead
            component lead - the value of the notificationType is ComponentLead
            all watchers - the value of the notification type is AllWatchers
            configured user - the value of the notification type is User. Parameter will contain key of the user.
                Information about the user will be provided if user expand parameter is used.
            configured group - the value of the notification type is Group. Parameter will contain name of the group.
                Information about the group will be provided if group expand parameter is used.
            configured email address - the value of the notification type is EmailAddress, additionally
                information about the email will be provided.
            users or users in groups in the configured custom fields - the value of the notification type
                is UserCustomField or GroupCustomField. Parameter will contain id of the custom field.
                Information about the field will be provided if field expand parameter is used.
            configured project role - the value of the notification type is ProjectRole.
                Parameter will contain project role id.
                Information about the project role will be provided if projectRole expand parameter is used.
        Please see the example for reference.
        The events can be JIRA system events or events configured by administrator.
        In case of the system events, data about theirs ids, names and descriptions is provided.
        In case of custom events, the template event is included as well.
        :param notification_scheme_id: ID of scheme you want to work with
        :param expand: str
        :return: full representation of the notification scheme for the given id
        rN  rT   r}  rC   rD   )r!   rR  r}  rY   r   r%   s         r#   Úget_notification_schemezJira.get_notification_schemeÙ  sM   € ðJ ×$Ñ$Ð%9Ó:ˆØ�
˜!Ð2Ð3Ð4ˆØˆÙØ%ˆF�8ÑØ�x‰x˜ FˆxÓ+Ð+r$   c                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )z 
        Gets a notification scheme assigned with a project

        :param project_id_or_key: str
        :return: data of project notification scheme
        r�  rT   rD  rD   rE  s       r#   Úget_project_notification_schemez$Jira.get_project_notification_scheme  rG  r$   Úpermission_scheme_idc                 ób   — | j                  d«      }|› d|› d�}d|i}| j                  ||¬«      S )z•
        Assigns a permission scheme with a project.
        :param project_id_or_key:
        :param permission_scheme_id:
        :return:
        r�  rT   ú/permissionschemerU   rV   rW   )r!   rB  rW  rY   r   r&   s         r#   Ú assign_project_permission_schemez%Jira.assign_project_permission_scheme  sG   € ð ×$Ñ$ YÓ/ˆØ�
˜!Ð-Ð.Ð.?Ð@ˆØÐ*Ð+ˆØ�x‰x˜ $ˆxÓ'Ð'r$   c                 ól   — | j                  d«      }|› d|› d�}i }|r||d<   | j                  ||¬«      S )zÛ
        Gets a permission scheme assigned with a project
        Use 'expand' to get details

        :param project_id_or_key: str
        :param expand: str
        :return: data of project permission scheme
        r�  rT   rY  r}  rC   rD   )r!   rB  r}  rY   r   r%   s         r#   Úget_project_permission_schemez"Jira.get_project_permission_scheme"  sN   € ð ×$Ñ$ YÓ/ˆØ�
˜!Ð-Ð.Ð.?Ð@ˆØˆÙØ%ˆF�8ÑØ�x‰x˜ FˆxÓ+Ð+r$   c                 ó8   — d}|||dœ}| j                  ||¬«      S )zØ
        Create a new permission scheme

        :param name: Name of new permission scheme
        :param description: Description of new permission scheme
        :param permissions: Defined permission set
        zrest/api/2/permissionscheme)r  r#  r7   rV   rÈ   )r!   r  r#  r7   r   r&   s         r#   Úcreate_permission_schemezJira.create_permission_scheme2  s.   € ð ,ˆàØ&Ø&ñ
ˆð
 �y‰y˜ 4ˆyÓ(Ð(r$   c                 óF   — | j                  d«      }| j                  |«      S )z(
        Return all issue types
        Ú	issuetyperD   rH   s     r#   Úget_issue_typeszJira.get_issue_typesB  s"   € ð ×Ñ Ó,ˆØ�x‰x˜‹}Ðr$   c                 óV   — |||dœ}| j                  d«      }| j                  ||¬«      S )z•
        Create a new issue type
        :param name:
        :param description:
        :param type: standard or sub-task
        :return:
        )r  r#  r!  r`  rV   r­   )r!   r  r#  r!  r&   r   s         r#   Úcreate_issue_typezJira.create_issue_typeI  s3   € ð ¨[À$ÑGˆØ×Ñ Ó,ˆØ�y‰y˜ 4ˆyÓ(Ð(r$   c                 óf   — | j                  «       }g }|D ]  }|d   sŒ	|j                  |«       Œ |S )zÉ
        Returns a list of all custom fields
        That method just filtering all fields method
        :return: application/jsonContains a full representation of all visible fields in JSON.
        Úcustom)r   rk   )r!   re   Úcustom_fieldsr  s       r#   Úget_all_custom_fieldszJira.get_all_custom_fieldsU  sC   € ð ×$Ñ$Ó&ˆØˆØò 	,ˆEØ�X‹Ø×$Ñ$ UÕ+ð	,ð Ðr$   c              #   ó¼   K  — | j                  «       D ]E  }|d   }| j                  |«      }| j                  |d   d   «      }||d   |d   |d   |d   dœ–— ŒG y ­w)NrJ   r  r  r²  r¬  )r9   Úproject_nameÚ	lead_nameÚlead_keyÚ
lead_email)rï  r�  r°   )r!   r�  rJ   Úproject_datar  s        r#   Úproject_leaderszJira.project_leadersb  su   è ø€ Ø—}‘}“ò 
	ˆGØ˜%‘.ˆCØŸ<™<¨Ó,ˆLØ—9‘9˜\¨&Ñ1°&Ñ9Ó:ˆDà"Ø '¨¡Ø! -Ñ0Ø  ™LØ" >Ñ2ñó ñ	
	ùs   ‚AAc                 ó®   — d|› d�}| j                  |«      }| j                  rt        d|«      S t        d|«      j                  d«      xs dd id   d   S )Núproject = "z" ORDER BY issuekey DESCr   r+   ÚissuesrJ   r   )r<  rÐ   r	   Ú__getitem__©r!   r�  r<  r4   s       r#   Úget_project_issuekey_lastzJira.get_project_issuekey_lasto  s`   € Ø˜G˜9Ð$<Ð=ˆØ—8‘8˜C“=ˆØ×ÒÜ˜
 HÓ-Ð-ä�V˜XÓ&×2Ñ2°8Ó<ÒMÀÈÀÈqÑQÐRWÑXÐXr$   c                 ó²   — d|› d�}| j                  ||||¬«      }| j                  rt        d|«      S t        d|«      d   D �cg c]  }|d   ‘Œ	 c}S c c}w )Nrp  z" ORDER BY issuekey ASC)r  r¢   r}  r   r+   rq  rJ   ©r<  rÐ   r	   )r!   r�  r  r¢   r}  r<  r4   rc   s           r#   Úget_project_issuekey_allzJira.get_project_issuekey_allw  sc   € ð ˜G˜9Ð$;Ð<ˆØ—8‘8˜C u°EÀ&�8ÓIˆØ×ÒÜ˜
 HÓ-Ð-Ü*.¨v°xÓ*@ÀÑ*JÖK ��e“ÒKÐKùÒKs   ÁAc                 ó‚   — d|› d�}| j                  |d¬«      }| j                  rt        d|«      S t        d|«      d   S )Nrp  z" rì  ry   r   r+   Útotalrv  rs  s       r#   Úget_project_issues_countzJira.get_project_issues_count€  sJ   € Ø˜G˜9 BÐ'ˆØ—8‘8˜C¨�8Ó0ˆØ×ÒÜ˜
 HÓ-Ð-Ü�F˜HÓ% gÑ.Ð.r$   c                 ó†   — d|› d�}| j                  ||||¬«      }| j                  rt        d|«      S t        d|«      d   S )a�  
        Get the Issues for a Project
        :param project: Project Key name
        :param fields: OPTIONAL list<str>: List of Issue Fields
        :param start: OPTIONAL int: Starting index/offset from the list of target issues
        :param limit: OPTIONAL int: Total number of project issues to be returned
        :return: List of Dictionary for the Issue(s) returned.
        rp  z" ORDER BY key)re   r  r¢   r   r+   rq  rv  )r!   r�  re   r  r¢   r<  r4   s          r#   Úget_all_project_issueszJira.get_all_project_issues‡  sP   € ð ˜G˜9 NÐ3ˆØ—8‘8˜C¨°eÀ5�8ÓIˆØ×ÒÜ˜
 HÓ-Ð-Ü�F˜HÓ% hÑ/Ð/r$   c                 ó`   — | j                  d«      }|› d|› d|› d|› �}| j                  |«      S )af  
        Provide assignable users for project
        :param project_key:
        :param start: OPTIONAL: The start point of the collection to return. Default: 0.
        :param limit: OPTIONAL: The limit of the number of users to return, this may be restricted by
                fixed system limits. Default by built-in method: 50
        :return:
        úuser/assignable/searchz	?project=ú	&startAt=ú&maxResults=rD   )r!   r9   r  r¢   rY   r   s         r#   Ú$get_all_assignable_users_for_projectz)Jira.get_all_assignable_users_for_project˜  s?   € ð ×$Ñ$Ð%=Ó>ˆØ�
˜) K =°	¸%¸ÀÈUÈGÐTˆØ�x‰x˜‹}Ðr$   c                 ót   — | j                  d«      }|› d|› d|› d|› �}|r|d|› �z  }| j                  |«      S )a³  
        Provide assignable users for issue
        :param issue_key:
        :param username: OPTIONAL: Can be used to chaeck if user can be assigned
        :param start: OPTIONAL: The start point of the collection to return. Default: 0.
        :param limit: OPTIONAL: The limit of the number of users to return, this may be restricted by
                fixed system limits. Default by built-in method: 50
        :return:
        r~  z
?issueKey=r  r€  z
&username=rD   )r!   r;   ro  r  r¢   rY   r   s          r#   Úget_assignable_users_for_issuez#Jira.get_assignable_users_for_issue¥  sS   € ð ×$Ñ$Ð%=Ó>ˆØ�
˜* Y K¨y¸¸¸|ÈEÈ7ÐSˆÙØ�Z ˜zÐ*Ñ*ˆCØ�x‰x˜‹}Ðr$   c                 ól   — | j                  d«      }|› d|› �}t        | j                  |dg¬«      «      S )NrJ  rT   r  ry   )rE   rä   r­  )r!   rb  rY   r   s       r#   Úget_status_id_from_namezJira.get_status_id_from_name·  s?   € Ø×$Ñ$ XÓ.ˆØ�
˜!˜K˜=Ð)ˆÜ�4×-Ñ-¨c¸7¸)Ð-ÓDÓEÐEr$   c                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )Nr�  rT   z	/statusesrD   r*  s       r#   Úget_status_for_projectzJira.get_status_for_project¼  s2   € Ø×$Ñ$ YÓ/ˆØ�
˜!˜K˜=¨	Ð2ˆØ�x‰x˜‹}Ðr$   c                 óF   — | j                  d«      }| j                  |«      S )zñ
        Returns all time tracking providers. By default, Jira only has one time tracking provider: JIRA provided time
        tracking. However, you can install other time tracking providers via apps from the Atlassian Marketplace.
        zconfiguration/timetracking/listrD   rH   s     r#   Úget_all_time_tracking_providersz$Jira.get_all_time_tracking_providersÁ  s#   € ð
 ×ÑÐ AÓBˆØ�x‰x˜‹}Ðr$   c                 óF   — | j                  d«      }| j                  |«      S )z²
        Returns the time tracking provider that is currently selected. Note that if time tracking is disabled,
        then a successful but empty response is returned.
        zconfiguration/timetrackingrD   rH   s     r#   Ú#get_selected_time_tracking_providerz(Jira.get_selected_time_tracking_providerÉ  s#   € ð
 ×ÑÐ <Ó=ˆØ�x‰x˜‹}Ðr$   c                 óF   — | j                  d«      }| j                  |«      S )zŒ
        Returns the time tracking settings. This includes settings such as the time format, default time unit,
        and others.
        z"configuration/timetracking/optionsrD   rH   s     r#   Úget_time_tracking_settingszJira.get_time_tracking_settingsÑ  s#   € ð
 ×ÑÐ DÓEˆØ�x‰x˜‹}Ðr$   c                 ó˜   — | j                  |«      D ]6  }|j                  «       |d   j                  «       k(  sŒ(t        |d   «      c S  y )Nr¨   rU   )r^  rˆ  rä   )r!   r;   rb  r]  s       r#   re  z%Jira.get_transition_id_to_status_nameÙ  sP   € Ø×4Ñ4°YÓ?ò 	-ˆJØ× Ñ Ó" j°Ñ&6×&<Ñ&<Ó&>Ó>Ü˜: dÑ+Ó,Ò,ð	-ð r$   c                 ó„   — t         j                  d|d   |d   «       | j                  d«      }| j                  ||¬«      S )aË  
        Creates an issue link between two issues.
        The user requires the link issue permission for the issue which will be linked to another issue.
        The specified link type in the request is used to create the link and will create a link from
        the first issue to the second issue using the outward description. It also creates a link from
        the second issue to the first issue using the inward description of the issue link type.
        It will add the supplied comment to the first issue. The comment can have a restriction who can view it.
        If group is specified, only users of this group can view this comment, if roleLevel is specified only users
        who have the specified role can view this comment.
        The user who creates the issue link needs to belong to the specified group or have the specified role.
        :param data: i.e.
        {
            "type": {"name": "Duplicate" },
            "inwardIssue": { "key": "HSP-1"},
            "outwardIssue": {"key": "MKY-1"},
            "comment": { "body": "Linked related issue!",
                         "visibility": { "type": "group", "value": "jira-software-users" }
            }
        }
        :return:
        zLinking issue %s and %sr:  ÚoutwardIssueÚ	issueLinkrV   r  ©r!   r&   r   s      r#   Úcreate_issue_linkzJira.create_issue_linkä  sB   € ô, 	�‰Ð*¨D°Ñ,?ÀÀnÑAUÔVØ×Ñ Ó,ˆØ�y‰y˜ 4ˆyÓ(Ð(r$   c                 óT   — | j                  d«      }|› d|› �}| j                  |«      S )zz
        Returns an issue link with the specified id.
        :param link_id: the issue link id.
        :return:
        r‘  rT   rD   ©r!   rO  rY   r   s       r#   Úget_issue_linkzJira.get_issue_linkþ  s2   € ð ×$Ñ$ [Ó1ˆØ�
˜!˜G˜9Ð%ˆØ�x‰x˜‹}Ðr$   c                 óT   — | j                  d«      }|› d|› �}| j                  |«      S )a  
        Deletes an issue link with the specified id.
        To be able to delete an issue link you must be able to view both issues
        and must have the link issue permission for at least one of the issues.
        :param link_id: the issue link id.
        :return:
        r‘  rT   r˜   r•  s       r#   Úremove_issue_linkzJira.remove_issue_link  s3   € ð ×$Ñ$ [Ó1ˆØ�
˜!˜G˜9Ð%ˆØ�{‰{˜3ÓÐr$   c                 óL   — | j                  d«      }| j                  |dg¬«      S )zÌReturns a list of available issue link types,
        if issue linking is enabled.
        Each issue link type has an id,
        a name and a label for the outward and inward link relationship.
        ÚissueLinkType)ÚissueLinkTypesry   r{  rH   s     r#   Úget_issue_link_typeszJira.get_issue_link_types  s.   € ð ×Ñ Ó0ˆØ×)Ñ)¨#Ð7JÐ6KÐ)ÓLÐLr$   c                 óN   — | j                  «       D �cg c]  }|d   ‘Œ	 c}S c c}w )z@
        Provide issue link type names
        :return:
        r  )rœ  )r!   Ú	link_types     r#   Úget_issue_link_types_nameszJira.get_issue_link_types_names"  s&   € ð
 48×3LÑ3LÓ3NÖO i�	˜&Ó!ÒOÐOùÒOs   “"c                 óJ   — | j                  d«      }| j                  ||¬«      S )zôCreate a new issue link type.
        :param data:
                {
                    "name": "Duplicate",
                    "inward": "Duplicated by",
                    "outward": "Duplicates"
                }
        :return:
        rš  rV   r­   r’  s      r#   Úcreate_issue_link_type_by_jsonz#Jira.create_issue_link_type_by_json)  s'   € ð ×Ñ Ó0ˆØ�y‰y˜ 4ˆyÓ(Ð(r$   Úlink_type_nameÚinwardÚoutwardc                 óà   — |j                  «       | j                  «       D �cg c]  }|j                  «       ‘Œ c}v rt        j                  d«       y|||dœ}| j	                  |¬«      S c c}w )z…Create a new issue link type.
        :param outward:
        :param inward:
        :param link_type_name:
        :return:
        zLink type name already exists)r  r£  r¤  rV   )rˆ  rŸ  r  rË  r¡  )r!   r¢  r£  r¤  r'  r&   s         r#   Úcreate_issue_link_typezJira.create_issue_link_type6  se   € ð ×ÑÓ!¸×9XÑ9XÓ9ZÖ%[°A a§g¡g¥iÒ%[Ñ[Ü�I‰IÐ5Ô6Ø2Ø&°&ÀWÑMˆØ×2Ñ2¸Ð2Ó=Ð=ùò	 &\s   ¢A+Úissue_link_type_idc                 óT   — | j                  d«      }|› d|› �}| j                  |«      S )zRReturns for a given issue link type id all information about this issue link type.rš  rT   rD   ©r!   r§  rY   r   s       r#   Úget_issue_link_typezJira.get_issue_link_typeC  s2   € à×$Ñ$ _Ó5ˆØ�
˜!Ð.Ð/Ð0ˆØ�x‰x˜‹}Ðr$   c                 óT   — | j                  d«      }|› d|› �}| j                  |«      S )z%Delete the specified issue link type.rš  rT   r˜   r©  s       r#   Údelete_issue_link_typezJira.delete_issue_link_typeI  s3   € à×$Ñ$ _Ó5ˆØ�
˜!Ð.Ð/Ð0ˆØ�{‰{˜3ÓÐr$   c                 óX   — | j                  d«      }|› d|› �}| j                  ||¬«      S )a,  
        Update the specified issue link type.
        :param issue_link_type_id:
        :param data: {
                         "name": "Duplicate",
                          "inward": "Duplicated by",
                         "outward": "Duplicates"
                    }
        :return:
        rš  rT   rV   rW   )r!   r§  r&   rY   r   s        r#   Úupdate_issue_link_typezJira.update_issue_link_typeO  s9   € ð ×$Ñ$ _Ó5ˆØ�
˜!Ð.Ð/Ð0ˆØ�x‰x˜ $ˆxÓ'Ð'r$   c                 óF   — | j                  d«      }| j                  |«      S )zE
        Returns a list of all resolutions.
        :return:
        Ú
resolutionrD   rH   s     r#   Úget_all_resolutionszJira.get_all_resolutionsc  s"   € ð
 ×Ñ Ó-ˆØ�x‰x˜‹}Ðr$   Úresolution_idc                 óT   — | j                  d«      }|› d|› �}| j                  |«      S )zZ
        Get Resolution info by id
        :param resolution_id:
        :return:
        r°  rT   rD   )r!   r²  rY   r   s       r#   Úget_resolution_by_idzJira.get_resolution_by_idk  rq   r$   c                 óF   — | j                  d«      }| j                  |«      S )zn
        Get all the ProjectRoles available in Jira. Currently, this list is global.
        :return:
        ÚrolerD   rH   s     r#   Úget_all_global_project_rolesz!Jira.get_all_global_project_rolesz  s"   € ð
 ×Ñ Ó'ˆØ�x‰x˜‹}Ðr$   c                 óF   — | j                  d«      }| j                  |«      S )z‡
        Get all available screens from Jira
        :return: list of json elements of screen with field id, name. description
        ÚscreensrD   rH   s     r#   Úget_all_screenszJira.get_all_screens‡  s"   € ð
 ×Ñ 	Ó*ˆØ�x‰x˜‹}Ðr$   Ú	screen_idc                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )zb
        Get all available fields by screen id
        :param screen_id:
        :return:
        r¹  rT   z/availableFieldsrD   ©r!   r»  rY   r   s       r#   Úget_all_available_screen_fieldsz$Jira.get_all_available_screen_fields�  s5   € ð ×$Ñ$ YÓ/ˆØ�
˜!˜I˜;Ð&6Ð7ˆØ�x‰x˜‹}Ðr$   c                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )zW
        Get tabs for the screen id
        :param screen_id:
        :return:
        r¹  rT   z/tabsrD   r½  s       r#   Úget_screen_tabszJira.get_screen_tabs™  s4   € ð ×$Ñ$ YÓ/ˆØ�
˜!˜I˜; eÐ,ˆØ�x‰x˜‹}Ðr$   Útab_idc                 ó\   — | j                  d«      }|› d|› d|› d�}| j                  |«      S )z~
        Get fields by the tab id and the screen id
        :param tab_id:
        :param screen_id:
        :return:
        r¹  rT   ú/tabs/ú/fieldsrD   )r!   r»  rÁ  rY   r   s        r#   Úget_screen_tab_fieldszJira.get_screen_tab_fields£  s:   € ð ×$Ñ$ YÓ/ˆØ�
˜!˜I˜; f¨V¨H°GÐ<ˆØ�x‰x˜‹}Ðr$   c                 óŠ   — | j                  |«      xs g }g }|D ]&  }|d   }|sŒ| j                  ||¬«      xs g }||z   }Œ( |S )zX
        Get all fields by screen id
        :param screen_id:
        :return:
        rU   )r»  rÁ  )rÀ  rÅ  )r!   r»  Úscreen_tabsre   Ú
screen_tabrÁ  Ú
tab_fieldss          r#   Úget_all_screen_fieldszJira.get_all_screen_fields®  sg   € ð ×*Ñ*¨9Ó5Ò;¸ˆØˆØ%ò 	-ˆJØ Ñ%ˆFÚØ!×7Ñ7À)ÐTZÐ7Ó[ÒaÐ_a�
Ø *Ñ,‘ð		-ð
 ˆr$   c                 óB   — d|› d|› d�}d|i}| j                  ||¬«      S )z¶
        Add field to a given tab in a screen
        :param field_id: field or custom field ID to be added
        :param screen_id: screen ID
        :param tab_id: tab ID
        zrest/api/2/screens/rÃ  rÄ  ÚfieldIdrV   rÈ   )r!   r(  r»  rÁ  r   r&   s         r#   Ú	add_fieldzJira.add_field½  s5   € ð $ I ;¨f°V°H¸GÐDˆØ˜8Ð$ˆØ�y‰y˜ 4ˆyÓ(Ð(r$   Úvalidate_queryc                 ó¼  — | j                   r%|dk(  r| j                  ||||¬«      S t        d«      ‚i }|�t        |«      |d<   |�t        |«      |d<   |�1t	        |t
        t        t        f«      rdj                  |«      }||d<   |�||d<   |�||d	<   |�||d
<   | j                   r| j                  d«      }n| j                  d«      }| j                  ||¬«      S )aZ  
        Get issues from jql search result with all related fields
        :param jql:
        :param fields: list of fields, for example: ['priority', 'summary', 'customfield_10007']
        :param start: OPTIONAL: The start point of the collection to return. Default: 0.
        :param limit: OPTIONAL: The limit of the number of issues to return, this may be restricted by
                fixed system limits. Default by built-in method: 50
        :param expand: OPTIONAL: expand the search result
        :param validate_query: OPTIONAL: Whether to validate the JQL query
        :return:
        r   ©r<  re   r¢   r}  zPThe `jql` method is deprecated in Jira Cloud. Use `enhanced_jql` method instead.r  r  r„  re   r<  r}  ÚvalidateQueryú
search/jqlr  rC   )r0   Úenhanced_jqlr3   rä   rã   ræ   r†  r‡  r„   rE   r1   )	r!   r<  re   r  r¢   r}  rÎ  r%   r   s	            r#   r<  zJira.jqlÍ  s  € ð( �:Š:Ø˜ŠzØ×(Ñ(ØØ!ØØ!ð	 )ó ð ô !Ð!sÓtÐtØˆØÐÜ # E£
ˆF�9ÑØÐÜ#& u£:ˆF�<Ñ ØÐÜ˜&¤4¬´Ð"4Ô5ØŸ™ &Ó)�Ø%ˆF�8ÑØˆ?ØˆF�5‰MØÐØ%ˆF�8ÑØÐ%Ø&4ˆF�?Ñ#Ø�:Š:Ø×#Ñ# LÓ1‰Cà×#Ñ# HÓ-ˆCØ�x‰x˜ FˆxÓ+Ð+r$   ÚnextPageTokenc                 ó>  — | j                   st        d«      ‚i }|�t        |«      |d<   |�t        |«      |d<   |�1t	        |t
        t        t        f«      rdj                  |«      }||d<   |�||d<   |�||d<   | j                  d«      }| j                  ||¬	«      S )
a  
        Get issues from jql search result with all related fields
        :param jql:
        :param fields: list of fields, for example: ['priority', 'summary', 'customfield_10007']
        :param nextPageToken (Optional[str]): Token for paginated results. Default: None.
        :param limit: OPTIONAL: The limit of the number of issues to return, this may be restricted by
                fixed system limits. Default by built-in method: 50
        :param expand: OPTIONAL: expand the search result
        :return:
        zA``enhanced_jql`` method is only available for Jira Cloud platformrÔ  r  r„  re   r<  r}  rÒ  rC   )r0   r3   r.   rä   rã   ræ   r†  r‡  r„   rE   r1   )r!   r<  re   rÔ  r¢   r}  r%   r   s           r#   rÓ  zJira.enhanced_jql   sµ   € ð& �zŠzÜÐ`ÓaÐaØˆàÐ$Ü&)¨-Ó&8ˆF�?Ñ#ØÐÜ#& u£:ˆF�<Ñ ØÐÜ˜&¤4¬´Ð"4Ô5ØŸ™ &Ó)�Ø%ˆF�8ÑØˆ?ØˆF�5‰MØÐØ%ˆF�8ÑØ×Ñ Ó-ˆØ�x‰x˜ FˆxÓ+Ð+r$   c                 ó~   — | j                   st        d«      ‚d|i}| j                  d«      }| j                  ||«      S )z 
        Get an approximate count of issues matching a JQL search string.

        :param jql: The JQL search string.
        :return: The issue count.
        úL``approximate_issue_count`` method is only available for Jira Cloud platformr<  zsearch/approximate-count©r0   r3   rE   r®   )r!   r<  r&   r   s       r#   Úapproximate_issue_countzJira.approximate_issue_count&  sB   € ð �zŠzÜÐkÓlÐlà�sˆ|ˆà×ÑÐ :Ó;ˆØ�y‰y˜˜dÓ#Ð#r$   Ú	issue_idsÚjqlsc                 ó‚   — | j                   st        d«      ‚||dœ}| j                  d«      }| j                  ||¬«      S )aë  
        Checks which issues match a list of JQL queries.

        This method corresponds to the /rest/api/3/jql/match endpoint.
        It helps you verify if a set of issues would be returned by given JQL queries.

        :param issue_ids: A list of issue IDs to be checked against the JQLs.
        :param jqls: A list of JQL query strings to match.
        :return: A dictionary containing the matching results from the API.
                 For example:
                 {
                     "errors": [],
                     "results": [
                         {
                             "matchedIssues": [10001],
                             "errors": [],
                             "jql": "project = FOO"
                         },
                         {
                             "matchedIssues": ,
                             "errors": [],
                             "jql": "issuetype = Bug"
                         }
                     ]
                 }
        r×  )ÚissueIdsrÛ  z	jql/matchrV   rØ  )r!   rÚ  rÛ  r  r   s        r#   Ú	match_jqlzJira.match_jql9  sD   € ð6 �zŠzÜÐkÓlÐlØ(°$Ñ7ˆØ×Ñ Ó,ˆØ�y‰y˜ 7ˆyÓ+Ð+r$   c                 ó`  — | j                   r%|dk(  r| j                  ||||¬«      S t        d«      ‚i }|�t        |«      |d<   |�1t	        |t
        t        t        f«      rdj                  |«      }||d<   |�||d<   |�||d<   |�||d	<   | j                   r| j                  d
«      }n| j                  d«      }g }		 t        |«      |d<   | j                  ||¬«      }
|
s	 |	S |
d   }|	j                  |«       t        |
d   «      }|€|t        |
d   «      |z   k  r	 |	S |t        |«      z  }Œr)aP  
        Get issues from jql search result with all related fields
        :param jql:
        :param fields: list of fields, for example: ['priority', 'summary', 'customfield_10007']
        :param start: OPTIONAL: The start point of the collection to return. Default: 0.
        :param limit: OPTIONAL: The limit of the number of issues to return, this may be restricted by
                fixed system limits. Default by built-in method: 50
        :param expand: OPTIONAL: expand the search result
        :param validate_query: Whether to validate the JQL query
        :return:
        r   rÐ  zxThe `jql_get_list_of_tickets` method is deprecated in Jira Cloud. Use `enhanced_jql_get_list_of_tickets` method instead.r  r„  re   r<  r}  rÑ  rÒ  r  r  rC   rq  ry  )r0   Ú enhanced_jql_get_list_of_ticketsr3   rä   rã   ræ   r†  r‡  r„   rE   r1   r$  r2   )r!   r<  re   r  r¢   r}  rÎ  r%   r   Úresultsr4   rq  ry  s                r#   Újql_get_list_of_ticketszJira.jql_get_list_of_ticketsZ  s�  € ð( �:Š:Ø˜ŠzØ×<Ñ<ØØ!ØØ!ð	 =ó ð ô !ð Oóð ð ˆØÐÜ#& u£:ˆF�<Ñ ØÐÜ˜&¤4¬´Ð"4Ô5ØŸ™ &Ó)�Ø%ˆF�8ÑØˆ?ØˆF�5‰MØÐØ%ˆF�8ÑØÐ%Ø&4ˆF�?Ñ#Ø�:Š:Ø×#Ñ# LÓ1‰Cà×#Ñ# HÓ-ˆCà "ˆØÜ # E£
ˆF�9ÑØ—x‘x ¨F�xÓ3ˆHÙØð ˆð ˜hÑ'ˆFØ�N‰N˜6Ô"Ü˜ Ñ)Ó*ˆEð Ð  E¬S°¸(Ñ1CÓ-DÀuÑ-LÒ$LØàˆð ”S˜“[Ñ ˆEð r$   c                 óº  — | j                   st        d«      ‚i }|�t        |«      |d<   |�1t        |t        t
        t        f«      rdj                  |«      }||d<   |�||d<   |�||d<   | j                  d«      }g }d}	 |�||d	<   | j                  ||¬
«      }	|	s	 |S |	d   }
|j                  |
«       |	j                  d	«      }|r|�t        |«      |k\  r	 |S Œ\)a,  
        Get issues from JQL search result with all related fields using nextPageToken pagination.

        Applicable only for Jira Cloud.

        :param jql: The JQL search string.
        :param fields: List of fields, for example: ['priority', 'summary', 'customfield_10007']
        :param limit: OPTIONAL: The limit of the number of issues to return, this may be restricted by
                    fixed system limits. Default by built-in method: 50
        :param expand: OPTIONAL: Expand the search result.
        :return: List of issues.
        zF``enhanced_jql_get_list_of_tickets`` is only available for Jira Cloud.Nr  r„  re   r<  r}  rÒ  rÔ  rC   rq  )r0   r3   rä   rã   ræ   r†  r‡  r„   rE   r1   r$  r2   )r!   r<  re   r¢   r}  r%   r   rá  Únext_page_tokenr4   rq  s              r#   rà  z%Jira.enhanced_jql_get_list_of_ticketsž  s  € ð( �zŠzÜÐeÓfÐfàˆØÐÜ#& u£:ˆF�<Ñ ØÐÜ˜&¤4¬´Ð"4Ô5ØŸ™ &Ó)�Ø%ˆF�8ÑØˆ?ØˆF�5‰MØÐØ%ˆF�8Ñà×Ñ Ó-ˆØˆØˆàØÐ*Ø*9��Ñ'à—x‘x ¨F�xÓ3ˆHÙØð ˆð ˜hÑ'ˆFØ�N‰N˜6Ô"Ø&Ÿl™l¨?Ó;ˆOÙ" uÐ'8¼SÀ»\ÈUÒ=RØØˆð r$   Ú
all_fieldsÚ	delimiterc                 óp   — d|i}|r||d<   |r||d<   |r||d<   |rd}nd}| j                  ||ddd	i¬
«      S )as  
            Get issues from jql search result with ALL or CURRENT fields
            default will be to return all fields
        :param jql: JQL query
        :param limit: max results in the output file
        :param all_fields: To return all fields or current fields only
        :param start: index value
        :param delimiter:
        :return: CSV file
        ÚjqlQueryÚtempMaxúpager/startræ  zFsr/jira.issueviews:searchrequest-csv-all-fields/temp/SearchRequest.csvzJsr/jira.issueviews:searchrequest-csv-current-fields/temp/SearchRequest.csvTÚAcceptzapplication/csv©r%   r•   rè  rÌ   )r!   r<  r¢   rå  r  ræ  r%   r   s           r#   ÚcsvzJira.csvÔ  sj   € ð& # CÐ(ˆÙØ %ˆF�9ÑÙØ$)ˆF�=Ñ!ÙØ"+ˆF�;ÑáØZ‰Cà^ˆCà�x‰xØØØ"ØÐ0Ð1ð	 ó 
ð 	
r$   c                 ób   — d|i}|r||d<   |r||d<   |rd}nd}| j                  ||dddi¬	«      S )
aY  
            Get issues from jql search result with ALL or CURRENT fields
            default will be to return all fields
        :param jql: JQL query
        :param limit: max results in the output file
        :param all_fields: To return all fields or current fields only
        :param start: index value
        :return: CSV file
        rè  ré  rê  zHsr/jira.issueviews:searchrequest-excel-all-fields/temp/SearchRequest.xlszLsr/jira.issueviews:searchrequest-excel-current-fields/temp/SearchRequest.xlsTrë  zapplication/vnd.ms-excelrì  rÌ   ©r!   r<  r¢   rå  r  r%   r   s          r#   Úexcelz
Jira.excelû  s]   € ð # CÐ(ˆÙØ %ˆF�9ÑÙØ$)ˆF�=Ñ!áØ\‰Cà`ˆCà�x‰xØØØ"ØÐ9Ð:ð	 ó 
ð 	
r$   c                 ób   — d|i}|r||d<   |r||d<   |rd}nd}| j                  ||dddi¬	«      S )
aV  
        Get issues from jql search result with ALL or CURRENT fields
            default will be to return all fields
        :param jql: JQL query
        :param limit: max results in the output file
        :param all_fields: To return all fields or current fields only
        :param start: index value
        :return: HTML file
        rè  ré  rê  zHsr/jira.issueviews:searchrequest-html-all-fields/temp/SearchRequest.htmlzLsr/jira.issueviews:searchrequest-html-current-fields/temp/SearchRequest.htmlTrë  zapplication/xhtml+xmlrì  rÌ   rï  s          r#   Úexport_htmlzJira.export_html  s]   € ð # CÐ(ˆÙØ %ˆF�9ÑÙØ$)ˆF�=Ñ!áØ\‰Cà`ˆCà�x‰xØØØ"ØÐ6Ð7ð	 ó 
ð 	
r$   c                 óF   — | j                  d«      }| j                  |«      S )zD
        Returns a list of all priorities.
        :return:
        ÚpriorityrD   rH   s     r#   Úget_all_prioritieszJira.get_all_priorities7  ó"   € ð
 ×Ñ 
Ó+ˆØ�x‰x˜‹}Ðr$   Úpriority_idc                 óT   — | j                  d«      }|› d|› �}| j                  |«      S )zV
        Get Priority info by id
        :param priority_id:
        :return:
        rô  rT   rD   )r!   r÷  rY   r   s       r#   Úget_priority_by_idzJira.get_priority_by_id?  s2   € ð ×$Ñ$ ZÓ0ˆØ�
˜!˜K˜=Ð)ˆØ�x‰x˜‹}Ðr$   c                 óF   — | j                  d«      }| j                  |«      S )zN
        Provide all workflows for application admin
        :return:
        ÚworkflowrD   rH   s     r#   Úget_all_workflowszJira.get_all_workflowsN  rö  r$   Ústart_atÚmax_resultsÚworkflow_namec                 ó†   — | j                  d«      }i }|r||d<   |r||d<   |r||d<   |r||d<   | j                  ||¬«      S )aÍ  
        Provide all workflows paginated (see https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-workflows/#api-rest-api-2-workflow-search-get)
        :param expand:
        :param start_at: OPTIONAL The index of the first item to return in a page of results (page offset).
        :param max_results: OPTIONAL The maximum number of items to return per page.
        :param workflow_name: OPTIONAL The name of a workflow to return.
        :param: expand: OPTIONAL Use expand to include additional information in the response. This parameter accepts a
            comma-separated list. Expand options include: transitions, transitions.rules, statuses, statuses.properties
        :return:
        zworkflow/searchr  r  ÚworkflowNamer}  rC   rD   )r!   rý  rþ  rÿ  r}  r   r%   s          r#   Úget_workflows_paginatedzJira.get_workflows_paginatedV  sa   € ð$ ×ÑÐ 1Ó2ˆàˆÙØ (ˆF�9ÑÙØ#.ˆF�<Ñ ÙØ%2ˆF�>Ñ"ÙØ%ˆF�8Ñà�x‰x˜ FˆxÓ+Ð+r$   c                 óF   — | j                  d«      }| j                  |«      S )zA
        Returns a list of all statuses
        :return:
        rJ  rD   rH   s     r#   Úget_all_statuseszJira.get_all_statusesv  rš  r$   c                 óB   — d}| j                  || j                  d¬«      S )zR
        Provide plugins info
        :return a json of installed plugins
        úrest/plugins/1.0/T©rè  r(   ©r1   rê  rH   s     r#   Úget_plugins_infozJira.get_plugins_info~  s$   € ð
 "ˆØ�x‰x˜ T×%:Ñ%:ÀTˆxÓJÐJr$   Ú
plugin_keyc                 óJ   — d|› d�}| j                  || j                  d¬«      S )zQ
        Provide plugin info
        :return a json of installed plugins
        r  ú-keyTr  r  ©r!   r
  r   s      r#   Úget_plugin_infozJira.get_plugin_info†  s-   € ð
 " * ¨TÐ2ˆØ�x‰x˜ T×%:Ñ%:ÀTˆxÓJÐJr$   c                 óJ   — d|› d�}| j                  || j                  d¬«      S )z[
        Provide plugin license info
        :return a json specific License query
        r  z-key/licenseTr  r  r  s      r#   Úget_plugin_license_infozJira.get_plugin_license_infoŽ  s-   € ð
 " * ¨\Ð:ˆØ�x‰x˜ T×%:Ñ%:ÀTˆxÓJÐJr$   Úplugin_pathc                 ó¼   — dt        |d«      i}| j                  dd| j                  d¬«      j                  d   }d|› �}| j	                  ||| j                  ¬	«      S )
zƒ
        Provide plugin path for upload into Jira e.g. useful for auto deploy
        :param plugin_path:
        :return:
        Úpluginrã  ÚGETr  T)Úmethodrr   rè  r(   z	upm-tokenzrest/plugins/1.0/?token=)ré  rè  )rˆ   Úrequestrê  rè  r®   )r!   r  ré  Ú	upm_tokenr   s        r#   Úupload_pluginzJira.upload_plugin–  sq   € ð œ4 ¨TÓ2Ð3ˆØ—L‘LØØ$Ø×)Ñ)Øð	 !ó 
÷
 ‰'�+ñˆ	ð )¨¨Ð4ˆØ�y‰y˜ E°4×3HÑ3HˆyÓIÐIr$   c                 ó0   — d|› d�}| j                  |«      S )zK
        Delete plugin
        :param plugin_key:
        :return:
        r  r  r×  r  s      r#   Údelete_pluginzJira.delete_plugin¦  s!   € ð " * ¨TÐ2ˆØ�{‰{˜3ÓÐr$   c                 óB   — d}| j                  d|| j                  ¬«      S )Nzrest/plugins/latest/safe-moder  )r  rr   rè  )r  Úsafe_mode_headersrH   s     r#   Úcheck_plugin_manager_statusz Jira.check_plugin_manager_status¯  s"   € Ø-ˆØ�|‰| 5¨s¸D×<RÑ<Rˆ|ÓSÐSr$   Úraw_licensec                 óH   — dddœ}d|› d�}d|i}| j                  |||¬«      S )zs
        Update license for plugin
        :param plugin_key:
        :param raw_license:
        :return:
        úno-checkú application/vnd.atl.plugins+json©zX-Atlassian-TokenzContent-Typez/plugins/1.0/z/licenseÚ
rawLicense©r&   rè  rÖ  )r!   r
  r  Úapp_headersr   r&   s         r#   Úupdate_plugin_licensezJira.update_plugin_license³  s@   € ð ",Ø>ñ
ˆð ˜j˜\¨Ð2ˆØ˜kÐ*ˆØ�x‰x˜ $°ˆxÓ<Ð<r$   c                 óH   — dddœ}d|› d�}ddi}| j                  |||¬«      S )	zN
        Disable a plugin
        :param plugin_key:
        :return:
        r   r!  r"  r  r  rJ  r4  r$  rÖ  ©r!   r
  r%  r   r&   s        r#   Údisable_pluginzJira.disable_pluginÂ  s@   € ð ",Ø>ñ
ˆð " * ¨TÐ2ˆØ˜*Ð%ˆØ�x‰x˜ $°ˆxÓ<Ð<r$   c                 óH   — dddœ}d|› d�}ddi}| j                  |||¬«      S )	zM
        Enable a plugin
        :param plugin_key:
        :return:
        r   r!  r"  r  r  rJ  Úenabledr$  rÖ  r(  s        r#   Úenable_pluginzJira.enable_pluginÐ  s@   € ð ",Ø>ñ
ˆð " * ¨TÐ2ˆØ˜)Ð$ˆØ�x‰x˜ $°ˆxÓ<Ð<r$   c                 ó`   — | j                  d«      }i }|r||d<   | j                  ||dg¬«      S )a“  
        Returns a list of all permission schemes.
        By default, only shortened beans are returned.
        If you want to include permissions of all the schemes,
        then specify the permissions expand parameter.
        Permissions will be included also if you specify any other expand parameter.
        :param expand : permissions,user,group,projectRole,field,all
        :return:
        Úpermissionschemer}  )ÚpermissionSchemes)r%   re   r{  ©r!   r}  r   r%   s       r#   Úget_all_permissionschemeszJira.get_all_permissionschemesÞ  sC   € ð ×ÑÐ 2Ó3ˆØˆÙØ%ˆF�8ÑØ×)Ñ)¨#°fÐF\ÐE]Ð)Ó^Ð^r$   c                 ój   — | j                  d«      }|› d|› �}i }|r||d<   | j                  ||¬«      S )a°  
        Returns a list of all permission schemes.
        By default, only shortened beans are returned.
        If you want to include permissions of all the schemes,
        then specify the permissions expand parameter.
        Permissions will be included also if you specify any other expand parameter.
        :param permission_id
        :param expand : permissions,user,group,projectRole,field,all
        :return:
        r.  rT   r}  rC   rD   )r!   r]  r}  rY   r   r%   s         r#   Úget_permissionschemezJira.get_permissionschemeî  sJ   € ð ×$Ñ$Ð%7Ó8ˆØ�
˜!˜M˜?Ð+ˆØˆÙØ%ˆF�8ÑØ�x‰x˜ FˆxÓ+Ð+r$   Únew_permissionc                 óZ   — | j                  d«      }|› d|› d�}| j                  ||¬«      S )a^  
        Creates a permission grant in a permission scheme.
        Example:

        {
            "holder": {
                "type": "group",
                "parameter": "jira-developers"
            },
            "permission": "ADMINISTER_PROJECTS"
        }

        :param permission_id
        :param new_permission
        :return:
        r.  rT   rR  rV   r­   )r!   r]  r4  rY   r   s        r#   Úset_permissionscheme_grantzJira.set_permissionscheme_grant   s:   € ð" ×$Ñ$Ð%7Ó8ˆØ�
˜!˜M˜?¨+Ð6ˆØ�y‰y˜ >ˆyÓ2Ð2r$   Úscopec                 óž   — | j                  d«      }|› d|› �}d|i}	|�||	d<   |�||	d<   |�||	d<   i }
|r||
d<   | j                  ||	|
¬«      S )	a¿  
        Updates a permission scheme. Below are some important things to note when using this resource:
        - If a permissions list is present in the request, then it is set in the permission scheme, overwriting all existing grants.
        - If you want to update only the name and description, then do not send a permissions list in the request.
        - Sending an empty list will remove all permission grants from the permission scheme.

        Cloud API docs: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permission-schemes/#api-rest-api-3-permissionscheme-schemeid-put

        :param permission_id: int, REQUIRED: The ID of the permission scheme to update.
        :param name: str, REQUIRED: The name of the permission scheme. Must be unique.
        :param description: str, OPTIONAL: A description for the permission scheme. Defaults to None.
        :param permissions: List[dict], OPTIONAL: A collection of permission grants. Defaults to None.
            Example:
                [
                    {
                        "holder": {
                            "parameter": "jira-core-users",
                            "type": "group",
                            "value": "ca85fac0-d974-40ca-a615-7af99c48d24f"
                        },
                        "permission": "ADMINISTER_PROJECTS"
                    }
                ]
        :param scope: OPTIONAL: The scope of the permission scheme.
        :param expand: str, OPTIONAL: Use expand to include additional information in the response.
            This parameter accepts a comma-separated list.
            Note that permissions are always included when you specify any value.

        :return:
        r.  rT   r  r#  r7   r7  r}  rÇ  rW   )r!   r]  r  r#  r7   r7  r}  rY   r   r&   r%   s              r#   Úupdate_permissionschemezJira.update_permissionscheme  s…   € ðN ×$Ñ$Ð%7Ó8ˆØ�
˜!˜M˜?Ð+ˆØ˜d�^ˆØÐ"Ø"-ˆD�ÑØÐ"Ø"-ˆD�ÑØÐØ!ˆD�‰MàˆÙØ%ˆF�8Ñà�x‰x˜ $¨vˆxÓ6Ð6r$   c                 óL   — | j                  d«      }| j                  |dg¬«      S )z†
        Returns all issue security schemes that are defined
        Administrator permission required

        :return: list
        Úissuesecurityschemes)ÚissueSecuritySchemesry   r{  rH   s     r#   Úget_issue_security_schemeszJira.get_issue_security_schemesS  s/   € ð ×ÑÐ 6Ó7ˆØ×)Ñ)¨#Ð7PÐ6QÐ)ÓRÐRr$   Ú	scheme_idÚonly_levelsc                 ó„   — | j                  d«      }|› d|› �}|du r| j                  |dg¬«      S | j                  |«      S )aF  
        Returns the issue security scheme along with that are defined

        Returned if the user has the administrator permission or if the scheme is used in a project in which the
        user has the administrative permission

        :param scheme_id: int
        :param only_levels: bool
        :return: list
        r;  rT   T)Úlevelsry   )rE   r­  r1   )r!   r>  r?  rY   r   s        r#   Úget_issue_security_schemezJira.get_issue_security_scheme]  sS   € ð ×$Ñ$Ð%;Ó<ˆØ�
˜!˜I˜;Ð'ˆà˜$ÑØ×-Ñ-¨c¸;¸-Ð-ÓHÐHà—8‘8˜C“=Ð r$   c                 óš  — | j                  d«      }|› d|› d�}	 | j                  |«      }|du r|r|j                  d«      xs dS |S # t        $ rx}|j                  j                  dk(  rt        d|¬«      ‚|j                  j                  dk(  rt        d|¬«      ‚|j                  j                  d	k(  rt        d
|¬«      ‚‚ d}~ww xY w)a>  
        Returns the issue security scheme for project

        Returned if the user has the administrator permission or if the scheme is used in a project in which the
        user has the administrative permission

        :param project_id_or_key: int
        :param only_levels: bool
        :return: list
        r�  rT   z/issuesecuritylevelschemei‘  z&Returned if the user is not logged in.r"  i“  z,User doesn't have administrative permissionsrí  zMReturned if the project does not exist, or is not visible to the calling userNTrA  )rE   r1   r   r4   rî  r   r   )r!   rB  r?  rY   r   r4   r’   s          r#   Ú!get_project_issue_security_schemez&Jira.get_project_issue_security_schemep  sÞ   € ð ×$Ñ$ YÓ/ˆØ�
˜!Ð-Ð.Ð.GÐHˆð	Ø—x‘x “}ˆHð ˜$Ñ¡8Ø—<‘< Ó)Ò1¨TÐ1Øˆøô ò 
	Ø�z‰z×%Ñ%¨Ò,Ü(Ð)QÐZ[Ô\Ð\Ø—‘×'Ñ'¨3Ò.Ü(Ð)WÐ`aÔbÐbØ—‘×'Ñ'¨3Ò.Ü&ØcØôð ð ûð
	ús   ›A	 Á		C
ÁA3CÃC
c                 óœ   — | j                  d«      }i }|rt        |«      |d<   |rt        |«      |d<   |r||d<   | j                  ||¬«      S )aÉ  
        Returns all priority schemes.
        All project keys associated with the priority scheme will only be returned
        if additional query parameter is provided expand=schemes.projectKeys.
        :param start: the page offset, if not specified then defaults to 0
        :param limit: how many results on the page should be included. Defaults to 100, maximum is 1000.
        :param expand: can be 'schemes.projectKeys'
        :return:
        Úpriorityschemesr  r  r}  rC   )rE   rä   r1   )r!   r  r¢   r}  r   r%   s         r#   Úget_all_priority_schemeszJira.get_all_priority_schemesŽ  s\   € ð ×ÑÐ 1Ó2ˆØˆÙÜ # E£
ˆF�9ÑÙÜ#& u£:ˆF�<Ñ ÙØ%ˆF�8ÑØ�x‰x˜ FˆxÓ+Ð+r$   c                 óJ   — | j                  d«      }| j                  ||¬«      S )aÕ  
        Creates new priority scheme.
        :param data:
                {"name": "New priority scheme",
                "description": "Priority scheme for very important projects",
                "defaultOptionId": "3",
                "optionIds": [
                    "1",
                    "2",
                    "3",
                    "4",
                    "5"
                ]}
        :return: Returned if the priority scheme was created.
        rF  )rr   r&   r­   r’  s      r#   Úcreate_priority_schemezJira.create_priority_scheme¢  s(   € ð  ×ÑÐ 1Ó2ˆØ�y‰y˜c¨ˆyÓ-Ð-r$   Úproject_key_or_idc                 ól   — i }|r||d<   | j                  d«      }|› d|› d�}| j                  ||¬«      S )az  
        Gets a full representation of a priority scheme in JSON format used by specified project.
        Resource for associating priority scheme schemes and projects.
        User must be global administrator or project administrator.
        :param project_key_or_id:
        :param expand: notificationSchemeEvents,user,group,projectRole,field,all
        :return:
        r}  r�  rT   ú/priorityschemerC   rD   )r!   rJ  r}  r%   rY   r   s         r#   Úget_priority_scheme_of_projectz#Jira.get_priority_scheme_of_project»  sM   € ð ˆÙØ%ˆF�8ÑØ×$Ñ$ YÓ/ˆØ�
˜!Ð-Ð.¨oÐ>ˆØ�x‰x˜ FˆxÓ+Ð+r$   Úpriority_scheme_idc                 ób   — | j                  d«      }|› d|› d�}d|i}| j                  ||¬«      S )a  
        Assigns project with priority scheme. Priority scheme assign with migration is possible from the UI.
        Operation will fail if migration is needed as a result of operation
        e.g. there are issues with priorities invalid in the destination scheme.
        All project keys associated with the priority scheme will only be returned
        if additional query parameter is provided expand=projectKeys.
        :param project_key_or_id:
        :param priority_scheme_id:
        :return:
        r�  rT   rL  rU   rV   rW   )r!   rJ  rN  rY   r   r&   s         r#   Ú"assign_priority_scheme_for_projectz'Jira.assign_priority_scheme_for_projectË  sF   € ð ×$Ñ$ YÓ/ˆØ�
˜!Ð-Ð.¨oÐ>ˆØÐ(Ð)ˆØ�x‰x˜ $ˆxÓ'Ð'r$   c                 óV   — | j                  d«      }|› d|› d�}| j                  |«      S )aV  
        Returns all security levels for the project that the current logged-in user has access to.
        If the user does not have the Set Issue Security permission, the list will be empty.
        :param project_key_or_id:
        :return: Returns a list of all security levels in a project for which the current user has access.
        r�  rT   z/securitylevelrD   )r!   rJ  rY   r   s       r#   Úget_security_level_for_projectz#Jira.get_security_level_for_projectá  s6   € ð ×$Ñ$ YÓ/ˆØ�
˜!Ð-Ð.¨nÐ=ˆØ�x‰x˜‹}Ðr$   c                 óF   — | j                  d«      }| j                  |«      S )a  
        Returns all the project types defined on the Jira instance,
        not taking into account whether the license to use those project types is valid or not.
        :return: Returns a list with all the project types defined on the Jira instance.
        zproject/typerD   rH   s     r#   Úget_all_project_typeszJira.get_all_project_typesñ  s"   € ð ×Ñ Ó/ˆØ�x‰x˜‹}Ðr$   c                 óF   — | j                  d«      }| j                  |«      S )zg
        Returns all project categories
        :return: Returns a list of project categories.
        ÚprojectCategoryrD   rH   s     r#   Úget_all_project_categorieszJira.get_all_project_categoriesÿ  s#   € ð
 ×ÑÐ 1Ó2ˆØ�x‰x˜‹}Ðr$   c                 óR   — d|i}| j                  d«      }| j                  ||¬«      S )z_
        Validates a project key.
        :param key: the project key
        :return:
        rJ   zprojectvalidate/keyrC   rD   )r!   rJ   r%   r   s       r#   Úget_project_validated_keyzJira.get_project_validated_key  s1   € ð ˜s�|ˆØ×ÑÐ 5Ó6ˆØ�x‰x˜ FˆxÓ+Ð+r$   c                 ó>   — d|› d�}d|gi}| j                  ||¬«      S )am  
        Associate an issue type scheme with an additional project
        https://docs.atlassian.com/software/jira/docs/api/REST/8.5.8#api/2/issuetypescheme-addProjectAssociationsToScheme
        :param scheme_id: The issue type scheme ID to update
        :param project_key: The project key to associate with the given issue type scheme
        :return:
        úrest/api/2/issuetypescheme/z/associationsÚ	idsOrKeysrV   rÈ   )r!   r>  r9   r   r&   s        r#   Úadd_issue_type_schemezJira.add_issue_type_scheme  s1   € ð ,¨I¨;°mÐDˆØ˜k˜]Ð+ˆØ�y‰y˜ 4ˆyÓ(Ð(r$   Údefault_issue_type_idÚissue_type_idsc                 ó:   — d}||||dœ}| j                  ||¬«      S )aÀ  
        Create an issue type scheme
        https://docs.atlassian.com/software/jira/docs/api/REST/8.13.6/#api/2/issuetypescheme-createIssueTypeScheme
        :param name: The issue type scheme name
        :param description: The issue type scheme description
        :param default_issue_type_id: The default issue type id for this type scheme
        :param issue_type_ids: A list of strings of available issue type ids for this scheme
        r[  )r  r#  ÚdefaultIssueTypeIdÚissueTypeIdsrV   rÈ   )r!   r  r#  r^  r_  r   r&   s          r#   Úcreate_issuetype_schemezJira.create_issuetype_scheme&  s1   € ð ,ˆàØ&Ø"7Ø*ñ	
ˆð �y‰y˜ 4ˆyÓ(Ð(r$   r!  Úchange_historyÚworklogsÚindexing_typec                 ó†   — i }|s||d<   |s||d<   |s||d<   |s||d<   | j                  d«      }| j                  ||¬«      S )a  
        Reindex the Jira instance
        Kicks off a reindex. Need Admin permissions to perform this reindex.
        Type of re-indexing available:
        FOREGROUND - runs a lock/full reindexing
        BACKGROUND - runs a background reindexing.
                   If Jira fails to finish the background reindexing, respond with 409 Conflict (error message).
        BACKGROUND_PREFERRED  - If possible do a background reindexing.
                   If it's not possible (due to an inconsistent index), do a foreground reindexing.
        :param comments: Indicates that comments should also be reindexed. Not relevant for foreground reindex,
        where comments are always reindexed.
        :param change_history: Indicates that changeHistory should also be reindexed.
        Not relevant for foreground reindex, where changeHistory is always reindexed.
        :param worklogs: Indicates that changeHistory should also be reindexed.
        Not relevant for foreground reindex, where changeHistory is always reindexed.
        :param indexing_type: OPTIONAL: The default value for the type is BACKGROUND_PREFERRED
        :return:
        ÚindexCommentsÚindexChangeHistoryÚindexWorklogsr!  ÚreindexrC   r­   )r!   r!  rd  re  rf  r%   r   s          r#   rk  zJira.reindex?  s`   € ð2 ˆÙØ&.ˆF�?Ñ#ÙØ+9ˆFÐ'Ñ(ÙØ&.ˆF�?Ñ#ÙØ*ˆF�6‰NØ×Ñ 	Ó*ˆØ�y‰y˜ VˆyÓ,Ð,r$   c                 ó&   — | j                  |¬«      S )aC  
        Reindex the Jira instance
        Type of re-indexing available:
        FOREGROUND - runs a lock/full reindexing
        BACKGROUND - runs a background reindexing.
                   If Jira fails to finish the background reindexing, respond with 409 Conflict (error message).
        BACKGROUND_PREFERRED  - If possible do a background reindexing.
                   If it's not possible (due to an inconsistent index), do a foreground reindexing.
        :param indexing_type: OPTIONAL: The default value for the type is BACKGROUND_PREFERRED
        :return:
        )rf  )rk  )r!   rf  s     r#   Úreindex_with_typezJira.reindex_with_typed  s   € ð �|‰|¨-ˆ|Ó8Ð8r$   c                 óF   — | j                  d«      }| j                  |«      S )aa  
        Returns information on the system reindexes.
        If a reindex is currently taking place then information about this reindex is returned.
        If there is no active index task, then returns information about the latest reindex task run,
        otherwise returns a 404 indicating that no reindex has taken place.
        :return:
        rk  rD   rH   s     r#   Úreindex_statuszJira.reindex_statusr  s"   € ð ×Ñ 	Ó*ˆØ�x‰x˜‹}Ðr$   c                 óD   — | j                  dd|› �| j                  ¬«      S )Nzsecure/admin/IndexProject.jspazconfirmed=true&key=r$  )r®   rÐ  )r!   r9   s     r#   Úreindex_projectzJira.reindex_project}  s.   € Ø�y‰yØ,Ø& { mÐ4Ø×+Ñ+ð ó 
ð 	
r$   Úlist_of_c                  ó   — y r{   © )r!   rr  s     r#   Úreindex_issuezJira.reindex_issue„  s   € Ør$   c                 ó4   — d}d|i}| j                  ||¬«      S )z[
        Jira DC Index health checker
        :param max_results:
        :return:
        zrest/indexanalyzer/1/stater  rC   rÌ   )r!   rþ  r   r%   s       r#   Úindex_checkerzJira.index_checker‡  s&   € ð +ˆØ$ kÐ2ˆØ�x‰x˜ FˆxÓ+Ð+r$   Údo_health_checkc                 ó\   — |rd}nd}| j                  d«      }| j                  |d|i¬«      S )zo
        Returns general information about the current Jira server.
        with health checks or not.
        TFÚ
serverInfoÚdoHealthCheckrC   rD   )r!   rx  Úcheckr   s       r#   Úget_server_infozJira.get_server_info‘  s9   € ñ
 Ø‰EàˆEØ×Ñ Ó-ˆØ�x‰x˜ _°eÐ$<ˆxÓ=Ð=r$   Úskip_archivedc                 óL   — i }|�||d<   |�||d<   d}| j                  ||¬«      S )a  
        Get all Accounts that the logged-in user has permission to browse.
        :param skip_archived: bool OPTIONAL: skip archived Accounts, either true or false, default value true.
        :param expand: bool OPTIONAL: With expanded data or not
        :return:
        ÚskipArchivedr}  zrest/tempo-accounts/1/accountrC   rÌ   )r!   r~  r}  r%   r   s        r#   Útempo_account_get_accountszJira.tempo_account_get_accounts   sA   € ð ˆØÐ$Ø%2ˆF�>Ñ"ØÐØ%ˆF�8ÑØ-ˆØ�x‰x˜ FˆxÓ+Ð+r$   c                 ó.   — d|› �}| j                  |«      S )a	  
        Get Accounts by JIRA Project. The Caller must have the Browse Account permission for Account.
        This will return Accounts for which the Caller has Browse Account Permission for.
        :param project_id: str the project id.
        :return:
        z&rest/tempo-accounts/1/account/project/rÌ   ©r!   r8   r   s      r#   Ú*tempo_account_get_accounts_by_jira_projectz/Jira.tempo_account_get_accounts_by_jira_project±  s   € ð 7°z°lÐCˆØ�x‰x˜‹}Ðr$   Údefault_accountrž  c                 ór   — i }|r||d<   |r||d<   |r||d<   |r||d<   d|d<   d}| j                  ||¬«      S )	aà  
        The AccountLinkBean for associate Account with project
        Adds a link to an Account.
        {
            scopeType:PROJECT
            defaultAccount:boolean
            linkType:IMPORTED | MANUAL
            name:string
            key:string
            accountId:number
            scope:number
            id:number
        }
        :param project_id:
        :param account_id
        :param default_account
        :param link_type
        :return:
        ru  ÚdefaultAccountÚlinkTyper7  ÚPROJECTÚ	scopeTypezrest/tempo-accounts/1/link/rV   rÈ   )r!   rq  r8   r…  rž  r&   r   s          r#   Ú)tempo_account_associate_with_jira_projectz.Jira.tempo_account_associate_with_jira_project»  s_   € ð, ˆÙØ *ˆD�ÑÙØ%4ˆDÐ!Ñ"ÙØ(ˆD�ÑÙØ&ˆD�‰MØ%ˆˆ[Ñà+ˆØ�y‰y˜ 4ˆyÓ(Ð(r$   c                 ó2   — d}|€y| j                  ||¬«      S )z¨
        Creates Account, adding new Account requires the Manage Accounts Permission.
        :param data: String then it will convert to json
        :return:
        úrest/tempo-accounts/1/account/a7  Please, provide data e.g.
                       {name: "12312312321",
                       key: "1231231232",
                       lead: {name: "myusername"},
                       }
                       detail info: http://developer.tempo.io/doc/accounts/api/rest/latest/#-700314780
                   rV   rÈ   r’  s      r#   Útempo_account_add_accountzJira.tempo_account_add_accountß  s(   € ð /ˆØˆ<ðð �y‰y˜ 4ˆyÓ(Ð(r$   c                 ó0   — d|› d�}| j                  |«      S )a   
        Delete an Account by id. Caller must have the Manage Account Permission for the Account.
        The Account can not be deleted if it has an AccountLinkBean.
        :param account_id: the id of the Account to be deleted.
        :return:
        r�  rT   r×  )r!   rq  r   s      r#   Ú"tempo_account_delete_account_by_idz'Jira.tempo_account_delete_account_by_idð  s!   € ð /¨z¨l¸!Ð<ˆØ�{‰{˜3ÓÐr$   c                 ó6   — d|dœ}d}| j                  ||¬«      S )z}
        Returns a rate table for the specified account.
        :param account_id: the account id.
        :return:
        ÚACCOUNT)rŠ  ÚscopeIdzrest/tempo-accounts/1/ratetablerC   rÌ   rë  s       r#   Ú*tempo_account_get_rate_table_by_account_idz/Jira.tempo_account_get_rate_table_by_account_idú  s&   € ð &/¸:ÑFˆØ/ˆØ�x‰x˜ FˆxÓ+Ð+r$   Úcustomer_idc                 ó0   — d|› d�}| j                  |«      S )z¹
        Get un-archived Accounts by customer. The Caller must have the Browse Account permission for the Account.
        :param customer_id: the Customer id.
        :return:
        z'rest/tempo-accounts/1/account/customer/rT   rÌ   ©r!   r•  r   s      r#   Ú,tempo_account_get_all_account_by_customer_idz1Jira.tempo_account_get_all_account_by_customer_id  s    € ð 8¸°}ÀAÐFˆØ�x‰x˜‹}Ðr$   Úcount_accountsc                 óL   — i }|�||d<   |�||d<   d}| j                  ||¬«      S )aC  
        Gets all or some Attribute whose key or name contain a specific substring.
        Attributes can be a Category or Customer.
        :param query: OPTIONAL: query for search
        :param count_accounts: bool OPTIONAL: provide how many associated Accounts with Customer
        :return: list of customers
        r`  ÚcountAccountsúrest/tempo-accounts/1/customerrC   rÌ   )r!   r`  r™  r%   r   s        r#   Útempo_account_get_customersz Jira.tempo_account_get_customers  s@   € ð ˆØÐØ#ˆF�7‰OØÐ%Ø&4ˆF�?Ñ#Ø.ˆØ�x‰x˜ FˆxÓ+Ð+r$   c                 ó6   — ||dœ}d}| j                  ||¬«      S )a  
        Gets all or some Attribute whose key or name contain a specific substring.
        Attributes can be a Category or Customer.
        :param key:
        :param name:
        :return: if error will show in error log, like validation unsuccessful. If success will good.
        )r  rJ   rœ  rV   rÈ   )r!   rJ   r  r&   r   s        r#   Útempo_account_add_new_customerz#Jira.tempo_account_add_new_customer  s&   € ð  SÑ)ˆØ.ˆØ�y‰y˜ 4ˆyÓ(Ð(r$   c                 ó2   — |€yd}| j                  ||¬«      S )a	  
        Gets all or some Attribute whose key or name contain a specific substring.
        Attributes can be a Category or Customer.
        :param data:
        :return: if error will show in error log, like validation unsuccessful. If success will good.
        a  Please, set the data as { isNew:boolean
                                                name:string
                                                key:string
                                                id:number } or you can put only name and key parametersrœ  rV   rÈ   r’  s      r#   Útempo_account_add_customerzJira.tempo_account_add_customer+  s)   € ð ˆ<ðkð /ˆØ�y‰y˜ 4ˆyÓ(Ð(r$   c                 ó.   — d|› �}| j                  |«      S )zÑ
        Get Account Attribute whose key or name contain a specific substring. Attribute can be a Category or Customer.
        :param customer_id: id of Customer record
        :return: Customer info
        úrest/tempo-accounts/1/customer/rÌ   r—  s      r#   Ú tempo_account_get_customer_by_idz%Jira.tempo_account_get_customer_by_id:  s   € ð 0°¨}Ð=ˆØ�x‰x˜‹}Ðr$   c                 ó8   — |€yd|› �}| j                  ||¬«      S )aÀ  
        Updates an Attribute. Caller must have Manage Account Permission. Attribute can be a Category or Customer.
        :param customer_id: id of Customer record
        :param data: format is
                    {
                        isNew:boolean
                        name:string
                        key:string
                        id:number
                    }
        :return: json with parameters name, key and id.
        zÚPlease, set the data as { isNew:boolean
                                                name:string
                                                key:string
                                                id:number }r£  rV   rÖ  )r!   r•  r&   r   s       r#   Ú#tempo_account_update_customer_by_idz(Jira.tempo_account_update_customer_by_idC  s/   € ð ˆ<ð?ð 0°¨}Ð=ˆØ�x‰x˜ $ˆxÓ'Ð'r$   c                 ó.   — d|› �}| j                  |«      S )zÌ
        Delete an Attribute. Caller must have Manage Account Permission. Attribute can be a Category or Customer.
        :param customer_id: id of Customer record
        :return: Customer info
        r£  r×  r—  s      r#   Ú#tempo_account_delete_customer_by_idz(Jira.tempo_account_delete_customer_by_idZ  s   € ð 0°¨}Ð=ˆØ�{‰{˜3ÓÐr$   c                 óF   — | j                   }d}| j                  ||d¬«      S )zV
        Get csv export file of Accounts from Tempo
        :return: csv file
        zrest/tempo-accounts/1/exportT)rè  r•   )rÐ  r1   )r!   rè  r   s      r#   Útempo_account_export_accountsz"Jira.tempo_account_export_accountsc  s)   € ð
 ×)Ñ)ˆØ,ˆØ�x‰x˜ WÀˆxÓEÐEr$   c                 ó(   — d}| j                  |«      S )z<
        Provide a holiday schemes
        :return:
        ú!rest/tempo-core/2/holidayschemes/rÌ   rH   s     r#   Útempo_holiday_get_schemeszJira.tempo_holiday_get_schemesl  s   € ð
 2ˆØ�x‰x˜‹}Ðr$   c                 ó.   — d|› �}| j                  |«      S )ú;
        Provide a holiday scheme
        :return:
        r¬  rÌ   ©r!   r>  r   s      r#   Útempo_holiday_get_scheme_infoz"Jira.tempo_holiday_get_scheme_infot  s   € ð
 2°)°Ð=ˆØ�x‰x˜‹}Ðr$   c                 ó0   — d|› d�}| j                  |«      S )zC
        Provide a holiday scheme members
        :return:
        r¬  z/membersrÌ   r°  s      r#   Ú tempo_holiday_get_scheme_membersz%Jira.tempo_holiday_get_scheme_members|  s    € ð
 2°)°¸HÐEˆØ�x‰x˜‹}Ðr$   c                 óB   — d|› d|› d�}d|i}| j                  ||¬«      S )r¯  r¬  ú/member/rT   rU   rV   rÖ  )r!   r>  ro  r   r&   s        r#   Ú$tempo_holiday_put_into_scheme_memberz)Jira.tempo_holiday_put_into_scheme_member„  s5   € ð
 2°)°¸HÀXÀJÈaÐPˆØ�iÐ ˆØ�x‰x˜ $ˆxÓ'Ð'r$   c                 ó:   — d|› �}d|i}| j                  ||¬«      S )z^
        Set as default the holiday scheme
        :param scheme_id:
        :return:
        z+rest/tempo-core/2/holidayscheme/setDefault/rU   rV   rÈ   )r!   r>  r   r&   s       r#   Ú tempo_holiday_scheme_set_defaultz%Jira.tempo_holiday_scheme_set_default�  s-   € ð <¸I¸;ÐGˆØ�iÐ ˆØ�y‰y˜ 4ˆyÓ(Ð(r$   c                 ó.   — d|› �}| j                  |«      S )z^
        Provide a workload scheme members
        :param scheme_id:
        :return:
        z'rest/tempo-core/1/workloadscheme/users/rÌ   r°  s      r#   Ú!tempo_workload_scheme_get_membersz&Jira.tempo_workload_scheme_get_members—  s   € ð 8¸	°{ÐCˆØ�x‰x˜‹}Ðr$   Úmemberc                 ó:   — d|› �}d|i}| j                  ||¬«      S )z†
        Provide a workload scheme members
        :param member: username of user
        :param scheme_id:
        :return:
        z&rest/tempo-core/1/workloadscheme/user/rU   rV   rÖ  )r!   r>  r»  r   r&   s        r#   Ú tempo_workload_scheme_set_memberz%Jira.tempo_workload_scheme_set_member   s-   € ð 7°v°hÐ?ˆØ�iÐ ˆØ�x‰x˜ $ˆxÓ'Ð'r$   c                 ó(   — d}| j                  |«      S )zD
        Provide the configs of timesheets
        :return:
        z'rest/tempo-timesheets/3/private/config/rÌ   rH   s     r#   Ú"tempo_timesheets_get_configurationz'Jira.tempo_timesheets_get_configuration«  s   € ð
 8ˆØ�x‰x˜‹}Ðr$   Úteam_idÚ	date_fromÚdate_toÚgroup_byc                 óL   — d|› d�}||dœ}|r||d<   | j                  ||¬«      S )z¬
        Get team utilization. Response in json
        :param team_id:
        :param date_from:
        :param date_to:
        :param group_by:
        :return:
        z$rest/tempo-timesheets/3/report/team/z/utilization)ÚdateFromÚdateToÚgroupByrC   rÌ   )r!   rÀ  rÁ  rÂ  rÃ  r   r%   s          r#   Ú%tempo_timesheets_get_team_utilizationz*Jira.tempo_timesheets_get_team_utilization³  s<   € ð 5°W°I¸\ÐJˆØ$-¸ÑAˆáØ (ˆF�9ÑØ�x‰x˜ FˆxÓ+Ð+r$   Úaccount_keyc                 ó„   — i }|r||d<   |r||d<   |r||d<   |r||d<   |r||d<   |r||d<   d}| j                  ||¬«      S )	a“  

        :param date_from: yyyy-MM-dd
        :param date_to: yyyy-MM-dd
        :param username: name of the user you wish to get the worklogs for
        :param project_key: key of a project you wish to get the worklogs for
        :param account_key: key of an account you wish to get the worklogs for
        :param team_id: id of the Team you wish to get the worklogs for
        :return:
        rÅ  rÆ  ro  r@   Ú
accountKeyÚteamIdz!rest/tempo-timesheets/3/worklogs/rC   rÌ   )	r!   rÁ  rÂ  ro  r9   rÉ  rÀ  r%   r   s	            r#   Útempo_timesheets_get_worklogsz"Jira.tempo_timesheets_get_worklogsÅ  so   € ð& ˆÙØ!*ˆF�:ÑÙØ&ˆF�8ÑÙØ!)ˆF�:ÑÙØ#.ˆF�<Ñ ÙØ#.ˆF�<Ñ ÙØ&ˆF�8ÑØ1ˆØ�x‰x˜ FˆxÓ+Ð+r$   c                 óH   — |r||d<   |r||d<   d}| j                  ||¬«      S )aã  
        Find existing worklogs with searching parameters.
        NOTE: check if you are using correct types for the parameters!
        :param date_from: string From Date
        :param date_to: string To Date
        :param worker: Array of strings
        :param taskId: Array of integers
        :param taskKey: Array of strings
        :param projectId: Array of integers
        :param projectKey: Array of strings
        :param teamId: Array of integers
        :param roleId: Array of integers
        :param accountId: Array of integers
        :param accountKey: Array of strings
        :param filterId: Array of integers
        :param customerId: Array of integers
        :param categoryId: Array of integers
        :param categoryTypeId: Array of integers
        :param epicKey: Array of strings
        :param updatedFrom: string
        :param includeSubtasks: boolean
        :param pageNo: integer
        :param maxResults: integer
        :param offset: integer
        r§   r¨   z'rest/tempo-timesheets/4/worklogs/searchrV   rÈ   )r!   rÁ  rÂ  r%   r   s        r#   Ú tempo_4_timesheets_find_worklogsz%Jira.tempo_4_timesheets_find_worklogsé  s4   € ñ: Ø&ˆF�6‰NÙØ"ˆF�4‰Là7ˆØ�y‰y˜ 6ˆyÓ*Ð*r$   c                 ó.   — d|› �}| j                  |«      S )zx
        Get Tempo timesheet worklog by issue key or id.
        :param issue: Issue key or ID
        :return:
        z,rest/tempo-timesheets/4/worklogs/jira/issue/rÌ   )r!   rc   r   s      r#   Ú&tempo_timesheets_get_worklogs_by_issuez+Jira.tempo_timesheets_get_worklogs_by_issue  s   € ð =¸U¸GÐDˆØ�x‰x˜‹}Ðr$   ÚworkerÚtime_spend_in_secondsc                 óZ   — |||t        |«      dœ}|r||d<   d}| j                  ||¬«      S )zº
        Log work for user
        :param worker:
        :param started:
        :param time_spend_in_seconds:
        :param issue_id:
        :param comment:
        :return:
        )rÒ  r³  r¶  ÚoriginTaskIdrá   z!rest/tempo-timesheets/4/worklogs/rV   )r.   r®   )r!   rÒ  r³  rÓ  r:   rá   r&   r   s           r#   Útempo_timesheets_write_worklogz#Jira.tempo_timesheets_write_worklog  sA   € ð ØØ 5Ü ›Mñ	
ˆñ Ø%ˆD�‰OØ1ˆØ�y‰y˜ 4ˆyÓ(Ð(r$   Úperiod_start_datec                 óL   — d}i }|r||d<   |r||d<   | j                  ||¬«      S )z|
        Return timesheets for approval
        :param user_key:
        :param period_start_date:
        :return:
        z2rest/tempo-timesheets/4/timesheet-approval/currentÚperiodStartDater[  rC   rÌ   )r!   rV  r×  r   r%   s        r#   Ú(tempo_timesheets_approval_worklog_reportz-Jira.tempo_timesheets_approval_worklog_report.  s=   € ð CˆØˆÙØ(9ˆFÐ$Ñ%ÙØ (ˆF�9ÑØ�x‰x˜ FˆxÓ+Ð+r$   c                 óZ   — d}i }|r||d<   |r||d<   |r||d<   | j                  ||¬«      S )z�
        Provide time how much should work
        :param from_date:
        :param to_date:
        :param user_name:
        :return:
        z$rest/tempo-timesheets/3/private/daysr§   r¨   r°   rC   rÌ   )r!   r¤   r¥   r5  r   r%   s         r#   Ú#tempo_timesheets_get_required_timesz(Jira.tempo_timesheets_get_required_times=  sE   € ð 5ˆØˆÙØ&ˆF�6‰NÙØ"ˆF�4‰LÙØ&ˆF�6‰NØ�x‰x˜ FˆxÓ+Ð+r$   c                 óL   — d}i }|r||d<   |r||d<   | j                  ||¬«      S )Nz<rest/tempo-timesheets/4/timesheet-approval/approval-statusesr[  rÙ  rC   rÌ   )r!   r×  r5  r   r%   s        r#   Ú tempo_timesheets_approval_statusz%Jira.tempo_timesheets_approval_statusO  s:   € ØLˆØˆÙØ )ˆF�9ÑÙØ(9ˆFÐ$Ñ%Ø�x‰x˜ FˆxÓ+Ð+r$   c                 ó0   — d|› d�}| j                  |«      S )zb
        Gets all links to a specific project
        :param project_id:
        :return:
        ú#rest/tempo-accounts/1/link/project/rT   rÌ   rƒ  s      r#   Útempo_get_links_to_projectzJira.tempo_get_links_to_projectX  s    € ð 4°J°<¸qÐAˆØ�x‰x˜‹}Ðr$   c                 ó0   — d|› d�}| j                  |«      S )zi
        Gets the default link to a specific project
        :param project_id:
        :return:
        rà  z	/default/rÌ   rƒ  s      r#   Ú!tempo_get_default_link_to_projectz&Jira.tempo_get_default_link_to_projecta  s    € ð 4°J°<¸yÐIˆØ�x‰x˜‹}Ðr$   c                 ó>   — d}i }|r||d<   | j                  ||¬«      S )Nzrest/tempo-teams/2/teamr}  rC   rÌ   r0  s       r#   Útempo_teams_get_all_teamszJira.tempo_teams_get_all_teamsj  s,   € Ø'ˆØˆÙØ%ˆF�8ÑØ�x‰x˜ FˆxÓ+Ð+r$   Ú
member_keyc                 óT   — t        |«      ddœdddidœdœ}| j                  ||¬«      S )	zƒ
        Add team member
        :param team_id:
        :param member_key: user_name or user_key of Jira
        :return:
        ÚUSER)rJ   r!  Ú100rU   r   )Úavailabilityr¶  )r»  Ú
membership)Úmember_data)r.   Útempo_teams_add_member_raw)r!   rÀ  ræ  r&   s       r#   Útempo_teams_add_memberzJira.tempo_teams_add_memberq  s;   € ô " *›o°vÑ>Ø+0¸4À¸)ÑDñ
ˆð ×.Ñ.¨wÀDÐ.ÓIÐIr$   Ú	member_idc                 óL   — ||dddidœ}d|› d|› d�}| j                  ||¬«      S )	zd
        Add team member
        :param team_id:
        :param member_id:
        :return:
        ré  rU   r   )ÚteamMemberIdrÌ  rê  r¶  úrest/tempo-teams/2/team/rµ  z/membershiprV   rÈ   )r!   rÀ  rï  r&   r   s        r#   Útempo_teams_add_membershipzJira.tempo_teams_add_membership~  sD   € ð &ØØ!Ø˜1�Iñ	
ˆð )¨¨	°¸)¸ÀKÐPˆØ�y‰y˜ 4ˆyÓ(Ð(r$   rì  c                 ó8   — d|› d�}|}| j                  ||¬«      S )zf
        Add team member
        :param team_id:
        :param member_data:
        :return:
        rò  rµ  rV   rÈ   )r!   rÀ  rì  r   r&   s        r#   rí  zJira.tempo_teams_add_member_rawŽ  s*   € ð )¨¨	°Ð:ˆØˆØ�y‰y˜ 4ˆyÓ(Ð(r$   c                 ó0   — d|› d�}| j                  |«      S )zP
        Get members from team
        :param team_id:
        :return:
        rò  rµ  rÌ   )r!   rÀ  r   s      r#   Útempo_teams_get_memberszJira.tempo_teams_get_members™  s    € ð )¨¨	°Ð:ˆØ�x‰x˜‹}Ðr$   Úmembership_idc                 ó:   — d|› d|› d|› �}| j                  |«      S )z‰
        Remove team membership
        :param team_id:
        :param member_id:
        :param membership_id:
        :return:
        rò  rµ  ú/membership/r×  )r!   rÀ  rï  r÷  r   s        r#   Útempo_teams_remove_memberzJira.tempo_teams_remove_member¢  s-   € ð )¨¨	°¸)¸ÀLÐQ^ÐP_Ð`ˆØ�{‰{˜3ÓÐr$   c                 ó>   — d|› d|› d|› �}| j                  ||¬«      S )z­
        Update team membership attribute info
        :param team_id:
        :param member_id:
        :param membership_id:
        :param data:
        :return:
        rò  rµ  rù  rV   rÖ  )r!   rÀ  rï  r÷  r&   r   s         r#   Ú%tempo_teams_update_member_informationz*Jira.tempo_teams_update_member_information­  s1   € ð )¨¨	°¸)¸ÀLÐQ^ÐP_Ð`ˆØ�x‰x˜ $ˆxÓ'Ð'r$   c                 ó$   — | j                  d«      S )Nz,rest/tempo-timesheets/3/period-configurationrÌ   rØ  s    r#   Ú)tempo_timesheets_get_period_configurationz.Jira.tempo_timesheets_get_period_configuration»  s   € Ø�x‰xÐFÓGÐGr$   c                 ó$   — | j                  d«      S )Nz&rest/tempo-timesheets/3/private/configrÌ   rØ  s    r#   Ú*tempo_timesheets_get_private_configurationz/Jira.tempo_timesheets_get_private_configuration¾  s   € Ø�x‰xÐ@ÓAÐAr$   c                 ó,   — | j                  d|› d�«      S )Nzrest/tempo-teams/2/user/z/membershipsrÌ   rž  s     r#   Ú&tempo_teams_get_memberships_for_memberz+Jira.tempo_teams_get_memberships_for_memberÁ  s   € Ø�x‰xÐ2°8°*¸LÐIÓJÐJr$   ÚresourceÚ
legacy_apic                 óx   — d}|rdnd}| j                   j                  dd|› �«      }| j                  |||¬«      S )a.  
        Prepare an 'Agile' API-specific URL relying on defaults set for the client.

        :param resource: Name of an endpoint
        :param legacy_api: If True - use 'greenhopper' as an API type, else - use a newer, 'agile', name.
        :return: String with a full URL path to resource
        r‹  ÚgreenhopperÚagilezrest/apizrest/)r  rŒ  r   )rŒ  ÚreplacerE   )r!   r  r  r   Úapi_typerŒ  s         r#   Úget_agile_resource_urlzJira.get_agile_resource_urlÉ  sH   € ð ˆÙ$.‘=°GˆØ—=‘=×(Ñ(¨°u¸X¸JÐ5GÓHˆØ× Ñ ¨(¸XÐS^Ð Ó_Ð_r$   Ú
issue_keysc                 ó&   — | j                  |¬«      S )zc
        Move issues to backlog
        :param issue_keys: list of issues
        :return:
        ©rq  )Úadd_issues_to_backlog)r!   r  s     r#   Úmove_issues_to_backlogzJira.move_issues_to_backlogÖ  s   € ð ×)Ñ)°Ð)Ó<Ð<r$   rq  c                 óœ   — t        |t        «      st        d«      ‚d}| j                  |«      }t	        |¬«      }| j                  ||¬«      S )a@  
        Adding Issue(s) to Backlog
        :param issues:       list:  List of Issue Keys
                                    eg. ['APA-1', 'APA-2']
        :return: Dictionary of response received from the API

        https://docs.atlassian.com/jira-software/REST/8.9.0/#agile/1.0/backlog-moveIssuesToBacklog
        ú+`issues` param should be List of Issue Keyszbacklog/issuer  rV   )rã   ræ   r3   r
  r+   r®   )r!   rq  r  r   r&   s        r#   r  zJira.add_issues_to_backlogÞ  sL   € ô ˜&¤$Ô'ÜÐJÓKÐKØ"ˆØ×)Ñ)¨(Ó3ˆÜ˜6Ô"ˆØ�y‰y˜ 4ˆyÓ(Ð(r$   c                 óP   — d|› �}| j                  |«      }| j                  |«      S )zY
        Gets an agile board by the filter id
        :param filter_id: int, str
        zboard/filter/©r
  r1   )r!   rB  r  r   s       r#   Úget_agile_board_by_filter_idz!Jira.get_agile_board_by_filter_idî  s.   € ð
 # 9 +Ð.ˆØ×)Ñ)¨(Ó3ˆØ�x‰x˜‹}Ðr$   Úlocationc                 óh   — d}| j                  |«      }|||dœ}|r||d<   | j                  ||¬«      S )zú
        Create an agile board
        :param name: str: Must be less than 255 characters.
        :param type: str: "scrum" or "kanban"
        :param filter_id: int
        :param location: dict, Optional. Only specify this for Jira Cloud!
        Úboard)r  r!  ÚfilterIdr  rV   ©r
  r®   )r!   r  r!  rB  r  r  r   r&   s           r#   Úcreate_agile_boardzJira.create_agile_boardø  sE   € ð ˆØ×)Ñ)¨(Ó3ˆØ"¨D¸iÑHˆÙØ'ˆD�ÑØ�y‰y˜ 4ˆyÓ(Ð(r$   Ú
board_nameÚ
board_typec                 ó¼   — d}| j                  |«      }i }|r||d<   |r||d<   |r||d<   |rt        |«      |d<   |rt        |«      |d<   | j                  ||¬«      S )zô
        Returns all boards. This only includes boards that the user has permission to view.
        :param board_name:
        :param project_key:
        :param board_type:
        :param start:
        :param limit:
        :return:
        r  r  ÚprojectKeyOrIdr!  r  r  rC   )r
  rä   r1   )	r!   r  r9   r  r  r¢   r  r   r%   s	            r#   Úget_all_agile_boardszJira.get_all_agile_boards  sy   € ð" ˆØ×)Ñ)¨(Ó3ˆØˆÙØ'ˆF�6‰NÙØ'2ˆFÐ#Ñ$ÙØ'ˆF�6‰NÙÜ # E£
ˆF�9ÑÙÜ#& u£:ˆF�<Ñ à�x‰x˜ FˆxÓ+Ð+r$   Úboard_idc                 óP   — d|› �}| j                  |«      }| j                  |«      S )zT
        Delete agile board by id
        :param board_id:
        :return:
        úboard/©r
  r™   ©r!   r   r  r   s       r#   Údelete_agile_boardzJira.delete_agile_board(  s/   € ð ˜H˜:Ð&ˆØ×)Ñ)¨(Ó3ˆØ�{‰{˜3ÓÐr$   c                 óP   — d|› �}| j                  |«      }| j                  |«      S )zV
        Get agile board info by id
        :param board_id:
        :return:
        r"  r  r$  s       r#   Úget_agile_boardzJira.get_agile_board2  s.   € ð ˜H˜:Ð&ˆØ×)Ñ)¨(Ó3ˆØ�x‰x˜‹}Ðr$   c                 óR   — d|› d�}| j                  |«      }| j                  |«      S )a;  
        Returns all issues from the board's backlog, for the given board ID.
        This only includes issues that the user has permission to view.
        The backlog contains incomplete issues that are not assigned to any future or active sprint.
        Note, if the user does not have permission to view the board, no issues will be returned at all.
        Issues returned from this resource include Agile fields, like sprint, closedSprints, flagged, and epic.
        By default, the returned issues are ordered by rank.
        :param board_id: int, str
        r"  z/backlogr  r$  s       r#   Úget_issues_for_backlogzJira.get_issues_for_backlog<  s0   € ð ˜H˜: XÐ.ˆØ×)Ñ)¨(Ó3ˆØ�x‰x˜‹}Ðr$   c                 óR   — d|› d�}| j                  |«      }| j                  |«      S )a  
        Get the board configuration. The response contains the following fields:
        id - ID of the board.
        name - Name of the board.
        filter - Reference to the filter used by the given board.
        subQuery (Kanban only) - JQL subquery used by the given board.
        columnConfig - The column configuration lists the columns for the board,
             in the order defined in the column configuration. For each column,
             it shows the issue status mapping as well as the constraint type
             (Valid values: none, issueCount, issueCountExclSubs) for
             the min/max number of issues. Note, the last column with statuses
             mapped to it is treated as the "Done" column, which means that issues
             in that column will be marked as already completed.
        estimation (Scrum only) - Contains information about type of estimation used for the board.
            Valid values: none, issueCount, field. If the estimation type is "field",
            the ID and display name of the field used for estimation is also returned.
            Note, estimates for an issue can be updated by a PUT /rest/api/2/issue/{issueIdOrKey}
            request, however the fields must be on the screen. "timeoriginalestimate" field will never be
            on the screen, so in order to update it "originalEstimate" in "timetracking" field should be updated.
        ranking - Contains information about custom field used for ranking in the given board.
        :param board_id:
        :return:
        r"  z/configurationr  r$  s       r#   Úget_agile_board_configurationz"Jira.get_agile_board_configurationJ  s0   € ð0 ˜H˜: ^Ð4ˆØ×)Ñ)¨(Ó3ˆØ�x‰x˜‹}Ðr$   c                 ó  — d|› d�}| j                  |«      }i }	|�t        |«      |	d<   |�t        |«      |	d<   |�1t        |t        t        t
        f«      rdj                  |«      }||	d<   |�||	d<   |�||	d<   | j                  ||	¬	«      S )
aŒ  
        Returns all issues from a board, for a given board Id.
        This only includes issues that the user has permission to view.
        Note, if the user does not have permission to view the board,
        no issues will be returned at all. Issues returned from this resource include Agile fields,
        like sprint, closedSprints, flagged, and epic. By default, the returned issues are ordered by rank.
        :param board_id: int, str
        :param jql:
        :param fields: list of fields, for example: ['priority', 'summary', 'customfield_10007']
        :param start: OPTIONAL: The start point of the collection to return. Default: 0.
        :param limit: OPTIONAL: The limit of the number of issues to return, this may be restricted by
                fixed system limits. Default by built-in method: 50
        :param expand: OPTIONAL: expand the search result
        :return:
        r"  ú/issuer  r  r„  re   r<  r}  rC   )r
  rä   rã   ræ   r†  r‡  r„   r1   )
r!   r   r<  re   r  r¢   r}  r  r   r%   s
             r#   Úget_issues_for_boardzJira.get_issues_for_boardf  s¯   € ð0 ˜H˜: VÐ,ˆØ×)Ñ)¨(Ó3ˆØˆØÐÜ # E£
ˆF�9ÑØÐÜ#& u£:ˆF�<Ñ ØÐÜ˜&¤4¬´Ð"4Ô5ØŸ™ &Ó)�Ø%ˆF�8ÑØˆ?ØˆF�5‰MØÐØ%ˆF�8Ñà�x‰x˜ FˆxÓ+Ð+r$   Údonec                 ó„   — d|› d�}| j                  |«      }i }|r||d<   |r||d<   |r||d<   | j                  ||¬«      S )aë  
        Returns all epics from the board, for the given board Id.
        This only includes epics that the user has permission to view.
        Note, if the user does not have permission to view the board, no epics will be returned at all.
        :param board_id:
        :param done:  Filter results to epics that are either done or not done. Valid values: true, false.
        :param start: The starting index of the returned epics. Base index: 0.
                      See the 'Pagination' section at the top of this page for more details.
        :param limit: The maximum number of epics to return per page. Default: 50.
                      See the 'Pagination' section at the top of this page for more details.
        :return:
        r"  z/epicr/  r  r  rC   r  )r!   r   r/  r  r¢   r  r   r%   s           r#   Ú	get_epicszJira.get_epics‘  s`   € ð& ˜H˜: UÐ+ˆØ×)Ñ)¨(Ó3ˆØˆÙØ!ˆF�6‰NÙØ %ˆF�9ÑÙØ#(ˆF�<Ñ Ø�x‰x˜ FˆxÓ+Ð+r$   Úepic_idc	                 ó´   — d|› d|› d�}	| j                  |	«      }
i }|r||d<   |r||d<   |r||d<   |r||d<   |r||d<   |r||d	<   | j                  |
|¬
«      S )a4  
        Returns all issues that belong to an epic on the board, for the given epic Id and the board Id.
        This only includes issues that the user has permission to view.
        Issues returned from this resource include Agile fields, like sprint, closedSprints, flagged, and epic.
        By default, the returned issues are ordered by rank.
        :param epic_id:
        :param board_id:
        :param jql:   Filter results using a JQL query.
                      If you define an order in your JQL query,
                      it will override the default order of the returned issues.
        :param validate_query: Specifies whether to validate the JQL query or not. Default: true.
        :param fields: The list of fields to return for each issue.
                       By default, all navigable and Agile fields are returned.
        :param expand: A comma-separated list of the parameters to expand.
        :param start: The starting index of the returned issues.
                      Base index: 0.
                      See the 'Pagination' section at the top of this page for more details.
        :param limit: The maximum number of issues to return per page.
                      Default: 50.
                      See the 'Pagination' section at the top of this page for more details.
                      Note, the total number of issues returned is limited
                      by the property 'jira.search.views.default.max' in your JIRA instance.
                      If you exceed this limit, your results will be truncated.
        :return:
        r"  z/epic/r-  r<  rÑ  re   r}  r  r  rC   r  )r!   r   r2  r<  rÎ  re   r}  r  r¢   r  r   r%   s               r#   Úget_issues_for_epiczJira.get_issues_for_epic¯  sŽ   € ðH ˜H˜: V¨G¨9°FÐ;ˆØ×)Ñ)¨(Ó3ˆØˆÙØˆF�5‰MÙØ&4ˆF�?Ñ#ÙØ%ˆF�8ÑÙØ%ˆF�8ÑÙØ %ˆF�9ÑÙØ#(ˆF�<Ñ Ø�x‰x˜ FˆxÓ+Ð+r$   c                 ó®   — d|› d�}| j                  |«      }	i }
|r||
d<   |r||
d<   |r||
d<   |r||
d<   |r||
d<   |r||
d<   | j                  |	|
¬	«      S )
a  
        Returns all issues that do not belong to any epic on a board, for a given board Id.
        This only includes issues that the user has permission to view.
        Issues returned from this resource include Agile fields, like sprint, closedSprints, flagged, and epic.
        By default, the returned issues are ordered by rank.
        :param board_id:
        :param jql:     Filter results using a JQL query.
                        If you define an order in your JQL query,
                        it will override the default order of the returned issues.
        :param validate_query:  Specifies whether to validate the JQL query or not. Default: true.
        :param fields:  The list of fields to return for each issue.
                        By default, all navigable and Agile fields are returned.
        :param expand:  A comma-separated list of the parameters to expand.
        :param start:   The starting index of the returned issues.
                        Base index: 0.
                        See the 'Pagination' section at the top of this page for more details.
        :param limit:   The maximum number of issues to return per page. Default: 50.
                        See the 'Pagination' section at the top of this page for more details.
                        Note, the total number of issues returned is limited by
                        the property 'jira.search.views.default.max' in your JIRA instance.
                        If you exceed this limit, your results will be truncated.
        :return:
        r"  z/epic/none/issuer<  rÑ  re   r}  r  r  rC   r  )r!   r   r<  rÎ  re   r}  r  r¢   r  r   r%   s              r#   Úget_issues_without_epiczJira.get_issues_without_epicä  s‰   € ðB ˜H˜:Ð%5Ð6ˆØ×)Ñ)¨(Ó3ˆØˆÙØˆF�5‰MÙØ&4ˆF�?Ñ#ÙØ%ˆF�8ÑÙØ%ˆF�8ÑÙØ %ˆF�9ÑÙØ#(ˆF�<Ñ Ø�x‰x˜ FˆxÓ+Ð+r$   c                 óv   — d|› d�}| j                  |«      }i }|r||d<   |r||d<   | j                  ||¬«      S )a3  
        Returns all projects that are associated with the board,
        for the given board ID. A project is associated with a board only
        if the board filter explicitly filters issues by the project and guaranties that
        all issues will come for one of those projects e.g. board's filter with
        "project in (PR-1, PR-1) OR reporter = admin" jql Projects are returned only
        if user can browse all projects that are associated with the board.
        Note, if the user does not have permission to view the board,
        no projects will be returned at all. Returned projects are ordered by the name.
        :param board_id:
        :param start: The starting index of the returned projects.
                      Base index: 0.
                      See the 'Pagination' section at the top of this page for more details.
        :param limit: The maximum number of projects to return per page.
                      Default: 50.
                      See the 'Pagination' section at the top of this page for more details
        :return:
        r"  z/projectr  r  rC   r  )r!   r   r  r¢   r  r   r%   s          r#   Ú&get_all_projects_associated_with_boardz+Jira.get_all_projects_associated_with_board  sT   € ð& ˜H˜: XÐ.ˆØ×)Ñ)¨(Ó3ˆØˆÙØ %ˆF�9ÑÙØ#(ˆF�<Ñ Ø�x‰x˜ FˆxÓ+Ð+r$   c                 óR   — d|› d�}| j                  |«      }| j                  |«      S )zÞ
        Returns the keys of all properties for the board identified by the id.
        The user who retrieves the property keys is required to have permissions to view the board.
        :param board_id: int, str
        r"  rî   r  r$  s       r#   Úget_agile_board_propertieszJira.get_agile_board_properties4  s0   € ð ˜H˜: [Ð1ˆØ×)Ñ)¨(Ó3ˆØ�x‰x˜‹}Ðr$   c                 óV   — d|› d|› �}| j                  |«      }| j                  |«      S )aM  
        Sets the value of the specified board's property.
        You can use this resource to store a custom data
        against the board identified by the id.
        The user who stores the data is required to have permissions to modify the board.
        :param board_id:
        :param property_key:
        :return:
        r"  rò   ©r
  rX   ©r!   r   rð   r  r   s        r#   Úset_agile_board_propertyzJira.set_agile_board_property>  s4   € ð ˜H˜: \°,°Ð@ˆØ×)Ñ)¨(Ó3ˆØ�x‰x˜‹}Ðr$   c                 óV   — d|› d|› �}| j                  |«      }| j                  |«      S )a  
        Returns the value of the property with a given key from the board identified by the provided id.
        The user who retrieves the property is required to have permissions to view the board.
        :param board_id:
        :param property_key:
        :return:
        r"  rò   r  r=  s        r#   Úget_agile_board_propertyzJira.get_agile_board_propertyL  s4   € ð ˜H˜: \°,°Ð@ˆØ×)Ñ)¨(Ó3ˆØ�x‰x˜‹}Ðr$   c                 óV   — d|› d|› �}| j                  |«      }| j                  |«      S )zî
        Removes the property from the board identified by the id.
        Ths user removing the property is required to have permissions to modify the board.
        :param board_id:
        :param property_key:
        :return:
        r"  rò   r#  r=  s        r#   Údelete_agile_board_propertyz Jira.delete_agile_board_propertyX  s5   € ð ˜H˜: \°,°Ð@ˆØ×)Ñ)¨(Ó3ˆØ�{‰{˜3ÓÐr$   c                 óR   — d|› d�}| j                  |«      }| j                  |«      S )zs
        Returns the estimation statistic settings of the board.
        :param board_id:
        :return:
        r"  ú/settings/refined-velocityr  r$  s       r#   Ú get_agile_board_refined_velocityz%Jira.get_agile_board_refined_velocitye  s1   € ð ˜H˜:Ð%?Ð@ˆØ×)Ñ)¨(Ó3ˆØ�x‰x˜‹}Ðr$   c                 óV   — d|› d�}| j                  |«      }| j                  ||¬«      S )z…
        Sets the estimation statistic settings of the board.
        :param board_id:
        :param data:
        :return:
        r"  rD  rV   r<  )r!   r   r&   r  r   s        r#   Ú set_agile_board_refined_velocityz%Jira.set_agile_board_refined_velocityo  s6   € ð ˜H˜:Ð%?Ð@ˆØ×)Ñ)¨(Ó3ˆØ�x‰x˜ $ˆxÓ'Ð'r$   Ústatec                 ó„   — d|› d�}| j                  |«      }i }|r||d<   |r||d<   |r||d<   | j                  ||¬«      S )a,  
        Returns all sprints from a board, for a given board ID.
        This only includes sprints that the user has permission to view.
        :param board_id:
        :param state: Filter results to sprints in specified states.
                      Valid values: future, active, closed.
                      You can define multiple states separated by commas, e.g. state=active,closed
        :param start: The starting index of the returned sprints.
                      Base index: 0.
                      See the 'Pagination' section at the top of this page for more details.
        :param limit: The maximum number of sprints to return per page.
                      Default: 50.
                      See the 'Pagination' section at the top of this page for more details.
        :return:
        r"  z/sprintr  r  rH  rC   r  )r!   r   rH  r  r¢   r  r   r%   s           r#   Úget_all_sprints_from_boardzJira.get_all_sprints_from_board|  s`   € ð$ ˜H˜: WÐ-ˆØ×)Ñ)¨(Ó3ˆØˆÙØ %ˆF�9ÑÙØ#(ˆF�<Ñ ÙØ#ˆF�7‰OØ�x‰x˜ FˆxÓ+Ð+r$   z3.42.0z&Use get_all_sprints_from_board insteadc                 ó*   — | j                  ||||«      S )zµ
        Returns all sprints from a board, for a given board ID.
        :param board_id:
        :param state:
        :param start:
        :param limit:
        :return:
        )rJ  )r!   r   rH  r  r¢   s        r#   Úget_all_sprintzJira.get_all_sprint™  s   € ð ×.Ñ.¨x¸ÀÀuÓMÐMr$   Ú	sprint_idrÑ  c	                 ó´   — d|› d|› d�}	| j                  |	«      }
i }|r||d<   |r||d<   |r||d<   |r||d<   |r||d<   |r||d	<   | j                  |
|¬
«      S )aç  
        Get all issues you have access to that belong to the sprint from the board.
        Issue returned from this resource contains additional fields like: sprint, closedSprints, flagged and epic.
        Issues are returned ordered by rank. JQL order has higher priority than default rank.
        :param board_id:
        :param sprint_id:
        :param jql: Filter results using a JQL query.
                    If you define an order in your JQL query,
                    it will override the default order of the returned issues.
        :param validateQuery: Specifies whether to validate the JQL query or not. Default: true.
        :param fields: The list of fields to return for each issue.
                       By default, all navigable and Agile fields are returned.
        :param expand: A comma-separated list of the parameters to expand.
        :param start: The starting index of the returned issues.
                      Base index: 0.
                      See the 'Pagination' section at the top of this page for more details.
        :param limit: The maximum number of issues to return per page.
                      Default: 50.
                      See the 'Pagination' section at the top of this page for more details.
                      Note, the total number of issues returned is limited by the property
                      'jira.search.views.default.max' in your JIRA instance.
                      If you exceed this limit, your results will be truncated.
        r"  z/sprint/r-  r<  rÑ  re   r}  r  r  rC   r  )r!   r   rM  r<  rÑ  re   r}  r  r¢   r  r   r%   s               r#   Ú"get_all_issues_for_sprint_in_boardz'Jira.get_all_issues_for_sprint_in_board§  sŽ   € ðD ˜H˜: X¨i¨[¸Ð?ˆØ×)Ñ)¨(Ó3ˆØˆÙØˆF�5‰MÙØ&3ˆF�?Ñ#ÙØ%ˆF�8ÑÙØ%ˆF�8ÑÙØ %ˆF�9ÑÙØ#(ˆF�<Ñ Ø�x‰x˜ FˆxÓ+Ð+r$   r  c                 ó„   — d|› d�}| j                  |«      }i }|r||d<   |r||d<   |r||d<   | j                  ||¬«      S )aÔ  
        Returns all versions from a board, for a given board ID.
        This only includes versions that the user has permission to view.
        Note, if the user does not have permission to view the board,
        no versions will be returned at all.
        Returned versions are ordered by the name of the project from which they belong and
        then by sequence defined by user.
        :param board_id:
        :param released: Filter results to versions that are either released or
                         unreleased.Valid values: true, false.
        :param start: The starting index of the returned versions.
                      Base index: 0.
                      See the 'Pagination' section at the top of this page for more details.
        :param limit: The maximum number of versions to return per page.
                      Default: 50.
                      See the 'Pagination' section at the top of this page for more details.
        :return:
        r"  r
  r  r  r  rC   r  )r!   r   r  r  r¢   r  r   r%   s           r#   Úget_all_versions_from_boardz Jira.get_all_versions_from_boardÛ  sa   € ð* ˜H˜: XÐ.ˆØ×)Ñ)¨(Ó3ˆØˆÙØ!)ˆF�:ÑÙØ %ˆF�9ÑÙØ#(ˆF�<Ñ Ø�x‰x˜ FˆxÓ+Ð+r$   Úend_dateÚgoalc                 ó’   — d}| j                  |«      }t        ||¬«      }|r||d<   |r||d<   |r||d<   | j                  ||¬«      S )aB  
        Create a sprint within a board.
        ! User requires `Manage Sprints` permission for relevant boards.

        :param name: str: Name for the Sprint to be created
        :param board_id: int: The ID for the Board in which the Sprint will be created
        :param start_date: str: The Start Date for Sprint in isoformat
                            example value is "2015-04-11T15:22:00.000+10:00"
        :param end_date: str: The End Date for Sprint in isoformat
                            example value is "2015-04-20T01:22:00.000+10:00"
        :param goal: str: Goal Text for setting for the Sprint
        :return: Dictionary of response received from the API

        https://docs.atlassian.com/jira-software/REST/8.9.0/#agile/1.0/sprint
        isoformat can be created with datetime.datetime.isoformat()
        Úsprint)r  ÚoriginBoardIdr  ÚendDaterS  rV   )r
  r+   r®   )	r!   r  r   r  rR  rS  r  r   r&   s	            r#   Úcreate_sprintzJira.create_sprintû  s]   € ð0 ˆØ×)Ñ)¨(Ó3ˆÜ˜¨XÔ6ˆÙØ *ˆD�ÑÙØ&ˆD�‰OÙØˆD�‰LØ�y‰y˜ 4ˆyÓ(Ð(r$   c                 ó‚   — t        |t        «      st        d«      ‚d|› d�}t        |¬«      }| j	                  ||¬«      S )aì  
        Adding Issue(s) to Sprint
        :param sprint_id: int/str:  The ID for the Sprint.
                                    Sprint to be Active or Open only.
                                    e.g.  104
        :param issues:       list:  List of Issue Keys
                                    eg. ['APA-1', 'APA-2']
        :return: Dictionary of response received from the API

        https://docs.atlassian.com/jira-software/REST/8.9.0/#agile/1.0/sprint-moveIssuesToSprint
        r  z/rest/agile/1.0/sprint/r-  r  rV   )rã   ræ   r3   r+   r®   )r!   rM  rq  r   r&   s        r#   Úadd_issues_to_sprintzJira.add_issues_to_sprint  sE   € ô ˜&¤$Ô'ÜÐJÓKÐKØ'¨	 {°&Ð9ˆÜ˜6Ô"ˆØ�y‰y˜ 4ˆyÓ(Ð(r$   c                 óP   — d|› �}| j                  |«      }| j                  |«      S )a  
        Returns the sprint for a given sprint ID.
        The sprint will only be returned if the user can view the board that the sprint was created on,
        or view at least one of the issues in the sprint.
        :param sprint_id:
        :return:
        úsprint/r  ©r!   rM  r  r   s       r#   Ú
get_sprintzJira.get_sprint0  s.   € ð ˜Y˜KÐ(ˆØ×)Ñ)¨(Ó3ˆØ�x‰x˜‹}Ðr$   c                 ó`   — d|› �}| j                  |d¬«      }| j                  ||||dœ¬«      S )z~

        :param sprint_id:
        :param name:
        :param start_date:
        :param end_date:
        :return:
        r\  T©r  )r  r  rW  rV   r<  )r!   rM  r  r  rR  r  r   s          r#   Úrename_sprintzJira.rename_sprint<  sH   € ð ˜Y˜KÐ(ˆØ×)Ñ)¨(¸tÐ)ÓDˆØ�x‰xØØ¨ZÀHÑMð ó 
ð 	
r$   c                 óP   — d|› �}| j                  |«      }| j                  |«      S )zÙ
        Deletes a sprint.
        Once a sprint is deleted, all issues in the sprint will be moved to the backlog.
        Note, only future sprints can be deleted.
        :param sprint_id:
        :return:
        r\  r#  r]  s       r#   Údelete_sprintzJira.delete_sprintL  s/   € ð ˜Y˜KÐ(ˆØ×)Ñ)¨(Ó3ˆØ�{‰{˜3ÓÐr$   c                 óT   — d|› �}| j                  |«      }| j                  ||¬«      S )a  
        Performs a partial update of a sprint.
        A partial update means that fields not present in the request JSON will not be updated.
        Notes:

        Sprints that are in a closed state cannot be updated.
        A sprint can be started by updating the state to 'active'.
        This requires the sprint to be in the 'future' state and have a startDate and endDate set.
        A sprint can be completed by updating the state to 'closed'.
        This action requires the sprint to be in the 'active' state.
        This sets the completeDate to the time of the request.
        Other changes to state are not allowed.
        The completeDate field cannot be updated manually.
        :param sprint_id:
        :param data: { "name": "new name"}
        :return:
        r\  rV   r  )r!   rM  r&   r  r   s        r#   Úupdate_partially_sprintzJira.update_partially_sprintX  s3   € ð$ ˜Y˜KÐ(ˆØ×)Ñ)¨(Ó3ˆØ�y‰y˜ 4ˆyÓ(Ð(r$   c                 óv   — d|› d�}| j                  |«      }i }|r||d<   |r||d<   | j                  ||¬«      S )az  
        Returns all issues in a sprint, for a given sprint ID.
        This only includes issues that the user has permission to view.
        By default, the returned issues are ordered by rank.
        :param sprint_id:
        :param start: The starting index of the returned issues.
                      Base index: 0.
                      See the 'Pagination' section at the top of this page for more details.
        :param limit: The maximum number of issues to return per page.
                      Default: 50.
                      See the 'Pagination' section at the top of this page for more details.
                      Note, the total number of issues returned is limited by the property
                      'jira.search.views.default.max' in your Jira instance.
                      If you exceed this limit, your results will be truncated.
        :return:
        r\  r-  r  r  rC   r  )r!   rM  r  r¢   r  r   r%   s          r#   Úget_sprint_issueszJira.get_sprint_issuesn  sT   € ð" ˜Y˜K vÐ.ˆØ×)Ñ)¨(Ó3ˆØˆÙØ %ˆF�9ÑÙØ#(ˆF�<Ñ Ø�x‰x˜ FˆxÓ+Ð+r$   Úissues_to_rankÚrank_beforeÚcustomfield_numberc                 óV   — d}| j                  |«      }| j                  ||||dœ¬«      S )a3  
        Updates the rank of issues (max 50), placing them before a given issue.
        :param issues_to_rank: List of issues to rank (max 50)
        :param rank_before: Issue that the issues will be put over
        :param customfield_number: The number of the custom field Rank
        :return:
        z
issue/rank)rq  ÚrankBeforeIssueÚrankCustomFieldIdrV   r<  )r!   rh  ri  rj  r  r   s         r#   Úupdate_rankzJira.update_rankˆ  s@   € ð  ˆØ×)Ñ)¨(Ó3ˆà�x‰xØà(Ø#.Ø%7ñð ó 
ð 	
r$   c                 ó(   — d}| j                  |«      S )z8
        Get DVCS linked repos
        :return:
        zrest/bitbucket/1.0/repositoriesrÌ   rH   s     r#   Údvcs_get_linked_reposzJira.dvcs_get_linked_reposœ  s   € ð
 0ˆØ�x‰x˜‹}Ðr$   Úrepository_idc                 ó0   — d|› d�}| j                  |«      S )zÚ
        Resync delayed sync repo
        https://confluence.atlassian.com/jirakb/delays-for-commits-to-display-in-development-panel-in-jira-server-779160823.html
        :param repository_id:
        :return:
        z rest/bitbucket/1.0/repositories/z/syncrÈ   )r!   rq  r   s      r#   Ú#dvcs_update_linked_repo_with_remotez(Jira.dvcs_update_linked_repo_with_remote¤  s    € ð 1°°¸uÐEˆØ�y‰y˜‹~Ðr$   Úflagc                 óZ   — d}| j                  |d¬«      }||dœ}| j                  ||«      S )a€  
        Flags or un-flags one or multiple issues in Jira with a flag indicator.
        :param issue_keys: List of issue keys to flag or un-flag.
        :type issue_keys: List[str]
        :param flag: Flag indicating whether to flag or un-flag the issues (default is True for flagging).
        :type flag: bool
        :return: POST request response.
        :rtype: dict
        zxboard/issue/flag/flag.jsonTr`  )Ú	issueKeysrt  r  )r!   r  rt  r  r   r&   s         r#   Ú
flag_issuezJira.flag_issue®  s9   € ð 1ˆØ×)Ñ)¨(¸tÐ)ÓDˆØ'°Ñ6ˆØ�y‰y˜˜dÓ#Ð#r$   c                 óN   — | j                  d«      }|s| j                  d«      }|S )z°
        Get health status of Jira.
        https://confluence.atlassian.com/jirakb/how-to-retrieve-health-check-results-using-rest-api-867195158.html
        :return:
        zrest/troubleshooting/1.0/check/z"rest/supportHealthCheck/1.0/check/rÌ   ©r!   r4   s     r#   Úhealth_checkzJira.health_check½  s*   € ð —8‘8Ð=Ó>ˆÙà—x‘xÐ DÓEˆHØˆr$   c                 ó(   — | j                  d«      }|S )z´
        Health check: Duplicate user accounts detail
        https://confluence.atlassian.com/jirakb/health-check-duplicate-user-accounts-1063554355.html
        :return:
        úrest/api/2/user/duplicated/listrÌ   ry  s     r#   Ú duplicated_account_checks_detailz%Jira.duplicated_account_checks_detailÊ  s   € ð —8‘8Ð=Ó>ˆØˆr$   c                 ó4   — ddi}| j                  d|¬«      }|S )a·  
        Health check: Duplicate user accounts by flush
        The responses returned by the count and list methods are stored in the duplicate users cache for 10 minutes.
        The cache is flushed automatically every time a directory
        is added, deleted, enabled, disabled, reordered, or synchronized.
        https://confluence.atlassian.com/jirakb/health-check-duplicate-user-accounts-1063554355.html
        :return:
        Úflushr@  r|  rC   rÌ   )r!   r%   r4   s      r#   Úduplicated_account_checks_flushz$Jira.duplicated_account_checks_flushÓ  s&   € ð   Ð(ˆØ—8‘8Ð=Àf�8ÓMˆØˆr$   c                 ó(   — | j                  d«      }|S )z³
        Health check: Duplicate user accounts count
        https://confluence.atlassian.com/jirakb/health-check-duplicate-user-accounts-1063554355.html
        :return:
        z rest/api/2/user/duplicated/countrÌ   ry  s     r#   Úduplicated_account_checks_countz$Jira.duplicated_account_checks_countà  s   € ð —8‘8Ð>Ó?ˆØˆr$   Úenablec                 óH   — |rddi}nddi}| j                  d|› �|¬«      }|S )a;  
        Dark Feature Management
        https://confluence.atlassian.com/jirakb/dark-feature-management-1063554355.html
        https://confluence.atlassian.com/jirakb/how-to-manage-dark-features-in-jira-server-and-data-center-959286331.html
        i.e. sd.sla.improved.rendering.enabled
        :return:
        r+  r@  r3  z /rest/internal/1.0/darkFeatures/rV   rÖ  )r!   rJ   rƒ  r&   r4   s        r#   Údark_feature_managementzJira.dark_feature_managementé  s:   € ñ Ø˜vÐ&‰Dà˜wÐ'ˆDØ—8‘8Ð>¸s¸eÐDÈ4�8ÓPˆØˆr$   )NNNNF)NNNN)NNNr{   )NT)NNNNN)r°   )Nr   é2   )NN)r?  r   é
   )NF)NNNNNN)NNé   )Fr   r†  )NNr   éd   )ú*allN)NNTN)rŠ  )zprojects.issuetypes.fields)rŠ  T)T)NNNT)FN)z+rest/scriptrunner/latest/custom/disableUserÚuserName)r   r†  )NNNNr   r†  FT)FF)r?  )r?  Ústandard)r   NN)rŠ  r   N)Nr   r†  )rŠ  r   NNN)rŠ  NNN)rŠ  NN)r�  TNN)r�  TN)NTN)F)r   r‰  N)TTTÚBACKGROUND_PREFERRED)r�  )r‰  )FÚMANUAL)r   )r   N)NNNr   r†  )rŠ  r   NN)r?  r?  rŠ  r?  r   r†  )r?  Tr?  r?  r   r†  )r@  r   r†  (|  Ú__name__Ú
__module__Ú__qualname__Ú__doc__r.   r   r    r   r+   ræ   Úboolr6   r   r   rF   rI   rQ   rZ   r\   r_   rb   r   r   rm   rp   ru   r   rt   Úbytesr–   rš   rœ   rž   r    rä   rª   r   r¯   r´   r¶   r»   r½   rÂ   rÄ   rÉ   rÍ   rÑ   rÓ   rÕ   r×   rÙ   rÛ   rÞ   rè   rì   rï   rô   rH  r÷   rù   rü   rÿ   r  r  r
  r  r  r  r  r   r'  r0  r5  r8  r;  rA  rD  rG  rN  rP  rS  r\  r_  rc  rf  rj  rn  rx  rz  r|  rc   r†  r‡  rj   r�  r—  r¡  r¤  r§  rª  r®  r²  r·  rº  r¿  rÁ  rÃ  rÅ  rÈ  rÌ  rÐ  rÔ  rØ  rÞ  rá  rå  r   rä  rò  rõ  rù  rþ  r   r  r  r  r
  r  r  r  r  r  r  r+  r0  r/  r;  rN  rS  rU  rW  r^  ra  r`  rr  rt  rw  r}  r€  rZ  r„  r†  rŠ  rŒ  r‘  r“  r•  r°   r™  rŸ  r¡  r¤  r©  r­  r³  r·  rº  r¼  r¾  rÁ  rÃ  rÅ  rÊ  rÕ  rÙ  rÛ  rá  ræ  ré  rì  rð  rï  rõ  r÷  rù  rû  r�  rÿ  r  r  r  r  r  r  r  r(  r+  r0  r   r4  r9  r8  r<  rA  rF  rK  rO  rQ  rT  rV  rZ  r\  r^  ra  rc  rg  rn  rt  rw  rz  r|  r�  rƒ  r…  r‡  r‰  r‹  r�  re  r“  r–  r˜  rœ  rŸ  r¡  r¦  rª  r¬  r®  r±  r´  r·  rº  r¾  rÀ  rÅ  rÊ  rÍ  r<  rÓ  rÙ  rÞ  râ  rà  rí  rð  rò  rõ  rù  rü  r  r  r	  r  r  r  r  r   r  r&  r)  r,  r1  r3  r6  r9  r=  rB  rD  rG  rI  rM  rP  rR  rT  rW  rY  r]  rc  rk  rm  ro  rq  ru  rw  r}  r�  r„  r‹  rŽ  r�  r”  r˜  r�  rŸ  r¡  r¤  r¦  r¨  rª  r­  r±  r³  r¶  r¸  rº  r½  r¿  rÈ  rÍ  rÏ  rÑ  rÖ  rÚ  rÜ  rÞ  rá  rã  rå  rî  ró  rí  rö  rú  rü  rþ  r   r  r
  r  r  r  r  r  r%  r'  r)  r+  r.  r1  r4  r6  r8  r:  r>  r@  rB  rE  rG  rJ  rL  rO  rQ  rX  rZ  r^  ra  rc  re  rg  rn  rp  rs  rw  rz  r}  r€  r‚  r…  Ú__classcell__)r"   s   @r#   r   r      sÒ,  ø„ ñð
9˜Cð 9¨ð 9°sõ 9ð "&Ø#Ø $Ø#'Øò9àð9ð ˜‘ð9ð �t‰nð	9ð
 ˜‰~ð9ð ˜4‘.ð9ð õ9ð| &*Ø&*Ø#'Ø$(ò5,àð5,ð ˜T‘Nð5,ð ˜d‘^ð	5,ð
 ˜4‘.ð5,ð ˜D‘>ð5,ð 
ó5,ðn [ó ðð osò,Ø˜D‘>ð,Ø<DÀS¹Mð,Ø^fÐgjÑ^kð,à	ó,ð.(¨ð (°Sð (¸[ó (ð {ó ðð
#¨;ó #ð#¨Sð #°[ó #ðð

#°Dð 
#¸TÀ$ÀsÈCÀxÁ.Ñ=Qó 
#ð¨Dð °[ó ò^°ð ^¸HÀS¹Mð ^ÐU]Ð^aÑUbó ^ñ ˜	Ð*RÔSàEIò'Øð'Ø!)¨#¡ð'Ø>Bð'à	�#‰ò'ó Tð'ðR5°Dð 5¸Uó 5ð ¨tð  ¸ó  ð [ó ð¸ð À+ó ð°tð Àó ðð !%Ø#Ø $Ø#'Ø!%ò#2à˜‘ð#2ð ˜‰}ð#2ð ˜‘ð	#2ð
 ˜C‘=ð#2ð ˜#‘ð#2ð 
ó#2ðJ1¨e°D¸#°IÑ.>ð 1À;ó 1ðò
	°#ð 	À;ó 	ðð
 {ó ð ¨4ð  °Kó  ð¨4ð °Kó ðJ¨ó Jð°tð Àó ðð
)°dð )¸{ó )ð¸ð Àó ð9¨cð 9°eó 9ðð
¨[ó ð¨Kó ð¨;ó ð¨;ó ð {ó ð	¨4ð 	°Kó 	ð)¨sð )°{ó )ð
¨$ð 
¸Dð 
À[ó 
ðð
°dð ¸{ó ð	¨tð 	À3ð 	È;ó 	ð(¨tð (À3ð (ÐX^ð (Ðcnó (ð	 °$ð 	 Àcð 	 Èkó 	 ðð
6 dð 6¨{ó 6ð¸ð À+ó ð.¨$ð .°;ó .ð-¨$ð -¸dð -À{ó -ð
9¨Tð 9°kó 9ð

°$ð 
¸cð 
Àkó 
ðð
¨Kó ðð°ð ¸+ó ò,¨°©ð ,ÀSð ,ÐUXð ,Ðbmó ,ð, ó ð dhò )Øð )Ø"ð )Ø08¸±ð )ØS[Ð\_ÑS`ð )à	ó )ðD¸ð È$ð ÐS^ó ð)°ð )À$ð )ÐQUð )ÐZeó )ð*ò
, Sð ,°cð ,Àcð ,ÐS[Ð\`ÑSaó ,ð2¨$ð °8¸D±>ó ðò
) #ð )¨Cð )¸hÀs¹mð )Ð_có )ð( "Ø%)Ø$(ò(àð(ð ð(ð �c‰]ð	(ð
 ˜c‘]ð(ð ˜D‘>ó(ð8 Dó ð( tð (°#ð (Àó (ð   tó  ð°dó ð &*Ø*.Ø#'Ø"&Ø"Ø"ò&)àð&)ð ð&)ð ˜T‘Nð	&)ð
 " $™ð&)ð ˜C‘=ð&)ð ˜3‘-ð&)ð �s‰mð&)ð �s‰mó&)ðP	 ¸ð 	 ÈTó 	 ðò, ¨¡ð ,¸xÈ¹}ð ,Ð\_ó ,ð4	) ó 	)ò/ ð /°(¸3±-ó /ð( ^`ò,Øð,Ø26ð,ØGJð,ØWZó,ð, mqò8Ø  ™ð8Ø:BÀ3¹-ð8Ø\dÐehÑ\ió8ð4 mqò/Ø  ™ð/Ø:BÀ3¹-ð/Ø\dÐehÑ\ið/à	ó/ð8 $(Ø%)ØØò!,àð!,ð ˜C‘=ð!,ð ˜c‘]ð	!,ð
 ð!,ð ð!,ð 
ó!,ðFò
,˜ð , u¨S°$¨YÑ'7ð ,È(ÐSVÉ-ó ,ð 6:Ø$(Ø#Ø $ò ,àð ,ð �c˜4 ¨¨TÐ1Ñ2ð ,ð ˜S‘Mð	 ,ð
 ð ,ð ˜‘ó ,òD, ð ,¨U°3¸°9Ñ-=ð ,ÐPXÐY\ÑP]ó ,ò&, Tð ,°5¸¸d¸Ñ3Có ,ò.,¨ð ,°Sð ,Ð\gó ,ò$,°3ð ,¸xÈ¹}ð ,Ð\dÐehÑ\ió ,ð& eiò,Øð,Ø+.ð,Ø7?À±}ð,ØT\Ð]`ÑTaó,ð, #ó ò
S¨Sð S¸À#¹ð SÐV^Ð_bÑVcó Sð,	,¨#ð 	,¸¸dÀC¸iÑ8Hó 	,òB ð B¨sð B¸cð BÈHÐUXÉMó Bð
°ó 
ò,¨Sð ,ÀÈÁó ,ð¨Só ð* Sð *°ó *ð# ó #ò
 dð 
°E¸#¸t¸)Ñ4Dð 
Ð]aó 
ò$°ð ¸eÀCÈÀIÑ>Nð Ð\`ó ò$
¸ð 
ÀCð 
ÐPSð 
Ðcgó 
ð6
R¨#ð 
R°+ó 
Rð/ dð /°E¸#¸t¸)Ñ4Dð /Èó /ðL Tð L°4ó LðL tð L°Tó LðE¨ð E°só EðJ¨sð JÀó Jð 0 cð 0¨h°t©nó 0ð sð ¨tó ò/¨Cð /À$ó /ð8 ,0Ø59Ø*.Ø!ò%*àð%*ð �c˜4�iÑ ð%*ð ˜˜c 3˜h™Ñ(ð	%*ð
 # 4¨¨S¨¡>Ñ2ð%*ð ˜T #™YÑ'ð%*ð ó%*òP7¨#ð 7°u¸SÀ$¸YÑ7Gð 7ÐW[ó 7ð,
¨3ð 
°có 
ò
¨cð 
¸À#¹ð 
Ð[cÐdgÑ[hó 
ð&<¨Có <ò( $ð (°H¸S±Mó (ò"%8 5¨¨d¨Ñ#3ð %8ÀTð %8Ð[cÐdhÑ[ió %8ðN	)°ó 	)ð7 4ó 7ð
4¨Tó 4ò )¨3ð )¸ð )È(ÐSWÉ.ó )ð( &*Ø!ò7àð7ð ð7ð ð	7ð
 ˜T‘Nð7ð ó7ð2%¨Cð %¸ó %ðP ^bòNØðNØ)1°$©ðNØMUÐVYÉ]óNð ^bò,Øð,Ø)1°$©ð,ØMUÐVYÉ]ó,ò&#°#ð #¸XÀd¹^ð #Ð[cÐdgÑ[hó #ðT %)Ø&*Ø"&Ø$(Ø %Øñ()àð()ð ð()ð ð	()ð
 ˜D‘>ð()ð ˜s‘mð()ð ˜3‘-ð()ð ˜S‘Mð()ð ð()ð ó()ðT°Sð À4ó ð %)Ø&*ò(àð(ð ð(ð ð	(ð
 ð(ð ˜D‘>ð(ð ˜s‘mó(ð8 ¸ð  Àdð  È{ó  ð
¨sð 
°t¸D±zó 
ð 8¨#ð 8°sð 8¸{ó 8ð quò)Øð)Ø+.ð)Ø8=¸cÀ4È¸oÑ8Nð)Ø_gÐhlÑ_mó)ð4%°4ó %ðJ¸3ð JÈtó JðN¸Sð NÐSVó NðD¨#ó Dð>¨Sð >°Só >ð ]aò,Øð,Ø-5°d©^ð,ØLTÐUXÉMð,à	ó,ð.	°ó 	ð(¨Cð (¸sð (È$ó (ð
¨Cð ¸só ð
 ¨sð  À#ó  ò
,¨#ð ,°xÀ±}ó ,ð 
,¨#ó 
,ò8  T¡
ð 8°H¸S±Mó 8ðð #'Ø!Ø$(Ø $ò#,à˜3‘-ð#,ð �c‰]ð#,ð ˜S‘Mð	#,ð
 ˜‘ó#,óJð1 sô 1ò/ H¨S¡Mð /ÀhÈsÁmð /ÐaiÐjmÑanô /ð$	( Cð 	(¨tô 	(ñ9°ñ 9ÀCô 9ð5¨#ñ 5°cô 5ð #'Ø'+ò!)àñ!)ð ñ!)ð ñ	!)ð
 ˜3‘-ñ!)ð ˜t‘nô!)òF¨°©ð È(ÐSVÉ-ô ð  osò
Ø  ™ð
Ø:BÀ3¹-ñ
Ø^fÐgjÑ^kô
ð. #'Ø$(Ø&*Ø15ò2à˜3‘-ð2ð ˜S‘Mñ2ð ˜s‘mð	2ð
 ˜c 4¨˜oÑ.ô2ð2 osò/Ø  ™ð/Ø:BÀ3¹-ñ/Ø^fÐgjÑ^kô/ð&,È#ð ,ÐTWð ,Ð`cô ,ð>¨ô >ð. Sô .ð AØò	"àð"ð ñ"ð ô	"óOó*2ð Øò,àð,ð ô,ð& #'Ø#Ø$(Ø&*ØØØ',Ø%)ò<,à˜3‘-ð<,ð ˜‰}ð<,ð ˜S‘Mð	<,ð
 ˜s‘mð<,ð ð<,ð ð<,ð !%ñ<,ð #ô<,ð|¨sñ ÀSð ÈTô ð
5°ñ 
5Àcô 
5ðò
	,¨(°3©-ô 	,ó8°(¸4±.ð 8ÐQYÐZ]ÑQ^ô 8ó0¨(°4©.ð 0ÈÐRUÉô 0ñ2:°°s¸D°yÑ1Aô :ð.
¸dð 
Èð 
ÐTWð 
Ð_bô 
ð   #ô  ð 3ô ò,˜3ð ,¨°©ô ,ò4˜sð 4¨H°S©Mô 4ð¨#ô ò,¨ð ,°X¸c±]ô ,ð"  $Ø#Ø"&Ø $Ø#Ø $ò+,àð+,ð ˜‰}ð+,ð ˜‰}ñ	+,ð
 ˜3‘-ð+,ð ˜‘ð+,ð ˜‰}ð+,ð ˜‘ô+,ñZ 4ô ð "Ø!ò,àð,ð ñ,ð ñ	,ð
 ñ,ð ô,ó6J cñ J¸À¹ñ JÐ]eÐfiÑ]jô Jð& #Ø%)Ø&*Ø&*Ø$(Ø&*ó+àð+ð �s‰mð+ð ˜c‘]ñ	+ð
 ˜d‘^ñ+ð ˜d‘^ñ+ð ˜S‘Mñ+ð ˜s‘mô+ó@? Dñ ?°¸$±ñ ?ÐRZÐ[^ÑR_ô ?ð(¨Sô ð	E¸sñ 	EÈTô 	Eð  FJò/àñ/ð ñ/ð ñ	/ð
 ˜' &™/¨7°7Ñ+;¸TÐAÑBô/ð0l°cñ lÀDñ lÐUXô lð)°Sñ )À4ñ )ÐPSñ )Ðadô )ò&2¨#ð 2°Tð 2À8ÈCÁ=ô 2ð& X\òEØñEØ9=ðEØGOÐPSÁ}ôEðñ	ÀSô 	ò	6¸cñ 	6Ð\_ô 	6óóCó*,¸dð *,ÈHÐUXÉMô *,ñX	Àô 	ðñ
(À#ñ 
(Ð]aô 
(ó,¸sð ,ÈHÐUXÉMô ,ð )¨Sð )¸sð )ÐQUô )ó ò
) cð 
)¸ð 
)Èô 
)óóðY°ô Yð bfòLØðLØ#&ðLØ3;¸C±=ðLØQYÐZ]ÑQ^ôLð/°ô /ð lpò0Øð0Ø$)¨#¨t°C©y¨.Ñ$9ð0ØKNð0Ø[cÐdgÑ[hô0ò"Àð ÈCð Ð\_ô ð \^òØðØ(0°©ðØEHðØUXðà	ôð$F°3ô Fð
°#ð ¸+ô ð
°ô ð°[ô ð¨Kô ð¸#ð ÈCð ÐT\Ð]`ÑTaô ðð
) dð )¨{ô )ð4 dð ¨{ô ð
 ¨ð 
 °+ô 
 ðð
M dô MðP¨Dô Pð)°4ð )¸Kô )ñ>°Sñ >À#ñ >ÐPSð >ÐX]Ð^iÐknÐ^nÑXoô >ñ°dð ¸{ô ñ ¸ð  À+ô  ñ(¸ð (ÀTð (Èkô (ðð
 [ô ñ°$ð ¸;ô ðð
¨kô ðð
 ô ñ¸ð À+ô ñ¨ð °(¸4±.ô ñ	¨tñ 	¸Tð 	ÀhÈtÁnô 	ñ¨tð ¸ô ð	) $ñ 	)°4ñ 	)Àð 	)È+ô 	)ðð )/ØØ#Ø $Ø(,ò1,àð1,ð �c˜4 ™9�nÑ%ð1,ð ð	1,ð
 ˜‰}ð1,ð ˜‘ñ1,ð ! ™ð1,ð 
ô1,ðl )/Ø'+Ø#Ø $ò$,àð$,ð �c˜4 ™9�nÑ%ñ$,ð   ‘}ð	$,ð
 ˜‰}ð$,ð ˜‘ô$,ðL$àô$ñ&, 4¨¡9ñ ,°D¸±Ið ,À(È4ÐPSÐUXÐPXÉ>ÑBZô ,ðH $*ØØ#Ø $Ø(,òBàðBð �c˜4�iÑ ðBð ð	Bð
 ˜‰}ðBð ˜‘ñBð ! ™ðBð 
ôBðN $*Ø#Ø $ò4àð4ð �c˜4�iÑ ð4ð ˜‰}ð	4ð
 ˜‘ô4ðr ØØ#Ø#'ò%
àð%
ð ñ%
ð ð	%
ð
 ˜‰}ñ%
ð ˜C‘=ð%
ð 
ô%
òN
˜ð 
 Sñ 
¸Tð 
ÐQYÐZ]ÑQ^ð 
Ðjoô 
ð< fjò
Øð
Ø'¨™}ñ
ØAEð
ØU]Ð^aÑUbð
à	õ
ð> Kõ ñ¨dð °{õ ðð
 ;õ ð #'Ø%)Ø'+Ø $ó,à˜3‘-ñ,ð ˜c‘]ñ,ð   ‘}ð	,ð
 ˜‘ð,ð 
õ,ð@ +õ ðK +õ KñK¨#ð K°+õ KñK°#ð K¸+õ KñJ¨ð J°õ Jñ  ¨ð  °õ  ðT©Xõ Tñ=°ñ =À#ð =È+õ =ñ=¨ð =°õ =ñ=¨ð =°õ =ò_°¸±õ _ò ,°$ð ,ÀÈÁð ,ÐYdõ ,ð$3¸ñ 3Ècð 3ÐVaõ 3ð2 &*Ø,0Ø#Ø $ò57àð57ð ð57ð ˜c‘]ð	57ð
 ˜d 4™jÑ)ñ57ð ˜‰}ð57ð ˜‘õ57ðnðS¨Kõ Só!°4ñ !Àdð !ÐWbõ !ó&À3ñ ÐUYð Ðfqõ ò<,¨cð ,¸cð ,ÐQYÐZ]ÑQ^ð ,Ðjuõ ,ð(.¨4ð .°Kõ .ð&ó,Àð ,ÈXÐVYÉ]ð ,Ðfqõ ,ñ (ÀCñ (Ð]að (Ðfqõ (ð ñ	Àð 	Èõ 	ðð
 {õ ðð
¨Kõ ðð
,¨Sð ,°[õ ,ðñ
)¨tð 
)À#ð 
)È+õ 
)ð)Øð)Ø&)ñ)ØBFñ)ØX\ð)à	õ)ð(ð Ø#ØØ3ó#-àñ#-ð ñ#-ð ñ	#-ð
 ð#-ð 
õ#-óJ9¨sð 9ÐP[õ 9ð	 õ 	ð
¨3ð 
°;õ 
ñ dð ¨tõ ó,¨ð ,°{õ ,ó
>¨tð 
>Àõ 
>ð  MQó,Ø% d™^ð,Ø<DÀS¹Mð,à	õ,ð"ÀTð Èkõ ð ckò")Øð")Ø,0ñ")ØCGñ")Ø\_ð")à	õ")òH)¨h°t©nð )ÈÈkÐ[^ÐN^ÑH_õ )ð" ¸Sð  À[õ  ð,ÀSð ,È[õ ,ñÈð ÐQ\õ ð MQò,Ø˜c‘]ñ,Ø;CÀD¹>ð,à	õ,ð$
)°#ð 
)¸Sð 
)À[õ 
)ò)¨x¸©~ð )ÈÈ{Ð\_ÐO_ÑI`õ )ó¸Dð Èõ ð =Aó(Øð(Ø+3°D©>ð(à	ˆ{˜CÐÑ	 õ(ó. ¸tð  ÈKõ  ðF¨uõ Fð¨;õ ñ°tð Àõ ñ¸$ð À;õ ñ(¸dð (Ècð (ÐVaõ (ñ)¸$ð )À;õ )ñ¸4ð ÀKõ ñ	(¸$ñ 	(Èð 	(ÐP[õ 	(ð°Kõ ð gkó,Øñ,Ø(+ñ,Ø6>¸s±mñ,ØV^Ð_bÑVcð,à	õ,ð( $(Ø!%Ø"&Ø%)Ø%)Ø"&ó!,à˜C‘=ñ!,ð ˜#‘ð!,ð ˜3‘-ð	!,ð
 ˜c‘]ñ!,ð ˜c‘]ñ!,ð ˜$‘ð!,ð 
õ!,ðJ IMó#+Ø! #™ñ#+Ø8@À¹ð#+ØX[ð#+à	õ#+ðJ¸Cð ÀKõ ð osó)Øð)Ø$'ñ)Ø@Cð)ØOSð)Ø^fÐgjÑ^kð)à	õ)ð.,Àñ ,ÐY\ð ,Ðalõ ,ð,¸Sð ,È3ñ ,Ð[^ð ,Ðcnõ ,ñ$,À#ñ ,ÐRUð ,ÐZeõ ,ð°Tð ¸kõ ð¸Dð À[õ ò,°¸±ð ,Èõ ,ñJ¨dñ JÀð JÈõ Jñ)°$ñ )À4ð )ÈKõ )ñ 	)°$ñ 	)ÀTð 	)Èkõ 	)ñ¨tð ¸õ ñ	 °ñ 	 À$ñ 	 ÐW[ð 	 Ð`kõ 	 ñ(Øñ(Ø(,ñ(Ø=Að(ØIMð(à	õ(ðH¸;õ HðB¸Kõ BðK¸sð KÀ{õ Kó`¨sñ `Àð `ÐQTõ `ñ=°ð =¸+õ =ñ)¨Dð )°[õ )ð °dð ¸{õ ò) sð )°#ð )À$ñ )ÐRZÐ[_ÑR`ð )Ðlwõ )ð" %)Ø%)Ø$(ØØó,à˜S‘Mð,ð ˜c‘]ñ,ð ˜S‘Mð	,ð
 ð,ð ð,ð 
õ,ñB ¨4ð  °Kõ  ñ¨ð °õ ñ¨tð ¸õ ñ°dð ¸{õ ð@ ØØ#Ø $ó(,àð(,ð ð(,ð ð	(,ð
 ð(,ð ˜‰}ð(,ð ˜‘ð(,ð 
õ(,ð\ ØØó,àñ,ð ð,ð ð	,ð
 ð,ð 
õ,ðD Ø ØØØØó3,àñ3,ð ð3,ð ñ	3,ð
 ð3,ð ð3,ð ð3,ð ð3,ð ð3,ð 
õ3,ðp Ø ØØØØó0,àð0,ð ñ0,ð ð	0,ð
 ð0,ð ð0,ð ð0,ð ð0,ð 
õ0,óf,¸tð ,ÈCð ,Ð\_ð ,Ðitõ ,ñ:°4ð ¸Kõ ñ°ð ÀSð È[õ ñ
°ð 
ÀSð 
È[õ 
ñ
 °Dð 
 Èð 
 ÐP[õ 
 ñ¸ð À+õ ñ	(¸ð 	(ÀTð 	(Èkõ 	(ð Y[ó,Øñ,Ø%-¨c¡]ð,ØBEð,ØRUð,à	õ,ñ: ™Ñ)QÔRàXZóNØñNØ%-¨c¡]ðNØBEðNØRUðNà	óNó SñNð" Ø"ØØØØó1,àñ1,ð ð1,ð ñ	1,ð
 ð1,ð ð1,ð ð1,ð ð1,ð ð1,ð 
õ1,ðj TVó,Øñ,Ø(+ð,Ø=@ð,ØMPð,à	õ,ðH %)Ø"&Ø"ò!)àñ!)ð ñ!)ð ˜S‘Mñ	!)ð
 ˜3‘-ñ!)ð �s‰mð!)ð 
õ!)ñF)¨dñ )¸DÀ¹Ið )È+õ )ñ$
 Dð 
¨[õ 
ñ
 tð 
°3ñ 
ÀCñ 
ÐSVð 
Ð[fõ 
ñ 
  tð 
 °õ 
 ñ)°ð )¸Tð )Àkõ )ñ,,¨4ð ,¸ð ,ÀTð ,Èkõ ,ñ4
¨$ñ 
¸Sñ 
ÐVZð 
Ð_jõ 
ð( {õ ñÀð È+õ ó$ T¨$¡Zñ $°tð $À{õ $ð˜kõ ð°+õ ð°õ ð°õ ò¨3ñ ¸ð È÷ ò r$   r   )!Úloggingr�   r’  Útypingr   r   r   r   r   r   r	   Úwarningsr
   r   Úrequestsr   r   ÚsysÚversion_infor   Útyping_extensionsÚerrorsr   r   Úrest_clientr   Ú	typehintsr   r   Ú	getLoggerr�  r  r   rt  r$   r#   ú<module>r¡     sc   ðã Û 	Û 	ß C× CÑ CÝ å !ß (Û 
à×Ñ�vÒÞå)ß 8Ý )ß (à€g×Ñ˜Ó!€ô_[Ðõ _[r$   