Tapi 0.2.2__tar.gz → 3.0.0__tar.gz

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.
Files changed (329) hide show
  1. tapi-3.0.0/.gitignore +27 -0
  2. tapi-3.0.0/CHANGELOG.md +99 -0
  3. tapi-3.0.0/PKG-INFO +137 -0
  4. tapi-3.0.0/README.md +104 -0
  5. tapi-3.0.0/docs/README.md +40 -0
  6. tapi-3.0.0/docs/architecture.md +77 -0
  7. tapi-3.0.0/docs/conventions.md +80 -0
  8. tapi-3.0.0/docs/endpoints/README.md +49 -0
  9. tapi-3.0.0/docs/endpoints/admin/action_egress_control_rules.md +123 -0
  10. tapi-3.0.0/docs/endpoints/admin/admin.md +26 -0
  11. tapi-3.0.0/docs/endpoints/admin/custom_certificate_authority.md +39 -0
  12. tapi-3.0.0/docs/endpoints/admin/ip_access_control_rules.md +121 -0
  13. tapi-3.0.0/docs/endpoints/admin/jobs.md +210 -0
  14. tapi-3.0.0/docs/endpoints/admin/license.md +81 -0
  15. tapi-3.0.0/docs/endpoints/admin/roles.md +121 -0
  16. tapi-3.0.0/docs/endpoints/admin/smtp.md +86 -0
  17. tapi-3.0.0/docs/endpoints/admin/sync_destinations.md +174 -0
  18. tapi-3.0.0/docs/endpoints/admin/templates.md +180 -0
  19. tapi-3.0.0/docs/endpoints/admin/tunnels.md +36 -0
  20. tapi-3.0.0/docs/endpoints/admin/users.md +200 -0
  21. tapi-3.0.0/docs/endpoints/ai/ai.md +17 -0
  22. tapi-3.0.0/docs/endpoints/ai/providers.md +33 -0
  23. tapi-3.0.0/docs/endpoints/ai/usage.md +46 -0
  24. tapi-3.0.0/docs/endpoints/apps.md +177 -0
  25. tapi-3.0.0/docs/endpoints/audit_logs.md +44 -0
  26. tapi-3.0.0/docs/endpoints/cases/actions.md +165 -0
  27. tapi-3.0.0/docs/endpoints/cases/activities.md +64 -0
  28. tapi-3.0.0/docs/endpoints/cases/assignees.md +39 -0
  29. tapi-3.0.0/docs/endpoints/cases/blocks.md +231 -0
  30. tapi-3.0.0/docs/endpoints/cases/cases.md +430 -0
  31. tapi-3.0.0/docs/endpoints/cases/comments.md +172 -0
  32. tapi-3.0.0/docs/endpoints/cases/field_values.md +125 -0
  33. tapi-3.0.0/docs/endpoints/cases/fields.md +171 -0
  34. tapi-3.0.0/docs/endpoints/cases/files.md +149 -0
  35. tapi-3.0.0/docs/endpoints/cases/linked_cases.md +102 -0
  36. tapi-3.0.0/docs/endpoints/cases/metadata.md +128 -0
  37. tapi-3.0.0/docs/endpoints/cases/notes.md +161 -0
  38. tapi-3.0.0/docs/endpoints/cases/records.md +102 -0
  39. tapi-3.0.0/docs/endpoints/cases/statuses.md +130 -0
  40. tapi-3.0.0/docs/endpoints/cases/subscribers.md +103 -0
  41. tapi-3.0.0/docs/endpoints/cases/tasks.md +160 -0
  42. tapi-3.0.0/docs/endpoints/cases/templates.md +260 -0
  43. tapi-3.0.0/docs/endpoints/cases/webhooks.md +127 -0
  44. tapi-3.0.0/docs/endpoints/change_requests.md +60 -0
  45. tapi-3.0.0/docs/endpoints/credentials.md +208 -0
  46. tapi-3.0.0/docs/endpoints/dashboards.md +104 -0
  47. tapi-3.0.0/docs/endpoints/folders.md +124 -0
  48. tapi-3.0.0/docs/endpoints/info.md +66 -0
  49. tapi-3.0.0/docs/endpoints/records/artifacts.md +37 -0
  50. tapi-3.0.0/docs/endpoints/records/fields.md +39 -0
  51. tapi-3.0.0/docs/endpoints/records/record_types.md +173 -0
  52. tapi-3.0.0/docs/endpoints/records/record_views.md +105 -0
  53. tapi-3.0.0/docs/endpoints/records/records.md +384 -0
  54. tapi-3.0.0/docs/endpoints/reporting.md +66 -0
  55. tapi-3.0.0/docs/endpoints/resources.md +247 -0
  56. tapi-3.0.0/docs/endpoints/skills.md +139 -0
  57. tapi-3.0.0/docs/endpoints/stories/actions.md +305 -0
  58. tapi-3.0.0/docs/endpoints/stories/change_control.md +176 -0
  59. tapi-3.0.0/docs/endpoints/stories/drafts.md +80 -0
  60. tapi-3.0.0/docs/endpoints/stories/events.md +90 -0
  61. tapi-3.0.0/docs/endpoints/stories/groups.md +63 -0
  62. tapi-3.0.0/docs/endpoints/stories/links.md +47 -0
  63. tapi-3.0.0/docs/endpoints/stories/notes.md +142 -0
  64. tapi-3.0.0/docs/endpoints/stories/owners.md +58 -0
  65. tapi-3.0.0/docs/endpoints/stories/recipients.md +60 -0
  66. tapi-3.0.0/docs/endpoints/stories/runs.md +92 -0
  67. tapi-3.0.0/docs/endpoints/stories/stories.md +314 -0
  68. tapi-3.0.0/docs/endpoints/stories/versions.md +126 -0
  69. tapi-3.0.0/docs/endpoints/tags.md +124 -0
  70. tapi-3.0.0/docs/endpoints/teams/members.md +104 -0
  71. tapi-3.0.0/docs/endpoints/teams/teams.md +145 -0
  72. tapi-3.0.0/docs/endpoints/workbench.md +62 -0
  73. tapi-3.0.0/docs/getting-started.md +63 -0
  74. tapi-3.0.0/docs/openapi-drift.md +106 -0
  75. tapi-3.0.0/docs/pagination.md +53 -0
  76. tapi-3.0.0/docs/responses.md +111 -0
  77. tapi-3.0.0/docs/testing.md +435 -0
  78. tapi-3.0.0/pyproject.toml +83 -0
  79. tapi-3.0.0/requirements.txt +2 -0
  80. tapi-3.0.0/src/tapi/__init__.py +10 -0
  81. tapi-3.0.0/src/tapi/admin/__init__.py +49 -0
  82. tapi-3.0.0/src/tapi/admin/action_egress_control_rules.py +152 -0
  83. tapi-3.0.0/src/tapi/admin/api.py +52 -0
  84. tapi-3.0.0/src/tapi/admin/custom_certificate_authority.py +33 -0
  85. tapi-3.0.0/src/tapi/admin/ip_access_control_rules.py +112 -0
  86. tapi-3.0.0/src/tapi/admin/jobs.py +177 -0
  87. tapi-3.0.0/src/tapi/admin/license.py +63 -0
  88. tapi-3.0.0/src/tapi/admin/roles.py +134 -0
  89. tapi-3.0.0/src/tapi/admin/smtp.py +112 -0
  90. tapi-3.0.0/src/tapi/admin/sync_destinations.py +217 -0
  91. tapi-3.0.0/src/tapi/admin/templates.py +226 -0
  92. tapi-3.0.0/src/tapi/admin/tunnels.py +31 -0
  93. tapi-3.0.0/src/tapi/admin/types.py +40 -0
  94. tapi-3.0.0/src/tapi/admin/users.py +256 -0
  95. tapi-3.0.0/src/tapi/ai/__init__.py +5 -0
  96. tapi-3.0.0/src/tapi/ai/api.py +20 -0
  97. tapi-3.0.0/src/tapi/ai/providers.py +26 -0
  98. tapi-3.0.0/src/tapi/ai/usage.py +90 -0
  99. tapi-3.0.0/src/tapi/apps/__init__.py +3 -0
  100. tapi-3.0.0/src/tapi/apps/api.py +167 -0
  101. tapi-3.0.0/src/tapi/audit_logs/__init__.py +3 -0
  102. tapi-3.0.0/src/tapi/audit_logs/api.py +62 -0
  103. tapi-3.0.0/src/tapi/cases/__init__.py +83 -0
  104. tapi-3.0.0/src/tapi/cases/actions.py +174 -0
  105. tapi-3.0.0/src/tapi/cases/activities.py +84 -0
  106. tapi-3.0.0/src/tapi/cases/api.py +423 -0
  107. tapi-3.0.0/src/tapi/cases/assignees.py +43 -0
  108. tapi-3.0.0/src/tapi/cases/blocks.py +290 -0
  109. tapi-3.0.0/src/tapi/cases/comments.py +160 -0
  110. tapi-3.0.0/src/tapi/cases/field_values.py +113 -0
  111. tapi-3.0.0/src/tapi/cases/fields.py +185 -0
  112. tapi-3.0.0/src/tapi/cases/files.py +154 -0
  113. tapi-3.0.0/src/tapi/cases/linked_cases.py +99 -0
  114. tapi-3.0.0/src/tapi/cases/metadata.py +113 -0
  115. tapi-3.0.0/src/tapi/cases/notes.py +208 -0
  116. tapi-3.0.0/src/tapi/cases/records.py +89 -0
  117. tapi-3.0.0/src/tapi/cases/statuses.py +151 -0
  118. tapi-3.0.0/src/tapi/cases/subscribers.py +100 -0
  119. tapi-3.0.0/src/tapi/cases/tasks.py +160 -0
  120. tapi-3.0.0/src/tapi/cases/templates.py +195 -0
  121. tapi-3.0.0/src/tapi/cases/types.py +391 -0
  122. tapi-3.0.0/src/tapi/cases/webhooks.py +139 -0
  123. tapi-3.0.0/src/tapi/change_requests/__init__.py +4 -0
  124. tapi-3.0.0/src/tapi/change_requests/api.py +87 -0
  125. tapi-3.0.0/src/tapi/change_requests/types.py +3 -0
  126. tapi-3.0.0/src/tapi/client.py +109 -0
  127. tapi-3.0.0/src/tapi/core/__init__.py +11 -0
  128. tapi-3.0.0/src/tapi/core/auth.py +23 -0
  129. tapi-3.0.0/src/tapi/core/config.py +52 -0
  130. tapi-3.0.0/src/tapi/core/exceptions.py +13 -0
  131. tapi-3.0.0/src/tapi/core/params.py +76 -0
  132. tapi-3.0.0/src/tapi/core/response.py +88 -0
  133. tapi-3.0.0/src/tapi/core/transport.py +76 -0
  134. tapi-3.0.0/src/tapi/credentials/__init__.py +3 -0
  135. tapi-3.0.0/src/tapi/credentials/api.py +452 -0
  136. tapi-3.0.0/src/tapi/dashboards/__init__.py +4 -0
  137. tapi-3.0.0/src/tapi/dashboards/api.py +129 -0
  138. tapi-3.0.0/src/tapi/dashboards/types.py +7 -0
  139. tapi-3.0.0/src/tapi/folders/__init__.py +3 -0
  140. tapi-3.0.0/src/tapi/folders/api.py +145 -0
  141. tapi-3.0.0/src/tapi/info/__init__.py +3 -0
  142. tapi-3.0.0/src/tapi/info/api.py +51 -0
  143. tapi-3.0.0/src/tapi/py.typed +0 -0
  144. tapi-3.0.0/src/tapi/records/__init__.py +67 -0
  145. tapi-3.0.0/src/tapi/records/api.py +459 -0
  146. tapi-3.0.0/src/tapi/records/artifacts.py +30 -0
  147. tapi-3.0.0/src/tapi/records/fields.py +39 -0
  148. tapi-3.0.0/src/tapi/records/record_types.py +215 -0
  149. tapi-3.0.0/src/tapi/records/record_views.py +129 -0
  150. tapi-3.0.0/src/tapi/records/types.py +138 -0
  151. tapi-3.0.0/src/tapi/reporting/__init__.py +4 -0
  152. tapi-3.0.0/src/tapi/reporting/api.py +99 -0
  153. tapi-3.0.0/src/tapi/reporting/types.py +3 -0
  154. tapi-3.0.0/src/tapi/resources/__init__.py +3 -0
  155. tapi-3.0.0/src/tapi/resources/api.py +370 -0
  156. tapi-3.0.0/src/tapi/skills/__init__.py +3 -0
  157. tapi-3.0.0/src/tapi/skills/api.py +192 -0
  158. tapi-3.0.0/src/tapi/stories/__init__.py +33 -0
  159. tapi-3.0.0/src/tapi/stories/actions.py +425 -0
  160. tapi-3.0.0/src/tapi/stories/api.py +504 -0
  161. tapi-3.0.0/src/tapi/stories/change_control.py +212 -0
  162. tapi-3.0.0/src/tapi/stories/drafts.py +66 -0
  163. tapi-3.0.0/src/tapi/stories/events.py +133 -0
  164. tapi-3.0.0/src/tapi/stories/groups.py +70 -0
  165. tapi-3.0.0/src/tapi/stories/links.py +43 -0
  166. tapi-3.0.0/src/tapi/stories/notes.py +157 -0
  167. tapi-3.0.0/src/tapi/stories/owners.py +47 -0
  168. tapi-3.0.0/src/tapi/stories/recipients.py +54 -0
  169. tapi-3.0.0/src/tapi/stories/runs.py +131 -0
  170. tapi-3.0.0/src/tapi/stories/types.py +119 -0
  171. tapi-3.0.0/src/tapi/stories/versions.py +124 -0
  172. tapi-3.0.0/src/tapi/tags/__init__.py +3 -0
  173. tapi-3.0.0/src/tapi/tags/api.py +122 -0
  174. tapi-3.0.0/src/tapi/teams/__init__.py +4 -0
  175. tapi-3.0.0/src/tapi/teams/api.py +121 -0
  176. tapi-3.0.0/src/tapi/teams/members.py +111 -0
  177. tapi-3.0.0/src/tapi/workbench/__init__.py +4 -0
  178. tapi-3.0.0/src/tapi/workbench/api.py +96 -0
  179. tapi-3.0.0/src/tapi/workbench/types.py +3 -0
  180. tapi-3.0.0/tests/__init__.py +0 -0
  181. tapi-3.0.0/tests/admin/__init__.py +0 -0
  182. tapi-3.0.0/tests/admin/test_api.py +688 -0
  183. tapi-3.0.0/tests/ai/__init__.py +0 -0
  184. tapi-3.0.0/tests/ai/test_api.py +50 -0
  185. tapi-3.0.0/tests/apps/__init__.py +0 -0
  186. tapi-3.0.0/tests/apps/test_api.py +65 -0
  187. tapi-3.0.0/tests/audit_logs/__init__.py +0 -0
  188. tapi-3.0.0/tests/audit_logs/test_api.py +47 -0
  189. tapi-3.0.0/tests/cases/__init__.py +0 -0
  190. tapi-3.0.0/tests/cases/test_api.py +1206 -0
  191. tapi-3.0.0/tests/change_requests/__init__.py +0 -0
  192. tapi-3.0.0/tests/change_requests/test_api.py +38 -0
  193. tapi-3.0.0/tests/conftest.py +42 -0
  194. tapi-3.0.0/tests/core/__init__.py +0 -0
  195. tapi-3.0.0/tests/core/test_auth.py +20 -0
  196. tapi-3.0.0/tests/core/test_config.py +42 -0
  197. tapi-3.0.0/tests/core/test_params.py +52 -0
  198. tapi-3.0.0/tests/core/test_response.py +66 -0
  199. tapi-3.0.0/tests/core/test_transport.py +104 -0
  200. tapi-3.0.0/tests/credentials/__init__.py +0 -0
  201. tapi-3.0.0/tests/credentials/test_api.py +125 -0
  202. tapi-3.0.0/tests/dashboards/__init__.py +0 -0
  203. tapi-3.0.0/tests/dashboards/test_api.py +51 -0
  204. tapi-3.0.0/tests/folders/__init__.py +0 -0
  205. tapi-3.0.0/tests/folders/test_api.py +53 -0
  206. tapi-3.0.0/tests/info/__init__.py +0 -0
  207. tapi-3.0.0/tests/info/test_api.py +18 -0
  208. tapi-3.0.0/tests/live/__init__.py +0 -0
  209. tapi-3.0.0/tests/live/conftest.py +93 -0
  210. tapi-3.0.0/tests/live/helpers.py +115 -0
  211. tapi-3.0.0/tests/live/test_admin.py +290 -0
  212. tapi-3.0.0/tests/live/test_cases.py +579 -0
  213. tapi-3.0.0/tests/live/test_cases_setup.py +390 -0
  214. tapi-3.0.0/tests/live/test_credentials.py +70 -0
  215. tapi-3.0.0/tests/live/test_dashboards.py +137 -0
  216. tapi-3.0.0/tests/live/test_folders.py +54 -0
  217. tapi-3.0.0/tests/live/test_read.py +625 -0
  218. tapi-3.0.0/tests/live/test_records.py +376 -0
  219. tapi-3.0.0/tests/live/test_resources.py +94 -0
  220. tapi-3.0.0/tests/live/test_skills.py +138 -0
  221. tapi-3.0.0/tests/live/test_stories.py +171 -0
  222. tapi-3.0.0/tests/live/test_tags.py +30 -0
  223. tapi-3.0.0/tests/live/test_teams.py +41 -0
  224. tapi-3.0.0/tests/records/__init__.py +0 -0
  225. tapi-3.0.0/tests/records/test_api.py +466 -0
  226. tapi-3.0.0/tests/reporting/__init__.py +0 -0
  227. tapi-3.0.0/tests/reporting/test_api.py +67 -0
  228. tapi-3.0.0/tests/resources/__init__.py +0 -0
  229. tapi-3.0.0/tests/resources/test_api.py +147 -0
  230. tapi-3.0.0/tests/skills/__init__.py +0 -0
  231. tapi-3.0.0/tests/skills/test_api.py +105 -0
  232. tapi-3.0.0/tests/stories/__init__.py +0 -0
  233. tapi-3.0.0/tests/stories/test_api.py +692 -0
  234. tapi-3.0.0/tests/support.py +142 -0
  235. tapi-3.0.0/tests/tags/__init__.py +0 -0
  236. tapi-3.0.0/tests/tags/test_api.py +50 -0
  237. tapi-3.0.0/tests/teams/__init__.py +0 -0
  238. tapi-3.0.0/tests/teams/test_api.py +75 -0
  239. tapi-3.0.0/tests/test_client.py +74 -0
  240. tapi-3.0.0/tests/test_conventions.py +68 -0
  241. tapi-3.0.0/tests/test_packaging.py +31 -0
  242. tapi-3.0.0/tests/tools/__init__.py +0 -0
  243. tapi-3.0.0/tests/tools/test_check_openapi_drift.py +186 -0
  244. tapi-3.0.0/tests/workbench/__init__.py +0 -0
  245. tapi-3.0.0/tests/workbench/test_api.py +57 -0
  246. tapi-3.0.0/tools/__init__.py +0 -0
  247. tapi-3.0.0/tools/check_openapi_drift.py +413 -0
  248. tapi-3.0.0/tools/openapi_known_differences.toml +103 -0
  249. tapi-0.2.2/PKG-INFO +0 -2861
  250. tapi-0.2.2/README.md +0 -2823
  251. tapi-0.2.2/Tapi.egg-info/PKG-INFO +0 -2861
  252. tapi-0.2.2/Tapi.egg-info/SOURCES.txt +0 -79
  253. tapi-0.2.2/Tapi.egg-info/dependency_links.txt +0 -1
  254. tapi-0.2.2/Tapi.egg-info/requires.txt +0 -14
  255. tapi-0.2.2/Tapi.egg-info/top_level.txt +0 -1
  256. tapi-0.2.2/setup.cfg +0 -4
  257. tapi-0.2.2/setup.py +0 -28
  258. tapi-0.2.2/tapi/__init__.py +0 -2
  259. tapi-0.2.2/tapi/api/__init__.py +0 -49
  260. tapi-0.2.2/tapi/api/action/__init__.py +0 -7
  261. tapi-0.2.2/tapi/api/action/actions.py +0 -111
  262. tapi-0.2.2/tapi/api/action/events.py +0 -34
  263. tapi-0.2.2/tapi/api/action/logs.py +0 -32
  264. tapi-0.2.2/tapi/api/admin/__init__.py +0 -13
  265. tapi-0.2.2/tapi/api/admin/action_egress_control_rules.py +0 -87
  266. tapi-0.2.2/tapi/api/admin/admin.py +0 -51
  267. tapi-0.2.2/tapi/api/admin/ip_access_control.py +0 -76
  268. tapi-0.2.2/tapi/api/admin/job.py +0 -42
  269. tapi-0.2.2/tapi/api/admin/scim.py +0 -27
  270. tapi-0.2.2/tapi/api/admin/story_sync_destinations.py +0 -54
  271. tapi-0.2.2/tapi/api/admin/template.py +0 -86
  272. tapi-0.2.2/tapi/api/admin/user.py +0 -104
  273. tapi-0.2.2/tapi/api/audit_log/__init__.py +0 -5
  274. tapi-0.2.2/tapi/api/audit_log/audit_logs.py +0 -28
  275. tapi-0.2.2/tapi/api/case/__init__.py +0 -21
  276. tapi-0.2.2/tapi/api/case/actions.py +0 -90
  277. tapi-0.2.2/tapi/api/case/activities.py +0 -35
  278. tapi-0.2.2/tapi/api/case/assignees.py +0 -21
  279. tapi-0.2.2/tapi/api/case/blocks.py +0 -116
  280. tapi-0.2.2/tapi/api/case/cases.py +0 -135
  281. tapi-0.2.2/tapi/api/case/comments.py +0 -102
  282. tapi-0.2.2/tapi/api/case/fields.py +0 -69
  283. tapi-0.2.2/tapi/api/case/files.py +0 -88
  284. tapi-0.2.2/tapi/api/case/inputs.py +0 -64
  285. tapi-0.2.2/tapi/api/case/linked_cases.py +0 -57
  286. tapi-0.2.2/tapi/api/case/metadata.py +0 -65
  287. tapi-0.2.2/tapi/api/case/notes.py +0 -82
  288. tapi-0.2.2/tapi/api/case/records.py +0 -54
  289. tapi-0.2.2/tapi/api/case/subscribers.py +0 -56
  290. tapi-0.2.2/tapi/api/case/tasks.py +0 -73
  291. tapi-0.2.2/tapi/api/credential/__init__.py +0 -1
  292. tapi-0.2.2/tapi/api/credential/credentials.py +0 -239
  293. tapi-0.2.2/tapi/api/event/__init__.py +0 -1
  294. tapi-0.2.2/tapi/api/event/events.py +0 -45
  295. tapi-0.2.2/tapi/api/folder/__init__.py +0 -1
  296. tapi-0.2.2/tapi/api/folder/folders.py +0 -71
  297. tapi-0.2.2/tapi/api/note/__init__.py +0 -5
  298. tapi-0.2.2/tapi/api/note/notes.py +0 -76
  299. tapi-0.2.2/tapi/api/record/__init__.py +0 -8
  300. tapi-0.2.2/tapi/api/record/artifacts.py +0 -17
  301. tapi-0.2.2/tapi/api/record/records.py +0 -88
  302. tapi-0.2.2/tapi/api/record/types.py +0 -67
  303. tapi-0.2.2/tapi/api/record/views.py +0 -53
  304. tapi-0.2.2/tapi/api/report/__init__.py +0 -5
  305. tapi-0.2.2/tapi/api/report/reporting.py +0 -26
  306. tapi-0.2.2/tapi/api/resource/__init__.py +0 -1
  307. tapi-0.2.2/tapi/api/resource/resources.py +0 -164
  308. tapi-0.2.2/tapi/api/story/__init__.py +0 -12
  309. tapi-0.2.2/tapi/api/story/change_requests.py +0 -82
  310. tapi-0.2.2/tapi/api/story/drafts.py +0 -45
  311. tapi-0.2.2/tapi/api/story/groups.py +0 -38
  312. tapi-0.2.2/tapi/api/story/owners.py +0 -33
  313. tapi-0.2.2/tapi/api/story/recipients.py +0 -38
  314. tapi-0.2.2/tapi/api/story/runs.py +0 -43
  315. tapi-0.2.2/tapi/api/story/stories.py +0 -189
  316. tapi-0.2.2/tapi/api/story/versions.py +0 -67
  317. tapi-0.2.2/tapi/api/team/__init__.py +0 -4
  318. tapi-0.2.2/tapi/api/team/members.py +0 -62
  319. tapi-0.2.2/tapi/api/team/teams.py +0 -69
  320. tapi-0.2.2/tapi/api/tenant.py +0 -70
  321. tapi-0.2.2/tapi/api/workbench/__init__.py +0 -3
  322. tapi-0.2.2/tapi/api/workbench/workbench.py +0 -31
  323. tapi-0.2.2/tapi/client/__init__.py +0 -1
  324. tapi-0.2.2/tapi/client/client.py +0 -56
  325. tapi-0.2.2/tapi/utils/helpers.py +0 -9
  326. tapi-0.2.2/tapi/utils/http.py +0 -8
  327. tapi-0.2.2/tapi/utils/testing_decorators.py +0 -5
  328. tapi-0.2.2/tapi/utils/types.py +0 -300
  329. {tapi-0.2.2 → tapi-3.0.0}/LICENSE +0 -0
