windmill-api 1.448.1__py3-none-any.whl → 1.449.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 windmill-api might be problematic. Click here for more details.

Files changed (107) hide show
  1. windmill_api/api/postgres_trigger/__init__.py +0 -0
  2. windmill_api/api/postgres_trigger/create_postgres_publication.py +121 -0
  3. windmill_api/api/postgres_trigger/create_postgres_replication_slot.py +113 -0
  4. windmill_api/api/postgres_trigger/create_postgres_trigger.py +105 -0
  5. windmill_api/api/postgres_trigger/create_template_script.py +105 -0
  6. windmill_api/api/postgres_trigger/delete_postgres_publication.py +109 -0
  7. windmill_api/api/postgres_trigger/delete_postgres_replication_slot.py +113 -0
  8. windmill_api/api/postgres_trigger/delete_postgres_trigger.py +101 -0
  9. windmill_api/api/postgres_trigger/exists_postgres_trigger.py +160 -0
  10. windmill_api/api/postgres_trigger/get_postgres_publication.py +180 -0
  11. windmill_api/api/postgres_trigger/get_postgres_trigger.py +166 -0
  12. windmill_api/api/postgres_trigger/get_template_script.py +101 -0
  13. windmill_api/api/postgres_trigger/is_valid_postgres_configuration.py +160 -0
  14. windmill_api/api/postgres_trigger/list_postgres_publication.py +161 -0
  15. windmill_api/api/postgres_trigger/list_postgres_replication_slot.py +171 -0
  16. windmill_api/api/postgres_trigger/list_postgres_triggers.py +237 -0
  17. windmill_api/api/postgres_trigger/set_postgres_trigger_enabled.py +113 -0
  18. windmill_api/api/postgres_trigger/update_postgres_publication.py +121 -0
  19. windmill_api/api/postgres_trigger/update_postgres_trigger.py +113 -0
  20. windmill_api/api/teams/__init__.py +0 -0
  21. windmill_api/api/teams/sync_teams.py +131 -0
  22. windmill_api/api/workspace/update_operator_settings.py +109 -0
  23. windmill_api/models/add_granular_acls_kind.py +1 -0
  24. windmill_api/models/channel_info.py +80 -0
  25. windmill_api/models/create_postgres_publication_json_body.py +90 -0
  26. windmill_api/models/create_postgres_publication_json_body_table_to_track_item.py +86 -0
  27. windmill_api/models/create_postgres_publication_json_body_table_to_track_item_table_to_track_item.py +79 -0
  28. windmill_api/models/create_postgres_replication_slot_json_body.py +58 -0
  29. windmill_api/models/create_postgres_trigger_json_body.py +125 -0
  30. windmill_api/models/create_postgres_trigger_json_body_publication.py +92 -0
  31. windmill_api/models/create_postgres_trigger_json_body_publication_table_to_track_item.py +86 -0
  32. windmill_api/models/create_postgres_trigger_json_body_publication_table_to_track_item_table_to_track_item.py +79 -0
  33. windmill_api/models/create_template_script_json_body.py +90 -0
  34. windmill_api/models/create_template_script_json_body_language.py +8 -0
  35. windmill_api/models/create_template_script_json_body_relations_item.py +86 -0
  36. windmill_api/models/create_template_script_json_body_relations_item_table_to_track_item.py +79 -0
  37. windmill_api/models/delete_postgres_replication_slot_json_body.py +58 -0
  38. windmill_api/models/edit_postgres_trigger.py +123 -0
  39. windmill_api/models/edit_postgres_trigger_publication.py +90 -0
  40. windmill_api/models/edit_postgres_trigger_publication_table_to_track_item.py +86 -0
  41. windmill_api/models/edit_postgres_trigger_publication_table_to_track_item_table_to_track_item.py +79 -0
  42. windmill_api/models/get_granular_acls_kind.py +1 -0
  43. windmill_api/models/get_http_trigger_response_200.py +36 -36
  44. windmill_api/models/get_postgres_publication_response_200.py +90 -0
  45. windmill_api/models/get_postgres_publication_response_200_table_to_track_item.py +86 -0
  46. windmill_api/models/get_postgres_publication_response_200_table_to_track_item_table_to_track_item.py +79 -0
  47. windmill_api/models/get_postgres_trigger_response_200.py +178 -0
  48. windmill_api/models/get_postgres_trigger_response_200_extra_perms.py +44 -0
  49. windmill_api/models/get_settings_response_200.py +19 -0
  50. windmill_api/models/get_settings_response_200_operator_settings.py +114 -0
  51. windmill_api/models/get_triggers_count_of_flow_response_200.py +8 -0
  52. windmill_api/models/get_triggers_count_of_script_response_200.py +8 -0
  53. windmill_api/models/get_used_triggers_response_200.py +7 -0
  54. windmill_api/models/get_websocket_trigger_response_200.py +37 -37
  55. windmill_api/models/http_trigger.py +36 -36
  56. windmill_api/models/language.py +8 -0
  57. windmill_api/models/list_http_triggers_response_200_item.py +36 -36
  58. windmill_api/models/list_postgres_replication_slot_response_200_item.py +66 -0
  59. windmill_api/models/list_postgres_triggers_response_200_item.py +182 -0
  60. windmill_api/models/list_postgres_triggers_response_200_item_extra_perms.py +44 -0
  61. windmill_api/models/list_user_workspaces_response_200_workspaces_item.py +32 -1
  62. windmill_api/models/list_user_workspaces_response_200_workspaces_item_operator_settings.py +114 -0
  63. windmill_api/models/list_websocket_triggers_response_200_item.py +37 -37
  64. windmill_api/models/new_postgres_trigger.py +125 -0
  65. windmill_api/models/new_postgres_trigger_publication.py +90 -0
  66. windmill_api/models/new_postgres_trigger_publication_table_to_track_item.py +86 -0
  67. windmill_api/models/new_postgres_trigger_publication_table_to_track_item_table_to_track_item.py +79 -0
  68. windmill_api/models/operator_settings.py +114 -0
  69. windmill_api/models/postgres_trigger.py +178 -0
  70. windmill_api/models/postgres_trigger_extra_perms.py +44 -0
  71. windmill_api/models/publication_data.py +86 -0
  72. windmill_api/models/publication_data_table_to_track_item.py +84 -0
  73. windmill_api/models/publication_data_table_to_track_item_table_to_track_item.py +79 -0
  74. windmill_api/models/relations.py +80 -0
  75. windmill_api/models/relations_table_to_track_item.py +79 -0
  76. windmill_api/models/remove_granular_acls_kind.py +1 -0
  77. windmill_api/models/script_lang.py +25 -0
  78. windmill_api/models/set_postgres_trigger_enabled_json_body.py +58 -0
  79. windmill_api/models/slot.py +58 -0
  80. windmill_api/models/slot_list.py +66 -0
  81. windmill_api/models/sync_teams_response_200_item.py +87 -0
  82. windmill_api/models/sync_teams_response_200_item_channels_item.py +80 -0
  83. windmill_api/models/table_to_track_item.py +79 -0
  84. windmill_api/models/team_info.py +87 -0
  85. windmill_api/models/team_info_channels_item.py +80 -0
  86. windmill_api/models/template_script.py +90 -0
  87. windmill_api/models/template_script_language.py +8 -0
  88. windmill_api/models/template_script_relations_item.py +82 -0
  89. windmill_api/models/template_script_relations_item_table_to_track_item.py +79 -0
  90. windmill_api/models/trigger_extra_property.py +95 -0
  91. windmill_api/models/trigger_extra_property_extra_perms.py +44 -0
  92. windmill_api/models/triggers_count.py +8 -0
  93. windmill_api/models/update_operator_settings_json_body.py +114 -0
  94. windmill_api/models/update_postgres_publication_json_body.py +90 -0
  95. windmill_api/models/update_postgres_publication_json_body_table_to_track_item.py +86 -0
  96. windmill_api/models/update_postgres_publication_json_body_table_to_track_item_table_to_track_item.py +79 -0
  97. windmill_api/models/update_postgres_trigger_json_body.py +123 -0
  98. windmill_api/models/update_postgres_trigger_json_body_publication.py +92 -0
  99. windmill_api/models/update_postgres_trigger_json_body_publication_table_to_track_item.py +86 -0
  100. windmill_api/models/update_postgres_trigger_json_body_publication_table_to_track_item_table_to_track_item.py +79 -0
  101. windmill_api/models/user_workspace_list_workspaces_item.py +30 -1
  102. windmill_api/models/user_workspace_list_workspaces_item_operator_settings.py +114 -0
  103. windmill_api/models/websocket_trigger.py +37 -37
  104. {windmill_api-1.448.1.dist-info → windmill_api-1.449.1.dist-info}/METADATA +1 -1
  105. {windmill_api-1.448.1.dist-info → windmill_api-1.449.1.dist-info}/RECORD +107 -20
  106. {windmill_api-1.448.1.dist-info → windmill_api-1.449.1.dist-info}/LICENSE +0 -0
  107. {windmill_api-1.448.1.dist-info → windmill_api-1.449.1.dist-info}/WHEEL +0 -0
