convexity-api-client 0.21.0.dev330__py3-none-any.whl → 0.21.0.dev332__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.
Files changed (37) hide show
  1. convexity_api_client/api/v1/erp_config_delete_user_table_preference.py +180 -0
  2. convexity_api_client/api/v1/erp_config_list_user_table_preferences.py +166 -0
  3. convexity_api_client/api/v1/erp_config_update_user_table_preference.py +202 -0
  4. convexity_api_client/api/v1/inventory_list_templates.py +18 -61
  5. convexity_api_client/api/v1/purchasing_list_pos.py +18 -61
  6. convexity_api_client/api/v1/purchasing_list_vendors.py +18 -61
  7. convexity_api_client/api/v1/sales_list_invoices.py +18 -61
  8. convexity_api_client/api/v1/sales_list_orders.py +18 -61
  9. convexity_api_client/models/__init__.py +24 -12
  10. convexity_api_client/models/erp_configured_column_config.py +31 -0
  11. convexity_api_client/models/erp_configured_column_config_data_type_type_0.py +12 -0
  12. convexity_api_client/models/erp_project_config.py +18 -0
  13. convexity_api_client/models/erp_project_config_tablecolumns.py +68 -0
  14. convexity_api_client/models/erp_user_table_preference.py +201 -0
  15. convexity_api_client/models/erp_user_table_preference_response.py +102 -0
  16. convexity_api_client/models/erp_user_table_preference_response_columnlabels.py +47 -0
  17. convexity_api_client/models/erp_user_table_preference_response_columnwidths.py +47 -0
  18. convexity_api_client/models/import_task_payload.py +108 -0
  19. convexity_api_client/models/import_task_payload_type.py +9 -0
  20. convexity_api_client/models/list_erp_user_table_preferences_response.py +75 -0
  21. convexity_api_client/models/list_inventory_items_request.py +11 -62
  22. convexity_api_client/models/profile.py +43 -0
  23. convexity_api_client/models/project.py +43 -0
  24. convexity_api_client/models/search_purchase_orders_request.py +11 -51
  25. convexity_api_client/models/update_erp_user_table_preference_request.py +92 -0
  26. convexity_api_client/models/update_erp_user_table_preference_request_columnlabels.py +47 -0
  27. convexity_api_client/models/update_erp_user_table_preference_request_columnwidths.py +47 -0
  28. convexity_api_client/models/worker_task_response.py +18 -2
  29. {convexity_api_client-0.21.0.dev330.dist-info → convexity_api_client-0.21.0.dev332.dist-info}/METADATA +1 -1
  30. {convexity_api_client-0.21.0.dev330.dist-info → convexity_api_client-0.21.0.dev332.dist-info}/RECORD +31 -22
  31. {convexity_api_client-0.21.0.dev330.dist-info → convexity_api_client-0.21.0.dev332.dist-info}/WHEEL +1 -1
  32. convexity_api_client/models/inventory_list_templates_filter_operator_type_0.py +0 -19
  33. convexity_api_client/models/list_inventory_items_request_filter_operator_type_0.py +0 -19
  34. convexity_api_client/models/purchasing_list_pos_filter_operator_type_0.py +0 -19
  35. convexity_api_client/models/purchasing_list_vendors_filter_operator_type_0.py +0 -19
  36. convexity_api_client/models/sales_list_invoices_filter_operator_type_0.py +0 -19
  37. convexity_api_client/models/sales_list_orders_filter_operator_type_0.py +0 -19
