pyxecm 1.6__py3-none-any.whl → 2.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pyxecm might be problematic. Click here for more details.

Files changed (78) hide show
  1. pyxecm/__init__.py +7 -4
  2. pyxecm/avts.py +727 -254
  3. pyxecm/coreshare.py +686 -467
  4. pyxecm/customizer/__init__.py +16 -4
  5. pyxecm/customizer/__main__.py +58 -0
  6. pyxecm/customizer/api/__init__.py +5 -0
  7. pyxecm/customizer/api/__main__.py +6 -0
  8. pyxecm/customizer/api/app.py +163 -0
  9. pyxecm/customizer/api/auth/__init__.py +1 -0
  10. pyxecm/customizer/api/auth/functions.py +92 -0
  11. pyxecm/customizer/api/auth/models.py +13 -0
  12. pyxecm/customizer/api/auth/router.py +78 -0
  13. pyxecm/customizer/api/common/__init__.py +1 -0
  14. pyxecm/customizer/api/common/functions.py +47 -0
  15. pyxecm/customizer/api/common/metrics.py +92 -0
  16. pyxecm/customizer/api/common/models.py +21 -0
  17. pyxecm/customizer/api/common/payload_list.py +870 -0
  18. pyxecm/customizer/api/common/router.py +72 -0
  19. pyxecm/customizer/api/settings.py +128 -0
  20. pyxecm/customizer/api/terminal/__init__.py +1 -0
  21. pyxecm/customizer/api/terminal/router.py +87 -0
  22. pyxecm/customizer/api/v1_csai/__init__.py +1 -0
  23. pyxecm/customizer/api/v1_csai/router.py +87 -0
  24. pyxecm/customizer/api/v1_maintenance/__init__.py +1 -0
  25. pyxecm/customizer/api/v1_maintenance/functions.py +100 -0
  26. pyxecm/customizer/api/v1_maintenance/models.py +12 -0
  27. pyxecm/customizer/api/v1_maintenance/router.py +76 -0
  28. pyxecm/customizer/api/v1_otcs/__init__.py +1 -0
  29. pyxecm/customizer/api/v1_otcs/functions.py +61 -0
  30. pyxecm/customizer/api/v1_otcs/router.py +179 -0
  31. pyxecm/customizer/api/v1_payload/__init__.py +1 -0
  32. pyxecm/customizer/api/v1_payload/functions.py +179 -0
  33. pyxecm/customizer/api/v1_payload/models.py +51 -0
  34. pyxecm/customizer/api/v1_payload/router.py +499 -0
  35. pyxecm/customizer/browser_automation.py +721 -286
  36. pyxecm/customizer/customizer.py +1076 -1425
  37. pyxecm/customizer/exceptions.py +35 -0
  38. pyxecm/customizer/guidewire.py +1186 -0
  39. pyxecm/customizer/k8s.py +901 -379
  40. pyxecm/customizer/log.py +107 -0
  41. pyxecm/customizer/m365.py +2967 -920
  42. pyxecm/customizer/nhc.py +1169 -0
  43. pyxecm/customizer/openapi.py +258 -0
  44. pyxecm/customizer/payload.py +18228 -7820
  45. pyxecm/customizer/pht.py +717 -286
  46. pyxecm/customizer/salesforce.py +516 -342
  47. pyxecm/customizer/sap.py +58 -41
  48. pyxecm/customizer/servicenow.py +611 -372
  49. pyxecm/customizer/settings.py +445 -0
  50. pyxecm/customizer/successfactors.py +408 -346
  51. pyxecm/customizer/translate.py +83 -48
  52. pyxecm/helper/__init__.py +5 -2
  53. pyxecm/helper/assoc.py +83 -43
  54. pyxecm/helper/data.py +2406 -870
  55. pyxecm/helper/logadapter.py +27 -0
  56. pyxecm/helper/web.py +229 -101
  57. pyxecm/helper/xml.py +596 -171
  58. pyxecm/maintenance_page/__init__.py +5 -0
  59. pyxecm/maintenance_page/__main__.py +6 -0
  60. pyxecm/maintenance_page/app.py +51 -0
  61. pyxecm/maintenance_page/settings.py +28 -0
  62. pyxecm/maintenance_page/static/favicon.avif +0 -0
  63. pyxecm/maintenance_page/templates/maintenance.html +165 -0
  64. pyxecm/otac.py +235 -141
  65. pyxecm/otawp.py +2668 -1220
  66. pyxecm/otca.py +569 -0
  67. pyxecm/otcs.py +7956 -3237
  68. pyxecm/otds.py +2178 -925
  69. pyxecm/otiv.py +36 -21
  70. pyxecm/otmm.py +1272 -325
  71. pyxecm/otpd.py +231 -127
  72. pyxecm-2.0.1.dist-info/METADATA +122 -0
  73. pyxecm-2.0.1.dist-info/RECORD +76 -0
  74. {pyxecm-1.6.dist-info → pyxecm-2.0.1.dist-info}/WHEEL +1 -1
  75. pyxecm-1.6.dist-info/METADATA +0 -53
  76. pyxecm-1.6.dist-info/RECORD +0 -32
  77. {pyxecm-1.6.dist-info → pyxecm-2.0.1.dist-info/licenses}/LICENSE +0 -0
  78. {pyxecm-1.6.dist-info → pyxecm-2.0.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,5 @@
1
+ """Initialize the maintenance page."""
2
+
3
+ from .app import run_maintenance_page, settings
4
+
5
+ __all__ = ["run_maintenance_page", "settings"]
@@ -0,0 +1,6 @@
1
+ """Wrapper to start the Maintenance Page."""
2
+
3
+ from pyxecm.maintenance_page import run_maintenance_page
4
+
5
+ if __name__ == "__main__":
6
+ run_maintenance_page()
@@ -0,0 +1,51 @@
1
+ """Maintenance Page that can be enabled by the customizer."""
2
+
3
+ import os
4
+ from datetime import datetime
5
+
6
+ import uvicorn
7
+ from fastapi import FastAPI, HTTPException, Request
8
+ from fastapi.responses import FileResponse
9
+ from fastapi.templating import Jinja2Templates
10
+ from pytz import UTC
11
+ from starlette.exceptions import HTTPException as StarletteHTTPException
12
+
13
+ from pyxecm.maintenance_page.settings import settings
14
+
15
+ app = FastAPI(openapi_url=None)
16
+
17
+ base_dir = os.path.dirname(os.path.abspath(__file__))
18
+ static_dir = os.path.join(base_dir, "static")
19
+ templates = Jinja2Templates(directory=settings.templates_dir)
20
+
21
+
22
+ @app.get("/favicon.avif", include_in_schema=False)
23
+ async def favicon() -> FileResponse:
24
+ """Serve the favicon."""
25
+ return FileResponse(path=os.path.join(static_dir, "favicon.avif"))
26
+
27
+
28
+ @app.exception_handler(StarletteHTTPException)
29
+ async def http_exception_handler(request: Request, exc: HTTPException) -> Jinja2Templates:
30
+ """Handle HTTP Exceptions."""
31
+
32
+ if exc.status_code == 404:
33
+ return templates.TemplateResponse(
34
+ request=request,
35
+ name="maintenance.html",
36
+ context={
37
+ "maint_title": settings.title,
38
+ "maint_text": settings.text,
39
+ "maint_footer": settings.footer,
40
+ "status_url": settings.status_url,
41
+ "copyright_year": datetime.now(tz=UTC).year,
42
+ },
43
+ status_code=513,
44
+ )
45
+ else:
46
+ return templates.TemplateResponse("error.html", {"request": request, "status_code": exc.status_code})
47
+
48
+
49
+ def run_maintenance_page() -> None:
50
+ """Start the FASTAPI Webserver."""
51
+ uvicorn.run(app, host=settings.host, port=settings.port)
@@ -0,0 +1,28 @@
1
+ """Place for all settings classes for the Maintenance Page."""
2
+
3
+ import os
4
+ from typing import Literal
5
+
6
+ from pydantic import Field
7
+ from pydantic_settings import BaseSettings, SettingsConfigDict
8
+
9
+
10
+ class MaintenancePageSettings(BaseSettings):
11
+ """Settings for the Customizer API."""
12
+
13
+ status_url: str | None = Field(default=None)
14
+
15
+ title: str = Field(default="Maintenance Mode")
16
+ text: str = Field(default="The Content Management system is currently unavailable.")
17
+ footer: str = Field(default="")
18
+
19
+ loglevel: Literal["INFO", "DEBUG", "WARNING", "ERROR"] = "INFO"
20
+ host: str = Field(default="0.0.0.0", frozen=True) # noqa: S104
21
+ port: int = Field(default=5555, frozen=True)
22
+ templates_dir: str = Field(default=os.path.join(os.path.dirname(os.path.abspath(__file__)), "templates"))
23
+
24
+ model_config = SettingsConfigDict(env_prefix="MAINTENANCE_PAGE_")
25
+
26
+
27
+ # Create instance of the settings class
28
+ settings = MaintenancePageSettings()
@@ -0,0 +1,165 @@
1
+ <!DOCTYPE html>
2
+
3
+ <style>
4
+ html {
5
+ font-family: sans-serif;
6
+ -webkit-text-size-adjust: 100%;
7
+ -ms-text-size-adjust: 100%;
8
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
9
+ height: 100%;
10
+ background-color: #111b58;
11
+ background: -webkit-linear-gradient(
12
+ 29deg,
13
+ rgb(9, 14, 44) 0%,
14
+ rgb(18, 44, 105) 59%,
15
+ rgb(7, 141, 179) 100%
16
+ );
17
+ background: -o-linear-gradient(
18
+ 29deg,
19
+ rgb(9, 14, 44) 0%,
20
+ rgb(18, 44, 105) 59%,
21
+ rgb(7, 141, 179) 100%
22
+ );
23
+ background: -ms-linear-gradient(
24
+ 29deg,
25
+ rgb(9, 14, 44) 0%,
26
+ rgb(18, 44, 105) 59%,
27
+ rgb(7, 141, 179) 100%
28
+ );
29
+ background: -moz-linear-gradient(
30
+ 29deg,
31
+ rgb(9, 14, 44) 0%,
32
+ rgb(18, 44, 105) 59%,
33
+ rgb(7, 141, 179) 100%
34
+ );
35
+ background: linear-gradient(
36
+ 61deg,
37
+ rgb(9, 14, 44) 0%,
38
+ rgb(18, 44, 105) 59%,
39
+ rgb(7, 141, 179) 100%
40
+ );
41
+ background-attachment: fixed;
42
+ }
43
+ body {
44
+ background: inherit;
45
+ }
46
+
47
+ #ot-logo {
48
+ width: 280px;
49
+ height: 50px;
50
+ background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 244 46" fill="white"><path d="M32.8 21c0 7.4-4.4 15.4-16 15.4C8.4 36.4.7 31.8.7 21c0-8.9 5.8-15.8 17.2-15.2 12.2.7 14.9 9.9 14.9 15.2zm-21.7-5.6C10 17 9.6 19 9.6 21c0 4.5 2.3 8.6 7.2 8.6 4.8 0 7.1-3.8 7.1-8.2 0-3.2-.8-5.6-2.5-7.1-1.8-1.6-3.9-1.7-5.2-1.6-2.4.1-3.9.9-5.1 2.7zm100-6.3c.9-.9 1.4-1.6 3-2.3 1.4-.6 3.3-1 5.5-1 1.8 0 3.8.3 5.3 1.1 3.1 1.6 4 4.2 4 8.8v20H120V19.2c0-2.6-.1-3.6-.4-4.4-.7-1.6-2.2-2.2-4-2.2-4.6 0-4.6 3.6-4.6 7.3v15.8h-8.8V6.5h8.9v2.6zM98 28.1c-.8 1.7-3.4 8.3-14.9 8.3-8.9 0-15.1-5.3-15.1-14.9 0-7 3.6-15.7 15.4-15.7 1.8 0 6.9-.2 10.8 3.8 3.9 4.1 4.1 9.8 4.2 13.1H76.9c0 3.6 2.1 7.3 6.9 7.3 4.8 0 6.5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3v12.2H36V6.5h8.9v2.6zm6 3.4c-1.6 0-3.3.6-4.5 2.2-1.3 1.5-1.8 3.8-1.8 6.4 0 3.4 1 5.5 2.1 6.7 1 1.1 2.5 1.8 4 1.8 4.3 0 6.2-4.4 6.2-8.7 0-3.6-1.1-7.4-4.7-8.2-.5-.1-.9-.2-1.3-.2z"/></svg>');
51
+ background-repeat: no-repeat;
52
+ background-position-y: center;
53
+ margin-right: 10px;
54
+ }
55
+
56
+ .card {
57
+ background-color: red;
58
+ }
59
+
60
+ .system-name {
61
+ position: absolute;
62
+ font-size: 15pt;
63
+ top: 58px;
64
+ left: 80px;
65
+ font-family: sans-serif;
66
+ font-style: italic;
67
+ color: rgb(158, 158, 158);
68
+ }
69
+
70
+ .logline {
71
+ font-family: monospace;
72
+ }
73
+
74
+ .logline-WARNING {
75
+ background-color: rgb(234, 192, 6, 0.5);
76
+ }
77
+
78
+ .logline-ERROR {
79
+ background-color: rgba(234, 16, 16, 0.5);
80
+ }
81
+
82
+ .scrollbox {
83
+ background: rgba(139, 139, 139, 0.2);
84
+ /* height: 650px; */
85
+ height: calc(100vh - 200px);
86
+ overflow: scroll;
87
+ border: 1px solid #000;
88
+ padding: 5px;
89
+ -ms-overflow-style: none;
90
+ white-space: nowrap;
91
+ }
92
+ </style>
93
+
94
+ <html lang="en">
95
+ <head>
96
+ <meta charset="utf-8" />
97
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
98
+ <title>Customizer</title>
99
+
100
+ <link
101
+ rel="stylesheet"
102
+ href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
103
+ />
104
+ <link rel="icon" href="favicon.avif" />
105
+ </head>
106
+
107
+ <body>
108
+ {% if status_url is not none %}
109
+ <iframe
110
+ src="{{ status_url }}"
111
+ style="
112
+ position: fixed;
113
+ top: 0px;
114
+ left: 0px;
115
+ bottom: 0px;
116
+ right: 0px;
117
+ width: 100%;
118
+ height: 100%;
119
+ border: none;
120
+ margin: 0;
121
+ padding: 0;
122
+ overflow: hidden;
123
+ z-index: 999999;
124
+ "
125
+ >
126
+ Your browser doesn't support iframes
127
+ </iframe>
128
+ {% else %}
129
+
130
+ <!-- Main -->
131
+ <main>
132
+ <div class="d-flex justify-content-center mt-5">
133
+ <div id="ot-logo"></div>
134
+ </div>
135
+
136
+ <div class="d-flex justify-content-center mt-5">
137
+ <div
138
+ class="card bg-transparent shadow text-center border"
139
+ style="width: 500px"
140
+ >
141
+ <div class="card-header bg-light opacity-100" id="maint-title">
142
+ {{ maint_title }}
143
+ </div>
144
+ <div class="card-body text-light opacity-75" id="maint-text">
145
+ {{ maint_text }}
146
+ </div>
147
+ </div>
148
+ </div>
149
+
150
+ <div class="d-flex justify-content-center mt-5">
151
+ <div class="card-footer text-light" id="maint-footer">
152
+ {{ maint_footer }}
153
+ </div>
154
+ </div>
155
+
156
+ <div
157
+ class="box text-light opacity-50 fixed-bottom text-center mb-3 small"
158
+ >
159
+ Copyright © {{ copyright_year }} Open Text. All Rights Reserved.
160
+ </div>
161
+ </main>
162
+
163
+ {% endif %}
164
+ </body>
165
+ </html>