File without changes
@@ -0,0 +1,121 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.create_postgres_publication_json_body import CreatePostgresPublicationJsonBody
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ publication: str,
15
+ path: str,
16
+ *,
17
+ json_body: CreatePostgresPublicationJsonBody,
18
+ ) -> Dict[str, Any]:
19
+ pass
20
+
21
+ json_json_body = json_body.to_dict()
22
+
23
+ return {
24
+ "method": "post",
25
+ "url": "/w/{workspace}/postgres_triggers/publication/create/{publication}/{path}".format(
26
+ workspace=workspace,
27
+ publication=publication,
28
+ path=path,
29
+ ),
30
+ "json": json_json_body,
31
+ }
32
+
33
+
34
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
35
+ if client.raise_on_unexpected_status:
36
+ raise errors.UnexpectedStatus(response.status_code, response.content)
37
+ else:
38
+ return None
39
+
40
+
41
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
42
+ return Response(
43
+ status_code=HTTPStatus(response.status_code),
44
+ content=response.content,
45
+ headers=response.headers,
46
+ parsed=_parse_response(client=client, response=response),
47
+ )
48
+
49
+
50
+ def sync_detailed(
51
+ workspace: str,
52
+ publication: str,
53
+ path: str,
54
+ *,
55
+ client: Union[AuthenticatedClient, Client],
56
+ json_body: CreatePostgresPublicationJsonBody,
57
+ ) -> Response[Any]:
58
+ """create publication for postgres
59
+
60
+ Args:
61
+ workspace (str):
62
+ publication (str):
63
+ path (str):
64
+ json_body (CreatePostgresPublicationJsonBody):
65
+
66
+ Raises:
67
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
68
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
69
+
70
+ Returns:
71
+ Response[Any]
72
+ """
73
+
74
+ kwargs = _get_kwargs(
75
+ workspace=workspace,
76
+ publication=publication,
77
+ path=path,
78
+ json_body=json_body,
79
+ )
80
+
81
+ response = client.get_httpx_client().request(
82
+ **kwargs,
83
+ )
84
+
85
+ return _build_response(client=client, response=response)
86
+
87
+
88
+ async def asyncio_detailed(
89
+ workspace: str,
90
+ publication: str,
91
+ path: str,
92
+ *,
93
+ client: Union[AuthenticatedClient, Client],
94
+ json_body: CreatePostgresPublicationJsonBody,
95
+ ) -> Response[Any]:
96
+ """create publication for postgres
97
+
98
+ Args:
99
+ workspace (str):
100
+ publication (str):
101
+ path (str):
102
+ json_body (CreatePostgresPublicationJsonBody):
103
+
104
+ Raises:
105
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
106
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
107
+
108
+ Returns:
109
+ Response[Any]
110
+ """
111
+
112
+ kwargs = _get_kwargs(
113
+ workspace=workspace,
114
+ publication=publication,
115
+ path=path,
116
+ json_body=json_body,
117
+ )
118
+
119
+ response = await client.get_async_httpx_client().request(**kwargs)
120
+
121
+ return _build_response(client=client, response=response)
@@ -0,0 +1,113 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.create_postgres_replication_slot_json_body import CreatePostgresReplicationSlotJsonBody
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ path: str,
15
+ *,
16
+ json_body: CreatePostgresReplicationSlotJsonBody,
17
+ ) -> Dict[str, Any]:
18
+ pass
19
+
20
+ json_json_body = json_body.to_dict()
21
+
22
+ return {
23
+ "method": "post",
24
+ "url": "/w/{workspace}/postgres_triggers/slot/create/{path}".format(
25
+ workspace=workspace,
26
+ path=path,
27
+ ),
28
+ "json": json_json_body,
29
+ }
30
+
31
+
32
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
33
+ if client.raise_on_unexpected_status:
34
+ raise errors.UnexpectedStatus(response.status_code, response.content)
35
+ else:
36
+ return None
37
+
38
+
39
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
40
+ return Response(
41
+ status_code=HTTPStatus(response.status_code),
42
+ content=response.content,
43
+ headers=response.headers,
44
+ parsed=_parse_response(client=client, response=response),
45
+ )
46
+
47
+
48
+ def sync_detailed(
49
+ workspace: str,
50
+ path: str,
51
+ *,
52
+ client: Union[AuthenticatedClient, Client],
53
+ json_body: CreatePostgresReplicationSlotJsonBody,
54
+ ) -> Response[Any]:
55
+ """create replication slot for postgres
56
+
57
+ Args:
58
+ workspace (str):
59
+ path (str):
60
+ json_body (CreatePostgresReplicationSlotJsonBody):
61
+
62
+ Raises:
63
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
64
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
65
+
66
+ Returns:
67
+ Response[Any]
68
+ """
69
+
70
+ kwargs = _get_kwargs(
71
+ workspace=workspace,
72
+ path=path,
73
+ json_body=json_body,
74
+ )
75
+
76
+ response = client.get_httpx_client().request(
77
+ **kwargs,
78
+ )
79
+
80
+ return _build_response(client=client, response=response)
81
+
82
+
83
+ async def asyncio_detailed(
84
+ workspace: str,
85
+ path: str,
86
+ *,
87
+ client: Union[AuthenticatedClient, Client],
88
+ json_body: CreatePostgresReplicationSlotJsonBody,
89
+ ) -> Response[Any]:
90
+ """create replication slot for postgres
91
+
92
+ Args:
93
+ workspace (str):
94
+ path (str):
95
+ json_body (CreatePostgresReplicationSlotJsonBody):
96
+
97
+ Raises:
98
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
99
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
100
+
101
+ Returns:
102
+ Response[Any]
103
+ """
104
+
105
+ kwargs = _get_kwargs(
106
+ workspace=workspace,
107
+ path=path,
108
+ json_body=json_body,
109
+ )
110
+
111
+ response = await client.get_async_httpx_client().request(**kwargs)
112
+
113
+ return _build_response(client=client, response=response)
@@ -0,0 +1,105 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.create_postgres_trigger_json_body import CreatePostgresTriggerJsonBody
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ *,
15
+ json_body: CreatePostgresTriggerJsonBody,
16
+ ) -> Dict[str, Any]:
17
+ pass
18
+
19
+ json_json_body = json_body.to_dict()
20
+
21
+ return {
22
+ "method": "post",
23
+ "url": "/w/{workspace}/postgres_triggers/create".format(
24
+ workspace=workspace,
25
+ ),
26
+ "json": json_json_body,
27
+ }
28
+
29
+
30
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
31
+ if client.raise_on_unexpected_status:
32
+ raise errors.UnexpectedStatus(response.status_code, response.content)
33
+ else:
34
+ return None
35
+
36
+
37
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
38
+ return Response(
39
+ status_code=HTTPStatus(response.status_code),
40
+ content=response.content,
41
+ headers=response.headers,
42
+ parsed=_parse_response(client=client, response=response),
43
+ )
44
+
45
+
46
+ def sync_detailed(
47
+ workspace: str,
48
+ *,
49
+ client: Union[AuthenticatedClient, Client],
50
+ json_body: CreatePostgresTriggerJsonBody,
51
+ ) -> Response[Any]:
52
+ """create postgres trigger
53
+
54
+ Args:
55
+ workspace (str):
56
+ json_body (CreatePostgresTriggerJsonBody):
57
+
58
+ Raises:
59
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
60
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
61
+
62
+ Returns:
63
+ Response[Any]
64
+ """
65
+
66
+ kwargs = _get_kwargs(
67
+ workspace=workspace,
68
+ json_body=json_body,
69
+ )
70
+
71
+ response = client.get_httpx_client().request(
72
+ **kwargs,
73
+ )
74
+
75
+ return _build_response(client=client, response=response)
76
+
77
+
78
+ async def asyncio_detailed(
79
+ workspace: str,
80
+ *,
81
+ client: Union[AuthenticatedClient, Client],
82
+ json_body: CreatePostgresTriggerJsonBody,
83
+ ) -> Response[Any]:
84
+ """create postgres trigger
85
+
86
+ Args:
87
+ workspace (str):
88
+ json_body (CreatePostgresTriggerJsonBody):
89
+
90
+ Raises:
91
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
92
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
93
+
94
+ Returns:
95
+ Response[Any]
96
+ """
97
+
98
+ kwargs = _get_kwargs(
99
+ workspace=workspace,
100
+ json_body=json_body,
101
+ )
102
+
103
+ response = await client.get_async_httpx_client().request(**kwargs)
104
+
105
+ return _build_response(client=client, response=response)
@@ -0,0 +1,105 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.create_template_script_json_body import CreateTemplateScriptJsonBody
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ *,
15
+ json_body: CreateTemplateScriptJsonBody,
16
+ ) -> Dict[str, Any]:
17
+ pass
18
+
19
+ json_json_body = json_body.to_dict()
20
+
21
+ return {
22
+ "method": "post",
23
+ "url": "/w/{workspace}/postgres_triggers/create_template_script".format(
24
+ workspace=workspace,
25
+ ),
26
+ "json": json_json_body,
27
+ }
28
+
29
+
30
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
31
+ if client.raise_on_unexpected_status:
32
+ raise errors.UnexpectedStatus(response.status_code, response.content)
33
+ else:
34
+ return None
35
+
36
+
37
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
38
+ return Response(
39
+ status_code=HTTPStatus(response.status_code),
40
+ content=response.content,
41
+ headers=response.headers,
42
+ parsed=_parse_response(client=client, response=response),
43
+ )
44
+
45
+
46
+ def sync_detailed(
47
+ workspace: str,
48
+ *,
49
+ client: Union[AuthenticatedClient, Client],
50
+ json_body: CreateTemplateScriptJsonBody,
51
+ ) -> Response[Any]:
52
+ """create template script
53
+
54
+ Args:
55
+ workspace (str):
56
+ json_body (CreateTemplateScriptJsonBody):
57
+
58
+ Raises:
59
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
60
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
61
+
62
+ Returns:
63
+ Response[Any]
64
+ """
65
+
66
+ kwargs = _get_kwargs(
67
+ workspace=workspace,
68
+ json_body=json_body,
69
+ )
70
+
71
+ response = client.get_httpx_client().request(
72
+ **kwargs,
73
+ )
74
+
75
+ return _build_response(client=client, response=response)
76
+
77
+
78
+ async def asyncio_detailed(
79
+ workspace: str,
80
+ *,
81
+ client: Union[AuthenticatedClient, Client],
82
+ json_body: CreateTemplateScriptJsonBody,
83
+ ) -> Response[Any]:
84
+ """create template script
85
+
86
+ Args:
87
+ workspace (str):
88
+ json_body (CreateTemplateScriptJsonBody):
89
+
90
+ Raises:
91
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
92
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
93
+
94
+ Returns:
95
+ Response[Any]
96
+ """
97
+
98
+ kwargs = _get_kwargs(
99
+ workspace=workspace,
100
+ json_body=json_body,
101
+ )
102
+
103
+ response = await client.get_async_httpx_client().request(**kwargs)
104
+
105
+ return _build_response(client=client, response=response)
@@ -0,0 +1,109 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...types import Response
9
+
10
+
11
+ def _get_kwargs(
12
+ workspace: str,
13
+ publication: str,
14
+ path: str,
15
+ ) -> Dict[str, Any]:
16
+ pass
17
+
18
+ return {
19
+ "method": "delete",
20
+ "url": "/w/{workspace}/postgres_triggers/publication/delete/{publication}/{path}".format(
21
+ workspace=workspace,
22
+ publication=publication,
23
+ path=path,
24
+ ),
25
+ }
26
+
27
+
28
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
29
+ if client.raise_on_unexpected_status:
30
+ raise errors.UnexpectedStatus(response.status_code, response.content)
31
+ else:
32
+ return None
33
+
34
+
35
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
36
+ return Response(
37
+ status_code=HTTPStatus(response.status_code),
38
+ content=response.content,
39
+ headers=response.headers,
40
+ parsed=_parse_response(client=client, response=response),
41
+ )
42
+
43
+
44
+ def sync_detailed(
45
+ workspace: str,
46
+ publication: str,
47
+ path: str,
48
+ *,
49
+ client: Union[AuthenticatedClient, Client],
50
+ ) -> Response[Any]:
51
+ """delete postgres publication
52
+
53
+ Args:
54
+ workspace (str):
55
+ publication (str):
56
+ path (str):
57
+
58
+ Raises:
59
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
60
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
61
+
62
+ Returns:
63
+ Response[Any]
64
+ """
65
+
66
+ kwargs = _get_kwargs(
67
+ workspace=workspace,
68
+ publication=publication,
69
+ path=path,
70
+ )
71
+
72
+ response = client.get_httpx_client().request(
73
+ **kwargs,
74
+ )
75
+
76
+ return _build_response(client=client, response=response)
77
+
78
+
79
+ async def asyncio_detailed(
80
+ workspace: str,
81
+ publication: str,
82
+ path: str,
83
+ *,
84
+ client: Union[AuthenticatedClient, Client],
85
+ ) -> Response[Any]:
86
+ """delete postgres publication
87
+
88
+ Args:
89
+ workspace (str):
90
+ publication (str):
91
+ path (str):
92
+
93
+ Raises:
94
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
95
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
96
+
97
+ Returns:
98
+ Response[Any]
99
+ """
100
+
101
+ kwargs = _get_kwargs(
102
+ workspace=workspace,
103
+ publication=publication,
104
+ path=path,
105
+ )
106
+
107
+ response = await client.get_async_httpx_client().request(**kwargs)
108
+
109
+ return _build_response(client=client, response=response)
@@ -0,0 +1,113 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.delete_postgres_replication_slot_json_body import DeletePostgresReplicationSlotJsonBody
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ path: str,
15
+ *,
16
+ json_body: DeletePostgresReplicationSlotJsonBody,
17
+ ) -> Dict[str, Any]:
18
+ pass
19
+
20
+ json_json_body = json_body.to_dict()
21
+
22
+ return {
23
+ "method": "delete",
24
+ "url": "/w/{workspace}/postgres_triggers/slot/delete/{path}".format(
25
+ workspace=workspace,
26
+ path=path,
27
+ ),
28
+ "json": json_json_body,
29
+ }
30
+
31
+
32
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
33
+ if client.raise_on_unexpected_status:
34
+ raise errors.UnexpectedStatus(response.status_code, response.content)
35
+ else:
36
+ return None
37
+
38
+
39
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
40
+ return Response(
41
+ status_code=HTTPStatus(response.status_code),
42
+ content=response.content,
43
+ headers=response.headers,
44
+ parsed=_parse_response(client=client, response=response),
45
+ )
46
+
47
+
48
+ def sync_detailed(
49
+ workspace: str,
50
+ path: str,
51
+ *,
52
+ client: Union[AuthenticatedClient, Client],
53
+ json_body: DeletePostgresReplicationSlotJsonBody,
54
+ ) -> Response[Any]:
55
+ """delete postgres replication slot
56
+
57
+ Args:
58
+ workspace (str):
59
+ path (str):
60
+ json_body (DeletePostgresReplicationSlotJsonBody):
61
+
62
+ Raises:
63
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
64
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
65
+
66
+ Returns:
67
+ Response[Any]
68
+ """
69
+
70
+ kwargs = _get_kwargs(
71
+ workspace=workspace,
72
+ path=path,
73
+ json_body=json_body,
74
+ )
75
+
76
+ response = client.get_httpx_client().request(
77
+ **kwargs,
78
+ )
79
+
80
+ return _build_response(client=client, response=response)
81
+
82
+
83
+ async def asyncio_detailed(
84
+ workspace: str,
85
+ path: str,
86
+ *,
87
+ client: Union[AuthenticatedClient, Client],
88
+ json_body: DeletePostgresReplicationSlotJsonBody,
89
+ ) -> Response[Any]:
90
+ """delete postgres replication slot
91
+
92
+ Args:
93
+ workspace (str):
94
+ path (str):
95
+ json_body (DeletePostgresReplicationSlotJsonBody):
96
+
97
+ Raises:
98
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
99
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
100
+
101
+ Returns:
102
+ Response[Any]
103
+ """
104
+
105
+ kwargs = _get_kwargs(
106
+ workspace=workspace,
107
+ path=path,
108
+ json_body=json_body,
109
+ )
110
+
111
+ response = await client.get_async_httpx_client().request(**kwargs)
112
+
113
+ return _build_response(client=client, response=response)