@@ -0,0 +1,180 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, cast
3
+ from urllib.parse import quote
4
+
5
+ import httpx
6
+
7
+ from ... import errors
8
+ from ...client import AuthenticatedClient, Client
9
+ from ...models.http_validation_error import HTTPValidationError
10
+ from ...types import UNSET, Response
11
+
12
+
13
+ def _get_kwargs(
14
+ surface_key: str,
15
+ *,
16
+ project_id: str,
17
+ ) -> dict[str, Any]:
18
+
19
+ params: dict[str, Any] = {}
20
+
21
+ params["projectId"] = project_id
22
+
23
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
24
+
25
+ _kwargs: dict[str, Any] = {
26
+ "method": "delete",
27
+ "url": "/v1/apps/erp/config/user-table-preferences/{surface_key}".format(
28
+ surface_key=quote(str(surface_key), safe=""),
29
+ ),
30
+ "params": params,
31
+ }
32
+
33
+ return _kwargs
34
+
35
+
36
+ def _parse_response(
37
+ *, client: AuthenticatedClient | Client, response: httpx.Response
38
+ ) -> Any | HTTPValidationError | None:
39
+ if response.status_code == 204:
40
+ response_204 = cast(Any, None)
41
+ return response_204
42
+
43
+ if response.status_code == 422:
44
+ response_422 = HTTPValidationError.from_dict(response.json())
45
+
46
+ return response_422
47
+
48
+ if client.raise_on_unexpected_status:
49
+ raise errors.UnexpectedStatus(response.status_code, response.content)
50
+ else:
51
+ return None
52
+
53
+
54
+ def _build_response(
55
+ *, client: AuthenticatedClient | Client, response: httpx.Response
56
+ ) -> Response[Any | HTTPValidationError]:
57
+ return Response(
58
+ status_code=HTTPStatus(response.status_code),
59
+ content=response.content,
60
+ headers=response.headers,
61
+ parsed=_parse_response(client=client, response=response),
62
+ )
63
+
64
+
65
+ def sync_detailed(
66
+ surface_key: str,
67
+ *,
68
+ client: AuthenticatedClient | Client,
69
+ project_id: str,
70
+ ) -> Response[Any | HTTPValidationError]:
71
+ """Delete User Table Preference
72
+
73
+ Args:
74
+ surface_key (str):
75
+ project_id (str):
76
+
77
+ Raises:
78
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
79
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
80
+
81
+ Returns:
82
+ Response[Any | HTTPValidationError]
83
+ """
84
+
85
+ kwargs = _get_kwargs(
86
+ surface_key=surface_key,
87
+ project_id=project_id,
88
+ )
89
+
90
+ response = client.get_httpx_client().request(
91
+ **kwargs,
92
+ )
93
+
94
+ return _build_response(client=client, response=response)
95
+
96
+
97
+ def sync(
98
+ surface_key: str,
99
+ *,
100
+ client: AuthenticatedClient | Client,
101
+ project_id: str,
102
+ ) -> Any | HTTPValidationError | None:
103
+ """Delete User Table Preference
104
+
105
+ Args:
106
+ surface_key (str):
107
+ project_id (str):
108
+
109
+ Raises:
110
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
111
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
112
+
113
+ Returns:
114
+ Any | HTTPValidationError
115
+ """
116
+
117
+ return sync_detailed(
118
+ surface_key=surface_key,
119
+ client=client,
120
+ project_id=project_id,
121
+ ).parsed
122
+
123
+
124
+ async def asyncio_detailed(
125
+ surface_key: str,
126
+ *,
127
+ client: AuthenticatedClient | Client,
128
+ project_id: str,
129
+ ) -> Response[Any | HTTPValidationError]:
130
+ """Delete User Table Preference
131
+
132
+ Args:
133
+ surface_key (str):
134
+ project_id (str):
135
+
136
+ Raises:
137
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
138
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
139
+
140
+ Returns:
141
+ Response[Any | HTTPValidationError]
142
+ """
143
+
144
+ kwargs = _get_kwargs(
145
+ surface_key=surface_key,
146
+ project_id=project_id,
147
+ )
148
+
149
+ response = await client.get_async_httpx_client().request(**kwargs)
150
+
151
+ return _build_response(client=client, response=response)
152
+
153
+
154
+ async def asyncio(
155
+ surface_key: str,
156
+ *,
157
+ client: AuthenticatedClient | Client,
158
+ project_id: str,
159
+ ) -> Any | HTTPValidationError | None:
160
+ """Delete User Table Preference
161
+
162
+ Args:
163
+ surface_key (str):
164
+ project_id (str):
165
+
166
+ Raises:
167
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
168
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
169
+
170
+ Returns:
171
+ Any | HTTPValidationError
172
+ """
173
+
174
+ return (
175
+ await asyncio_detailed(
176
+ surface_key=surface_key,
177
+ client=client,
178
+ project_id=project_id,
179
+ )
180
+ ).parsed
@@ -0,0 +1,166 @@
1
+ from http import HTTPStatus
2
+ from typing import Any
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.http_validation_error import HTTPValidationError
9
+ from ...models.list_erp_user_table_preferences_response import ListERPUserTablePreferencesResponse
10
+ from ...types import UNSET, Response
11
+
12
+
13
+ def _get_kwargs(
14
+ *,
15
+ project_id: str,
16
+ ) -> dict[str, Any]:
17
+
18
+ params: dict[str, Any] = {}
19
+
20
+ params["projectId"] = project_id
21
+
22
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
23
+
24
+ _kwargs: dict[str, Any] = {
25
+ "method": "get",
26
+ "url": "/v1/apps/erp/config/user-table-preferences",
27
+ "params": params,
28
+ }
29
+
30
+ return _kwargs
31
+
32
+
33
+ def _parse_response(
34
+ *, client: AuthenticatedClient | Client, response: httpx.Response
35
+ ) -> HTTPValidationError | ListERPUserTablePreferencesResponse | None:
36
+ if response.status_code == 200:
37
+ response_200 = ListERPUserTablePreferencesResponse.from_dict(response.json())
38
+
39
+ return response_200
40
+
41
+ if response.status_code == 422:
42
+ response_422 = HTTPValidationError.from_dict(response.json())
43
+
44
+ return response_422
45
+
46
+ if client.raise_on_unexpected_status:
47
+ raise errors.UnexpectedStatus(response.status_code, response.content)
48
+ else:
49
+ return None
50
+
51
+
52
+ def _build_response(
53
+ *, client: AuthenticatedClient | Client, response: httpx.Response
54
+ ) -> Response[HTTPValidationError | ListERPUserTablePreferencesResponse]:
55
+ return Response(
56
+ status_code=HTTPStatus(response.status_code),
57
+ content=response.content,
58
+ headers=response.headers,
59
+ parsed=_parse_response(client=client, response=response),
60
+ )
61
+
62
+
63
+ def sync_detailed(
64
+ *,
65
+ client: AuthenticatedClient | Client,
66
+ project_id: str,
67
+ ) -> Response[HTTPValidationError | ListERPUserTablePreferencesResponse]:
68
+ """List User Table Preferences
69
+
70
+ Args:
71
+ project_id (str):
72
+
73
+ Raises:
74
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
75
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
76
+
77
+ Returns:
78
+ Response[HTTPValidationError | ListERPUserTablePreferencesResponse]
79
+ """
80
+
81
+ kwargs = _get_kwargs(
82
+ project_id=project_id,
83
+ )
84
+
85
+ response = client.get_httpx_client().request(
86
+ **kwargs,
87
+ )
88
+
89
+ return _build_response(client=client, response=response)
90
+
91
+
92
+ def sync(
93
+ *,
94
+ client: AuthenticatedClient | Client,
95
+ project_id: str,
96
+ ) -> HTTPValidationError | ListERPUserTablePreferencesResponse | None:
97
+ """List User Table Preferences
98
+
99
+ Args:
100
+ project_id (str):
101
+
102
+ Raises:
103
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
104
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
105
+
106
+ Returns:
107
+ HTTPValidationError | ListERPUserTablePreferencesResponse
108
+ """
109
+
110
+ return sync_detailed(
111
+ client=client,
112
+ project_id=project_id,
113
+ ).parsed
114
+
115
+
116
+ async def asyncio_detailed(
117
+ *,
118
+ client: AuthenticatedClient | Client,
119
+ project_id: str,
120
+ ) -> Response[HTTPValidationError | ListERPUserTablePreferencesResponse]:
121
+ """List User Table Preferences
122
+
123
+ Args:
124
+ project_id (str):
125
+
126
+ Raises:
127
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
128
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
129
+
130
+ Returns:
131
+ Response[HTTPValidationError | ListERPUserTablePreferencesResponse]
132
+ """
133
+
134
+ kwargs = _get_kwargs(
135
+ project_id=project_id,
136
+ )
137
+
138
+ response = await client.get_async_httpx_client().request(**kwargs)
139
+
140
+ return _build_response(client=client, response=response)
141
+
142
+
143
+ async def asyncio(
144
+ *,
145
+ client: AuthenticatedClient | Client,
146
+ project_id: str,
147
+ ) -> HTTPValidationError | ListERPUserTablePreferencesResponse | None:
148
+ """List User Table Preferences
149
+
150
+ Args:
151
+ project_id (str):
152
+
153
+ Raises:
154
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
155
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
156
+
157
+ Returns:
158
+ HTTPValidationError | ListERPUserTablePreferencesResponse
159
+ """
160
+
161
+ return (
162
+ await asyncio_detailed(
163
+ client=client,
164
+ project_id=project_id,
165
+ )
166
+ ).parsed
@@ -0,0 +1,202 @@
1
+ from http import HTTPStatus
2
+ from typing import Any
3
+ from urllib.parse import quote
4
+
5
+ import httpx
6
+
7
+ from ... import errors
8
+ from ...client import AuthenticatedClient, Client
9
+ from ...models.erp_user_table_preference_response import ERPUserTablePreferenceResponse
10
+ from ...models.http_validation_error import HTTPValidationError
11
+ from ...models.update_erp_user_table_preference_request import UpdateERPUserTablePreferenceRequest
12
+ from ...types import UNSET, Response
13
+
14
+
15
+ def _get_kwargs(
16
+ surface_key: str,
17
+ *,
18
+ body: UpdateERPUserTablePreferenceRequest,
19
+ project_id: str,
20
+ ) -> dict[str, Any]:
21
+ headers: dict[str, Any] = {}
22
+
23
+ params: dict[str, Any] = {}
24
+
25
+ params["projectId"] = project_id
26
+
27
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
28
+
29
+ _kwargs: dict[str, Any] = {
30
+ "method": "put",
31
+ "url": "/v1/apps/erp/config/user-table-preferences/{surface_key}".format(
32
+ surface_key=quote(str(surface_key), safe=""),
33
+ ),
34
+ "params": params,
35
+ }
36
+
37
+ _kwargs["json"] = body.to_dict()
38
+
39
+ headers["Content-Type"] = "application/json"
40
+
41
+ _kwargs["headers"] = headers
42
+ return _kwargs
43
+
44
+
45
+ def _parse_response(
46
+ *, client: AuthenticatedClient | Client, response: httpx.Response
47
+ ) -> ERPUserTablePreferenceResponse | HTTPValidationError | None:
48
+ if response.status_code == 200:
49
+ response_200 = ERPUserTablePreferenceResponse.from_dict(response.json())
50
+
51
+ return response_200
52
+
53
+ if response.status_code == 422:
54
+ response_422 = HTTPValidationError.from_dict(response.json())
55
+
56
+ return response_422
57
+
58
+ if client.raise_on_unexpected_status:
59
+ raise errors.UnexpectedStatus(response.status_code, response.content)
60
+ else:
61
+ return None
62
+
63
+
64
+ def _build_response(
65
+ *, client: AuthenticatedClient | Client, response: httpx.Response
66
+ ) -> Response[ERPUserTablePreferenceResponse | HTTPValidationError]:
67
+ return Response(
68
+ status_code=HTTPStatus(response.status_code),
69
+ content=response.content,
70
+ headers=response.headers,
71
+ parsed=_parse_response(client=client, response=response),
72
+ )
73
+
74
+
75
+ def sync_detailed(
76
+ surface_key: str,
77
+ *,
78
+ client: AuthenticatedClient | Client,
79
+ body: UpdateERPUserTablePreferenceRequest,
80
+ project_id: str,
81
+ ) -> Response[ERPUserTablePreferenceResponse | HTTPValidationError]:
82
+ """Update User Table Preference
83
+
84
+ Args:
85
+ surface_key (str):
86
+ project_id (str):
87
+ body (UpdateERPUserTablePreferenceRequest):
88
+
89
+ Raises:
90
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
91
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
92
+
93
+ Returns:
94
+ Response[ERPUserTablePreferenceResponse | HTTPValidationError]
95
+ """
96
+
97
+ kwargs = _get_kwargs(
98
+ surface_key=surface_key,
99
+ body=body,
100
+ project_id=project_id,
101
+ )
102
+
103
+ response = client.get_httpx_client().request(
104
+ **kwargs,
105
+ )
106
+
107
+ return _build_response(client=client, response=response)
108
+
109
+
110
+ def sync(
111
+ surface_key: str,
112
+ *,
113
+ client: AuthenticatedClient | Client,
114
+ body: UpdateERPUserTablePreferenceRequest,
115
+ project_id: str,
116
+ ) -> ERPUserTablePreferenceResponse | HTTPValidationError | None:
117
+ """Update User Table Preference
118
+
119
+ Args:
120
+ surface_key (str):
121
+ project_id (str):
122
+ body (UpdateERPUserTablePreferenceRequest):
123
+
124
+ Raises:
125
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
126
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
127
+
128
+ Returns:
129
+ ERPUserTablePreferenceResponse | HTTPValidationError
130
+ """
131
+
132
+ return sync_detailed(
133
+ surface_key=surface_key,
134
+ client=client,
135
+ body=body,
136
+ project_id=project_id,
137
+ ).parsed
138
+
139
+
140
+ async def asyncio_detailed(
141
+ surface_key: str,
142
+ *,
143
+ client: AuthenticatedClient | Client,
144
+ body: UpdateERPUserTablePreferenceRequest,
145
+ project_id: str,
146
+ ) -> Response[ERPUserTablePreferenceResponse | HTTPValidationError]:
147
+ """Update User Table Preference
148
+
149
+ Args:
150
+ surface_key (str):
151
+ project_id (str):
152
+ body (UpdateERPUserTablePreferenceRequest):
153
+
154
+ Raises:
155
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
156
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
157
+
158
+ Returns:
159
+ Response[ERPUserTablePreferenceResponse | HTTPValidationError]
160
+ """
161
+
162
+ kwargs = _get_kwargs(
163
+ surface_key=surface_key,
164
+ body=body,
165
+ project_id=project_id,
166
+ )
167
+
168
+ response = await client.get_async_httpx_client().request(**kwargs)
169
+
170
+ return _build_response(client=client, response=response)
171
+
172
+
173
+ async def asyncio(
174
+ surface_key: str,
175
+ *,
176
+ client: AuthenticatedClient | Client,
177
+ body: UpdateERPUserTablePreferenceRequest,
178
+ project_id: str,
179
+ ) -> ERPUserTablePreferenceResponse | HTTPValidationError | None:
180
+ """Update User Table Preference
181
+
182
+ Args:
183
+ surface_key (str):
184
+ project_id (str):
185
+ body (UpdateERPUserTablePreferenceRequest):
186
+
187
+ Raises:
188
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
189
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
190
+
191
+ Returns:
192
+ ERPUserTablePreferenceResponse | HTTPValidationError
193
+ """
194
+
195
+ return (
196
+ await asyncio_detailed(
197
+ surface_key=surface_key,
198
+ client=client,
199
+ body=body,
200
+ project_id=project_id,
201
+ )
202
+ ).parsed