tapi-3.0.0/.gitignore ADDED
@@ -0,0 +1,27 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ build/
6
+ dist/
7
+
8
+ # Virtual environments
9
+ .venv/
10
+ venv/
11
+
12
+ # Tool caches
13
+ .pytest_cache/
14
+ .mypy_cache/
15
+ .ruff_cache/
16
+ .coverage
17
+ htmlcov/
18
+
19
+ # Editors and OS
20
+ .idea/
21
+ .vscode/
22
+ .DS_Store
23
+ Thumbs.db
24
+
25
+ # Secrets: never commit credentials
26
+ .env
27
+ .env.*
@@ -0,0 +1,99 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here.
4
+ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project
5
+ aims to follow [Semantic Versioning](https://semver.org/).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [3.0.0] - 2026-11-24
10
+
11
+ ### Added
12
+
13
+ - Project skeleton: package layout, documentation structure and tooling configuration.
14
+ - `Tines` client class, configured with a tenant domain and an API key, or from the
15
+ `TINES_TENANT_DOMAIN` and `TINES_API_KEY` environment variables.
16
+ - Core layer: `Response`, response body decoding, `Transport`, API key authentication, and the
17
+ `TinesConfigurationError` and `TinesConnectionError` exceptions.
18
+ - `info` module (`tines.info`): `get`, `web_stats` and `worker_stats`.
19
+ - `ai` module (`tines.ai`): `providers.list` and `usage.get`.
20
+ - `audit_logs` module (`tines.audit_logs`): `list`, filterable by time range, users, teams and
21
+ operation names, with `page` and `per_page`.
22
+ - `credentials` module (`tines.credentials`): `list`, `get`, `create`, `update` and `delete`, with
23
+ the parameters of every credential mode.
24
+ - `folders` module (`tines.folders`): `list`, `get`, `create`, `update` and `delete`.
25
+ - `resources` module (`tines.resources`): `list`, `get`, `create`, `update`, `delete`, `append`,
26
+ `remove`, `replace` and `set_locked`.
27
+ - `apps` module (`tines.apps`): `list`, `get`, `create`, `delete`, `export`, `replace_files` and
28
+ `publish`.
29
+ - `stories` module (`tines.stories`): `list`, `get`, `create`, `update`, `delete`, `batch_delete`,
30
+ `export`, `import_`, `diagram`, `disable` and `list_pending_actions`, and the sub-areas
31
+ `actions` (`list`, `get`, `create`, `update`, `delete`, `list_events`, `list_logs`,
32
+ `delete_events`, `delete_logs` and `clear_memory`), `events` (`list`, `get` and `reemit`),
33
+ `links` (`delete`), `notes` (`list`, `get`, `create`, `update` and `delete`), `drafts`, `owners`,
34
+ `recipients`, `runs`, `groups`, `versions` and `change_control`.
35
+ - `cases` module (`tines.cases`): `list`, `get`, `create`, `update`, `delete`,
36
+ `append_description`, `search`, `bulk_update_fields` and `get_pdf`, and the sub-areas
37
+ `activities` (`list` and `get`), `assignees` (`list`), `comments` (with reactions), `notes`,
38
+ `tasks`, `field_values`, `metadata`, `files`, `blocks` (with their elements), `linked_cases`,
39
+ `records`, `subscribers`, `actions`, `fields`, `statuses`, `templates` and `webhooks`.
40
+ - `change_requests` module (`tines.change_requests`): `list`, filterable by teams and statuses, and
41
+ `get`. The operations on the change request of one story stay in `stories.change_control`.
42
+ - `workbench` module (`tines.workbench`): `list`, filterable by title, favorite, creator, type and
43
+ creation time, and `get`, which returns a conversation with its usage and transcript.
44
+ - `reporting` module (`tines.reporting`): `flow_usage`, the flow usage of the tenant by team, and
45
+ `time_saved`, the time saved grouped by hour, day, week or month.
46
+ - `dashboards` module (`tines.dashboards`): `list`, `delete`, `export` and `import_`.
47
+ - `skills` module (`tines.skills`): `list`, `get`, `create`, `update` and `delete`. A skill is found
48
+ by its name and the ID of its team.
49
+ - `admin` module (`tines.admin`): the sub-areas `users` (`list`, `get`, `create`, `update`,
50
+ `delete`, `list_signin_activities`, `resend_invitation` and `expire_session`), `roles`,
51
+ `templates` (with `move`) and `tunnels` (`health`), the sub-areas `ip_access_control_rules`,
52
+ `action_egress_control_rules` and `sync_destinations` (with `manual_sync` and `sync_story`), and
53
+ the sub-areas `license`, `smtp` and `custom_certificate_authority` (`set`) for self-hosted
54
+ tenants, and `jobs` for dedicated tenants (four lists and six deletes).
55
+ - `records` module (`tines.records`): `create` (with an idempotency key), `get`, `update`, `delete`,
56
+ `search`, `aggregate`, `list_cases`, `link_case`, `unlink_case`, `list_child_record_ids` and
57
+ `list_child_records`, and the sub-areas `record_types` (`list`, `get`, `create`, `update` and
58
+ `delete`), `record_views` (`list`, `delete`, `export` and `import_`), `fields` (`get`) and
59
+ `artifacts` (`get`).
60
+ - `tags` module (`tines.tags`): `list`, `get`, `create`, `update` and `delete`.
61
+ - `teams` module (`tines.teams`): `list`, `get`, `create`, `update`, `delete` and
62
+ `destroy_static_external_id`, and `members` (`tines.teams.members`): `list`, `invite`,
63
+ `resend_invitation` and `remove`.
64
+ - Request parameter helpers in `core/params.py`: `omit_none`, `to_iso` and `to_list`.
65
+ - `Transport.request` takes extra request `headers`.
66
+ - `print(response)` shows a `Response` as indented JSON. Binary data is shown as its size.
67
+ - `tools/check_openapi_drift.py`, which compares the routes of tapi with the Tines OpenAPI documents
68
+ and fails when tapi offers a route that they mark as deprecated. The differences that are accepted
69
+ are listed in `tools/openapi_known_differences.toml`.
70
+ - Opt-in live tests in `tests/live`, for a dedicated test tenant. The default `pytest` run leaves
71
+ them out.
72
+ - Documentation in `docs/`: the guides, and for each module a page in `docs/endpoints/`, in a
73
+ folder with a page for each sub-endpoint when the module has some. A page lists the methods
74
+ and, for each one, its arguments, the values they accept and its response codes. The README has
75
+ an installation, a quick start and how to contribute.
76
+ - `requirements.txt` with the runtime dependencies, `httpx` and `pydantic`.
77
+
78
+ ### Changed
79
+
80
+ - tapi 3.0.0 is a rewrite and is not compatible with 0.2.x. The classes of each endpoint, such as
81
+ `TenantAPI(DOMAIN, API_KEY)` and `StoriesAPI(DOMAIN, API_KEY)`, are replaced by the `Tines` client
82
+ and its modules, such as `tines.stories`.
83
+ - Every call returns a `Response` with `status_code`, `data` and `headers`. A reply with a status
84
+ other than 2xx is returned, not raised. Only `TinesConnectionError` and `TinesConfigurationError`
85
+ are raised.
86
+ - Every function takes keyword-only arguments, and the parameters are named as the Tines API names
87
+ them.
88
+ - tapi requires Python 3.11 or newer, and depends on `httpx` and `pydantic`.
89
+ - The package has a `src/` layout and is built with `hatchling`. The version is 3.0.0, the license is
90
+ GPL-3.0 and the development status is production stable.
91
+ - The routes, parameters and values of tapi are the ones that the Tines docs list, and none that
92
+ Tines deprecates.
93
+
94
+ ### Removed
95
+
96
+ - The 0.2.x implementation, with `setup.py` and `MANIFEST.in`.
97
+
98
+ [Unreleased]: https://github.com/1Doomdie1/Tapi/compare/v3.0.0...HEAD
99
+ [3.0.0]: https://github.com/1Doomdie1/Tapi/releases/tag/v3.0.0
tapi-3.0.0/PKG-INFO ADDED
@@ -0,0 +1,137 @@
1
+ Metadata-Version: 2.5
2
+ Name: tapi
3
+ Version: 3.0.0
4
+ Summary: Unofficial Python wrapper for the Tines REST API.
5
+ Project-URL: Homepage, https://github.com/1Doomdie1/Tapi
6
+ Project-URL: Documentation, https://github.com/1Doomdie1/Tapi/blob/main/docs/README.md
7
+ Project-URL: Repository, https://github.com/1Doomdie1/Tapi
8
+ Project-URL: Issues, https://github.com/1Doomdie1/Tapi/issues
9
+ Project-URL: Changelog, https://github.com/1Doomdie1/Tapi/blob/main/CHANGELOG.md
10
+ Author: 1Doomdie1
11
+ License-Expression: GPL-3.0
12
+ License-File: LICENSE
13
+ Keywords: api,automation,rest,sdk,tines,wrapper
14
+ Classifier: Development Status :: 5 - Production/Stable
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.11
25
+ Requires-Dist: httpx<1,>=0.27
26
+ Requires-Dist: pydantic<3,>=2.7
27
+ Provides-Extra: dev
28
+ Requires-Dist: mypy>=1.11; extra == 'dev'
29
+ Requires-Dist: pytest>=8; extra == 'dev'
30
+ Requires-Dist: respx>=0.21; extra == 'dev'
31
+ Requires-Dist: ruff>=0.6; extra == 'dev'
32
+ Description-Content-Type: text/markdown
33
+
34
+ # tapi
35
+
36
+ Unofficial Python wrapper for the [Tines REST API](https://www.tines.com/stories/docs/api/welcome/).
37
+
38
+ tapi covers every area of the Tines API that the Tines docs list: `info`, `admin`, `ai`, `apps`,
39
+ `audit_logs`, `cases`, `change_requests`, `credentials`, `dashboards`, `folders`, `records`,
40
+ `reporting`, `resources`, `skills`, `stories`, `tags`, `teams` and `workbench`. Each is an attribute
41
+ of the `Tines` client, and the [endpoints overview](https://github.com/1Doomdie1/Tapi/blob/main/docs/endpoints/README.md) maps every method to its
42
+ route.
43
+
44
+ Requires Python 3.11 or newer.
45
+
46
+ ## Installation
47
+
48
+ ```powershell
49
+ pip install tapi
50
+ ```
51
+
52
+ ## Quick start
53
+
54
+ ### The `Tines` client
55
+
56
+ `Tines` is the main class. It holds the tenant and the API key, and every module is an attribute of
57
+ it.
58
+
59
+ ```python
60
+ from tapi import Tines
61
+
62
+ tines = Tines(tenant_domain="acme.tines.com", api_key="<your API key>")
63
+
64
+ response = tines.stories.list(per_page=10)
65
+ print(response.status_code)
66
+ print(response.data["stories"])
67
+ ```
68
+
69
+ The tenant domain and the API key can also come from the `TINES_TENANT_DOMAIN` and `TINES_API_KEY`
70
+ environment variables. [Getting started](https://github.com/1Doomdie1/Tapi/blob/main/docs/getting-started.md) has the details.
71
+
72
+ ### A module on its own
73
+
74
+ Each API area is a class of its own that takes a `Transport`, which sends the requests. Use one when
75
+ you need only that area.
76
+
77
+ ```python
78
+ from tapi.core import Transport
79
+ from tapi.stories import Stories
80
+
81
+ transport = Transport(base_url="https://acme.tines.com", api_key="<your API key>")
82
+ stories = Stories(transport=transport)
83
+
84
+ response = stories.list(per_page=10)
85
+ print(response.status_code)
86
+ ```
87
+
88
+ The sub-areas come with the class: `stories.versions` works like `tines.stories.versions`.
89
+
90
+ ## Documentation
91
+
92
+ The [documentation overview](https://github.com/1Doomdie1/Tapi/blob/main/docs/README.md) lists every page and says where to start.
93
+
94
+ | Page | Covers |
95
+ | ---------------------------------------------------- | --------------------------------------------------- |
96
+ | [Getting started](https://github.com/1Doomdie1/Tapi/blob/main/docs/getting-started.md) | Installing and making a first call |
97
+ | [Architecture](https://github.com/1Doomdie1/Tapi/blob/main/docs/architecture.md) | How the core, the modules and `Tines` fit together |
98
+ | [Conventions](https://github.com/1Doomdie1/Tapi/blob/main/docs/conventions.md) | Naming, parameters and docstrings |
99
+ | [Testing](https://github.com/1Doomdie1/Tapi/blob/main/docs/testing.md) | Running the tests and writing the tests of a module |
100
+ | [OpenAPI drift](https://github.com/1Doomdie1/Tapi/blob/main/docs/openapi-drift.md) | Comparing tapi's routes with the Tines OpenAPI file |
101
+ | [Responses](https://github.com/1Doomdie1/Tapi/blob/main/docs/responses.md) | The `Response` class, body decoding, non-2xx |
102
+ | [Pagination](https://github.com/1Doomdie1/Tapi/blob/main/docs/pagination.md) | Walking pages yourself |
103
+ | [Endpoints](https://github.com/1Doomdie1/Tapi/tree/main/docs/endpoints) | Each module: its methods, arguments and response codes |
104
+
105
+ ## How to contribute
106
+
107
+ 1. Fork the repository, clone your fork and create a branch for your change.
108
+ 2. Create a virtual environment and install tapi with its development tools:
109
+
110
+ ```powershell
111
+ python -m venv .venv
112
+ .\.venv\Scripts\Activate.ps1
113
+ pip install -e ".[dev]"
114
+ ```
115
+
116
+ On macOS and Linux, activate it with `source .venv/bin/activate`.
117
+ 3. Read [Architecture](https://github.com/1Doomdie1/Tapi/blob/main/docs/architecture.md) and [Conventions](https://github.com/1Doomdie1/Tapi/blob/main/docs/conventions.md). Every method
118
+ takes keyword-only arguments, names its parameters as the Tines API does, and has a short
119
+ docstring that starts with the route that it calls.
120
+ 4. Make the change, with its tests and its page in [`docs/endpoints/`](https://github.com/1Doomdie1/Tapi/tree/main/docs/endpoints). Each method
121
+ needs a row in the table of cases of its module, and
122
+ [Testing](https://github.com/1Doomdie1/Tapi/blob/main/docs/testing.md) shows how to write one. The tests never reach a tenant.
123
+ 5. Run the checks. All of them must pass:
124
+
125
+ ```powershell
126
+ ruff check . ; ruff format .
127
+ mypy
128
+ python -m pytest
129
+ python tools/check_openapi_drift.py
130
+ ```
131
+
132
+ The last one compares the routes of tapi with the Tines OpenAPI documents. Its notes are in
133
+ [OpenAPI drift](https://github.com/1Doomdie1/Tapi/blob/main/docs/openapi-drift.md).
134
+ 6. Open a pull request against the `dev` branch and say what changed and why.
135
+
136
+ Never put an API key or the domain of a tenant in the code, the tests, the docs or a commit. The live
137
+ tests, which need a dedicated test tenant, are opt-in and described in [Testing](https://github.com/1Doomdie1/Tapi/blob/main/docs/testing.md).
tapi-3.0.0/README.md ADDED
@@ -0,0 +1,104 @@
1
+ # tapi
2
+
3
+ Unofficial Python wrapper for the [Tines REST API](https://www.tines.com/stories/docs/api/welcome/).
4
+
5
+ tapi covers every area of the Tines API that the Tines docs list: `info`, `admin`, `ai`, `apps`,
6
+ `audit_logs`, `cases`, `change_requests`, `credentials`, `dashboards`, `folders`, `records`,
7
+ `reporting`, `resources`, `skills`, `stories`, `tags`, `teams` and `workbench`. Each is an attribute
8
+ of the `Tines` client, and the [endpoints overview](https://github.com/1Doomdie1/Tapi/blob/main/docs/endpoints/README.md) maps every method to its
9
+ route.
10
+
11
+ Requires Python 3.11 or newer.
12
+
13
+ ## Installation
14
+
15
+ ```powershell
16
+ pip install tapi
17
+ ```
18
+
19
+ ## Quick start
20
+
21
+ ### The `Tines` client
22
+
23
+ `Tines` is the main class. It holds the tenant and the API key, and every module is an attribute of
24
+ it.
25
+
26
+ ```python
27
+ from tapi import Tines
28
+
29
+ tines = Tines(tenant_domain="acme.tines.com", api_key="<your API key>")
30
+
31
+ response = tines.stories.list(per_page=10)
32
+ print(response.status_code)
33
+ print(response.data["stories"])
34
+ ```
35
+
36
+ The tenant domain and the API key can also come from the `TINES_TENANT_DOMAIN` and `TINES_API_KEY`
37
+ environment variables. [Getting started](https://github.com/1Doomdie1/Tapi/blob/main/docs/getting-started.md) has the details.
38
+
39
+ ### A module on its own
40
+
41
+ Each API area is a class of its own that takes a `Transport`, which sends the requests. Use one when
42
+ you need only that area.
43
+
44
+ ```python
45
+ from tapi.core import Transport
46
+ from tapi.stories import Stories
47
+
48
+ transport = Transport(base_url="https://acme.tines.com", api_key="<your API key>")
49
+ stories = Stories(transport=transport)
50
+
51
+ response = stories.list(per_page=10)
52
+ print(response.status_code)
53
+ ```
54
+
55
+ The sub-areas come with the class: `stories.versions` works like `tines.stories.versions`.
56
+
57
+ ## Documentation
58
+
59
+ The [documentation overview](https://github.com/1Doomdie1/Tapi/blob/main/docs/README.md) lists every page and says where to start.
60
+
61
+ | Page | Covers |
62
+ | ---------------------------------------------------- | --------------------------------------------------- |
63
+ | [Getting started](https://github.com/1Doomdie1/Tapi/blob/main/docs/getting-started.md) | Installing and making a first call |
64
+ | [Architecture](https://github.com/1Doomdie1/Tapi/blob/main/docs/architecture.md) | How the core, the modules and `Tines` fit together |
65
+ | [Conventions](https://github.com/1Doomdie1/Tapi/blob/main/docs/conventions.md) | Naming, parameters and docstrings |
66
+ | [Testing](https://github.com/1Doomdie1/Tapi/blob/main/docs/testing.md) | Running the tests and writing the tests of a module |
67
+ | [OpenAPI drift](https://github.com/1Doomdie1/Tapi/blob/main/docs/openapi-drift.md) | Comparing tapi's routes with the Tines OpenAPI file |
68
+ | [Responses](https://github.com/1Doomdie1/Tapi/blob/main/docs/responses.md) | The `Response` class, body decoding, non-2xx |
69
+ | [Pagination](https://github.com/1Doomdie1/Tapi/blob/main/docs/pagination.md) | Walking pages yourself |
70
+ | [Endpoints](https://github.com/1Doomdie1/Tapi/tree/main/docs/endpoints) | Each module: its methods, arguments and response codes |
71
+
72
+ ## How to contribute
73
+
74
+ 1. Fork the repository, clone your fork and create a branch for your change.
75
+ 2. Create a virtual environment and install tapi with its development tools:
76
+
77
+ ```powershell
78
+ python -m venv .venv
79
+ .\.venv\Scripts\Activate.ps1
80
+ pip install -e ".[dev]"
81
+ ```
82
+
83
+ On macOS and Linux, activate it with `source .venv/bin/activate`.
84
+ 3. Read [Architecture](https://github.com/1Doomdie1/Tapi/blob/main/docs/architecture.md) and [Conventions](https://github.com/1Doomdie1/Tapi/blob/main/docs/conventions.md). Every method
85
+ takes keyword-only arguments, names its parameters as the Tines API does, and has a short
86
+ docstring that starts with the route that it calls.
87
+ 4. Make the change, with its tests and its page in [`docs/endpoints/`](https://github.com/1Doomdie1/Tapi/tree/main/docs/endpoints). Each method
88
+ needs a row in the table of cases of its module, and
89
+ [Testing](https://github.com/1Doomdie1/Tapi/blob/main/docs/testing.md) shows how to write one. The tests never reach a tenant.
90
+ 5. Run the checks. All of them must pass:
91
+
92
+ ```powershell
93
+ ruff check . ; ruff format .
94
+ mypy
95
+ python -m pytest
96
+ python tools/check_openapi_drift.py
97
+ ```
98
+
99
+ The last one compares the routes of tapi with the Tines OpenAPI documents. Its notes are in
100
+ [OpenAPI drift](https://github.com/1Doomdie1/Tapi/blob/main/docs/openapi-drift.md).
101
+ 6. Open a pull request against the `dev` branch and say what changed and why.
102
+
103
+ Never put an API key or the domain of a tenant in the code, the tests, the docs or a commit. The live
104
+ tests, which need a dedicated test tenant, are opt-in and described in [Testing](https://github.com/1Doomdie1/Tapi/blob/main/docs/testing.md).
@@ -0,0 +1,40 @@
1
+ # Documentation
2
+
3
+ This is the overview of the tapi documentation. The pages are Markdown files that are read on
4
+ GitHub or in an editor. The docstring of every method documents its arguments and what `Response.data`
5
+ holds, so the pages here cover what a docstring cannot: how the pieces fit together, and the routes
6
+ of each module.
7
+
8
+ ## Using tapi
9
+
10
+ Start here if you want to call the Tines API.
11
+
12
+ | Page | Covers |
13
+ | ------------------------------------- | ------------------------------------------------------------------------ |
14
+ | [Getting started](getting-started.md) | Installing tapi, creating a client and closing it. |
15
+ | [Responses](responses.md) | The `Response` class, how a body is decoded, and what a non-2xx reply is. |
16
+ | [Pagination](pagination.md) | The paging parameters, the `meta` object and walking the pages yourself. |
17
+ | [Endpoints](endpoints/README.md) | Each module and sub-endpoint: its methods, arguments and response codes. |
18
+
19
+ ## How tapi is built
20
+
21
+ Read these before you change the code or add a module.
22
+
23
+ | Page | Covers |
24
+ | --------------------------------- | ----------------------------------------------------------------------------- |
25
+ | [Architecture](architecture.md) | The layers, the life of a request, what a module consists of and the design decisions. |
26
+ | [Conventions](conventions.md) | Named arguments, parameters, methods, docstrings and comments. |
27
+
28
+ ## Testing and keeping tapi correct
29
+
30
+ | Page | Covers |
31
+ | ----------------------------------- | ------------------------------------------------------------------------------ |
32
+ | [Testing](testing.md) | The mocked tests, how to write the tests of a module, and the opt-in live tests. |
33
+ | [OpenAPI drift](openapi-drift.md) | Comparing the routes in the docstrings with the Tines OpenAPI documents. |
34
+
35
+ ## Where to start
36
+
37
+ - To make a first call: [Getting started](getting-started.md), then [Responses](responses.md).
38
+ - To find the method for a Tines route: [Endpoints](endpoints/README.md).
39
+ - To add a module: [Architecture](architecture.md), [Conventions](conventions.md) and
40
+ [Testing](testing.md), in that order.
@@ -0,0 +1,77 @@
1
+ # Architecture
2
+
3
+ ## Layers
4
+
5
+ ```
6
+ Tines src/tapi/client.py entry point, one per tenant
7
+ └── Transport src/tapi/core/transport.py one HTTP call in, one Response out
8
+ └── httpx.Client
9
+ ```
10
+
11
+ Endpoint modules (`tapi.info`, `tapi.stories`, `tapi.tags`, ...) each take the `Transport` and send
12
+ their requests through `Transport.request`. `Tines` builds one `Transport` and hands it to every
13
+ module, which then becomes an attribute such as `tines.info`.
14
+
15
+ The modules are `info`, `admin`, `ai`, `apps`, `audit_logs`, `cases`, `change_requests`,
16
+ `credentials`, `dashboards`, `folders`, `records`, `reporting`, `resources`, `skills`, `stories`,
17
+ `tags`, `teams` and `workbench`.
18
+
19
+ ## The core layer
20
+
21
+ `src/tapi/core/` holds everything the modules share. It depends on nothing else in the package.
22
+
23
+ | File | Contents |
24
+ | --------------- | ---------------------------------------------------------------------------------- |
25
+ | `exceptions.py` | `TinesError`, `TinesConfigurationError` and `TinesConnectionError` |
26
+ | `response.py` | `Response` and `decode_body`, which turns a reply body into `Response.data` |
27
+ | `transport.py` | `Transport`, which sends requests and returns a `Response` for every reply |
28
+ | `auth.py` | `ApiKeyAuth`, which sends the API key in the `X-User-Token` header |
29
+ | `config.py` | Resolution of the tenant domain and the API key from arguments or the environment |
30
+ | `params.py` | `omit_none` (drops `None` values), `to_iso` (formats datetimes) and `to_list` (turns a sequence into a repeated parameter) |
31
+
32
+ ## Life of a request
33
+
34
+ 1. `Tines` resolves the tenant domain and the API key (`config.py`) and creates a `Transport`.
35
+ 2. A module method calls `Transport.request(method=..., path=..., params=..., json=..., headers=...)`.
36
+ 3. `httpx` sends the request. `ApiKeyAuth` adds the `X-User-Token` header.
37
+ 4. The reply becomes a `Response`: its status code, its decoded body and its lower-cased headers.
38
+ 5. If no reply arrives, `TinesConnectionError` is raised instead.
39
+
40
+ ## Anatomy of a module
41
+
42
+ `info` is the smallest complete module and the pattern for the others:
43
+
44
+ | Part | Role |
45
+ | ----------------------------------- | ------------------------------------------------------------------------------------------ |
46
+ | `src/tapi/info/api.py` | The `Info` class. Its constructor takes a `Transport` (`Info(transport=...)`); each method sends one request and returns the `Response`. |
47
+ | `src/tapi/info/__init__.py` | Exports the class, so `from tapi.info import Info` works. |
48
+ | `src/tapi/client.py` | Creates the module in `Tines.__init__` with the shared `Transport`. |
49
+ | `tests/info/test_api.py` | A table of calls and the request each must send, checked against mocked HTTP. See [Testing](testing.md). |
50
+ | `docs/endpoints/info.md` | Maps each method to its HTTP route and describes what it returns. |
51
+
52
+ A module that groups several areas has an `api.py` class that only creates the area classes. In
53
+ `ai`, `AI` creates `Providers` and `Usage`, which live in `providers.py` and `usage.py`, so the
54
+ calls read `tines.ai.providers.list()` and `tines.ai.usage.get()`. Each area class can also be
55
+ used on its own with a `Transport`.
56
+
57
+ A module can also have methods of its own and a sub-area beside them. `Teams` has `list`, `get` and
58
+ the other team methods in `api.py`, and creates `Members` from `members.py`, so the calls read
59
+ `tines.teams.get(team_id=4)` and `tines.teams.members.list(team_id=4)`. `Stories` does the same
60
+ with eleven sub-areas, such as `tines.stories.versions.list(story_id=4)` and
61
+ `tines.stories.actions.get(action_id=4)`. Values that several of its files accept, such as the
62
+ story filters and orders and the types of actions, live in `stories/types.py`.
63
+
64
+ Every method has keyword-only, typed parameters named as the API names them, and a docstring that
65
+ starts with what it does and the route it calls, then describes each parameter and the values it
66
+ accepts. See [Conventions](conventions.md).
67
+
68
+ ## Design decisions
69
+
70
+ - **Replies are returned as they are.** No status code is treated as an error, so the caller always
71
+ decides how to react. See [Responses](responses.md).
72
+ - **No retries, no pagination, no redirects.** `Transport` performs exactly one request per call.
73
+ - **Few exceptions.** Only a missing configuration and a missing reply raise.
74
+ - **The API key is kept in one place.** It lives in `ApiKeyAuth`, whose `repr` hides it, and is
75
+ never part of the `repr` of `Tines` or `Transport`.
76
+ - **Modules depend on `tapi.core` only.** They do not import each other, so each can be used on its
77
+ own with a `Transport`.
@@ -0,0 +1,80 @@
1
+ # Conventions
2
+
3
+ The rules every module follows.
4
+
5
+ ## Arguments are named
6
+
7
+ Every function, method and class in tapi takes keyword-only arguments, and every call names what
8
+ it passes. This applies to your own calls and to the calls inside the library:
9
+
10
+ ```python
11
+ tines.info.get()
12
+ self._transport.request(method="GET", path="/api/v1/info")
13
+ ```
14
+
15
+ A positional call is rejected with a `TypeError`, so the rule cannot be broken by accident:
16
+
17
+ ```python
18
+ transport.request("GET", "/api/v1/info") # TypeError
19
+ ```
20
+
21
+ The rule includes identifiers that appear in a URL path, so a call on a module that takes one
22
+ looks like `tines.stories.get(story_id=42)`.
23
+
24
+ There are two exceptions. The message of tapi's own exceptions is positional
25
+ (`TinesConnectionError("...")`), and calls into the standard library, builtins and third-party
26
+ libraries follow their normal style.
27
+
28
+ Keyword arguments are written without spaces around `=`, as `ruff format` enforces:
29
+ `method="GET"`, not `method = "GET"`.
30
+
31
+ ## Parameters
32
+
33
+ - Parameters are typed and named as the Tines API names them, such as `team_id` and `per_page`.
34
+ - Optional parameters default to `None` and are not sent when they are `None`. This means tapi
35
+ cannot send an explicit `null`, so a field that Tines lets you clear with `null` cannot be
36
+ cleared yet.
37
+ - Date and time parameters accept a `datetime` as well as an ISO 8601 string. A datetime without
38
+ a timezone is treated as UTC.
39
+ - Array parameters, which the API names with a `[]` suffix such as `user_id[]`, take a sequence and
40
+ use the plural of the API name: `user_ids`. A single string or mapping is rejected, because it
41
+ would be split into characters or reduced to its keys.
42
+ - Paginated endpoints take `page` and `per_page` and return one page per call. Walking the pages is
43
+ left to the caller. See [Pagination](pagination.md).
44
+ - There is no catch-all `**kwargs`. Every parameter a method accepts is in its signature and is
45
+ described in its docstring.
46
+
47
+ ## Methods
48
+
49
+ - A method sends exactly one request and returns the `Response`.
50
+ - Methods are named `get`, `list`, `create`, `update` and `delete` for the usual operations, and
51
+ with a verb for anything else, such as `export` or `disable`.
52
+
53
+ ## Docstrings
54
+
55
+ Docstrings use the Google style:
56
+
57
+ - The first line says what the method does and which route it calls.
58
+ - `Args` describes each parameter: what it does and which values it accepts.
59
+ - `Returns` describes what `Response.data` holds.
60
+ - `Raises` appears only where something is raised. In tapi that means configuration errors and
61
+ `TinesConnectionError`.
62
+
63
+ A method docstring is short, for the developer who calls it: the summary line, at most a short
64
+ paragraph for what must not be missed, one short entry in `Args` for each parameter, and `Returns`
65
+ with the keys of `data` and the status when it is not 200. The error replies, the defaults of Tines
66
+ and what the server did when it was tried are on the page of the module.
67
+
68
+ A class docstring is short: a description, then `Args`, then, for a class that has attributes, such
69
+ as the sub-areas of a module, a sentence and a bullet list of the attributes, each with a one-line
70
+ description. It has no `Attributes:` section, because the hover of VS Code merges that section with
71
+ `Args`.
72
+
73
+ The docstring is the reference for a method's parameters. The pages in
74
+ [`endpoints/`](endpoints/) map each method to its route and add whatever a reader needs beyond the
75
+ docstring.
76
+
77
+ ## Comments
78
+
79
+ There are no inline comments. Names and docstrings explain what the code does, and these pages
80
+ explain why.
@@ -0,0 +1,49 @@
1
+ # Endpoints
2
+
3
+ One page for each module that tapi offers. A module is a Tines API area. It is available as an
4
+ attribute of `Tines`, such as `tines.tags`, and its class can also be used on its own with a
5
+ `Transport`. Every method returns a [`Response`](../responses.md).
6
+
7
+ A page lists the methods of a class with their HTTP route, then breaks each one down: its arguments
8
+ and the response codes. In an argument table, Required says whether the argument must be passed (an
9
+ optional one is not sent unless it is given), and Values lists what the argument accepts. A module
10
+ that has sub-endpoints has a folder with a page for the module and one for each sub-endpoint, as
11
+ `admin/` does.
12
+
13
+ ## Modules
14
+
15
+ | Module | Attribute | Page | Covers |
16
+ | -------------- | -------------------- | ------------------------------------- | ------------------------------------------------------- |
17
+ | `admin` | `tines.admin` | [Admin](admin/admin.md) | Administration of the tenant: users, roles, templates, tunnels, IP access control rules, action egress control rules, sync destinations, jobs, the license, SMTP, and the custom certificate authority. |
18
+ | `ai` | `tines.ai` | [AI](ai/ai.md) | AI providers and AI usage. |
19
+ | `apps` | `tines.apps` | [Apps](apps.md) | Apps built inside Tines. |
20
+ | `audit_logs` | `tines.audit_logs` | [Audit logs](audit_logs.md) | The audit log of the changes made in the tenant. |
21
+ | `cases` | `tines.cases` | [Cases](cases/cases.md) | Cases and their sub-areas, from the current v2 API. |
22
+ | `change_requests` | `tines.change_requests` | [Change requests](change_requests.md) | Listing and reading change requests across stories. The operations on one story are in `stories.change_control`. |
23
+ | `credentials` | `tines.credentials` | [Credentials](credentials.md) | The secrets that actions use. |
24
+ | `dashboards` | `tines.dashboards` | [Dashboards](dashboards.md) | Listing, exporting, importing and deleting dashboards. |
25
+ | `folders` | `tines.folders` | [Folders](folders.md) | Folders that organize stories, credentials and resources. |
26
+ | `info` | `tines.info` | [Info](info.md) | Information about the tenant: its stack, web server and workers. |
27
+ | `records` | `tines.records` | [Records](records/records.md) | Records, their types, their views, their fields and their artifacts. |
28
+ | `reporting` | `tines.reporting` | [Reporting](reporting.md) | Flow usage by team and the time saved. |
29
+ | `resources` | `tines.resources` | [Resources](resources.md) | Named values such as text, JSON and files. |
30
+ | `skills` | `tines.skills` | [Skills](skills.md) | Skills that AI agents can load, found by name and team. |
31
+ | `stories` | `tines.stories` | [Stories](stories/stories.md) | The automations built in Tines, with their sub-areas. |
32
+ | `tags` | `tines.tags` | [Tags](tags.md) | Tags that classify content. |
33
+ | `teams` | `tines.teams` | [Teams](teams/teams.md) | Teams and, as a sub-area, their members. |
34
+ | `workbench` | `tines.workbench` | [Workbench](workbench.md) | Workbench and other AI conversations, read only. |
35
+
36
+ ## Sub-areas
37
+
38
+ A sub-area is an attribute of its module, for example `tines.stories.versions` and
39
+ `tines.cases.comments`. Each is a class of its own in the package of the module, and has its own page
40
+ in the folder of its module. The page of the module lists them.
41
+
42
+ | Module | Sub-areas |
43
+ | --------- | -------------------------------------------------------------------------------------------------- |
44
+ | `admin` | `users`, `roles`, `templates`, `tunnels`, `ip_access_control_rules`, `action_egress_control_rules`, `sync_destinations`, `jobs`, `license`, `smtp` and `custom_certificate_authority`. |
45
+ | `ai` | `providers` and `usage`. |
46
+ | `cases` | `actions`, `activities`, `assignees`, `blocks`, `comments`, `field_values`, `fields`, `files`, `linked_cases`, `metadata`, `notes`, `records`, `statuses`, `subscribers`, `tasks`, `templates` and `webhooks`. |
47
+ | `records` | `artifacts`, `fields`, `record_types` and `record_views`. |
48
+ | `stories` | `actions`, `events`, `links`, `notes`, `drafts`, `owners`, `recipients`, `runs`, `groups`, `versions` and `change_control`. |
49
+ | `teams` | `members`. |