csc-cia-stne 0.0.31__py3-none-any.whl → 0.0.33__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- csc_cia_stne/servicenow.py +9 -2
- csc_cia_stne/utilitarios/validations/__init__.py +2 -2
- {csc_cia_stne-0.0.31.dist-info → csc_cia_stne-0.0.33.dist-info}/METADATA +1 -1
- {csc_cia_stne-0.0.31.dist-info → csc_cia_stne-0.0.33.dist-info}/RECORD +7 -7
- {csc_cia_stne-0.0.31.dist-info → csc_cia_stne-0.0.33.dist-info}/LICENCE +0 -0
- {csc_cia_stne-0.0.31.dist-info → csc_cia_stne-0.0.33.dist-info}/WHEEL +0 -0
- {csc_cia_stne-0.0.31.dist-info → csc_cia_stne-0.0.33.dist-info}/top_level.txt +0 -0
csc_cia_stne/servicenow.py
CHANGED
@@ -65,6 +65,7 @@ class ServiceNow:
|
|
65
65
|
"""
|
66
66
|
return (self.username, self.password)
|
67
67
|
|
68
|
+
|
68
69
|
def request (self, url : str , params : str = "", timout : int = 15):
|
69
70
|
"""
|
70
71
|
Realiza uma requisição GET para a URL especificada.
|
@@ -132,6 +133,7 @@ class ServiceNow:
|
|
132
133
|
logging.debug(f"Erro inesperado: {e}")
|
133
134
|
return {"success" : False, "result" : None, "error" : str(e)}
|
134
135
|
|
136
|
+
|
135
137
|
def put(self, url, payload, timeout = 15):
|
136
138
|
"""
|
137
139
|
Realiza uma requisição PUT para a URL especificada.
|
@@ -202,6 +204,7 @@ class ServiceNow:
|
|
202
204
|
except Exception as e:
|
203
205
|
logging.debug(f"Erro inesperado: \n {e}")
|
204
206
|
return {"success" : False, "error" : str(e) , "result" : None}
|
207
|
+
|
205
208
|
|
206
209
|
def post(self, url : str, variables : dict, header_content_type = "", timeout : int = 15):
|
207
210
|
"""
|
@@ -268,6 +271,7 @@ class ServiceNow:
|
|
268
271
|
logging.debug(f"Erro inesperado: \n {e}")
|
269
272
|
return {"success" : False, "error" : str(e) , "result" : None}
|
270
273
|
|
274
|
+
|
271
275
|
def listar_tickets(self, tabela: str = None, campos: list = None, query: str = None, limite: int = 50, timeout:int=15)->dict:
|
272
276
|
"""lista tickets do ServiceNow
|
273
277
|
|
@@ -327,6 +331,7 @@ class ServiceNow:
|
|
327
331
|
except Exception as e:
|
328
332
|
return {"success" : False, "result" : None, "error" : str(e)}
|
329
333
|
|
334
|
+
|
330
335
|
def update_ticket(self, tabela: str = None, sys_id: str = None, payload: dict = None, timeout:int=15)->dict:
|
331
336
|
"""Atualiza as informações de um ticket
|
332
337
|
|
@@ -370,6 +375,7 @@ class ServiceNow:
|
|
370
375
|
except Exception as e:
|
371
376
|
return {"success" : False, "result" : None, "error" : str(e) }
|
372
377
|
|
378
|
+
|
373
379
|
def anexar_arquivo_no_ticket(self,header_content_type:dict=None, anexo_path:str=None, tabela:str=None, sys_id:str=None, timeout:int=15):
|
374
380
|
"""Anexa arquivo em um ticket do ServiceNow
|
375
381
|
|
@@ -430,6 +436,7 @@ class ServiceNow:
|
|
430
436
|
except Exception as e:
|
431
437
|
return {"success" : False, "result" : None, "error" : str(e)}
|
432
438
|
|
439
|
+
|
433
440
|
def valida_header_content_type(self, anexo_path ):
|
434
441
|
"""
|
435
442
|
Valida e define o cabeçalho `Content-Type` baseado na extensão do arquivo anexado.
|
@@ -480,6 +487,7 @@ class ServiceNow:
|
|
480
487
|
|
481
488
|
return header_content_type
|
482
489
|
|
490
|
+
|
483
491
|
def get_anexo(self, sys_id: str = None, tabela: str = None, campo: str = 'default', download_dir:str=None, timeout:int=15)->dict:
|
484
492
|
"""Traz os anexos de um campo do ticket especificado
|
485
493
|
|
@@ -496,8 +504,7 @@ class ServiceNow:
|
|
496
504
|
GetAttachValidator(sys_id=sys_id,
|
497
505
|
tabela=tabela,
|
498
506
|
timeout=timeout,
|
499
|
-
download_dir=download_dir
|
500
|
-
timeout=timeout )
|
507
|
+
download_dir=download_dir)
|
501
508
|
except ValidationError as e:
|
502
509
|
raise ValueError("Erro na validação dos dados de input do método:", e.errors())
|
503
510
|
|
@@ -1,2 +1,2 @@
|
|
1
|
-
from GoogleDriveValidator import *
|
2
|
-
from GcpBigQueryValidator import *
|
1
|
+
from .GoogleDriveValidator import *
|
2
|
+
from .GcpBigQueryValidator import *
|
@@ -8,7 +8,7 @@ csc_cia_stne/karavela.py,sha256=Q7MbQXXz_jtrLHM7QeenbSzcro07EpoFk4lKglivJ_I,3564
|
|
8
8
|
csc_cia_stne/logger_json.py,sha256=W6Fj0G1-TWXHdHoLLX5SbVV7BSpVvjHm1fkKI5Q69YQ,3129
|
9
9
|
csc_cia_stne/logger_rich.py,sha256=4KVwxz87AA52qEMpgCh1SlS--7a57LK4Y4HSnKmRruc,7514
|
10
10
|
csc_cia_stne/provio.py,sha256=TF6_1uygkzftkhsOn6eMGkNqIWliKwcvh54RM10WzRo,2383
|
11
|
-
csc_cia_stne/servicenow.py,sha256=
|
11
|
+
csc_cia_stne/servicenow.py,sha256=QN7R49Bb8HcqfGT9iytbPaqwV2rtH4N7Nhvb_kfTsHU,36400
|
12
12
|
csc_cia_stne/stne_admin.py,sha256=G5ozXt18VjKL2BHtROQk4GnfVY1xM14RXSQ-rra_D54,15487
|
13
13
|
csc_cia_stne/utilitarios/__init__.py,sha256=4YFhzxu8F_CDHU6iaNhpzz9mfX-8wfJc1XEQInJzwJ4,98
|
14
14
|
csc_cia_stne/utilitarios/functions/__init__.py,sha256=X0PmuSe0RilU824Lvlg-DtO0qDb_D_VfL4ftzR93d40,180
|
@@ -19,9 +19,9 @@ csc_cia_stne/utilitarios/functions/func_titulo.py,sha256=IMiTKdlMkOGHPJmPZEj2HnB
|
|
19
19
|
csc_cia_stne/utilitarios/validations/GcpBigQueryValidator.py,sha256=BSJ84FBuOxbhYpyoebGMW15t0np9PHA8OCHFjkLOIRA,2984
|
20
20
|
csc_cia_stne/utilitarios/validations/GoogleDriveValidator.py,sha256=OaT6F98RyP3iIMsIQMc0CCDUt0u7EkKxG_UoHm2ME3c,1376
|
21
21
|
csc_cia_stne/utilitarios/validations/ServiceNowValidator.py,sha256=9IS3ucuLXeeebfVpvywEu9OiN-BfbXTuowTBEotUbow,5991
|
22
|
-
csc_cia_stne/utilitarios/validations/__init__.py,sha256=
|
23
|
-
csc_cia_stne-0.0.
|
24
|
-
csc_cia_stne-0.0.
|
25
|
-
csc_cia_stne-0.0.
|
26
|
-
csc_cia_stne-0.0.
|
27
|
-
csc_cia_stne-0.0.
|
22
|
+
csc_cia_stne/utilitarios/validations/__init__.py,sha256=VE49g8ExrBUyyUzhOUjsP9880L1PWCKPHckd848MQeo,71
|
23
|
+
csc_cia_stne-0.0.33.dist-info/LICENCE,sha256=LPGMtgKki2C3KEZP7hDhA1HBrlq5JCHkIeStUCLEMx4,1073
|
24
|
+
csc_cia_stne-0.0.33.dist-info/METADATA,sha256=_H_zaP8InDgMCsvQHlafwnLTrBxfwA3-OHmdF9e4Zts,1003
|
25
|
+
csc_cia_stne-0.0.33.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
26
|
+
csc_cia_stne-0.0.33.dist-info/top_level.txt,sha256=ldo7GVv3tQx5KJvwBzdZzzQmjPys2NDVVn1rv0BOF2Q,13
|
27
|
+
csc_cia_stne-0.0.33.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|